Changeset 253 for trunk/admin/index.php
- Timestamp:
- Mar 12, 2018, 8:53:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r23 r253 8 8 /************************************************************************/ 9 9 include("config.php"); 10 $dbi=mysql_connect($dbhost, $dbuname, $dbpass) or die("Connessione non riuscita: " . mysql_error()); 11 mysql_select_db($dbname)or die("Connessione non riuscita:" . mysql_error()); 12 mysql_query("SET NAMES 'utf8'", $dbi); 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 } 13 19 //---10/05/2009 gestione consultazione predefinita 14 20 //if (!isset($_SESSION['id_comune'])){ 15 $res_config = mysql_query("select * from ".$prefix."_config ",$dbi); 16 list ($sitename,$siteurl,$site_logo,$slogan,$startdate,$adminmail,$tema,$foot,$language,$blocco,$testata,$logo,$fileout,$copyright,$versione,$patch,$id_comune) = mysql_fetch_row($res_config); 17 $siteistat=$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']; 18 27 //} 19 28 Header("Location: admin.php?id_comune=$siteistat");
Note:
See TracChangeset
for help on using the changeset viewer.