1var irsuser = function () { 2 var _self = this; 3 this._userinfo = {};//ç¨æ·ä¿¡æ¯ç±» 4 this.LoadUserInfo = function () { 5 var html=""; 6 if ($.cookies.get("iRsUserId") != null) { 7 _self._userinfo.userId = Decode($.cookies.get("iRsUserId")); 8 _self._userinfo.userAccount = Decode($.cookies.get("iRsUserAccount")); 9 _self._userinfo.userGroup = Decode($.cookies.get("iRsUserGroup")); 10 _self._userinfo.userDate = Decode($.cookies.get("iRsUserDate")); 11 _self._userinfo.userType = Decode($.cookies.get("iRsUserType")); 12 if ($.cookies.get("iRsUserName") != null) { 13 _self._userinfo.userName = Decode($.cookies.get("iRsUserName")); 14 } 15 if ($.cookies.get("iRsUserNick") != null) { 16 _self._userinfo.usernick = Decode($.cookies.get("iRsUserNick")); 17 } 18 if ($.cookies.get("iRsUserPhoto") != null) { 19 _self._userinfo.userphoto = Decode($.cookies.get("iRsUserPhoto")); 20 } 21 $("#loginstate").attr("class", "u-icon u-icon-user2"); 22 html="<em class=\"u-icon u-icon-up2\"><i></i></em>"; 23 html+="<span class=\"u-icon u-icon-my\"><a href=\"//center.iresearch.cn\"><i></i>æçè¾ç</a></span>"; 24 html+="<span class=\"u-icon u-icon-set\"><a href=\"//center.iresearch.cn/set/\"><i></i>è´¦æ·è®¾ç½®</a></span>"; 25 html += "<span class=\"u-icon u-icon-out\"><a id=\"logoutBtn\" href=\"javascript:void(0);\"><i></i>éåº</a></span>"; 26 $('#userbox').attr("class", "u-menu u-menu-2"); 27 } else { 28 $("#loginstate").attr("class", "u-icon u-icon-user"); 29 html="<em class=\"u-icon u-icon-up2\"><i></i></em>"; 30 html+="<span><a href=\"//center.iresearch.cn/loginbk.shtml\">ç»å½</a></span>"; 31 html += "<span><a href=\"//center.iresearch.cn/reg.shtml\">ç¨æ·æ³¨å</a></span>"; 32 $('#userbox').attr("class", "u-menu u-menu-1"); 33 } 34 $('#userbox').html(html); 35 } 36 this.Logout = function () { 37 $.ajax({
38 url: "/include/page/process.aspx", 39 data: ({ work: "Logout", t: Math.random() }), 40 dataType: "text", 41 success: function () { 42 location.href = "//www.iresearch.cn"; 43 } 44 }); 45 } 46 this.Favorites = function (sClassid, sNewsid) { 47 if (_self._userinfo.userId) { 48 var __sclassid = 0; 49 var __snewsid = 0; 50 if (sClassid > 0 && sNewsid > 0) { 51 __sclassid = sClassid; 52 __snewsid = sNewsid; 53 } 54 else { 55 __sclassid = $("#h_classid").val(); 56 __snewsid = _$("#h_newsid").val(); 57 } 58 if (__sclassid > 0 && __snewsid > 0) { 59 $.ajax({ 60 url: "/include/page/process.aspx", 61 data: ({ work: "Favorites", classid: __sclassid, newsid: __snewsid, t: Math.random() }), 62 dataType: "text", 63 success: function (text) { 64 // alert(text); 65 if (text == "1") { 66 irs_alert({ msg: "æ¶èæåï¼" }); 67 } 68 else if (text == "-1") { 69 switch (__sclassid) { 70 case "1": 71 irs_alert({ msg: "æ¨å·²ç»æ¶èäºæ¤ç¯æç« ï¼" }); 72 break; 73 case "2": 74 irs_alert({ msg: "æ¨å·²ç»æ¶èäºæ¤ç¯æç« ï¼" }); 75 76 break; 77 case "3": 78 irs_alert({ msg: "æ¨å·²ç»å ³æ³¨äºè¿ä½ä¸æ ä½è ï¼" }); 79 80 break; 81 case "4": 82 irs_alert({ msg: "æ¨å·²ç»æ¶èäºæ¤ä»½æ¥åï¼" }); 83 break; 84 } 85 } 86 else if(text=="2") { 87 irs_alert({ 88 msg: "æ¤æä½éè¦ç»å½ï¼", 89 btn1: { 90 type: "url", 91 txte: "ç»å½", 92 gofn: "//center.iresearch.cn/loginbk.shtml" 93 } 94 }); 95 } else { 96 irs_alert({ msg: "好åæå¡å¨åäºï¼è¯·ç¨ååè¯è¯ï¼" }); 97 } 98 } 99 }); 100 } 101 } 102 else { 103 irs_alert({ 104 msg: "æ¤æä½éè¦ç»å½ï¼", 105 btn1: { 106 type: "url", 107 txte:"ç»å½", 108 gofn: "//center.iresearch.cn/loginbk.shtml" 109 } 110 }); 111 } 112 } 113 this.SearchGo = function () { 114 var __notGo = true; 115 var __keyword = $("#keywrod").val().replace(/(^\s*)|(\s*$)/g, ""); 116 if (__keyword == "" || __keyword == "Search") { 117 return; 118 } 119 var enKewword = encodeURIComponent(__keyword); 120 if (location.href.indexOf("s.iresearch.cn") == 0) { 121 __notGo = false; 122 location.href = "//s.iresearch.cn/search/" + enKewword + "/"; 123 } 124 if (__notGo) { 125 window.open("//s.iresearch.cn/search/" + enKewword + "/"); 126 } 127 128 } 129} 130var iu = new irsuser(); 131$("#userbox").ready(function () { 132 iu.LoadUserInfo(); 133 // alert(JSON.stringify(iu._userinfo)); 134 if ($("#logoutBtn").length > 0) { 135 $("#logoutBtn").click(function () { 136 iu.Logout(); 137 }); 138 } 139}) 140$("#searchBtn").ready(function () { 141 $("#searchBtn").click(function () { 142 iu.SearchGo(); 143 }); 144}); 145$("#keywrod").bind("keypress", function (event) { 146 var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; 147 if (keyCode == 13 && document.activeElement.id == "keywrod") { 148 iu.SearchGo(); 149 } 150}); 151 152$('#userinfo_div').find('.tj').each(function(){ 153 var spanText = $(this).find('span').eq(1).html(); 154 155 $(this).html('å ¨é¨æç« ï¼<span>'+spanText+'</span>'); 156}) 157var num_href = window.location.href; 158if (-1 != num_href.indexOf('column.iresearch.cn/b/')) { 159 var strs = num_href.split('/'); 160 var idhtml = strs[strs.length - 1]; 161 var idhtmls = idhtml.split('.'); 162 var id = idhtmls[0]; 163 $.ajax({
164 url: "/ajax/process.ashx", 165 data: ({ work: "hit", id:id, t: Math.random() }), 166 dataType: "text", 167 success: function (text) { 168 $(".origin em").after("<em>æµè§ï¼" + text + "</em>"); 169 } 170 }); 171} 172
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.