Exemplo n.º 1
0
 function execute()
 {
     $id = Http::getGET('id', 0);
     if ($id) {
         $model = new User();
         $info = $model->getRowById($id);
         $this->setRenderValues('info', $info);
         $this->render('index/user_info.php');
     }
 }
Exemplo n.º 2
0
 function execute()
 {
     /*
     if(5 != $_SESSION['_USER_INFO']['type']){
     
     }
     */
     if ($this->isPost) {
     } else {
         $id = Http::getGET('id');
         $user = new User();
         $userInfo = $user->getRowById($id);
         $this->setRenderValues('postData', $userInfo);
         $this->addToken();
         $this->render('index/user_add.php');
     }
 }
Exemplo n.º 3
0
 function formatListForList($params)
 {
     $user = new User();
     $model = $this->getModelForList();
     foreach ($params as $key => $row) {
         $params[$key]['locationText'] = $model->getLocationText($row['location']);
         $admin_ids = explode(',', $row['admin_ids']);
         $admins = array();
         $adminTexts = array();
         foreach ($admin_ids as $admin_id) {
             $admins[$admin_id] = $user->getRowById($admin_id);
             $adminTexts[$admin_id] = $admins[$admin_id]['username'];
         }
         $params[$key]['adminTexts'] = $adminTexts;
     }
     return $params;
 }