$_W['uniacid'], 'centeruid' => $data[0])); if(empty($exist)) { pdo_insert('mc_mapping_ucenter', array('uniacid' => $_W['uniacid'], 'uid' => $_W['member']['uid'], 'centeruid' => $data[0])); message('绑定UC账号成功!', url('mc/mc/home'), 'success'); } else { message('该UC账号已绑定过,请使用其他账号绑定!', '', 'error'); } } } elseif($op == 'no') { if(checksubmit('submit')) { $username = trim($_GPC['username']) ? trim($_GPC['username']) : message('请填写用户名!', '', 'error'); $password = trim($_GPC['password']) ? trim($_GPC['password']) : message('请填写密码!', '', 'error'); $repassword = trim($_GPC['repassword']) ? trim($_GPC['repassword']) : message('请填写确认密码!', '', 'error'); if($password != $repassword) {message('两次密码输入不一致!', '', 'error');} $email = trim($_GPC['email']) ? trim($_GPC['email']) : message('请填写邮箱!', '', 'error'); mc_init_uc(); $uid = uc_user_register($username, $password, $email); if($uid < 0) { if($uid == -1) message('用户名不合法!', '', 'error'); elseif ($uid == -2) message('包含不允许注册的词语!', '', 'error'); elseif ($uid == -3) message('用户名已经存在!', '', 'error'); elseif ($uid == -4) message('邮箱格式错误!', '', 'error'); elseif ($uid == -5) message('邮箱不允许注册!', '', 'error'); elseif ($uid == -6) message('邮箱已经被注册!', '', 'error'); } else { if($_W['member']['email'] == '') { mc_update($_W['member']['uid'],array('email' => $email)); } pdo_insert('mc_mapping_ucenter', array('uniacid' => $_W['uniacid'], 'uid' => $_W['member']['uid'], 'centeruid' => $uid)); message('绑定UC账号成功!', url('mc/mc/home'), 'success'); } } } template('mc/bind'); exit; } else { message('已绑定UC账号,您可以尝试解绑定后重新绑定UC账号!', '', 'error'); } } else { message('系统尚未开启UC!', '', 'success'); } } else { $result = pdo_delete('mc_mapping_ucenter', array('uid' => $_W['member']['uid'], 'uniacid' => $_W['uniacid']), ' AND '); if($result === false) { message('解绑定UC账号失败!', referer(), 'error'); } else { message('解绑定UC账号成功!', referer(), 'success'); } } exit('Error: -1');