source: trunk/admin/modules/Elezioni/ele_voti.php@ 426

Last change on this file since 426 was 413, checked in by roby, 6 months ago
  • ADMIN

-- modifiche alla gestione delle consultazioni nulle

  • INSTALL

-- allineamento del db di default alla struttura attuale

File size: 19.6 KB
Line 
1<?php
2/************************************************************************/
3/* Eleonline - Raccolta e diffusione dei dati elettorali */
4/* by Roberto Gigli & Luciano Apolito */
5/* http://www.eleonline.it */
6/* info@eleonline.it rgigli@libero.it */
7/************************************************************************/
8/* Modulo Inserimento dati */
9/* Amministrazione */
10/************************************************************************/
11
12if (!defined('ADMIN_FILE')) {
13 die ("You can't access this file directly...");
14}
15global $dbi;
16$aid=$_SESSION['aid'];
17$prefix=$_SESSION['prefix'];
18$currentlang=$_SESSION['lang'];
19$param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST;
20$vari= implode(',',$_GET);//param);
21$id_comune=$_SESSION['id_comune'];
22$id_cons_gen=intval($_GET['id_cons_gen']);
23$perms=ChiSei($id_cons_gen);
24if ($perms<16 or !$id_cons_gen) die("Non hai i permessi per inserire dati, o non hai scelto la consultazione!");
25if (isset($param['do'])) $do=addslashes($param['do']); else $do='';
26//if (isset($param['id_cons'])) $id_cons=intval($param['id_cons']); else $id_cons='';
27if (isset($param['ops'])) $ops=intval($param['ops']); else $ops='';
28if (isset($param['min'])) $min=intval($param['min']); else $min=0;
29if (isset($param['ok'])) $ok=intval($param['ok']); else $ok='';
30if (isset($param['ov'])) $ov=intval($param['ov']); else $ov='';
31if (isset($param['mv'])) $mv=intval($param['mv']); else $mv='';
32if (isset($param['gv'])) $gv=intval($param['gv']); else $gv='';
33if (isset($param['msv'])) $msv=intval($param['msv']); else $msv='';
34if (isset($param['av'])) $av=intval($param['av']); else $av='';
35if (isset($param['id_circ'])) $id_circ=intval($param['id_circ']); else
36 if (isset($_SESSION['id_circ'])) $id_circ=intval($_SESSION['id_circ']); else $id_circ='0';
37if (isset($param['id_sede'])) $id_sede=intval($param['id_sede']); else $id_sede='0';
38if (isset($param['id_sez'])) $id_sez=intval($param['id_sez']); else $id_sez='';
39if (isset($param['id_lista'])) $id_lista=intval($param['id_lista']); else $id_lista='0';
40if (isset($param['prev_sez'])) $prev_sez=intval($param['prev_sez']); else $prev_sez='0';
41if (isset($param['id_gruppo'])) $id_gruppo=intval($param['id_gruppo']); else $id_gruppo='0';
42if (isset($param['update'])) $update=intval($param['update']); else $update='';
43include("modules/Elezioni/funzionidata.php");
44include("modules/Elezioni/ele.php");
45include_once("modules/Elezioni/ele_spoglio.php");
46global $votolista, $limite, $dettnulli,$disgiunto;
47if(!isset($votolista)) $votolista=0;
48$sql="SELECT tipo_cons FROM ".$prefix."_ele_consultazione where id_cons_gen='$id_cons_gen'" ;
49$res = $dbi->prepare("$sql");
50$res->execute();
51
52
53list($tipo_cons) = $res->fetch(PDO::FETCH_NUM);
54if ($tipo_cons!=3 or $votolista==1) $limite=0; #die ("limite: $limite");}
55$sql="SELECT count(id_circ) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ";
56$res = $dbi->prepare("$sql");
57$res->execute();
58
59
60list($num_circ)=$res->fetch(PDO::FETCH_NUM);
61$sql="SELECT solo_gruppo,disgiunto FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons' ";
62$res = $dbi->prepare("$sql");
63$res->execute();
64
65
66
67list($dettnulli,$disgiunto)=$res->fetch(PDO::FETCH_NUM);
68
69$sql="SELECT circo FROM ".$prefix."_ele_tipo where tipo_cons='$tipo_cons' ";
70$res = $dbi->prepare("$sql");
71$res->execute();
72list($conscirc)=$res->fetch(PDO::FETCH_NUM);
73if ($conscirc){ // or $num_circ==1
74 if (!$id_circ){
75 if (!$id_sez){
76 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_cons='$id_cons' and num_sez='1'";
77$res = $dbi->prepare("$sql");
78$res->execute();
79
80
81 list($id_sez)=$res->fetch(PDO::FETCH_NUM);
82 }
83 $sql="SELECT t1.id_circ FROM ".$prefix."_ele_sede as t1 left join ".$prefix."_ele_sezioni as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' and t2.id_sez='$id_sez'";
84$res = $dbi->prepare("$sql");
85$res->execute();
86
87
88 #$sql="SELECT id_circ FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' order by num_circ limit 0,1";
89//$res = $dbi->prepare("$sql");
90//$res->execute();
91
92
93 if (!$res->rowCount()) die("Errore, non trovo circoscrizioni inserite! Consultare l'amministratore");
94 list($id_circ)=$res->fetch(PDO::FETCH_NUM);
95 $_SESSION['id_circ']=$id_circ;
96 }
97 $sql="select id_sede from ".$prefix."_ele_sede where id_circ='$id_circ'";
98$result = $dbi->prepare("$sql");
99$result->execute();
100
101
102 $i=0;
103 while(list($tmp) = $result->fetch(PDO::FETCH_NUM)) $idsedi[$i++]=$tmp;$tmp=implode (",",$idsedi);
104 unset($idsedi);$i=0;$idsezi=array();unset($result);
105 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_sede in ($tmp)";
106$result = $dbi->prepare("$sql");
107$result->execute();
108
109
110 unset($tmp);
111 while(list($tmp) = $result->fetch(PDO::FETCH_NUM)) $idsezi[$i++]=$tmp;
112 $tmp=implode (",",$idsezi);
113 $sezi = "and id_sez in ($tmp)";
114 $circo = "and id_circ=$id_circ";
115}else{
116 $sezi='';
117 $circo='';
118}
119
120// Offset - visualizza il numero di elementi per pagina
121$offset=2;
122if (!isset($min)) $min=0;
123$hiddenInfo = "<input type=\"hidden\" name=\"min\" value=\"$min\">";
124
125function numeri_sezione($nums) {
126// tabella visualizzazione sezioni per numero
127global $aid,$bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min, $tipo_cons, $genere,$id_cons_gen,$id_cons,$id_lista,$ops, $perms,$id_sez,$num_ril,$status,$idrefgruppo,$votog,$votol,$votoc;
128$idrefgruppo='';
129 $solosede='';
130 if ($perms<32) {
131 $sql="SELECT id_sede FROM ".$prefix."_ele_operatori where aid='$aid' and id_cons=$id_cons";
132$res = $dbi->prepare("$sql");
133$res->execute();
134
135
136 if ($res) {
137 list($solouna)=$res->fetch(PDO::FETCH_NUM);
138 if ($solouna>0) $solosede="and id_sede='$solouna'";
139 }
140 }
141 $sql="SELECT num_sez, id_sez ,id_sede,colore FROM ".$prefix."_ele_sezioni where id_cons='$id_cons' $solosede order by num_sez";
142$res = $dbi->prepare("$sql");
143$res->execute();
144
145
146 $max = $res->rowCount();
147 //if ($max>=64){
148 $i=0;
149 echo "\n<table align=\"left\" width=\"100%\" border=\"3\"><tr bgcolor=\"$bgcolor1\"><td>";
150
151
152 echo "<div id=\"navmenu\"> <ul>";
153 while(list($sez_num, $sez_id ,$sede_id,$colore) = $res->fetch(PDO::FETCH_NUM)) {
154# $ops='';
155 if(!$id_sez) {$id_sez=$sez_id; $id_sede=$sede_id;}
156 $i++;
157 $sql="SELECT id_circ FROM ".$prefix."_ele_sede where id_cons='$id_cons' and id_sede='$sede_id' ";
158$result = $dbi->prepare("$sql");
159$result->execute();
160
161
162 list($circ_id) = $result->fetch(PDO::FETCH_NUM);
163
164 if(!$ops) $ops=1;
165 $sql="SELECT num_sez FROM ".$prefix."_ele_sezioni where id_sez='$id_sez'";
166$res2 = $dbi->prepare("$sql");
167$res2->execute();
168
169
170 list($numero_sez) = $res2->fetch(PDO::FETCH_NUM);
171 if ($sez_num==$numero_sez) {
172 $cursez= "style=\" background: $colore; border: solid; border-color: YELLOW; border-width: 4px; border-left: solid gray 4px; border-top: solid gray 4px; \"";}
173 else $cursez="style=\" background: $colore; \"";
174 echo "\n<li $cursez><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_circ=$circ_id&amp;id_sede=$sede_id&amp;id_sez=$sez_id&amp;ops=$ops&amp;do=spoglio&amp;id_lista=$id_lista\">$sez_num</a></b></li>\n";
175 }
176 //}
177echo "</ul></div></td></tr></table>\n";
178 //}// fine tabella per numero sezioni
179}
180///////////////////////////////////////////////////////////////////////////////////
181
182
183function voti($id_cons,$do,$id_circ,$id_sede,$ops,$ov,$mv,$gv,$msv,$av,$id_lista) {
184 global $aid,$bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min, $tipo_cons, $genere,$id_cons_gen,$prev_sez,$votog,$votol,$votoc,$conscirc,$id_sez,$ops,$circo;
185
186 echo "<table border=\"0\" width=\"760\" align=\"left\"><tr>";
187 echo "\n<td bgcolor=\"$bgcolor1\" align=\"left\">";
188 numeri_sezione(22);
189 echo "\n</td></tr><tr><td>\n";
190
191
192 ///////////////////////
193 // Circoscrizione : scelta
194 ///////////////////////
195# if($id_sez) $consez=" and id_sez
196 $sql="SELECT t1.id_sede,t2.id_circ,t1.id_sez FROM ".$prefix."_ele_operatori as t1,
197 ".$prefix."_ele_sede as t2
198 where t1.id_cons='$id_cons' AND t1.id_sede=t2.id_sede and t1.aid='$aid'";
199$resoper = $dbi->prepare("$sql");
200$resoper->execute();
201
202
203 list($id_sede2,$id_circ2,$id_sez2) = $resoper->fetch(PDO::FETCH_NUM);
204 if($id_sez2) $id_sez=$id_sez2;
205 if ($id_sede2 and !($id_sede==$id_sede2)) {
206 $id_sede=$id_sede2;
207 $id_circ=$id_circ2;
208 $do="spoglio";
209 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_sez='$id_sez'";
210 $res = $dbi->prepare("$sql");
211 $res->execute();
212 if(!$res->rowCount()) {
213 $sql="SELECT id_sez FROM ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sede=$id_sede order by num_sez limit 0,1";
214 $res = $dbi->prepare("$sql");
215 $res->execute();
216 list($id_sez) = $res->fetch(PDO::FETCH_NUM);
217 }
218 }
219 if ($do == "circo") {
220 OpenTable();
221 echo "<tr><td><form name=\"voti\" action=\"admin.php\">"
222 ."<input type=\"hidden\" name=\"op\" value=\"voti\">"
223 ."<input type=\"hidden\" name=\"do\" value=\"sede\">"
224 // Circoscrizione: lista
225 //**************************************
226 .""._CIRCO.": "
227 ."<select name=\"id_circ\">";
228 $sql="SELECT id_circ,descrizione FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' order by num_circ";
229$res = $dbi->prepare("$sql");
230$res->execute();
231
232
233 while(list($id,$descr) = $res->fetch(PDO::FETCH_NUM)) {
234 if ($descr!="Tutte"){
235 if ($id == $id_circ) {
236 $sel = "selected";
237 } else {
238 $sel = "";
239 }
240 echo "<option value=\"$id\" $sel>$descr";
241 }
242 }
243 echo "</select>"
244 //***********************************
245 ."<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">"
246 ."<input type=\"submit\" name=\"update\" value=\""._OK."\">"
247 ."</form></td></tr>";
248 CloseTable();
249 }
250
251 ///////////////////////
252 // sede : scelta
253 ///////////////////////
254
255
256 if ($do == "sede") {
257 OpenTable();
258 echo "\n<tr><td><form name=\"sede\" action=\"admin.php\">";
259 $sql="SELECT descrizione FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' AND id_circ='$id_circ' order by num_circ";
260$res = $dbi->prepare("$sql");
261$res->execute();
262
263
264 list( $descr_circ) = $res->fetch(PDO::FETCH_NUM);
265 echo "<a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;do=circo\">"._CIRCO."</a> $descr_circ ->";
266 echo "<input type=\"hidden\" name=\"op\" value=\"voti\">"
267 ."<input type=\"hidden\" name=\"do\" value=\"spoglio\">"
268
269 // Indirizzo: lista
270 //**************************************
271 .""._INDIRIZZO.": "
272 ."<select name=\"id_sede\">";
273 $sql="SELECT id_sede,indirizzo FROM ".$prefix."_ele_sede where id_cons='$id_cons' and id_circ='$id_circ' order by indirizzo";
274$res = $dbi->prepare("$sql");
275$res->execute();
276
277
278// echo "$id_circ - $id_cons";
279 while(list($id,$indir) = $res->fetch(PDO::FETCH_NUM)) {
280 if ($id == $id_sede) {
281 $sel = "selected";
282 } else {
283 $sel = "";
284 }
285 echo "<option value=\"$id\" $sel>$indir";
286 }
287 echo "</select>"
288 //*************************************
289 ."<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">"
290 ."<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\">"
291 ."<input type=\"submit\" name=\"update\" value=\""._OK."\">"
292 ."</form></td></tr>\n";
293 CloseTable();
294 }
295
296 ///////////////////////
297 // sezione : scelta
298 ///////////////////////
299 if ($do == "spoglio") {
300
301
302 //************************************
303 // Menu spoglio
304 //************************************
305 $sql="select id_cons,id_sez,id_sede,num_sez, maschi, femmine from ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sez='$id_sez'";
306 $result = $dbi->prepare("$sql");
307 $result->execute();
308 list($id_cons2,$id_sez2,$id_sede,$num_sez, $maschi, $femmine) = $result->fetch(PDO::FETCH_NUM);
309 $sql="select tipo from ".$prefix."_ele_controlli where id_sez='$id_sez' group by tipo";
310$rese = $dbi->prepare("$sql");
311$rese->execute();
312$id_comune=$_SESSION['id_comune'];
313$bordoini="style='cursor: pointer;";
314$errbordoa='';
315$errbordog='';
316$errbordol='';
317while (list($tipo)=$rese->fetch(PDO::FETCH_NUM)) {
318 if ($tipo=='affluenze') $errbordoa="border: 6px solid; border-color: rgb(255, 0, 0);";
319 if ($tipo=='gruppo' or $tipo=='referendum') $errbordog="border: 6px solid; border-color: rgb(255, 0, 0);";
320 if ($tipo=='lista') $errbordol="border: 6px solid; border-color: rgb(255, 0, 0);";
321}
322$bordoa=$bordoini.$errbordoa."'";
323$bordog=$bordoini.$errbordog."'";
324$bordol=$bordoini.$errbordol."'";
325echo "<SCRIPT type=\"text/javascript\">\n";
326echo "function vai_scelta(idrif){\n";
327echo "window.document.location.href=idrif\n";
328echo "}\n";
329echo "</script>\n";
330if($rese->rowCount()) $segna="style=\"background-color: #dd0000;\""; else $segna='';
331if($ops=="4" ) {$bgcolorg="yellow"; $tcolorg='blue';} else {$bgcolorg="grey"; $tcolorg='white';} #$active_gruppo=" class=\"ui-btn-active\""; else $active_gruppo='';
332if($ops=="3") {$bgcolorl="yellow"; $tcolorl='blue';} else {$bgcolorl="grey"; $tcolorl='white';} # $active_lista=" class=\"ui-btn-active\""; else $active_lista='';
333if($ops=="1") {$bgcolora="yellow"; $tcolora='blue';} else {$bgcolora="grey"; $tcolora='white';} # $active_aff=" class=\"ui-btn-active\""; else $active_aff='';
334echo "<div data-role=\"content\" data-theme=\"a\"><hr><h2>Sezione n. $num_sez";
335$sql="SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'";
336$res = $dbi->prepare("$sql");
337$res->execute();
338list($chiusa) = $res->fetch(PDO::FETCH_NUM);
339if ($chiusa==1) echo " -- CONSULTAZIONE NON ATTIVA";
340echo "</h2><table style=\"margin-left:auto; margin-right:auto;\"><tr>";
341#<a href=\"admin.php?id_comune=$id_comune&amp;id_cons_gen=$id_cons_gen&amp;ops=1\"></a>
342echo "\n<td bgcolor=\"$bgcolora\" align=\"center\" $bordoa onClick=\"vai_scelta('admin.php?op=voti&amp;id_comune=$id_comune&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;do=spoglio&amp;ops=1');\"><p style=\"margin-left:10px;margin-right:10px;\"><font color=\"$tcolora\"><b>"._AFFLUENZE."</font></b></p></td>\n";
343if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){
344 echo "<td bgcolor=\"$bgcolorg\" align=\"center\" $bordog onClick=\"vai_scelta('admin.php?op=voti&amp;id_comune=$id_comune&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;do=spoglio&amp;ops=4');\"><p style=\"margin-left:10px;margin-right:10px;\"><b><font color=\"$tcolorg\">"._GRUPPO."</font></b></p></td>\n";
345}
346if($genere==2 and $votog)
347 echo "<td bgcolor=\"$bgcolorg\" align=\"center\" $bordog onClick=\"vai_scelta('admin.php?op=voti&amp;id_comune=$id_comune&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;do=spoglio&amp;ops=4');\"><p style=\"margin-left:10px;margin-right:10px;\"><b><font color=\"$tcolorg\">"._GRUPPO."</font></b></p></td>\n";
348elseif($genere>=4 and !$votoc)
349 echo "<td bgcolor=\"$bgcolorl\" align=\"center\"$bordol onClick=\"vai_scelta('admin.php?op=voti&amp;id_comune=$id_comune&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;do=spoglio&amp;ops=3');\"><p style=\"margin-left:10px;margin-right:10px;\"><b><font color=\"$tcolorl\">"._LISTAPREF."</font></b></p></td>\n";
350elseif(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){
351 echo "<td bgcolor=\"$bgcolorl\" align=\"center\"$bordol onClick=\"vai_scelta('admin.php?op=voti&amp;id_comune=$id_comune&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;do=spoglio&amp;ops=3');\"><p style=\"margin-left:10px;margin-right:10px;\"><b><font color=\"$tcolorl\">"._LISTA."</font></b></p></td>\n";
352}
353echo "</tr></table><hr></div>\n";
354/*
355 echo "<hr><table><tr><td width=\"200\"><font size =\"4\" color=\"black\" align=\"left\"><b>Sezione N. $num_sez</b></font></td><td><table><tr>";
356 echo "\n<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=1\">"._AFFLUENZE."</a></b></p></td>\n";
357 if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){
358 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=4\">"._GRUPPO."</a></b></p></td>\n";
359 }
360 if($genere==2 and $votog)
361 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=4\">"._GRUPPO."</a></b></p></td>\n";
362 elseif(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){
363 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&amp;id_cons_gen=$id_cons_gen&amp;id_sez=$id_sez&amp;id_circ=$id_circ&amp;id_sede=$id_sede&amp;do=spoglio&amp;ops=3\">"._LISTA."</a></b></p></td>\n";
364 }
365 echo "</tr></table></td></tr></table><hr>\n";
366*/
367#############
368# posizionamento in mancanza di scelta
369#############
370if (!$ops){
371 if (!$id_sez) { echo"";#import( pagina di help );
372 } else{
373 $sql="SELECT data, orario from ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc,orario desc limit 0,1";
374 $res = $dbi->prepare("$sql");
375 $res->execute();
376 list($data,$orario)=$res->fetch(PDO::FETCH_NUM);
377 $sql="SELECT voti_complessivi from ".$prefix."_ele_voti_parziale where id_sez='$id_sez' and orario='$orario' and data='$data'";
378 $res = $dbi->prepare("$sql");
379 $res->execute();
380 list($voti) = $res->fetch(PDO::FETCH_NUM);
381 if (!$voti) $ops=1;
382 else {
383 if($genere<4){
384 $sql="SELECT sum(voti) from ".$prefix."_ele_voti_gruppo where id_sez='$id_sez'";
385 $res = $dbi->prepare("$sql");
386 $res->execute();
387 list($voti) = $res->fetch(PDO::FETCH_NUM);
388 if ($voti==0 or $genere<3) $ops=4;
389 }
390 if(!$ops) $ops=3;
391 }
392
393 }
394}
395############ fine posizionamento
396
397 ///////////////////////////////////////////
398 // opzioni per le funzioni di immissione
399
400 if ($ops == 1) {
401 votanti($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops,$ov,$mv,$gv,$msv,$av);
402 }else{
403############# Controllo flag per cancellazione consultazione
404 echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n"
405 ."//-->\n";
406 echo "function del_dati() {\n";
407 echo "if (document.getElementById('pwd3').checked==false) {\n";
408 echo "document.getElementById('update').value=\""._OK."\" \n";
409 echo "document.getElementById('do').value=\"0\" \n";
410 echo "}else{\n";
411 echo "document.getElementById('update').value=\""._DELETE."\" \n";
412 echo "document.getElementById('do').value=\"1\" \n";
413 echo "} \n";
414 echo "} \n";
415 echo "</script>\n";
416 }
417 if ($ops == 3) {
418 preferenze($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops);
419 }
420 if ($ops == 4) {
421 preferenze_gruppi($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops);
422
423 }
424
425 }
426 CloseTable();
427
428}
429
430
431
432
433 if (!preg_match("/rec/",$op)) {
434 ele(); //menu
435/* echo "\n<table align=\"left\" border=\"0\" width=\"200\"><tr bgcolor=\"$bgcolor1\">";
436 numeri_sezione(8);
437 echo "<td></td></tr></table>\n";*/
438 echo"</td></tr></table>";
439 }
440
441 switch ($op){
442 case "voti": //fa eccezione perche' chiamata con minor numero di parametri - riesaminare
443# voti($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops,$ov,$mv,$gv,$msv,$av,$id_lista);
444 voti($id_cons,$do,$id_circ,$id_sede,$ops,$ov,$mv,$gv,$msv,$av,$id_lista);
445 break;
446 case "rec_add_votanti":
447 rec_add_votanti($vari);
448 break;
449 default :
450 $op($vari); //chiamata a funzione variabile con parametri variabili (da cambiare!)
451 }
452echo"</td></tr></table>";
453 include_once("modules/Elezioni/language/lang-$currentlang.php");
454 include ("footer.php");
455?>
456
Note: See TracBrowser for help on using the repository browser.