Changeset 400 for trunk/admin


Ignore:
Timestamp:
Feb 25, 2024, 3:57:45 PM (3 months ago)
Author:
roby
Message:
  • ADMIN

-- Migliorata la gestione di operatori e responsabili

  • CLIENT

-- Nuovo tema BSItalia realizzato dal CED di Capo d'Orlando
-- Sistemata la funzione del widget privacy
-- Varie modifiche di allineamento oggetti

Location:
trunk/admin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/admin.php

    r397 r400  
    387387$admincomune=$row[1];
    388388$oper=$row[2];
    389        
    390 #if (($adminsuper==1 || $admincomune==1 || $adminop==1)) {
    391389        if ($adminsuper==1)
    392390                return 256;
     
    397395        else {
    398396                $oggi=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y")));
    399                 $sql="SELECT id_sez FROM ".$prefix."_ele_operatori where  aid='$aid' and permessi>0 and id_cons in (select t1.id_cons from ".$prefix."_ele_cons_comune as t1, ".$prefix."_ele_consultazione as t2 where t1.id_cons_gen=t2.id_cons_gen and t1.id_comune='$id_comune' and t2.data_fine>$oggi)";           
     397                $sql="select t1.id_cons from ".$prefix."_ele_cons_comune as t1, ".$prefix."_ele_consultazione as t2 where t1.id_cons_gen=t2.id_cons_gen and t1.id_cons_gen='$id_cons_gen' and t1.chiusa='0' and t1.id_comune='$id_comune' and t2.data_fine>$oggi";
    400398                $sth = $dbi->prepare("$sql");
    401399                $sth->execute();        #die("TEST: $sql");     
    402                 if($sth->rowCount()) {$perms=16; return $perms;}
    403                 else {$msglogout=1; return 0;}
    404         }
    405 /*      $sth = $dbi->prepare("select id_cons from ".$prefix."_ele_cons_comune where id_comune='$id_comune' and id_cons_gen='$id_cons_gen'");
    406         $sth->execute();       
    407         $row = $sth->fetch(PDO::FETCH_BOTH);   
    408         $id_cons=$row[0];
    409         $sth = $dbi->prepare("select permessi from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid' and id_comune='$id_comune'");
    410                
    411         $sth->execute();
    412         list($perms)=$sth->fetch(PDO::FETCH_NUM);
    413 #       $row =  die("test:$sql".$row[0] );
    414         if (!$perms) {die("qui: select permessi from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid' and id_comune='$id_comune'");    $msglogout=1; $perms=0; }
    415 
    416         return $perms; */
    417 #} else return 0;
     400                if(!$sth->rowCount()) {$msglogout=1; $perms=0; return $perms;}
     401                list($id_cons) = $sth->fetch(PDO::FETCH_NUM);
     402                $sql="select permessi from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid'";
     403                $sth = $dbi->prepare("$sql");
     404                $sth->execute();        #die("TEST: $sql");     
     405                list($perms) = $sth->fetch(PDO::FETCH_NUM);
     406        }
    418407}
    419408
  • trunk/admin/modules/Elezioni/aggiornadb.php

    r398 r400  
    22
    33#imposta il charset su utf8, qualsiasi altro valore per cambiarlo in latin1;
    4 $newcs='utf8';
     4$newcs='utf8';
     5global $ctrlerr;
     6
    57/*
    68@require_once("../../config.php");
     
    2729        {
    2830                $ret=0;
     31                $ctrlerr=1;
    2932                echo "<br><span style=\"color: red;\">- Aggiornamento Fallito: $sql</span>";
    3033                return $ret;
     
    4043                {
    4144                  $ret=0;
     45                  $ctrlerr=1;
    4246                  echo "<br><span style=\"color: red;\">- Aggiornamento Fallito: $sql2</span>";
    4347                  return $ret;
     
    6872                {
    6973                        $ret=0;
     74                        $ctrlerr=1;
    7075                        echo "<br><span style=\"color: red;\">- Tabella: $tab - Indice: $ind - Aggiornamento Fallito: $sql</span>";
    7176                        return $ret;
     
    8186                {
    8287                  $ret=0;
     88                  $ctrlerr=1;
    8389                  echo "<br><span style=\"color: red;\">- Tabella: $tab - Indice: $ind - Aggiornamento Fallito: $sql2</span>";
    8490                  return $ret;
     
    117123}else echo "<br><span style=\"color: green;\">- La tabella ".$prefix."_authors non richiede questo aggiornamento</span><br>";   
    118124
     125$sql="SELECT * from `".$prefix."_ele_widget WHERE `soraldo_ele_widget`.`id` = 29";
     126$res = $dbi->prepare("$sql");
     127$res->execute();
     128if($res->rowCount()) {
     129        $sql="DELETE FROM soraldo_ele_widget WHERE `soraldo_ele_widget`.`id` = 29";
     130        $res = $dbi->prepare("$sql");
     131        $res->execute();
     132        echo "<br> Il record cookie_law.php Ú stato eliminato dalla tabella dei widget, usare privacy.php<br>";
     133}       else echo "<br><span style=\"color: green;\">- La tabella ".$prefix."_ele_widget non richiede questo aggiornamento</span><br>";
     134if(!controllo($prefix.'_config','versione',++$num))
     135{
     136        $sql="alter table `".$prefix."_config` change column `Versione` `versione` int(3)";
     137        $ret=aggiorna($sql,$dbi,'',$num);
     138}       else echo "<br><span style=\"color: green;\">- La tabella ".$prefix."_config non richiede questo aggiornamento</span><br>";
    119139if(!controllo($prefix.'_config','versione',++$num))
    120140{
  • trunk/admin/modules/Elezioni/aggiornamento.php

    r397 r400  
    300300}
    301301$righedb='';
     302global $ctrlerr;
     303$ctrlerr=0;
    302304if(file_exists($trunkadm."/modules/Elezioni/aggiornadb.php")) {
    303         $ctrlerr=0;
    304305        ob_start();
    305306        include ('modules/Elezioni/aggiornadb.php');
  • trunk/admin/modules/Elezioni/ele.php

    r397 r400  
    292292
    293293        //echo "<hr /><a href=\"../client/modules.php\" target=\"_blank\">$bullet Guarda il sito</a><br /><hr />";
    294         echo "<a href=\"admin.php?op=logout\">$bullet "._ESCI."</a>";
     294        echo "<a href=\"admin.php?op=logout&msglogout=0\">$bullet "._ESCI."</a>";
    295295        echo "</td></tr></table>";
    296296        // continua la tabella su ele.voti con le sezioni
  • trunk/admin/modules/Elezioni/query.sql

    r358 r400  
    9797global $perms,$dbi,$prefix,$currentlang,$aid,$id_comune;
    9898        if ($perms<128) {
    99                 $sql="select t3.id_cons, t2.descrizione,t4.genere, t2.id_cons_gen, t3.chiusa from ".$prefix."_ele_operatori as t1, ".$prefix."_ele_consultazione as t2, ".$prefix."_ele_cons_comune as t3, ".$prefix."_ele_tipo as t4 where t4.lingua='$currentlang' and t2.tipo_cons=t4.tipo_cons and t1.aid='$aid' and t3.id_cons_gen=t2.id_cons_gen and (t1.id_cons=t3.id_cons or t1.permessi=64) and t1.id_comune=t3.id_comune and t1.id_comune=$id_comune and t3.chiusa='0' order by t2.data_inizio desc";
     99                $sql="select t3.id_cons, t2.descrizione,t4.genere, t2.id_cons_gen, t3.chiusa from ".$prefix."_ele_operatori as t1, ".$prefix."_ele_consultazione as t2, ".$prefix."_ele_cons_comune as t3, ".$prefix."_ele_tipo as t4 where t4.lingua='$currentlang' and t2.tipo_cons=t4.tipo_cons and t1.aid='$aid' and t1.permessi>0 and t3.id_cons_gen=t2.id_cons_gen and (t1.id_cons=t3.id_cons or t1.permessi=64) and t1.id_comune=t3.id_comune and t1.id_comune=$id_comune and t3.chiusa='0' order by t2.data_inizio desc";
    100100        }else{
    101101                $sql="SELECT '', t1.descrizione,t2.genere, t1.id_cons_gen,'' FROM ".$prefix."_ele_consultazione as t1,".$prefix."_ele_tipo as t2 where t2.lingua='$currentlang' and t1.tipo_cons=t2.tipo_cons order by t1.data_inizio desc";
  • trunk/admin/versione.php

    r399 r400  
    11<?php
    22
    3 $versione = "3.0 rev 399";
     3$versione = "3.0 rev 400";
    44$version_number = $versione;
    5 $datarel = "21 febbraio 2024";
     5$datarel = "25 febbraio 2024";
    66$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    77
Note: See TracChangeset for help on using the changeset viewer.