Example #1
0
										<th>System User</th>
										<th>System Role</th>

										<th>User Name</th>
										<th>Email</th>
										<th>Mobile</th>
										<th>Created At</th>
										<th width="5%">Action</th>
									</tr>
								</thead>
								<tbody>
								<?php 
$tableDataRes = $sys_user_ob->selectAction("flag=0");
for ($r = 0; $r < count($tableDataRes); $r++) {
    $pk = $tableDataRes[$r]['sys_user_id'];
    $sys_role = new SystemRoleConrtoller();
    $sys_role_data = $sys_role->selectAction("sys_role_id=" . $tableDataRes[$r]['sys_role_id']);
    $sys_role_name = $sys_role_data[0]['sys_role'];
    ?>
									<tr>
										<td><?php 
    echo $r + 1;
    ?>
</td>
										<td><?php 
    echo $tableDataRes[$r]['sys_name'];
    ?>
</td>
										<td><?php 
    echo $sys_role_name;
    ?>
Example #2
0
<?php

/*
 * error_reporting(E_ALL);
 * ini_set('display_errors', '1');
 */
include 'includes/connection.php';
include 'controller/systemUserController.php';
include 'controller/systemRoleController.php';
extract($_REQUEST);
$db = new connection();
$sys_user_ob = new SystemUserConrtoller();
$sys_role_ob = new SystemRoleConrtoller();
/**
 * Action Declare
 * default action 0=add,1=edit,2=delete
 */
if (isset($_POST['submit'])) {
    if ($action == 0) {
        $resContent = $sys_user_ob->insertAction($_REQUEST);
    }
    if ($action == 1) {
        $resContent = $sys_user_ob->updateAction($_REQUEST);
    }
}
if (isset($_REQUEST['pk']) && $pk != "") {
    $action = 1;
    $tableDataRes = $sys_user_ob->selectAction("sys_user_id={$pk}");
    $tableDatas = $tableDataRes[0];
} else {
    $pk = "";