define("__CASTLE_PHP_VERSION_BASE_DIR__", "/home/global/public_html/kpl_soho_free/A3_premium_type/castle_SW");
include_once(__CASTLE_PHP_VERSION_BASE_DIR__ . "/castle_referee.php");
/*
ij�� ���� ������
/index.php
/lib/connect.php
/skin/h_top_menu.php
/admin/index.php
/admin/skin/top.php
*/
require("/home/global/connection/connect_p.php");
require("./lib/user_function.php");
if(!$comp_q) {
SetCookie("comp_q", "" , 0 , "/" );
SetCookie("comp_q",$comp,0,"/"); //comp_q ��Ű������ ������ü�� �����Ѵ�.
}
require("/home/global/connection/connect_pp.php");
$sql=" select c2c_name from soho_master where sno='$s_soho_code'";
//echo"sql=$sql
";
//exit;
$result=mysqli_query($sql,$connect);
$c2c_name=mysqli_result($result,0,0);
if($comp!="") {
//require ("./lib/connect.php");
//require("./lib/user_function.php");
require("/home/global/connection/connect_pp.php");
$date_date = date("Y-m-d");
$sql=" select count(*) from b2b_hit where date = '$date_date' and company='$comp'";
//echo "$sql";
$result=mysqli_query($sql,$connect);
$cnt=mysqli_result($result,0,0);
//�ش� ��ü���� �ش����ڿ� �Ѿ�� �����Ͱ� �Ѱǵ� ������ insert�Ѵ�.
if($cnt==0)
{
$sql="insert into b2b_hit (company,date,hit,soho_code,soho_url,soho_type) values ('$comp','$date_date',1,'$s_soho_code','$s_soho_url','$soho_type')";
$result=mysqli_query($sql,$connect);
if(!$result)
{
//errorsql("QUERY_ERROR");
//echo($sql);
}
}
//���� �Ѱ��̶� ��Ʈ���� ������ update�Ѵ�.
else {
$sql="UPDATE b2b_hit SET hit = hit + 1 WHERE date = '$date_date' and company = '$comp' and soho_code='$s_soho_code'";
$result=mysqli_query($sql,$connect);
if(!$result)
{
//errorsql("QUERY_ERROR");
//echo($sql);
}
}
}
$sql=" select mobile_use,mobile_type,soho_url_m from soho_master where sno = '$s_soho_code'";
$result=mysqli_query($sql,$connect);
$use=mysqli_result($result,0,mobile_use);
$type=mysqli_result($result,0,mobile_type);
$soho_url_m=mysqli_result($result,0,soho_url_m);
if (ereg("www","$HTTP_HOST")) {
$dom_arr = explode("www",$HTTP_HOST);
$dom_url = "http://m".$dom_arr[1];
//echo $dom_url;
//exit;
}
else {
$dom_url = "http://m.$HTTP_HOST";
}
//echo $dom_url;
//exit;
// if($HTTP_HOST=='st04.globalflower.co.kr'||$HTTP_HOST=='st03.globalflower.co.kr'||$HTTP_HOST=='st02.globalflower.co.kr'||$HTTP_HOST=='st01.globalflower.co.kr')
// {
// $soho_url_jisung = 'globalflower.co.kr';
// }else{
// $soho_url_jisung = $HTTP_HOST; ///�ּ�
// }
// $chk_jisung = split('www.',$soho_url_jisung); //�ּҸ�www�� �ֳ� ���� Ȯ��
// if($chk_jisung[0]==''){$soho_url_chk=$chk_jisung[1];}else{$soho_url_chk=$chk_jisung[0];}
// $url=split('.',$soho_url_chk);
// if($url[2]&&$url[2]!='kr'){ ///www�ܿ� �Ӱ� �ֳ����� Ȯ��
// $url='m'.$soho_url_chk;
// }
// if($url[2]=='kr'){
// $url='m'.$soho_url_chk;
// }
if($use=='Y'){
if(strpos($_SERVER['HTTP_USER_AGENT'],'iPhone')!==false || strpos($_SERVER['HTTP_USER_AGENT'],'Android')!==false){
?>
}
else
{
?>
}
} //if($mobile_sign == "ok") ��
else{
?>