Changeset 426 for trunk/admin/admin.php


Ignore:
Timestamp:
Oct 4, 2024, 12:14:01 PM (7 weeks ago)
Author:
roby
Message:
  • ADMIN

-- Inserito nuovo file ele_restorebackup.php
-- Modificata la funzione di verifica presenza aggiornamenti, evitato il rallentamento in accesso per il superutente e velocizzato il controllo da menu

  • CLIENT

-- Corrette alcune visualizzazioni per il tema Futura2 per mobile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/admin.php

    r424 r426  
    149149catch(PDOException $e)
    150150{
    151         echo $sql . "<br>" . $e->getMessage();die();
     151        echo "<br>" . $e->getMessage();die();
    152152}
    153153$sql = "use $dbname";
     
    292292                $sth->execute();
    293293        }
    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         }
    320294        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']);   
    328295}
    329296if(!isset($_SESSION['BASE'])) $_SESSION['BASE']=substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['REQUEST_URI'], "/")-16);
     
    509476$ref=$ref."&language=$language";
    510477$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
     480session_regenerate_id();
     481session_write_close();
     482session_cache_expire (0);
    515483Header($ref);
    516484
Note: See TracChangeset for help on using the changeset viewer.