Changeset 255 for trunk/admin/admin.php
- Timestamp:
- Mar 20, 2018, 11:19:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/admin.php
r254 r255 21 21 // Versione di php 22 22 $phpver = phpversion(); 23 23 global $dbi; 24 24 // converte superglobal se php e' < 4.1.0 25 25 … … 115 115 //=================================================================== 116 116 session_name('sesadmin'); 117 session_start();//MODIFICHE PER GESTIONE SESSIONI117 #session_start();//MODIFICHE PER GESTIONE SESSIONI 118 118 // gestione sessione 119 $a = session_id(); 120 if(empty($a)) session_start(); 121 #echo "SID: ".SID."<br>session_id(): ".session_id()."<br>COOKIE: ".$_COOKIE["PHPSESSID"]; 119 122 120 123 if (file_exists("config.php")){ … … 123 126 $install="1"; 124 127 } 125 126 128 127 129 # verifica se effettuata la configurazione … … 151 153 $sth = $dbi->prepare("select * from ".$prefix."_config"); 152 154 $sth->execute(); 153 154 $row = $sth->fetch(PDO::FETCH_ASSOC);155 $row = $sth->fetch(PDO::FETCH_ASSOC); 156 #$row = $sth->fetchAll(); 155 157 $siteistat=$row['siteistat']; 156 158 if (!isset($_SESSION['id_comune'])){ … … 168 170 $_SESSION['blocco']=$row['blocco']; 169 171 $_SESSION['testata']=$row['testata']; 170 $_SESSION['logo']=$row['logo'];172 # $_SESSION['logo']=$row['logo']; 171 173 $_SESSION['fileout']=$row['fileout']; 172 174 $_SESSION['copyright']=$row['copyright']; … … 174 176 $_SESSION['patch']=$row['patch']; 175 177 $_SESSION['id_comune']=$row['siteistat']; 176 $_SESSION['multicomune']=$ multicomune;177 $_SESSION['flash']=$ flash;178 $_SESSION['displayerrors']=$ displayerrors;179 $_SESSION['editor']=$ editor;180 $_SESSION['tema_on']=$ tema_on;181 $_SESSION['ed_user']=$ ed_user;178 $_SESSION['multicomune']=$row['multicomune']; 179 $_SESSION['flash']=$row['flash']; 180 $_SESSION['displayerrors']=$row['displayerrors']; 181 $_SESSION['editor']=$row['editor']; 182 $_SESSION['tema_on']=$row['tema_on']; 183 $_SESSION['ed_user']=$row['ed_user']; 182 184 } 183 185 //fine … … 214 216 $sth = $dbi->prepare("update ".$prefix."_authors set counter=$counter where aid='$aid' and pwd='$mpwd' and id_comune='$id_comune'"); 215 217 $sth->execute(); 216 $row = $sth->fetch(PDO::FETCH_ASSOC);218 # $row = $sth->fetch(PDO::FETCH_ASSOC); 217 219 218 220 if ($esiste==1) { 219 $_SESSION['dbi']=$dbi;221 # $_SESSION['dbi']=$dbi; 220 222 $_SESSION['aid']="$aid"; 221 223 $_SESSION['pwd']="$mpwd"; … … 231 233 } 232 234 }else{ 233 $_SESSION['dbi']=$dbi;234 235 } 235 #$_SESSION['dbi']=$dbi; 236 237 } 236 238 if (! isset($_SESSION['lang'])) $_SESSION['lang']=$language; 237 239 $currentlang=strlen($_SESSION['lang'])==2 ? $_SESSION['lang']: $language; … … 240 242 //lettura sessione 241 243 $aid=$_SESSION['aid']; 242 $dbi=$_SESSION['dbi'];244 #$dbi=$_SESSION['dbi']; 243 245 $prefix=$_SESSION['prefix']; 244 246 $id_comune=$_SESSION['id_comune']; … … 247 249 $sth = $dbi->prepare("select id_cons_gen from ".$prefix."_ele_cons_comune where preferita='1' and (id_comune='$id_comune' or id_comune=0)"); 248 250 $sth->execute(); 249 $row = $sth->fetch(PDO::FETCH_ ASSOC);250 $id_cons_gen=$row[ 1];251 $row = $sth->fetch(PDO::FETCH_BOTH); 252 $id_cons_gen=$row[0]; 251 253 } 252 254 $currentlang=$_SESSION['lang']; … … 264 266 /*********************************************************/ 265 267 function ChiSei($id_cons_gen){ 266 268 global $dbi; 267 269 268 270 $aid=$_SESSION['aid']; 269 $dbi=$_SESSION['dbi'];271 #$dbi=$_SESSION['dbi']; 270 272 $prefix=$_SESSION['prefix']; 271 273 $pwd=$_SESSION['pwd']; … … 334 336 if($multicomune=='1'){ 335 337 echo ""._COMUNE."</td><td>"; 336 $sqlcomu="select id_comune,descrizione from ".$prefix."_ele_comuni order by descrizione asc"; 337 $rescomu= mysql_query("$sqlcomu",$dbi); 338 338 $row=elenco_comuni(); 339 339 echo "<select name=\"id_comune\">"; 340 while (list($id,$descrizione)=mysql_fetch_row($rescomu))341 { 340 foreach($row as $comuni) 341 {$id=$comuni[0];$descrizione=$comuni[1]; 342 342 $sel=($id == $id_comune) ? "selected":""; 343 343 echo "<option value=\"$id\" $sel>$descrizione"; … … 388 388 } 389 389 390 391 #echo "op:".$param['op']." -- aid:".$_SESSION['aid']."remote:".$_SESSION['remote']."REMOTE:".$_SERVER['REMOTE_ADDR']; 390 392 if (isset($param['op'])) get_magic_quotes_gpc() ? $op=$param['op']:$op=addslashes($param['op']); else $op='ele'; 391 393 //if (isset($param['op'])) $op=$param['op']; else $op='ele'; … … 565 567 } 566 568 567 568 569 ?>
Note:
See TracChangeset
for help on using the changeset viewer.