source: trunk/admin/modules/Elezioni/scarica.php@ 353

Last change on this file since 353 was 344, checked in by roby, 4 years ago

Segue modifiche per la compatibilità php7.x

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