<?php $php_root_path = ".."; $privilege_root_path = "/user"; require_once "{$php_root_path}/includes/include_all_fns.inc"; //require_once("$php_root_path"."/admin/includes/libmail.php"); $homepage->showmenu = 0; $err_message = " Unable to process your request due to the following problems: <br>\n"; $error_array = array(); check_form($_POST, $error_array); if (count($error_array) == 0 && count($_POST) > 0) { if (forget_password($_POST["username"], &$err_message)) { do_html_header("Reseting Password Successful", &$err_message); echo "Your password has been reset and you will receive a new password to your email address shortly.<br><br>Go to the <a href='{$php_root_path}/index.php'>Login</a> page"; do_html_footer(&$err_message); exit; } else { do_html_header("Reseting Password Failed", &$err_message); $err_message .= " <br><br> Try <a href='forget_pwd.php'>Again</a>? <br>Go to the <a href='{$php_root_path}/index.php'>Login</a> page. <br>\n"; } } else { do_html_header("Reset Password", &$err_message); } ?> <form action="forget_pwd.php" method="post" name="loginForm" id="loginForm"> <table width="80%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="24" colspan="2">Not registered. <a href="registration.php">Sign up for an account.</a></td> </tr> <tr> <td height="10" colspan="2">Hint: Use your email address as UserName.</td>
} break; case 'isEmailReged': if (isset($_GET['email'])) { if (is_email_reged($_GET['email'])) { echo 'true'; } else { echo 'false'; } } else { echo 'Invalid request'; } break; case 'lostpass': if (isset($_POST['username']) && isset($_POST['email'])) { echo forget_password($_POST['username'], $_POST['email']); } else { echo 'Invalid request'; } break; case 'changePwd': if (!isset($_SESSION['username'])) { echo 'You are offline'; exit; } if (isset($_POST['oldpwd']) && isset($_POST['newpwd'])) { echo change_pwd($_SESSION['username'], $_POST['oldpwd'], $_POST['newpwd']); } else { echo 'Invalid request'; } break;
break; case "repayment": $phone = trim($_REQUEST['phone']); $email = trim($_REQUEST['email']); $country_id = trim($_REQUEST['country_id']); $operator_id = trim($_REQUEST['operator_id']); $callback = @$_REQUEST['callback']; $cid = @$_REQUEST['client_id']; echo repayment($phone, $country_id, $operator_id, $email, $callback, $cid); break; case "deactivate_expired_user": //every 5 mins deactivate_expired_user($_REQUEST['cid']); break; case "forget_password": $valid = forget_password($_REQUEST['email']); if ($valid) { echo 'Ext.data.JsonP.callback1({ "proposals": ' . '{"success":"1","message":"success"}' . '})'; } else { echo 'Ext.data.JsonP.callback1({ "proposals": ' . '{"success":"0","message":"failed"}' . '})'; } break; case "change_password": $valid = change_password($_REQUEST['email'], $_REQUEST['old_password'], $_REQUEST['new_password']); if ($valid) { echo 'Ext.data.JsonP.callback1({ "proposals":