PageSourceSearch

https://www.bugsleague.com/js/fcmClassificaFunzioni.js

js bugsleague.com collected 2026-10-05 05:19:02 UTC 11,766 bytes, 368 lines download raw bytes

1// Oggetti Javascript per Classifica
2// riferisce fcmGenerale.js
3
4// La Classifica viene passata in ordine come e' nella competizione principale
5// Oggetto Classifica (abbreviato C)
6function C(ID,IDGirone,IDCompetizione,Pos,Nome,Presidente,Punti,PCV,PCN,PCP,PFV,PFN,PFP,RCF,RCS,RFF,RFS,MI,PMed,PMin,PMax,PDevSt,PAvv,PTot,TMed,TMin,TMax,TDevSt,TAvv,TTot,bm) {
7	this.ID = ID
8	this.IDGirone = IDGirone
9	this.IDCompetizione = IDCompetizione
10	this.Pos = Pos
11	this.Nome = Nome
12	this.Presidente = Presidente
13	this.Punti = Punti
14	this.PartiteVinte = new Coppia(PCV,PFV)
15	this.PartiteNulle = new Coppia(PCN,PFN)
16	this.PartitePerse = new Coppia(PCP,PFP)
17	this.RetiFatte = new Coppia(RCF,RFF)
18	this.RetiSubite = new Coppia(RCS,RFS)
19	this.MI = MI
20	this.PMed = PMed
21	this.PMin = PMin
22	this.PMax = PMax
23	this.PDevSt = PDevSt
24	this.PAvv = PAvv
25	this.PTot = PTot
26	this.TMed = TMed 
27	this.TMin = TMin
28	this.TMax = TMax
29	this.TDevSt = TDevSt
30	this.TAvv = TAvv
31	this.TTot = TTot
32	this.bm = bm
33}
34// Oggetto ColonneClassifica
35function CC(IDGirone,Colonne) {
36	//stringa di bit: dove c'e' 1 la colonna รจ visibile
37	    /*  0: Squadra
38		1: Presidente
39		2: Punti
40		3: Bonus/Malus
41		4: PcV
42		5: PcN
43		6: PcP
44		7: PfV
45		8: PfN
46		9: PfP
47		10: PtV
48		11: PtN
49		12: PtP
50		13: MI
51		14: RcF
52		15: RcS
53		16: RfF
54		17: RfS
55		18: RtF
56		19: RtS
57		20: PMed
58		21: PMin
59		22: PMax
60		23: PDst
61		24: PAvv
62		25: PSomma
63		26: TMed
64		27: TMin
65		28: TMax
66		29: TDSt
67		30: TAvv
68		31: TSomma
69	*/
70	this.IDGirone = IDGirone
71	this.Colonne = Colonne
72}	
73
74function GeneraClassifica(IDGirone) {
75var arr = new Object()
76var arrCol = new Object()
77var classifi = new Object()
78var i,IndexColonne = -1
79var cntColonne = 0,cntColonneGen = 0,cntColonneReti = 0,cntColonnePartite = 0, cntColonneParz = 0, cntColonneTot = 0, cntColonneMI = 0
80var col,row,d10
81var startGen = 0, startPartite = 0, startMI = 0, startReti = 0, startParz = 0, startTot = 0
82	//arrCol = RiempiColonneClassifica(arrCol)
83	arrCol = arrColonneClassifica
84	i = 1
85	// Trova la posizione delle colonne
86	while (IndexColonne == -1) {
87		if (arrCol[i].IDGirone == IDGirone) IndexColonne = i
88		i++
89	}
90	// Conta le colonne visibili
91	for (i=0;i<arrCol[IndexColonne].Colonne.length;i++) {
92		if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonne++ 
93		if ((i>=0) && (i<=3)) {
94			if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonneGen++
95		} else if ((i>=4) && (i<=12)) {
96			if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonnePartite++
97		} else if (i==13) {
98			if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonneMI++
99		} else if ((i>=14) && (i<=19)) {
100			if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonneReti++
101		} else if ((i>=20) && (i<=25)) {
102			if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonneParz++
103		} else if ((i>=26) && (i<=31)) {
104			if (arrCol[IndexColonne].Colonne.charAt(i) == "1") cntColonneTot++
105		}
106	}
107	classifi = new Tabella(2,cntColonne+1) // +1 per la posizione
108	classifi.intestazioni=true
109	//arr = RiempiClassifica(arr)
110	arr = arrClassifica
111	Stato("Generazione Classifica...")
112	// prima riga di intestazione
113	// Imposta gli span corretti
114	for (i=1;i<=classifi.numcolonne;i++) {
115		classifi.SetSpanned(1,i,true)
116	}
117	startGen=1
118	startPartite=cntColonneGen+2
119	startMI = startPartite + cntColonnePartite
120	startReti = startMI + cntColonneMI
121	startParz = startReti + cntColonneReti
122	startTot = startParz + cntColonneParz
123	classifi.SetStileRiga(1,"riga-blu-cx")
124
125//debugger
126	classifi.SetSpan(1,1,parseInt(cntColonneGen)+1)
127	if (cntColonnePartite>0) {
128		classifi.SetSpan(1,startPartite,cntColonnePartite)
129		classifi.SetSpanned(1,startPartite,false)
130	}
131	if (cntColonneMI>0) {
132		classifi.SetSpan(1,startMI,cntColonneMI)
133		classifi.SetSpanned(1,startMI,false)
134	}
135	if (cntColonneReti>0) {
136		classifi.SetSpan(1,startReti,cntColonneReti)
137		classifi.SetSpanned(1,startReti,false)
138	}
139	if (cntColonneParz>0) {
140		classifi.SetSpan(1,startParz,cntColonneParz)
141		classifi.SetSpanned(1,startParz,false)
142	}
143	if (cntColonneTot>0) {
144		classifi.SetSpan(1,startTot,cntColonneTot)
145		classifi.SetSpanned(1,startTot,false)
146	}
147	classifi.SetSpanned(1,1,false)
148	//debugger
149	if (cntColonnePartite > 0) {
150		classifi.SetValore(1,startPartite,"PARTITE")
151	}
152	if (cntColonneMI > 0) {
153		classifi.SetValore(1,startMI,"")
154	}
155	if (cntColonneReti > 0) {
156		classifi.SetValore(1,startReti,"RETI")
157	}	
158	if (cntColonneParz > 0) {
159		classifi.SetValore(1,startParz,"PARZIALE")
160	}	
161	if (cntColonneTot > 0) {
162		classifi.SetValore(1,startTot,"TOTALE")
163	}	
164	// Seconda riga di intestazione
165	col = 1
166	classifi.SetValore(2,col,"Pos")
167	classifi.SetStileRiga(2,"riga-orange-cx")
168	col++
169	for(i=0;i<arrCol[IndexColonne].Colonne.length;i++) {
170		if (arrCol[IndexColonne].Colonne.charAt(i) == 1) {
171			switch (i) {
172			case 0: classifi.SetValore(2,col,"Squadra"); break
173			case 1: classifi.SetValore(2,col,"Presidente"); break
174			case 2: classifi.SetValore(2,col,"PT"); break
175			case 3: classifi.SetValore(2,col,"<nobr>B/M</nobr>"); break
176			case 4: classifi.SetValore(2,col,"CV"); break
177			case 5: classifi.SetValore(2,col,"CN"); break
178			case 6: classifi.SetValore(2,col,"CP"); break
179			case 7: classifi.SetValore(2,col,"FV"); break
180			case 8: classifi.SetValore(2,col,"FN"); break
181			case 9: classifi.SetValore(2,col,"FP"); break
182			case 10: classifi.SetValore(2,col,"V"); break
183			case 11: classifi.SetValore(2,col,"N"); break
184			case 12: classifi.SetValore(2,col,"P"); break
185			case 13: classifi.SetValore(2,col,"MI"); break
186			case 14: classifi.SetValore(2,col,"CF"); break
187			case 15: classifi.SetValore(2,col,"CS"); break
188			case 16: classifi.SetValore(2,col,"FF"); break
189			case 17: classifi.SetValore(2,col,"FS"); break
190			case 18: classifi.SetValore(2,col,"F"); break
191			case 19: classifi.SetValore(2,col,"S"); break
192			case 20: classifi.SetValore(2,col,"Med"); break
193			case 21: classifi.SetValore(2,col,"Min"); break
194			case 22: classifi.SetValore(2,col,"Max"); break
195			case 23: classifi.SetValore(2,col,"DSt"); break
196			case 24: classifi.SetValore(2,col,"Avv"); break
197			case 25: classifi.SetValore(2,col,"Somma"); break
198			case 26: classifi.SetValore(2,col,"Med"); break
199			case 27: classifi.SetValore(2,col,"Min"); break
200			case 28: classifi.SetValore(2,col,"Max"); break
201			case 29: classifi.SetValore(2,col,"DSt"); break
202			case 30: classifi.SetValore(2,col,"Avv"); break
203			case 31: classifi.SetValore(2,col,"Somma"); break
204			}			
205			col++
206		}
207	}
208	// classifica
209	row = 3
210	for (i=1;i<arr.length;i++) {
211		if (IDGirone == arr[i].IDGirone) {
212			col=1
213			classifi.SetValore(row,col,(row-2))
214			classifi.SetStile(row,col,"testo-bold-cx")
215			if ((i % 2) == 0) {
216				classifi.SetStileRiga(row,"riga-pari")
217			} else {
218				classifi.SetStileRiga(row,"riga-dispari")
219			}
220			col++
221			for(j=0;j<arrCol[IndexColonne].Colonne.length;j++) {
222				if (arrCol[IndexColonne].Colonne.charAt(j) == 1) {
223					switch (j) {
224					case 0:
225						classifi.SetValore(row,col,"<nobr>" + arr[i].Nome +"</nobr>")
226						classifi.SetStile(row,col,"testo-bold")
227						break
228					case 1:
229						classifi.SetValore(row,col,"<nobr>" + arr[i].Presidente +"</nobr>")
230						break
231					case 2: 
232						classifi.SetValore(row,col,arr[i].Punti)
233						classifi.SetStile(row,col,"testo-blu-bold-cx")
234						break
235					case 3: 
236						classifi.SetValore(row,col,"<nobr>" + arr[i].bm +"</nobr>")
237						classifi.SetStile(row,col,"testo-blu-cx")
238						break
239					case 4:
240						classifi.SetValore(row,col,arr[i].PartiteVinte.Casa)
241						classifi.SetStile(row,col,"testo-cx")
242						break
243					case 5: 
244						classifi.SetValore(row,col,arr[i].PartiteNulle.Casa)
245						classifi.SetStile(row,col,"testo-cx")
246						break
247					case 6: 
248						classifi.SetValore(row,col,arr[i].PartitePerse.Casa)
249						classifi.SetStile(row,col,"testo-cx")
250						break
251					case 7: 
252						classifi.SetValore(row,col,arr[i].PartiteVinte.Fuori)
253						classifi.SetStile(row,col,"testo-cx")
254						break
255					case 8: 
256						classifi.SetValore(row,col,arr[i].PartiteNulle.Fuori)
257						classifi.SetStile(row,col,"testo-cx")
258						break
259					case 9: 
260						classifi.SetValore(row,col,arr[i].PartitePerse.Fuori)
261						classifi.SetStile(row,col,"testo-cx")
262						break
263					case 10: 
264						classifi.SetValore(row,col,(arr[i].PartiteVinte.Casa+arr[i].PartiteVinte.Fuori))
265						classifi.SetStile(row,col,"testo-verde-bold-cx")
266						break
267					case 11: 
268						classifi.SetValore(row,col,(arr[i].PartiteNulle.Casa+arr[i].PartiteNulle.Fuori))
269						classifi.SetStile(row,col,"testo-oliva-bold-cx")
270						break
271					case 12: 
272						classifi.SetValore(row,col,(arr[i].PartitePerse.Casa+arr[i].PartitePerse.Fuori))
273						classifi.SetStile(row,col,"testo-rosso-bold-cx")
274						break
275					case 13:  
276						classifi.SetValore(row,col,"<nobr>" + arr[i].MI + "</nobr>")
277						classifi.SetStile(row,col,"testo-blu-cx")
278						break
279					case 14:  
280						classifi.SetValore(row,col,arr[i].RetiFatte.Casa)
281						classifi.SetStile(row,col,"testo-cx")
282						break
283					case 15:  
284						classifi.SetValore(row,col,arr[i].RetiSubite.Casa)
285						classifi.SetStile(row,col,"testo-cx")
286						break
287					case 16:
288						classifi.SetValore(row,col,arr[i].RetiFatte.Fuori)
289						classifi.SetStile(row,col,"testo-cx")
290						break
291					case 17:  
292						classifi.SetValore(row,col,arr[i].RetiSubite.Fuori)
293						classifi.SetStile(row,col,"testo-cx")
294						break
295					case 18:  
296						classifi.SetValore(row,col,(arr[i].RetiFatte.Casa+arr[i].RetiFatte.Fuori))
297						classifi.SetStile(row,col,"testo-verde-bold-cx")
298						break
299					case 19:  
300						classifi.SetValore(row,col,(arr[i].RetiSubite.Casa+arr[i].RetiSubite.Fuori))
301						classifi.SetStile(row,col,"testo-rosso-bold-cx")
302						break
303					case 20: 
304						classifi.SetValore(row,col,Fix3(arr[i].PMed))
305						classifi.SetStile(row,col,"testo-cx")
306						break
307					case 21: 
308						classifi.SetValore(row,col,Fix3(arr[i].PMin))
309						classifi.SetStile(row,col,"testo-cx")
310						break
311					case 22: 
312						classifi.SetValore(row,col,Fix3(arr[i].PMax))
313						classifi.SetStile(row,col,"testo-cx")
314						break
315					case 23:
316						classifi.SetValore(row,col,Fix3(arr[i].PDevSt))
317						classifi.SetStile(row,col,"testo-cx")
318						break
319					case 24: 
320						classifi.SetValore(row,col,Fix3(arr[i].PAvv))
321						classifi.SetStile(row,col,"testo-cx")
322						break
323					case 25: 
324						classifi.SetValore(row,col,Fix3(arr[i].PTot))
325						classifi.SetStile(row,col,"testo-bold-cx")
326						break
327					case 26: 
328						classifi.SetValore(row,col,Fix3(arr[i].TMed))
329						classifi.SetStile(row,col,"testo-cx")
330						break
331					case 27: 
332						classifi.SetValore(row,col,Fix3(arr[i].TMin))
333						classifi.SetStile(row,col,"testo-cx")
334						break
335					case 28: 
336						classifi.SetValore(row,col,Fix3(arr[i].TMax))
337						classifi.SetStile(row,col,"testo-cx")
338						break
339					case 29:
340						classifi.SetValore(row,col,Fix3(arr[i].TDevSt))
341						classifi.SetStile(row,col,"testo-cx")
342						break
343					case 30: 
344						classifi.SetValore(row,col,Fix3(arr[i].TAvv))
345						classifi.SetStile(row,col,"testo-cx")
346						break
347					case 31: 
348						classifi.SetValore(row,col, Fix3(arr[i].TTot))
349						classifi.SetStile(row,col,"testo-bold-cx")
350						break
351					}			
352					col++
353				}
354			}
355			row++
356		}
357	}
358	Stato("Visualizzazione Classifica...")
359	d10 = Math.ceil(classifi.numrighe / 10)
360	classifi.nome="Classifica"
361	classifi.larghezza=99
362	classifi.altezza=0
363	classifi.border=1
364	classifi.cellpadding=3
365	classifi.cellspacing=0
366	classifi.stile="tab-8"
367	classifi.Stampa()
368}

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.