Changeset 87 for trunk/admin
- Timestamp:
- May 2, 2011, 7:57:24 PM (14 years ago)
- Location:
- trunk/admin/modules/Elezioni
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_associazioni.php
r86 r87 57 57 $prefix=$_SESSION['prefix']; 58 58 ############# Controllo flag per cancellazione consultazione 59 echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n" 60 ."//-->\n"; 61 echo "function del_cons() {\n"; 62 echo "if (document.model.pwd3.checked==false) {\n"; 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"; 66 echo "} \n"; 67 echo "else document.getElementById('trspunta').style.visibility='visible' \n"; 68 echo "if (document.model.chiusa.options[3].selected==false) { 69 \n"; 70 echo "document.model.add.value=\""._MODIFY."\" \n"; 71 echo "document.model.do.value=\"update\" \n"; 72 echo "}else{\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"; 76 echo "document.model.do.value=\"delete\" \n"; 77 echo "} \n"; 78 echo "} \n"; 79 echo "</script>\n"; 59 echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n" 60 ."//-->\n"; 61 echo "function del_cons() {\n"; 62 echo "if (document.getElementById('pwd3').checked==false) {\n"; 63 echo "if (document.getElementById('chiusa').selectedIndex==3) document.getElementById('chiusa').options[0].selected=true \n"; 64 echo "document.getElementById('pwd4').checked=false \n"; 65 echo "document.getElementById('trspunta').style.visibility='hidden' \n"; 66 echo "} \n"; 67 echo "else document.getElementById('trspunta').style.visibility='visible' \n"; 68 # echo "if (document.getElementById('chiusa').options[3].selected==false) { \n"; 69 echo "if (document.getElementById('chiusa').selectedIndex!=3) { \n"; 70 echo "document.getElementById('add').value=\""._MODIFY."\" \n"; 71 echo "document.getElementById('do').value=\"update\" \n"; 72 echo "}else{\n"; 73 echo "if (document.getElementById('pwd4').checked==false) \n"; 74 echo "document.getElementById('add').value=\""._DELETE." "._DATI."\" \n"; 75 echo "else document.getElementById('add').value=\""._DELETE." "._CONSULTA."\" \n"; 76 echo "document.getElementById('do').value=\"delete\" \n"; 77 echo "} \n"; 78 echo "} \n"; 79 echo "</script>\n"; 80 81 80 82 ######################### 81 83 if (isset($help)) include("language/$language/ele_associazioni.html"); … … 131 133 $selez['3']=''; 132 134 $selez[$chiusa]="selected"; 133 echo "<td><select name=\"chiusa\" onChange=\"del_cons()\">";135 echo "<td><select name=\"chiusa\" id=\"chiusa\" onChange=\"javascript:del_cons()\">"; 134 136 echo "<option value=\"0\" ".$selez[0].">"._ATTIVA; 135 137 echo "<option value=\"1\" ".$selez[1].">"._CHIUSA; … … 153 155 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">"; 154 156 if ($idcomune) { 155 echo "<input type=\"hidden\" name=\"do\" value=\"update\">";157 echo "<input type=\"hidden\" id=\"do\" name=\"do\" value=\"update\">"; 156 158 echo "<input type=\"hidden\" name=\"idcomune\" value=\"$idcomune\">"; 157 echo "<input type=\"submit\" name=\"add\" value=\""._MODIFY."\" ></td></tr>"; 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>"; 159 echo "<input type=\"submit\" id=\"add\" name=\"add\" value=\""._MODIFY."\" ></td></tr>"; 160 echo "<tr><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov1\">"._SPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd3\" name=\"pwd3\" value=\"\" onclick=\"javascript:del_cons()\"></label></fieldset></td></tr>"; 161 # <div id=\"trspunta\" style=\"visibility:hidden\"> </div> 162 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>"; 160 163 }else{ 161 164 echo "<input type=\"hidden\" name=\"do\" value=\"add\">"; … … 209 212 echo "</table></td></tr>"; 210 213 CloseTable(); 211 echo "</div>";214 # echo "</div>"; 212 215 } 213 216 … … 275 278 ?> 276 279 280 -
trunk/admin/modules/Elezioni/ele_candidato.php
r37 r87 239 239 ele(); 240 240 echo "<center><br><br>"._DOMCANCELLA." "._CANDIDATO." $cognome $nome ?<br>"; 241 echo "[ <a href=\"admin.php?op=candidato&id_cons_gen=$id_cons_gen\">"._NO."</a> ] - [<a href=\"admin.php?op=candidato&do=delete&id_cand=$id_cand&id_gruppo=$id_gruppo&id_cons=$id_cons&id_circ=$id_circ&ok=1&id_cons_gen=$id_cons_gen&id_lista=$id_lista&id_comune=$id_comune \">"._YES."</a> ]";241 echo "[ <a href=\"admin.php?op=candidato&id_cons_gen=$id_cons_gen\">"._NO."</a> ] - [<a href=\"admin.php?op=candidato&do=delete&id_cand=$id_cand&id_gruppo=$id_gruppo&id_cons=$id_cons&id_circ=$id_circ&ok=1&id_cons_gen=$id_cons_gen&id_lista=$id_lista&id_comune=$id_comune&min=$min\">"._YES."</a> ]"; 242 242 }else{ 243 243 $pro= mysql_fetch_array($res, MYSQL_ASSOC); … … 245 245 mysql_query("insert into ".$prefix."_ele_log values ('$id_cons','$id_sez','$username','$data','$tempo','DELETE:id_lista:$pro[id_lista],cognome:$pro[cognome],nome:$pro[nome]','','".$prefix."_ele_candidati')", $dbi); 246 246 if (!$result)return; 247 Header("Location: admin.php?op=candidato&id_cons=$id_cons&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ&id_lista=$id_lista ");247 Header("Location: admin.php?op=candidato&id_cons=$id_cons&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ&id_lista=$id_lista&min=$min"); 248 248 } 249 249 }elseif ($do == "add") { … … 261 261 mysql_query("insert into ".$prefix."_ele_log values ('$id_cons','$id_sez','$username','$data','$tempo','','ADD:id_lista:$id_lista,cognome:$cognome,nome:$nome','".$prefix."_ele_candidati')", $dbi); 262 262 if (!$result) return; 263 Header("Location: admin.php?op=candidato&id_cons=$id_cons&id_lista=$id_lista&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ ");263 Header("Location: admin.php?op=candidato&id_cons=$id_cons&id_lista=$id_lista&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ&min=$min"); 264 264 } else { 265 265 ele(); 266 266 OpenTable(); 267 267 echo "<center>"._GESTIONE." "._CANDIDATO." "; 268 echo "<br><br><a href=\"admin.php?op=candidato&id_cons=$id_cons&id_lista=$id_lista&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ \">"._IMM." "._CANDIDATO."</a></center>";268 echo "<br><br><a href=\"admin.php?op=candidato&id_cons=$id_cons&id_lista=$id_lista&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ&min=$min\">"._IMM." "._CANDIDATO."</a></center>"; 269 269 CloseTable();exit; 270 270 } … … 280 280 mysql_query("insert into ".$prefix."_ele_log values ('$id_cons','$id_sez','$username','$data','$tempo','UPDATE:id_lista:$pro[id_lista],cognome:$pro[cognome],nome:$pro[nome],num_cand:$pro[num_cand]','id_lista:$id_lista,cognome:$cognome,nome:$nome,num_cand:$num_cand','".$prefix."_ele_candidati')", $dbi); 281 281 if (!$result) return; 282 Header("Location: admin.php?op=candidato&id_cons=$id_cons&id_lista=$id_lista&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ ");282 Header("Location: admin.php?op=candidato&id_cons=$id_cons&id_lista=$id_lista&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ&min=$min"); 283 283 } 284 284 -
trunk/admin/modules/Elezioni/ele_consultazioni.php
r79 r87 133 133 $resdel = mysql_query("SELECT * FROM ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen'", $dbi); 134 134 if(mysql_num_rows($resdel)==0) 135 echo "<td><fieldset><legend> Abilita la cancellazione</legend><label id=\"prov\">"._SPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd3\" value=\"\" onchange=\"del_cons()\"></label></fieldset></td>";135 echo "<td><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov\">"._VIASPUNTAELIMINA." <input type=\"checkbox\" name=\"pwd3\" value=\"\" onchange=\"del_cons()\"></label></fieldset></td>"; 136 136 else echo "<td></td>"; 137 137 echo "<td><input type=\"submit\" name=\"update\" value=\""._MODIFY."\">" … … 222 222 if ($perms>=128) { 223 223 if ($do == "delete") { 224 $result = mysql_query("delete from ".$prefix."_ele_rilaff where id_cons_gen='$id_cons_gen'", $dbi); 225 if (!$result) return; 224 226 $result = mysql_query("delete from ".$prefix."_ele_consultazione where id_cons_gen='$id_cons_gen'", $dbi); 225 227 if (!$result) return; … … 284 286 285 287 ?> 286 -
trunk/admin/modules/Elezioni/ele_gruppo.php
r86 r87 169 169 ele(); 170 170 echo "<center><br><br>"._DOMCANCELLA." "._GRUPPO." $descr_gruppo ?<br>"; 171 echo "[ <a href=\"admin.php?op=gruppo&id_cons_gen=$id_cons_gen&id_circ=$id_circ\">"._NO."</a> ] - [<a href=\"admin.php?op=gruppo&do=delete&id_gruppo=$id_gruppo&id_cons_gen=$id_cons_gen&id_comune=$id_comune& ok=1\">"._YES."</a> ]";exit;171 echo "[ <a href=\"admin.php?op=gruppo&id_cons_gen=$id_cons_gen&id_circ=$id_circ\">"._NO."</a> ] - [<a href=\"admin.php?op=gruppo&do=delete&id_gruppo=$id_gruppo&id_cons_gen=$id_cons_gen&id_comune=$id_comune&min=$min&ok=1\">"._YES."</a> ]";exit; 172 172 }else{ 173 173 $result = mysql_query("delete from ".$prefix."_ele_gruppo where id_gruppo='$id_gruppo'", $dbi); … … 209 209 OpenTable(); 210 210 echo "<center>"._GESTIONE." "._GRUPPO." "; 211 echo "<br><br><a href=\"admin.php?op=gruppo&id_cons_gen=$id_cons_gen \">"._IMM." "._GRUPPO."</a></center>";211 echo "<br><br><a href=\"admin.php?op=gruppo&id_cons_gen=$id_cons_gen&min=$min\">"._IMM." "._GRUPPO."</a></center>"; 212 212 CloseTable(); 213 213 } -
trunk/admin/modules/Elezioni/ele_lista.php
r39 r87 209 209 $result = mysql_query("delete from ".$prefix."_ele_lista where id_lista='$id_lista'", $dbi); 210 210 if (!$result)return; 211 Header("Location: admin.php?op=lista&id_circ=$id_circ&id_cons_gen=$id_cons_gen ");211 Header("Location: admin.php?op=lista&id_circ=$id_circ&id_cons_gen=$id_cons_gen&min=$min"); 212 212 } 213 213 }elseif ($do == "add") {
Note:
See TracChangeset
for help on using the changeset viewer.