/** * 构造函数 * */ public function __construct() { parent::__construct(); $this->userTable = tabname('user'); $this->groupTable = tabname('group'); $this->groupUserTable = tabname('groupuser'); }
/** * 构造函数 * */ public function __construct() { parent::__construct(); $this->projectTable = tabname('project'); $this->moduleTable = tabname('project_modules'); $this->verTable = tabname('project_vers'); $this->docTable = tabname('project_docs'); $this->bugTable = tabname('bugs'); }
/** * 构造函数 * */ public function __construct() { parent::__construct(); $this->bugTable = tabname('bugs'); $this->bugdocTable = tabname('bug_docs'); $this->bugHistoryTable = tabname('bug_history'); $this->bugCommentTable = tabname('bug_comment'); $this->operateHistoryTable = tabname('operate_history'); }
function login(Account_model $account) { $this->db->where('UserName', $account->UserName); $this->db->where('Password', Model_base::encrypt_password($account->Password)); $result = $this->db->get('account'); if ($result->num_rows() == 0) { return false; } return $result->first_row('Account_model'); }
function update_post() { $data = $this->get_json_object(); if (!isset($data)) { echo false; return false; } if (!isset($data->PostType) || !$this->is_valid_post_type($data->PostType)) { return false; } $this->load->model('Post_model', '', true); $post = new Post_model(); Model_base::map_objects($post, $data); $result = $this->Post_model->udpate_post($post); if (!$result) { return false; } echo json_encode($result); }
function __construct() { parent::__construct(); }
/** * 构造函数 * */ public function __construct() { parent::__construct(); $this->privTable = tabname('grouppriv'); }
/** * 构造函数 * */ public function __construct() { parent::__construct(); $this->bugtplTable = tabname('bug_tpls'); $this->inviteTable = tabname('bug_invite'); }
function update_category() { $data = $this->get_json_object(); if (!isset($data)) { return false; } if (!isset($data->CategoryType) || !$this->is_valid_category_type($data->CategoryType)) { return false; } $this->load->model('Category_model', '', true); $category = new Category_model(); Model_base::map_objects($category, $data); $result = $this->Category_model->udpate_category($category); if (!$result) { return false; } echo json_encode($result); return $result; }
function update_account() { $data = $this->get_json_object(); if (!isset($data)) { return false; } if (!$this->is_valid_account_type($data->AccountType)) { return false; } $this->load->model('Account_model', '', true); $account = new Account_model(); Model_base::map_objects($account, $data); //update photo if (!$this->upload_user_image($account)) { return false; } $result = $this->Account_model->update_account($account); if (!$result) { return false; } echo json_encode($result); }