function index()
 {
     $layout_id = "PageComment";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
 }
Exemplo n.º 2
0
 function footer()
 {
     $layout_id = "Menu_footer";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
 }
Exemplo n.º 3
0
 function loginpage()
 {
     $layout_id = "Loginpage";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //        Mold::theme("Register/register_with_fb_and_login");
 }
Exemplo n.º 4
0
 function map1()
 {
     $layout_id = "ContactUs";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //        Mold::theme("Pages/Contactus_map1");
 }
 public static function kerjakan($array)
 {
     global $template;
     ob_start();
     $layout_id = "Parallax";
     $file = Layout::getFile($layout_id);
     //       echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $array);
     //        Mold::theme("Pages/ParallaxView1", $array);
     $str = ob_get_contents();
     ob_end_clean();
     $template->full_text .= $str;
     //exit();
 }
Exemplo n.º 6
0
 function latest_deal()
 {
     $camp = new CampaignModel();
     $arr2 = $camp->getWhere("camp_active = 1 ORDER BY camp_pos_x ASC,camp_size DESC");
     //pr($arr);
     foreach ($arr2 as $cp) {
         $arrNachRow[$cp->camp_pos_x][] = $cp;
         $arrNachSize[$cp->camp_size][] = $cp;
     }
     $arr['arrNachRow'] = $arrNachRow;
     $arr['arrNachSize'] = $arrNachSize;
     $arr['camp'] = $camp;
     $layout_id = "eComm_latestdeal";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
 }
 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.º 8
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.º 9
0
    function loginpage()
    {
        ?>
<html>
<head>

</head>
<body>
<?php 
        echo Lang::t($_GET['msg']);
        $layout_id = "Loginpage";
        $file = Layout::getFile($layout_id);
        //        echo "Pages/".$layout_id."/".$file;
        Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
        ?>
</body>
</html>
        <?php 
        die;
    }
Exemplo n.º 10
0
 public function p($arg)
 {
     list($id, $judul) = $arg;
     $arrkirim = array();
     if ($id < 1 || $id == "") {
         die("NO ID");
     }
     $_SESSION['hist_prod'] = array("id" => $id, "judul" => $judul);
     $_SESSION['hist_url'] = _LANGPATH . "pwa/p/{$id}/" . urlencode($judul);
     $p = new ProdModel();
     $p->getByID($id);
     if ($p->prod_active < 1) {
         header("Location:" . _LANGPATH . "p404");
         exit;
     }
     global $template;
     $template->title = $p->prod_name;
     $src = self::getMainPic($p);
     if ($p->prod_diskon > 0) {
         $hrgbaru = ceil((100 - $p->prod_diskon) / 100 * $p->prod_price);
     } else {
         $hrgbaru = $p->prod_price;
     }
     $cp = new CampaignProdMatrix();
     $arr = $cp->getWhere("cm_prod_id = '{$id}'");
     $cp_id = $arr[0]->cm_camp_id;
     $cp = new CampaignModel();
     $cp->getByID($cp_id);
     $cw = new Cw();
     //		$cw->campaign_header($cp_id, $cp);
     //process image
     $exp = explode(",", $p->prod_pic);
     $sudah = array();
     $arrImg = array();
     if (count($exp) > 1) {
         $if = new InputFileModel();
         foreach ($exp as $num => $img) {
             if (!in_array($img, $sudah)) {
                 $sudah[] = $img;
                 $srcs = _SPPATH . $if->upload_url . "thumbnail/" . $img;
                 $srcs_big = _SPPATH . $if->upload_url . $img;
                 $cl = 'class="nonaktif"';
                 if ($src["thumbs"] == $srcs) {
                     $cl = 'class="aktif"';
                 }
                 //                    $id = base64_encode($srcs);
                 $arrImg[$num] = array($srcs, $srcs_big, $cl);
             }
         }
     }
     //process category
     $cat = new ProdCat();
     $cat->getByID($p->prod_cat_id);
     $arrParent = array();
     $arrpp = ProdCat::getAllParents($cat->cat_parent_id, $arrParent);
     //pr($arrpp);
     $arrpp2 = array_reverse($arrpp);
     foreach ($arrpp2 as $bc) {
         $str[] = $bc->cat_name;
     }
     $str[] = $cat->cat_name;
     //        $str2 = "<a href='" . _LANGPATH . "pwa/category/" . urlencode($cat->cat_name) . "'>".$cat->cat_name . "</a>";
     //bypass roy
     //$str2 = $cat->cat_name;
     $arrCat = $str;
     $arrkirim['p'] = $p;
     $arrkirim['id'] = $id;
     $arrkirim['cp'] = $cp;
     $arrkirim['arrImg'] = $arrImg;
     $arrkirim['arrCat'] = $arrCat;
     $arrkirim['hargaafterdiskon'] = $hrgbaru;
     $arrkirim['src'] = $src;
     $layout_id = "eComm_product";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arrkirim);
 }
Exemplo n.º 11
0
 function campaign($args)
 {
     list($id, $title, $page) = $args;
     $pc = new CampaignProdMatrix();
     //pagination
     if ($page < 1 || $page == "") {
         $page = 1;
     }
     $limit = 21;
     $begin = ($page - 1) * $limit;
     $link = _SPPATH . "cw/campaign/{$id}/" . urlencode($title) . "/|x|";
     $jml = $pc->getJumlah("cm_camp_id = '{$cp->camp_id}'");
     $_SESSION['hist_url'] = _LANGPATH . "cw/campaign/{$id}/" . urlencode($title) . "/|x|";
     //end pagination
     $cp = new CampaignModel();
     $cp->getByID($id);
     //        $this->campaign_header($id,$cp);
     //pr($cp);
     $arr2 = $pc->getWhereFromMultipleTable("cm_camp_id = '{$id}' AND cm_prod_id = prod_id AND prod_active = 1 ORDER BY cm_latest_added DESC LIMIT {$begin},{$limit}", array("ProdModel"));
     $arr['cp'] = $cp;
     $arr['page'] = $page;
     $arr['jml'] = $jml;
     $arr['prods'] = $arr2;
     $arr['limit'] = $limit;
     $arr['link'] = $link;
     $layout_id = "eComm_campaign";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
 }
Exemplo n.º 12
0
 function viewme($active, $classname, $classID)
 {
     $layout_id = "PageComment";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
     //        echo "comentar ".$active." ".$classname." ".$classID;
 }
Exemplo n.º 13
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);
 }
 function viewme($id, $classname, $classID)
 {
     $this->getByID($id);
     $gp = new Galleryphoto();
     $arrCar = $gp->getWhere("photo_filename !='' AND gallery_id = '{$this->gallery_id}'  ORDER BY photo_zindex DESC ");
     //pr($arrCar);
     $arr['id'] = $id;
     $arr['arrCar'] = $arrCar;
     //        Mold::theme("Pages/Carousel_attachment",$arr);
     $layout_id = "Carousel_attachment";
     $file = Layout::getFile($layout_id);
     //        echo "Pages/".$layout_id."/".$file;
     Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
 }
Exemplo n.º 15
0
 public function id($args)
 {
     //        pr($args);
     /*
      * begin the calculation
      */
     $url = addslashes($_GET['jurusan']);
     //        echo $url;
     global $activeLang;
     //        pr($activeLang);
     $langtext = "";
     if (count($activeLang) > 0) {
         $sl = Lang::getLang();
         $langtext = "AND post_lang = '{$sl}'";
     }
     //        echo $langtext;
     $pg = new Page();
     $arrPage = $pg->getWhere("post_url = '{$url}' AND post_status = 'publish' {$langtext}");
     $pg = $arrPage[0];
     //pr($arrPage);
     if ($pg->post_url == "") {
         $pg = new Page();
         $arrPage = $pg->getWhere("post_url = '{$url}' AND post_status = 'publish'");
         if (count($arrPage) > 0) {
             $pg = $arrPage[0];
             if ($pg->post_link == "" || $pg->post_link == '0') {
                 ?>
                 <div class="alert alert-warning language_disclaimer" role="alert">
                     <?php 
                 echo Efiwebsetting::getData('Language_Disclaimer');
                 ?>
                 </div>
             <?php 
             }
         } else {
             Redirect::p404();
         }
     }
     //            Redirect::p404();
     //die('die');
     //pr($pg);
     $page = $pg;
     // isi semua meta tag dan title
     $this->isiMeta($pg);
     $json = "";
     if ($pg->post_attachments != "") {
         $json = json_decode(stripslashes($pg->post_attachments));
     }
     //pr($json);
     if ($pg->post_attachment_order == "") {
         $pa = \Efiwebsetting::getData('PageAttachment');
     } else {
         $pa = $pg->post_attachment_order;
     }
     $exp = explode(",", $pa);
     $dimatikan_animasi_header = 1;
     foreach ($exp as $p) {
         if ($p == "Page") {
             if ($pg->post_link != "" && $pg->post_link != '0') {
                 $_SESSION['pageObj'] = $page;
                 //kalau ada link
                 $arrSp = Registor::getFeatureStartPage();
                 list($cname, $fname) = $arrSp[$pg->post_link];
                 $new = new $cname();
                 $new->{$fname}();
             } else {
                 $arr['page'] = $page;
                 $arr['dimatikan_animasi_header'] = $dimatikan_animasi_header;
                 $layout_id = "Page_id";
                 $file = Layout::getFile($layout_id);
                 Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
             }
         } else {
             if (array_key_exists($p, $json) && $json->{$p} > 0) {
                 $paralax = new $p();
                 $paralax->viewme($json->{$p}, "Page", $page->ID);
                 if (contains($p, array("Parallax", "Carousel"))) {
                     $dimatikan_animasi_header = 0;
                 }
             }
         }
     }
     //
     //        //cek Parallax plg atas
     //        if(array_key_exists("ParallaxModel",$json) && $json->ParallaxModel>0){
     //            $paralax = new ParallaxModel();
     //            $paralax->viewme($json->ParallaxModel);
     //            $dimatikan_animasi_header = 0;
     //        }
     //
     //        //cek carousel
     //        if(array_key_exists("GalleryCarousel__view",$json) && $json->GalleryCarousel__view>0){
     //            $cr = new GalleryCarousel();
     //            $cr->viewme($json->GalleryCarousel__view);
     //            $dimatikan_animasi_header = 0;
     //        }
     //
     //
     //
     //        if(array_key_exists("Gallery__view",$json)&&$json->Gallery__view>0){
     //
     //            $cr = new Gallery();
     //            $cr->viewme($json->Gallery__view);
     //
     //        }
     //        if(array_key_exists("CalendarWeb__view",$json)&&$json->CalendarWeb__view>0){
     //
     //            $cr = new CalendarModel();
     //            $cr->viewme($json->CalendarWeb__view);
     //
     //        }
     //        if(array_key_exists("CalendarWeb__viewtype",$json)&&$json->CalendarWeb__viewtype>0){
     //
     //            $cr = new CalendarTypeModel();
     //            $cr->viewme($json->CalendarWeb__viewtype);
     //
     //        }
     //        if(array_key_exists("PageComment__loadcomment",$json)&&$json->PageComment__loadcomment>0){
     //
     //            $cr = new PageComment();
     //            $cr->viewme($json->PageComment__loadcomment,$pg->ID);
     //
     //        }
 }
Exemplo n.º 16
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);
 }