<?
session_start();
if (!$ReGh0sT)
{
$getname=explode(".",$HTTP_HOST);
if($getname[1]!="0"&&$getname[2]!="0"&&$HTTP_HOST!="127.0.0.1")
{
echo"非法用户，不允许使用！$HTTP_HOST,$getname[1]";
exit;
}
$ReGh0sT=$HTTP_HOST;
session_register ("ReGh0sT");
}
if (!$mx_cf[max_row]||!$mx_cf[max_page]||!$mx_cf[max_hot]||!$mx_cf[main_show]||!$mx_cf[main_hot])
{
$restmax = $DB->query("select * from buys_config where configid='1'",$dbbase);
$resmax=mysql_fetch_array($restmax);
$mx_cf[max_row]=$resmax[max_row];
$mx_cf[max_page]=$resmax[max_page];
$mx_cf[max_hot]=$resmax[max_hot];
$mx_cf[main_show]=$resmax[main_show];
$mx_cf[main_hot]=$resmax[main_hot];
$mx_cf[main_sales]=$resmax[main_sales];
session_register ("mx_cf");
}
if (!$ur_cf[phurl]||!$ur_cf[hpurl]||!$ur_cf[hmdir]||!$ur_cf[wname]||!$ur_cf[gohtml])
{
$reshost = $DB->query("select * from buys_config where configid='1'",$dbbase);
$seshost=mysql_fetch_array($reshost);
$ur_cf[hpurl]=$seshost[hpurl];
$ur_cf[phurl]=$seshost[phurl];
$ur_cf[hmdir]=$seshost[hmdir];
$ur_cf[wname]=$seshost[wname];
$ur_cf[gohtml]=$seshost[gohtml];
$ur_cf[semail]=$seshost[semail];
$ur_cf[tell_1]=$seshost[tell_1];
$ur_cf[fax_1]=$seshost[fax_1];
$ur_cf[msn]=$seshost[msn];
$ur_cf[yahooid]=$seshost[yahooid];
$ur_cf[icq]=$seshost[icq];
$ur_cf[oicq]=$seshost[oicq];
session_register ("ur_cf");
}
if (!$ad_cf[ad1]||!$ad_cf[ad2]||!$ad_cf[ad3]||!$ad_cf[ad4]||!$ad_cf[ad1url]||!$ad_cf[ad2url]||!$ad_cf[ad3url]||!$ad_cf[ad4url])
{
$resads = $DB->query("select * from buys_mainads where adsid='1'",$dbbase);
$sesads=mysql_fetch_array($resads);
$ad_cf[ad1]=$sesads[ad1];
$ad_cf[ad2]=$sesads[ad2];
$ad_cf[ad3]=$sesads[ad3];
$ad_cf[ad4]=$sesads[ad4];
$ad_cf[ad1url]=$sesads[ad1url];
$ad_cf[ad2url]=$sesads[ad2url];
$ad_cf[ad3url]=$sesads[ad3url];
$ad_cf[ad4url]=$sesads[ad4url];
session_register ("ad_cf");
}
?>