config = new ConfigClass(); $this->lang = new LangClass($_GET['lang']); $this->db = new DatabaseClass(); $this->menu = new MenuClass($this->config->ROOTDIR); $this->dbconf = new DataConfigClass; $this->template = new TemplateClass; $this->footerlink = new FooterLinkClass; $this->support = new SupportClass; $this->security = new SecurityClass; $this->counter = new CounterClass(); $this->security->cleanAllRequest(); } function init(){ $this->config->setTheme($this->dbconf->getConf("theme")); $idflag = "Chose Language: "; $engflag = "Pilih Bahasa: "; $this->flaglink = ($_SESSION['lang'] == 'en')?$idflag:$engflag; switch($_GET['mode']){ case 'feed': $this->getRss(); break; case 'detail': $this->getDetail(); break; case 'polling': $this->getPolling(); break; case 'agenda': $this->getAgenda(); break; case 'berita': $this->getBerita(); break; case 'video': $this->getVideo(); break; case 'struktur': $this->getStruktur(); break; case 'lang': //die('tes'); echo ""; break; case 'admin': $this->getAdmin(); break; default : $this->getIndex(); break; } } function getIndex(){ $this->dated = new DateClass; $welcome = new WelcomeClass; $agenda = new AgendaClass; $artikel = new ArtikelClass; $define = array ('headscript' => $headscript, 'content' => $content, 'now' => $this->dated->hariini(), 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'rootdir' => $this->config->ROOTDIR, 'weltitle' => $welcome->GetTitle(), 'clicklang' => $this->flaglink, 'catleft' => $welcome->GetCatleft(), 'catright' => $welcome->GetCatright(), 'newslist' => $artikel->GetNewslist(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'listagenda' => $agenda->getMarquee(), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'potensiList' => $this->menu->menuPotensi(), 'statistik' => $this->counter->display(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/theme.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getDetail(){ $this->detail = new DetailClass; $define = array ( 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'rootdir' => $this->config->ROOTDIR, 'clicklang' => $this->flaglink, 'detail' => $this->detail->getDetail($_GET['content'],$_GET['id']), 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'potensiList' => $this->menu->menuPotensi(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/detail.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getAgenda(){ $agenda = new AgendaClass; $define = array ( 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'rootdir' => $this->config->ROOTDIR, 'clicklang' => $this->flaglink, 'detail' => $agenda->GetResultBidang(), 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'potensiList' => $this->menu->menuPotensi(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/detail.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getPolling(){ $polling = new PollingClass; $define = array ( 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'rootdir' => $this->config->ROOTDIR, 'detail' => $polling->content, 'clicklang' => $this->flaglink, 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'potensiList' => $this->menu->menuPotensi(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/detail.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getBerita(){ $artikel = new ArtikelClass; $define = array ( 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'rootdir' => $this->config->ROOTDIR, 'detail' => $artikel->GetDisplay(), 'clicklang' => $this->flaglink, 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'potensiList' => $this->menu->menuPotensi(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/detail.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getStruktur(){ $struktur = new StrukturClass; $define = array ( 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'rootdir' => $this->config->ROOTDIR, 'detail' => $struktur->GetListStruktur(), 'clicklang' => $this->flaglink, 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'potensiList' => $this->menu->menuPotensi(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/detail.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getVideo(){ $video = new VideoClass; $define = array ( 'menu' => $this->menu->menuAtas(), 'lang' => $this->lang->strlink, 'rootdir' => $this->config->ROOTDIR, 'detail' => $video->listVideo(), 'clicklang' => $this->flaglink, 'sitetitle' => $this->dbconf->getConf('sitetitle'), 'siteDesc' => $this->dbconf->getConf('siteDesc'), 'siteKey' => $this->dbconf->getConf('siteKey'), 'catlist' => $this->menu->menuSamping(), 'bannerlink' => $this->footerlink->GetBannerLinkKanan(), 'potensiList' => $this->menu->menuPotensi(), 'caddr' => $this->dbconf->getConf('contactAddr'), 'ctelp' => $this->dbconf->getConf('contactTelp'), 'cfax' => $this->dbconf->getConf('contactFax'), 'cemail' => $this->dbconf->getConf('contactEmail'), 'support' => $this->support->getSupportList(), 'themepath' => $this->config->THMDIR ); $this->template->init($this->config->THEME.'/detail.html'); $this->template->defineTag($define); $this->template->printTpl(); } function getDownload(){ if($_GET['id']){ $this->download = new DownloadClass; switch($_GET['item']){ case "page": $page = new PageClass; $data = $page->GetPage($_GET['id'],true); break; } } echo ""; } function getAdmin(){ $this->admin = new AdminClass(); } function getRss(){ new RSSClass(); } } $gicms = new cms(); $gicms->init(); ?>