include "../../rcontrol/config.php"; include "../../rcommon/functions.php"; include "../../rcommon/stripallslashes.php"; include "../../rcommon/database.php"; include "../../access1.php"; if($log!=1) { //check if the user has already logged on $result = mysql_db_query($DATABASE, "SELECT memberlogin FROM logger WHERE abc='$abc'"); if(mysql_error()) error("Unexpected Error !!"); $count = mysql_num_rows($result); if ($count==0){ $go = urlencode("!relibrary/world/cottonindex~"); Header ("Location: ../../ruser/index.php?go=$go"); exit; } $login = stripslashes(mysql_result($result,0,0)); } $resultp = mysql_db_query($DATABASE, "SELECT plan FROM member WHERE login='$login'"); if(mysql_error()) error("Unexpected Error !!"); $plan = stripslashes(mysql_result($resultp,0,0)); //$var=access_function('/relibrary/world/cottonindex.php',"$plan"); //if($var==0) error1(); function get_upgrade_login_info($login){ global $DATABASE; global $tbl_usermast; $query="Select id,country from member where login='$login' "; //echo $query; $result=mysql_db_query($DATABASE,$query); if(mysql_num_rows($result)){ $id=mysql_result($result, 0, "id"); $country=mysql_result($result, 0, "country"); return array($id, $country); } } $upgrade=get_upgrade_login_info($login); $upgrade_id=$upgrade[0]; $upgrade_country=$upgrade[1]; if($plan=='free') { Header ("Location: $MAINPAGE/registration/index.php?old=y&var=1&oldmemberlogin=$login&c_try=$upgrade_country&id=$upgrade_id&upgrade=y"); exit; } ?>