Exemplo n.º 1
0
 /**
  * 编辑个人信息
  */
 public function editinfo()
 {
     parent::_initalize();
     $systemConfig = $this->systemConfig;
     $this->assign("systemConfig", $systemConfig);
     if (IS_POST) {
         $uid = $_POST['uid'];
         $info = $_POST['info'];
         $amod = M("AdminInfo");
         $re = $amod->where("a_id=" . $uid)->save($info);
         if ($re) {
             //记录管理员 log --------start
             $logmod = new LogModel();
             $logmod->addlog("修改了[个人信息]");
             //记录管理员 log --------end
             $this->success("操作成功", U("MyInfo/index"));
         } else {
             $this->error("没有更改任何内容");
         }
         exit;
     }
     $uid = $_GET['uid'];
     $amod = new Admininfo1Model();
     $info = $amod->getinfo($uid, 0);
     $this->assign("info", $info);
     $this->display();
 }
Exemplo n.º 2
0
 /**
  * 查看详情
  */
 public function ins()
 {
     parent::_initalize();
     $systemConfig = $this->systemConfig;
     $this->assign("systemConfig", $systemConfig);
     $aid = $_GET['aid'];
     $amod = new Admininfo1Model();
     $inf = $amod->getinfo($aid, 1);
     $citymod = new CityModel();
     $inf['province'] = $citymod->getproname($inf['cityid']);
     $inf['city'] = $citymod->getname($inf['cityid']);
     $this->assign("info", $inf);
     $this->display();
 }