Changeset 400 for trunk/admin
- Timestamp:
- Feb 25, 2024, 3:57:45 PM (9 months ago)
- Location:
- trunk/admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/admin.php
r397 r400 387 387 $admincomune=$row[1]; 388 388 $oper=$row[2]; 389 390 #if (($adminsuper==1 || $admincomune==1 || $adminop==1)) {391 389 if ($adminsuper==1) 392 390 return 256; … … 397 395 else { 398 396 $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"; 400 398 $sth = $dbi->prepare("$sql"); 401 399 $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 } 418 407 } 419 408 -
trunk/admin/modules/Elezioni/aggiornadb.php
r398 r400 2 2 3 3 #imposta il charset su utf8, qualsiasi altro valore per cambiarlo in latin1; 4 $newcs='utf8'; 4 $newcs='utf8'; 5 global $ctrlerr; 6 5 7 /* 6 8 @require_once("../../config.php"); … … 27 29 { 28 30 $ret=0; 31 $ctrlerr=1; 29 32 echo "<br><span style=\"color: red;\">- Aggiornamento Fallito: $sql</span>"; 30 33 return $ret; … … 40 43 { 41 44 $ret=0; 45 $ctrlerr=1; 42 46 echo "<br><span style=\"color: red;\">- Aggiornamento Fallito: $sql2</span>"; 43 47 return $ret; … … 68 72 { 69 73 $ret=0; 74 $ctrlerr=1; 70 75 echo "<br><span style=\"color: red;\">- Tabella: $tab - Indice: $ind - Aggiornamento Fallito: $sql</span>"; 71 76 return $ret; … … 81 86 { 82 87 $ret=0; 88 $ctrlerr=1; 83 89 echo "<br><span style=\"color: red;\">- Tabella: $tab - Indice: $ind - Aggiornamento Fallito: $sql2</span>"; 84 90 return $ret; … … 117 123 }else echo "<br><span style=\"color: green;\">- La tabella ".$prefix."_authors non richiede questo aggiornamento</span><br>"; 118 124 125 $sql="SELECT * from `".$prefix."_ele_widget WHERE `soraldo_ele_widget`.`id` = 29"; 126 $res = $dbi->prepare("$sql"); 127 $res->execute(); 128 if($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>"; 134 if(!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>"; 119 139 if(!controllo($prefix.'_config','versione',++$num)) 120 140 { -
trunk/admin/modules/Elezioni/aggiornamento.php
r397 r400 300 300 } 301 301 $righedb=''; 302 global $ctrlerr; 303 $ctrlerr=0; 302 304 if(file_exists($trunkadm."/modules/Elezioni/aggiornadb.php")) { 303 $ctrlerr=0;304 305 ob_start(); 305 306 include ('modules/Elezioni/aggiornadb.php'); -
trunk/admin/modules/Elezioni/ele.php
r397 r400 292 292 293 293 //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>"; 295 295 echo "</td></tr></table>"; 296 296 // continua la tabella su ele.voti con le sezioni -
trunk/admin/modules/Elezioni/query.sql
r358 r400 97 97 global $perms,$dbi,$prefix,$currentlang,$aid,$id_comune; 98 98 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 t 3.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"; 100 100 }else{ 101 101 $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 1 1 <?php 2 2 3 $versione = "3.0 rev 399";3 $versione = "3.0 rev 400"; 4 4 $version_number = $versione; 5 $datarel = "2 1febbraio 2024";5 $datarel = "25 febbraio 2024"; 6 6 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)"; 7 7
Note:
See TracChangeset
for help on using the changeset viewer.