1// ã¤ãã³ã追å (common.jsãå¿ è¦) 2addEvent( 0, function(){ initLeagueRanking() }); 3 4 5var league_ranking; 6 7var DispPageKind; // 表示ãã¼ã¸ç¨®å¥ 8var MyCityCode; 9var LeagueDispNum; 10var LeagueDispMode; 11var LeagueHeadDispPos; 12var ReturnURL; 13 14function initLeagueRanking() 15{ 16 // LeagueHeadDispPos夿°ã¨ReturnURL夿°ã«ãã©ã¡ã¼ã¿ããæ ¼ç´ 17 if( DispPageKind == 1 ) // ã©ã³ãã³ã°ãã¼ã¸ 18 { 19 onLoadLeagueRankingHtml(); 20 // æ å ±ãåå¾ãã 21 GetDispLeagueRanking( 0, LeagueDispNum, LeagueDispMode, LeagueHeadDispPos, 0, 0 ); 22 } 23 else // å¸çºæãã¼ã¸ 24 { 25 // æ å ±ãåå¾ãã 26 GetDispLeagueRanking( MyCityCode, LeagueDispNum, LeagueDispMode, LeagueHeadDispPos, 0, 0 ); 27 } 28} 29 30function MoveDispLeagueRanking( pMode ) 31{ 32 if( pMode == 1 ) 33 { 34 if( LeagueHeadDispPos < 10 ) 35 { 36 LeagueHeadDispPos = 0; 37 } 38 else 39 { 40 LeagueHeadDispPos -= 10; 41 } 42 } 43 else 44 { 45 if( LeagueHeadDispPos > 1781 ) 46 { 47 LeagueHeadDispPos = 1792; 48 } 49 else 50 { 51 LeagueHeadDispPos += 10; 52 } 53 } 54 // æ å ±ãåå¾ãã 55 GetDispLeagueRanking( 0, LeagueDispNum, LeagueDispMode, LeagueHeadDispPos, 0, 0 ); 56} 57 58// league_ranking.html表示æã«ãã©ã¡ã¼ã¿ããæ°å¤ãæ½åºãã 59function onLoadLeagueRankingHtml() 60{ 61 try{ 62 var paramArray = new Array(); 63 if (location.search.length > 1) 64 { 65 var list = location.search.substr( 1 ).split( "&" ); 66 paramArray[0] = list[0].split( "=" ); 67 paramArray[1] = list[1].split( "=" ); 68 } 69 else 70 { 71 LeagueHeadDispPos = 0; 72 ReturnURL = "https://patmap.jp/CITY/"; 73 } 74 75 // å¿ ãé çªã«ãã¦ããã㨠76 var code; 77 var page; 78 var pos = 0; 79 if( paramArray[0][0] = "pos" ) 80 { 81 pos = paramArray[0][1]; 82 } 83 if( paramArray[1][0] = "page" ) 84 { 85 page = paramArray[1][1]; 86 } 87 88 if ( ( 0 <= pos ) && ( pos < 150 ) ){ LeagueHeadDispPos = 0; } 89 else if( ( 150 <= pos ) && ( pos < 300 ) ){ LeagueHeadDispPos = 150; } 90 else if( ( 300 <= pos ) && ( pos < 450 ) ){ LeagueHeadDispPos = 300; } 91 else if( ( 450 <= pos ) && ( pos < 600 ) ){ LeagueHeadDispPos = 450; } 92 else if( ( 600 <= pos ) && ( pos < 750 ) ){ LeagueHeadDispPos = 600; } 93 else if( ( 750 <= pos ) && ( pos < 900 ) ){ LeagueHeadDispPos = 750; } 94 else if( ( 900 <= pos ) && ( pos < 1050 ) ){ LeagueHeadDispPos = 900; } 95 else if( ( 1050 <= pos ) && ( pos < 1200 ) ){ LeagueHeadDispPos = 1050; } 96 else if( ( 1200 <= pos ) && ( pos < 1350 ) ){ LeagueHeadDispPos = 1200; } 97 else if( ( 1350 <= pos ) && ( pos < 1500 ) ){ LeagueHeadDispPos = 1350; } 98 else if( ( 1500 <= pos ) && ( pos < 1650 ) ){ LeagueHeadDispPos = 1500; } 99 else if( ( 1650 <= pos ) && ( pos < 1900 ) ){ LeagueHeadDispPos = 1650; } 100 101 ReturnURL = "https://patmap.jp" + page; 102 } 103 catch(e){ 104 LeagueHeadDispPos = 0; 105 ReturnURL = "https://patmap.jp/CITY/"; 106 } 107} 108function ReturnPage() 109{ 110 // ReturnURLã®ã¹ã©ãã·ã¥ã"%2F"ã«ãªã£ã¦ããå ´åãããã®ã§URLãã³ã¼ããã 111 ReturnURL = decodeURIComponent( ReturnURL ); 112 113 location.href = ReturnURL; 114} 115 116function OnClickLeagueRankingHtml(pUrl) 117{ 118 location.href = "../../db/league/league_ranking.php?pos=" + LeagueHeadDispPos + "&page=" + pUrl + "&code=" + MyCityCode + "&kencode=0&othersort=0"; 119} 120 121 122function StartGame(code, ret, page, game) 123{ 124 location.href = "../../db/league/league.php?code=" + code + "&ret=" + ret + "&page=" + page + "&game=" + game; 125 126} 127 128function OnClickLeagueRankingHtmlForTop(pUrl) 129{ 130 location.href = "db/league/league_ranking.php?pos=" + LeagueHeadDispPos + "&page=" + pUrl + "&code=" + MyCityCode + "&kencode=0&othersort=0"; 131} 132 133 134function StartGameForTop(code, ret, page, game) 135{ 136 location.href = "db/league/league.php?code=" + code + "&ret=" + ret + "&page=" + page + "&game=" + game; 137 138} 139 140// pCode:èªæ²»ä½ã³ã¼ããæå®ããå ´åã¯æå®ãæå®ããªãå ´åã¯ç©º 141// pDispNumï¼è¡¨ç¤ºããä»¶æ° 142// pDispModeï¼å®å ¨ã¢ã¼ããªãï¼ãç°¡æã¢ã¼ããªã0 143// pHeadDispPosï¼è¡¨ç¤ºå é ä½ç½® 144// pKenCode:çå¥è¡¨ç¤ºã«ããï¼çã³ã¼ãæå®ç¨ï¼ 145// pOtherSort:ã½ã¼ã種å¥ãå¤ãã 146function GetDispLeagueRanking( pCode, pDispNum, pDispMode, pHeadDispPos, pKenCode, pOtherSort) 147{ 148 149 league_ranking = document.getElementById("league_ranking"); 150 151 var url = "https://patmap.jp/CITY/db/league/rankinglist.php"; 152 var paramList = "code=" + pCode + "&num=" + pDispNum + "&offset=1" + "&headpos=" + pHeadDispPos + "&kencode=" + pKenCode + "&othersort=" + pOtherSort; 153 154 new Ajax.Request(url, 155 { 156 method: 'post', 157 onSuccess: getData, 158 onFailure: ErrData, 159 parameters: paramList 160 }); 161 162 function getData(data) 163 { 164 // ===================XMLè¦ç´ æãåºã=================== 165 var response = data.responseXML.getElementsByTagName('Response'); 166 var item = response[0].getElementsByTagName('Item'); 167 168 // ===================ãã¼ãã«ã¿ã°ã®è¦ç´ çæ============= 169 var tagTable = document.createElement( 'table' ); 170 if( LeagueDispMode == 1 ) 171 { 172 tagTable.className = "league_rank_full_list"; // CSSã®ã¯ã©ã¹ 173 } 174 else 175 { 176 tagTable.className = "league_rank_mini_list"; // CSSã®ã¯ã©ã¹ 177 } 178 // TBODYè¦ç´ ãçæãã 179 var tagTbody = document.createElement( 'tbody' ); 180 tagTable.appendChild( tagTbody ); 181 182 for(i = 0; i < item.length; i++) 183 { 184 if( LeagueDispMode == 1 ) 185 { 186 // 30è¡ã«1åãããè¡ãæ¿å ¥ 187 if( i % 30 == 0 ) 188 { 189 // ãããè¡çæ 190 MakeHeaderRow(); 191 } 192 } 193 else 194 {
195 // ä¸çªä¸ã ããããè¡ãæ¿å ¥ 196 if( i == 0 ) 197 { 198 // ãããè¡çæ 199 MakeHeaderRow(); 200 } 201 } 202 // =============XMLè¦ç´ æãåºã======================= 203 var ele_rank = item[i].getElementsByTagName('rank'); 204 var rankValue = parseInt( ele_rank[0].firstChild.nodeValue ); 205 206 // å é ã®ã¿é ä½ã表示ä½ç½®ã¨ãã¦è¨æ¶ãã 207 if( i == 0 ) 208 { 209 LeagueHeadDispPos = rankValue - 1; 210 } 211 212 var ele_GAMENUM = item[i].getElementsByTagName('GAMENUM'); 213 var GAMENUMValue = parseInt( ele_GAMENUM[0].firstChild.nodeValue ); 214 215 var ele_first_p = item[i].getElementsByTagName('first_p'); 216 var first_pValue = parseInt( ele_first_p[0].firstChild.nodeValue ); 217 218 var ele_FIRSTPLACE = item[i].getElementsByTagName('FIRSTPLACE'); 219 var FIRSTPLACEValue = parseInt( ele_FIRSTPLACE[0].firstChild.nodeValue ); 220 221 var ele_SECONDPLACE = item[i].getElementsByTagName('SECONDPLACE'); 222 var SECONDPLACEValue = parseInt( ele_SECONDPLACE[0].firstChild.nodeValue ); 223 224 var ele_THIRDPLACE = item[i].getElementsByTagName('THIRDPLACE'); 225 var THIRDPLACEValue = parseInt( ele_THIRDPLACE[0].firstChild.nodeValue ); 226 227 var ele_FOURPLACE = item[i].getElementsByTagName('FOURPLACE'); 228 var FOURPLACEValue = parseInt( ele_FOURPLACE[0].firstChild.nodeValue ); 229 230 var ele_POINTNUM = item[i].getElementsByTagName('POINTNUM'); 231 var POINTNUMValue = parseInt( ele_POINTNUM[0].firstChild.nodeValue ); 232 233 var ele_city_name = item[i].getElementsByTagName('city_name'); 234 var city_nameValue = ele_city_name[0].firstChild.nodeValue; 235 236 var ele_city_code = item[i].getElementsByTagName('code'); 237 var city_codeValue = parseInt( ele_city_code[0].firstChild.nodeValue ); 238 239 var ele_BASEURL = item[i].getElementsByTagName('BASEURL'); 240 var BASEURLValue = ele_BASEURL[0].firstChild.nodeValue; 241 242 // ================================================= 243 244 // åã¡ç¹ 245 var winPoint = first_pValue + FIRSTPLACEValue * 3 + SECONDPLACEValue * 2 + THIRDPLACEValue; 246 247 // å¹³ååã¡ç¹ 248 var aveWinPoint = Math.round((FIRSTPLACEValue * 3 + SECONDPLACEValue * 2 + THIRDPLACEValue) / GAMENUMValue * 100) / 100; 249 250 // å¹³åãã¤ã³ã 251 var avePoint = Math.round(POINTNUMValue / GAMENUMValue * 100) / 100; 252 253 254 // ============ãã¼ãã«ã®è¡åè¦ç´ ã«ãã»ãã========== 255 // XMLããæãåºããå¤ããã¼ãã«ã«è¨å® 256 var tagTr = document.createElement("tr"); 257 258 // èªèº«ã®å¸çºæã³ã¼ãã®å ´åã¯ã¯ã©ã¹åãä»å 259 if( MyCityCode == city_codeValue ) 260 { 261 tagTr.className = "MyCityTableRow"; // CSSã®ã¯ã©ã¹ 262 } 263 264 if( LeagueDispMode == 1 ) 265 { 266 var tagTd = document.createElement('td'); 267 tagTd.appendChild( document.createTextNode( rankValue ) ); 268 tagTr.appendChild( tagTd ); 269 tagTd = document.createElement('td'); 270 if(BASEURLValue.length > 1) { 271 //èªæ²»ä½åã®ã»ã«ã«ã¤ãã¦ã¯<a>è¦ç´ ãçæãã¦è¨å® 272 var anchor = document.createElement('a'); 273 anchor.href = BASEURLValue; 274 anchor.appendChild(document.createTextNode(city_nameValue)); 275 tagTd.appendChild(anchor); 276 } 277 else { 278 tagTd.appendChild( document.createTextNode( city_nameValue ) ); 279 } 280 tagTr.appendChild( tagTd ); 281 tagTd = document.createElement('td'); 282 tagTd.appendChild( document.createTextNode( winPoint ) ); 283 tagTr.appendChild( tagTd ); 284 tagTd = document.createElement('td'); 285 tagTd.appendChild( document.createTextNode( GAMENUMValue ) ); 286 tagTr.appendChild( tagTd ); 287 tagTd = document.createElement('td'); 288 tagTd.appendChild( document.createTextNode( POINTNUMValue ) ); 289 tagTr.appendChild( tagTd ); 290 tagTd = document.createElement('td'); 291 tagTd.appendChild( document.createTextNode( aveWinPoint ) ); 292 tagTr.appendChild( tagTd ); 293 tagTd = document.createElement('td'); 294 tagTd.appendChild( document.createTextNode( avePoint ) ); 295 tagTr.appendChild( tagTd ); 296 tagTd = document.createElement('td'); 297 tagTd.appendChild( document.createTextNode( FIRSTPLACEValue ) ); 298 tagTr.appendChild( tagTd ); 299 tagTd = document.createElement('td'); 300 tagTd.appendChild( document.createTextNode( SECONDPLACEValue ) ); 301 tagTr.appendChild( tagTd ); 302 tagTd = document.createElement('td'); 303 tagTd.appendChild( document.createTextNode( THIRDPLACEValue ) ); 304 tagTr.appendChild( tagTd ); 305 tagTd = document.createElement('td'); 306 tagTd.appendChild( document.createTextNode( FOURPLACEValue ) ); 307 tagTr.appendChild( tagTd ); 308 tagTd = document.createElement('td'); 309 tagTd.appendChild( document.createTextNode( first_pValue ) ); 310 tagTr.appendChild( tagTd ); 311 tagTbody.appendChild( tagTr ); 312 } 313 else 314 {
315 var tagTd = document.createElement('td'); 316 tagTd.appendChild( document.createTextNode( rankValue ) ); 317 tagTr.appendChild( tagTd ); 318 tagTd = document.createElement('td'); 319 if(BASEURLValue.length > 1) { 320 //èªæ²»ä½åã®ã»ã«ã«ã¤ãã¦ã¯<a>è¦ç´ ãçæãã¦è¨å® 321 var anchor = document.createElement('a'); 322 anchor.href = BASEURLValue; 323 anchor.appendChild(document.createTextNode(city_nameValue)); 324 tagTd.appendChild(anchor); 325 } 326 else { 327 tagTd.appendChild( document.createTextNode( city_nameValue ) ); 328 } 329 tagTr.appendChild( tagTd ); 330 tagTd = document.createElement('td'); 331 tagTd.appendChild( document.createTextNode( winPoint ) ); 332 tagTr.appendChild( tagTd ); 333 tagTd = document.createElement('td'); 334 tagTd.appendChild( document.createTextNode( aveWinPoint ) ); 335 tagTr.appendChild( tagTd ); 336 tagTbody.appendChild( tagTr ); 337 } 338 339 } 340 341 // æå¾ã«ããããè¡çæ 342 if( LeagueDispMode == 1 ) 343 { 344 MakeHeaderRow(); 345 } 346 347 //æ¢ã«åå表示ã®ãã¼ãã«ãããå ´åã¯åé¤ 348 var childs = league_ranking.childNodes; 349 if( childs.length > 0 ) 350 { 351 var child = childs[0]; 352 league_ranking.removeChild(child); 353 } 354 // 表示ä½ç½®ã«è¨å® 355 league_ranking.appendChild( tagTable ); 356 357 // ãããç¨ã®è¡ãçæãã 358 function MakeHeaderRow() 359 { 360 var tagTr = document.createElement("tr"); 361 if( LeagueDispMode == 1 ) 362 { 363 var tagTh = document.createElement('th'); 364 tagTh.appendChild( document.createTextNode('é ä½') ); 365 tagTh.className = "league_rank_all_list_a1"; 366 tagTr.appendChild( tagTh ); 367 tagTh = document.createElement('th'); 368 tagTh.appendChild( document.createTextNode('èªæ²»ä½å') ); 369 tagTh.className = "league_rank_all_list_a2"; 370 tagTr.appendChild( tagTh ); 371 tagTh = document.createElement('th'); 372 tagTh.appendChild( document.createTextNode('åã¡ç¹') ); 373 tagTh.className = "league_rank_all_list_a3"; 374 tagTr.appendChild( tagTh ); 375 tagTh = document.createElement('th'); 376 tagTh.appendChild( document.createTextNode('è©¦åæ°') ); 377 tagTh.className = "league_rank_all_list_a4"; 378 tagTr.appendChild( tagTh ); 379 tagTh = document.createElement('th'); 380 tagTh.appendChild( document.createTextNode('ãã¤ã³ã') ); 381 tagTh.className = "league_rank_all_list_a5"; 382 tagTr.appendChild( tagTh ); 383 tagTh = document.createElement('th'); 384 tagTh.appendChild( document.createTextNode('å¹³ååã¡ç¹') ); 385 tagTh.className = "league_rank_all_list_a6"; 386 tagTr.appendChild( tagTh ); 387 tagTh = document.createElement('th'); 388 tagTh.appendChild( document.createTextNode('å¹³åãã¤ã³ã') ); 389 tagTh.className = "league_rank_all_list_a7"; 390 tagTr.appendChild( tagTh ); 391 tagTh = document.createElement('th'); 392 tagTh.appendChild( document.createTextNode('ä¸ä½æ°') ); 393 tagTh.className = "league_rank_all_list_a8"; 394 tagTr.appendChild( tagTh ); 395 tagTh = document.createElement('th'); 396 tagTh.appendChild( document.createTextNode('äºä½æ°') ); 397 tagTh.className = "league_rank_all_list_a9"; 398 tagTr.appendChild( tagTh ); 399 tagTh = document.createElement('th'); 400 tagTh.appendChild( document.createTextNode('ä¸ä½æ°') ); 401 tagTh.className = "league_rank_all_list_a10"; 402 tagTr.appendChild( tagTh ); 403 tagTh = document.createElement('th'); 404 tagTh.appendChild( document.createTextNode('å使°') ); 405 tagTh.className = "league_rank_all_list_a11"; 406 tagTr.appendChild( tagTh ); 407 tagTh = document.createElement('th'); 408 tagTh.appendChild( document.createTextNode('åæç¹') ); 409 tagTh.className = "league_rank_all_list_a12"; 410 tagTr.appendChild( tagTh ); 411 tagTbody.appendChild( tagTr ); 412 } 413 else 414 { 415 var tagTh = document.createElement('th'); 416 tagTh.appendChild( document.createTextNode('é ä½') ); 417 tagTh.className = "league_rank_all_list_b1"; 418 tagTr.appendChild( tagTh ); 419 tagTh = document.createElement('th'); 420 tagTh.appendChild( document.createTextNode('èªæ²»ä½å') ); 421 tagTh.className = "league_rank_all_list_b2"; 422 tagTr.appendChild( tagTh ); 423 tagTh = document.createElement('th'); 424 tagTh.appendChild( document.createTextNode('åã¡ç¹') ); 425 tagTh.className = "league_rank_all_list_b3"; 426 tagTr.appendChild( tagTh ); 427 tagTh = document.createElement('th'); 428 tagTh.appendChild( document.createTextNode('å¹³ååã¡ç¹') ); 429 tagTh.className = "league_rank_all_list_b4"; 430 tagTr.appendChild( tagTh ); 431 tagTbody.appendChild( tagTr ); 432 } 433 } 434 435 } 436 437 function ErrData(data) 438 { 439 // å©ç¨ã§ãã¾ããã 440 league_ranking.innerHTML( "表示失æ" ); 441 } 442} 443
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.