function set_target_frame($target, $opt = true)
 {
     if ($opt === true) {
         $this->target_frame = cEle('iframe', array('name' => $target));
     }
     $this->form->attr('target', $target);
     return $this;
 }
 function c_cols($d)
 {
     $h = array();
     if (!isDrw($d)) {
         $d = (array) $d;
     }
     foreach ($d as $v) {
         $h[] = cEle('td', isNumStr($v) ? array('html' => $v) : (isDrw($v) ? $v : null));
     }
     return $h;
 }
 function parse()
 {
     $this->O = cEle('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', 'xml:lang' => 'en', 'lang' => 'en'))->O;
     $this->body = cEle('body');
     $this->head = cEle('head');
     $doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML TRANSITIONAL 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     $title = self::create('title', $this->title);
     foreach ($this->css as $v) {
         $this->head->addChild($v);
     }
     foreach ($this->scripts as $v) {
         $this->head->addChild($v);
     }
     foreach ($this->metas as $v) {
         $this->head->addChild($v);
     }
     $this->head->addChild($title);
     $this->addChild($this->head, $this->body);
     $this->dom->appendChild($this->O);
     echo $this->dom->saveHTML();
 }
 function c_cell($d = null)
 {
     $o = array();
     $a = optimize_args(func_get_args());
     if (count($a) && ($c = isset($a[0]) ? $a[0] : false)) {
         if (isNum($c)) {
             unset($a[0]);
             for ($i = 0; $i < $c; $i++) {
                 $o[] = $this->c_cell($a);
             }
         } else {
             foreach ($a as $v) {
                 if (isDrw($v)) {
                     $o[] = $this->c_cell($v);
                 }
             }
         }
         return count($o) == 1 ? $o[0] : $o;
     } else {
         return cEle($this->child_type)->do_method(array('class' => 'frame_cell'), $a)->O;
     }
 }
 static function img($src)
 {
     return cEle('img', array('src' => $src))->do_method(func_get_args());
 }
function img($src, $attr = null)
{
    $c = _drw(array('src' => $src))->push($attr);
    return cEle('img', $c->O);
}
Пример #7
0
 function cItems($n)
 {
     $m = cEle('div');
     $h = array();
     $a = args_level_1(func_get_args());
     foreach ($a as $v) {
         if (!isDrw($v)) {
             $m->addChild(isStr($v) ? cEle('label', $v) : $v);
         } else {
             $h[] = $this->cItems($v);
         }
     }
     return count($h) ? $h : $m;
 }