Ejemplo n.º 1
0
 function get($ID)
 {
     $timer = new timer();
     $where = "ID = '{$ID}'";
     $sql = "\n\t\t\tSELECT * FROM dir_items WHERE {$where}\n\t\t";
     $result = $this->f3->get("DB")->exec($sql);
     if (count($result)) {
         $return = $result[0];
         $return['photos'] = $this->getPhotos($return['ID']);
     } else {
         $return = parent::dbStructure("dir_items", array("photos" => array()));
     }
     //test_array($return);
     $timer->_stop(__NAMESPACE__, __CLASS__, __FUNCTION__, func_get_args());
     return self::format($return);
 }
Ejemplo n.º 2
0
 function get($ID)
 {
     $timer = new timer();
     $where = "ID = '{$ID}'";
     $sql = "\n\t\t\tSELECT * FROM dir_categories WHERE {$where}\n\t\t";
     $result = $this->f3->get("DB")->exec($sql);
     if (count($result)) {
         $return = $result[0];
         $return['children'] = self::format($this->getAll("parentID='{$return['ID']}'", "category ASC"));
     } else {
         $return = parent::dbStructure("dir_categories");
     }
     //test_array($return);
     $timer->_stop(__NAMESPACE__, __CLASS__, __FUNCTION__, func_get_args());
     return self::format($return);
 }
Ejemplo n.º 3
0
 function get($ID)
 {
     $timer = new timer();
     $where = "ID = '{$ID}'";
     if (!is_numeric($ID)) {
         $where = "email = '{$ID}'";
     }
     $result = $this->f3->get("DB")->exec("\n\t\t\tSELECT *\n\t\t\tFROM dir_users\n\t\t\tWHERE {$where};\n\t\t");
     if (count($result)) {
         $return = $result[0];
     } else {
         $return = parent::dbStructure("dir_users");
     }
     //test_array($return);
     $timer->_stop(__NAMESPACE__, __CLASS__, __FUNCTION__, func_get_args());
     return self::format($return);
 }