"01", "feb"=>"02", "mar"=>"03", "apr"=>"04", "may"=>"05", "june"=>"06", "july"=>"07", "aug"=>"08", "sep"=>"09", "oct"=>"10", "nov"=>"11", "dec"=>"12" ); $monlong = array("01"=>"January", "02"=>"February", "03"=>"March", "04"=>"April", "05"=>"May", "06"=>"June", "07"=>"July", "08"=>"August", "09"=>"September", "10"=>"Octomber", "11"=>"November", "12"=>"December"); $y = array("2k3"=>"2003", "2k2"=>"2002","2k1"=>"2001","1999"=>"1999"); $obj=new myclass; $iAffiliateId = 5; $Affname = "www.ahmedabad.com"; $baseurl = ""; Global $smarty; $smarty = new Smarty_Class(false); $baseurl = ""; $fname = "infotech"; global $REQUEST_URI,$contfile; // Define our global variables if(!strstr($REQUEST_URI,$fname."?")){ $str = substr(strstr($REQUEST_URI,$fname),strlen($fname)); $contfile=$str; $array = explode("/",$str); // Explode the URI using '/'. $num = count($array); // How many items in the array? for ($k = 1 ; $k < $num ; $k=$k+2) { $temp = $array[$k]; $$temp = str_replace("%20"," ",$array[$k+1]); } } leftb(0,3); $leftbarguj=$leftbar; unset($leftbar); leftb($catId); $templatedir = "affiliate/aff".$iAffiliateId; $image_path="images/aff".$iAffiliateId."/"; $bottom = "$templatedir/bottom/bottom.tpl"; $global_arr = array("iAffiliateId" => $iAffiliateId, "Affname"=>$Affname, "image_path"=>$image_path, "bottom"=>$bottom); if(!isset($vSection)){ $t = explode(".",$fname); $vSection = $t[0]; if(!strstr($REQUEST_URI,$fname."?")){ $str = substr(strstr($REQUEST_URI,$fname),strlen($fname)); } $m = explode("/",$str); $vPath = addslashes(substr($str,1)); $query = "select * from Archive where vPath like '$vPath'"; $rs = $obj->select($query); if($rs){ $dDate =formatDateWord($rs[0]["dDate"]); $vSection = $rs[0]["vSection"]; $vTitle = $rs[0]["vTitle"]; } $filename=$obj->DATA_PATH. "archive/". $vSection . $str; if(file_exists($filename)) $detail=implode(" ",file($filename)); else{ $detail = file_get_contents("error.htm"); } $top="$templatedir/top/top.tpl"; $left="$templatedir/left/left.tpl"; $template_file = "$templatedir/middle/showarchive.tpl"; $indexfile="$templatedir/index.tpl"; $pagetitle = "Archive - $vSection - $vTitle"; $CategoryTitle = "Archive - $vSection"; $shortDesc = "Archive - $vSection - $vTitle"; $lang = "ENGLISH"; $lan = "eng"; $lang_link = "„wshkŒe ‚{k[kh"; $global_arr = array("iAffiliateId" => $iAffiliateId, "Affname"=>$Affname, "image_path"=>$image_path, "bottom"=>$bottom, "lang"=>$lang, "lang_link"=>$lang_link, "AffEmail"=>$AffEmail,"vTitle"=>$vTitle); if($vSection == "incity") $lsttitle = "Inside City"; else if($vSection == "news") $lsttitle = "News"; else if($vSection == "infotech") $lsttitle = "Infotech"; else if($vSection == "business") $lsttitle = "Business"; else if($vSection == "travel") $lsttitle = "Travel"; $path = "Archive > $lsttitle for " . $y[$m[1]] . " > " . $monlong[$mon[$m[2]]] . ""; $rootdirpath = ""; $localvars=array("top"=>$top, "left"=>$left, "template_file"=>$template_file , "vSection"=>$vSection, "detail"=>$detail, "dDate"=>$dDate, "lang"=>$lang, "lang_link"=>$lang_link, "pagetitle"=>$pagetitle, "CategoryTitle"=>$CategoryTitle, "shortDesc"=>$shortDesc, "path"=>$path, "baseurl"=>$baseurl, "lan"=>$lan, "rootdirpath"=>$rootdirpath ); $localvars = array_merge($global_arr, $localvars); while (list($key, $value) = each ($localvars)) { $smarty->assign($key,$value); } $smarty->assign("articlelist",$articlelist); } $smarty->assign("leftbarguj",$leftbarguj); $smarty->assi