function __construct($name = '') { dom_node::__construct($name); $tmpdiv = new dom_div(); $this->inp = new dom_textinput(); $tmpdiv->append_child($this->inp); $this->sp_inc = new dom_span(); $txt = new dom_statictext(); $txt->text = '[+]'; $this->sp_inc->append_child($txt); $tmpdiv->append_child($this->sp_inc); $this->sp_dec = new dom_span(); $txt = new dom_statictext(); $txt->text = '[-]'; $this->sp_dec->append_child($txt); $tmpdiv->append_child($this->sp_dec); $this->css_style['width'] = '250px'; $this->append_child($tmpdiv); $this->dis = new dom_div(); $this->append_child($this->dis); $this->dis->css_style['width'] = '50px'; }
function __construct($qg) { parent::__construct('div'); $this->qg = $qg; $this->css_style['padding'] = '0px'; $this->css_style['margin'] = '0px'; $this->css_style['border'] = '0px'; $this->table = new dom_table(); $this->row = new dom_tr(); $this->hrow = new dom_tr(); $this->hrow->css_class = 'head'; $this->table->css_style['page-break-after'] = 'always'; $this->table->css_style['padding'] = '0px'; $this->table->css_style['margin'] = '0px'; $this->table->css_style['border'] = '0px'; $this->table->css_style['border-collapse'] = 'collapse'; $this->row->css_style['height'] = '8mm'; foreach ($this->qg->what->exprs as $e) { if ($e->alias == '') { print "You should specify an alias for each column."; exit; } $this->txts[$e->alias] = new dom_statictext(); $this->htxts[$e->alias] = new dom_statictext($e->alias); $td = new dom_td(); unset($td->id); $div = new dom_div(); unset($div->id); $div->append_child($this->txts[$e->alias]); $td->append_child($div); $this->row->append_child($td); $td = new dom_td(); unset($td->id); $div = new dom_div(); unset($div->id); $div->append_child($this->htxts[$e->alias]); $td->append_child($div); $this->hrow->append_child($td); } unset($this->row->id); unset($this->table->id); $this->append_child($this->table); $this->table->append_child($this->hrow); $this->table->append_child($this->row); $this->row_height = 16.0; $this->page_height = 270.0; }
function append_child($c) { switch ($this->__model) { case '': case 'raw': //simply put child into listdiv $this->listdiv->append_child($c); break; case 'div': //put child into individual div. Then put this div into listdiv $div = new dom_div(); $div->append_child($c); $this->listdiv->append_child($div); break; case 'table': //the most quirky layout. Create fixed width rows if ($this->__table_row_pos == 0) { $this->__table_temp_row = new dom_tr(); $this->listdiv_table->append_child($this->__table_temp_row); if ($this->__table_row_cnt <= 0) { $this->__table_row_pos = 1; } else { $this->__table_row_pos = $this->__table_row_cnt; } } if ($this->__table_row_pos > 0) { $td = new dom_td(); $td->append_child($c); $this->__table_temp_row->append_child($td); $this->__table_row_pos--; break; } } }
function __construct() { dom_any::__construct('div'); $this->etype = 'locationbar'; $this->css_style['width'] = '97%'; $this->css_style['margins'] = 'auto'; $this->css_style['background'] = '#a0a5b0'; $this->css_style['border'] = '2px solid #504560'; $logout_div = new dom_div(); $logout_div->css_style['float'] = 'right'; //$logout_btn=new editor_button; //editor_generic::addeditor('logout',$logout_btn); $this->logout_btn = new dom_textbutton(); $logout_div->append_child($this->logout_btn); $this->append_child($logout_div); $this->logout_btn->attributes['value'] = 'logout'; if ($_SESSION['uid'] == 0) { $design_div = new dom_div(); $design_div->css_style['float'] = 'right'; $design_sw = new editor_checkbox(); editor_generic::addeditor('design', $design_sw); $design_div->append_child($design_sw); $this->append_child($design_div); $st = new dom_statictext(); $st->text = 'DM'; $design_div->append_child($st); } $this->pinbtn = $pinbtn = new dom_textbutton(); $pinbtn->attributes['value'] = '⇕'; $pinbtn->css_style['float'] = 'left'; $this->append_child($pinbtn); $pk = new path_view_control(); editor_generic::addeditor('pk', $pk); $this->append_child($pk); }
function suggestoption($val) { $o = new dom_div(); $a = new dom_any('div'); $o->append_child($a); $t = new dom_statictext(); $a->append_child($t); $t->text = "\"{$val}\""; //$a->attributes['href']='#'; $a->css_style['cursor'] = 'hand'; $a->val = $val; $this->opts[] = $a; $this->append_child($o); }
function __construct() { parent::__construct('button'); $this->txt = new dom_statictext(); $this->append_child($this->txt); $this->hdiv = new dom_div(); $this->append_child($this->hdiv); $this->css_class = get_class($this); for ($k = 0; $k < 5; $k++) { $d = new dom_div(); $b = new dom_any_noterm('input'); $d->append_child($b); $b->attributes['value'] = 'bt' . $k; $b->attributes['type'] = 'button'; $this->hdiv->append_child($d); } $this->txt->text = 'test'; }
function link_nodes() { global $top_fixed_div; $this->bdiv = new dom_div(); $tt = new container_autotable(); if (isset($top_fixed_div)) { $d = new dom_div(); $d->append_child($tt); $top_fixed_div->append_child($d); $top_fixed_div->append_child($this->bdiv); $this->bdiv->css_style['position'] = 'fixed'; $this->bdiv->css_style['background-color'] = 'white'; $this->bdiv->css_style['border'] = '1px solid #bbbbbb'; } else { $this->append_child($this->bdiv); $this->bdiv->css_style['position'] = 'fixed'; $this->bdiv->css_style['top'] = '5px'; $this->bdiv->css_style['left'] = '50%'; $this->bdiv->css_style['background-color'] = 'white'; $this->bdiv->css_style['border'] = '1px solid #bbbbbb'; $this->bdiv->append_child($tt); } $ctls = array('ed_filters' => 'Фильтры', 'ed_filters_tags' => '"Теги"', 'ed_order' => 'Сортировка'); foreach ($ctls as $ctl => $hn) { $this->bdiv->append_child($this->editors[$ctl]); $this->editors[$ctl]->css_style['display'] = 'none'; $this->editors[$ctl]->onbtn = new dom_div(); $this->editors[$ctl]->onbtn->append_child(new dom_statictext($hn . ":")); $this->editors[$ctl]->onbtn->append_child($this->editors[$ctl . '_count']); $this->editors[$ctl]->onbtn->css_style['cursor'] = 'pointer'; $this->editors[$ctl]->onbtn->css_style['padding-left'] = '2px'; $this->editors[$ctl]->onbtn->css_style['padding-right'] = '2px'; $tt->append_child($this->editors[$ctl]->onbtn); } $tt->append_child($this->editors['ed_pager']); $this->link_nodes_ctls = $ctls; $this->sdiv = new dom_div(); $this->append_child($this->sdiv); $this->sdiv->css_style['height'] = 'auto'; $this->sdiv->css_style['overflow'] = 'hidden'; $this->sdiv->append_child($this->editors['ed_row_num']); $this->append_child($this->editors['ed_list']); if (isset($this->editors['ed_new'])) { $this->append_child($this->editors['ed_new']); } $this->append_child($this->editors['ed_download']); }
function __construct() { parent::__construct(); $this->css_class = 'container_hidden'; $this->title_div = new dom_div(); dom_div::append_child($this->title_div); $this->hidden_div = new dom_div(); dom_div::append_child($this->hidden_div); $this->hidden_div->css_style['display'] = 'none'; $this->hideshow_button = new dom_any_noterm('input'); $this->hideshow_button->attributes['type'] = 'image'; $this->hideshow_button->attributes['src'] = container_hidden::PLUS_PNG; $this->hideshow_button->attributes['alt'] = '+'; $this->hideshow_button->css_class = 'container_hidden'; $this->title_div->append_child($this->hideshow_button); $this->hideshow_button->css_style['float'] = 'left'; $this->title_text = new dom_statictext(); $this->title_div->append_child($this->title_text); }
function __construct() { global $sql; parent::__construct(); $this->etype = get_class($this); $this->css_class = 'date_selector_dd'; #year selector $this->ys_cont = new container_autotable(); $this->append_child($this->ys_cont); editor_generic::addeditor('pys', new editor_divbutton()); $this->editors['pys']->attributes['value'] = '<'; $this->editors['pys']->css_class = 'divbutton'; $this->ys_cont->append_child($this->editors['pys']); $this->cy = new dom_statictext(); $md = new dom_div(); unset($md->id); $md->css_class = 'date_selector_exte'; $md->append_child($this->cy); $this->ys_cont->append_child($md); editor_generic::addeditor('cy', new editor_hidden()); $md->append_child($this->editors['cy']); editor_generic::addeditor('nys', new editor_divbutton()); $this->editors['nys']->attributes['value'] = '>'; $this->editors['nys']->css_class = 'divbutton'; $this->ys_cont->append_child($this->editors['nys']); #month selector $this->ms_cont = new container_autotable(); $this->append_child($this->ms_cont); editor_generic::addeditor('pms', new editor_divbutton()); $this->editors['pms']->attributes['value'] = '<'; $this->editors['pms']->css_class = 'divbutton'; $this->ms_cont->append_child($this->editors['pms']); $md = new dom_div(); unset($md->id); $md->css_class = 'date_selector_exte'; $this->cm = new dom_statictext(); $md->append_child($this->cm); $this->ms_cont->append_child($md); editor_generic::addeditor('cm', new editor_hidden()); $md->append_child($this->editors['cm']); editor_generic::addeditor('nms', new editor_divbutton()); $this->editors['nms']->attributes['value'] = '>'; $this->editors['nms']->css_class = 'divbutton'; $this->ms_cont->append_child($this->editors['nms']); $this->month = new dom_table(); $this->month->css_class = 'month'; $this->tr = new dom_tr(); $this->td = new dom_td(); unset($this->td->id); unset($this->tr->id); //editor_generic::addeditor('d',new editor_statictext_af); $this->d = new dom_div(); unset($this->d->id); $this->d_text = new dom_statictext(); $this->d->append_child($this->d_text); $this->append_child($this->month); $this->month->append_child($this->tr); $this->tr->append_child($this->td); $this->td->append_child($this->d); #$this->month->css_style['float']='left'; /*$this->month->css_style['border']='1px solid gray'; $this->month->css_style['border-collapse']='collapse'; $this->month->css_style['margin']='5px'; $this->td->css_style['border']='1px solid gray';*/ }
function auth_gen_form() { global $sql; $page = new dom_root(); $page->title = 'Вход в систему'; $auth_div = new dom_auth_request(); //$page->append_child($auth_div); $cont = new dom_table(); $tr = new dom_tr(); $td = new dom_td(); $d = new dom_div(); $d->css_style['top'] = '1px'; $d->css_style['bottom'] = '1px'; $d->css_style['left'] = '1px'; $d->css_style['right'] = '1px'; $d->css_style['position'] = 'fixed'; $d->css_style['display'] = 'block'; $cont->css_style['height'] = '100%'; $cont->css_style['width'] = '100%'; $td->css_style['height'] = '100%'; $cont->append_child($tr); $tr->append_child($td); $td->append_child($auth_div); $d->append_child($cont); $page->append_child($d); //$txt=new dom_statictext; //$txt->text=md5('test'); //$page->append_child($txt); $page->scripts['core.js'] = '/js/core.js'; $page->scripts['commoncontrols.js'] = '/js/commoncontrols.js'; $page->endscripts[] = "var ct=\$i('" . $auth_div->username->id_gen() . "');ct.focus();ct.selectionStart=0;ct.selectionEnd=ct.value.length;"; $settings_tool = new settings_tool(); $page->for_each_set('oid', -1); $page->collect_oids($settings_tool); $page->settings_array = $settings_tool->read_oids($sql); $page->after_build(); print $page->html(); //print_r($_SERVER); exit; }