Esempio n. 1
0
}
$curPage = $curPage > 0 ? $curPage : 1;
$curItem = ($curPage - 1) * $maxItems;
if (isset($_REQUEST["btDisable"])) {
    if ($_REQUEST['cbId']) {
        $cb = $_REQUEST['cbId'];
        foreach ($cb as $id) {
            UsersBUS::SetStatus($id, 0);
        }
    }
}
if (isset($_REQUEST["btEnable"])) {
    if ($_REQUEST['cbId']) {
        $cb = $_REQUEST['cbId'];
        foreach ($cb as $id) {
            UsersBUS::SetStatus($id, 1);
        }
    }
}
if (isset($_REQUEST["btDelete"])) {
    $cb = $_REQUEST['cbId'];
    foreach ($cb as $id) {
        UsersBUS::Delete($id);
    }
}
$status = isset($_REQUEST["status"]) ? $_REQUEST["status"] : -1;
$type = isset($_REQUEST["type"]) ? (int) $_REQUEST["type"] : -1;
$kw = isset($_REQUEST["kw"]) ? $_REQUEST["kw"] : "";
$totalItems = 0;
//UsersBUS::Count($type,$status,$kw);
$users = "";
Esempio n. 2
0
}
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 ()
	{
		$("#aDisable").click (function ()
		{
			var url = "modules/forms/listUser.php";
			var data = $("#frmListItem").serialize() + "&btDisable=true";
			$("#listItem").load(url,data);
		});
		$("#aEnable").click (function ()
		{
			var url = "modules/forms/listUser.php";
Esempio n. 3
0
        }
        $status = 1;
        $time = date('Y-m-d');
        $ip = "";
        echo "<br>role=" . $role;
        echo "<br>level=" . $level;
        echo "<br>";
        $id = UsersBUS::Add($password, $email, $hoten, $gender, $diachi, $sdt1, $sdt2, $role, $level, 1, $time, $ip);
        break;
    case "lock":
        $uid = explode(',', $_GET["uid"]);
        for ($i = 0; $i < count($uid); $i++) {
            UsersBUS::SetStatus($uid[$i], 0);
        }
        break;
    case "unlock":
        $uid = explode(',', $_GET["uid"]);
        for ($i = 0; $i < count($uid); $i++) {
            UsersBUS::SetStatus($uid[$i], 1);
        }
        break;
    case "delete":
        $uid = explode(',', $_GET["uid"]);
        for ($i = 0; $i < count($uid); $i++) {
            UsersBUS::Delete($uid[$i]);
        }
        break;
}
$status = isset($_REQUEST["status"]) ? $_REQUEST["status"] : -1;
$type = isset($_REQUEST["type"]) ? (int) $_REQUEST["type"] : -1;
header("Location:../../index.php?view=user&type=" . $type . "&status=" . $status);