当前位置: 首页>>代码示例>>PHP>>正文


PHP UserModel::getUsers方法代码示例

本文整理汇总了PHP中UserModel::getUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserModel::getUsers方法的具体用法?PHP UserModel::getUsers怎么用?PHP UserModel::getUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserModel的用法示例。


在下文中一共展示了UserModel::getUsers方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listUsersView

 public static function listUsersView()
 {
     $userModel = new UserModel();
     $users = $userModel->getUsers();
     $paginationNumber = (new ConfigurationModel())->getPaginationNumber();
     $usersAmount = $userModel->getUsersAmount();
     $view = new ListUsersView();
     $view->show($users, $paginationNumber, $usersAmount, $_SESSION["username"]);
 }
开发者ID:Pablord,项目名称:SchoolPaymentManagementSystem,代码行数:9,代码来源:UserController.php

示例2: actionNormalUsers

 function actionNormalUsers($params = '')
 {
     $objUsers = new UserModel();
     $users = $objUsers->getUsers('user');
     $this->view->assign('userList', $users);
     $this->view->assign('userType', 'Normal');
     $this->view->assign('content', $this->view->fetch('tpl/administration/users.tpl'));
     $this->view->assign('messages', $this->messages);
     $this->finish();
 }
开发者ID:ngardner,项目名称:BentoCMS,代码行数:10,代码来源:Users.php

示例3: getUsersTable

 function getUsersTable()
 {
     $userModel = new UserModel();
     $users = $userModel->getUsers();
     $result = "<div style='height:400px;overflow:auto;'>\n\t\t\t\t\t<table class='tables'>\n\t\t\t\t\t  <thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t  <th>Id</th>\n\t\t\t\t\t\t  <th>First name</th>\n\t\t\t\t\t\t  <th>Last name</th>\n\t\t\t\t\t\t  <th>Email</th>\n\t\t\t\t\t\t  <th>Username</th>\n\t\t\t\t\t\t  <th>Remove</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t  </thead>\n\t\t\t\t\t  <tbody>";
     foreach ($users as $user) {
         $result = $result . "<tr>\n\t\t\t\t\t\t  <td>{$user->idUser}</td>\n\t\t\t\t\t\t  <td>{$user->firstname}</td>\n\t\t\t\t\t\t  <td>{$user->lastname}</td>\n\t\t\t\t\t\t  <td>{$user->email}</td>\n\t\t\t\t\t\t  <td>{$user->username}</td>\n\t\t\t\t\t\t  <td>\n\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='user_to_del' value='{$user->idUser}' />\n\t\t\t\t\t\t\t\t<input type='submit' name='delete_user' value='' id='del_user'/>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t  </td>\n\t\t\t\t\t\t</tr>";
     }
     $result = $result . "</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t</div>";
     return $result;
 }
开发者ID:ralucabolba,项目名称:E-Biblio,代码行数:11,代码来源:user_controller.php

示例4:

<br />
        
        <div id="main">
            <h2>Column 1</h2>
             <table border="2" cellspacing="2" cellpadding="2">
                <tr>
                <th><font face="Arial, Helvetica, sans-serif">Id</font></th>
                <th><font face="Arial, Helvetica, sans-serif">fname</font></th>
                <th><font face="Arial, Helvetica, sans-serif">username</font></th>
                <th><font face="Arial, Helvetica, sans-serif">password</font></th>
                <th><font face="Arial, Helvetica, sans-serif">email</font></th>
                <th><font face="Arial, Helvetica, sans-serif">Date</font></th>
                </tr>
             <?php 
$users = $userM->getUsers();
for ($y = 1; $y - 1 < sizeof($users); $y++) {
    // $categorie = $CategorieM->getCategories($categories[$y]);
    // $categories[$y]
    // echo $catID[$y];
    //echo "<li><a href='".$catID[$y]."'>".$catID[$y]."</a></li>";
    $field1 = $users[$y]->getId();
    $field2 = $users[$y]->getFull_name();
    $field3 = $users[$y]->getUsername();
    $field4 = $users[$y]->getPassword();
    $field5 = $users[$y]->getEmail();
    $field6 = $users[$y]->getDate();
    echo "<tr><td>" . $field1 . "</td><td>" . $field2 . "</td><td>" . $field3 . "</td><td>" . $field4 . "</td><td>" . $field5 . "</td></tr>";
}
?>
           </table>  
开发者ID:sachinimalindi,项目名称:simphpcms,代码行数:30,代码来源:allUsers.php

示例5: actionEditArticle

 function actionEditArticle($params = '')
 {
     $objBlog = new BlogModel();
     $article_id = !empty($params['article_id']) ? intval($params['article_id']) : false;
     if (!empty($params['dosave'])) {
         $saveData = array();
         $saveData['id'] = !empty($params['article_id']) ? intval($params['article_id']) : false;
         $saveData['title'] = !empty($params['article_title']) ? $params['article_title'] : 'Unnamed';
         $saveData['keyName'] = !empty($params['article_keyName']) ? $params['article_keyName'] : '';
         $saveData['article'] = !empty($params['article_article']) ? $params['article_article'] : '';
         $saveData['author_id'] = !empty($params['article_author_id']) ? intval($params['article_author_id']) : false;
         $saveData['category_id'] = !empty($params['article_category_id']) ? intval($params['article_category_id']) : '';
         $saveData['publishDate'] = !empty($params['article_publishDate']) ? date("Y-m-d H:i:s", strtotime($params['article_publishDate'])) : date("Y-m-d H:i:s");
         $saveData['allow_comments'] = !empty($params['article_allow_comments']) ? intval($params['article_allow_comments']) : false;
         $saveData['layout_id'] = !empty($params['article_layout_id']) ? intval($params['article_layout_id']) : false;
         $saveData['status'] = !empty($params['article_status']) ? $params['article_status'] : 'draft';
         $saveData['url'] = !empty($params['article_url']) ? $params['article_url'] : false;
         $saveData['meta']['title'] = !empty($params['meta_title']) ? $params['meta_title'] : '';
         $saveData['meta']['description'] = !empty($params['meta_description']) ? $params['meta_description'] : '';
         $saveData['meta']['keywords'] = !empty($params['meta_keywords']) ? $params['meta_keywords'] : '';
         $article_id = $objBlog->saveArticle($saveData);
         if (!empty($params['ajaxsave'])) {
             $articleInfo = $objBlog->loadArticle($article_id);
             echo json_encode($articleInfo);
             return;
         }
         $this->messages[] = array('type' => 'success', 'message' => 'Blog article has been saved.');
         if ($params['submit'] == 'Save and Close') {
             $this->actionArticles();
             return;
         }
     }
     $categoryList = $objBlog->getCategories();
     $this->view->assign('categoryList', $categoryList);
     $objUsers = new UserModel();
     $this->view->assign('userList', $objUsers->getUsers('admin'));
     $objLayouts = new LayoutModel();
     $layouts = $objLayouts->getLayouts();
     $this->view->assign('layouts', $layouts);
     if (!empty($article_id)) {
         $articleInfo = $objBlog->loadArticle($article_id);
     } else {
         $articleInfo['layout_id'] = $objBlog->getDefaultArticleLayout();
     }
     $this->view->assign('articleInfo', $articleInfo);
     $this->view->assign('content', $this->view->fetch('tpl/blog/article.tpl'));
     $this->view->assign('messages', $this->messages);
     $this->finish();
 }
开发者ID:ngardner,项目名称:BentoCMS,代码行数:49,代码来源:Blog.php


注:本文中的UserModel::getUsers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。