public static function format_value($value, $field, $id) { if ($field->type == "timestamp") { return t2s($value, "Y/m/d-H:i:s"); } if ($field->type == "html") { $result = <<<EOF <a href="JavaScript:eb_show_html('html_{$id}_{$field->name}')">>>details</a> <div id="html_{$id}_{$field->name}" style="display: none;"> \t{$value} </div> EOF; return $result; } if ($field->type == "status") { $result = $field->status_def[$value]; return $result; } if (dd()->has_entity($field->type)) { return '<a href="?action=retrieve&type=' . $field->type . '&id=' . $value . '">' . $value . '</a>'; } return $value; }
public function hydrate_from_form() { $this->title = $_GET['title']; $this->organizer_name = $_GET['organizer_name']; $this->phone = $_GET['phone']; $this->vat = $_GET['vat']; $this->happening_t = $_GET['happening_t']; $this->funding_needed = $_GET['funding_needed']; $this->link = $_GET['link']; $this->short_description = $_GET['short_description']; $this->long_description = $_GET['long_description']; $this->type = $_GET['event_type']; if (isset($_GET["is_confirmed"])) { $this->status = EVENT_STATUS_CONFIRMED; $this->confirmation_t = t2s(time()); } else { $this->confirmation_t = $_GET['confirmation_t']; } }
echo "eb_add_rate('tickets', '{$label}', '{$quantity}', '{$amount}', {$tax_rate}, '{$description}', {$is_free});"; $i++; } } ?> setCounter(<?php echo $i; ?> ); <?php $i = 0; if ($discounts != NULL) { foreach ($discounts as $discount) { $code = $discount->code; $class = $discount->class; $expiration_t = t2s($discount->expiration_t); $type = 'fixed'; $value = $discount->amount; if ($discount->class == DISCOUNT_CLASS_PERCENTAGE) { $value = $discount->percentage; $type = 'percentage'; } echo "eb_add_" . $type . "_discount('discounts', '{$code}', '{$expiration_t}', {$value});"; $i++; } } ?> $("[name=title]").focus(); eb_tiny_mce_on();