0) { $user_id = mysql_result($res,0,"user_id"); $name = mysql_result($res,0,"name"); $user_fg = mysql_result($res,0,"fgprint"); $user_se = mysql_result($res,0,"user_session"); $_SESSION["user_id"] = $user_id; $_SESSION["user_session"] = $user_se; $_SESSION["user_name"] = $name; header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); $un = md5($email); $us = md5("he6".$pswd); setcookie("un", $un, time()+3600*24*365, "/", ".reportabuyer.com"); setcookie("us", $us, time()+3600*24*365, "/", ".reportabuyer.com"); header("Location: /"); //echo ""; exit; } else { $error = "Email or Password not match"; } } // auto login $cookie_un = mysql_real_escape_string(urldecode($_COOKIE["un"])); $cookie_us = mysql_real_escape_string(urldecode($_COOKIE["us"])); if($cookie_un && $cookie_us && !$_SESSION["user_id"]) { $sql = "select * from report_user where MD5(email)='$cookie_un' && MD5(CONCAT('he6',password))='$cookie_us' && activate='1'"; $res = mysql_query($sql); if(mysql_num_rows($res) > 0) { $user_id = mysql_result($res,0,"user_id"); $name = mysql_result($res,0,"name"); $user_fg = mysql_result($res,0,"fgprint"); $user_se = mysql_result($res,0,"user_session"); $_SESSION["user_id"] = $user_id; $_SESSION["user_session"] = $user_se; $_SESSION["user_name"] = $name; } } /*********** temp check IP **************/ $thisip = getIp(); $checkIP = checkIP($thisip); /***************************************/ //echo "Coming Soon"; //exit; $user_sess = $_SESSION["user_session"]; $page_path = parse_url($_SERVER["REQUEST_URI"]); $page_arr = explode("/", $page_path["path"]); $page_name = urldecode($page_arr[1]); $item_id_1 = urldecode($page_arr[2]); $item_id_2 = urldecode($page_arr[3]); $item_id_3 = urldecode($page_arr[4]); //$menudata = "$page_name/$item_id_1"; if($page_name =="ckemail") { $ck_email = mysql_real_escape_string($item_id_1); $sql="select email from report_user where email='$ck_email'"; $res = mysql_query($sql); if(mysql_num_rows($res) > 0) { echo "Seem you already registered with us. Please login or use other email address"; echo ""; exit; } else { exit; } } if($page_name =="ckstore") { $ck_store = mysql_real_escape_string($item_id_1); $sql="select store_name from user_store where store_name='$ck_store' && user_id='$user_id'"; $res = mysql_query($sql); if(mysql_num_rows($res) > 0) { echo "$ck_store is already existed. Please use other store name"; echo ""; exit; } else { exit; } } if($page_name =="rec") { echo ""; $q = list($t,$v) = explode(":",mysql_real_escape_string($item_id_1)); if($t == "N") $where = " where username like '$v'"; else if($t == "E") $where = " where email like '$v'"; else if($t == "R") $where = " where name like '$v'"; else if($t == "A") $where = " where address like '$v'"; else $where = " where 0"; $sql = "select * from report_buyer_info $where"; $res = mysql_query($sql); while($rows=mysql_fetch_assoc($res)) { $id = $rows["id"]; $username = $rows["username"]; $recpname = $rows["name"]; $email = $rows["email"]; $address = $rows["address"]; $soltid = md5("uue4".$id); echo "\n"; } echo "
$username$email
"; exit; } switch(strtolower($page_name)) { case "search": $search_active = " active"; break; case "search_file": $search_active = " active"; break; case "buyerinfo": $search_active = " active"; break; case "report": $report_active = " class=\"active\""; break; case "mypost": case "editrule": case "myaccount": case "notify": case "addrule": $post_active = " active"; break; case "settings": $setting_active = "active"; break; } if($_POST["reg"] == "signup") { include("../includes/signup_save.php"); // exit; } if($page_name == "logout") { session_unset(); session_destroy(); unset($_COOKIE['user_session']); setcookie("un", "", time()-3600, "/", ".reportabuyer.com"); setcookie("us", "", time()-3600, "/", ".reportabuyer.com"); unset($_COOKIE['PHPSESSID']); setcookie("PHPSESSID","",time()-3600); } include("tpl_includes/header.php"); if($_POST["fetch_buyer"] == "y") $page_name = "fetch_buyer"; switch(strtolower($page_name)) { case "search": include("tpl_includes/multi_search.php"); break; // case "multi_search": // include("tpl_includes/multi_search.php"); // break; case "terms": include("tpl_includes/terms.php"); break; case "search_file": include("tpl_includes/search_by_file.php"); break; case "buyerinfo": include("tpl_includes/buyerinfo.php"); break; case "report": include("tpl_includes/report.php"); break; case "mypost": include("tpl_includes/mypost.php"); break; case "notify": include("tpl_includes/notify.php"); break; case "myaccount": include("tpl_includes/myaccount.php"); break; case "fetch_buyer": include("tpl_includes/fetch_buyer.php"); break; case "settings": if(strtolower($item_id_1) == "mystore") include("tpl_includes/mystore.php"); else if(strtolower($item_id_1) == "mailscan") include("tpl_includes/mailscan.php"); else if(strtolower($item_id_1) == "postback") include("tpl_includes/postback.php"); else if(strtolower($item_id_1) == "scanrule") include("tpl_includes/filescanrule.php"); else include("tpl_includes/default.php"); //include("tpl_includes/mystore.php"); break; case "editrule": include("tpl_includes/filescanrule.php"); break; case "login": include("tpl_includes/login.php"); break; case "signup": include("tpl_includes/signup.php"); break; case "lost-password": include("tpl_includes/lost-password.php"); break; case "faq": include("tpl_includes/faq.php"); break; case "contactus": include("tpl_includes/contactus.php"); break; default: include("tpl_includes/default.php"); break; } include("tpl_includes/footer.php"); ?>