예제 #1
0
 public function view_changeAccountBind()
 {
     $account = isset($_POST['account']) ? trim($_POST['account']) : 0;
     //账号
     $userId = isset($_POST['userId']) ? $_POST['userId'] : 0;
     //userid
     //         print_r($_POST);exit;
     if (empty($account)) {
         $msgdata = array('data' => array('缺少参数!'), 'link' => 'index.php?mod=localPower&act=ebayAccountAllocate');
         goErrMsgPage($msgdata);
         exit;
     }
     $bindObj = new UserAccountBindModel();
     $result = $bindObj->updateBindRelation($account, $userId);
     if (FALSE === $result) {
         $msgdata = array('data' => array(UserAccountBindModel::$errMsg), 'link' => 'index.php?mod=localPower&act=ebayAccountAllocate');
         goErrMsgPage($msgdata);
         exit;
     } else {
         $msgdata = array('data' => array('操作成功'), 'link' => 'index.php?mod=localPower&act=ebayAccountAllocate');
         goOkMsgPage($msgdata);
         exit;
     }
 }