$smarty->assign('error', 'Invalid Form'); $smarty->assign('message', 'The system does not recognize the form being submitted.'); } $smarty->display('templates/index.tpl'); break; // manage added users // manage added users case 'manageusers': $grpilist = array(); $grpnlist = array(); GetSelectContent('group', $grpilist, $grpnlist); $smarty->assign('grpilist', $grpilist); $smarty->assign('grpnlist', $grpnlist); require_once 'objects/class.user.php'; $user = new User(); $userlist = $user->GetList(array(array('userId', '>', 0), array('disabled', '=', 0))); if (count($userlist) > 0) { $users = array(); foreach ($userlist as $user) { array_push($users, array('userid' => $user->userId, 'username' => $user->username, 'firstname' => $user->firstname, 'lastname' => $user->lastname, 'groupid' => $user->groupId, 'lastlogin' => $user->lastlogin, 'disabled' => $user->disabled)); } $smarty->assign('users', $users); } else { $smarty->assign('motd', 'Table Empty'); $smarty->assign('message', 'No users found in the database.'); } $smarty->display('templates/manageusers.tpl'); break; // user entered random tasks // user entered random tasks default: