Changeset 359 for trunk/admin/admin.php


Ignore:
Timestamp:
Feb 25, 2022, 9:32:36 AM (3 years ago)
Author:
roby
Message:

admin: correzioni e aggiunta funzionalità per inserimento da cellulare, adeguata la funzione di aggiornamento del db per compatibilità con php7 e php5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/admin.php

    r358 r359  
    1717#$LIMITE=3; //fascia di separazione del maggioritario (15.000 abitanti)
    1818# tempo di sessione: ini_set('session.gc_maxlifetime','3600');
    19 global $multicomune,$msglogout;
     19global $multicomune,$msglogout,$language;
    2020
    2121// Adattamento variabili superglobal
     
    307307$admincomune=$row[1];
    308308$adminop=$row[2];
    309 
     309       
    310310#if (($adminsuper==1 || $admincomune==1 || $adminop==1)) {
    311311        if ($adminsuper==1)
    312312                return 256;
    313         elseif ($admincomune==1){
     313        elseif ($admincomune==1) 
    314314                return 64;
    315315#               $sth = $dbi->prepare("select permessi from ".$prefix."_ele_operatori where id_cons='0' and aid='$aid' and id_comune='$id_comune'");
    316         }else{
    317                 $sth = $dbi->prepare("select id_cons from ".$prefix."_ele_cons_comune where id_comune='$id_comune' and id_cons_gen='$id_cons_gen'");
    318                 $sth->execute();       
    319                 $row = $sth->fetch(PDO::FETCH_BOTH);   
    320                 $id_cons=$row[0];
    321                 $sth = $dbi->prepare("select permessi from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid' and id_comune='$id_comune'");
    322         }       
     316
     317        $sth = $dbi->prepare("select id_cons from ".$prefix."_ele_cons_comune where id_comune='$id_comune' and id_cons_gen='$id_cons_gen'");
     318        $sth->execute();       
     319        $row = $sth->fetch(PDO::FETCH_BOTH);   
     320        $id_cons=$row[0];
     321        $sth = $dbi->prepare("select permessi from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid' and id_comune='$id_comune'");
     322               
    323323        $sth->execute();       
    324324        $row = $sth->fetch(PDO::FETCH_BOTH);
     
    405405*/
    406406global $siteistat,$perms,$msglogout;
    407 
     407$language=$_SESSION['lang'];
    408408$ref="Location: admin.php?";
    409409#$ref="Location: https://www.eleonline.it/adminmob/admin.php?";
     
    415415
    416416if (isset($_SESSION['lang']))
    417 $ref=$ref."&language=".$_SESSION['lang'];
     417$ref=$ref."&language=$language";
    418418$ref.="&msglogout=$msglogout";
    419419$_SESSION=array(); 
     
    444444        }
    445445}
     446
     447
    446448#echo "op:".$param['op']." -- aid:".$_SESSION['aid']."remote:".$_SESSION['remote']."REMOTE:".$_SERVER['REMOTE_ADDR'];
    447449if (isset($param['op'])) $op=addslashes($param['op']); else $op='ele';
     
    451453        if($tema=='Futura2' and $op!='logout')
    452454        {
    453                 include("temi/$tema/index.php");
    454                 testata();
     455                include("temi/$tema/index.php");
    455456        }else
    456457switch($op) {
Note: See TracChangeset for help on using the changeset viewer.