以下是引用片段:
$getIP = GetIP();
$domain = $userName;
$sql = "INSERT INTO `".DBPREFIX."members` (`userID`, `userMail`, `userName`, `userPwd`, `userLoginTimes`, `userLastIP`, `userStatus`, `userLastDate`, `userRegDate`, `userRegIP`, `from`, `domain`) VALUES (NULL, '".$userMail."', '".$userName."', '".md5($userPwd)."', '1', '".$getIP."', '1', '".time()."', '".time()."', '".$getIP."', '5w', '".$domain."');";
// echo $sql;exit;
$this->objC -> RunQuery($sql);
if($this->objC -> GetAffectedRows() <= 0){
AlertMsg('对不起,注册失败,请稍候再试!',"-1");
exit();
if (isset($_SERVER)){
388 if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])){
389 $realip = $_SERVER["HTTP_X_FORWARDED_FOR"];
390 } else if (isset($_SERVER["HTTP_CLIENT_IP"])) {
391 $realip = $_SERVER["HTTP_CLIENT_IP"];
392 } else {
393 $realip = $_SERVER["REMOTE_ADDR"];
394 }
395 } else {
396 if (getenv("HTTP_X_FORWARDED_FOR")){
397 $realip = getenv("HTTP_X_FORWARDED_FOR");
398 } else if (getenv("HTTP_CLIENT_IP")) {
399 $realip = getenv("HTTP_CLIENT_IP");
400 } else {
401 $realip = getenv("REMOTE_ADDR");
402 }
403 }
return $realip;
很鸡叻的 |