function id($args)
 {
     list($id, $name) = $args;
     $cm = new CalendarModel();
     $ct = new CalendarTypeModel();
     $arrct = $ct->getAll();
     foreach ($arrct as $ct) {
         $arrc[$ct->cal_type_id] = $ct;
     }
     $cm->getByID(tin($id));
     $arr['entry'] = $cm;
     $arr['type'] = $arrc;
     $layout_id = "Calendar_id";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //        Mold::theme("Pages/Calendar_id",$arr);
 }
Exemplo n.º 2
0
 function id($args)
 {
     list($id, $name) = $args;
     $id = tin($id);
     $gal = new Gallery();
     $gal->getByID($id);
     //        pr($gal);
     $gs = new Galleryphoto();
     $arrPic = $gs->getWhere("gallery_id = '{$id}' ORDER BY photo_zindex DESC");
     $arr['gal'] = $gal;
     $arr['id'] = $id;
     $arr['arrPic'] = $arrPic;
     $layout_id = "Gallery_id";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //        Mold::theme("Pages/Gallery_id",$arr);
 }
Exemplo n.º 3
0
 function simpan()
 {
     //        pr($_POST);
     $succ = 0;
     $id = tin($_POST['id']);
     $val = tin($_POST['val']);
     $l = new Layout();
     $l->getByID($id);
     if ($l->layout_file != "") {
         $l->layout_file = $val;
         $l->load = 1;
         $succ = $l->save();
     } else {
         $l1 = new Layout();
         $l1->layout_id = $id;
         $l1->layout_file = $val;
         $succ = $l1->save();
     }
     if ($succ) {
         echo Lang::t("Success");
     } else {
         echo Lang::t("Failed");
     }
 }
 function viewme($id, $classname, $classID)
 {
     $cm = new CalendarModel();
     $ct = new CalendarTypeModel();
     $arrct = $ct->getAll();
     foreach ($arrct as $ct) {
         $arrc[$ct->cal_type_id] = $ct;
     }
     $cm->getByID(tin($id));
     $arr['entry'] = $cm;
     $arr['type'] = $arrc;
     //        Mold::both("Calendar_id",$arr);
     pr($cm);
 }
Exemplo n.º 5
0
 function category($args)
 {
     list($id) = $args;
     $id = urldecode($id);
     $page = isset($_GET['page']) ? tin($_GET['page']) : 1;
     $limit = 10;
     $begin = ($page - 1) * $limit;
     //echo "<br><br><br><br>ID ".$id;
     $bm = new BlogModel();
     $arrB = $bm->getWhere("topic_category LIKE '%{$id}%' AND topic_status = 'publish' ORDER BY topic_date DESC LIMIT {$begin},{$limit}");
     $jml = $bm->getJumlah("topic_category LIKE '%{$id}%' AND topic_status = 'publish'");
     $bc = new BlogCategory();
     $bc->getByID($id);
     //categort
     $this->isiMetaCategory($bc);
     $dis = $bc->getWhere("cat_active=1");
     $jmlpage = ceil($jml / $limit);
     //        pr($arrB);
     //        pr($dis);
     $arr['posts'] = $arrB;
     $arr['cat'] = $dis;
     $arr['page'] = $page;
     $arr['begin'] = $begin;
     $arr['limit'] = $limit;
     $arr['jmlpage'] = $jmlpage;
     $arr['jml'] = $jml;
     $arr['bc'] = $bc;
     $directory = get_called_class() . "_" . __FUNCTION__;
     //        echo "<br><br><br>";
     //        echo $directory;
     //        Mold::theme("Pages/".$directory.)
     $layout_id = "Blog_category";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //        Mold::theme("Pages/Blog_index",$arr);
 }
Exemplo n.º 6
0
 function viewme($id, $classname, $classID)
 {
     //        echo "List : ".$id." ".$classname." ".$classID;
     $id = tin($id);
     $list = new Lists();
     $list->getByID($id);
     $li = new ListItem();
     $arrLi = $li->getWhere("list_parent_id = '{$id}' ORDER BY list_urutan DESC");
     $arr['list'] = $list;
     $arr['arrLi'] = $arrLi;
     $layout_id = $list->list_layout;
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //pr($list);
 }