0) { $pageid = str_replace("pg-","",$arr[sizeof($arr)-1]); $uniqueid = $arr[sizeof($arr)-2]; } else { $uniqueid = $arr[sizeof($arr)-1]; } //get the module attached with this link $strsql = "SELECT ma_module . * , ma_web_menu_items . * FROM `ma_web_menu_items` LEFT OUTER JOIN ma_module ON ma_web_menu_items.module_code_id = ma_module.module_code_int WHERE ma_web_menu_items.items_unique_id = '" . $uniqueid . "'"; $arr = db_get_all($strsql); $clientarea = "user.index"; if (sizeof($arr)>0) { if ($arr[0]["tag"] == "article") { $clientarea = "user.article"; //get the data for the same $articleid = $arr[0]["article_code_int"]; $arrcontent = $oarticle->getListById($articleid); $id=$arrcontent[0]["mod_article_code_int"]; $catlist=$oarticle->getArticleList($id); $cnt=sizeof($catlist); $smarty->assign('cnt', $cnt); $smarty->assign('catlist', $catlist); $article_title = $arrcontent[0]["article_name_vc"]; $article_short_content = $arrcontent[0]["article_short_desc"]; $article_content = $arrcontent[0]["article_desc"]; $article_img = $arrcontent[0]["thumb_image"]; $smarty->assign('displaytitle',$article_title); $smarty->assign('displaycontent', $article_content); $smarty->assign('displayimg', $article_img); } else if ($arr[0]["tag"] == "contactus") { $clientarea = "user.contactus"; } else if ($arr[0]["tag"] == "services") { $clientarea = "user.blog.list"; } else if ($arr[0]["tag"] == "legal-disclaimer") { $clientarea = "user.legaldisclaimer"; } else if ($arr[0]["tag"] == "downloads") { $clientarea = "user.downloads"; $odownload = new CDownload(); $arrdown = $odownload->getList(); $smarty->assign('odownload',$arrdown); } } if($uniqueid=="") { $uniqueid="/index"; } if ($uniqueid=="blog") { $clientarea = "user.articleblog"; } if($uniqueid=="career") { $clientarea = "user.career"; } if($uniqueid=="products") { $clientarea = "user.products"; } if ($uniqueid == "search") { $ojob=new CJobpost(); //write the code to get the search result and load the data $arrsearch = $ojob->getJobListByKeyword($_POST['search_value'],$_POST['search_from'],$_POST['search_to']); $clientarea = "user.job.search"; $smarty->assign('titlesearch',sizeof($arrsearch) . ' jobs found"' . $_POST['search_value'] . '"'); $smarty->assign('arrsearch',$arrsearch); } if($uniqueid=="industries-we-deal") { $arrindustry=$oindust->getallByOrder(); $smarty->assign('arrindustry',$arrindustry); $clientarea = "user.industry"; } if($uniqueid=="testimonial") { require('testimonials.inc'); $clientarea = "user.testimonial"; $otesty = new CTestimonials(); $arrtestimonial = $otesty->getalllist(); $smarty->assign('alltestimonial',$arrtestimonial); } if($uniqueid=="post-resume") $clientarea = "user.inquiry"; if($uniqueid=="thanks") $clientarea = "user.thanks"; if($uniqueid=="clientele") { $arrgallery=$oevent->getgallery(); $smarty->assign('arrgallery',$arrgallery); $clientarea = "user.client"; } if($uniqueid=="photo-gallery-event") { $clientarea = "user.gallery"; } //check the id for product category $arrprod = $oprodcat->getProductCatByUniqueID($uniqueid); if (sizeof($arrprod)>=1) { $clientarea = "user.cat"; //get the data of the products for the category $arrproducts = $oproduct->getProductListByCategory($arrprod[0]['cat_id']); $smarty->assign('categoryname',$arrprod[0]['cat_name']); $smarty->assign('catdesc',$arrprod[0]['cat_desc']); $smarty->assign('arrproduct',$arrproducts); } //check the id for product if ($clientarea == "user.index") { $arrprod = $oproduct->getProductListByUniqueID($uniqueid); if (sizeof($arrprod)>=1) { $clientarea = "user.product.detail"; $smarty->assign('proddata',$arrprod); } } //check id for a direct page if ($clientarea == "user.index") { $arrpage = $oarticle->getListByUniqueId($uniqueid); if (sizeof($arrpage)>=1){ $clientarea = "user.article"; $article_title = $arrpage[0]["article_name_vc"]; $article_content = $arrpage[0]["article_desc"]; $article_img = $arrpage[0]["thumb_image"]; $smarty->assign('displaytitle',$article_title); $smarty->assign('displaycontent', $article_content); $smarty->assign('displayimg', $article_img); } } $pos=strpos($uniqueid,"-"); $len=strlen($uniqueid); $photoid=substr($uniqueid,$pos+1,$len); $str=substr($uniqueid,0,$pos+1); if($str=="gallery-") { $arrgdetail=$ophotosingle->getphotobyphotoID($photoid); $smarty->assign('arrgdetail', $arrgdetail); $arrtitle=$osinglephoto->getListById($photoid); $smarty->assign('gdisplayname', $arrtitle[0]['photos_name_vc']); $clientarea = "user.gallery-detail"; } if ($clientarea == "user.index") { $uniqueid = "index"; $arrwelcome = $oarticle->getListByUniqueId("welcome-content"); $article_title = $arrwelcome[0]["article_name_vc"]; $article_content = $arrwelcome[0]["article_desc"]; $smarty->assign('displaytitle',$article_title); $smarty->assign('displaycontent', $article_content); $arrprodhome = $oproduct->getProductListHome(3); $smarty->assign('prodhome',$arrprodhome); } if ($clientarea == "user.index") { $ocontact2 = new CContactus(); //$arrcontact2 = $ocontact2->getList(); $smarty->assign('allcontact2',$arrcontact2); } if ($clientarea == "user.index") { require('testimonials.inc'); $clientarea1 = "user.testimonial"; $otesty1 = new CTestimonials(); $arrtestimonial1 = $otesty1->getalllist(3); $smarty->assign('alltestimonial1',$arrtestimonial1); } //for rightside menus $arrcat = $oprodcat->getProductCatByParent(0); function getProductsByCategory($param1, &$smarty) { // Some code goes here //$recval = 0; global $oproduct; foreach($param1 as $rec){ $recval = $rec; } //get the data from category information $ores = $oproduct->getProductListByCategory($recval); $smarty->assign('recmst1cnt',count($ores)); $smarty->assign('recmst1',$ores); } $smarty->register_function('getProdByCategory', 'getProductsByCategory'); $smarty->assign('prodmenu',$arrcat); $smarty->assign('uniqueid',$uniqueid); $smarty->assign('appinitialpath',CNF_APP_INITIAL_PATH); $smarty->assign('sourcepath',CNF_APP_RESOURCE_PATH."system/upload/"); $smarty->assign('clientarea',$clientarea); $smarty->display('user.mainframe.uiframe.tpl'); ?>