Esempio n. 1
0
<? require_once("config.php"); ?>
<? require_once(RESACCMAN_BASE."/classes/SecurityUser.php"); ?>
<? require_once(RESACCMAN_BASE."/classes/Text.php"); ?>
<?

$u = new SecurityUser();
$u->setLoginName($loginName);
$u->setFullNAme($fullName);
$u->setPassword($password);

if ($action == "save") {
    if (strlen($loginName) > 0) {
        $u->setLoginName($loginName);
        $u->setFullName($fullName);
        $u->setPassword($password);
        $u->save();
        header("Location: users.php");
    } else {
        $errMsg = Text::getText("MissingLoginName");
        $buttonCaption = Text::getText("Save");
        include("header.php");
        include("userEditForm.php");
        include("footer.php");
    }
} else {
    $title = Text::getText("EditUser");
    $buttonCaption = Text::getText("Save");
    include("header.php");
    include("userEditForm.php");
    include("footer.php");
}
Esempio n. 2
0
<? require_once("classes/SecurityUser.php"); ?>
<? require_once("classes/Text.php"); ?>
<?

$u = new SecurityUser();
$u->setLoginName($_REQUEST['loginName']);
$u->setFullNAme($_REQUEST['fullName']);
$u->setPassword($_REQUEST['password']);

if ($_REQUEST['action'] == "save") {
    if (strlen($_REQUEST['loginName']) > 0) {
        $u->setLoginName($_REQUEST['loginName']);
        $u->setFullName($_REQUEST['fullName']);
        $u->setPassword($_REQUEST['password']);
        $u->save();
        header("Location: users.php");
    } else {
        $errMsg = Text::getText("MissingLoginName");
        $buttonCaption = Text::getText("Save");
        include("header.php");
        include("userEditForm.php");
        include("footer.php");
    }
} else {
    $title = Text::getText("EditUser");
    $buttonCaption = Text::getText("Save");
    include("header.php");
    include("userEditForm.php");
    include("footer.php");
}
?>