1// Oggetti JavaScript per Tabellini Risultati 2 3/********************************** 4*********** COSTRUTTORI *********** 5***********************************/ 6// Costruttore dell'oggetto Tabellino (abbreviato T) 7function T(IDIncontro,IDSquadra,IDLega,Lista,ListaSqA,Ruolo,Voto,Modif,Tot,Supplementari,ListaSupplementari,VotoSupplementari,TotaleSquadraSupplementari,FattoreCampoSupplementari,GolSupplementari,Rigori,ListaRigori,VotoRigori,GolRigori,ParzialeSquadra,FattoreCampo,ModPortiere,ModDifesa,ModCentrocampo,ModAttacco,ModModulo,ModM1Pers,ModM2Pers,ModM3Pers,TotaleSquadra,Gol) { 8 this.IDIncontro = IDIncontro 9 this.IDSquadra = IDSquadra 10 this.IDLega = IDLega 11 this.Lista = Lista 12 //lista dei giocatori indicati in ordine 13 // come appaiono nel tabellino. I primi 11, 14 // quindi, sono i titolari. I valori sono separati 15 // dal carattere % 16 // i valori possono essere: 17 // IDGiocatore: se c'e' un giocatore, c'e' il suo ID 18 // -1: se e' una RU 19 // 0: se e' assente 20 // dal 12esimo in poi proseguono con panchina e tribuna: 21 // in questi ultimi non ci sono 0 o -1 quindi sono solo 22 // IDGiocatore: se positivo allora e' panchina oppure giocatore 23 // sostituito, se negativo e' tribuna 24 this.ListaSqA = ListaSqA 25 this.Ruolo = Ruolo 26 // come Lista, valori separati da % per i ruoli dei giocatori 27 // 1,2,3,4: PORT, DIFE, CENT, ATTA "normali", oppure RU 28 // 5,6,7,8: Riserve (p,d,c,a) {se nei primi 11, entrata, altrimenti riserva non entrata} 29 // 0: assente 30 // -1,-2,-3,-4: (solo "sostituiti"): giocatori che sono stati "sostituiti" 31 // -5,-6,-7,-8: tribuna (p,d,c,a) 32 this.Voto = Voto 33 // valori separati da % contenenti i voti dei giocatori 34 this.Modif = Modif 35 // valori separati da % contenenti i modificatori dei giocatori 36 this.Tot = Tot 37 // valori separati da % contenenti i totali dei giocatori 38 this.Supplementari = Supplementari 39 this.ListaSupplementari = ListaSupplementari // separati da %, se -1 e' una ru, se 0 assente 40 this.VotoSupplementari = VotoSupplementari // separati da %, 41 this.TotaleSquadraSupplementari = TotaleSquadraSupplementari 42 this.FattoreCampoSupplementari = FattoreCampoSupplementari 43 this.GolSupplementari = GolSupplementari 44 45 this.Rigori = Rigori 46 this.ListaRigori = ListaRigori // separati da %, 47 //vale -1 se RU, 0 se assente, altrimenti l'id del giocatore 48 this.VotoRigori = VotoRigori // separati da %, 49 this.GolRigori = GolRigori 50 51 this.ParzialeSquadra = ParzialeSquadra // Se "non esiste" allora vale "x" 52 this.FattoreCampo = FattoreCampo // Se "non esiste" allora vale "x" 53 this.ModPortiere = ModPortiere // Se "non esiste" allora vale "x" 54 this.ModDifesa = ModDifesa // Se "non esiste" allora vale "x" 55 this.ModCentrocampo = ModCentrocampo // Se "non esiste" allora vale "x" 56 this.ModAttacco = ModAttacco // Se "non esiste" allora vale "x" 57 this.ModModulo = ModModulo // Se "non esiste" allora vale "x" 58 this.ModM1Pers = ModM1Pers // Se "non esiste" allora vale "x" 59 this.ModM2Pers = ModM2Pers // Se "non esiste" allora vale "x" 60 this.ModM3Pers = ModM3Pers // Se "non esiste" allora vale "x" 61 this.TotaleSquadra = TotaleSquadra // Se "non esiste" allora vale "x" 62 this.Gol = Gol // Se "non esiste" allora vale "x" 63} 64 65function GetTabellino(IDIncontro,IDSquadra,IDLega) { 66// scorre la lista delle formazioni e ritorna tutte quelle che 67// hanno i tre valori corrispondenti. Quindi le ordina per pos 68// mettendo pero' quelli con -1 alla fine e non all'inizio 69var t = new T() 70var i=1,cnt=1 71var tipo,pPrimo,pUltimo,trovato=false 72 while ((trovato==false) && (i<arrTabellini.length)) { 73 if ((arrTabellini[i].IDIncontro==IDIncontro) && (arrTabellini[i].IDSquadra==IDSquadra) && (arrTabellini[i].IDLega==IDLega)) { 74 trovato=true 75 t=arrTabellini[i] 76 } 77 i++ 78 } 79 return t 80} 81 82function GeneraRisultati(cGio,cComp) { 83var arrI = new Array() 84var t = new T() 85var tabe = new Object() 86var str="",i,j 87var ruolo,pd,colore 88var mostra 89 if (SezioniChiuse=="no") { 90 mostra="" 91 } else { 92 mostra="display: none; " 93 } 94 arrI = RiempiListaIncontri(cGio,cComp) 95 // per ogni incontro 96 // 1- apri un layer 97 // 2- crea la tabella 98 for (i=1;i<arrI.length;i++) { 99 // layer di intestazione 100 document.write("<div id='lay"+arrI[i].ID+"H' class='intest-layer'><a href='#' onClick='invertiDisplayLayer(\"lay"+arrI[i].ID+"\")'>"+arrI[i].Nomi.Casa+((arrI[i].IDTipo==INC_GRANPREMIO)?"":" - "+arrI[i].Nomi.Fuori)+"</a></div>") 101 // layer di contenuti 102 document.write("<div id='lay"+arrI[i].ID+"' style='" + mostra + " height=100%'>") 103 // tabella che contiene gli incontri 104 document.write("<center><table width='95%' border=0 cellpadding=0 cellspacing=0><tr><td height='20' colspan="+((arrI[i].IDTipo==INC_GRANPREMIO)?"1":"2")+" align='center'>") 105 document.write("<span class='testo-rosso-bold-cx'>"+arrI[i].Competizione+": "+arrI[i].Fantagiornata+"</span></td></tr>") 106 // riga inferiore 107 document.write("<tr>") 108 // tabella di sinistra (o unica se gran premio) 109 document.write("<td width='"+((arrI[i].IDTipo==INC_GRANPREMIO)?"100":"50")+"%' align='center' valign='top'>") 110 // tabella casa 111 tabe=null 112 tabe=new Tabella(1,6) 113 t=GetTabellino(arrI[i].ID,arrI[i].IDSquadre.Casa,arrI[i].IDLegaSquadre.Casa) 114 tabe=RiempiTabellaTabellino(tabe,t,arrI[i].Nomi.Casa) 115 tabe.Stampa() 116 document.write("</td>") 117 if (arrI[i].IDTipo!=INC_GRANPREMIO) { 118 document.write("<td width='50%' align='center' valign='top'>") 119 // tabella fuori 120 tabe=null 121 tabe=new Tabella(1,6) 122 t=GetTabellino(arrI[i].ID,arrI[i].IDSquadre.Fuori,arrI[i].IDLegaSquadre.Fuori) 123 tabe=RiempiTabellaTabellino(tabe,t,arrI[i].Nomi.Fuori) 124 tabe.Stampa() 125 document.write("</td>") 126 } 127 document.write("</tr>") 128 document.write("<tr><td height='20' colspan="+((arrI[i].IDTipo==INC_GRANPREMIO)?"1":"2")+" align='center'></td></tr>") 129 //chiudi tabella degli incontri 130 document.write("</table></center>") 131 // chiudi il layer di contenuti 132 document.write("</div>") 133 } 134} 135 136function RiempiTabellaTabellino(tabe,t,nome) { 137var i,j,pd,colore,ruolo,inseritariga=0,riga=1 138var arrLista = t.Lista.split("%") 139var arrListaSqA = t.ListaSqA.split("%") 140var arrRuolo = t.Ruolo.split("%") 141var arrVoto = t.Voto.split("%") 142var arrModif = t.Modif.split("%") 143var arrTot = t.Tot.split("%") 144var arrListaSupplementari = t.ListaSupplementari.split("%") 145var arrVotoSupplementari = t.VotoSupplementari.split("%") 146var arrListaRigori = t.ListaRigori.split("%") 147var arrVotoRigori = t.VotoRigori.split("%") 148var sqa 149var colvoto 150var neretto 151var s1 152 tabe.nome="Tabellino " + nome 153 tabe.larghezza = 90 154 tabe.border=1 155 tabe.cellspacing=0 156 tabe.cellpadding = 2 157 tabe.stile = "tab-8" 158 // nome della squadra 159 tabe.SetValore(1,1,nome) 160 tabe.SetStile(1,1,"riga-blu") 161 tabe.SetSpan(1,1,6) 162 tabe.SetSpanned(1,2,true) 163 tabe.SetSpanned(1,3,true) 164 tabe.SetSpanned(1,4,true) 165 tabe.SetSpanned(1,5,true) 166 tabe.SetSpanned(1,6,true) 167 tabe.SetLarghezzaColonna(1,5) 168 tabe.SetLarghezzaColonna(2,5) 169 tabe.SetLarghezzaColonna(3,62) 170 tabe.SetLarghezzaColonna(4,10) 171 tabe.SetLarghezzaColonna(5,8)
172 tabe.SetLarghezzaColonna(6,10) 173 //intestazione 174 tabe.SetStileRiga(2,"riga-dispari") 175 tabe.SetStile(2,1,"testo-cx") 176 tabe.SetStile(2,2,"testo-cx") 177// tabe.SetStile(2,3,"testo-cx") 178 tabe.SetStile(2,4,"testo-cx") 179 tabe.SetStile(2,5,"testo-cx") 180 tabe.SetStile(2,6,"testo-cx") 181 tabe.SetValore(2,1,"<span class='testo-bold-cx'>Div</span>") 182 tabe.SetValore(2,2,"<span class='testo-bold-cx'>R</span>") 183 tabe.SetValore(2,3,"<span class='testo-bold'>Nome</span>") 184 tabe.SetValore(2,4,"<span class='testo-bold-cx'>Voto</span>") 185 tabe.SetValore(2,5,"<span class='testo-bold-cx'>Mod</span>") 186 tabe.SetValore(2,6,"<span class='testo-bold-cx'>Tot</span>") 187 //titolari 188 riga=2 189 if (arrLista!="") { 190 for (j=0;j<=10;j++) { 191 //riga=3+j 192 riga++ 193 if ((riga % 2) == 0) { 194 pd="dispari2" 195 } else { 196 pd="pari" 197 } 198 // come Lista, valori separati da % per i ruoli dei giocatori 199 // 1,2,3,4: PORT, DIFE, CENT, ATTA "normali", oppure RU 200 // 5,6,7,8: Riserve (p,d,c,a) {se nei primi 11, entrata, altrimenti riserva non entrata} 201 // 0: assente 202 // -1,-2,-3,-4: (solo "sostituiti"): giocatori che sono stati "sostituiti" 203 // -5,-6,-7,-8: tribuna (p,d,c,a) 204 switch(parseInt(arrRuolo[j])) { 205 case 0: 206 ruolo="-" 207 colore="" 208 neretto="-bold" 209 break 210 case 1: 211 ruolo=(arrLista[j]>0?"P":"PU") 212 colore="oliva" 213 neretto="-bold" 214 break 215 case 2: 216 ruolo=(arrLista[j]>0?"D":"DU") 217 colore="verde" 218 neretto="-bold" 219 break 220 case 3: 221 ruolo=(arrLista[j]>0?"C":"CU") 222 colore="rosso" 223 neretto="-bold" 224 break 225 case 4: 226 ruolo=(arrLista[j]>0?"A":"AU") 227 colore="blu" 228 neretto="-bold" 229 break 230 case 5: 231 ruolo=(j<=10?"PR":"P") 232 colore="oliva" 233 neretto=(j<=10?"-bold":"") 234 break 235 case 6: 236 ruolo=(j<=10?"DR":"D") 237 colore="verde" 238 neretto=(j<=10?"-bold":"") 239 break 240 case 7: 241 ruolo=(j<=10?"CR":"C") 242 colore="rosso" 243 neretto=(j<=10?"-bold":"") 244 break 245 case 8: 246 ruolo=(j<=10?"AR":"A") 247 colore="blu" 248 neretto=(j<=10?"-bold":"") 249 break 250 case -1: 251 ruolo="Ps" 252 colore="oliva" 253 neretto="" 254 break 255 case -2: 256 ruolo="Ds" 257 colore="verde" 258 neretto="" 259 break 260 case -3: 261 ruolo="Cs" 262 colore="rosso" 263 neretto="" 264 break 265 case -4: 266 ruolo="As" 267 colore="blu" 268 neretto="" 269 break 270 case -5: 271 ruolo="" 272 colore="" 273 neretto="" 274 break 275 case -6: 276 ruolo="" 277 colore="" 278 neretto="" 279 break 280 case -7: 281 ruolo="" 282 colore="" 283 neretto="" 284 break 285 case -8: 286 ruolo="" 287 colore="" 288 neretto="" 289 break 290 } 291 // per inserire la riga bianca tra titolari e riserve 292 //if (inseritariga==0 && f[j].Pos>0) { 293 // tabe.SetStileRiga(riga,"Bianco") 294 // tabe.SetValore(riga,1," ") 295 // tabe.SetStile(riga,1,"Bianco") 296 // tabe.SetSpan(riga,1,3) 297 // tabe.SetSpanned(riga,2,true) 298 // tabe.SetSpanned(riga,3,true) 299 // inseritariga=1 300 // riga=1+j+inseritariga 301 //} 302 tabe.SetStileRiga(riga,"riga-bianco") 303 // la maglietta solo per titolari e riserve 304 sqa=(((arrLista[j]==0)||(arrLista[j]==-1)) ?"---":eval("xa"+arrListaSqA[j])) 305 if (!((arrRuolo[j]>=-8 && arrRuolo[j]<=-5) || ((arrLista[j]==0)||(arrLista[j]==-1)))) tabe.SetValore(riga,1,"<img src='img/sq/"+sqa+".gif'>") 306 // come Lista, valori separati da % per i ruoli dei giocatori 307 // 1,2,3,4: PORT, DIFE, CENT, ATTA "normali", oppure RU 308 // 5,6,7,8: Riserve (p,d,c,a) {se nei primi 11, entrata, altrimenti riserva non entrata} 309 // 0: assente 310 // -1,-2,-3,-4: (solo "sostituiti"): giocatori che sono stati "sostituiti" 311 // -5,-6,-7,-8: tribuna (p,d,c,a) 312 // IDGiocatore: se c'e' un giocatore, c'e' il suo ID 313 // -1: se e' una RU 314 // 0: se e' assente 315 if ((arrLista[j]==-1)||(arrLista[j]==0)) tabe.SetValore(riga,1,"<img src='img/spacer.gif' height='32'>") 316 317 tabe.SetStile(riga,1,"riga-bianco") 318 // dati 319 tabe.SetValore(riga,2,"<div class='testo-"+colore+neretto+"-cx'>"+ruolo+"</div>") 320 if (arrLista[j]==0) { 321 tabe.SetValore(riga,3,"<div class='testo-"+colore+neretto+"'>"+"-----------------"+ "</div>") 322 } else if (arrLista[j]==-1) { 323 tabe.SetValore(riga,3,"<div class='testo-"+colore+neretto+"'>"+"Riserva d'ufficio"+ "</div>") 324 } else { 325 tabe.SetValore(riga,3,"<div class='testo-"+colore+neretto+"'>"+(eval("xg"+arrLista[j]))+" ("+sqa+")" + "</div>") 326 } 327 if (arrVoto[j]=="sv/ng") { 328 tabe.SetValore(riga,4,"<div class='testo"+neretto+"-cx'>sv/ng</div>") 329 tabe.SetValore(riga,5,"<div class='testo"+neretto+"-cx'>-</div>") 330 tabe.SetValore(riga,6,"<div class='testo"+neretto+"-cx'>sv/ng</div>") 331 } else { 332 tabe.SetValore(riga,5,"<div class='testo"+neretto+"-cx'>"+arrModif[j]+"</div>") 333 if (ConvToFloat(arrVoto[j])>=6) { 334 tabe.SetValore(riga,4,"<div class='testo-verde"+neretto+"-cx'>"+arrVoto[j]+"</div>") 335 } else { 336 tabe.SetValore(riga,4,"<div class='testo-rosso"+neretto+"-cx'>"+arrVoto[j]+"</div>") 337 } 338 if (ConvToFloat(arrTot[j])>=6) { 339 tabe.SetValore(riga,6,"<div class='testo-verde"+neretto+"-cx'>"+arrTot[j]+"</div>") 340 } else { 341 tabe.SetValore(riga,6,"<div class='testo-rosso"+neretto+"-cx'>"+arrTot[j]+"</div>") 342 } 343 } 344 tabe.SetStile(riga,2,"riga-"+pd) 345 tabe.SetStile(riga,3,"riga-"+pd) 346 tabe.SetStile(riga,4,"riga-"+pd) 347 tabe.SetStile(riga,5,"riga-"+pd) 348 tabe.SetStile(riga,6,"riga-"+pd) 349 // voto,modif,tot 350 } 351 //parziali, totali ecc. 352 if (t.ParzialeSquadra!="x") { 353 riga++ 354 tabe.SetStileRiga(riga,"riga-blu") 355 tabe.SetSpan(riga,1,4) 356 tabe.SetSpanned(riga,2,true) 357 tabe.SetSpanned(riga,3,true) 358 tabe.SetSpanned(riga,4,true) 359 tabe.SetSpan(riga,5,2) 360 tabe.SetSpanned(riga,6,true) 361 tabe.SetStile(riga,1,"testo-dx") 362 tabe.SetValore(riga,1,"Parziale Squadra: ") 363 tabe.SetStile(riga,5,"testo-cx") 364 tabe.SetValore(riga,5,t.ParzialeSquadra) 365 } 366 if (t.FattoreCampo!="x") { 367 riga++ 368// tabe.SetStileRiga(riga,"testo-8") 369 tabe.SetSpan(riga,1,4) 370 tabe.SetSpanned(riga,2,true) 371 tabe.SetSpanned(riga,3,true) 372 tabe.SetSpanned(riga,4,true) 373 tabe.SetSpan(riga,5,2) 374 tabe.SetSpanned(riga,6,true) 375 tabe.SetStile(riga,1,"testo-dx") 376 tabe.SetValore(riga,1,"Fattore Campo: ") 377 tabe.SetStile(riga,5,"testo-cx") 378 tabe.SetValore(riga,5,t.FattoreCampo) 379 } 380 if (t.ModPortiere!="x") { 381 riga++ 382 tabe.SetStileRiga(riga,"testo-oliva") 383 tabe.SetSpan(riga,1,4) 384 tabe.SetSpanned(riga,2,true) 385 tabe.SetSpanned(riga,3,true) 386 tabe.SetSpanned(riga,4,true) 387 tabe.SetSpan(riga,5,2) 388 tabe.SetSpanned(riga,6,true) 389 tabe.SetStile(riga,1,"testo-dx") 390 tabe.SetValore(riga,1,"Modificatore Portiere: ") 391 tabe.SetStile(riga,5,"testo-cx") 392 tabe.SetValore(riga,5,t.ModPortiere) 393 } 394 if (t.ModDifesa!="x") { 395 riga++ 396 tabe.SetStileRiga(riga,"testo-verde") 397 tabe.SetSpan(riga,1,4) 398 tabe.SetSpanned(riga,2,true) 399 tabe.SetSpanned(riga,3,true) 400 tabe.SetSpanned(riga,4,true) 401 tabe.SetSpan(riga,5,2) 402 tabe.SetSpanned(riga,6,true) 403 tabe.SetStile(riga,1,"testo-dx") 404 tabe.SetValore(riga,1,"Modificatore Difesa: ") 405 tabe.SetStile(riga,5,"testo-cx") 406 tabe.SetValore(riga,5,t.ModDifesa) 407 } 408 if (t.ModCentrocampo!="x") { 409 riga++ 410 tabe.SetStileRiga(riga,"testo-rosso") 411 tabe.SetSpan(riga,1,4) 412 tabe.SetSpanned(riga,2,true) 413 tabe.SetSpanned(riga,3,true) 414 tabe.SetSpanned(riga,4,true) 415 tabe.SetSpan(riga,5,2) 416 tabe.SetSpanned(riga,6,true) 417 tabe.SetStile(riga,1,"testo-dx") 418 tabe.SetValore(riga,1,"Modificatore Centrocampo: ") 419 tabe.SetStile(riga,5,"testo-cx") 420 tabe.SetValore(riga,5,t.ModCentrocampo) 421 } 422 if (t.ModAttacco!="x") { 423 riga++ 424 tabe.SetStileRiga(riga,"testo-blu") 425 tabe.SetSpan(riga,1,4) 426 tabe.SetSpanned(riga,2,true) 427 tabe.SetSpanned(riga,3,true) 428 tabe.SetSpanned(riga,4,true) 429 tabe.SetSpan(riga,5,2) 430 tabe.SetSpanned(riga,6,true) 431 tabe.SetStile(riga,1,"testo-dx") 432 tabe.SetValore(riga,1,"Modificatore Attacco: ") 433 tabe.SetStile(riga,5,"testo-cx") 434 tabe.SetValore(riga,5,t.ModAttacco) 435 } 436 if (t.ModModulo!="x") { 437 riga++ 438 tabe.SetStileRiga(riga,"riga-dispari") 439 tabe.SetSpan(riga,1,4) 440 tabe.SetSpanned(riga,2,true) 441 tabe.SetSpanned(riga,3,true) 442 tabe.SetSpanned(riga,4,true) 443 tabe.SetSpan(riga,5,2) 444 tabe.SetSpanned(riga,6,true) 445 tabe.SetStile(riga,1,"testo-dx") 446 tabe.SetValore(riga,1,"Modificatore Modulo: ") 447 tabe.SetStile(riga,5,"testo-cx") 448 tabe.SetValore(riga,5,t.ModModulo) 449 } 450 if (t.ModM1Pers!="x") { 451 riga++ 452 tabe.SetStileRiga(riga,"riga-pari") 453 tabe.SetSpan(riga,1,4) 454 tabe.SetSpanned(riga,2,true) 455 tabe.SetSpanned(riga,3,true) 456 tabe.SetSpanned(riga,4,true) 457 tabe.SetSpan(riga,5,2) 458 tabe.SetSpanned(riga,6,true) 459 tabe.SetStile(riga,1,"testo-dx") 460 tabe.SetValore(riga,1,"Mod Pers 1: ") 461 tabe.SetStile(riga,5,"testo-cx") 462 tabe.SetValore(riga,5,t.ModM1Pers) 463 } 464 if (t.ModM2Pers!="x") { 465 riga++ 466 tabe.SetStileRiga(riga,"riga-dispari") 467 tabe.SetSpan(riga,1,4) 468 tabe.SetSpanned(riga,2,true) 469 tabe.SetSpanned(riga,3,true) 470 tabe.SetSpanned(riga,4,true) 471 tabe.SetSpan(riga,5,2) 472 tabe.SetSpanned(riga,6,true) 473 tabe.SetStile(riga,1,"testo-dx") 474 tabe.SetValore(riga,1,"Mod Pers 2: ") 475 tabe.SetStile(riga,5,"testo-cx") 476 tabe.SetValore(riga,5,t.ModM2Pers) 477 } 478 if (t.ModM3Pers!="x") { 479 riga++ 480 tabe.SetStileRiga(riga,"riga-pari") 481 tabe.SetSpan(riga,1,4) 482 tabe.SetSpanned(riga,2,true) 483 tabe.SetSpanned(riga,3,true) 484 tabe.SetSpanned(riga,4,true) 485 tabe.SetSpan(riga,5,2) 486 tabe.SetSpanned(riga,6,true) 487 tabe.SetStile(riga,1,"testo-dx") 488 tabe.SetValore(riga,1,"Mod Pers 3: ") 489 tabe.SetStile(riga,5,"testo-cx") 490 tabe.SetValore(riga,5,t.ModM3Pers) 491 } 492 if (t.TotaleSquadra!="x") { 493 riga++ 494 tabe.SetStileRiga(riga,"riga-blu") 495 tabe.SetSpan(riga,1,4) 496 tabe.SetSpanned(riga,2,true) 497 tabe.SetSpanned(riga,3,true) 498 tabe.SetSpanned(riga,4,true) 499 tabe.SetSpan(riga,5,2) 500 tabe.SetSpanned(riga,6,true) 501 tabe.SetStile(riga,1,"testo-dx") 502 tabe.SetValore(riga,1,"Totale Squadra: ") 503 tabe.SetStile(riga,5,"testo-cx") 504 tabe.SetValore(riga,5,t.TotaleSquadra) 505 } 506 if (t.Gol!="x") { 507 riga++ 508 tabe.SetStileRiga(riga,"riga-orange") 509 tabe.SetSpan(riga,1,4) 510 tabe.SetSpanned(riga,2,true) 511 tabe.SetSpanned(riga,3,true) 512 tabe.SetSpanned(riga,4,true) 513 tabe.SetSpan(riga,5,2) 514 tabe.SetSpanned(riga,6,true) 515 tabe.SetStile(riga,1,"testo-dx") 516 tabe.SetValore(riga,1,"Gol: ") 517 tabe.SetStile(riga,5,"testo-cx") 518 tabe.SetValore(riga,5,t.Gol) 519 } 520 // tempi supplementari 521 if (t.Supplementari==1) { 522 riga++ 523 tabe.SetStileRiga(riga,"riga-bianco") 524 tabe.SetSpan(riga,1,6) 525 for (j=2;j<=6;j++) tabe.SetSpanned(riga,j,true) 526 527 riga++ 528 tabe.SetStileRiga(riga,"riga-blu") 529 tabe.SetSpan(riga,1,6) 530 for (j=2;j<=6;j++) tabe.SetSpanned(riga,j,true) 531 tabe.SetValore(riga,1,"Tempi Supplementari") 532 //d 533 riga++ 534 tabe.SetStileRiga(riga,"riga-dispari") 535 tabe.SetSpan(riga,3,2) 536 tabe.SetSpanned(riga,4,true) 537 tabe.SetSpan(riga,5,2) 538 tabe.SetSpanned(riga,6,true) 539 tabe.SetStile(riga,1,"riga-bianco") 540 tabe.SetValore(riga,1," ") 541 tabe.SetStile(riga,2,"testo-cx") 542 tabe.SetValore(riga,2,"<span class='testo-verde'>"+(parseInt(arrListaSupplementari[0])==-1?"DU":"D")+"</span>") 543// tabe.SetStile(riga,3,"Cella") 544 if (arrListaSupplementari[0]==0) { 545 tabe.SetValore(riga,3,"<span class='testo-verde'>"+"-----------------"+ "</span>") 546 } else if (arrListaSupplementari[0]==-1) { 547 tabe.SetValore(riga,3,"<span class='testo-verde'>"+"Ris. Uff. T.S."+ "</span>") 548 } else { 549 tabe.SetValore(riga,3,"<span class='testo-verde'>"+ eval("xg"+arrListaSupplementari[0]) + "</span>") 550 } 551 tabe.SetStile(riga,5,"testo-cx") 552 tabe.SetValore(riga,5,"<span class='"+(ConvToFloat(arrVotoSupplementari[0])>=6?"testo-verde":"testo-rosso")+"'>"+arrVotoSupplementari[0]+"</span>") 553 //c 554 riga++ 555 tabe.SetStileRiga(riga,"riga-pari") 556 tabe.SetSpan(riga,3,2) 557 tabe.SetSpanned(riga,4,true) 558 tabe.SetSpan(riga,5,2) 559 tabe.SetSpanned(riga,6,true) 560 tabe.SetStile(riga,1,"riga-bianco") 561 tabe.SetValore(riga,1," ") 562 tabe.SetStile(riga,2,"testo-cx") 563 tabe.SetValore(riga,2,"<span class='testo-rosso'>"+(parseInt(arrListaSupplementari[1])==-1?"CU":"C")+"</span>") 564// tabe.SetStile(riga,3,"Cella") 565 if (arrListaSupplementari[1]==0) { 566 tabe.SetValore(riga,3,"<span class='testo-rosso'>"+"-----------------"+ "</span>") 567 } else if (arrListaSupplementari[1]==-1) { 568 tabe.SetValore(riga,3,"<span class='testo-rosso'>"+"Ris. Uff. T.S."+ "</span>") 569 } else { 570 tabe.SetValore(riga,3,"<span class='testo-rosso'>"+ eval("xg"+arrListaSupplementari[1]) + "</span>") 571 } 572 tabe.SetStile(riga,5,"testo-cx") 573 tabe.SetValore(riga,5,"<span class='"+(ConvToFloat(arrVotoSupplementari[1])>=6?"testo-verde":"testo-rosso")+"'>"+arrVotoSupplementari[1]+"</span>") 574 //a 575 riga++ 576 tabe.SetStileRiga(riga,"riga-dispari") 577 tabe.SetSpan(riga,3,2) 578 tabe.SetSpanned(riga,4,true) 579 tabe.SetSpan(riga,5,2) 580 tabe.SetSpanned(riga,6,true) 581 tabe.SetStile(riga,1,"riga-bianco") 582 tabe.SetValore(riga,1," ") 583 tabe.SetStile(riga,2,"testo-cx") 584 tabe.SetValore(riga,2,"<span class='testo-blu'>"+(parseInt(arrListaSupplementari[2])==-1?"AU":"A")+"</span>") 585// tabe.SetStile(riga,3,"Cella") 586 if (arrListaSupplementari[2]==0) { 587 tabe.SetValore(riga,3,"<span class='testo-blu'>"+"-----------------"+ "</span>") 588 } else if (arrListaSupplementari[2]==-1) { 589 tabe.SetValore(riga,3,"<span class='testo-blu'>"+"Ris. Uff. T.S."+ "</span>") 590 } else { 591 tabe.SetValore(riga,3,"<span class='testo-blu'>"+ eval("xg"+arrListaSupplementari[2]) + "</span>") 592 } 593 tabe.SetStile(riga,5,"testo-cx") 594 tabe.SetValore(riga,5,"<span class='"+(ConvToFloat(arrVotoSupplementari[2])>=6?"testo-verde":"testo-rosso")+"'>"+arrVotoSupplementari[2]+"</span>") 595 //fc 596 riga++ 597// tabe.SetStileRiga(riga,"t-xxs") 598 tabe.SetSpan(riga,1,4) 599 tabe.SetSpanned(riga,2,true) 600 tabe.SetSpanned(riga,3,true) 601 tabe.SetSpanned(riga,4,true) 602 tabe.SetSpan(riga,5,2) 603 tabe.SetSpanned(riga,6,true) 604 tabe.SetStile(riga,1,"testo-dx") 605 tabe.SetValore(riga,1,"Fattore Campo Supplementari: ") 606 tabe.SetStile(riga,5,"testo-cx") 607 tabe.SetValore(riga,5,t.FattoreCampoSupplementari) 608 //totale 609 riga++ 610 tabe.SetStileRiga(riga,"riga-blu") 611 tabe.SetSpan(riga,1,4) 612 tabe.SetSpanned(riga,2,true) 613 tabe.SetSpanned(riga,3,true) 614 tabe.SetSpanned(riga,4,true) 615 tabe.SetSpan(riga,5,2) 616 tabe.SetSpanned(riga,6,true) 617 tabe.SetStile(riga,1,"testo-dx") 618 tabe.SetValore(riga,1,"Totale Squadra Supplementari: ") 619 tabe.SetStile(riga,5,"testo-cx") 620 tabe.SetValore(riga,5,t.TotaleSquadraSupplementari) 621 // gol 622 riga++ 623 tabe.SetStileRiga(riga,"riga-orange") 624 tabe.SetSpan(riga,1,4) 625 tabe.SetSpanned(riga,2,true) 626 tabe.SetSpanned(riga,3,true) 627 tabe.SetSpanned(riga,4,true) 628 tabe.SetSpan(riga,5,2) 629 tabe.SetSpanned(riga,6,true) 630 tabe.SetStile(riga,1,"testo-dx") 631 tabe.SetValore(riga,1,"Gol Supplementari: ") 632 tabe.SetStile(riga,5,"testo-cx") 633 tabe.SetValore(riga,5,t.GolSupplementari) 634 } 635 if (t.Rigori==1) { 636 riga++ 637 tabe.SetStileRiga(riga,"riga-bianco") 638 tabe.SetSpan(riga,1,6) 639 for (j=2;j<=6;j++) tabe.SetSpanned(riga,j,true) 640 641 riga++ 642 tabe.SetStileRiga(riga,"riga-blu") 643 tabe.SetSpan(riga,1,6) 644 for (j=2;j<=6;j++) tabe.SetSpanned(riga,j,true) 645 tabe.SetValore(riga,1,"Calci di Rigore") 646 for (j=0;j<arrListaRigori.length;j++) { 647 riga++ 648 if ((riga % 2) == 0) { 649 pd="dispari" 650 } else { 651 pd="pari" 652 } 653 tabe.SetStileRiga(riga,"riga-"+pd) 654 tabe.SetSpan(riga,1,2) 655 tabe.SetSpanned(riga,2,true) 656 tabe.SetSpan(riga,3,2) 657 tabe.SetSpanned(riga,4,true) 658 tabe.SetSpan(riga,5,2) 659 tabe.SetSpanned(riga,6,true) 660 tabe.SetStile(riga,1,"riga-bianco") 661// tabe.SetStile(riga,3,"Cella") 662 tabe.SetStile(riga,5,"testo-cx") 663 tabe.SetValore(riga,1," "
663) 664 if (parseInt(arrListaRigori[j])==0) { 665 // assente 666 tabe.SetValore(riga,3,"<span class='testo-8'>-------------</span>") 667 } else if (parseInt(arrListaRigori[j])==-1) { 668 // ru 669 tabe.SetValore(riga,3,"<span class='testo-8'>Riserva d'Ufficio</span>") 670 } else { 671 tabe.SetValore(riga,3,"<span class='testo-8'>"+eval("xg"+arrListaRigori[j])+"</span>") 672 } 673 tabe.SetValore(riga,5,"<span class='testo-"+(ConvToFloat(arrVotoRigori[j])>=6?"verde":"rosso")+"'>"+arrVotoRigori[j]+"</span>") 674 } 675 // gol rig 676 riga++ 677 tabe.SetStileRiga(riga,"riga-orange") 678 tabe.SetSpan(riga,1,4) 679 tabe.SetSpanned(riga,2,true) 680 tabe.SetSpanned(riga,3,true) 681 tabe.SetSpanned(riga,4,true) 682 tabe.SetSpan(riga,5,2) 683 tabe.SetSpanned(riga,6,true) 684 tabe.SetStile(riga,1,"testo-dx") 685 tabe.SetValore(riga,1,"Gol Rigori: ") 686 tabe.SetStile(riga,5,"testo-cx") 687 tabe.SetValore(riga,5,t.GolRigori) 688 } 689 // Ora la panchina, i sostituiti e tribuna 690 riga++ 691 tabe.SetStileRiga(riga,"riga-bianco") 692 tabe.SetSpan(riga,1,6) 693 for (j=2;j<=6;j++) tabe.SetSpanned(riga,j,true) 694 695 riga++ 696 tabe.SetStileRiga(riga,"riga-blu") 697 tabe.SetSpan(riga,1,6) 698 for (j=2;j<=6;j++) tabe.SetSpanned(riga,j,true) 699 tabe.SetValore(riga,1,"Sostituiti, panchina e tribuna") 700 for (j=11;j<arrLista.length;j++) { 701 riga++ 702 if ((riga % 2) == 0) { 703 pd="dispari2" 704 } else { 705 pd="pari" 706 } 707 // come Lista, valori separati da % per i ruoli dei giocatori 708 // 1,2,3,4: PORT, DIFE, CENT, ATTA "normali", oppure RU 709 // 5,6,7,8: Riserve (p,d,c,a) {se nei primi 11, entrata, altrimenti riserva non entrata} 710 // 0: assente 711 // -1,-2,-3,-4: (solo "sostituiti"): giocatori che sono stati "sostituiti" 712 // -5,-6,-7,-8: tribuna (p,d,c,a) 713 switch(parseInt(arrRuolo[j])) { 714 case 0: 715 ruolo="-" 716 colore="" 717 neretto="-bold" 718 break 719 case 1: 720 ruolo=(arrLista[j]>0?"P":"PU") 721 colore="oliva" 722 neretto="-bold" 723 break 724 case 2: 725 ruolo=(arrLista[j]>0?"D":"DU") 726 colore="verde" 727 neretto="-bold" 728 break 729 case 3: 730 ruolo=(arrLista[j]>0?"C":"CU") 731 colore="rosso" 732 neretto="-bold" 733 break 734 case 4: 735 ruolo=(arrLista[j]>0?"A":"AU") 736 colore="blu" 737 neretto="-bold" 738 break 739 case 5: 740 ruolo=(j<=10?"PR":"P") 741 colore="oliva" 742 neretto=(j<=10?"-bold":"") 743 break 744 case 6: 745 ruolo=(j<=10?"DR":"D") 746 colore="verde" 747 neretto=(j<=10?"-bold":"") 748 break 749 case 7: 750 ruolo=(j<=10?"CR":"C") 751 colore="rosso" 752 neretto=(j<=10?"-bold":"") 753 break 754 case 8: 755 ruolo=(j<=10?"AR":"A") 756 colore="blu" 757 neretto=(j<=10?"-bold":"") 758 break 759 case -1: 760 ruolo="Ps" 761 colore="oliva" 762 neretto="" 763 break 764 case -2: 765 ruolo="Ds" 766 colore="verde" 767 neretto="" 768 break 769 case -3: 770 ruolo="Cs" 771 colore="rosso" 772 neretto="" 773 break 774 case -4: 775 ruolo="As" 776 colore="blu" 777 neretto="" 778 break 779 case -5: 780 ruolo="" 781 colore="" 782 neretto="" 783 break 784 case -6: 785 ruolo="" 786 colore="" 787 neretto="" 788 break 789 case -7: 790 ruolo="" 791 colore="" 792 neretto="" 793 break 794 case -8: 795 ruolo="" 796 colore="" 797 neretto="" 798 break 799 } 800 // per inserire la riga bianca tra titolari e riserve 801 //if (inseritariga==0 && f[j].Pos>0) { 802 // tabe.SetStileRiga(riga,"Bianco") 803 // tabe.SetValore(riga,1," ") 804 // tabe.SetStile(riga,1,"Bianco") 805 // tabe.SetSpan(riga,1,3) 806 // tabe.SetSpanned(riga,2,true) 807 // tabe.SetSpanned(riga,3,true) 808 // inseritariga=1 809 // riga=1+j+inseritariga 810 //} 811 tabe.SetStileRiga(riga,"riga-bianco") 812 // la maglietta solo per titolari e riserve 813 sqa=(((arrLista[j]==0)||(arrLista[j]==-1)) ?"---":eval("xa"+arrListaSqA[j])) 814 if (!((arrRuolo[j]>=-8 && arrRuolo[j]<=-5) || ((arrLista[j]==0)||(arrLista[j]==-1)))) tabe.SetValore(riga,1,"<img src='img/sq/"+sqa+".gif'>") 815// tabe.SetStile(riga,1,"riga-bianco") 816 // dati 817 tabe.SetValore(riga,2,"<div class='testo-"+colore+neretto+"-cx'>"+ruolo+"</div>") 818 if (arrLista[j]==0) { 819 tabe.SetValore(riga,3,"<div class='testo-"+colore+neretto+"'>"+"-----------------"+ "</div>") 820 } else if (arrLista[j]==-1) { 821 tabe.SetValore(riga,3,"<div class='testo-"+colore+neretto+"'>"+"Riserva d'ufficio"+ "</div>") 822 } else { 823 tabe.SetValore(riga,3,"<div class='testo-"+colore+neretto+"'>"+(eval("xg"+arrLista[j]))+" ("+sqa+")" + "</div>") 824 } 825 if (arrVoto[j]=="sv/ng") { 826 tabe.SetValore(riga,4,"<div class='testo-"+neretto+"cx'>sv/ng</div>") 827 tabe.SetValore(riga,5,"<div class='testo-"+neretto+"cx'>-</div>") 828 tabe.SetValore(riga,6,"<div class='testo-"+neretto+"cx'>sv/ng</div>") 829 } else { 830 tabe.SetValore(riga,5,"<div class='testo-"+neretto+"cx'>"+arrModif[j]+"</div>") 831 if (ConvToFloat(arrVoto[j])>=6) { 832 tabe.SetValore(riga,4,"<div class='testo-verde"+neretto+"-cx'>"+arrVoto[j]+"</div>") 833 } else { 834 tabe.SetValore(riga,4,"<div class='testo-rosso"+neretto+"-cx'>"+arrVoto[j]+"</div>") 835 } 836 if (ConvToFloat(arrTot[j])>=6) { 837 tabe.SetValore(riga,6,"<div class='testo-verde"+neretto+"-cx'>"+arrTot[j]+"</div>") 838 } else { 839 tabe.SetValore(riga,6,"<div class='testo-rosso"+neretto+"-cx'>"+arrTot[j]+"</div>") 840 } 841 } 842 tabe.SetStile(riga,2,"riga-"+pd) 843 tabe.SetStile(riga,3,"riga-"+pd) 844 tabe.SetStile(riga,4,"riga-"+pd) 845 tabe.SetStile(riga,5,"riga-"+pd) 846 tabe.SetStile(riga,6,"riga-"+pd) 847 // voto,modif,tot 848 } 849 } 850 851 return tabe 852}
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.