Changeset 86 for trunk/admin/modules/Elezioni/ele_associazioni.php
- Timestamp:
- Apr 26, 2011, 10:41:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_associazioni.php
r79 r86 41 41 if (isset($_GET['min'])) $min=intval($_GET['min']); else $min=0; 42 42 if (isset($_GET['help'])) $help=intval($_GET['help']); 43 if (isset($_GET['pwd4'])) $pwd4=intval($_GET['pwd4']); 43 44 44 45 $offset=15; … … 61 62 echo "if (document.model.pwd3.checked==false) {\n"; 62 63 echo "document.model.chiusa.options[3].selected=false \n"; 64 echo "document.model.pwd4.checked=false \n"; 65 echo "document.getElementById('trspunta').style.visibility='hidden' \n"; 63 66 echo "} \n"; 67 echo "else document.getElementById('trspunta').style.visibility='visible' \n"; 64 68 echo "if (document.model.chiusa.options[3].selected==false) { 65 69 \n"; … … 67 71 echo "document.model.do.value=\"update\" \n"; 68 72 echo "}else{\n"; 69 echo "document.model.add.value=\""._DELETE." "._CONSULTA."\" \n"; 73 echo "if (document.model.pwd4.checked==false) \n"; 74 echo "document.model.add.value=\""._DELETE." "._DATI."\" \n"; 75 echo "else document.model.add.value=\""._DELETE." "._CONSULTA."\" \n"; 70 76 echo "document.model.do.value=\"delete\" \n"; 71 77 echo "} \n"; … … 150 156 echo "<input type=\"hidden\" name=\"idcomune\" value=\"$idcomune\">"; 151 157 echo "<input type=\"submit\" name=\"add\" value=\""._MODIFY."\" ></td></tr>"; 152 echo "<tr><td colspan=\"4\"><fieldset><legend>Abilita la cancellazione</legend><label id=\"prov\">"._SPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd3\" value=\"\" onchange=\"del_cons()\"></label></fieldset>"; 158 echo "<tr><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov1\">"._SPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd3\" value=\"\" onchange=\"del_cons()\"></label></fieldset></td></tr>"; 159 echo "<tr id=\"trspunta\" style=\"visibility:hidden\"><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL2."</legend><label id=\"prov\">"._VIASPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd4\" value=\"1\" onchange=\"del_cons()\"></label></fieldset>"; 153 160 }else{ 154 161 echo "<input type=\"hidden\" name=\"do\" value=\"add\">"; … … 206 213 207 214 function associazioni($ok, $do,$descr_comu,$id_cons_comu,$id_collegio,$id_comune,$chiusa,$id_conf) { 208 global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons,$genere,$id_cons_gen,$idcomunenew ;215 global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons,$genere,$id_cons_gen,$idcomunenew,$pwd4; 209 216 $delcons=0; 210 217 if ($do !="" and $id_cons_gen>0 and $idcomunenew>0) { … … 235 242 $res_del = mysql_query("delete from ".$prefix."_ele_voti_gruppo where id_cons=$idcns" ,$dbi); 236 243 $res_del = mysql_query("delete from ".$prefix."_ele_voti_parziale where id_cons=$idcns" ,$dbi); 244 if ($pwd4==1){ 237 245 $res_del = mysql_query("delete from ".$prefix."_ele_candidati where id_cons=$idcns" ,$dbi); 238 246 $res_del = mysql_query("delete from ".$prefix."_ele_lista where id_cons=$idcns" ,$dbi); … … 240 248 $res_del = mysql_query("delete from ".$prefix."_ele_sezioni where id_cons=$idcns" ,$dbi); 241 249 $res_del = mysql_query("delete from ".$prefix."_ele_cons_comune where id_cons=$idcns" ,$dbi); 250 }else{ 251 $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); 242 252 253 } 243 254 Header("Location: admin.php?op=associazioni&id_cons_gen=$id_cons_gen"); 244 255 }
Note:
See TracChangeset
for help on using the changeset viewer.