2) exit; if($_SERVER['HTTP_USER_AGENT'] == "-" || $_SERVER['HTTP_USER_AGENT'] == "" || $_SERVER['HTTP_USER_AGENT'] == "WhatsUp/1.0") { $LogData = $_SERVER['HTTP_USER_AGENT']."|".$_SERVER['HTTP_REFERER']."|".$_SERVER['REMOTE_ADDR']."|"; $LogData .= implode("|",$_POST)."|"; $LogData .= implode("|",$_POST)."|"; $LogData .= $_SERVER["HTTP_COOKIE"]."|\n"; //save_log_exit($LogData); exit; } $time_stamp = time(); function Check_Attack($ipdata) { global $time_stamp; $srcfilename = "/home/filei/log/ipattack/".$ipdata; $fp = @fopen($srcfilename,"r"); if($fp == FALSE) { $fwp = @fopen($srcfilename, "a+" ); $ipdata .= "\n"; @fwrite ( $fwp, $ipdata, strlen($ipdata) ); @fclose($fwp); return 0; } else { @fclose($fp); $srctime = @filemtime($srcfilename); $fwp = @fopen($srcfilename, "a+" ); $ipdata .= "|".implode("|",$_POST)."|".$time_stamp; $ipdata .= "\n"; @fwrite ( $fwp,$ipdata, strlen($ipdata) ); @fclose($fwp); //echo("[".$time_stamp." > (".$srctime." + 3)]"); if($time_stamp > ($srctime + 1)) { return 0; } else { return 1; } } } // ddos공격이 시작되면 연다. 평상시에 그냥 두면 추천인 파트너 가입이 안된다. //if(Check_Attack($_SERVER['REMOTE_ADDR']) == 1) exit; include_once("/home/filei/config/config.php"); header('P3P: CP="NOI CURa ADMa DEVa TAIa OUR DELa BUS IND PHY ONL UNI COM NAV INT DEM PRE"'); $LastModified = gmdate("D d M Y H:i:s", filemtime($HTTP_SERVER_VARS[SCRIPT_FILENAME])); header("Last-Modified: $LastModified GMT"); header("ETag: \"$LastModified\""); header("Pragma: no-cache"); header("Cache-Control: no-cache,must-revalidate"); /* if($_SERVER['HTTP_HOST'] != DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "web1." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "web2." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb1." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb2." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb3." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb4." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb5." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb6." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb7." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb8." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb9." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "realweb10." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "ibiss." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "t." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "dev.www." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "stage.www." . DOMAIN_SITE && $_SERVER['HTTP_HOST'] != "bch1." . DOMAIN_SITE) { print ""; exit; } */ if($_COOKIE[mid]){ //로그인 한 상태면 그대로 진행 $FORURL ="/index.php"; }else{ //로그인 안 한 상태면 top100으로 가기 $FORURL ="/index.php?mode=filei&sm=rank_jehu"; } //2014.03.24 정책 변경으로 다시 원래 메인으로 처리 $FORURL ="/index.php"; $ckTime = 0; $LogData = $_SERVER['HTTP_USER_AGENT'] . "|" . $_SERVER['HTTP_REFERER'] . "|" . $_SERVER['REMOTE_ADDR'] . "|"; $LogData .= implode("|",$_POST)."|"; $LogData .= implode("|",$_POST)."|"; $LogData .= $_SERVER["HTTP_COOKIE"]."|\n"; if($LogData != "||||\n") save_log_exit($LogData); //타겟 인트로 처리부분 SETCOOKIE("ad", "", time() - 3600, "/", $COOKIE_DOMAIN);// 다른광고의 쿠키를 지운다 //SETCOOKIE("adid", "", time() - 3600);// 다른광고의 쿠키를 지운다 2013.10.01 파트너 부활로 주석처리 //-------------------------------------------------------------------------------------- // // 2009.02.12작업. (이메일을 통한 회원가입시 무료쿠폰등록 쿠키) if($_REQUEST['enter'] == 'email') { $view = 'confrim_email'; setcookie("emailad", '$view', 0, "/", $COOKIE_DOMAIN); } //-------------------------------------------------------------------------------------- //if(!$_COOKIE['mid'] && !$_COOKIE['adid'] && $_COOKIE[interclickCommitTrans]) $ad = "interich"; // 2010-08-03 파트너 제휴 피시방 if($_SERVER['HTTP_HOST'] == "ibiss." . DOMAIN_SITE) $ad = "ibiss"; // 추천인 배너 타고 들어왔을경우 if($bid) { ######################### 추천인 referer S ######################################################################################## $ref = $_SERVER['HTTP_REFERER']; if($ref !=""){ setcookie(mansolEncode(rbreferer),mansolEncode($ref),$cookie_expire,"/",$COOKIE_DOMAIN); } ######################### 추천인 referer E ######################################################################################## SETCOOKIE("RBID", $bid, $ckTime, "/", $COOKIE_DOMAIN); SETCOOKIE("ad_pno", $_GET['pno'], $ckTime, "/", $COOKIE_DOMAIN); SETCOOKIE("adid", "", time() - 3600, "/", $COOKIE_DOMAIN); // 다른광고의 쿠키를 지운다 SETCOOKIE("XID", "", time() - 3600, "/", $COOKIE_DOMAIN); // 다른광고의 쿠키를 지운다 //2013.09.17 임시로 클릭수 카운팅을 합니다. zhvmffpdl, naracon $cntInsert = dbQuery("insert into _recin_tmp_cnt set userid ='".$bid."' , bdate = CURDATE() , cnt = 1 , ip = '".$_SERVER['REMOTE_ADDR']."'"); if(!$cntInsert){ dbQuery("update _recin_tmp_cnt set cnt = cnt+1 where userid ='".$bid."' and bdate = CURDATE() and ip = '".$_SERVER['REMOTE_ADDR']."' "); } if(!$_COOKIE[RBID]) { $LogData = $_SERVER['HTTP_REFERER'] . "|" . $_SERVER['REMOTE_ADDR'] . "|"; $LogData .= implode("|",$_GET) . "|"; $LogData .= implode("|",$_POST) . "|"; $LogData .= $_SERVER["HTTP_COOKIE"] . "|\n"; // if($LogData != "||||\n") save_log_exit($LogData); if($vnum != "") print ""; if($nore=="") { if($bid == "cloudweb") { if($_GET['pno'] && $_GET['kword']) { dbQuery("INSERT INTO `tbl_adnclick` set pno = '".$_GET['pno']."', keyword = '".$_GET['kword']."', regdate = ".$time_stamp." "); echo " "; } print ""; exit; } else { print ""; exit; } } else $FORURL ="/"; } else { if($vnum != "") print ""; if($nore=="") { print ""; exit; } else $FORURL ="/"; } } else if($xid) { if(!$_COOKIE[XID]) { $LogData = $_SERVER['HTTP_REFERER'] . "|" . $_SERVER['REMOTE_ADDR'] . "|"; $LogData .= implode("|",$_GET) . "|"; $LogData .= implode("|",$_POST) . "|"; $LogData .= $_SERVER["HTTP_COOKIE"] . "|\n"; // if($LogData != "||||\n") save_log_exit($LogData); SETCOOKIE("XID", $xid, $ckTime, "/", $COOKIE_DOMAIN); SETCOOKIE("adid", "", time() - 3600, "/", $COOKIE_DOMAIN); // 다른광고의 쿠키를 지운다 SETCOOKIE("RBID", "", time() - 3600, "/", $COOKIE_DOMAIN); // 다른광고의 쿠키를 지운다 if($vnum != "") print ""; print ""; exit; } else { if($vnum != "") print ""; print ""; exit; } } else if($mcid){ setcookie("mcid", $mcid, $cookie_expire, "/", $COOKIE_DOMAIN); if(!$_COOKIE[mid]){ //$FORURL = "/index.php?mode=login&sm=login_main"; }else{ //$FORURL = "/index.php?mode=getmail"; } } else { //SETCOOKIE("RBID", "", time() - 3600); //SETCOOKIE("adid", "", time() - 3600); // 다른광고의 쿠키를 지운다 2013.10.01 파트너 부활로 주석처리 SETCOOKIE("XID", "", time() - 3600, "/", $COOKIE_DOMAIN); // 다른광고의 쿠키를 지운다 } // 작업중 다른곳 노출 제한.. //if($_SERVER['REMOTE_ADDR'] != "220.70.75.108" && $_SERVER['REMOTE_ADDR'] != "58.120.97.75" && $_SERVER['REMOTE_ADDR'] != "58.120.97.76" && $_SERVER['REMOTE_ADDR'] != "61.254.61.148") $FORURL = "er.html"; if($_SERVER['REMOTE_ADDR'] == IP_ADMIN) $SITE_TITLE_STR = $_SERVER['SERVER_ADDR'] . " - " . $_SERVER['SERVER_NAME']; else $SITE_TITLE_STR = SITE_STATUSS; // $SITE_TITLE_STR = 'ADMIN::' . $_SERVER['SERVER_ADDR'] . " - " . $_SERVER['SERVER_NAME']; // DDOS 공격시 아랫줄 주석을 풀어 메인은 그냥 HTML 로 보여줌 //if($FORURL == "/index.php" && !$_COOKIE['mid']) { $SITE_TITLE_STR = SITE_TITLE . "(119)"; $FORURL = "/index2.php"; } /* if($ad == "daumnet" || $_COOKIE['adid'] == "daumnet") { $FORURL .= "?mode=main_html"; } */ ?> <?=$SITE_TITLE_STR?> <body bgcolor="#FFFFFF" text="#000000"> </body>