$d_db = sprintf('delete from %s where aid<>%s and name=%s and s_id=%s', $dbprefix . 'm_sync', $r_dbu['id'], SQLString($nct, 'text'), SQLString($ms_a['id'], 'text')); $result = mysql_query($d_db) or die(''); if ($r_dby['s_id'] != $ms_a['id']) { $u_db = sprintf('update %s set s_id=%s where id=%s', $dbprefix . 'm_sync', SQLString($ms_a['id'], 'text'), $r_dby['id']); $result = mysql_query($u_db) or die(''); } $content .= '当前已绑定Microsoft账户<table width="200"><tr><td align="center"><img src="https://apis.live.net/v5.0/me/picture?access_token=' . $r_dby['s_t'] . '" alt=""/><br/>' . $ms_a['name'] . '(<a href="?m=profile&t=sync&n=' . $nct . '&lt=1">取消绑定</a>)</td></tr></table>'; } else { $d_db = sprintf('delete from %s where aid=%s and name=%s', $dbprefix . 'm_sync', $r_dbu['id'], SQLString($nct, 'text')); $result = mysql_query($d_db) or die(''); } } mysql_free_result($q_dby); if ($is_sync == 0) { $ms_o = new livePHP($config['live_key'], $config['live_se']); $aurl = $ms_o->login_url($config['site_url'] . 'live_callback.php', 'wl.basic,wl.offline_access'); $content .= '<a href="' . $aurl . '">点击此处和您的Microsoft账户建立连接</a>'; } $content .= '<br/><br/>绑定Microsoft账户后将实现以下功能:<ol><li>使用Microsoft账户登录</li><li>注:Microsoft账户不可以重复绑定,用户绑定后,其他用户绑定的同一Microsoft账户将自动解除绑定</li></ol>'; break; case 'instagram': if (isset($_GET['lt']) && $_GET['lt'] == 1) { $d_db = sprintf('delete from %s where aid=%s and name=%s', $dbprefix . 'm_sync', $r_dbu['id'], SQLString($nct, 'text')); $result = mysql_query($d_db) or die(''); header('Location:./?m=profile&t=sync&n=' . $nct); exit; } require_once 'lib/instagram.php'; $is_sync = 0; $s_dby = sprintf('select id, s_id, s_t, s_n, is_show from %s where aid=%s and name=%s limit 1', $dbprefix . 'm_sync', $r_dbu['id'], SQLString($nct, 'text')); $q_dby = mysql_query($s_dby) or die('');