index.php
<form name="dahioFrm" method="get" action="extremesearch.php" name=s>
<input name="www" id="www" value="true" type="hidden">
<font size=9 face="Tahoma">
<input name=search id="query" class="input" type="text" size="56" style="font-family: tahoma"></font>
<input value="جستجو" class="button" style="border: 1px solid rgb(58, 135, 211);" type="submit"><br><p>
</p>
</form>
extremesearch.php
<?php
include('globals.inc.php');
Header("Content-Type: text/html; charset=UTF-8");
$dir = $_REQUEST["dir"];
$noplus = str_replace("/", "::", $search);
$dir = ereg_replace("[^A-Za-z0-9::_]", "", $dir);
if($_GET) { foreach($_GET as $key=>$val) { $_GET[$key] = clean($val); } }
if($_POST) { foreach($_POST as $key=>$val) { $_POST[$key] = clean($val); } }
if($_REQUEST) { foreach($_REQUEST as $key=>$val) { $_REQUEST[$key] = clean($val); } }
$direct = $_REQUEST["direct"];
$direct = ereg_replace("[^A-Za-z0-9]", "", $direct);
$showthumbs = $_REQUEST["showthumbs"];
$showthumbs = ereg_replace("[^A-Za-z0-9]", "", $showthumbs);
$override = $_REQUEST["override"];
$override = ereg_replace("[^A-Za-z0-9]", "", $override);
$categories = $_REQUEST["categories"];
$categories = ereg_replace("[^A-Za-z0-9]", "", $categories);
$websites = $_REQUEST["websites"];
$websites = ereg_replace("[^A-Za-z0-9]", "", $websites);
$lang = $_REQUEST["lang"];
$lang = ereg_replace("[^A-Za-z0-9]", "", $lang);
$metasearch = $_REQUEST["metasearch"];
$metasearch = ereg_replace("[^A-Za-z0-9]", "", $metasearch);
$news = $_REQUEST["news"];
$news = ereg_replace("[^A-Za-z0-9]", "", $news);
$pics = $_REQUEST["pics"];
$pics = ereg_replace("[^A-Za-z0-9]", "", $pics);
$advanced = $_REQUEST["advanced"];
$advanced = ereg_replace("[^A-Za-z0-9]", "", $advanced);
$showhits = $_REQUEST["showhits"];
$showhits = ereg_replace("[^A-Za-z0-9]", "", $showhits);
$topkeywords= $_REQUEST["topkeywords"];
$topkeywords = ereg_replace("[^A-Za-z0-9]", "", $topkeywords);
$topsites = $_REQUEST["topsites"];
$topsites = ereg_replace("[^A-Za-z0-9]", "", $topsites);
$toprated = $_REQUEST["toprated"];
$toprated = ereg_replace("[^A-Za-z0-9]", "", $toprated);
$whatsnew = $_REQUEST["whatsnew"];
$whatsnew = ereg_replace("[^A-Za-z0-9]", "", $whatsnew);
$enc = $_REQUEST["enc"];
$audio = $_REQUEST["audio"];
$search = $_REQUEST["search"];
$search = ereg_replace("[^A-Za-z0-9 /]", "", $search);
$search = strtolower($search);
$noplus = str_replace("+", " ", $search);
$search = str_replace(" ", "+", $search);
$search = str_replace("%22", "+", $search);
$imagec = $Conf['imgdir'] ."/". $Conf['theme'];
$thepath = $Conf['templatespath'] ."/". $Conf['theme'];
$key = "asdfghjkkkkkkkkkkgdddd";
$countthem = "0";
$theme = $_REQUEST["theme"];
if ($theme == "") { $theme = $Conf['theme']; }
if($showthumbs == "") { $showthumbs = $Conf['thumbs']; }
if($direct == "2") { $categories = 1; }
if($direct == "3") { $websites = 1; }
if($direct == "4") { $metasearch=1; }
if($direct == "5") { header("location:" . $Conf['cgiurl'] ."/amazon.cgi?input_templates=1&input_string=$search&input_mode=books"); }
function clean($val) {
$val = ereg_replace("[^[:space:]a-zA-Z0-9*_-]", "", $val);
$val = addslashes($val);
return $val;
}
if ($showhits == "0") { $showhits = $Conf['listhits']; }
if ($showhits == "") { $showhits = $Conf['listhits']; }
if ($mode == "") { $showmin = $showhits - $Conf['listhits'];
} elseif ($mode =! "") { $showmin = 0; }
if ($search and $Conf['filter'] == "1"){ include_once('lib_*****_filter.php'); }
if ($topkeywords == "1") { include_once('lib_search_topkeywords.php'); }
if ($toprated == "1") { include_once('lib_search_toprated.php'); }
if ($topsites == "1") { include_once('lib_search_topsites.php'); }
if ($whatsnew == "1") { include_once('lib_search_whatsnew.php'); }
require('includes/ip.php');
$myCliInf = new ClientInfo;
$myip = $myCliInf->getClientIP();
$table = " blockedips ";
$fieldlist = " blockedips.ip ";
$condition = " WHERE blockedips.ip = '$myip' ";
$blocked = sel_rows($conn,$table,$fieldlist,$condition);
while (list($bid, $thetime, $u, $url, $title, $desc) = mysql_fetch_row($blocked)) { exit; }
$dom = $myCliInf->getClientHostname();
$table = " blockedaddr ";
$fieldlist = " blockedaddr.addr ";
$condition = " WHERE blockedaddr.addr = '$dom' ";
$blockedb = sel_rows($conn,$table,$fieldlist,$condition);
while (list($ja) = mysql_fetch_row($blockedb)) { exit; }
$country = $myCliInf->getClientCountry();
$table = " blockedcntry ";
$fieldlist = " blockedcntry.cntry ";
$condition = " WHERE blockedcntry.cntry = '$country' ";
$blockedc = sel_rows($conn,$table,$fieldlist,$condition);
while (list($cntry) = mysql_fetch_row($blockedc)) { exit; }
if ($metasearch == "1") {
globalh($Conf,$search,$override,$lang,$theme);
$filenamesum = "templates/".$theme."/metasearch.txt";
$handle = fopen($filenamesum, "rb");
$SITETEMPLATEsum = fread($handle, filesize($filenamesum));
fclose($handle);
if ($showhits == "") { $showhits = $Conf['listhits']; }
$showmin = $showhits - $Conf['listhits'];
include_once('lib_search_adbox.php');
require('includes/incRoutines.php');
if($Conf['othersearch'] != "2") { $showthis = "10"; include_once('lib_search_xml.php'); } else { include_once('lib_search_msn.php'); }
$noplus = str_replace("+", " ", $search);
$noplus2 = str_replace("\\", "", $noplus);
if ($countthem < 1) {
$filename = "templates/".$theme."/error_page.txt";
$handle = fopen($filename, "rb");
$SITETEMPLATE = fread($handle, filesize($filename));
fclose($handle);
$SITETEMPLATE = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:foundmessage>', $foundmessage, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:directory>', $directory, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:show_banner>', $img_banner, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:listings>', $finishedlistings, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:noresults>', $previouspagelink, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:keyword>', $noplus2, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:related>', $ctop2, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:filter>', $override, $SITETEMPLATE);
$noresults .= "$SITETEMPLATE";
}
$SITETEMPLATEsum = str_replace('<module:categories>', 'thecategories', $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module

pclistings>', $finishedlistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:freelistings>', $freelistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:externallistings>', $externallistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:feeds>', $feedmsn, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:foundmessage>', $DATAHITS, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:show_banner>', $theppcban, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:noresults>', $noresults, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:keyword>', $noplus2, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:related>', $ctop2, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:filter>', $override, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:adbox>', $theboxes, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:language>', $lang, $SITETEMPLATEsum);
echo $SITETEMPLATEsum;
globalf($Conf,$theme);
exit;
}
if (($enc == "1")&&($search != "")) { include_once('lib_search_encyclopedia.php'); }
if (($audio == "1")&&($search != "")) { include_once('lib_search_audio.php'); }
if (($news == "1")&&($search != "")) { include_once('lib_search_news.php'); }
if ($advanced == "1") { include_once('lib_search_advanced.php'); }
if (($search == "") && ($dir == "") && ($pics == "") && ($news == "") && ($enc == "") && ($audio == "")) { include_once('lib_main_index.php'); }
if (($search == "") && ($dir == "") && ($pics != "") && ($news == "")) { include_once('lib_main_images.php'); }
if (($search == "") && ($dir == "") && ($pics == "") && ($news != "")) { include_once('lib_main_news.php'); }
if (($search == "") && ($dir == "") && ($pics == "") && ($news == "") && ($enc != "")) { include_once('lib_main_encyclopedia.php'); }
if (($search == "") && ($dir == "") && ($pics == "") && ($news == "") && ($audio != "")) { include_once('lib_main_audio.php'); }
if (($dir != "") && ($mode != "categories") && ($mode != "websites") && ($mode != "meta")) {
include_once('lib_show_dir.php');
exit;
} elseif (($search != "") && ($mode != "categories") && ($mode != "websites") && ($mode != "meta")) {
if ($Conf['recentkeywords'] == "1") {
$table = " searchwords ";
$fieldlist = " id ";
$condition = " where word = '$search'";
$searchwords = sel_rows($conn,$table,$fieldlist,$condition);
list($id) = mysql_fetch_row($searchwords);
if (trim ($id) == "") {
$in_fieldlist = " word,totalSearch ";
$in_values = " '$search',1";
InsertFields($conn, $table, $in_fieldlist, $in_values);
}else{
$fieldlist = " totalSearch = totalSearch + 1";
$condition =" where id =$id";
update_rows($conn, $table, $fieldlist, $condition);
}
$table = " searchkeywords ";
$in_fieldlist = " word,createDate,ip ";
$in_values = " '$search',NOW(),'".$_ENV["REMOTE_ADDR"]."'";
InsertFields($conn, $table, $in_fieldlist, $in_values);
}
$urlsearch = 0;
if (strpos($search, 'http:') != ""){$urlsearch = 1;}
if (strpos($search, 'www.') != ""){$search = "http://$search";$urlsearch = 1;}
if($websites == "1") {
globalh($Conf,$search,$override,$lang,$theme);
$filenamesum = "templates/".$theme."/website_results.txt";
$handle = fopen($filenamesum, "rb");
$SITETEMPLATEsum = fread($handle, filesize($filenamesum));
fclose($handle);
include_once('lib_search_banner.php');
include_once('lib_search_ppc.php');
if ($Conf['cache'] == "1") { include_once('lib_comp.php'); }
else { include_once('lib_search_freelisting.php'); }
include_once('lib_search_external.php');
include_once('lib_search_adbox.php');
include_once('lib_search_related.php');
require('includes/incRoutines.php');
if($Conf['othersearch2'] == "2") { include_once('lib_search_msn.php'); }
if($Conf['othersearch2'] == "2") { include_once('lib_getamount.php'); }
if($Conf['othersearch2'] == "3") { include_once('lib_odp.php'); }
if($theme == "friendlyurls") { include_once('lib_next_links_friendly.php'); } else { include_once('lib_next_links.php'); }
if ($DATAHITS < 1) {
$filename = "templates/".$theme."/error_page.txt";
$handle = fopen($filename, "rb");
$SITETEMPLATE = fread($handle, filesize($filename));
fclose($handle);
$SITETEMPLATE = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:foundmessage>', $foundmessage, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:directory>', $directory, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:show_banner>', $img_banner, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:listings>', $finishedlistings, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module

reviouspagelink>', $previouspagelink, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:keyword>', $search, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:related>', $ctop2, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:filter>', $override, $SITETEMPLATE);
$freelistings = $SITETEMPLATE;
}
$noplus = str_replace("\\", "", $noplus);
$SITETEMPLATEsum = str_replace('<module:categories>', 'thecategories', $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module

pclistings>', $finishedlistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:freelistings>', $freelistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:externallistings>', $externallistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:msnlistings>', $feedmsn, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:foundmessage>', $DATAHITS, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:show_banner>', $theppcban, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:keyword>', $noplus, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:related>', $ctop2, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:filter>', $override, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:adbox>', $theboxes, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:language>', $lang, $SITETEMPLATEsum);
echo $SITETEMPLATEsum;
globalf($Conf,$theme);
exit;
}
elseif ($pics == "1") {
include_once('lib_search_images.php');
exit;
}
elseif ($categories == "1") {
globalh($Conf,$search,$override,$lang,$theme);
include_once('lib_search_banner.php');
include_once('lib_search_adbox.php');
include_once('lib_search_categories.php');
globalf($Conf,$theme);
exit;
}
else {
$table = " categories ";
$fieldlist = " id ";
$condition = " where title = '$search'";
$categories = sel_rows($conn,$table,$fieldlist,$condition);
list($categories) = mysql_fetch_row($searchwords);
if (($categories == "") && ($gotos == 1)) {
} else {
globalh($Conf,$search,$override,$lang,$theme);
$filenamesum = "templates/".$theme."/summary_results.txt";
$handle = fopen($filenamesum, "rb");
$SITETEMPLATEsum = fread($handle, filesize($filenamesum));
fclose($handle);
include_once('lib_search_banner.php');
include_once('lib_search_ppc.php');
if ($Conf['cache'] == "1") { include_once('lib_comp.php'); }
else { include_once('lib_search_freelisting.php'); }
include_once('lib_search_external.php');
include_once('lib_search_cats.php');
include_once('lib_search_adbox.php');
include_once('lib_search_related.php');
require('includes/incRoutines.php');
if($Conf['othersearch'] != "2") { include_once('lib_search_xml.php'); }
if($Conf['othersearch2'] == "2") { include_once('lib_search_msn.php'); }
if($Conf['othersearch2'] == "2") { include_once('lib_getamount.php'); }
if($Conf['othersearch2'] == "3") { include_once('lib_odp.php'); }
if($theme == "friendlyurls") { include_once('lib_next_links_friendly.php'); } else { include_once('lib_next_links.php'); }
if ($DATAHITS < 1) {
$filename = "templates/".$theme."/error_page.txt";
$handle = fopen($filename, "rb");
$SITETEMPLATE = fread($handle, filesize($filename));
fclose($handle);
$SITETEMPLATE = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:foundmessage>', $foundmessage, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:directory>', $directory, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:show_banner>', $img_banner, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:listings>', $finishedlistings, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module

reviouspagelink>', $previouspagelink, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:keyword>', $search, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:related>', $ctop2, $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATE);
$SITETEMPLATE = str_replace('<module:filter>', $override, $SITETEMPLATE);
$freelistings = $SITETEMPLATE;
}
$noplus = str_replace("\\", "", $noplus);
$SITETEMPLATEsum = str_replace('<module:categories>', $thecats, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module

pclistings>', $finishedlistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:freelistings>', $freelistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:externallistings>', $externallistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:msnlistings>', $feedmsn, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:foundmessage>', $DATAHITS, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:show_banner>', $theppcban, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:keyword>', $noplus, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:related>', $ctop2, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:filter>', $override, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:adbox>', $theboxes, $SITETEMPLATEsum);
$SITETEMPLATEsum = str_replace('<module:language>', $lang, $SITETEMPLATEsum);
echo $SITETEMPLATEsum;
globalf($Conf,$theme);
exit;
}
}
}
function dfsrtrbdf($Conf) {$asdkfjhskdhf = "sdfsdfsdwwww";}
function globalh($Conf,$noplus,$override,$lang,$theme) {
$filename = "templates/".$theme."/global_header.txt";
$handle = fopen($filename, "rb");
$SITETEMPLATEgh = fread($handle, filesize($filename));
fclose($handle);
$noplus = str_replace("+", " ", $noplus);
$noplus = str_replace("\\", "", $noplus);
$SITETEMPLATEgh = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:foundmessage>', $foundmessage, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:directory>', $directory, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:show_banner>', $img_banner, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:listings>', $finishedlistings, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module

reviouspagelink>', $previouspagelink, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:keyword>', "$noplus", $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:related>', $ctop2, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:filter>', $override, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:*****>', $override, $SITETEMPLATEgh);
$SITETEMPLATEgh = str_replace('<module:language>', $lang, $SITETEMPLATEgh);
echo $SITETEMPLATEgh;
}
function globalf($Conf,$theme) {
$filename = $Conf['modulespath']."/".$theme."/global_footer.txt";
$handle = fopen($filename, "rb");
$SITETEMPLATEgf = fread($handle, filesize($filename));
fclose($handle);
$SITETEMPLATEgf = str_replace('<module

thersearch>', $othersearch, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:searchurl>', $Conf['searchurl'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:cgiurl>', $Conf['cgiurl'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:foundmessage>', $foundmessage, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:directory>', $directory, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:show_banner>', $img_banner, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:listings>', $finishedlistings, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module

reviouspagelink>', $previouspagelink, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:nextpagelink>', $nextpagelink, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:gotowebsites>', $gotowebsites, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:sponsoredlistings>', $sponsoredlistings, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:related>', $ctop2, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:imageurl>', $Conf['imgdir'] ."/". $Conf['theme'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:topbanner>', $bannerfile, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:bottombanner>', $bannerfilebot, $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:maintitle>', $Conf['maintitle'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:topbar>', $Conf['topbar'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:bgbox>', $Conf['bgbox'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:email>', $Conf['youremail'], $SITETEMPLATEgf);
$SITETEMPLATEgf = str_replace('<module:language>', $lang, $SITETEMPLATEgf);
echo $SITETEMPLATEgf;
}
exit;
?>
میشه یکی بررسی کنه
ممنون