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


PHP BaseUser::returnUsers方法代码示例

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


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

示例1: filterSql

     $userid = filterSql($_GET['userid']);
     $BUser = new BaseUser();
     $BUser->enableUser($userid);
     base_header("Location: base_useradmin.php?action=list");
     break;
 case "deleteuser":
     // Deletes user
     $userid = filterSql($_GET['userid']);
     $BUser = new BaseUser();
     $BUser->deleteUser($userid);
     base_header("Location: base_useradmin.php?action=list");
     break;
 case "list":
     // Build table to list users and return it as $usertable
     $user = new BaseUser();
     $users = $user->returnUsers();
     $tmpHTML = "<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0 WIDTH='100%' BGCOLOR='#000000'><TR><TD>";
     $tmpHTML = $tmpHTML . "<table CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH='100%' BGCOLOR='#FFFFFF'>";
     $tmpHTML = $tmpHTML . "<tr><td CLASS='plfieldhdr' width=25>" . _EDIT . "</td><td CLASS='plfieldhdr' width=35>&nbsp;" . _DELETE . "</td><td CLASS='plfieldhdr'>" . _ID . "</td><td CLASS='plfieldhdr'>" . _LOGIN;
     $tmpHTML = $tmpHTML . "</td><td CLASS='plfieldhdr'>" . _ROLEID . "</td><td CLASS='plfieldhdr'>" . _NAME;
     $tmpHTML = $tmpHTML . "</td><td CLASS='plfieldhdr'>" . _ENABLED . "</td></tr>";
     // Verify that we have a user in the db --Kevin
     if ($users != "") {
         foreach ($users as $row) {
             //explode array rows and build table
             $tmpRow = explode("|", $row);
             $enabled = $tmpRow[4] == 1 ? "<a href='base_useradmin.php?action=disableuser&amp;userid=" . urlencode($tmpRow[0]) . "'><img src='" . $BASE_urlpath . "/images/greencheck.png' border='0' alt='button_greencheck'></a>" : "<a href='base_useradmin.php?action=enableuser&amp;userid=" . urlencode($tmpRow[0]) . "'><img src='" . $BASE_urlpath . "/images/button_exclamation.png' border='0' alt='button_exclamation'>";
             $rolename = $user->roleName($tmpRow[2]);
             $name = $tmpRow[2] == 1 ? "<font color='#ff000'><b>" . htmlspecialchars($tmpRow[1]) . "</b></font>" : htmlspecialchars($tmpRow[1]);
             $tmpHTML = $tmpHTML . "<tr><td align='center'><a href='base_useradmin.php?action=edituser&amp;userid=" . urlencode($tmpRow[0]) . "'>";
             $tmpHTML = $tmpHTML . "<img src='" . $BASE_urlpath . "/images/button_edit.png' border='0' alt='button_edit'></a></td>";
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:base_useradmin.php


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