예제 #1
0
    $type = $_POST["lbType"];
    $status = $_POST["lbStatus"];
    $user_id = UsersBUS::Add($username, $password, $email, null, $now, $security_question, $answer, null, $status, $type);
    if (!empty($user_id)) {
        User_Personal_InformationBUS::Add($user_id, null, null, null, null, null, null, null);
        User_Contact_InformationBUS::Add($user_id, null, null, null, null);
        User_Basic_InformationBUS::Add($user_id, null, null, null, $username, $sex, $birthday);
        AlbumsBUS::Add("Avatar", null, $now, $user_id, null);
    }
}
if (isset($_POST["btUpdate"])) {
    include_once $PATH . "../../BUS/UsersBUS.php";
    $uid = $_POST["uid"];
    $user = UsersBUS::GetUserByID($uid);
    if ($_POST["txtEmail"] != $user[3]) {
        UsersBUS::SetEmail($uid, $_POST["txtEmail"]);
    }
    if (!empty($_POST["txtPassword"])) {
        UsersBUS::SetPassword($uid, $_POST["txtPassword"]);
    }
    if (!empty($_POST["txtAnswer"]) && !empty($_POST["lbSecurityQuestion"])) {
        $_POST["lbSecurityQuestion"];
        UsersBUS::SetSecurityQuestion($uid, $_POST["lbSecurityQuestion"], $_POST["txtAnswer"]);
    }
    UsersBUS::SetStatus($uid, $_POST["lbStatus"]);
    UsersBUS::SetType($uid, $_POST["lbType"]);
}
?>
<script language="javascript">
	$(document).ready (function ()
	{