Beispiel #1
0
function doEdit()
{
    if (isset($_POST['submit'])) {
        $ACCOUNTID = $_POST['user_id'];
        $FNAME = $_POST['firstname'];
        $MNAME = $_POST['middlename'];
        $ACCOUNTPASS = $_POST['password'];
        $ACCOUNTTYPE = $_POST['acctype'];
        $UNAME = $_POST['username'];
        $LNAME = $_POST['lastname'];
        $systemuser = new Systemuser();
        $systemuser->user_account_id = $ACCOUNTID;
        $systemuser->user_first_name = $FNAME;
        $systemuser->user_middle_name = $MNAME;
        $systemuser->user_last_name = $LNAME;
        $systemuser->account_password = $ACCOUNTPASS;
        $systemuser->account_type = $ACCOUNTTYPE;
        $systemuser->user_name = $UNAME;
    }
    if ($ACCOUNTID == "") {
        message('ID Number is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } elseif ($FNAME == "") {
        message('First Name is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } elseif ($MNAME == "") {
        message('Middle Name is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } elseif ($LNAME == "") {
        message('Last Name is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } elseif ($UNAME == "") {
        message('user Name is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } elseif ($ACCOUNTPASS == "") {
        message('Password is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } elseif ($ACCOUNTTYPE == "") {
        message('Account Type is required!', "error");
        redirect('index.php?view=edit&id=' . $ACCOUNTID);
    } else {
        $systemuser->update($_GET['id']);
        message('User information updated successfully!', "info");
        redirect('index.php');
    }
}
Beispiel #2
0
foreach ($cur as $department) {
    echo '<option value="' . $department->department_id . '">' . $department->name . '</option>';
}
?>
										
									</select>	
								</div>
							</div><br /><br />
							
							<div class="col-md-8">
								<label class="col-md-4 control-label" for="systemuser">User Account Number</label>
								
								<div class="col-md-8">
									<select class="form-control input-sm" name="systemuser" id="systemuser">
										<?php 
$systemuser = new Systemuser();
$cur = $systemuser->listOfSystemuser();
foreach ($cur as $systemuser) {
    echo '<option value="' . $systemuser->user_account_id . '">' . $systemuser->user_account_id . '</option>';
}
?>
									</select>	
								</div>
							</div><br /><br />
							<div class="col-md-8">
								<label class="col-md-4 control-label" for= "idno"></label>
								<div class="col-md-8">
									<button class="btn btn-default" name="save" type="submit" ><span class="glyphicon glyphicon-floppy-save"></span> Save</button>
								</div>
							</div>
						</form>
Beispiel #3
0
								<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                                <div class="clearfix"></div>
							</div>
						</a>
					</div>
				</div>
                <div class="col-lg-3 col-md-6">
					<div class="panel panel-primary">
                        <div class="panel-heading">
                            <div class="row">
                                <div class="col-xs-3">
									<P><strong><h5> Users</h5></strong></p>
								</div>
                                <div class="col-xs-9 text-right">
								    <?php 
$systemuser = new Systemuser();
$usernum = $systemuser->find_all_systemuser();
?>
                                    <div class="huge"><?php 
echo $usernum;
?>
</div>                             
								</div>
							</div>
						</div>
                        <a href="<?php 
echo WEB_ROOT;
?>
admin/modules/systemuser/index.php">
                            <div class="panel-footer">
                                <span class="pull-left">Details</span>