function html_inner()
 {
     //$v=file_get_contents('../greport3.xml');
     //		$v=file_get_contents('../xml/xls.xml');
     //		$handle = fopen("../xml/LT.fods", "r");
     //		$handle = fopen("../xml/greport3.xml", "r");
     //		$handle = fopen("../xml/xls.xml", "r");
     $handle = fopen("../xml/ДОХОД_2НДФЛ_6025_6025026876602501001_20090226_CBED40B3-78D3-4B2A-BD21-AEC68E1837DF.xml", "r");
     //print "<pre>".htmlspecialchars($v)."</pre>";
     if ($handle) {
         while (!feof($handle)) {
             //$v=fread($handle,1);
             //if(ord($v)<ord(' '))$v=' ';
             //read 16K
             $v = fread($handle, 16384);
             //replace invalid chars with whitespace
             $v = preg_replace('/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/', ' ', $v);
             if (feof($handle)) {
                 $this->xml->feed($v, true);
             } else {
                 $this->xml->feed($v, false);
             }
         }
     }
     fclose($handle);
     $this->xml->result->dump_o($this, 'dd');
     file_put_contents("../xml/greport3-out.xml", $this->t);
     $this->xml->result->print_html();
     parent::html_inner();
 }
Exemple #2
0
 function html_inner()
 {
     global $sql;
     if (isset($this->query)) {
         $q = $this->query->result();
     } elseif (isset($this->compiled)) {
         $q = $this->compiled;
     }
     $res = $sql->query($q);
     if ($res) {
         $this->txt->text = $sql->fetch1($res);
     } else {
         $this->txt->text = 'error';
     }
     parent::html_inner();
 }
Exemple #3
0
 function html_inner()
 {
     unset($this->custom_id);
     $curr = $this->curr;
     $path = $this->path;
     $long_name = $this->long_name;
     $htmlid = $this->context[$long_name]['htmlid'];
     $limit_add_sub = "var ed=\$i('" . $this->editors['limit_skip']->ed->id_gen() . "');" . "var add=\$i('" . $this->editors['limit_count']->ed->id_gen() . "');" . "var a=ed.value*1;" . "var b=add.value*1;" . "ed.focus();";
     $this->editors['limit_skip']->add_btn->attributes['onclick'] = $limit_add_sub . "ed.value=a+b;";
     $this->editors['limit_skip']->sub_btn->attributes['onclick'] = $limit_add_sub . "var c=a-b;if(c<0)ed.value=0; else ed.value=c;";
     $this->editors['tabs']->tabs['result']->selector->attributes['onclick'] = $this->editors['result_button']->attributes['onclick'];
     parent::html_inner();
 }
Exemple #4
0
 function html_inner()
 {
     global $sql;
     reset($sql->querylog);
     foreach ($sql->querylog as $q) {
         $this->t1->text = $q->q;
         $this->t2->text = $q->e;
         $this->id_alloc();
         dom_any::html_inner();
     }
 }
Exemple #5
0
 function html_inner()
 {
     global $sql;
     unset($db);
     if ($this->args['ed_db'] != '') {
         $db = $this->args['ed_db'];
     }
     $qg = new query_gen_ext('SELECT');
     $qg->from->exprs[] = new sql_column($db, $this->args['ed_table'], NULL, 't');
     $qg->what->exprs[] = new sql_list('count', array(new sql_immed(1)));
     $q = $qg->result();
     if (isset($q)) {
         $res = $sql->query($q);
         if ($res) {
             $this->txt->text = $sql->fetch1($res);
         } else {
             $this->txt->text = $sql->err();
         }
     } else {
         $this->txt->text = "error";
     }
     parent::html_inner();
 }
Exemple #6
0
 function html_inner()
 {
     $this->button->bootstrap();
     dom_any::html_inner();
 }
Exemple #7
0
 function html_inner()
 {
     global $sql;
     if (!is_array($this->rootnode->externals)) {
         $this->rootnode->externals = array();
     }
     if (get_class($this->qu) != 'query_gen_ext') {
         return;
     }
     $this->qu->externals =& $this->rootnode->externals;
     $q = $this->qu->result();
     $res = $sql->query($q);
     while ($row = $sql->fetcha($res)) {
         //$this->rootnode->externals=array_merge($this->rootnode->externals,$row);
         foreach ($row as $k => $v) {
             $this->rootnode->externals[$k] = $v;
         }
         dom_any::html_inner();
     }
     $sql->free($res);
 }