Exemplo n.º 1
0
 public function updateUser($id)
 {
     if ($id != SessionUtil::get('user_id')) {
         if (!Util::has_authority(10)) {
             $this->error(3);
         }
     }
     $sex = Util::fetch_post('sex');
     $phone = Util::fetch_post('phone');
     $email = Util::fetch_post('email');
     $qq = Util::fetch_post('qq');
     $department = Util::fetch_post('department');
     $dormitory = Util::fetch_post('dormitory');
     $major = Util::fetch_post('major');
     $birthplace = Util::fetch_post('birthplace');
     $birthday = Util::fetch_post('birthday');
     $user_table = new UserTable();
     $user_table->update($id, $phone, $email, $department);
     $user_extra_table = new UserExtraTable();
     $user_extra_table->update($id, $sex, $dormitory, $birthday, $major, $birthplace, $qq);
     Util::go_back();
 }