Ejemplo n.º 1
0
 function getSiteInfo()
 {
     $xml = new xml();
     $xml->dd()->appendChild($xml->importNode($this->de()));
     $ns = $xml->query('/site/mysql | /site/users');
     foreach ($ns as $n) {
         $n->parentNode->removeChild($n);
     }
     return $xml;
 }
Ejemplo n.º 2
0
 function rowToXML($outTagname, $condition, &$row)
 {
     $this->getRow($row_set, $condition);
     if ($row = mysql_fetch_assoc($row_set)) {
         $page = 1;
         if ($this->sort_control) {
             $query = 'active=1 and `sort`<=' . $row['sort'];
             if ($this->section_control) {
                 $query .= ' and `' . $this->section_field . '`="' . $this->getCurrentSection() . '"';
             }
             $page = ceil($this->getNumRows($query) / $this->getPageSize());
         } elseif ($this->pageParamName) {
             $page = intval(param($this->pageParamName)) ? intval(param($this->pageParamName)) : 1;
         }
         $out = new xml('new_doc');
         $rec = $out->dd()->appendChild($out->createElement($outTagname, array('page' => $page)));
         $this->addValuesToRecord($rec, $row, $out);
         return $out;
     }
     return null;
 }