public function show() { $time = new TElement('div'); $time->id = "ptimer_" . uniqid(); $url = 'engine.php'; $code = "\n\ntimer({$url},'{$this->page}',{$this->time},'{$time->id}');\n\n"; TScript::create($code); $time->show(); }
/** * Shows the widget at the screen */ public function show() { foreach ($this->elements as $child) { $title = new TElement('h3'); $title->add($child[0]); $content = new TElement('div'); $content->add($child[1]); parent::add($title); parent::add($content); } TScript::create('$(document).ready( function() { $( "#' . $this->id . '" ).accordion(); });'); parent::show(); }
public function show() { $time = new TElement('div'); $time->id = "ptimer_" . uniqid(); $campos = serialize($this->campos); $action = serialize($this->action); //$campos = base64_encode($campos); if (!file_exists('timer.php')) { $file = file_get_contents('app/lib/PWD-Lib/PTimer/timer.php'); $fp = fopen("timer.php", "a"); $escreve = fwrite($fp, "{$file}"); // Fecha o arquivo fclose($fp); } $url = "'timer.php'"; $code = "\n\nrunPtimer({$url},'{$this->model}','{$this->banco}','{$campos}','{$action}','{$this->key}',{$this->time},'{$time->id}');\n\n"; TScript::create($code); $time->show(); }
public static function onTrocaTipoAtividade($param) { $obj = new StdClass(); $obj->ticket_id = ''; $obj->sistema_id = ''; if ($param['tipo_atividade_id']) { try { TTransaction::open('atividade'); $atividade = new TipoAtividade($param['tipo_atividade_id']); $obj->ticket_id = $atividade->ticket_id; $obj->sistema_id = $atividade->sistema_id; TTransaction::close(); } catch (Exception $e) { new TMessage('error', $e->getMessage()); } } if ($atividade->ticket_id && $atividade->sistema_id) { TScript::create(' form_Atividade.descricao.focus(); '); } TForm::sendData('form_Atividade', $obj, FALSE, FALSE); }
/** * Disable the field * @param $form_name Form name * @param $field Field name */ public static function disableField($form_name, $field) { TScript::create(" tseekbutton_disable_field('{$form_name}', '{$field}'); "); }