Changeset 376 for trunk/admin
- Timestamp:
- Sep 24, 2022, 1:11:18 PM (2 years ago)
- Location:
- trunk/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/admin.php
r369 r376 135 135 } 136 136 137 138 139 140 try{ 141 $dbi = new PDO("mysql:host=$dbhost;charset=utf8", $dbuname, $dbpass, array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION)); 142 $sql = "use $dbname"; 143 $dbi->exec($sql); 144 } 145 catch(PDOException $e) 146 { 147 echo $sql . "<br>" . $e->getMessage(); 148 } 149 $sth = $dbi->prepare("SET SESSION character_set_connection = 'utf8' "); 150 $sth->execute(); 151 $sth = $dbi->prepare("SET SESSION character_set_client = 'utf8' "); 152 $sth->execute(); 153 $sth = $dbi->prepare("SET SESSION character_set_database = 'utf8' "); 154 $sth->execute(); 155 $sth = $dbi->prepare("SET CHARACTER SET utf8"); 156 $sth->execute(); 157 158 $sth = $dbi->prepare("SET NAMES 'utf8'"); 159 $sth->execute(); 160 $sth = $dbi->prepare("select * from ".$prefix."_config"); 161 $sth->execute(); 162 137 $dsn = "mysql:host=$dbhost"; 138 $opt = [ 139 PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, 140 PDO::ATTR_EMULATE_PREPARES => false, 141 ]; 142 if($prefix == '') { 143 db_err ('stepBack','Non avete indicato il prefisso tabelle database.'); 144 } 145 try 146 { 147 $dbi = new PDO($dsn, $dbuname, $dbpass, $opt); 148 } 149 catch(PDOException $e) 150 { 151 echo $sql . "<br>" . $e->getMessage();die(); 152 } 153 $sql = "use $dbname"; 154 try 155 { 156 $dbi->exec($sql); 157 } 158 catch(PDOException $e) 159 { 160 echo $sql . "<br>" . $e->getMessage(); 161 } 162 $sth = $dbi->prepare("SET SESSION character_set_connection = 'utf8' "); 163 $sth->execute(); 164 $sth = $dbi->prepare("SET SESSION character_set_client = 'utf8' "); 165 $sth->execute(); 166 $sth = $dbi->prepare("SET SESSION character_set_database = 'utf8' "); 167 $sth->execute(); 168 $sth = $dbi->prepare("SET CHARACTER SET utf8"); 169 $sth->execute(); 170 171 $sth = $dbi->prepare("SET NAMES 'utf8'"); 172 $sth->execute(); 173 $sth = $dbi->prepare("select * from ".$prefix."_config"); 174 $sth->execute(); 175 163 176 # $dbi=mysql_connect($dbhost, $dbuname, $dbpass) or die("Connessione non riuscita: " . mysql_error()); 164 177 # mysql_select_db($dbname)or die("Connessione non riuscita:" . mysql_error()); 165 178 ## mysql_query("SET NAMES 'utf8'", $dbi); 166 179 //---10/05/2009 gestione consultazione predefinita 167 168 169 170 171 180 $sth = $dbi->prepare("select * from ".$prefix."_config"); 181 $sth->execute(); 182 $row = $sth->fetch(PDO::FETCH_ASSOC); 183 #$row = $sth->fetchAll(); 184 $siteistat=$row['siteistat']; 172 185 if (!isset($_SESSION['id_comune'])){ 173 186 $_SESSION['sitename']=$row['sitename']; -
trunk/admin/aggiornadb.php
r375 r376 102 102 if(controllo($prefix.'_authors','admincomune',++$num)) 103 103 { 104 $sql="UPDATE `soraldo_authors` SET `adminop` = '1', `adminsuper` = '0',`admincomune` = '0' WHERE `soraldo_authors`.`aid` != 'admin' AND `soraldo_authors`.`aid` != 'suser'"; 105 $ret=aggiorna($sql,$dbi,'',$num); 106 $sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '1',`admincomune` = '0' WHERE `soraldo_authors`.`aid` = 'suser'"; 104 $sql="UPDATE `soraldo_authors` SET `adminop` = '1', `adminsuper` = '0',`admincomune` = '0' WHERE `soraldo_authors`.`aid` != 'admin' AND `soraldo_authors`.`adminsuper` != '1'"; 107 105 $ret=aggiorna($sql,$dbi,'',$num); 108 106 $sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '0',`admincomune` = '1' WHERE `soraldo_authors`.`aid` = 'admin'"; 107 $ret=aggiorna($sql,$dbi,'',$num); 108 $sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '1',`admincomune` = '0' WHERE `soraldo_authors`.`aid` = 'suser' or `soraldo_authors`.`adminsuper` = '1'"; 109 109 $ret=aggiorna($sql,$dbi,'',$num); 110 110 echo "<br> La tabella dei permessi Ú stata aggiornata<br>"; … … 131 131 } 132 132 ++$num; 133 $sql="ALTER TABLE `".$prefix."_ele_come` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '";133 $sql="ALTER TABLE `".$prefix."_ele_come` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT, CHANGE `content` `content` TEXT, CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 134 134 $ret=aggiorna($sql,$dbi,'',$num); 135 135 echo "<br>"; 136 136 if(!$ret) echo "Il tuo sistema non necessita di questo aggiornamento, questo avviso di errore va ignorato<br>"; 137 137 ++$num; 138 $sql="ALTER TABLE `".$prefix."_ele_link` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '";138 $sql="ALTER TABLE `".$prefix."_ele_link` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT, CHANGE `content` `content` TEXT, CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 139 139 $ret=aggiorna($sql,$dbi,'',$num); 140 140 echo "<br>"; 141 141 if(!$ret) echo "Il tuo sistema non necessita di questo aggiornamento, questo avviso di errore va ignorato<br>"; 142 142 ++$num; 143 $sql="ALTER TABLE `".$prefix."_ele_servizi` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '";143 $sql="ALTER TABLE `".$prefix."_ele_servizi` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT, CHANGE `content` `content` TEXT, CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 144 144 $ret=aggiorna($sql,$dbi,'',$num); 145 145 echo "<br>"; -
trunk/admin/modules/Elezioni/ele_controlli.php
r371 r376 383 383 $totsl+=$svl; 384 384 $tnl+=$nl; 385 if(($votig+$svl)<($votil+$svg+$nl) and ( $solog or$disg))385 if(($votig+$svl)<($votil+$svg+$nl) and (!$solog and !$disg)) 386 386 { $err=1; $tipo='lista'; break; } 387 387 } -
trunk/admin/versione.php
r375 r376 1 1 <?php 2 2 3 $versione = "3.0 rev 37 5";3 $versione = "3.0 rev 376"; 4 4 $version_number = $versione; 5 $datarel = " 06settembre 2022";5 $datarel = "24 settembre 2022"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.