public function head()
 {
     $IS = new ImageService();
     $heads = $IS->getHeads();
     $this->assign('heads', $heads);
     $this->display('head');
 }
 /**
  * 
  * 修改用户信息
  */
 public function modUser()
 {
     #取出用户信息
     if (is_numeric($id = I('id', '', 'intval'))) {
         $US = new UsersService();
         #当数据提交时,id是否一致,然后执行修改
         if (I('post.id', '', 'intval') === $id) {
             $US->doModUser(I('post.'));
         }
         #需要提取的字段
         $field = array('username', 'niconame', 'age', 'sex', 'head', 'address', 'sign');
         $userinfo = $US->getUserInfo($id, $field);
     } else {
         $this->redirect('Users/index');
     }
     #模板遍历用数组
     $sexlist = array('0' => '保密', '1' => '男', '2' => '女');
     $IS = new ImageService();
     $headlist = $IS->getHeads();
     #显示模板
     $this->assign('headlist', $headlist);
     $this->assign('sexlist', $sexlist);
     $this->assign('userinfo', $userinfo);
     $this->display('Users/modUser');
 }