示例#1
0
 /**
  * UserCompetenceAct::actModify()
  * 返回某个用户开放授权
  * @param int $gid 查询ID
  * @return array 
  */
 public function actModify()
 {
     $data = array();
     $id = isset($_GET['id']) ? intval(trim($_GET['id'])) : 0;
     if (empty($id)) {
         show_message($this->smarty, "用户开放授权ID不能为空?", "");
         return false;
     }
     $data['gid'] = $id;
     $data['gids'] = UserCompetenceModel::getGlobalUser();
     $data['lists'] = UserCompetencesModel::getCompetencesByCat();
     $data['res'] = UserCompetenceModel::modModify($id);
     self::$errCode = UserCompetenceModel::$errCode;
     self::$errMsg = UserCompetenceModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }