diff --git a/core/function.php b/core/function.php index d693f97..ed61c8d 100755 --- a/core/function.php +++ b/core/function.php @@ -33,7 +33,7 @@ function pop3_login($host,$user,$pass,$port=110,$folder="INBOX",$ssl=false) function db_login($user,$pass) { global $DB_ID; - $query = "SELECT id FROM utenti WHERE utente ='$user' AND password = MD5('$pass') AND attivo = 1"; + $query = "SELECT id FROM utenti WHERE utente ='$user' AND (password = MD5('$pass') OR password = ENCRYPT('$pass', LEFT(password, 2))) AND attivo = 1"; $res = mysql_query( $query, $DB_ID ); $dato = mysql_fetch_array ( $res ); $ritorno = $dato['id']; diff --git a/firewall/firewall_gest.php b/firewall/firewall_gest.php index 3249bf2..3f830a9 100755 --- a/firewall/firewall_gest.php +++ b/firewall/firewall_gest.php @@ -99,12 +99,26 @@ if (isset($_GET['id'])) { $testo = "Confermate la disattivazione della regola?"; break; + case "regolaversoint_rm": + $query = "DELETE FROM firewall_versointerno_regole WHERE id = $id"; + $testo = "Confermate la rimozione della regola da quelle disponibili?"; + break; + case "regolaversoint_up": + $query = "UPDATE firewall_versointerno_regole SET attivo = 1 WHERE id = $id"; + $testo = "Confermate l'attivazione della regola?"; + break; + case "regolaversoint_down": + $query = "UPDATE firewall_versointerno_regole SET attivo = 0 WHERE id = $id"; + $testo = "Confermate la disattivazione della regola?"; + break; + default: $testo = "Regola non implementata"; break; } + //print $query; if (isset($_GET['ref'])) { $ref = pack ('H*', $_GET['ref']); mysql_query( $query, $DB_ID ); diff --git a/firewall/firewall_regole_versointerno.php b/firewall/firewall_regole_versointerno.php index 6d8bb61..86ab79a 100755 --- a/firewall/firewall_regole_versointerno.php +++ b/firewall/firewall_regole_versointerno.php @@ -122,12 +122,12 @@ while ($dato = mysql_fetch_array ( $res )) { - Utente attivo + Utente attivo - Utente non attivo + Utente non attivo - + Utenza diff --git a/firewall/index.php b/firewall/index.php index 898606f..97d24fe 100755 --- a/firewall/index.php +++ b/firewall/index.php @@ -116,6 +116,13 @@ $tabella = new html (0,"90%",array(15,2,30,2,5,0)); riga (10); + +if ($DIRITTI < 10) { + $admin = " AND utenti.id = ".$UTENTE['id']; +} else { + $admin = ""; +} + $query = " SELECT firewall_versointerno_regole.id, firewall_versointerno_regole.permanente, @@ -150,8 +157,7 @@ $query = " SELECT utenti ON firewall_versointerno_regole.id_utenti = utenti.id - AND - utenti.id = ".$UTENTE['id']." + $admin WHERE firewall_versointerno_regole.attivo = 1 ORDER BY @@ -238,8 +244,7 @@ $query = " SELECT utenti ON firewall_versoesterno_regole.id_utenti = utenti.id - AND - utenti.id = ".$UTENTE['id']." + $admin JOIN firewall_macchine_ext ON diff --git a/proxy/users_group_edit.php b/proxy/users_group_edit.php index 0ab5f4d..6826f62 100755 --- a/proxy/users_group_edit.php +++ b/proxy/users_group_edit.php @@ -13,6 +13,8 @@ if (isset($_POST['id'])) { $lpwd = $_POST['lpwd']; $tempo = $_POST['tempo']; + if ($a == "") $a = $da; + $lunghezza = $lung - strlen ($prefisso); $parametro = "0".$lunghezza."d"; for ($i=$da;$i<=$a;$i++) { @@ -45,7 +47,7 @@ if (isset($_POST['id'])) {
intestazione (array ("","Prefisso","","Intervallo","","Lunghezza",""), array("","","","radio","","","")); ?> @@ -53,12 +55,12 @@ $tabella->intestazione (array ("","Prefisso","","Intervallo","","Lunghezza",""), - +  -  - + - + @@ -68,7 +70,7 @@ $tabella->intestazione (array ("","Lunghezza Password","","Tempo assegnato (h)", ?> - + diff --git a/wf/index.php b/wf/index.php deleted file mode 100755 index 771e0fe..0000000 --- a/wf/index.php +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Utente limitato - - Utente non limitato - - Dettaglio - - - - Inviati - - - - - - - - Ricevuti - - - - - - -riga(); -} -$tabella->close(); -view_footer(); -?> diff --git a/wf/iscritti_edit.php b/wf/iscritti_edit.php deleted file mode 100755 index 8265d01..0000000 --- a/wf/iscritti_edit.php +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - -?> - - - -intestazione (array("","Cognome","","Nome","","Codice Fiscale","")); -?> - - - Atleta Attivo - - Atleta non Attivo - - - - - - - - -riga(5); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,3,5,10,5,20,5,5,5,10,0)); -$tabella->intestazione (array("","Sesso","","Data di nascita","","Luogo di nascita","","Prov.","","Nazionalità","")); -?> - - - - - - - - - - - - - -riga(20); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,20,5,20,5,10,0)); -$tabella->intestazione (array("","Palestra","","Cintura","","Categoria","","Scad. certificato","")); -?> - - - - - - - - - - - -riga(20); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,10,5,20,5,5,0)); -$tabella->intestazione (array("","Indirizzo","","CAP","","Città","","Prov.","")); -?> - - - - - - - - - - - -riga(5); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,30,0)); -$tabella->intestazione (array("","Telefono","","Mail","")); -?> - - - - - - - -riga(20); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,20,5,15,0)); -$tabella->intestazione (array("","Cognome","","Nome","","Codice Fiscale","")); -?> - - - - - - - - - -riga(5); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,3,5,10,5,20,5,5,5,10,0)); -$tabella->intestazione (array("","Sesso","","Data di nascita","","Luogo di nascita","","Prov.","","Nazionalità","")); -?> - - - - - - - - - - - - - -riga(30); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,10,5,10,0)); -$tabella->intestazione (array("","Codice Societario","","Data richiesta","","Data Delibera","")); -?> - - - - - - - - - -riga(5); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,10,0)); -$tabella->intestazione (array("","Tessera FITA","","Data FITA","")); -?> - - - - - - - - - - - - - - - - - -riga(5); -$tabella->close(); - -$tabella = new html (0,"90%",array(5,20,5,20,5,10,0)); -$tabella->riga(); ?> - - -close(); ?> -
- diff --git a/wf/iscritti_lista.php b/wf/iscritti_lista.php deleted file mode 100755 index 5ddf468..0000000 --- a/wf/iscritti_lista.php +++ /dev/null @@ -1,77 +0,0 @@ - - -
- - - - - - -riga(); -$query = " SELECT - wf_iscritto.id, - wf_iscritto.attivo, - wf_iscritto.cognome, - wf_iscritto.nome, - wf_cinture.cintura, - wf_palestre.palestra, - wf_iscritto.id_categoria, - DATE_FORMAT(wf_iscritto.certificato, '%d.%m.%Y') AS certificato - FROM - wf_iscritto - JOIN - wf_cinture - ON - wf_iscritto.id_cintura = wf_cinture.id - JOIN - wf_palestre - ON - wf_iscritto.id_palestra = wf_palestre.id - ORDER BY - cognome, - nome - - -"; - -$res = mysql_query( $query, $DB_ID ); -$tabella->intestazione (array("", "", "", "Cognome", "", "Nome", "", "Cintura", "", "categoria", "", "Palestra", "", "Scad. cert.", "")); -$tabella->riga(); -while ($dato = mysql_fetch_array ( $res )) { -?> - - - Utente attivo - - Utente non attivo - - Modifica Utente - - - - - - - - - - - - - - - -close(); -?> -
- diff --git a/wf/wf_gest.php b/wf/wf_gest.php deleted file mode 100755 index a173ae6..0000000 --- a/wf/wf_gest.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - -