예제 #1
0
$CLIENT_CONST_PAGEID = 'Client Profile';
//require_once(CLIENT_INCLUDES_PATH . 'client_authorize.inc.php');
require_once CLIENT_INCLUDES_PATH . 'client_db_function.inc.php';
require_once CLIENT_INCLUDES_PATH . 'profile_function.inc.php';
require_once INCLUDES_PATH . 'mail_common_function.inc.php';
////$strSessionVal = $_SESSION[CLIENT_SESSION_NAME];
//$arrSessions = explode(chr(5), $strSessionVal);
//$strCK_user_id = $arrSessions[3];
if (isset($_REQUEST["action"])) {
    switch ($_REQUEST["action"]) {
        case "reset":
            require_once CLIENT_INCLUDES_PATH . 'client_authorize.inc.php';
            $formMaps = client_profile_form_table_map();
            $updateparams = getUpdateQueryString($_REQUEST, $formMaps);
            $result = updateClientProfile($updateparams, $objDataHelper, $strSetClient_ID, $_REQUEST["action"]);
            echo $result;
            break;
        case "resetpwd":
            require_once CLIENT_INCLUDES_PATH . 'client_authorize.inc.php';
            $formMaps = client_profile_form_table_map();
            $updateparams = getUpdateQueryString($_REQUEST, $formMaps);
            $result = updateClientProfile($updateparams, $objDataHelper, $strSetClient_ID, $_REQUEST["action"]);
            echo $result;
            break;
        case "forgotpwd":
            //print_r($_REQUEST);
            $result = forgotPwd($objDataHelper);
            echo $result;
            break;
    }
}
예제 #2
0
//Which Table to include
require_once "../module/adminLogin.php";
// Which Module to include
$req = new Req();
$mysqli = new mysqli_functions();
$connection = $mysqli->connect();
if (is_bool($connection)) {
    Res::sendFailure($mysqli->message);
}
$module = new adminLogin($connection);
switch ($req->getCmd()) {
    case "adminLogin":
        adminLogin();
        break;
    case "forgotPwd":
        forgotPwd();
        break;
    default:
        $connection->close();
        Res::sendInvalid("invalidCmd:" . $req->getCmd());
}
$mysqli->disconnect();
function adminLogin()
{
    global $req;
    global $connection;
    global $module;
    $req->hasParams("user", "pwd", "rem");
    $user = $req->getParam("user");
    $pwd = $req->getParam("pwd");
    $rem = $req->getParam("rem");