source: trunk/admin/modules/Elezioni/ele_associazioni.php@ 189

Last change on this file since 189 was 189, checked in by roby, 11 years ago
  • modificato il db per gestire la modifica di fascia del comune per le elezioni comunali e per la rilevazione delle affluenze con distinzione per maschi e femmine.
File size: 19.6 KB
Line 
1<?php
2
3/************************************************************************/
4/* Eleonline - Raccolta e diffusione dei dati elettorali */
5/* by Roberto Gigli & Luciano Apolito */
6/* http://www.eleonline.it */
7/* info@eleonline.it luciano@aniene.net rgigli@libero.it */
8/************************************************************************/
9/* Modulo Autorizzazione Comuni */
10/* Amministrazione */
11/************************************************************************/
12# e' l'unico file in cui Ú presente un controllo su tipo_cons, per ora va bene così. Per toglierlo va inserito un campo-flag in ele_tipo per indicare se per il tipo di consultazione si dovra' procedere al calcolo dell'assegnazione dei seggi
13if (!defined('ADMIN_FILE')) {
14 die ("You can't access this file directly...");
15}
16
17$aid=$_SESSION['aid'];
18$dbi=$_SESSION['dbi'];
19$prefix=$_SESSION['prefix'];
20$id_comune=$_SESSION['id_comune'];
21$id_cons_gen=intval($_GET['id_cons_gen']);
22$perms=ChiSei(0);
23if ($perms<128 or !$id_cons_gen) die("$perms Non hai i permessi per inserire dati, o non hai scelto la consultazione!");
24$res = mysql_query("SELECT t1.tipo_cons,t1.descrizione,t2.id_cons,t2.id_conf FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune='$id_comune' " , $dbi);
25list($tipo_cons,$descr_cons,$id_cons,$id_conf) = mysql_fetch_row($res);
26
27$res = mysql_query("SELECT genere FROM ".$prefix."_ele_tipo where tipo_cons='$tipo_cons' " , $dbi);
28 list($genere) = mysql_fetch_row($res);
29
30include("modules/Elezioni/funzionidata.php");
31include("modules/Elezioni/ele.php");
32if (isset($_GET['descr_comu'])) get_magic_quotes_gpc() ? $descr_comu=$param['descr_comu']:$descr_comu=addslashes($param['descr_comu']); else $descr_comu='';
33if (isset($_GET['do'])) get_magic_quotes_gpc() ? $do=$param['do']:$do=addslashes($param['do']); else $do='';
34if (isset($_GET['ok'])) $ok=intval($_GET['ok']); else $ok='';
35if (isset($_GET['id_cons_comu'])) $id_cons_comu=intval($_GET['id_cons_comu']); else $id_cons_comu='';
36if (isset($_GET['id_collegio'])) $id_collegio=intval($_GET['id_collegio']); else $id_collegio='';
37if (isset($_GET['idcomune'])) $idcomune=intval($_GET['idcomune']); else $idcomune='';
38if (isset($_GET['idcomunenew'])) $idcomunenew=intval($_GET['idcomunenew']); else $idcomunenew='';
39if (isset($_GET['chiusa'])) $chiusa=intval($_GET['chiusa']); else $chiusa='';
40if (isset($_GET['id_conf'])) $id_conf=intval($_GET['id_conf']); else $id_conf=0;
41if (isset($_GET['idfascia'])) $idfascia=intval($_GET['idfascia']); else $idfascia=0;
42if (isset($_GET['min'])) $min=intval($_GET['min']); else $min=0;
43if (isset($_GET['help'])) $help=intval($_GET['help']);
44if (isset($_GET['pwd4'])) $pwd4=intval($_GET['pwd4']);
45if (isset($_GET['preferenze'])) $preferenze=intval($_GET['preferenze']); else $preferenze=1;
46if (isset($_GET['vismf'])) $vismf=intval($_GET['vismf']); else $vismf=0;
47
48$offset=15;
49$hiddenInfo = "<input type=\"hidden\" name=\"min\" value=\"$min\">";
50
51
52 /******************************************************/
53 /*Funzione di visualizzazione globale */
54 /*****************************************************/
55 //
56 function all() {
57 global $user, $admin, $bgcolor1, $bgcolor2, $prefix,$descr_cons, $dbi,$id_cons,$desc,$indirizzo,$centralino,$fax,$id_cons_gen,$id_collegio,$idcomune,$chiusa,$id_conf,$tipo_cons,$language,$help,$preferenze,$idfascia,$vismf;
58$aid=$_SESSION['aid'];
59$dbi=$_SESSION['dbi'];
60$prefix=$_SESSION['prefix'];
61############# Controllo flag per cancellazione consultazione
62 echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n"
63 ."//-->\n";
64 echo "function del_cons() {\n";
65 echo "if (document.getElementById('pwd3').checked==false) {\n";
66 echo "if (document.getElementById('chiusa').selectedIndex==3) document.getElementById('chiusa').options[0].selected=true \n";
67 echo "document.getElementById('pwd4').checked=false \n";
68 echo "document.getElementById('trspunta').style.visibility='hidden' \n";
69 echo "} \n";
70 echo "else document.getElementById('trspunta').style.visibility='visible' \n";
71# echo "if (document.getElementById('chiusa').options[3].selected==false) { \n";
72 echo "if (document.getElementById('chiusa').selectedIndex!=3) { \n";
73 echo "document.getElementById('add').value=\""._MODIFY."\" \n";
74 echo "document.getElementById('do').value=\"update\" \n";
75 echo "}else{\n";
76 echo "if (document.getElementById('pwd4').checked==false) \n";
77 echo "document.getElementById('add').value=\""._DELETE." "._DATI."\" \n";
78 echo "else document.getElementById('add').value=\""._DELETE." "._CONSULTA."\" \n";
79 echo "document.getElementById('do').value=\"delete\" \n";
80 echo "} \n";
81 echo "} \n";
82 echo "</script>\n";
83
84
85#########################
86 if (isset($help)) include("language/$language/ele_associazioni.html");
87 OpenTable();
88 echo "<tr><td><hr><br>";
89 $res = mysql_query("SELECT descrizione FROM ".$prefix."_ele_consultazione where id_cons_gen='$id_cons_gen'" , $dbi);
90 list ($descr_cons) = mysql_fetch_row($res);
91//inserire avviso su mancanza dei permessi
92 echo "<form name=\"model\" action=\"admin.php\">";
93 echo "<table width=\"100%\" border=\"3\">";
94 echo "<tr align=\"center\"><td bgcolor=\"$bgcolor1\"><b>"._CONSULTA."</b></td>";
95# echo "<td bgcolor=\"$bgcolor1\"><b>"._COLLEGI."</b></td>";
96 echo "<td bgcolor=\"$bgcolor1\"><b>"._DEFCOMUNE."</b></td>";
97 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._PREFERENZE."</b></td>";
98 echo "<td bgcolor=\"$bgcolor1\"><b>"._STATO."</b></td>";
99 if($tipo_cons==3){
100 echo "<td bgcolor=\"$bgcolor1\"><b>"._CONF."</b></td>";
101 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._FASCIA."</b></td>";
102 }
103 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._VISAFFMF."</b></td>";
104# echo "<input type=\"hidden\" name=\"pag_cons\" value=\"admin.php?op=associazioni&amp;id_cons_gen=\">";
105 echo "</tr>";
106 echo "<tr align=\"center\"><td>";
107 echo "<input type=\"hidden\" name=\"op\" value=\"associazioni\">";
108 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">$descr_cons</td>";
109# $ressede = mysql_query("SELECT id_collegio, descrizione from ".$prefix."_ele_collegi where id_cons_gen='$id_cons_gen' order by descrizione desc", $dbi);
110# if ($num_coll=mysql_num_rows($ressede)){
111# echo "<td><select name=\"id_collegio\">";
112# while(list($id,$descr_coll)=mysql_fetch_row($ressede)){
113# $sel= ($id == $id_collegio) ? "selected":"";
114# echo "<option value=\"$id\" $sel>$descr_coll";
115# }
116# echo "</select></td>";
117# } else echo "<td></td>";
118 $rescomu = mysql_query("SELECT id_comune, descrizione from ".$prefix."_ele_comuni order by descrizione asc", $dbi);
119 echo "<td>";
120 if($idcomune) {
121 while ($listele=mysql_fetch_array($rescomu))
122 if($listele['id_comune']==$idcomune) {
123 echo $listele['descrizione'];
124 echo "<input type=\"hidden\" name=\"idcomunenew\" value=\"$idcomune\">";
125 }
126
127 }else{
128 echo "<select name=\"idcomunenew\">";
129 echo "<option value=\"0\"> ";
130 while(list($id,$descr_comu)=mysql_fetch_row($rescomu)){
131 $sel= ($id == $idcomune) ? "selected":"";
132 echo "<option value=\"$id\" $sel>$descr_comu";
133 }
134 echo "</select>";
135 }
136 echo "</td>";
137 echo "<td><input type=\"text\" name=\"preferenze\" value=\"$preferenze\" size=\"2\"></td>";
138 $selez['0']='';
139 $selez['1']='';
140 $selez['2']='';
141 $selez['3']='';
142 $selez[$chiusa]="selected";
143 echo "<td><select name=\"chiusa\" id=\"chiusa\" onChange=\"javascript:del_cons()\">";
144 echo "<option value=\"0\" ".$selez[0].">"._ATTIVA;
145 echo "<option value=\"1\" ".$selez[1].">"._CHIUSA;
146 echo "<option value=\"2\" ".$selez[2].">"._NULLA;
147
148 if($idcomune) echo "<option value=\"3\" ".$selez[3].">"._ELIMINA;
149 echo "</select></td>";
150 if($tipo_cons==3){
151 if($idcomune) {
152 $rescomu = mysql_query("SELECT id_fascia from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen' and id_comune='$idcomune'", $dbi);
153 if($rescomu)
154 list($fasciacom)=mysql_fetch_row($rescomu);
155 } else $fasciacom=0;
156 $rescomu = mysql_query("SELECT id_conf, descrizione from ".$prefix."_ele_conf order by descrizione asc", $dbi);
157 echo "<td><select name=\"id_conf\" id=\"id_conf\" onchange=\"javascript:showdate('modules/Elezioni/ele_desc_fasce.php?fascia=$fasciacom&id_conf=' + model.id_conf.options[model.id_conf.selectedIndex].value,'fasceconf');\">";
158 echo "<option value=\"0\"> ";
159 while(list($id,$descr_conf)=mysql_fetch_row($rescomu)){
160 $sel='';
161 if ($idcomune and $id == $id_conf) $sel="selected"; elseif ($id==1) $sel="selected";
162 echo "<option value=\"$id\" $sel>$descr_conf";
163 }
164 echo "</select></td>";
165 if(!$id_conf) $id_conf=1;
166 $rescomu = mysql_query("SELECT id_fascia,abitanti from ".$prefix."_ele_fasce where id_conf='$id_conf'", $dbi);
167
168 echo "<td id=\"fasceconf\"><select name=\"idfascia\">";
169 echo "<option value=\"0\"> ";
170 $inffascia=0;
171 while(list($id,$abitanti)=mysql_fetch_row($rescomu)){
172 $sel='';
173 if ($idcomune and $id == $fasciacom) $sel="selected"; elseif ($id==1) $sel="selected";
174 echo "<option value=\"$id\" $sel>$inffascia - $abitanti";
175 $inffascia=$abitanti;
176 }
177 echo "</select></td>";
178
179
180 }
181 unset($sel);
182 $rescomu = mysql_query("SELECT vismf from ".$prefix."_ele_cons_comune where id_cons='$id_cons'", $dbi);
183 list($vismf)=mysql_fetch_row($rescomu);
184 echo "<td><select name=\"vismf\">";
185 if ($vismf==0) $sel="selected"; else $sel="";
186 echo "<option value=\"0\" $sel>No";
187 if ($vismf==1) $sel="selected"; else $sel="";
188 echo "<option value=\"1\" $sel>Si";
189 echo "</select></td>";
190
191 echo "<td><input type=\"hidden\" name=\"ok\" value=0>";
192 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
193 if ($idcomune) {
194 echo "<input type=\"hidden\" id=\"do\" name=\"do\" value=\"update\">";
195 echo "<input type=\"hidden\" name=\"idcomune\" value=\"$idcomune\">";
196 echo "<input type=\"submit\" id=\"add\" name=\"add\" value=\""._MODIFY."\" ></td></tr>";
197 echo "<tr><td colspan=\"5\"><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov1\">"._SPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd3\" name=\"pwd3\" value=\"\" onclick=\"javascript:del_cons()\"></label></fieldset></td></tr>";
198# <div id=\"trspunta\" style=\"visibility:hidden\"> </div>
199 echo "<tr id=\"trspunta\" style=\"visibility:hidden\"><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL2."</legend><label id=\"prov\">"._VIASPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd4\" name=\"pwd4\" value=\"1\" onclick=\"javascript:del_cons()\"></label></fieldset>";
200 }else{
201 echo "<input type=\"hidden\" name=\"do\" value=\"add\">";
202 echo "<input type=\"submit\" name=\"add\" value=\""._ADD."\">";
203 }
204 $i=0;
205 echo "</td></tr></table></form>";
206############
207 echo "<hr><br><table width=\"100%\" border=\"3\">";
208 echo "<tr align=\"center\"><td width=\"15%\" bgcolor=\"$bgcolor1\"><b>"._CONSULTA."</b></td>";
209# echo "<td bgcolor=\"$bgcolor1\"><b>"._COLLEGI."</b></td>";
210 echo "<td width=\"20%\" bgcolor=\"$bgcolor1\"><b>"._DEFCOMUNE."</b></td>";
211 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._PREFERENZE."</b></td>";
212 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._STATO."</b></td>";
213 if($tipo_cons==3){
214 echo "<td width=\"20%\" bgcolor=\"$bgcolor1\"><b>"._CONF."</b></td>";
215 echo "<td width=\"20%\" bgcolor=\"$bgcolor1\" align=\"center\"><b>"._FASCIA."</b></td>";
216 }
217 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\" align=\"center\"><b>"._VISAFFMF."</b></td>";
218 echo "<td width=\"10\" bgcolor=\"$bgcolor1\"><b>&nbsp;"._FUNZIONI."</td></tr>";
219###############
220
221# if ($num_coll>0)
222# $resmod = mysql_query("SELECT t1.id_collegio,t1.id_comune,t2.descrizione as descr,t1.id_cons, t3.descrizione, t4.chiusa,t4.id_conf FROM ".$prefix."_ele_comu_collegi as t1, ".$prefix."_ele_collegi as t2, ".$prefix."_ele_comuni as t3, ".$prefix."_ele_cons_comune as t4 where t1.id_cons_gen='$id_cons_gen' and t1.id_collegio=t2.id_collegio and t1.id_comune=t3.id_comune and t1.id_comune=t4.id_comune and t2.id_cons_gen=t4.id_cons_gen order by t2.descrizione, t3.descrizione", $dbi);
223# else
224 $resmod = mysql_query("SELECT '',t1.id_comune,'',t1.id_cons, t2.descrizione, t1.chiusa, t1.id_conf, preferenze,t1.id_fascia,t1.vismf FROM ".$prefix."_ele_cons_comune as t1, ".$prefix."_ele_comuni as t2 where t1.id_cons_gen='$id_cons_gen' and t1.id_comune=t2.id_comune order by t2.descrizione", $dbi);
225 while (list($id_collegio,$id_comune2,$descr_coll,$id_cons_comu,$descr_comu, $chiusa,$id_conf,$preferenze2,$fasciacom,$vismf) = mysql_fetch_row($resmod)){ //elenco dei modelli inseriti
226 $resconf = mysql_query("SELECT descrizione FROM ".$prefix."_ele_conf where id_conf='$id_conf'", $dbi);
227 list($descr_conf) = mysql_fetch_row($resconf);
228 $i++;
229 $bgcolor1=($bgcolor1==$_SESSION['bgcolor1'])?$_SESSION['bgcolor2']:$_SESSION['bgcolor1'];
230 if($tipo_cons==3) echo "<tr><td colspan=\"8\">"; else echo "<tr><td colspan=\"6\">";
231 echo "<form name=\"modello$i\" action=\"admin.php\">"
232 ."<input type=\"hidden\" name=\"op\" value=\"associazioni\">";
233// echo "<input type=\"hidden\" name=\"do\" value=\"update\">";
234# echo "<input type=\"hidden\" name=\"id_collegio\" value=\"$id_collegio\">";
235 echo "<input type=\"hidden\" name=\"idcomune\" value=\"$id_comune2\">";
236 echo "<input type=\"hidden\" name=\"id_cons_comu\" value=\"$id_cons_comu\">";
237 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
238 echo "<input type=\"hidden\" name=\"desc\" value=\"$descr_cons\">";
239 echo "<input type=\"hidden\" name=\"preferenze\" value=\"$preferenze2\">";
240 echo "<input type=\"hidden\" name=\"chiusa\" value=\"$chiusa\">";
241 echo "<table width=\"100%\"><tr align=\"center\" bgcolor=\"$bgcolor1\">";
242 echo "<td width=\"15%\"><b>$descr_cons</b></td>";
243 echo "<td width=\"20%\"><b>$descr_comu</b></td>";
244 echo "<td width=\"10%\"><b>$preferenze2</b></td>";
245 $stato['0']=_ATTIVA;
246 $stato['1']=_CHIUSA;
247 $stato['2']=_NULLA;
248 echo "<td width=\"10%\"><b>".$stato[$chiusa]."</b></td>";
249 if($tipo_cons==3){
250 echo "<td width=\"20%\"><input type=\"hidden\" name=\"id_conf\" value=\"$id_conf\"><b>".$descr_conf."</b></td>";
251 $rescomu = mysql_query("SELECT id_fascia,abitanti from ".$prefix."_ele_fasce where id_conf='$id_conf'", $dbi);
252 $inffascia=0;
253 while(list($id,$abitanti)=mysql_fetch_row($rescomu)){
254 $sel='';
255 if ($id == $fasciacom)
256 echo "<td width=\"20%\">$inffascia - $abitanti</td>";
257 $inffascia=$abitanti;
258 }
259
260 }
261 if ($vismf==0) $sel=_NO; else $sel=_SI;
262 echo "<td width=\"10%\">$sel</td>";
263 echo "<td width=\"10\"><input type=\"hidden\" name=\"ok\" value=0><input type=\"submit\" name=\"edit$i\" value=\""._EDIT."\">"
264 ."</td></tr></table></form></td></tr>\n";
265 }
266 echo "</table></td></tr>";
267 echo "</table></td></tr>";
268 CloseTable();
269# echo "</div>";
270 }
271
272function associazioni($ok, $do,$descr_comu,$id_cons_comu,$id_collegio,$id_comune,$chiusa,$id_conf,$preferenze) {
273 global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons,$genere,$id_cons_gen,$idcomunenew,$pwd4,$idfascia,$vismf;
274 $delcons=0;
275 if ($do !="" and $id_cons_gen>0 and $idcomunenew>0) {
276 $rescomu = mysql_query("SELECT id_cons from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen' and id_comune='$idcomunenew'", $dbi);
277 $max = mysql_num_rows($rescomu); //esiste autorizzazione?
278 list($delcons)=mysql_fetch_row($rescomu);
279 if (!$max){ //se no la inserisce
280 $result = mysql_query("insert into ".$prefix."_ele_cons_comune (chiusa,id_comune,id_cons_gen,id_conf,preferenze,id_fascia,vismf) values ('0','$idcomunenew','$id_cons_gen','$id_conf','$preferenze','$idfascia','$vismf')", $dbi) || die("<br><br>Errore di inserimento: ".mysql_error());
281 $rescomu = mysql_query("SELECT id_cons from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen' and id_comune='$idcomunenew'", $dbi);
282 list($id_cons_comu)=mysql_fetch_row($rescomu);
283 $res = mysql_query("SELECT id_cons FROM ".$prefix."_ele_comuni where id_comune='$idcomunenew' ", $dbi);
284 list($id_cons_pred)=mysql_fetch_row($res);
285 if (!$id_cons_pred)
286 $res = mysql_query("update ".$prefix."_ele_comuni set id_cons='$id_cons_comu' where id_comune='$idcomunenew' ", $dbi);
287
288 }
289 if ($do == "update") {
290 if ($idcomunenew>0) $newid=", id_comune = $idcomunenew ";
291 else $newid='';
292 $result = mysql_query("update ".$prefix."_ele_comu_collegi set id_collegio= '$id_collegio' $newid where id_comune='$id_comune' and id_cons_gen='$id_cons_gen'", $dbi) || die(mysql_error());
293 if (!$result) return;
294 $result = mysql_query("update ".$prefix."_ele_cons_comune set id_conf='$id_conf', chiusa= '$chiusa', preferenze='$preferenze',id_fascia='$idfascia',vismf='$vismf' where id_comune='$id_comune' and id_cons_gen='$id_cons_gen'", $dbi)|| die(mysql_error());
295 Header("Location: admin.php?op=associazioni&id_cons_gen=$id_cons_gen");
296 }elseif ($do == "add") {
297 if ($id_collegio){
298 $result = mysql_query("insert into ".$prefix."_ele_comu_collegi (id_collegio,id_cons,id_comune,id_cons_gen) values ('$id_collegio','$id_cons_comu','$idcomunenew','$id_cons_gen')", $dbi) || die("<br><br>Errore di inserimento: ".mysql_error());
299 }
300 Header("Location: admin.php?op=associazioni&id_cons_gen=$id_cons_gen");
301 }elseif ($do == "delete" and $delcons>0) {
302 $idcns=$delcons;
303 $res_del = mysql_query("delete from ".$prefix."_ele_voti_ref where id_cons=$idcns" ,$dbi);
304 $res_del = mysql_query("delete from ".$prefix."_ele_voti_candidati where id_cons=$idcns" ,$dbi);
305 $res_del = mysql_query("delete from ".$prefix."_ele_voti_lista where id_cons=$idcns" ,$dbi);
306 $res_del = mysql_query("delete from ".$prefix."_ele_voti_gruppo where id_cons=$idcns" ,$dbi);
307 $res_del = mysql_query("delete from ".$prefix."_ele_voti_parziale where id_cons=$idcns" ,$dbi);
308 if ($pwd4==1){
309 $res_del = mysql_query("delete from ".$prefix."_ele_candidati where id_cons=$idcns" ,$dbi);
310 $res_del = mysql_query("delete from ".$prefix."_ele_lista where id_cons=$idcns" ,$dbi);
311 $res_del = mysql_query("delete from ".$prefix."_ele_gruppo where id_cons=$idcns" ,$dbi);
312 $res_del = mysql_query("delete from ".$prefix."_ele_sezioni where id_cons=$idcns" ,$dbi);
313 $res_del = mysql_query("delete from ".$prefix."_ele_cons_comune where id_cons=$idcns" ,$dbi);
314 $res = mysql_query("SELECT id_cons FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi);
315 list($id_cons_pred)=mysql_fetch_row($res);
316 if ($idcns==$id_cons_pred) {
317 $res = mysql_query("select id_cons from ".$prefix."_ele_cons_comune where id_comune=$id_comune order by id_cons desc limit 0,1" ,$dbi);
318 list($id_cons_pred)=mysql_fetch_row($res);
319 $res = mysql_query("update ".$prefix."_ele_comuni set id_cons='$id_cons_pred' where id_comune='$id_comune' ", $dbi);
320 }
321 }else{
322 $res_del = mysql_query("update ".$prefix."_ele_sezioni set validi='0', nulli='0', bianchi='0', contestati='0', solo_gruppo='0', autorizzati_m='0', autorizzati_f='0', voti_nulli='0', validi_lista='0', contestati_lista='0', voti_nulli_lista='0' where id_cons=$idcns" ,$dbi);
323
324 }
325 Header("Location: admin.php?op=associazioni&id_cons_gen=$id_cons_gen");
326 }
327 }
328}
329
330
331
332
333# die ("do:$do - id_cons:$id_cons_comu - idcomune:$id_comune - new: $idcomunenew");
334
335//****************************
336// switch
337//****************************
338 if ($op=="associazioni"){
339 associazioni($ok, $do,$descr_comu,$id_cons_comu,$id_collegio,$idcomune,$chiusa,$id_conf,$preferenze);
340 }
341 ele();
342 if (isset($_GET['id_cons_gen'])) $id_cons_gen=intval($_GET['id_cons_gen']); else $id_cons_gen='0';
343 all();
344 include("footer.php");
345
346?>
347
348
Note: See TracBrowser for help on using the repository browser.