//ini_set ( "display_errors", 1 );
include_once $_SERVER["DOCUMENT_ROOT"]."/go/lib/shopLinkDB.class.php";
include_once $_SERVER["DOCUMENT_ROOT"]."/go/conf/linkDB.conf.php";
$url=isset($_SERVER['REDIRECT_URL'])?$_SERVER['REDIRECT_URL']:$_SERVER['SCRIPT_NAME'];
//echo $url."
";
$clsShopLink = new shopLinkDB(0);
if($url) {
$pwd = getcwd();
$currDir = substr(getcwd(), strlen($_SERVER["DOCUMENT_ROOT"]));
$hosturl = substr($url, strlen($currDir)+1);
//echo $hosturl."
";
$clsShopLink->getShopInfo("HOST_URL='".$hosturl."'");
$arrLists = $clsShopLink->arrLists;
if(count($arrLists) > 0) {
$shopInfo = $arrLists[0];
include_once $_SERVER["DOCUMENT_ROOT"]."/go/coupon/shopinfo.php";
exit();
}
}
header("Location: ".$_LINK_SHOP_URL);
?>