本文整理汇总了PHP中User_Model::getAllUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP User_Model::getAllUsers方法的具体用法?PHP User_Model::getAllUsers怎么用?PHP User_Model::getAllUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User_Model
的用法示例。
在下文中一共展示了User_Model::getAllUsers方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: archiveList
public function archiveList()
{
$resultList = $this->delete->getArchivedFiles();
$data = array('fileList' => json_decode($resultList), 'allUsers' => User_Model::getAllUsers(), 'trashCanTitle' => 'Permanently Delete File', 'authorizeButtonTitle' => 'Undelete This File, will send file back for approval');
$this->load->view('templates/header', array('pageTitle' => 'Archived Files'));
$this->load->view('home_view', $data);
$this->load->view('file/delete_view');
$this->load->view('templates/footer');
}
示例2: loadData
public function loadData()
{
$currentUserDept = $this->session->department;
//CHM - Pull in the sub-select values
if (!($tName = $this->cache->get('udfFields'))) {
$query = $this->db->select('table_name')->where('field_type', 4)->get('udf');
$tName = array();
foreach ($query->result() as $data) {
$explodeV = explode('_', $data->table_name);
$tName[] = $explodeV[2];
$i++;
}
$this->cache->save('udfFields', $tName, 600);
}
// We need to set a form value for the current user so that
// they can be pre-selected on the form
$availUsers = User_Model::getAllUsers();
$usersArray = array();
foreach ($availUsers as $availUser) {
if ($availUser->id == $this->session->id) {
$availUser->selected = 'checked';
} else {
$availUser->selected = '';
}
array_push($usersArray, $availUser);
}
// We need to set a form value for the current department so that
// it can be pre-selected on the form
$availDepartments = Department_Model::getAllDepartments();
$departmentsArray = array();
foreach ($availDepartments as $availDepartment) {
if ($availDepartment->id == $currentUserDept) {
$availDepartment->selected = 'checked';
} else {
$availDepartment->selected = '';
}
array_push($departmentsArray, $availDepartment);
}
$availCategories = Category_Model::getAllCategories();
$catsArray = array();
foreach ($availCategories as $availCategory) {
array_push($catsArray, $availCategory);
}
//////Populate department perm list/////////////////
$deptPermsArray = array();
foreach ($departmentsArray as $dept) {
$availDeptPerms = new stdClass();
$availDeptPerms->name = $dept->name;
$availDeptPerms->id = $dept->id;
array_push($deptPermsArray, $availDeptPerms);
}
$data = array('tName' => $tName, 'availUsers' => $usersArray, 'allDepartments' => $availDepartments, 'deptPerms' => $departmentsArray, 'availCategories' => $catsArray);
return json_encode($data);
}
示例3: index
public function index()
{
if ($this->userObj->isReviewer()) {
$results = $this->published->getFileList();
$data = array('fileList' => json_decode($results), 'reviewCount' => 0, 'rejectedFiles' => 0, 'expiredFiles' => 0, 'allUsers' => User_Model::getAllUsers(), 'trashCanTitle' => 'Reject this File', 'authorizeButtonTitle' => 'Approve This File');
$this->load->view('templates/header', array('pageTitle' => 'To Be Published'));
$this->load->view('home_view', $data);
$this->load->view('support/tobepublished_view');
$this->load->view('templates/footer');
} else {
redirect('home');
}
}
示例4: index
/**
* Loads the necessary resources for the home view
* as well as loads the views themselves.
* This includes a list of files that the user has permissions for,
* a list that has been rejected or have expired.
* This page will parse out and return paginated results in order
* to clean up the output screen.
*/
public function index()
{
$offset = $this->uri->segment(2);
$config['base_url'] = site_url();
$config['per_page'] = 6;
$config['uri_segment'] = 2;
$results = $this->home->getFileList($config['per_page'], $offset);
$resultList = json_decode($results['fileList']);
$config['total_rows'] = $results['size'];
$this->pagination->initialize($config);
$data = array('fileList' => $resultList, 'reviewCount' => $this->getFilesNeedReview(), 'rejectedFiles' => $this->getRejectedFiles(), 'expiredFiles' => $this->getExpiredFiles(), 'allUsers' => User_Model::getAllUsers(), 'links' => $this->pagination->create_links());
$this->load->view('templates/header', array('pageTitle' => 'Home'));
$this->load->view('home_view', $data);
$this->load->view('templates/footer');
}
示例5: deleteUserPick
public function deleteUserPick()
{
$data = array('allUsers' => User_Model::getAllUsers());
$this->load->view('templates/header', array('pageTitle' => 'Delete User'));
$this->load->view('user/delete_user_view', $data);
}