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);
     //
     //        }
 }
 public function overwriteForm($return, $returnfull)
 {
     $return = parent::overwriteForm($return, $returnfull);
     $return['post_author'] = new Leap\View\InputText("hidden", "post_author", "post_author", Account::getMyID());
     if ($_GET['load']) {
         $return['post_date'] = new Leap\View\InputText("hidden", "post_date", "post_date", $this->post_date);
     } else {
         $return['post_date'] = new Leap\View\InputText("hidden", "post_date", "post_date", leap_mysqldate());
     }
     $return['post_content'] = new Leap\View\InputTextRTE("post_content", "post_content", $this->post_content);
     $return['post_status'] = new Leap\View\InputSelect(array("draft" => "Draft", "publish" => "Publish"), "post_status", "post_status", $this->post_status);
     $return['post_modified'] = new Leap\View\InputText("hidden", "post_modified", "post_modified", leap_mysqldate());
     $return['post_image'] = new \Leap\View\InputFoto("post_image", "post_image", $this->post_image);
     $return['post_fb_og_image'] = new \Leap\View\InputFoto("post_fb_og_image", "post_fb_og_image", $this->post_fb_og_image);
     //post link
     $arrSP = Registor::getFeatureStartPage();
     $arrHasil = array();
     $arrHasil[] = "none";
     foreach ($arrSP as $spid => $arrobj) {
         $arrHasil[$spid] = $spid;
     }
     $return['post_link'] = new Leap\View\InputSelect($arrHasil, "post_link", "post_link", $this->post_link);
     $return['spdivider']['post_image'] = "Content";
     $return['spdivider']['post_webtitle'] = "SEO";
     $return['spdivider']['post_fb_og_title'] = "FB OpenGraph";
     $return['spdivider']['post_attachments'] = "Attachments";
     $return['post_attachments'] = new Leap\View\InputPageAttachment("post_attachments", "post_attachments", $this->post_attachments);
     if ($this->post_attachment_order == "") {
         $this->post_attachment_order = Efiwebsetting::getData('PageAttachment');
     }
     $return['post_attachment_order'] = new Leap\View\InputOrdering("post_attachment_order", "post_attachment_order", $this->post_attachment_order);
     return $return;
 }