Ejemplo n.º 1
0
             $me_url = 'http://www.renren.com/' . $rr_me[0]['uid'];
             if ($r_dby['s_n'] != $me_url || $r_dby['s_id'] != $rr_me[0]['uid']) {
                 $u_db = sprintf('update %s set s_n=%s, s_id=%s where id=%s', $dbprefix . 'm_sync', SQLString($me_url, 'text'), SQLString($rr_me[0]['uid'], 'text'), $r_dby['id']);
                 $result = mysql_query($u_db) or die('');
             }
             $content .= '当前已绑定人人网账号<table width="200"><tr><td align="center">' . ($rr_me[0]['tinyurl'] != '' ? '<img src="' . $rr_me[0]['tinyurl'] . '" alt=""/><br/>' : '') . '<a href="' . $me_url . '" target="_blank">' . $rr_me[0]['name'] . '</a>(<a href="?m=profile&amp;t=sync&amp;n=' . $nct . '&amp;lt=1">取消绑定</a>)</td></tr></table>';
             $content .= '<br/><br/><form method="post" action=""><input type="checkbox" name="is_show" value="1"' . ($r_dby['is_show'] > 0 ? ' checked="checked"' : '') . '/>隐藏已绑定人人网账号相关信息<br/><input type="submit" value="更新" class="button"/><input type="hidden" name="isl_renren_h" value="' . $r_dby['id'] . '"/></form>';
         } 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) {
         $rr_co = new renrenPHP($config['renren_key'], $config['renren_se']);
         $qurl = $rr_co->login_url($config['site_url'] . 'renren_callback.php', 'status_update read_user_status');
         $content .= '<a href="' . $qurl . '">点击此处和您的人人网账号建立连接</a>';
     }
     $content .= '<br/><br/>绑定人人网账号后将实现以下功能:<ol><li>将留言、评论、回复发布到人人网状态</li><li>在<a href="?m=user&amp;id=' . $r_dbu['id'] . '">用户信息</a>页面显示最新的人人网状态</li><li>使用人人网账号登录</li><li>注:人人网账号不可以重复绑定,用户绑定后,其他用户绑定的同一人人网账号将自动解除绑定</li></ol>';
     break;
 case 'douban':
     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/douban.php';
     $is_sync = 0;
     $s_dby = sprintf('select id, s_id, s_t, s_r, s_n, edate, 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('');