source: trunk/admin/index.php@ 345

Last change on this file since 345 was 253, checked in by roby, 7 years ago
File size: 1.4 KB
Line 
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/************************************************************************/
9include("config.php");
10 try{
11 $dbi = new PDO("mysql:host=$dbhost;charset=latin1", $dbuname, $dbpass, array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION));
12 $sql = "use $dbname";
13 $dbi->exec($sql);
14 }
15 catch(PDOException $e)
16 {
17 echo $sql . "<br>" . $e->getMessage();
18 }
19//---10/05/2009 gestione consultazione predefinita
20//if (!isset($_SESSION['id_comune'])){
21 $sth = $dbi->prepare("select * from ".$prefix."_config");
22 $sth->execute();
23
24 $row = $sth->fetch(PDO::FETCH_ASSOC);
25# list ($sitename,$siteurl,$site_logo,$slogan,$startdate,$adminmail,$tema,$foot,$language,$blocco,$testata,$logo,$nometestata,$fileout,$copyright,$versione,$patch,$id_comune,$multicomune,$flash,$displayerrors,$gkey,$googlemaps,$editor,$tema_on,$ed_user) = ($res_config->fetch());
26 $siteistat=$row['siteistat'];
27//}
28 Header("Location: admin.php?id_comune=$siteistat");
29die();
30?>
Note: See TracBrowser for help on using the repository browser.