Changeset 428 for trunk/admin/admin.php


Ignore:
Timestamp:
Oct 9, 2024, 10:47:10 AM (3 weeks ago)
Author:
roby
Message:
  • ADMIN

-- modifica alle autorizzazioni per singola sezione

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/admin.php

    r426 r428  
    513513                list($id_sez) = $resmod->fetch(PDO::FETCH_NUM);
    514514                if($id_sez) {
    515                         $sql="select t1.id_cons_gen,t1.descrizione,t2.id_cons from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and date_add(t1.data_fine, interval 3 day)>CURDATE() and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and id_sez>0 and permessi>0)";
     515                        if(isset($id_cons_gen) and $id_cons_gen>0) {$singola="and t1.id_cons_gen=$id_cons_gen";}
     516                        else{ $singola='';}
     517                        $sql="select t1.id_cons_gen,t1.descrizione,t2.id_cons from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen $singola and t2.id_comune=$id_comune and date_add(t1.data_fine, interval $giorniaut day)>CURDATE() and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and id_sez>0 and permessi>0)";
    516518                        $resmod = $dbi->prepare("$sql");
    517519                        $resmod->execute();
     
    520522                                $tema='Futura2';
    521523                                $_SESSION['tema']=$tema;
    522                         } #else {die("TEST: $sql"); logout();}
     524                        }
    523525                }
    524526        }
     
    529531#echo "op:".$param['op']." -- aid:".$_SESSION['aid']."remote:".$_SESSION['remote']."REMOTE:".$_SERVER['REMOTE_ADDR'];
    530532if (isset($param['op'])) $op=addslashes($param['op']); else $op='ele';
    531 //if (isset($param['op'])) $op=$param['op']; else $op='ele';
    532533#
    533534#die("TEST: qui2 op:$op - $aid $id_cons $id_sez ".$_SESSION['aid']);
Note: See TracChangeset for help on using the changeset viewer.