示例#1
0
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new AccountProvider();
     }
     return self::$instance;
 }
        break;
    case "edit":
        $editArray = array("account_name" => $_POST["name"], "account_level" => $_POST["level"], "account_type" => $_POST["type"], "account_remark" => $_POST["dec"]);
        $editResult = AccountProvider::getInstance()->Update($_POST["ID"], $editArray);
        echo json_encode($editResult);
        break;
    case "del":
        echo json_encode(AccountProvider::getInstance()->Update($_POST["ID"], ""));
        break;
    case "pwd":
        $old = $_POST["old"];
        $new = $_POST["new"];
        $pwdResult = AccountProvider::getInstance()->EditPassWord($old, $new);
        echo json_encode($pwdResult);
        break;
    case "oneFo":
        $onefoResult = AccountProvider::getInstance()->getAccountByAccountID($_POST["ID"]);
        echo json_encode($onefoResult);
        break;
    case "reset":
        echo json_encode(AccountProvider::getInstance()->ResetPassWord($_POST["ID"]));
        break;
    case "youlong":
        $starttime = $_POST['starttime'];
        $pageSize = intval($_POST['pagesize']) ? intval($_POST['pagesize']) : 20;
        $curPage = intval($_POST['curpage']) ? intval($_POST['curpage']) : 1;
        $endtime = $_POST['endtime'];
        $offer = ($curPage - 1) * $pageSize;
        echo json_encode(AccountProvider::getInstance()->youlongLog($offer, $pageSize, $starttime, $endtime));
        break;
}
示例#3
0
<?php

include_once "../common.php";
require_once DATACONTROL . '/BMAccount/AccountProvider.php';
require_once DATACONTROL . '/BMAccount/ModuleManageProvider.php';
require_once DATAMODEL . '/BMAccount/AccountMDL.php';
require_once DATAMODEL . "/dto/Result.php";
if (isset($_SESSION['account_ID'])) {
    echo '<SCRIPT>top.location="Index.php";</SCRIPT>';
}
if (isset($_POST['Submit']) && $_POST['Submit'] == loginBtnName) {
    $result = AccountProvider::getInstance()->Login($_POST['userId'], $_POST['password']);
    if ($result->Success) {
        $r = ModuleManageProvider::getInstance()->GetModuleRights();
        echo '<SCRIPT>top.location="Index.php";</SCRIPT>';
    } else {
        echo '<SCRIPT language="JavaScript">window.alert("' . loginErrormsg1 . '");</SCRIPT>';
    }
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
echo systemTitle;
?>
</title>
<link href="../css/login.css" rel="stylesheet" type="text/css">
<link href="../css/base.css" rel="stylesheet" type="text/css">
<script>
示例#4
0
?>
/common/jquery.js" ></script>
<script type="text/javascript" language="javascript">
function selectMenu(obj){	
	$(".sideMenu a").removeClass();
	$(obj).addClass("selected");
}

</script>

</head>

<body id="SidePage">
	<div class="sideMenu">
<?php 
$result = AccountProvider::getInstance()->AccountIsEditPWD();
if ($result == 0) {
    ?>
		 <script type="text/javascript" language="javascript">
		 parent.frames["mainFrame"].location = "/view/BaseData/EditPwd.php";
		  </script>
<?php 
    return;
} else {
    if (isset($_GET['p'])) {
        $param = $_GET['p'];
        //一级菜单的ID参数
    } else {
        if (!isset($_SESSION)) {
            session_start();
        }