Last change
on this file since 343 was 336, checked in by roby, 4 years ago |
Admin: prime modifiche per compatibilità con php 7.4
|
File size:
1.7 KB
|
Rev | Line | |
---|
[189] | 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 | if (isset($_GET['id_conf'])) $id_conf=intval($_GET['id_conf']); else $id_conf=1;
|
---|
| 13 | if (isset($_GET['fascia'])) $fasciacom=intval($_GET['fascia']); else $fasciacom=0;
|
---|
| 14 | include("../../config.php");
|
---|
[336] | 15 | try{
|
---|
| 16 | $dbi = new PDO("mysql:host=$dbhost;charset=latin1", $dbuname, $dbpass, array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION));
|
---|
| 17 | $sql = "use $dbname";
|
---|
| 18 | $dbi->exec($sql);
|
---|
| 19 | }
|
---|
| 20 | catch(PDOException $e)
|
---|
| 21 | {
|
---|
| 22 | echo $sql . "<br>" . $e->getMessage();
|
---|
| 23 | }
|
---|
| 24 | $sql="SELECT id_fascia,abitanti from ".$prefix."_ele_fasce where id_conf='$id_conf'";
|
---|
| 25 | $sth = $dbi->prepare("$sql");
|
---|
| 26 | $sth->execute();
|
---|
| 27 | echo "<select name=\"idfascia\">";
|
---|
| 28 | echo "<option value=\"0\"> ";
|
---|
| 29 | $inffascia=0;
|
---|
| 30 | while(list($id,$abitanti)=$sth->fetch(PDO::FETCH_NUM)){
|
---|
| 31 | $sel='';
|
---|
| 32 | if ($id == $fasciacom) $sel="selected"; elseif ($id==1) $sel="selected";
|
---|
| 33 | echo "<option value=\"$id\" $sel>$inffascia - $abitanti";
|
---|
| 34 | $inffascia=$abitanti;
|
---|
| 35 | }
|
---|
| 36 | echo "</select>";
|
---|
[189] | 37 |
|
---|
| 38 | ?>
|
---|
| 39 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.