/** * Constructor */ public function __construct() { parent::__construct(); $this->user = new CMUser(); $this->temperatures = new CMTemperatures(); $this->textfiles = new CMTextfiles(); $this->Lists(); }
public function bodyToString() { $res = $this->tag_body_start; return $res . parent::ToString(false); /*foreach($this->items as $item) $res .= $item; return $res;*/ }
/** * Constructor */ public function __construct($room = null) { parent::__construct(); if ($room) { $this->LoadByRoom($room); } else { $this->temps = array(); } }
/** * Constructor */ public function __construct($key = null) { parent::__construct(); if ($key) { $this->LoadByKey($key); } else { $this->text = array(); } }
/** * Constructor */ public function __construct($id = null) { parent::__construct(); if ($id) { $this->LoadById($id); } else { $this->data = array(); } }
/** * Constructor */ public function __construct($Origo = null) { parent::__construct($Origo); $profile = $this->session->GetAuthenticatedUser(); $this->profile = is_null($profile) ? array() : $profile; $this['isAuthenticated'] = is_null($profile) ? false : true; if (!$this['isAuthenticated']) { $this['id'] = 1; $this['acronym'] = 'anonomous'; } }
public function __construct($name, $value) { parent::__construct(); $lbl = new CColorCell('lbl_' . $name, $value, "show_color_picker('" . $name . "')"); $txt = new CTextBox($name, $value, 7); $txt->setAttribute('maxlength', 6); $txt->setAttribute('id', $name); $txt->addAction('onchange', "set_color_by_name('" . $name . "',this.value)"); $txt->setAttribute('style', 'margin-top: 0px; margin-bottom: 0px'); $this->addItem(array($txt, $lbl)); insert_show_color_picker_javascript(); }
public function __construct($name, $value) { parent::__construct(); $txt = new CTextBox($name, $value); $txt->addStyle('width: 6em;'); $txt->attr('maxlength', 6); $txt->attr('id', zbx_formatDomId($name)); $txt->addAction('onchange', 'set_color_by_name("' . $name . '", this.value)'); $txt->addStyle('style', 'margin-top: 0px; margin-bottom: 0px;'); $lbl = new CColorCell('lbl_' . $name, $value, 'javascript: show_color_picker("' . $name . '")'); $this->addItem(array($txt, $lbl)); insert_show_color_picker_javascript(); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->textfiles = new CMTextfiles(); $this->temperatures = new CMTemperatures(); $this->translate = new CMTranslate(); $this->list = $this->temperatures->ListAll(); $this->various = $this->temperatures->ListVarious(); $this->isTemps = $this->textfiles->getIsTemps(); $this->fromDate = $this->getFromDate(); $this->toDate = $this->getToDate(); $this->todaysDate = $this->textfiles->getTodaysDate(); $this->tomorrowsDate = $this->textfiles->getTomorrowsDate(); $this->isAway = $this->getIsAway(); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->guestbookModel = new CMGuestbook(); }
/** * Constructor */ public function __construct() { parent::__construct(); }
public function addItem($value) { // the string contents of an HTML tag should be properly encoded if (is_string($value)) { $value = $this->encode($value, $this->getEncStrategy()); } parent::addItem($value); }
/** * Gets string representation of action button list. * * @param bool $destroy * * @return string */ public function toString($destroy = true) { zbx_add_post_js('chkbxRange.pageGoName = ' . CJs::encodeJson($this->checkboxesName) . ';'); zbx_add_post_js('chkbxRange.prefix = ' . CJs::encodeJson($this->cookieNamePrefix) . ';'); $items = []; foreach ($this->buttons as $button) { $items[] = $button; } $this->items[] = (new CDiv([$this->getSelectedCountElement(), $items]))->setId('action_buttons')->addClass(ZBX_STYLE_ACTION_BUTTONS); return parent::toString($destroy); }
//Query UMUR $q1 = mysql_query("SELECT\n\t\t\t\t COUNT(IF(umur > 45,1,NULL)) AS '>45',\n\t\t\t\t COUNT(IF(umur BETWEEN 35 AND 45,1,NULL)) AS '35-45',\n\t\t\t\t COUNT(IF(umur BETWEEN 25 AND 35,1,NULL)) AS '25-35',\n\t\t\t\t COUNT(IF(umur BETWEEN 17 AND 25,1,NULL)) AS '17-25',\n\t\t\t\t COUNT(IF(umur < 17,1,NULL)) AS '<17',\n\t\t\t\t COUNT(*) AS jmlh_data\n\t\t\t\tFROM (SELECT tgl_lahir, TIMESTAMPDIFF(YEAR, tgl_lahir, CURDATE()) AS umur FROM `corez_muzakki`) AS dummy_table\n\t\t\t\t"); $data = mysql_fetch_row($q1); $arr = array(); for ($i = 0; $i <= 4; $i++) { ${'g' . $i} = round($data[$i] / $data[5] * 100, 2); array_push($arr, ${'g' . $i}); } $umur = array(array("name" => "Umur", "data" => $arr)); $umur = json_encode($umur); echo "<script>\n\t\t\t\tvar gft = ['> 45 tahun', '35 - 45 tahun', '25 - 35 tahun','17 - 25 tahun','< 17 tahun'];\n\t\t\t\tvar data_pendidikan = {$umur};\n\t\t\t\tgf('usia','Usia', 'Tahun','bar', gft , data_pendidikan);\n\t\t\t\t</script>"; // END UMUR // Query Pendidikan $q2 = mysql_query("SELECT\n\t\t\t\t COUNT(IF(pendidikan = 1,1,NULL)) AS 'SD',\n\t\t\t\t COUNT(IF(pendidikan = 2,1,NULL)) AS 'SMP',\n\t\t\t\t COUNT(IF(pendidikan = 3,1,NULL)) AS 'SMA',\n\t\t\t\t COUNT(IF(pendidikan = 4,1,NULL)) AS 'D1',\n\t\t\t\t COUNT(IF(pendidikan = 5,1,NULL)) AS 'D2',\n\t\t\t\t COUNT(IF(pendidikan = 6,1,NULL)) AS 'D3',\n\t\t\t\t COUNT(IF(pendidikan = 7,1,NULL)) AS 'D4',\n\t\t\t\t COUNT(IF(pendidikan = 8,1,NULL)) AS 'S1',\n\t\t\t\t COUNT(IF(pendidikan = 9,1,NULL)) AS 'S2',\n\t\t\t\t COUNT(IF(pendidikan = 10,1,NULL)) AS 'S3'\n\t\t\t\t\tFROM (SELECT id_pendidikan AS pendidikan FROM `corez_muzakki`) AS dummy_table\n\t\t\t\t\t"); $r = mysql_fetch_row($q2); $o_CObject = new CObject(); $o_CObject->i = 'id_pendidikan'; $ar_id_pendidikan = $o_CObject->Object_Array(); $x = array(); $i = 0; foreach ($ar_id_pendidikan as $value) { $x[] = array('name' => $value, 'y' => (int) $r[$i]); $i++; } $pendidikan = json_encode($x); // End Pendidikan // Query Pendapatan $q4 = mysql_query("SELECT\n\t\t\t\t\t\t\t\tCOUNT(IF(penghasilan = 1,1,NULL)) AS '<1jt',\n\t\t\t\t\t\t\t\tCOUNT(IF(penghasilan = 2,1,NULL)) AS '1-3jt',\n\t\t\t\t\t\t\t\tCOUNT(IF(penghasilan = 3,1,NULL)) AS '3-5jt',\n\t\t\t\t\t\t\t\tCOUNT(IF(penghasilan = 4,1,NULL)) AS '5-10jt',\n\t\t\t\t\t\t\t\tCOUNT(IF(penghasilan = 5,1,NULL)) AS '>10jt',\n\t\t\t\t\t\t\t\tCOUNT(*) AS jmlh_data\n\t\t\t\t\t\t\tFROM (SELECT id_penghasilan AS penghasilan FROM `corez_muzakki`) AS dummy_table\n\t\t\t\t\t\t"); $r2 = mysql_fetch_row($q4); $arrp = array(); for ($i = 0; $i < 4; $i++) {
/** * Constructor * * @param array $options to change the default options used for this class. */ public function __construct($options = array()) { parent::__construct(); $defaults = array('index_template' => 'index', 'sidebar_template' => 'sidebar', 'suffix_template' => '.tpl.php', 'breadcrumb' => true); $this->options = array_merge($defaults, $options); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->temperatures = new CMTemperatures(); $this->LoadLists(); }
/** * Constructor */ public function __construct() { parent::__construct(); $this->views->AddStyle('body:hover{background:#fff url(' . $this->request->base_url . 'themes/grid/grid_12_60_20.png) repeat-y center top;}'); }