1// Oggetti JavaScript per Competizioni e Divisioni 2 3/********************************** 4*********** COSTRUTTORI *********** 5***********************************/ 6// Costruttore dell'oggetto Competizione 7function Competizione(ID,Nome,GironeUnico,IDGironeSeUnico,Predefinita) { 8 this.ID = ID 9 this.Nome = Nome 10 this.GironeUnico = GironeUnico 11 this.IDGironeSeUnico = IDGironeSeUnico 12 this.Predefinita = Predefinita 13} 14 15// Costruttore dell'oggetto Divisione 16function Divisione(ID,Nome) { 17 this.ID = ID 18 this.Nome = Nome 19} 20 21// Costruttore dell'oggetto DivComp 22function DivComp(IDComp, IDDiv) { 23 this.IDComp = IDComp 24 this.IDDiv = IDDiv 25} 26 27// Costruttore dell'oggetto Girone 28function Girone(ID, IDComp, IDGruppo, Nome) { 29 this.ID = ID 30 this.IDComp = IDComp 31 this.IDGruppo = IDGruppo 32 this.Nome = Nome 33} 34 35// Costruttore dell'oggetto Gruppo 36function Gruppo(ID, Nome) { 37 this.ID = ID 38 this.Nome = Nome 39} 40 41/*********************************** 42************** METODI ************** 43************************************/ 44function GeneraIntestazioneCompetizioni(cComp,cDiv) { 45// Questo codice genera l'intestazione per la scelta delle competizioni 46// e divisioni. 47var arrC = new Object() 48var arrD = new Object() 49var i 50//arrC = RiempiCompetizioni(arrC) 51arrC = arrCompetizioni 52//arrD = RiempiDivisioni(arrD) 53arrD = arrDivisioni 54document.write("<form name='frmCompet' id='frmCompet' action='cale.htm' method='get'>") 55document.write("<table width='100%' border='00' cellspacing='0' cellpadding='0'>") 56document.write("<tr><td width='5%' class='testo-10'><nobr> Divisione: <select name='Div' class='testo-10' id='Div'>") 57document.write("<option value='0'>- Tutte -</option>") 58for (i=1;i<arrD.length;i++) { 59 document.write("<option value='" + arrD[i].ID + "'") 60 if (arrD[i].ID == cDiv) document.write(" selected") 61 document.write(">" + arrD[i].Nome + "</option>") 62} 63document.write("</select></nobr></td>") 64document.write("<td width='5%' class='testo-10'><nobr> Competizione: <select name='Comp' class='testo-10' id='Comp'>") 65document.write("<option value='0'>- Tutte -</option>") 66for (i=1;i<arrC.length;i++) { 67 document.write("<option value='" + arrC[i].ID + "'") 68 if (arrC[i].ID == cComp) document.write(" selected") 69 document.write(">" + arrC[i].Nome + "</option>") 70} 71document.write("</select></nobr></td>") 72document.write("<td width='90%' class='testo-10-bold'> <input name='Invia' type='submit' class='testo-10' id='Invia' value=' Vai '></td>") 73document.write("</tr></table></form><br>") 74} 75 76function GeneraIntestazioneCompetizioniPerClassifica(cComp,cGir) { 77// Questo codice genera l'intestazione per la scelta delle competizioni 78// e divisioni. Quando si seleziona uno dei valori e si sceglie Vai, vengono 79// settati due cookie per passare i valori alla pagina. 80var arrC = new Object() 81var arrG = new Object() 82var i, s2,j 83var s1 = "", Almeno1C = false, Almeno1G = false 84var IDComp 85//arrC = RiempiCompetizioni(arrC) 86arrC = arrCompetizioni 87//arrG = RiempiGironi(arrG) 88arrG = arrGironi 89document.write("<table width='100%' border='00' cellspacing='0' cellpadding='0'><tr>") 90document.write("<form name='frmCompet' id='frmCompet' action='class.htm' method='get'>") 91s1 = "<td width='5%' class='testo-10'><nobr> Competizione: <select name='Comp' class='testo-10' id='Comp' onChange='SelezionaGirone()'>" 92for (i=1;i<arrC.length;i++) { 93 if (arrC[i].GironeUnico) { 94 s1 += "<option value='" + arrC[i].ID + "'" 95 if (arrC[i].ID == cComp) s1 += " selected" 96 s1 += ">" + arrC[i].Nome + "</option>" 97 Almeno1C = true 98 } 99} 100s1 += "</select></nobr></td>" 101if (Almeno1C) document.write(s1) 102s1 = "<td width='5%' class='testo-10'><nobr> Girone: <select name='Gir' class='testo-10' id='Gir'>" 103//s1 += "<option value='0'>Tutti Competizione</option>" 104for (i=1;i<arrG.length;i++) { 105 s1 += "<option value='" + arrG[i].ID + "'" 106 if (arrG[i].ID == cGir) s1 += " selected" 107 IDComp = parseInt(arrG[i].IDComp) 108 j=1 109 while (parseInt(arrC[j].ID) != IDComp) { 110 j++ 111 } 112 s2 = arrC[j].Nome + ": " 113 if (arrG[i].Nome == "") { 114 s2 += "[Senza nome]" 115 } else { 116 s2 += arrG[i].Nome 117 } 118 s1 += ">" + arrG[i].ID + " - " + s2 + "</option>" 119 Almeno1G = true 120} 121s1 += "</select></nobr></td>" 122if (Almeno1G) document.write(s1) 123document.write("<td width='90%' class='testo-10'><nobr> <input name='Invia' type='submit' class='testo-10' id='Invia' value=' Vai '></nobr></td>") 124document.write("</tr></table></form><br>") 125} 126 127function GeneraIntestazioneGiornateIncontri(cGio,cComp,fname) { 128// Questo codice genera l'intestazione per la scelta delle giornate 129// e degli competizioni 130// Utilizza MaxA definito nel SerieADati 131var arrC = new Object() 132var i 133arrC = arrCompetizioni 134if (cGio=="" || parseInt(cGio)==0) cGio=1 135if (cComp=="") cComp=0 136 137document.write("<form name='frmIncontri' id='frmIncontri' action='"+fname+".php' method='get'>") 138document.write("<table width='100%' border='00' cellspacing='0' cellpadding='0'>") 139document.write("<tr>
139<td width='5%' class='testo-10'><nobr> Giornata: <select name='Gio' class='testo-10' id='Gio'>") 140for (i=1;i<=MaxA;i++) { 141 document.write("<option value='" + i + "'") 142 if (i == cGio) document.write(" selected") 143 document.write(">" + i + "</option>") 144} 145document.write("</select></nobr></td>") 146document.write("<td width='5%' class='testo-10'><nobr> Competizione: <select name='Comp' class='testo-10' id='Comp'>") 147document.write("<option value='0'" + (cComp==0?" selected":"") +">- Tutte -</option>") 148for (i=1;i<arrC.length;i++) { 149 document.write("<option value='" + arrC[i].ID + "'") 150 if (arrC[i].ID == cComp) document.write(" selected") 151 document.write(">" + arrC[i].Nome + "</option>") 152} 153document.write("</select></nobr></td>") 154document.write("<td width='90%' class='testo-10'> <input name='Invia' type='submit' class='testo-10' id='Invia' value=' Vai '></td>") 155document.write("</tr></table></form>") 156} 157 158function SelezionaGirone() { 159 // se la competizione selezionata รจ a Girone Unico allora 160 // seleziona l'opportuno girone a destra 161var id = parseInt(frmCompet.Comp.options[frmCompet.Comp.selectedIndex].value) 162var idGirone 163//var arrC = RiempiCompetizioni(arrC) 164var arrC = arrCompetizioni 165var i=1 166 while (parseInt(arrC[i].ID) != id) { 167 i++ 168 } 169 if (arrC[i].GironeUnico) { 170 // seleziona a sinistra 171 idGirone = arrC[i].IDGironeSeUnico 172 i=0 173 while (parseInt(frmCompet.Gir.options[i].value) != idGirone) { 174 i++ 175 } 176 frmCompet.Gir.options[i].selected = true 177 } 178}
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.