/*
*/
if (get_magic_quotes_runtime()==0) {
// do nothing, this is what we want.
} else {
set_magic_quotes_runtime(0);
$GLOBALS[debuggery].="quotes_runtime was on, setting to off. \n";
}
if (get_magic_quotes_gpc()==1) {
// do nothing, this is what we want.
} else {
$old_val = ini_set(magic_quotes_gpc, 1);
$GLOBALS[debuggery].="quotes_gpc was off, setting to on. \n";
}
// used by some paths, setting the cookie and such.
$GLOBALS[rootserver]="real-essiac.com";
// Include the standard Kudosnet functions
include "/home/www/kudosnet/gincludes/php_functions.lib.php3";
$debug = "1";
$testmode = "1";
$robotcheck[0]=$REMOTE_ADDR;
$robotcheck[1]=$HTTP_USER_AGENT;
if(robotcheck($robotcheck)==1) {
$GLOBALS[gotarobot]="1";
}
if ($testmode){
$GLOBALS[message] = "You are in testmode
";
}else{
}
$now=time();
// FUNCTIONS
// keep this one, it will be useful.
function CHECKs_email ($s_email) {
$s_email=strtolower($s_email);
$try=mysql_db_query($GLOBALS[database], "select * from DomainAdmin where Email4l='$s_email'",$GLOBALS[dbh]);
$count=mysql_numrows($try);
if($count>=1){
// we have one already, return -1
return("-1");
}
// if we've made it here it must be OK
return("1");
}
function prepareSerialize($a) {
// a: the array to walk through
// the basic principle... walk through and addslashes to all data..
// tunneling through nested arrays.
// $display=array_tunnel($HTTP_GET_VARS,"");
// echo "
$display"; while ( list( $key, $val ) = @each( $a ) ) { if(is_array($val)) { $a[$key]=prepareSerialize($val); } else { $val=stripslashes($val); // yes, sounds silly $a[$key]=addslashes($val); // this wasn't working, need \\\' // $a[$key]=ereg_replace("'","'",$val); } } return($a); } function stripALL($a) { // a: the array to walk through // the basic principle... walk through and addslashes to all data.. // tunneling through nested arrays. // $display=array_tunnel($HTTP_GET_VARS,""); // echo "
$display"; while ( list( $key, $val ) = @each( $a ) ) { if(is_array($val)) { $a[$key]=stripALL($val); } else { $a[$key]=stripslashes($val); // $a[$key]=ereg_replace("'","'",$val); } } return($a); } function get_connection_info ($a) { // purely for debuggin purposes... log all information that might be relevant. // using the var='' val syntax for the mysql insert for simplicity's sake $getvars = array_tunnel($GLOBALS[HTTP_GET_VARS]," "); $postvars = array_tunnel($GLOBALS[HTTP_POST_VARS]," "); $cookievars = array_tunnel($GLOBALS[HTTP_COOKIE_VARS]," "); $return[reason]=$a; $return[user]=$GLOBALS[username]; $return[password]=$GLOBALS[password]; $return[HTTP_USER_AGENT]=$GLOBALS[HTTP_USER_AGENT]; $return[HTTP_REFERER]=$GLOBALS[REFERER]; $return[REMOTE_ADDR]=$GLOBALS[REMOTE_ADDR]; $return[REMOTE_HOST]=$GLOBALS[REMOTE_HOST]; $return[REMOTE_PORT]=$GLOBALS[REMOTE_PORT]; $return[SCRIPT_FILENAME]=$GLOBALS[SCRIPT_FILENAME]; $return[SERVER_NAME]=$GLOBALS[SERVER_NAME]; $return[SERVER_PORT]=$GLOBALS[SERVER_PORT]; $return[REQUEST_METHOD]=$GLOBALS[REQUEST_METHOD]; $return[QUERY_STRING]=$GLOBALS[QUERY_STRING]; $return[REQUEST_URI]=$GLOBALS[REQUEST_URI]; $return[SCRIPT_NAME]=$GLOBALS[SCRIPT_NAME]; $return[GET_VARS]=$getvars; $return[POST_VARS]=$postvars; $return[COOKIE_VARS]=$cookievars; return $return; } // Parse the URL looking for variables and actions $url_array=explode("/", $REQUEST_URI); for($i=0; $i < count($url_array); $i++) { ereg("([a-zA-Z0-9_]*)\.?(.*)?", $url_array[$i], $matches); $INCOMING[$matches[1]]=$matches[2]; } // Just what is going on, and if nothing, lets get something going eh! if($INCOMING[a]!="") { $action = $INCOMING[a]; } else { $action="home"; } // This is the start of the action... function doMain($action){ global $message,$display,$INCOMING,$HTTP_POST_VARS; $today=time(); switch($action) { case "phpinfo": echo phpinfo(); break; case "home": $info = get_connection_info($action); while(list($key,$val)=@each($info)){ $GLOBALS[message] .= "$key == $val