[2] | 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 luciano@aniene.net rgigli@libero.it */
|
---|
| 7 | /************************************************************************/
|
---|
| 8 | /* Modulo gruppo */
|
---|
| 9 | /* Amministrazione */
|
---|
| 10 | /************************************************************************/
|
---|
| 11 | if (!defined('ADMIN_FILE')) {
|
---|
| 12 | die ("You can't access this file directly...");
|
---|
| 13 | }
|
---|
| 14 |
|
---|
[257] | 15 | global $dbi;
|
---|
[2] | 16 | $aid=$_SESSION['aid'];
|
---|
| 17 | $prefix=$_SESSION['prefix'];
|
---|
| 18 | $currentlang=$_SESSION['lang'];
|
---|
| 19 | $param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST;
|
---|
| 20 | $id_cons_gen=intval($param['id_cons_gen']);
|
---|
| 21 | $perms=ChiSei($id_cons_gen);
|
---|
| 22 | if ($perms<32 or !$id_cons_gen) die("Non hai i permessi per inserire dati, o non hai scelto la consultazione!");
|
---|
| 23 | $id_comune=$_SESSION['id_comune'];
|
---|
| 24 | //$res = mysql_query("SELECT t1.tipo_cons,t2.id_cons FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.id_comune='$id_comune' " , $dbi);
|
---|
| 25 | //list($tipo_cons,$id_cons) = mysql_fetch_row($res);
|
---|
| 26 |
|
---|
| 27 | include("modules/Elezioni/funzionidata.php");
|
---|
| 28 | include("modules/Elezioni/ele.php");
|
---|
| 29 |
|
---|
[80] | 30 | if (isset($_GET['help'])) $help=intval($_GET['help']);
|
---|
[2] | 31 | if (isset($param['fase'])) $fase=intval($param['fase']); else $fase=0;
|
---|
[284] | 32 | if (isset($param['id_cons_gen2'])) $id_cons_gen2=intval($param['id_cons_gen2']); else $id_cons_gen2='0';
|
---|
| 33 | if (isset($param['indirizzoweb'])) get_magic_quotes_gpc() ? $indirizzoweb=$param['indirizzoweb']:$indirizzoweb=addslashes($param['indirizzoweb']); else $indirizzoweb='http://www.eleonline.it/moduli/client/';
|
---|
| 34 | if (isset($param['id_comune2'])) $id_comune2=intval($param['id_comune2']); else $id_comune2='0';
|
---|
[2] | 35 |
|
---|
| 36 | /******************************************************/
|
---|
| 37 | /*Funzione di visualizzazione globale */
|
---|
| 38 | /*****************************************************/
|
---|
| 39 | function all() {
|
---|
[80] | 40 | global $prefix, $dbi,$id_cons_gen,$id_comune,$indirizzoweb,$id_cons_gen2,$id_comune2,$fase,$help,$language;
|
---|
| 41 | if (isset($help)) include("language/$language/ele_scarica.html");
|
---|
[2] | 42 |
|
---|
| 43 | $bgcolor1=$_SESSION['bgcolor1'];
|
---|
| 44 | $bgcolor2=$_SESSION['bgcolor2'];
|
---|
| 45 |
|
---|
| 46 | if ($fase=='0'){
|
---|
| 47 |
|
---|
| 48 | echo "<form name=\"import\" action=\"admin.php\">";
|
---|
| 49 | echo "<table border=\"0\" width=\"100%\"><tr bgcolor=\"$bgcolor2\">";
|
---|
| 50 | echo "<td><b>"._INDIRIZZOWEB1."</b></td>";
|
---|
| 51 | echo "<td><input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"op\" value=\"scarica\"><input type=\"hidden\" name=\"fase\" value=\"1\"><input type=\"text\" name=\"indirizzoweb\" size=\"50\" value=\"".$indirizzoweb."\"></td></tr>";
|
---|
| 52 | echo "<td><input type=\"submit\" name=\"add\" value=\""._OK."\"></td>";
|
---|
| 53 | echo "</tr></table><br>";
|
---|
| 54 | echo "</form>";
|
---|
| 55 | }elseif ($fase=='1'){
|
---|
| 56 | $rem_cons="<script type=\"text/javascript\" src=\"$indirizzoweb/file.php?fase=1\"></script>";
|
---|
| 57 |
|
---|
| 58 | echo "<form name=\"import\" action=\"admin.php\">";
|
---|
| 59 | echo "<table border=\"0\" width=\"100%\"><tr bgcolor=\"$bgcolor2\">";
|
---|
| 60 | echo "<td><b>"._INDIRIZZOWEB1."</b></td>";
|
---|
| 61 | echo "<td><input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"op\" value=\"scarica\"><input type=\"hidden\" name=\"fase\" value=\"2\"><input type=\"hidden\" name=\"indirizzoweb\" value=\"$indirizzoweb\">$indirizzoweb</td></tr>";
|
---|
| 62 | echo "<tr><td><b>"._SCARICACONS."</b></td>";
|
---|
| 63 |
|
---|
| 64 | echo "<td>$rem_cons</td></tr>";
|
---|
| 65 |
|
---|
| 66 | echo "<tr><td><input type=\"submit\" name=\"add\" value=\""._OK."\"></td>";
|
---|
| 67 |
|
---|
| 68 | echo "</tr></table><br>";
|
---|
| 69 | echo "</form>";
|
---|
| 70 | }elseif($fase=='2'){
|
---|
| 71 |
|
---|
[257] | 72 | $sql="SELECT descrizione from ".$prefix."_ele_consultazione WHERE id_cons_gen=$id_cons_gen2";
|
---|
| 73 | $res = $dbi->prepare("$sql");
|
---|
| 74 | $res->execute();
|
---|
| 75 | list($descrcons) = $res->fetch(PDO::FETCH_NUM);
|
---|
[2] | 76 | $rem_cons="<script type=\"text/javascript\" src=\"$indirizzoweb/file.php?fase=2&id_cons_gen2=$id_cons_gen2\"></script>";
|
---|
| 77 |
|
---|
| 78 | echo "<form name=\"import\" action=\"admin.php\">";
|
---|
| 79 | echo "<table border=\"0\" width=\"100%\"><tr bgcolor=\"$bgcolor2\">";
|
---|
| 80 | echo "<td><b>"._INDIRIZZOWEB1."</b></td>";
|
---|
| 81 | echo "<td><input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"op\" value=\"scarica\"><input type=\"hidden\" name=\"fase\" value=\"3\"><input type=\"hidden\" name=\"indirizzoweb\" value=\"$indirizzoweb\">$indirizzoweb</td></td></tr>";
|
---|
[284] | 82 | $cons_rem=addslashes($_GET[($id_cons_gen2)]);
|
---|
[2] | 83 | echo "<tr><td><b>"._CONSULTA.":</b></td><td>$cons_rem</td></tr>";
|
---|
[80] | 84 | echo "<tr><td><b>"._SCELTACOMUNE."</b></td><td>$rem_cons</td></tr>";
|
---|
[2] | 85 |
|
---|
| 86 | echo "<tr><td><input type=\"submit\" name=\"add\" value=\""._OK."\"></td>";
|
---|
| 87 |
|
---|
| 88 | echo "</tr></table><br>";
|
---|
| 89 | echo "</form>";
|
---|
| 90 |
|
---|
| 91 | }elseif ($fase=='3'){
|
---|
| 92 |
|
---|
| 93 | $id_cons_gen2=$_GET['id_cons_gen2'];
|
---|
| 94 | $id_comune2=$_GET['id_comune2'];
|
---|
| 95 | Header("Location: $indirizzoweb/modules.php?op=backup&id_cons_gen=$id_cons_gen2&id_comune=$id_comune2");
|
---|
| 96 |
|
---|
| 97 | }
|
---|
| 98 | }
|
---|
| 99 |
|
---|
| 100 | if ($fase!='3') ele();
|
---|
| 101 | all();
|
---|
| 102 | echo"</td></tr></table>";
|
---|
| 103 | include("footer.php");
|
---|
| 104 |
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | ?>
|
---|