50 |
$remote_hostname=substr($remote_hostname,0,strpos($remote_hostname,".")); |
$remote_hostname=substr($remote_hostname,0,strpos($remote_hostname,".")); |
51 |
if ($tmp[1] == $remote_hostname) $login_allowed=1; |
if ($tmp[1] == $remote_hostname) $login_allowed=1; |
52 |
} elseif (stristr($tmp[0],"http_referer")) { |
} elseif (stristr($tmp[0],"http_referer")) { |
53 |
error_log("$tmp[0]: $tmp[1] ?? $GLOBALS[HTTP_REFERER]",0); |
//error_log("$tmp[0]: $tmp[1] ?? $GLOBALS[HTTP_REFERER]",0); |
54 |
if (isset($GLOBALS[HTTP_REFERER]) && stristr($GLOBALS[HTTP_REFERER],$tmp[1])) { |
if (isset($GLOBALS[HTTP_REFERER]) && stristr($GLOBALS[HTTP_REFERER],$tmp[1])) { |
55 |
setcookie($cookie_name,$cookie_val,time()+3600); |
setcookie($cookie_name,$cookie_val,time()+3600); |
56 |
$login_allowed=1; |
$login_allowed=1; |
57 |
error_log("$tmp[0]: $tmp[1] == $GLOBALS[HTTP_REFERER]",0); |
//error_log("$tmp[0]: $tmp[1] == $GLOBALS[HTTP_REFERER]",0); |
58 |
} |
} |
59 |
|
|
60 |
} |
} |