Exemplo n.º 1
0
 public function games()
 {
     $g = new Games($this->getId());
     return $g->read();
 }
Exemplo n.º 2
0
     template($tpl_file);
     exit;
 }
 if ($do == "search") {
     if (!empty($_GET['q'])) {
         $search_title = $_GET['q'];
         $conditions = "title like '%" . $search_title . "%'";
     }
 }
 if ($do == "del" && !empty($id)) {
     $deleted = false;
     $deleted = $game->del($id);
 }
 if ($do == "edit") {
     if (!empty($id)) {
         $item = $game->read("*", $id);
         if (!empty($item['publish_time'])) {
             $item['publish_date'] = @date("Y-m-d", $item['publish_time']);
         }
         if (!empty($item['force_time'])) {
             $item['force_date'] = @date("Y-m-d", $item['force_time']);
         }
         if (!empty($item['attachment_id'])) {
             $item['attach'] = $attachment_model->getAttachLink($item['attachment_id']);
         }
         setvar("item", $item);
     }
     setvar("StandardTypes", $_PB_CACHE['standardtype']);
     $tpl_file = "game.edit";
     template($tpl_file, true);
 }