1var strVoteCountURL = ''; 2 3var ICDB = {}; 4ICDB.isLogin = function() { 5 url = '/index.php?controller=myacwind&action=islogin'; 6 var res = $.ajax({'url': url, data: {}, type: 'POST', async: false}).responseText; 7 return (res == '1'); 8} 9 10ICDB.setAnimeStatu = function(statu, icdb_id) { 11 if(!ICDB.isLogin()) { 12 var url = '/index.php?action=loginpage&jump=' + '%2Ficdb%2F' + icdb_id + '%2F'; 13 location.href = url; 14 return; 15 } 16 17 var url = '/index.php?controller=myacwind&action=setstatus', 18 data = {'anime_id': icdb_id, 'status': statu}; 19 $.post( 20 url, 21 data, 22 function(resp) { 23 location.reload(); 24 }, 25 'json'); 26} 27 28ICDB.tagsList = function(icdb_id, seiyuu_id, character_id) { 29// if(!ICDB.isLogin()) { 30// var url = '/index.php?action=loginpage&jump=' + '%2Ficdb%2F' + icdb_id + '%2F'; 31// if (seiyuu_id > 0) { 32// url = '/index.php?action=loginpage&jump=' + '%2Ficdb%2Fseiyuu%2F' + seiyuu_id + '%2F'; 33// } else if (character_id > 0) { 34// url = '/index.php?action=loginpage&jump=' + '%2Ficdb%2Fcharacter%2F' + character_id + '%2F'; 35// } 36// location.href = url; 37// return; 38// } 39 var url = '/index.php?controller=tag&action=taglist&icdb_id=' + icdb_id + '&seiyuu_id=' + seiyuu_id + '&character_id=' + character_id; 40 var data = $.ajax({'url': url, data: {}, async: false}).responseText; 41 openDialog(); 42 $('#commDialog').html(data); 43} 44 45 46ICDB.tagsList2 = function(tag_type, tag_id) { 47 var url = '/index.php?controller=tag&action=taglist&tag_type=' + tag_type + '&tag_id=' + tag_id; 48 var data = $.ajax({'url': url, data: {}, async: false}).responseText; 49 openDialog(); 50 $('#commDialog').html(data); 51} 52 53 54ICDB.tagsAdd = function(icdb_id, seiyuu_id, character_id) { 55 var url = '/index.php?controller=tag&action=addtags'; 56 var data = { 57 'icdb_id': icdb_id, 58 'seiyuu_id': seiyuu_id, 59 'character_id': character_id, 60 'tags': $('#tags').val() 61 }; 62 var resp = $.ajax({'url': url, data: data, async: false, type:'POST'}).responseText; 63 if (resp == '0') { 64 alert('Ìí¼Ó±êÇ©³É¹¦£¬Ð»Ð»Äã¡£'); 65 location.reload(); 66 } else { 67 alert('oooops£¡±£´æ³ö´í£¬ÇëÉÔºóÔÙÊÔ¡£'); 68 } 69} 70 71ICDB.tagsAdd2 = function(tag_type, tag_id) { 72 var url = '/index.php?controller=tag&action=addtags2'; 73 var data = { 74 'tag_type': tag_type, 75 'tag_id': tag_id, 76 'tags': $('#tags').val() 77 }; 78 var resp = $.ajax({'url': url, data: data, async: false, type:'POST'}).responseText; 79 if (resp == '0') { 80 alert('Ìí¼Ó±êÇ©³É¹¦£¬Ð»Ð»Äã¡£'); 81 location.reload(); 82 } else { 83 alert('oooops£¡±£´æ³ö´í£¬ÇëÉÔºóÔÙÊÔ¡£'); 84 } 85} 86 87 88 89ICDB.addListPage = function(icdb_id) { 90 if(!ICDB.isLogin()) { 91 var url = '/index.php?action=loginpage&jump=' + '%2Ficdb%2F' + icdb_id + '%2F'; 92 location.href = url; 93 return; 94 } 95 96 var url = "/index.php?controller=home&action=dialogaddtolist"; 97 var data = {'icdb_id': icdb_id}; 98 var data = $.ajax({'url': url, data:data, async: false}).responseText; 99 openDialog(); 100 $('#commDialog').html(data); 101} 102 103ICDB.addToList = function(icdb_id) { 104 var tid = $('#tid option:selected').val(); 105 var comment = $('#comment').val(); 106 var url = "/index.php?controller=home&action=addtolist"; 107 var data = {tid: tid, icdb_id: icdb_id, comment:comment}; 108 $.post( 109 url, 110 data, 111 function(resp){ 112 if (resp.status == 0) { 113 alert('Ìí¼Ó³É¹¦£¡'); 114 $.unblockUI(); 115 } else { 116 alert('Ìí¼Óʧ°Ü£¬ÇëÉÔºóÔÙÊÔ¡£'); 117 } 118 }, 119 'json' 120 ); 121} 122 123ICDB.collect = function(icdb_id) { 124 if(!ICDB.isLogin()) { 125 var url = '/index.php?action=loginpage&jump=' + '%2Ficdb%2F' + icdb_id + '%2F'; 126 location.href = url; 127 return; 128 } 129 130 var url = '/index.php?controller=icdb&action=favorite&ajax=1&icdb_id=' + icdb_id; 131 $.get( 132 url, 133 {}, 134 function(resp){ 135 if (resp.status == 0) { 136 $('#btn_collect').text('ÒѹØ×¢'); 137 $('#btn_collect').attr('href', '/index.php?controller=home&action=myfavorites'); 138 $('#btn_collect').attr('target', '_blank'); 139 } else { 140 alert('¹Ø×¢Ê§°Ü£¬ÇëÉÔºóÔÙÊÔ¡£'); 141 } 142 }, 143 'json' 144 ); 145} 146 147 148if (typeof(icdbIdForJs) != "undefined") { 149 strVoteCountURL = 'http://www.acwind.net/icdb/' + icdbIdForJs + '.xml'; 150} 151 152function icdbVote(icdbId){ 153 showVoteWindow(icdbId); 154} 155 156function showVoteWindow(icdbId){ 157 var url = "/index.php?controller=icdb&action=dialogvote&icdb_id="+icdbId; 158 var data = $.ajax({'url': url, data: {}, async: false}).responseText; 159 openDialog(); 160 $('#commDialog').html(data); 161} 162 163function VoteToIcdb(){ 164 var icdb_id = $('#icdb_id').val(); 165 var vote = $('#vote').val(); 166 if(vote == '0'){ 167 alert('ÇëÑ¡ÔñÒ»¸ö·ÖÊý¡£');return; 168 } 169 170 var pars = {'icdb_id': icdb_id, 'vote': vote}; 171 var postURL="/index.php?controller=icdb&action=vote"; 172 $.ajax({url: postURL, data: pars, async: false}); 173 alert("ÄãµÄÆÀ·ÖÒѾ³É¹¦Ìá½»£¬Ð»Ð»£¡\n"); 174 if (ICDB.isLogin()) { 175 ICDB.tagsList(icdb_id); 176 } else { 177 $.unblockUI(); 178 } 179 180// location.reload(); 181 return true; 182} 183 184function VoteCounts(){ 185 openDialog(); 186 var url = "/index.php?controller=icdb&action=dialogvotesummary"; 187 var data = $.ajax({'url': url, data: {}, async: false}).responseText; 188 $('#commDialog').html(data); 189 var so = new SWFObject('/includes/flash/flashcharts/FCF_Bar2D.swf', 'cocoplayer', '400', '250', '9', '#FFFFFF'); 190 so.addVariable('DataURL', strVoteCountURL); 191 so.addVariable('chartWidth', '400');
192 so.addVariable('chartHeight', '250'); 193 so.addVariable('scaleMode', 'exactFit'); 194 195 so.addParam('scale', 'noscale'); 196 so.write('flashcontent'); 197} 198 199 200function voteComment(commentId, vote){ 201 var postURL = "http://www.acwind.net/admin/index.php?ctl=Comment&act=Vote"; 202 var pars = 'comment_id='+commentId+'&vote='+vote; 203 var MyAjax = new Ajax.Request(postURL, {method:'post', parameters: pars, asynchronous:false, onFailure:alertAjaxError}); 204 var result = MyAjax.transport.responseText; 205 if(result == '1'){ 206 Dialog.alert("¸øÆÀÂÛͶƱ³É¹¦¡£",{className:"alphacube", width:500, okLabel:'È·¶¨'}); 207 }else{ 208 Dialog.alert("ÇëÎðÖØ¸´Í¶Æ±",{className:"alphacube", width:500, okLabel:'È·¶¨'}); 209 } 210 211} 212 213 214function showVideo(icdb_id){ 215 Dialog.alert("<div id='dcontent' name='dcontent'>Loading</div>", {className:"alphacube", width:500, height:550, okLabel:' ¹Ø ±Õ ' }); 216 //ÕÒ¶«Î÷дÈëdcontent 217 var postURL = "http://www.acwind.net/admin/index.php?ctl=video&act=showFirst"; 218 var pars = 'icdb_id=' + icdb_id; 219 var MyAjax = new Ajax.Request(postURL, {method: 'post', parameters: pars, asynchronous:false, onFailure:alertAjaxError}); 220 var strHTML = MyAjax.transport.responseText; 221 $('dcontent').innerHTML = strHTML; 222} 223 224function reloadPage(){ 225 location.reload(true); 226} 227 228function showSetStatusWindow(seeStatus){ 229 var url = '/index.php?controller=icdb&action=setseestatus'; 230 var data = {'icdb_id': icdbIdForJs, 'seeStatus': seeStatus}; 231 var res = $.ajax({'url': url, data: data, type: 'POST', async: false}).responseText; 232 if(res == '1'){ 233 if((seeStatus == 1) || (seeStatus == 3)){ 234 //¼ì²éÒ»ÏÂÓû§ÎªÕâ¸ö¶¯Âþ´ò·Ö¹ýûÓÐ 235 url = '/index.php?controller=icdb&action=checkvote&icdb_id='+icdbIdForJs; 236 var flag_vote = $.ajax({'url': url, data: {}, type: 'GET', async: false}).responseText; 237 if(flag_vote == '0'){ 238 if(confirm('Îҵ͝Âþ״̬ÉèÖóɹ¦£¬ÄúÊÇ·ñÔ¸ÒâΪ¸Ã¶¯Âþ´ò·Ö£¿')){ 239 showVoteWindow(icdbIdForJs); 240 return; 241 } 242 } 243 } 244 alert('Îҵ͝Âþ״̬ÉèÖóɹ¦£¬Ò³Ãæ½«ÖØÐÂÔØÈë¡£'); 245 location.reload(); 246 } 247 248} 249 250function postTags(win){ 251 //OK ¿ªÊ¼Ìù±êÇ© 252 var postURL = 'http://www.acwind.net/admin/index.php?ctl=Icdb&act=PostTags'; 253 var tag1 = $F('tag1'); 254 var tag2 = $F('tag2'); 255 var tag3 = $F('tag3'); 256 var pars = 'icdb_id='+icdbIdForJs+'&tag1='+tag1+'&tag2='+tag2+'&tag3='+tag3; 257 var MyAjax = new Ajax.Request(postURL, {method: 'post', parameters: pars, asynchronous:false, onFailure:alertAjaxError}); 258 Dialog.alert("¸üбêÇ©Íê³É£¬Çëµã»÷È·¶¨°´Å¥Ë¢ÐÂÒ³Ãæ¡£",{className:"alphacube", width:500, okLabel:'È·¶¨', onOk:reloadPage}); 259} 260 261 262 263$(document).ready(function(){ 264 $("img[id^='star']").hover( 265 function(){ 266 var index = (this.id).substring(5, this.id.length); 267 for(var i = 1; i <= 10; i++){ 268 if(i <= index){ 269 $('#star_'+i).attr({src:'http://icdb-images.b0.upaiyun.com/cache/star.gif'}); 270 } else{ 271 $('#star_'+i).attr({src:'http://icdb-images.b0.upaiyun.com/cache/star_g.gif'}); 272 } 273 } 274 }, 275 function(){ 276 for(var i = 1; i <= 10; i++){ 277 $('#star_'+i).attr({src: $('#star_'+i).attr('original')}); 278 } 279 } 280 ); 281});
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.