Changeset 426 for trunk/admin
- Timestamp:
- Oct 4, 2024, 12:14:01 PM (7 weeks ago)
- Location:
- trunk/admin
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/admin.php
r424 r426 149 149 catch(PDOException $e) 150 150 { 151 echo $sql ."<br>" . $e->getMessage();die();151 echo "<br>" . $e->getMessage();die(); 152 152 } 153 153 $sql = "use $dbname"; … … 292 292 $sth->execute(); 293 293 } 294 /* $sth = $dbi->prepare("select aggiornamento from ".$prefix."_config");295 $sth->execute();296 list($agg)=$sth->fetch(PDO::FETCH_NUM);297 $_SESSION['aggiornamento']=$agg;*/298 ###########299 $righe='';300 if(phpversion()<5.6) $host="http://80.211.143.127";301 else $host="https://trac.eleonline.it";302 $headers=get_headers("$host/ele3/changeset/");303 $testurl=strlen($headers[0])>0?true:false;304 if(!$testurl){305 $newrev=0;306 }else{307 $file = file("$host/ele3/changeset/");308 $cntFile = count($file);309 $fine=0;310 $currentLine=0;311 312 foreach ($file as $line_num => $line) {313 if(strpos($line,'<title>') ) {$fine=1; continue;}314 if ($fine){315 $newrev=(int) filter_var($line, FILTER_SANITIZE_NUMBER_INT);316 break;317 }318 }319 }320 294 include('versione.php'); 321 $myrev=intval(substr($versione,-4,4));322 # $_SESSION['aggiornamento']=$agg;323 $_SESSION['localrev']=$myrev;324 $_SESSION['remoterev']=$newrev;325 unset($file);326 # if($agg) include('aggiornamento.php');327 #die("local: ".$_SESSION['localrev'].$_SESSION['remoterev']);328 295 } 329 296 if(!isset($_SESSION['BASE'])) $_SESSION['BASE']=substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['REQUEST_URI'], "/")-16); … … 509 476 $ref=$ref."&language=$language"; 510 477 $ref.="&msglogout=$msglogout"; 511 #$_SESSION=array(); 512 if (session_status() == PHP_SESSION_ACTIVE) 513 session_destroy(); 514 session_cache_expire (0); 478 $_SESSION=array(); 479 480 session_regenerate_id(); 481 session_write_close(); 482 session_cache_expire (0); 515 483 Header($ref); 516 484 -
trunk/admin/modules/Elezioni/aggiornamento.php
r424 r426 150 150 echo "<form name=\"conferma\" action=\"admin.php\"><input type=\"hidden\" name=\"errmex\" value=\"1\"><input type=\"hidden\" name=\"op\" value=\"aggiorna\">"; 151 151 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"procedi\" value=\"1\">"; 152 echo "<br><table align=\"center\"><tr><td><h3>Procedo con verifica e aggiornamento del solo db (all'ultima versione scaricata)?< /h3></td><td><input type=\"submit\" name=\"vai\" value=\""._OK."\"></td></tr></table></form>";152 echo "<br><table align=\"center\"><tr><td><h3>Procedo con verifica e aggiornamento del solo db (all'ultima versione scaricata)?<br><i>E' consigliato procedere solo dopo aver prodotto una copia di backup</i></h3></td><td><input type=\"submit\" name=\"vai\" value=\""._OK."\"></td></tr></table></form>"; 153 153 }else{ 154 154 aggiornadb(); … … 160 160 if(phpversion()<5.6) $host="http://80.211.143.127"; 161 161 else $host="https://trac.eleonline.it"; 162 163 $headers=get_headers("$host/ele3/changeset/"); 164 165 $testurl=strlen($headers[0])>0?true:false; 166 if($testurl){ 167 $file = file("$host/ele3/changeset/"); 168 $cntFile = count($file); 169 $fine=0; 170 $currentLine=0; 171 foreach ($file as $line_num => $line) { 172 if(strpos($line,'<title>') ) {$fine=1; continue;} 173 if ($fine){ 174 $newrev=(int) filter_var($line, FILTER_SANITIZE_NUMBER_INT); 175 $_SESSION['remoterev']=$newrev; 176 break; 177 } 178 } 179 unset($file); 162 ###################### 163 $rev=0; 164 if ($stream = fopen('http://mail.eleonline.it/version/risposta.php', 'r')) { 165 $rev= stream_get_contents($stream, 4); 166 fclose($stream); 167 168 $newrev=(int) filter_var($rev, FILTER_SANITIZE_NUMBER_INT); 169 $_SESSION['remoterev']=$newrev; 180 170 }else{ 181 171 $errmex=2; … … 183 173 } 184 174 #$newrev=$_SESSION['remoterev']; 185 $myrev=$_SESSION['localrev']; 175 #$myrev=$_SESSION['localrev']; 176 include('versione.php'); 177 $myrev=intval(substr($versione,-4,4)); 178 $_SESSION['localrev']=$myrev; 179 186 180 if (isset($_SESSION['forzadb'])) $myrev=378; 187 181 if($newrev<=$myrev) { … … 213 207 { 214 208 echo '<p class="title"><a href="'. $item->link .'">' . $item->title . "</a></p>"; 215 #$str=preg_replace("--", "<br>--", $item->description );216 209 $str=preg_replace('/\s\--/','<br>--',$item->description); 217 #$str=preg_replace("[^A-Za-z0-9\-]", "<br>", $item->description ); 218 # $str=preg_replace('/\s\`echo "\040"`/','<br>--',$item->description); 219 # $str=htmlentities($item->description); 220 echo "<p class='desc'>" . $str . "</p>"; 210 echo "<p class='desc'>" . $str . "</p>"; 221 211 } 222 212 echo "</div>"; … … 228 218 echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"><input type=\"hidden\" name=\"procedi\" value=\"1\">"; 229 219 echo "<br><table align=\"center\"><tr><td><h3>Procedo con l'aggiornamento?</h3></td><td><input type=\"submit\" name=\"vai\" value=\""._OK."\"></td></tr></table></form>"; 230 /* echo "<br><textarea name=\"log\" rows=\"15\" cols=\"150\">";231 foreach ($file as $line_num => $line) echo "$line";232 233 echo "</textarea>";234 ############Ã */235 220 $filename = "$host/ele3/changeset?format=zip&new=$newrev&new_path=%2F&old=$myrev&old_path=%2F"; 236 221 -
trunk/admin/modules/Elezioni/ele.php
r424 r426 66 66 function ele() { 67 67 68 global $espandi, $aid, $bgcolor1, $bgcolor2,$bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons, $id_cons_gen,$tipo_cons,$genere,$op,$id_comune,$perms,$id_cons,$votog,$votol,$votoc,$votocirc,$tema,$fascia,$limite,$BACKUP ;68 global $espandi, $aid, $bgcolor1, $bgcolor2,$bgcolor5, $prefix, $dbi, $offset, $min,$descr_cons, $id_cons_gen,$tipo_cons,$genere,$op,$id_comune,$perms,$id_cons,$votog,$votol,$votoc,$votocirc,$tema,$fascia,$limite,$BACKUP,$versione; 69 69 70 70 include ("header.php"); … … 177 177 echo "<hr>"; 178 178 } 179 $newrev=$_SESSION['remoterev']; 179 if(isset($_SESSION['remoterev'])) { 180 $newrev=$_SESSION['remoterev']; 181 } else { 182 $rev=0; 183 if ($stream = fopen('http://mail.eleonline.it/version/risposta.php', 'r')) { 184 $rev= stream_get_contents($stream, 4); 185 fclose($stream); 186 } 187 $newrev=(int) filter_var($rev, FILTER_SANITIZE_NUMBER_INT); 188 $_SESSION['remoterev']=$newrev; 189 $myrev=intval(substr($versione,-4,4)); 190 $_SESSION['localrev']=$myrev; 191 192 193 } 180 194 $myrev=$_SESSION['localrev']; 181 195 if($newrev==$myrev or $newrev==0) echo "<a href=\"admin.php?op=aggiorna&id_cons_gen=$id_cons_gen\">$bullet"._AGGIORNA."</a><br>"; … … 314 328 } 315 329 316 317 330 ?> -
trunk/admin/variabili.php
r424 r426 9 9 # $CLIENT = Indirizzo del client di produzione, esempio: 'https://www.eleonline.it/client' 10 10 $CLIENT=''; 11 12 # $contr_agg se =0 non effettua il controllo della presenza di nuovi aggiornamenti nella fase di accesso alla procedura da parte dell'amministratore. 13 # il controllo viene comunque eseguito se si seleziona la funzione di menu: Aggiornamento 14 # Evita il rellentamento in accesso per l'amministratore ma non si ha la visualizzazione in grassetto della voce Aggiornamento 15 $contr_agg=1; 11 16 12 17 #numero di liste e gruppi visualizzati nella pagina -
trunk/admin/versione.php
r425 r426 1 1 <?php 2 2 3 $versione = "3.0 rev 42 5";3 $versione = "3.0 rev 426"; 4 4 $version_number = $versione; 5 $datarel = " 20 giugno2024";5 $datarel = "04 ottobre 2024"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.