UserInfo.class.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace Cas\Controller\Admin\Platform;
  3. use Cas\Module\Lottery;
  4. use Cas\Dao\PlatformBulletin;
  5. use KIF\Core\Request;
  6. use Cas\Dao\LotteryEvents;
  7. use Cas\Controller\Admin\Controller;
  8. use KIF\Page\Page;
  9. use Cas\Dao\Platform;
  10. /**
  11. * "平台相关" - 用户列表
  12. *
  13. * @author lihuanchun
  14. */
  15. class UserInfo extends Controller {
  16. private $objDUserInfo;
  17. private $operatorData;
  18. /**
  19. * 默认
  20. */
  21. public function doDefault() {
  22. }
  23. /**
  24. *  初始化
  25. */
  26. public function __construct() {
  27. header ( "Content-Type: text/html; charset=utf-8" );
  28. $this->operatorData = $this->getUser ();
  29. $this->objDUserInfo = new \Cas\Dao\UserInfo ();
  30. }
  31. /**
  32. * 页面:用户列表
  33. * 列表:http://cas.lishuy.com/?c=Admin_Platform_UserInfo&a=PageList
  34. */
  35. public function doPageList(){
  36. $page = Request::varGetInt ( 'page', 1 );
  37. $size = 20;
  38. $offset = ($page - 1) * $size;
  39. $limit = "{$offset},{$size}";
  40. $condition = array();
  41. $total_num = $this->objDUserInfo->totals ( $condition );
  42. $url_tpl = Request::schemeDomain () . "?c=Admin_Platform_UserInfo&a=PageList";
  43. $url_tpl .= "&page={page}";
  44. $objPage = new Page ( $total_num, $url_tpl, $page, $size );
  45. $page_html = $objPage->html ();
  46. $order = 'id desc';
  47. $ids = $this->objDUserInfo -> findIdsBy($condition , $limit, $order );
  48. $userData = $this->objDUserInfo->gets($ids);
  49. $thisPageUserData = $this->objDUserInfo -> gets($ids);
  50. $this->tpl = 'admin/platform/user';
  51. $title = '平台用户';
  52. $this->setOutput('title', $title);
  53. $this->setOutput('menu_active', array('name' => 'platformusers', 'item' => '')); //激活菜单
  54. $this->addNavMenu($title);
  55. $this->addNavMenu('平台设置');
  56. $this->setOutput ( 'page_html', $page_html ); // 分页Html
  57. $this->setOutput ( 'thisPageUserData', $thisPageUserData );//当前页面ID
  58. $this->setOutput ('pagePublicData', $this->getPagePublicData()); // 后台管理相关数据
  59. }
  60. public function display() {
  61. return $this->render ();
  62. }
  63. }