function fbedit()
 {
     $id = I('id');
     if (IS_AJAX) {
         $token = I('addtoken');
         if (!empty($token)) {
             $c = M('outnode_basicinfo')->where(array('id' => array('neq', $id), 'status' => array('not in', '2'), 'nodename' => I('nodename')))->count();
             if ($c > 0) {
                 $this->ajaxError('机构名称已经存在!');
             }
             $m = new FbModel();
             $result = $m->fbedit();
             if ($result !== false) {
                 $this->ajaxSuccess('编辑渠道信息成功!');
             } else {
                 $this->ajaxError('编辑渠道信息失败!');
             }
         } else {
             $step = I('step');
             if ($step == 2) {
                 $list = M('outnode_zcinfo')->where(array('node_id' => $id))->find();
             } else {
                 $list = M('outnode_basicinfo')->where(array('id' => $id))->find();
             }
             $citylist = getprovince();
             $this->assign('citylist', $citylist);
             $this->assign('namespace', 'fbedit');
             $this->assign('pnamespace', 'fbindex');
             $this->assign('row', $list);
             $this->assign('step', I('step'));
             $this->assign('id', $id);
             $this->display();
         }
     }
 }