Merge branch 'condes'
This commit is contained in:
43
DBDiff/condex.sql
Normal file
43
DBDiff/condex.sql
Normal file
@@ -0,0 +1,43 @@
|
||||
ALTER TABLE `proxy_pool` ADD `nome` VARCHAR(64) NULL AFTER `id`;
|
||||
|
||||
CREATE TABLE `condes_utenti` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`utente` varchar(32) NOT NULL,
|
||||
`pwd` varchar(64) NOT NULL,
|
||||
`data` datetime NOT NULL,
|
||||
`attivo` tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
|
||||
CREATE TABLE `condes_macchine` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT ,
|
||||
`id_proxy_pool` BIGINT NOT NULL ,
|
||||
`data` DATETIME NOT NULL ,
|
||||
`attivo` BOOLEAN NOT NULL ,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE `condes_regole` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT ,
|
||||
`id_utenti` BIGINT NOT NULL ,
|
||||
`id_condes_macchine` BIGINT NOT NULL ,
|
||||
`id_proxy_acl_list` BIGINT NOT NULL ,
|
||||
`permanente` BOOLEAN NOT NULL ,
|
||||
`data` DATETIME NOT NULL ,
|
||||
`attivo` BOOLEAN NOT NULL ,
|
||||
`stato` int(11) DEFAULT 0 ,
|
||||
`modifica` DATETIME NOT NULL ,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE `condes_logs` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`id_utenti` bigint(20) NOT NULL,
|
||||
`id_condes_regole` bigint(20) NOT NULL,
|
||||
`stato` int(11) NOT NULL,
|
||||
`data` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
|
||||
GRANT SELECT, UPDATE (`stato`) ON `pannello_vbc`.`condes_regole` TO 'pannello_proxy'@'%';
|
||||
GRANT SELECT ON `pannello_vbc`.`condes_macchine` TO 'pannello_proxy'@'%';
|
||||
118
condes/condes_gest.php
Executable file
118
condes/condes_gest.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function confirmation(testo) {
|
||||
alert(testo)
|
||||
document.location.href='main.php'
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
if (isset($_GET['azione'])) {
|
||||
$azione = $_GET['azione'];
|
||||
$genera = 0;
|
||||
switch ($azione) {
|
||||
case "macchina_rm":
|
||||
$query = "DELETE FROM condes_macchine WHERE id = $id";
|
||||
$testo = "Confermate la rimozione della macchina da quelle disponibili?";
|
||||
break;
|
||||
case "macchina_up":
|
||||
$query = "UPDATE condes_macchine SET attivo = 1 WHERE id = $id";
|
||||
$testo = "Confermate l'attivazione della macchina?";
|
||||
break;
|
||||
case "macchina_down":
|
||||
$query = "UPDATE condes_macchine SET attivo = 0 WHERE id = $id";
|
||||
$testo = "Confermate la disattivazione della macchina?";
|
||||
break;
|
||||
|
||||
case "regola_rm":
|
||||
$query = "DELETE FROM condes_regole WHERE id = $id";
|
||||
$testo = "Confermate la rimozione della macchina da quelle disponibili?";
|
||||
break;
|
||||
case "regola_up":
|
||||
$query = "UPDATE condes_regole SET attivo = 1 WHERE id = $id";
|
||||
$testo = "Confermate l'attivazione della macchina?";
|
||||
break;
|
||||
case "regola_down":
|
||||
$query = "UPDATE condes_regole SET attivo = 0 WHERE id = $id";
|
||||
$testo = "Confermate la disattivazione della macchina?";
|
||||
break;
|
||||
|
||||
default:
|
||||
$testo = "Regola non implementata";
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($_GET['ref'])) {
|
||||
$ref = pack ('H*', $_GET['ref']);
|
||||
mysql_query( $query, $DB_ID );
|
||||
if ($genera) genera($DB_ID);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
document.location.href="<?php print $ref ?>"
|
||||
</script>
|
||||
<?php } else {
|
||||
$ref = unpack ('H*', $_SERVER["HTTP_REFERER"]);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var r = confirm("<?php print $testo ?>");
|
||||
if (r == true) {
|
||||
document.location.href="<?php print $_SERVER['REQUEST_URI']?>&ref=<?php print $ref[1] ?>"
|
||||
} else {
|
||||
document.location.href="<?php print $_SERVER['HTTP_REFERER']?>"
|
||||
}
|
||||
</script>
|
||||
<?php }
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
function genera ($DB_ID) {
|
||||
$file = 'squid_acl/listip';
|
||||
$fp = fopen($file, 'w');
|
||||
|
||||
$query = "SELECT ip FROM proxy_pool WHERE attivo = 1 AND pool = 1";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
fwrite($fp, $dato['ip']."\n");
|
||||
}
|
||||
fclose($fp);
|
||||
exec ("sudo /opt/squid/sbin/squid -k reconfigure");
|
||||
remote ($DB_ID);
|
||||
}
|
||||
|
||||
function remote ($DB_ID) {
|
||||
$query = " SELECT
|
||||
host,
|
||||
port,
|
||||
usr,
|
||||
pwd,
|
||||
path,
|
||||
command
|
||||
FROM
|
||||
proxy_remote
|
||||
WHERE
|
||||
attivo = 1
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
$connection = ssh2_connect($dato['host'], $dato['port']);
|
||||
ssh2_auth_password($connection, $dato['usr'], $dato['pwd']);
|
||||
|
||||
ssh2_scp_send($connection, 'squid_acl/listip', $dato['path'].'/listip', 0644);
|
||||
$stream = ssh2_exec($connection, $dato['command']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
162
condes/condes_logs.php
Executable file
162
condes/condes_logs.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
|
||||
if (isset($_POST['tempo'])) {
|
||||
$tempo = $_POST['tempo'];
|
||||
} else {
|
||||
$tempo = "DAY";
|
||||
}
|
||||
|
||||
if (isset($_POST['idutente']) && $_POST['idutente'] > 0) {
|
||||
$idutente = $_POST['idutente'];
|
||||
$queryutente = "AND utenti.id = $idutente";
|
||||
} else {
|
||||
$idutente = 0;
|
||||
$queryutente = "";
|
||||
}
|
||||
|
||||
if (isset($_POST['idip']) && $_POST['idip'] > 0) {
|
||||
$idip = $_POST['idip'];
|
||||
$queryip = "AND proxy_pool.id = $idip";
|
||||
} else {
|
||||
$idip = 0;
|
||||
$queryip = "";
|
||||
}
|
||||
|
||||
$stato = array ("Disattivo", "Attivo", "Permanente");
|
||||
|
||||
$query_user = " SELECT
|
||||
utenti.id,
|
||||
utenti.utente
|
||||
FROM
|
||||
utenti
|
||||
JOIN
|
||||
permessi
|
||||
ON
|
||||
permessi.id_utenti = utenti.id
|
||||
WHERE
|
||||
permessi.id_moduli = ".$MODULO['id']."
|
||||
ORDER BY
|
||||
utente
|
||||
";
|
||||
$res_user = mysql_query( $query_user, $DB_ID );
|
||||
|
||||
$query_ip = " SELECT
|
||||
condes_macchine.id_proxy_pool AS id,
|
||||
proxy_pool.nome,
|
||||
proxy_pool.ip
|
||||
FROM
|
||||
condes_macchine
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
ORDER BY
|
||||
-proxy_pool.nome DESC,
|
||||
INET_ATON(proxy_pool.ip) ASC
|
||||
";
|
||||
$res_ip = mysql_query( $query_ip, $DB_ID );
|
||||
|
||||
?>
|
||||
|
||||
<form name="" method="post">
|
||||
<?php $tabella = new html (0,"90%", array (3,15,2,10,2,20,2,10,2,10,0)); ?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh">
|
||||
<select name="tempo" onchange="this.form.submit()">
|
||||
<option value="HOUR" <?php if ($tempo == "HOUR") {print "selected=\"selected\""; } ?>>Ultima Ora</option>
|
||||
<option value="DAY" <?php if ($tempo == "DAY") {print "selected=\"selected\""; } ?>>Ultimo Giorno</option>
|
||||
<option value="WEEK" <?php if ($tempo == "WEEK") {print "selected=\"selected\""; } ?>>Ultima Settimana</option>
|
||||
<option value="MONTH" <?php if ($tempo == "MONTH") {print "selected=\"selected\""; } ?>>Ultimo Mese</option>
|
||||
<option value="YEAR" <?php if ($tempo == "YEAR") {print "selected=\"selected\""; } ?>>Ultimo Anno</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh">
|
||||
<select name="idutente" onchange="this.form.submit()">
|
||||
<option value=0 <?php if ($idutente == 0) {print "selected=\"selected\""; } ?>>----</option>
|
||||
<?php while ($dato = mysql_fetch_array ( $res_user )) { ?>
|
||||
<option value="<?php print $dato['id'] ?>" <?php if ($idutente == $dato['id']) {print "selected=\"selected\""; } ?>><?php print $dato['utente'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh">
|
||||
<select name="idip" onchange="this.form.submit()">
|
||||
<option value=0 <?php if ($idip == 0) {print "selected=\"selected\""; } ?>>----</option>
|
||||
<?php while ($dato = mysql_fetch_array ( $res_ip )) { ?>
|
||||
<option value="<?php print $dato['id'] ?>" <?php if ($idip == $dato['id']) {print "selected=\"selected\""; } ?>><?php print $dato['ip']; if ($dato['nome'] != "") print " (".$dato['nome'].")" ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->intestazione (array("", "Data", "", "Utente", "", "Macchina", "", "ACL", "", "Stato", ""));
|
||||
|
||||
$query = " SELECT
|
||||
condes_logs.id,
|
||||
condes_logs.stato,
|
||||
DATE_FORMAT(condes_logs.data, '%d.%m.%Y %H:%i:%s') AS data,
|
||||
utenti.utente,
|
||||
proxy_pool.nome AS nome_pool,
|
||||
proxy_pool.ip,
|
||||
proxy_acl_list.nome
|
||||
FROM
|
||||
condes_logs
|
||||
JOIN
|
||||
utenti
|
||||
ON
|
||||
condes_logs.id_utenti = utenti.id
|
||||
$queryutente
|
||||
JOIN
|
||||
condes_regole
|
||||
ON
|
||||
condes_logs.id_condes_regole = condes_regole.id
|
||||
JOIN
|
||||
proxy_acl_list
|
||||
ON
|
||||
condes_regole.id_proxy_acl_list = proxy_acl_list.id
|
||||
JOIN
|
||||
condes_macchine
|
||||
ON
|
||||
condes_regole.id_condes_macchine = condes_macchine.id
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
$queryip
|
||||
WHERE
|
||||
condes_logs.data >= DATE_SUB(NOW(), INTERVAL 1 $tempo)
|
||||
ORDER BY
|
||||
condes_logs.data DESC
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['data'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['utente'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['ip']; if ($dato['nome_pool'] != "") print " (".$dato['nome_pool'].")" ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['nome'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $stato[$dato['stato']] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<?php view_footer(); ?>
|
||||
101
condes/condes_macchine.php
Executable file
101
condes/condes_macchine.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
|
||||
if (isset($_POST['id'])) {
|
||||
$id = $_POST['id'];
|
||||
$query = " INSERT INTO
|
||||
condes_macchine
|
||||
SET
|
||||
id_proxy_pool = $id,
|
||||
data = NOW(),
|
||||
attivo = 1
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
}
|
||||
|
||||
$query = " SELECT
|
||||
id,
|
||||
ip,
|
||||
nome
|
||||
FROM
|
||||
proxy_pool
|
||||
WHERE
|
||||
id NOT IN (SELECT id_proxy_pool FROM condes_macchine)
|
||||
ORDER BY
|
||||
-nome DESC,
|
||||
INET_ATON(ip) ASC
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
|
||||
$tabella = new html (0,"90%",array(3,3,2,15,2,15,2,15,0));
|
||||
?>
|
||||
<form name="" method="post">
|
||||
<tr>
|
||||
<td colspan=3 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh"><input type="image" src="<?php print $CONF['base_url'] ?>/img/addresource.png" border="0" alt="Inserisci" /></td>
|
||||
<td colspan=4 class="spazioh">
|
||||
<select name="id">
|
||||
<option value="" selected="selected">---</option>
|
||||
<?php while ($dato = mysql_fetch_array ( $res )) { ?>
|
||||
<option value="<?php print $dato['id'] ?>"><?php print $dato['nome']." - ".$dato['ip'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
</form>
|
||||
<?php
|
||||
$query = " SELECT
|
||||
condes_macchine.id,
|
||||
condes_macchine.data,
|
||||
condes_macchine.attivo,
|
||||
proxy_pool.ip,
|
||||
proxy_pool.nome
|
||||
FROM
|
||||
condes_macchine
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
ORDER BY
|
||||
INET_ATON(ip) ASC
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan=2 class="col3btn">
|
||||
<?php if ($dato['attivo']) { ?>
|
||||
<a href="condes_gest.php?azione=macchina_down&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente attivo" TITLE="Utente attivo"></a>
|
||||
<?php } else { ?>
|
||||
<a href="condes_gest.php?azione=macchina_up&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente non attivo" TITLE="Utente non attivo"></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td rowspan=2 class="spazioh"><a href="condes_gest.php?azione=macchina_rm&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/trash.png"></a></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">IP</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Nome</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Ultima Modifica</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="colip"><?php print $dato['ip'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['nome'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['data'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tabella->riga ();
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer();
|
||||
?>
|
||||
194
condes/condes_regole.php
Executable file
194
condes/condes_regole.php
Executable file
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
|
||||
if (isset($_POST['id_utenti'])) {
|
||||
$id_utenti = $_POST['id_utenti'];
|
||||
$id_macchine = $_POST['id_macchine'];
|
||||
$id_acl = $_POST['id_acl'];
|
||||
if (isset($_POST['perm'])) {
|
||||
$perm = $_POST['perm'];
|
||||
} else {
|
||||
$perm = 0;
|
||||
}
|
||||
$query = " INSERT INTO
|
||||
condes_regole
|
||||
SET
|
||||
id_utenti = $id_utenti,
|
||||
id_condes_macchine = $id_macchine,
|
||||
id_proxy_acl_list = $id_acl,
|
||||
permanente = $perm,
|
||||
data = NOW(),
|
||||
attivo = 1
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
}
|
||||
|
||||
$query = " SELECT
|
||||
utenti.id,
|
||||
utenti.utente
|
||||
FROM
|
||||
utenti
|
||||
JOIN
|
||||
permessi
|
||||
ON
|
||||
permessi.id_utenti = utenti.id
|
||||
JOIN
|
||||
livelli
|
||||
ON
|
||||
livelli.nome = 'Utente'
|
||||
AND
|
||||
permessi.accesso <= livelli.livello
|
||||
WHERE
|
||||
permessi.id_moduli = ".$MODULO['id']."
|
||||
AND
|
||||
utenti.attivo = 1
|
||||
ORDER BY
|
||||
utente
|
||||
";
|
||||
$res_utenti = mysql_query( $query, $DB_ID );
|
||||
|
||||
$query = " SELECT
|
||||
condes_macchine.id,
|
||||
proxy_pool.ip,
|
||||
proxy_pool.nome
|
||||
FROM
|
||||
condes_macchine
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
ORDER BY
|
||||
-nome DESC,
|
||||
INET_ATON(ip) ASC
|
||||
";
|
||||
$res_macchine = mysql_query( $query, $DB_ID );
|
||||
|
||||
$query = " SELECT
|
||||
id,
|
||||
nome
|
||||
FROM
|
||||
proxy_acl_list
|
||||
WHERE
|
||||
attivo = 1
|
||||
ORDER BY
|
||||
sys DESC,
|
||||
nome
|
||||
";
|
||||
$res_acl = mysql_query( $query, $DB_ID );
|
||||
|
||||
$tabella = new html (0,"90%",array(3,3,2,15,2,15,2,15,2,5,0));
|
||||
?>
|
||||
<form name="" method="post">
|
||||
<tr>
|
||||
<td colspan=2 class="spazioh"><input type="image" src="<?php print $CONF['base_url'] ?>/img/addresource.png" border="0" alt="Inserisci" /></td>
|
||||
|
||||
<td class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh">
|
||||
<select name="id_utenti">
|
||||
<option value="" selected="selected">---</option>
|
||||
<?php while ($dato = mysql_fetch_array ( $res_utenti )) { ?>
|
||||
<option value="<?php print $dato['id'] ?>"><?php print $dato['utente'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh">
|
||||
<select name="id_macchine">
|
||||
<option value="" selected="selected">---</option>
|
||||
<?php while ($dato = mysql_fetch_array ( $res_macchine )) { ?>
|
||||
<option value="<?php print $dato['id'] ?>"><?php print $dato['ip']; if ($dato['nome'] != "") print " (".$dato['nome'].")" ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh">
|
||||
<select name="id_acl">
|
||||
<option value="" selected="selected">---</option>
|
||||
<?php while ($dato = mysql_fetch_array ( $res_acl )) { ?>
|
||||
<option value="<?php print $dato['id'] ?>"><?php print $dato['nome'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="radio"><input type="checkbox" name="perm" value="1"></td>
|
||||
|
||||
<td class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
</form>
|
||||
<?php
|
||||
$query = " SELECT
|
||||
condes_regole.id,
|
||||
utenti.utente,
|
||||
proxy_pool.nome,
|
||||
proxy_pool.ip,
|
||||
proxy_acl_list.nome AS acl,
|
||||
condes_regole.permanente,
|
||||
condes_regole.attivo
|
||||
FROM
|
||||
condes_regole
|
||||
JOIN
|
||||
utenti
|
||||
ON
|
||||
condes_regole.id_utenti = utenti.id
|
||||
JOIN
|
||||
condes_macchine
|
||||
ON
|
||||
condes_regole.id_condes_macchine = condes_macchine.id
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
JOIN
|
||||
proxy_acl_list
|
||||
ON
|
||||
condes_regole.id_proxy_acl_list = proxy_acl_list.id
|
||||
ORDER BY
|
||||
utenti.utente,
|
||||
-proxy_pool.nome DESC,
|
||||
proxy_pool.ip
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan=2 class="col3btn">
|
||||
<?php if ($dato['attivo']) { ?>
|
||||
<a href="condes_gest.php?azione=regola_down&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente attivo" TITLE="Utente attivo"></a>
|
||||
<?php } else { ?>
|
||||
<a href="condes_gest.php?azione=regola_up&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente non attivo" TITLE="Utente non attivo"></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td rowspan=2 class="spazioh"><a href="condes_gest.php?azione=regola_rm&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/trash.png"></a></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Utenza</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Macchina</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">ACL</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="radio">Perm</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="textl"><?php print $dato['utente'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="textl"><?php print $dato['ip']; if ($dato['nome'] != "") print "(".$dato['nome'].")" ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="textl"><?php print $dato['acl'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="textc"><?php if ($dato['permanente']) print "Si"; else print "No"; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer();
|
||||
?>
|
||||
91
condes/condes_utenti.php
Executable file
91
condes/condes_utenti.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var stile = "top=30, left=30, width=1000, height=500, status=no, menubar=no, toolbar=no ";
|
||||
|
||||
function PopupG(apri)
|
||||
{
|
||||
window.open(apri, "", stile);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
$query = " SELECT
|
||||
utenti.id,
|
||||
utenti.utente,
|
||||
utenti.admin,
|
||||
utenti.creazione,
|
||||
utenti.modifica,
|
||||
utenti.ultimo,
|
||||
utenti.attivo
|
||||
FROM
|
||||
utenti
|
||||
JOIN
|
||||
permessi
|
||||
ON
|
||||
permessi.id_utenti = utenti.id
|
||||
JOIN
|
||||
livelli
|
||||
ON
|
||||
livelli.nome = 'Utente'
|
||||
AND
|
||||
permessi.accesso <= livelli.livello
|
||||
WHERE
|
||||
permessi.id_moduli = ".$MODULO['id']."
|
||||
ORDER BY
|
||||
utente
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
|
||||
$tabella = new html (0,"90%",array(3,2,15,2,15,2,15,2,15,2,15,2,0));
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan=2 class="col3btn">
|
||||
<?php if ($dato['attivo']) { ?>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente attivo" TITLE="Utente attivo">
|
||||
<?php } else { ?>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente non attivo" TITLE="Utente non attivo">
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Utente</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Creazione</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Ultima Modifica</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Ultimo accesso</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Numero accessi</td>
|
||||
<td class="col3btn">
|
||||
<a href="permessiutenti.php?id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/dettagli.png" width="20" height="20" border="0" ALT="Gestione regole" TITLE="Gestione Regole"></a>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="colip"><?php print $dato['utente'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['creazione'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['modifica'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['ultimo'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $records ?></td>
|
||||
<td class="col3btn"><a href="javascript:PopupG('logutenti.php?idutente=<?php print $dato['id'] ?>')"><img border="0" src="<?php print $CONF['base_url'] ?>/img/iconSystemLog.gif" ALT="Grafico Utilizzo" TITLE="Grafico Utilizzo"></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tabella->riga ();
|
||||
}
|
||||
$tabella->close ();
|
||||
view_footer();
|
||||
?>
|
||||
156
condes/index.php
156
condes/index.php
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Utente');
|
||||
view_top();
|
||||
|
||||
if (isset($_POST['utente'])) {
|
||||
$utente = $_POST['utente'];
|
||||
|
||||
$old = $new = array();
|
||||
foreach ($_POST as $id => $valore) {
|
||||
if (preg_match ("/^new-(\d+)/", $id, $ris)) $new[$ris[1]] = $valore;
|
||||
if (preg_match ("/^old-(\d+)/", $id, $ris)) $old[$ris[1]] = $valore;
|
||||
}
|
||||
|
||||
foreach ($new as $id => $valore) {
|
||||
if ($new[$id] == $old[$id]) continue;
|
||||
|
||||
if ($valore >1)
|
||||
$stato = 1;
|
||||
else
|
||||
$stato = $valore;
|
||||
|
||||
$query = " SELECT
|
||||
condes_regole.id_condes_macchine,
|
||||
condes_regole.id_proxy_acl_list,
|
||||
condes_macchine.id_proxy_pool
|
||||
FROM
|
||||
condes_regole
|
||||
JOIN
|
||||
condes_macchine
|
||||
ON
|
||||
condes_regole.id_condes_macchine = condes_macchine.id
|
||||
WHERE
|
||||
condes_regole.id = $id
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
|
||||
$query = " UPDATE
|
||||
condes_regole
|
||||
SET
|
||||
stato = $valore,
|
||||
modifica = NOW()
|
||||
WHERE
|
||||
id_condes_macchine = ".$dato['id_condes_macchine']."
|
||||
AND
|
||||
id_proxy_acl_list = ".$dato['id_proxy_acl_list'];
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
|
||||
$query = " INSERT INTO
|
||||
proxy_acl_ip
|
||||
SET
|
||||
idacllist = ".$dato['id_proxy_acl_list'].",
|
||||
idpool = ".$dato['id_proxy_pool'].",
|
||||
stato = $stato,
|
||||
data = NOW()
|
||||
ON DUPLICATE KEY UPDATE
|
||||
stato = $stato,
|
||||
data = NOW()
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
|
||||
$query = " INSERT INTO
|
||||
condes_logs
|
||||
SET
|
||||
id_utenti = ".$UTENTE['id'].",
|
||||
id_condes_regole = $id,
|
||||
stato = $valore,
|
||||
data = NOW()
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
}
|
||||
}
|
||||
|
||||
$tabella = new html (0,"90%",array(15,2,20,2,15,2,5,0));
|
||||
?>
|
||||
<form name="" method="post">
|
||||
<input type="hidden" name="utente" value="<?php print $UTENTE['id'] ?>">
|
||||
|
||||
<tr>
|
||||
<td><input type="submit" value="Applica"></td>
|
||||
<td colspan="7" class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tabella->riga ();
|
||||
|
||||
$query = " SELECT
|
||||
condes_regole.id,
|
||||
condes_regole.stato,
|
||||
proxy_pool.nome,
|
||||
proxy_pool.ip,
|
||||
proxy_acl_list.nome AS acl,
|
||||
condes_regole.permanente
|
||||
FROM
|
||||
condes_regole
|
||||
JOIN
|
||||
utenti
|
||||
ON
|
||||
condes_regole.id_utenti = utenti.id
|
||||
AND
|
||||
utenti.id = ".$UTENTE['id']."
|
||||
JOIN
|
||||
condes_macchine
|
||||
ON
|
||||
condes_regole.id_condes_macchine = condes_macchine.id
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
JOIN
|
||||
proxy_acl_list
|
||||
ON
|
||||
condes_regole.id_proxy_acl_list = proxy_acl_list.id
|
||||
WHERE
|
||||
condes_regole.attivo = 1
|
||||
ORDER BY
|
||||
-proxy_pool.nome DESC,
|
||||
proxy_pool.ip
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan=2 class="textl">
|
||||
<input type="hidden" name="old-<?php print $dato['id'] ?>" value="<?php print $dato['stato'] ?>">
|
||||
<select name="new-<?php print $dato['id'] ?>">
|
||||
<option value="0" <?php if ($dato['stato'] == 0 ) print "selected" ?>>Disattivo</option>
|
||||
<option value="1" <?php if ($dato['stato'] == 1 ) print "selected" ?>>Attivo</option>
|
||||
<?php if ($dato['permanente']) { ?>
|
||||
<option value="2" <?php if ($dato['stato'] == 2 ) print "selected" ?>>Permanente</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Macchina</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">ACL</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="radio">Perm</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="textl"><?php print $dato['ip']; if ($dato['nome'] != "") print "(".$dato['nome'].")" ?></td>
|
||||
<td class="textl"><?php print $dato['acl'] ?></td>
|
||||
<td class="textc"><?php if ($dato['permanente']) print "Si"; else print "No"; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$tabella->riga ();
|
||||
} ?>
|
||||
</form>
|
||||
<?php
|
||||
$tabella->close ();
|
||||
view_footer();
|
||||
?>
|
||||
|
||||
6
condes/script/condes.conf
Normal file
6
condes/script/condes.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
our $DBhost = '127.0.0.1';
|
||||
our $DBname = 'pannello_vbc';
|
||||
our $DBuser = 'pannello_proxy';
|
||||
our $DBpass = 'CuQlM1lfF4VZDCIP';
|
||||
|
||||
return 1;
|
||||
96
condes/script/condes.pl
Executable file
96
condes/script/condes.pl
Executable file
@@ -0,0 +1,96 @@
|
||||
#!/usr/bin/perl
|
||||
$|=1;
|
||||
|
||||
use DBI;
|
||||
use FindBin qw($Bin);
|
||||
|
||||
my $param = shift @ARGV;
|
||||
|
||||
our $verbose = 0;
|
||||
if ($param eq '-v') {
|
||||
$verbose = 1;
|
||||
} elsif ($param eq '-vv') {
|
||||
$verbose = 2;
|
||||
}
|
||||
|
||||
require "$Bin/condes.conf";
|
||||
|
||||
my $dbmysql = DBI->connect("DBI:mysql:;host=$DBhost", $DBuser, $DBpass) or die ($DBI::errstr);
|
||||
$sts = $dbmysql->prepare("use $DBname");
|
||||
$sts->execute ();
|
||||
|
||||
$query = " SELECT
|
||||
condes_regole.id,
|
||||
condes_regole.id_condes_macchine,
|
||||
condes_regole.id_proxy_acl_list,
|
||||
condes_macchine.id_proxy_pool,
|
||||
proxy_pool.ip,
|
||||
proxy_pool.nome,
|
||||
proxy_acl_list.nome AS acl
|
||||
FROM
|
||||
condes_regole
|
||||
JOIN
|
||||
condes_macchine
|
||||
ON
|
||||
condes_regole.id_condes_macchine = condes_macchine.id
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
condes_macchine.id_proxy_pool = proxy_pool.id
|
||||
JOIN
|
||||
proxy_acl_list
|
||||
ON
|
||||
condes_regole.id_proxy_acl_list = proxy_acl_list.id
|
||||
WHERE
|
||||
condes_regole.stato = 1
|
||||
";
|
||||
|
||||
$sts = $dbmysql->prepare($query);
|
||||
$sts->execute ();
|
||||
while ( $ref = $sts->fetchrow_hashref ) {
|
||||
$id = $$ref{'id'};
|
||||
$condes_macchine = $$ref{'id_condes_macchine'};
|
||||
$proxy_acl_list = $$ref{'id_proxy_acl_list'};
|
||||
$proxy_pool = $$ref{'id_proxy_pool'};
|
||||
$proxy_pool_ip = $$ref{'ip'};
|
||||
$proxy_pool_nome = $$ref{'nome'};
|
||||
$acl = $$ref{'acl'};
|
||||
|
||||
printf "Rimosso %-15s (%-10s) con lista %s\n", $proxy_pool_ip, $proxy_pool_nome, $acl if ($verbose);
|
||||
|
||||
$query = " UPDATE
|
||||
proxy_acl_ip
|
||||
SET
|
||||
stato = 0,
|
||||
data = NOW()
|
||||
WHERE
|
||||
idacllist = $proxy_acl_list
|
||||
AND
|
||||
idpool = $proxy_pool
|
||||
";
|
||||
my $sts = $dbmysql->prepare($query); $sts->execute ();
|
||||
|
||||
$query = " INSERT INTO
|
||||
condes_logs
|
||||
SET
|
||||
id_utenti = 0,
|
||||
id_condes_regole = $id,
|
||||
stato = 0,
|
||||
data = NOW()
|
||||
";
|
||||
$sts = $dbmysql->prepare($query); $sts->execute ();
|
||||
|
||||
$query = " UPDATE
|
||||
condes_regole
|
||||
SET
|
||||
stato = 0,
|
||||
modifica = NOW()
|
||||
WHERE
|
||||
id_condes_macchine = $condes_macchine
|
||||
AND
|
||||
id_proxy_acl_list = $proxy_acl_list
|
||||
";
|
||||
$sts = $dbmysql->prepare($query); $sts->execute ();
|
||||
}
|
||||
|
||||
exit;
|
||||
@@ -19,32 +19,23 @@ if (isset ($_POST['id'])) {
|
||||
|
||||
$testo = "L'utente e' stato correttamente modificato";
|
||||
$query = "UPDATE utenti SET $querypwd modifica = NOW(), mail='$mail' WHERE `id`=$id";
|
||||
|
||||
$tabella = new html (0,"90%", array (0));
|
||||
$tabella->riga();
|
||||
|
||||
if (mysql_query( $query, $DB_ID )) {
|
||||
$testo = "L'utente e' stato correttamente modificato";
|
||||
} else {
|
||||
$testo = "Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: ".mysql_error();
|
||||
}
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="10" alt=""><td>
|
||||
<td align="center"><?php print $testo ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (mysql_query( $query, $DB_ID )) { ?>
|
||||
<?php print $testo ?><br>
|
||||
<?php } else { ?>
|
||||
Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: <?php print mysql_error() ?><br>
|
||||
<?php print $query ?><br>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" value="Ok" onclick="location.href = '<?php print $CONF['base_url'] ?>/index.php';"></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="10" alt=""></td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr><td align="center"><input type="button" value="Ok" onclick="location.href = '<?php print $CONF['base_url'] ?>/index.php';"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->close();
|
||||
} else {
|
||||
|
||||
$bottone = "Modifica";
|
||||
@@ -54,11 +45,8 @@ Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: <?p
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
$dato['password'] = "ahg5t!frtb5@u&^!";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (($modifica == 0 || $modifica == 1) && !isset($_GET['rm'])) { ?>
|
||||
|
||||
|
||||
if (($modifica == 0 || $modifica == 1) && !isset($_GET['rm'])) { ?>
|
||||
<script type="text/javascript" src="<?php print $CONF['base_url'] ?>/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="<?php print $CONF['base_url'] ?>/jquery/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="<?php print $CONF['base_url'] ?>/jquery/jquery.validate.password.js"></script>
|
||||
@@ -110,31 +98,34 @@ $(document).ready(function()
|
||||
</script>
|
||||
|
||||
<form action="chkpasswd.php" method="post" id="modulo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php $tabella = new html (0,"90%", array (2, 20,2,20,0)); ?>
|
||||
<input type="hidden" name="id" value="<?php print $dato['id'] ?>">
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="30" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td>Nome Utente</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td><?php print $dato['utente']?></td>
|
||||
<td class="status" colspan="6"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="30" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lmail" for="mail">Indirizzo E-Mail</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field"><input id="mail" name="mail" type="text" value="<?php print $dato['mail']?>" maxlength="50" /></td>
|
||||
<td class="status" colspan="6"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td class="col1" colspan="9">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<td class="col1" colspan="5">
|
||||
|
||||
<?php $tabella2 = new html (0,"90%",array(2,10,2,35,40,0)); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="40" height="50" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lpassword" for="password">Password</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="field" width="30"><input id="password1" name="password1" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>" /></td>
|
||||
<td class="status" width="400">
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field" width="30"><input id="password1" name="password1" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>"/></td>
|
||||
<td class="status">
|
||||
<div class="password-meter">
|
||||
<div class="password-meter-message"> </div>
|
||||
<div class="password-meter-bg">
|
||||
@@ -142,29 +133,33 @@ $(document).ready(function()
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php $tabella2->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="40" height="50" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lpassword_confirm" for="password_confirm">Password</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="field" width="30"><input id="password2" name="password2" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>" /></td>
|
||||
<td class="status" width="400"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field" width="30"><input id="password2" name="password2" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>"/></td>
|
||||
<td class="status"> </td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9" class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" alt=""></td></tr>
|
||||
</table>
|
||||
<?php $tabella2->close(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr><td align="center" colspan="9">
|
||||
<input type="submit" value="<?php print $bottone ?>">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = '<?php print $CONF['base_url'] ?>/index.php';"></button>
|
||||
</td></tr>
|
||||
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php view_footer(); ?>
|
||||
<?php
|
||||
}
|
||||
view_footer();
|
||||
?>
|
||||
|
||||
@@ -2,24 +2,22 @@
|
||||
include_once ("config.php");
|
||||
$UTENTE = login();
|
||||
isadmin();
|
||||
|
||||
view_top();
|
||||
?>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr><td class="spaziov" colspan=7><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
$tabella = new html (0,"90%", array(2,20,2,30,2,40,0));
|
||||
?>
|
||||
<tr>
|
||||
<td width="50"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="150" class="campo">Campo</td>
|
||||
<td width="20"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="350" class="campo">Valore</td>
|
||||
<td width="20"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="350" class="campo">Nota</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo">Campo</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo">Valore</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo">Nota</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=7><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
$tabella->riga();
|
||||
|
||||
$query = "SELECT * FROM conf WHERE vis=1 ORDER BY ordine";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
@@ -49,16 +47,18 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
if ($visualizza) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="50"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="150" class="valoretxt"><a class="menuatt" href="modconf.php?var=<?php print $dato['variabile'] ?>"><?php print $dato['variabile']?></a></td>
|
||||
<td width="20" bgcolor="#f3f3f3"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="350" class="valoretxt"><?php print $riga?></td>
|
||||
<td width="20" bgcolor="#f3f3f3"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="350" class="valoretxt"><?php print $dato['Commento']?></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="valoretxt"><a class="menuatt" href="modconf.php?var=<?php print $dato['variabile'] ?>"><?php print $dato['variabile']?></a></td>
|
||||
<td bgcolor="#f3f3f3"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="valoretxt"><?php print $riga?></td>
|
||||
<td bgcolor="#f3f3f3"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="valoretxt"><?php print $dato['Commento']?></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=7><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php }
|
||||
} ?>
|
||||
</table>
|
||||
<?php view_footer (); ?>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
}
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer ();
|
||||
?>
|
||||
|
||||
@@ -8,4 +8,6 @@ $db_data_pwd = "Lx7w3e8dNPfwwc3z";
|
||||
require_once ("function.php");
|
||||
$DB_ID = db_data_connect ();
|
||||
$CONF = carica_conf();
|
||||
$MODULO = modulo();
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<?php
|
||||
$tabella = new html (0, "100%", array (33,34,0));
|
||||
$tabella->riga();
|
||||
?>
|
||||
<tr bgcolor="#FFC350">
|
||||
<td nowrap class="lbottom"> <?php print $CONF['Versione'] ?></td>
|
||||
<td width="500"> </td>
|
||||
@@ -10,7 +13,7 @@
|
||||
<td> </td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
@@ -395,7 +395,7 @@ function home_moduli () {
|
||||
|
||||
$menu = array_moduli();
|
||||
|
||||
html_spazi (array (5,30,0));
|
||||
$tabella = new html (0,"90%", array (5,30,0));
|
||||
|
||||
for ($i=1; $i<count($menu);$i++) { ?>
|
||||
<tr>
|
||||
@@ -403,10 +403,8 @@ function home_moduli () {
|
||||
<td class="campo"><?php print $menu[$i][0] ?></td>
|
||||
<td class="descrizione"><?php print $menu[$i][3] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sep" colspan=3><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php }
|
||||
$tabella->close ();
|
||||
}
|
||||
|
||||
function lista_moduli () {
|
||||
@@ -464,6 +462,30 @@ function lista_moduli () {
|
||||
<?php
|
||||
}
|
||||
|
||||
function modulo () {
|
||||
global $DB_ID, $CONF;
|
||||
|
||||
preg_match ('/^'.preg_replace('/\//','\/',$CONF['base_url']).'\/([^\/]+)\/.*/', $_SERVER['REQUEST_URI'], $trovato);
|
||||
$modulo = $trovato[1];
|
||||
|
||||
$query = " SELECT
|
||||
id,
|
||||
nome
|
||||
FROM
|
||||
moduli
|
||||
WHERE
|
||||
moduli.directory = '$modulo'
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$risposta = "NIENTE";
|
||||
if ($dato = mysql_fetch_array ($res)) {
|
||||
$risposta = $dato;
|
||||
}
|
||||
|
||||
return $risposta;
|
||||
}
|
||||
|
||||
function diritti ($minimo) {
|
||||
global $UTENTE, $DB_ID, $CONF;
|
||||
|
||||
@@ -539,7 +561,7 @@ function get_levels () {
|
||||
}
|
||||
|
||||
function view_top () {
|
||||
global $CONF, $UTENTE;
|
||||
global $CONF, $UTENTE, $MODULO;
|
||||
include_once ($_SERVER["DOCUMENT_ROOT"].$CONF['base_url']."/core/top.php");
|
||||
}
|
||||
|
||||
@@ -594,10 +616,17 @@ function generateStrongPassword($length = 9, $add_dashes = false, $available_set
|
||||
return $dash_str;
|
||||
}
|
||||
|
||||
function html_spazi ($dati) {
|
||||
class html {
|
||||
|
||||
public function __construct($bordo, $size, $dati, $align="") {
|
||||
global $CONF;
|
||||
|
||||
print "<tr>";
|
||||
$this->conf = $CONF;
|
||||
$this->size = count ($dati);
|
||||
|
||||
if ($align != "") $align = "align=\"$align\"";
|
||||
print "<table cellpadding=\"0\" cellspacing=\"0\" border=\"$bordo\" width=\"$size\" $align>\n";
|
||||
print "\t<tr>\n";
|
||||
$somma = 0;
|
||||
foreach ($dati as $riga) {
|
||||
if (!$riga) {
|
||||
@@ -605,16 +634,14 @@ function html_spazi ($dati) {
|
||||
} else {
|
||||
$somma += $riga;
|
||||
}
|
||||
?>
|
||||
<td class="sep" width="<?php print $riga ?>%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<?php }
|
||||
print "</tr>";
|
||||
}
|
||||
print "\t\t<td class=\"sep\" width=\"$riga%\"><img src=\"".$this->conf['base_url']."/img/spazio.gif\"></td>\n";
|
||||
}
|
||||
print "\t</tr>\n";
|
||||
}
|
||||
|
||||
function html_intestazione ($dati, $tipo = array ()) {
|
||||
global $CONF;
|
||||
public function intestazione ($dati, $tipo = array ()) {
|
||||
|
||||
print "<tr>";
|
||||
print "\t<tr>\n";
|
||||
foreach ($dati as $key => $riga) {
|
||||
if ($riga == "") {
|
||||
$riga = " ";
|
||||
@@ -625,10 +652,25 @@ function html_intestazione ($dati, $tipo = array ()) {
|
||||
} else {
|
||||
$classe = "descrizione";
|
||||
}
|
||||
?>
|
||||
<td class="<?php print $classe ?>"><?php print $riga ?></td>
|
||||
<?php }
|
||||
print "</tr>";
|
||||
print "\t\t<td nowrap class=\"$classe\">$riga</td>\n";
|
||||
}
|
||||
print "\t</tr>\n";
|
||||
}
|
||||
|
||||
public function riga () {
|
||||
print "\t<tr><td class=\"spaziov\" colspan=\"$this->size\"><img src=\"".$this->conf['base_url']."/img/spazio.gif\"></td></tr>\n";
|
||||
}
|
||||
|
||||
public function close () {
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
public function td_vuoto () {
|
||||
}
|
||||
|
||||
public function bottoni () {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -6,10 +6,7 @@ view_top();
|
||||
|
||||
<META HTTP-EQUIV="Refresh" CONTENT="30" URL="main.php">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php home_moduli () ?>
|
||||
<tr><td class="spaziov" colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
</table>
|
||||
|
||||
<img src="img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -14,7 +14,7 @@ if (isset ($_GET['var'])) {
|
||||
<form action="modconf.php" method="post">
|
||||
<input type="hidden" name="variabile" value="<?php print $var ?>">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php $tabella = new html (0, "90%", array(2,15,2,50,0)); ?>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
<td class="valoretxt" width="150">Variabile</td>
|
||||
@@ -22,8 +22,7 @@ if (isset ($_GET['var'])) {
|
||||
<td class="valore" width="500"><?php print $dato['variabile'] ?></td>
|
||||
<td><img src="img/spazio.gif" width="180" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan="5"><img src="img/spazio.gif"></td></tr>
|
||||
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
<td class="valoretxt" width="150">Commento</td>
|
||||
@@ -31,8 +30,7 @@ if (isset ($_GET['var'])) {
|
||||
<td class="valore" width="500"><?php print $dato['Commento'] ?></td>
|
||||
<td><img src="img/spazio.gif" width="180" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan="5"><img src="img/spazio.gif"></td></tr>
|
||||
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
<td class="valoretxt" width="150">Valore</td>
|
||||
@@ -61,16 +59,17 @@ if (isset ($_GET['var'])) {
|
||||
</td>
|
||||
<td><img src="img/spazio.gif" width="180" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan="5"><img src="img/spazio.gif"></td></tr>
|
||||
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr><td colspan="5"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td align="center" colspan="5">
|
||||
<input type="submit" value="Modifica">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = 'conf.php';"></button>
|
||||
</td></tr>
|
||||
<tr><td colspan="5"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
|
||||
<?php } else if (isset ($_POST['variabile'])) {
|
||||
@@ -100,20 +99,23 @@ if (isset ($_GET['var'])) {
|
||||
else
|
||||
$testo = "Modifica della variabile $variabile non avvenuta: ".mysql_error();
|
||||
}?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
$tabella = new html (1, "90%", array(0)); ?>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="10" alt=""><td></tr>
|
||||
<tr><td><?php print $testo ?></td></tr>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td><input type="button" value="Ok" onclick="location.href = 'conf.php';"></button></td></tr>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
$tabella->close();
|
||||
} else {
|
||||
$tabella = new html (1, "90%", array(0)); ?>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="10" alt=""><td></tr>
|
||||
<tr><td>Operazione non permessa</td></tr>
|
||||
<tr><td><input type="button" value="Ok" onclick="location.href = 'main.php';"></button></td></tr>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="10" alt=""><td></tr>
|
||||
<?php
|
||||
$tabella->close();
|
||||
}
|
||||
view_footer();
|
||||
?>
|
||||
<?php view_footer(); ?>
|
||||
|
||||
12
core/top.php
12
core/top.php
@@ -5,17 +5,19 @@
|
||||
</head>
|
||||
<body>
|
||||
<link rel="stylesheet" type="text/css" href="<?php print $CONF['base_url'] ?>/css/stile.css" />
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" width="1000">
|
||||
<?php
|
||||
$tabella_ext = new html (0,"1000", array(0),"center");
|
||||
if ($UTENTE['utente'] != '') { ?>
|
||||
<tr><td>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<?php
|
||||
$tabella = new html (0,"100%",array(33, 33, 0));
|
||||
?>
|
||||
<tr bgcolor="#FFC350">
|
||||
<td nowrap class="ltop">Utente: <?php print $_SESSION['username'] ?></td>
|
||||
<td width="200"> </td>
|
||||
<td class="rtop"><a class="rtop" href="<?php print $CONF['base_url'] ?>/core/logout.php">Logout</a></td>
|
||||
<td nowrap class="ctop"><?php if ($MODULO['nome'] != "") print "Modulo: ".$MODULO['nome'] ?></td>
|
||||
<td nowrap class="rtop"><a class="rtop" href="<?php print $CONF['base_url'] ?>/core/logout.php">Logout</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</td></tr>
|
||||
<tr><td class="spaziov" colspan=2><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<tr><td align="center">
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<?php view_top(); ?>
|
||||
<form name="login" method="post">
|
||||
<table cellpadding="0" cellspacing="10" border="0" id="login_table">
|
||||
<tr align="center" valign="middle">
|
||||
<td colspan="2"><h4><?php print "Benvenuto" ?></h4></td>
|
||||
</tr>
|
||||
<?php $tabella = new html (0,"35%", array(40,2,0)); ?>
|
||||
<tr align="center" valign="middle"><td colspan="3"><h4><?php print "Benvenuto" ?></h4></td></tr>
|
||||
<tr>
|
||||
<td><?php print "Utente:"; ?></td>
|
||||
<td><?php print "Utente"; ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td><input type="text" name="fUsername" value="<?php print $tUsername; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php print "Password:"; ?></td>
|
||||
<td><?php print "Password"; ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td><input type="password" name="fPassword" /></td>
|
||||
</tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><input type="submit" name="submit" value="<?php print "Accedi"; ?>" /></td>
|
||||
<td colspan="3" align="center"><input type="submit" name="submit" value="<?php print "Accedi"; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"<?php print $tMessage; ?></td>
|
||||
<td colspan="3" align="center"<?php print $tMessage; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</form>
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -49,12 +49,10 @@ if (isset($_POST['rif']) && $_POST['rif'] != "") {
|
||||
} else {
|
||||
$id = 0;
|
||||
}
|
||||
//print $query;
|
||||
?>
|
||||
|
||||
<form name="" method="post">
|
||||
<input type="hidden" name="id" value="<?php print $id ?>">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
if ($id) {
|
||||
$query = " SELECT
|
||||
@@ -86,14 +84,9 @@ if ($id) {
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
}
|
||||
$tabella = new html (0,"90%", array(3,3,15,2,15,0));
|
||||
$tabella->intestazione (array("","","Nome ACL","","Ultima Modifica",""));
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Nome ACL</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Ultima Modifica</td>
|
||||
<td colspan=3 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<?php
|
||||
@@ -108,31 +101,31 @@ if ($dato['attivo']) {
|
||||
<td class="colip"><?php print $dato['data'] ?></td>
|
||||
<td colspan=3class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spazioh" colspan=8><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td colspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td colspan="3">
|
||||
<?php $tabella2 = new html (0,"100%",array(20,20,20,20,0), "center"); ?>
|
||||
<tr>
|
||||
<td rowspan=2 class="descrizione_c">Default</td>
|
||||
<td class="descrizione_c">Nega</td>
|
||||
<td class="descrizione_c">Default</td>
|
||||
<td class="descrizione_c">Autorizza</td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="radio"><input type="radio" name="dflt" value=-1 <?php if ($dato['dflt'] == -1) { print "checked=\"checked\""; } ?> ></td>
|
||||
<td class="radio"><input type="radio" name="dflt" value=0 <?php if ($dato['dflt'] == 0) { print "checked=\"checked\""; } ?> ></td>
|
||||
<td class="radio"><input type="radio" name="dflt" value=1 <?php if ($dato['dflt'] == 1) { print "checked=\"checked\""; } ?> ></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $tabella2->close(); ?>
|
||||
</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td><input type="submit" value="Conferma"></td>
|
||||
<td colspan=3 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=8><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php if ($id) { ?>
|
||||
<?php if ($id) {
|
||||
$tabella->riga();
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan=2 colspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Nuova destinazione</td>
|
||||
@@ -142,9 +135,8 @@ if ($dato['attivo']) {
|
||||
<tr>
|
||||
<td class="colip"><input type="text" size="32" name=rif></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=8><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php while ($dato = mysql_fetch_array ( $res )) { ?>
|
||||
<?php $tabella->riga();
|
||||
while ($dato = mysql_fetch_array ( $res )) { ?>
|
||||
<tr>
|
||||
<td class="spazioh"><a href="proxy_gest.php?azione=link_rm&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/trash.png"></a></td>
|
||||
<?php if ($dato['attivo']) { ?>
|
||||
@@ -158,8 +150,8 @@ if ($dato['attivo']) {
|
||||
<td colspan=3 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php }
|
||||
} ?>
|
||||
</table>
|
||||
}
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -6,15 +6,16 @@ view_top();
|
||||
?>
|
||||
|
||||
<form name="" method="post">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php html_spazi (array(5,5,5,30,5,10,5,10,0)); ?>
|
||||
<?php
|
||||
$tabella = new html (0,"90%",array(5,5,5,30,5,10,5,10,0));
|
||||
?>
|
||||
<tr>
|
||||
<td ><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="5%"><a href="acl_edit.php"><img src="<?php print $CONF['base_url'] ?>/img/addresource.png"></a></td>
|
||||
<td colspan=7><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$query = " SELECT
|
||||
proxy_acl_list.id,
|
||||
proxy_acl_list.sys,
|
||||
@@ -80,11 +81,10 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="colip"><?php print $dato['data'] ?></td>
|
||||
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -4,31 +4,41 @@ $UTENTE = login();
|
||||
$DIRITTI = diritti('Utente');
|
||||
view_top();
|
||||
?>
|
||||
|
||||
<meta http-equiv="refresh" content="10">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var stile = "top=30, left=30, width=1000, height=500, status=no, menubar=no, toolbar=no ";
|
||||
|
||||
function PopupG(apri)
|
||||
{
|
||||
window.open(apri, "", stile);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
$query = "SELECT GREATEST (max(inviati), max(ricevuti)) AS max from proxy_speed";
|
||||
$query = " SELECT
|
||||
GREATEST (max(inviati), max(ricevuti)) AS max
|
||||
FROM
|
||||
proxy_speed
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$valori = mysql_fetch_array ( $res );
|
||||
$max = $valori['max'];
|
||||
|
||||
$query = "SELECT proxy_speed.ip, proxy_speed.ricevuti, proxy_speed.inviati, proxy_pool.attivo FROM proxy_speed JOIN proxy_pool ON proxy_speed.ip = proxy_pool.ip ORDER BY ricevuti desc , inviati desc";
|
||||
$query = " SELECT
|
||||
proxy_speed.ip,
|
||||
proxy_speed.ricevuti,
|
||||
proxy_speed.inviati,
|
||||
proxy_pool.attivo,
|
||||
proxy_pool.id,
|
||||
proxy_pool.nome
|
||||
FROM
|
||||
proxy_speed
|
||||
JOIN
|
||||
proxy_pool
|
||||
ON
|
||||
proxy_speed.ip = proxy_pool.ip
|
||||
ORDER BY
|
||||
ricevuti desc ,
|
||||
inviati desc
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
|
||||
$tabella = new html (0,"90%", array (3,3,2,20,2,8,2,10,2,0));
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<?php
|
||||
if ($dato['attivo']) {
|
||||
@@ -37,18 +47,21 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<?php } else { ?>
|
||||
<td rowspan=2 class="col3btn"><a href="proxy_gest.php?azione=pool_ins&id=<?php print $dato['ip']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente non limitato" TITLE="Utente non limitato"></a></td>
|
||||
<?php } ?>
|
||||
<td rowspan=2 class="col3btn"><a href="pool_ip.php?ip=<?php print $dato['ip'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/modify.gif" ALT="Dettaglio" TITLE="Dettaglio"></a></td>
|
||||
<td rowspan=2 class="col3btn"><a href="pool_ip.php?id=<?php print $dato['id'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/modify.gif" ALT="Dettaglio" TITLE="Dettaglio"></a></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td rowspan=2 class="colip"><?php print $dato['ip'] ?></td>
|
||||
<td <?php if ($dato['nome'] == "") print "rowspan=2" ?> class="colip"><?php print $dato['ip'] ?></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Inviati</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colspeed"><?php print byteConvert($dato['inviati']) ?> </td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colimg"><img border="0" src="barra.php?max=<?php print $max ?>&val=<?php print $dato['inviati'] ?>&col=red"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
if ($dato['nome'] != "") { ?>
|
||||
<td class="colip"><?php print $dato['nome'] ?></td>
|
||||
<?php } ?>
|
||||
<td class="descrizione">Ricevuti</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colspeed"><?php print byteConvert($dato['ricevuti']) ?></td>
|
||||
@@ -56,10 +69,9 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="colimg"><img border="0" src="barra.php?max=<?php print $max ?>&val=<?php print $dato['ricevuti'] ?>&col=blue"></td>
|
||||
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=10><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer();
|
||||
?>
|
||||
|
||||
@@ -77,11 +77,11 @@ function do_submit() {
|
||||
}
|
||||
</script>
|
||||
<form name="acl" method="post">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<input type="hidden" name="id" value="<?php print $id ?>">
|
||||
<?php
|
||||
html_spazi (array(5,20,5,6,6,6,5,20,0));
|
||||
html_intestazione (array ("","Rete","","Nega","Default","Autorizza","","Nome Lista",""), array("","","","radio","radio","radio","","",""));
|
||||
$tabella = new html (0,"90%",array(2,20,2,6,6,6,2,20,0));
|
||||
$tabella->intestazione (array ("","Rete","","Nega","Default","Autorizza","","Nome Lista",""), array("","","","radio","radio","radio","","",""));
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$conta = 0;
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
@@ -98,8 +98,9 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
}
|
||||
$tabella->riga();
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -38,7 +38,6 @@ if (isset($_POST['id'])) {
|
||||
?>
|
||||
<form name="" method="post">
|
||||
<input type="hidden" name="id" value="<?php print $id ?>">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
$query = " SELECT
|
||||
id,
|
||||
@@ -55,19 +54,10 @@ $query = " SELECT
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Rete</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">NetMask</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Data attivazione</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Ultima Modifica</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
|
||||
$tabella = new html (0,"90%",array(3,20,2,20,2,15,2,15,0));
|
||||
$tabella->intestazione (array("","Rete","","NetMask","","Data attivazione","","Ultima Modifica",""));
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
if ($dato['attivo']) {
|
||||
@@ -78,7 +68,6 @@ if ($dato['attivo']) {
|
||||
<?php } ?>
|
||||
<td class="colip"><input type="text" size="15" name=net value="<?php print $dato['net'] ?>"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
|
||||
<td class="colip">
|
||||
<select name="mask">
|
||||
<option value="255.255.255.255" <?php if ($dato['mask'] == "255.255.255.255") { print "selected=\"selected\"";}?>>/32 (255.255.255.255)</option>
|
||||
@@ -106,10 +95,8 @@ if ($dato['attivo']) {
|
||||
<td class="colip"><?php print $dato['modifica'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr><td class="spaziov" colspan=9><input type="submit" value="Conferma"></td></tr>
|
||||
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -5,15 +5,16 @@ $DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
?>
|
||||
<form name="" method="post">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php html_spazi (array(5,5,2,5,2,9,2,9,2,15,0)); ?>
|
||||
<?php
|
||||
$tabella = new html (0,"90%",array(5,5,2,5,2,9,2,9,2,15,0));
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh"><a href="net_edit.php"><img src="<?php print $CONF['base_url'] ?>/img/addresource.png"></a></td>
|
||||
<td colspan=9 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=11><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$query = " SELECT
|
||||
id,
|
||||
attivo,
|
||||
@@ -54,11 +55,10 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="colip"><?php print $dato['modifica'] ?></td>
|
||||
<tr>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=11><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -76,30 +76,11 @@ function do_submit() {
|
||||
}
|
||||
</script>
|
||||
<form name="acl" method="post">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
$tabella = new html (0,"90%", array(2,20,2,6,6,6,2,20,0));
|
||||
$tabella->intestazione (array("","Indirizzo IP","","Nega","Default","Autorizza","","Nome Lista",""), array("","","","radio","radio","radio","","",""));
|
||||
?>
|
||||
<input type="hidden" name="id" value="<?php print $id ?>">
|
||||
<tr>
|
||||
<td class="sep" width="5%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="20%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="5%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="6%" ><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="6%" ><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="6%" ><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="5%" ><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="20%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="sep" width="27%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spaziol"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Indirizzo IP</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="radio">Nega</td>
|
||||
<td class="radio">Default</td>
|
||||
<td class="radio">Autorizza</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Nome Lista</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$conta = 0;
|
||||
@@ -117,8 +98,9 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
}
|
||||
$tabella->riga();
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -5,11 +5,22 @@ $DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
?>
|
||||
<form name="" method="post">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
|
||||
<?php
|
||||
if (isset($_GET['ip'])) {
|
||||
$ip = $_GET['ip'];
|
||||
if (isset($_GET['id'])) {
|
||||
$tabella = new html (0,"90%",array(3,15,2,15,2,2,12,2,12,2,10,2,10,0));
|
||||
$id = $_GET['id'];
|
||||
|
||||
if ((isset($_POST['nomeold'])) && (isset($_POST['nome'])) && ($_POST['oldnome'] != $_POST['nome'])) {
|
||||
$query = " UPDATE
|
||||
proxy_pool
|
||||
SET
|
||||
nome = '".$_POST['nome']."'
|
||||
WHERE
|
||||
id = $id
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
}
|
||||
|
||||
if (isset($_POST['tempo'])) {
|
||||
$tempo = $_POST['tempo'];
|
||||
} else {
|
||||
@@ -19,6 +30,7 @@ if (isset($_GET['ip'])) {
|
||||
$query = " SELECT
|
||||
proxy_pool.attivo,
|
||||
proxy_dati.ip,
|
||||
proxy_pool.nome,
|
||||
MIN(proxy_dati.data_destroy) AS first,
|
||||
MAX(proxy_dati.data_destroy) AS last,
|
||||
SUM(proxy_dati.inviati) AS inviati,
|
||||
@@ -30,7 +42,7 @@ if (isset($_GET['ip'])) {
|
||||
ON
|
||||
proxy_dati.ip = proxy_pool.ip
|
||||
WHERE
|
||||
proxy_dati.ip = '$ip'
|
||||
proxy_pool.id = $id
|
||||
AND
|
||||
proxy_dati.data_destroy >= DATE_SUB(NOW(), INTERVAL 1 $tempo)
|
||||
";
|
||||
@@ -40,7 +52,7 @@ if (isset($_GET['ip'])) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td colspan="2">
|
||||
<td>
|
||||
<select name="tempo" onchange="this.form.submit()">
|
||||
<option value="HOUR" <?php if ($tempo == "HOUR") {print "selected=\"selected\""; } ?>>Ultima Ora</option>
|
||||
<option value="DAY" <?php if ($tempo == "DAY") {print "selected=\"selected\""; } ?>>Ultimo Giorno</option>
|
||||
@@ -49,45 +61,48 @@ if (isset($_GET['ip'])) {
|
||||
<option value="YEAR" <?php if ($tempo == "YEAR") {print "selected=\"selected\""; } ?>>Ultimo Anno</option>
|
||||
</select>
|
||||
</td>
|
||||
<td colspan="6" class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td colspan="12" class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->intestazione (array("", "IP", "", "Nome", "", "", "Inizio dati", "", "Fine Dati", "", "Inviati", "", "Ricevuti", ""));
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
if ($dato['attivo']) {
|
||||
?>
|
||||
<td rowspan=2 class="col3btn"><a href="proxy_gest.php?azione=pool_rem&id=<?php print $ip ?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente limitato" TITLE="Utente limitato"></a></td>
|
||||
<td class="col3btn"><a href="proxy_gest.php?azione=pool_rem&id=<?php print $ip ?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente limitato" TITLE="Utente limitato"></a></td>
|
||||
<?php } else { ?>
|
||||
<td rowspan=2 class="col3btn"><a href="proxy_gest.php?azione=pool_ins&id=<?php print $ip ?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente non limitato" TITLE="Utente non limitato"></a></td>
|
||||
<td class="col3btn"><a href="proxy_gest.php?azione=pool_ins&id=<?php print $ip ?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente non limitato" TITLE="Utente non limitato"></a></td>
|
||||
<?php } ?>
|
||||
<td rowspan=2 class="colip"><?php print $ip ?></td>
|
||||
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['ip'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">
|
||||
<input type="text" name="nome" value="<?php print $dato['nome'] ?>">
|
||||
<input type="hidden" name="nomeold" value="<?php print $dato['nome'] ?>">
|
||||
</td>
|
||||
<td class="spazioh">
|
||||
<input name="modifica" type="image" src="<?php print $CONF['base_url'] ?>/img/applica.png" alt="Modifica" title="Modifica">
|
||||
</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['first'] ?></td>
|
||||
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione">Inviati</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['last'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colspeed"><?php print byteConvert($dato['inviati']) ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="colip"><?php print $dato['last'] ?></td>
|
||||
<td class="descrizione">Ricevuti</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colspeed"><?php print byteConvert($dato['ricevuti']) ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<tr><td colspan=9 align="center"><img src="<?php print $CONF['base_url'] ?>/proxy/graph.php?ip=<?php print $dato['ip'] ?>&tempo=<?php print $tempo ?>"></td></tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
$tabella->riga(); ?>
|
||||
<tr><td colspan=14 align="center"><img src="<?php print $CONF['base_url'] ?>/proxy/graph.php?ip=<?php print $dato['ip'] ?>&tempo=<?php print $tempo ?>"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
} else {
|
||||
if (isset($_POST['ip'])) {
|
||||
$ip = $_POST['ip'];
|
||||
$nome = $_POST['nome'];
|
||||
if (isset($_POST['attivo'])) {
|
||||
$attivo = $_POST['attivo'];
|
||||
} else {
|
||||
@@ -98,6 +113,7 @@ if (isset($_GET['ip'])) {
|
||||
proxy_pool
|
||||
SET
|
||||
ip = '$ip',
|
||||
nome = '$nome',
|
||||
pool = 1,
|
||||
attivo = $attivo,
|
||||
ins = NOW()
|
||||
@@ -107,8 +123,7 @@ if (isset($_GET['ip'])) {
|
||||
if (!$res) {
|
||||
$error_code = mysql_errno();
|
||||
if ($error_code == 1062) { ?>
|
||||
<tr><td class="spaziov" colspan=11><center>Indirizzo IP gia' esistente</center></td></tr>
|
||||
|
||||
<tr><td class="spaziov" colspan=12><center>Indirizzo IP gia' esistente</center></td></tr>
|
||||
<?php }
|
||||
} else { ?>
|
||||
<script type="text/javascript">
|
||||
@@ -116,46 +131,31 @@ if (isset($_GET['ip'])) {
|
||||
</script>
|
||||
<?php exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$tabella = new html (0,"90%",array(2,15,2,15,2,5,0));
|
||||
$tabella->intestazione (array("", "IP", "", "Nome", "", "Limitazione", ""));
|
||||
?>
|
||||
<tr>
|
||||
<td width="10%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="10%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="2%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="23%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="10%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="10%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="2%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="23%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td width="10%"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Indirizzo IP:</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><input type="text" size="15" name="ip"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Limitazione:</td>
|
||||
<td class="colip"><input type="text" size="15" name="nome"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><input type="checkbox" name="attivo" value="1"></td>
|
||||
<td class="radio"><input type="checkbox" name="attivo" value="1"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=11><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td align="center" colspan="11">
|
||||
<td align="center" colspan="7">
|
||||
<input type="submit" value="Aggiungi">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = 'pool_lista.php';"></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
}
|
||||
$tabella->close(); ?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
<?php
|
||||
view_footer();
|
||||
?>
|
||||
|
||||
@@ -13,12 +13,12 @@ if (isset($_POST['tempo'])) {
|
||||
if (isset($_POST['ordina'])) {
|
||||
$ordina = $_POST['ordina'];
|
||||
} else {
|
||||
$ordina = "ip";
|
||||
$ordina = "INET_ATON(ip)";
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="" method="post">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php $tabella = new html (0,"90%", array (3,3,2,3,2,10,2,15,2,10,2,10,2,0)); ?>
|
||||
<tr>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td rowspan=2 class="spazioh"><a href="pool_ip.php"><img src="<?php print $CONF['base_url'] ?>/img/addresource.png"></a></td>
|
||||
@@ -33,19 +33,20 @@ if (isset($_POST['ordina'])) {
|
||||
<option value="YEAR" <?php if ($tempo == "YEAR") {print "selected=\"selected\""; } ?>>Ultimo Anno</option>
|
||||
</select>
|
||||
</td>
|
||||
<td rowspan=2 class="spaziov" colspan=4><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 class="spazioh">Ordinamento: </td>
|
||||
<td colspan=4 class="spazioh">
|
||||
<select name="ordina" onchange="this.form.submit()">
|
||||
<option value="ip" <?php if ($ordina == "ip") {print "selected=\"selected\""; } ?>>IP</option>
|
||||
<option value="INET_ATON(ip)" <?php if ($ordina == "ip") {print "selected=\"selected\""; } ?>>IP</option>
|
||||
<option value="inviati DESC" <?php if ($ordina == "inviati DESC") {print "selected=\"selected\""; } ?>>Dati Inviati</option>
|
||||
<option value="ricevuti DESC" <?php if ($ordina == "ricevuti DESC") {print "selected=\"selected\""; } ?>>Dati Ricevuti</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=12><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$query = "SELECT GREATEST (sum(inviati), sum(ricevuti)) AS max from proxy_dati WHERE data_destroy >= DATE_SUB(NOW(), INTERVAL 1 $tempo) GROUP BY ip";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$max = 0;
|
||||
@@ -57,6 +58,7 @@ while ($valori = mysql_fetch_array ( $res )) {
|
||||
|
||||
$query = " SELECT
|
||||
proxy_pool.id,
|
||||
proxy_pool.nome,
|
||||
proxy_pool.attivo,
|
||||
proxy_dati.ip,
|
||||
MIN(proxy_dati.data_destroy) AS first,
|
||||
@@ -75,6 +77,7 @@ $query = " SELECT
|
||||
ip
|
||||
UNION DISTINCT SELECT
|
||||
proxy_pool.id,
|
||||
proxy_pool.nome,
|
||||
proxy_pool.attivo,
|
||||
proxy_pool.ip,
|
||||
DATE_SUB(NOW(), INTERVAL 1 $tempo) AS first,
|
||||
@@ -100,11 +103,11 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<?php } else { ?>
|
||||
<td rowspan=2 class="col3btn"><a href="proxy_gest.php?azione=pool_ins&id=<?php print $dato['ip']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente non limitato" TITLE="Utente non limitato"></a></td>
|
||||
<?php } ?>
|
||||
<td rowspan=2 class="col3btn"><a href="pool_ip.php?ip=<?php print $dato['ip'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/modify.gif" ALT="Dettaglio" TITLE="Dettaglio"></a></td>
|
||||
<td rowspan=2 class="col3btn"><a href="pool_ip.php?id=<?php print $dato['id'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/modify.gif" ALT="Dettaglio" TITLE="Dettaglio"></a></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td rowspan=2 class="spazioh"><a href="pool_acl.php?id=<?php print $dato['id'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/edit-regole.gif" ALT="ACL" TITLE="ACL"></a></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td rowspan=2 class="colip"><?php print $dato['ip'] ?></td>
|
||||
<td <?php if ($dato['nome'] == "") print "rowspan=2" ?> class="colip"><?php print $dato['ip'] ?></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['first'] ?></td>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
@@ -116,6 +119,9 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if ($dato['nome'] != "") { ?>
|
||||
<td class="colip"><?php print $dato['nome'] ?></td>
|
||||
<?php } ?>
|
||||
<td class="colip"><?php print $dato['last'] ?></td>
|
||||
<td class="descrizione">Ricevuti</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
@@ -123,11 +129,10 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colimg"><img border="0" src="barra.php?max=<?php print $max ?>&val=<?php print $dato['ricevuti'] ?>&col=blue"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=12><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -74,12 +74,14 @@ function getvalue() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe id="chkpwd" style="display:none; visibility:hidden;"></iframe>
|
||||
<?php
|
||||
// <iframe id="chkpwd" style="display:none; visibility:hidden;"></iframe>
|
||||
?>
|
||||
|
||||
<form name="" method="post">
|
||||
<input type="hidden" name="id" value="<?php print $id ?>">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
|
||||
$query = " SELECT
|
||||
id,
|
||||
user,
|
||||
@@ -104,20 +106,9 @@ $query = " SELECT
|
||||
";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
|
||||
$tabella = new html (0,"90%",array(3,10,2,10,2,10,2,10,2,10,0));
|
||||
$tabella->intestazione (array("","Utente","","Nome Completo","","Data attivazione","","Ultima Modifica","","IP",""));
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Utente</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Nome Completo</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Data attivazione</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Ultima Modifica</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">IP</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<?php
|
||||
if ($dato['attivo']) {
|
||||
@@ -126,9 +117,9 @@ if ($dato['attivo']) {
|
||||
<?php } else { ?>
|
||||
<td class="col3btn"><a href="proxy_gest.php?azione=user_up&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente non Attivo" TITLE="Utente non Attivo"></a></td>
|
||||
<?php } ?>
|
||||
<td class="colip"><input type="text" size="16" name=user value="<?php print $dato['user'] ?>"></td>
|
||||
<td class="colip"><input type="text" size="10" name=user value="<?php print $dato['user'] ?>"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><input type="text" size="32" name=fullname value="<?php print $dato['fullname'] ?>"></td>
|
||||
<td class="colip"><input type="text" size="20" name=fullname value="<?php print $dato['fullname'] ?>"></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><?php print $dato['data'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
@@ -143,17 +134,13 @@ if ($dato['attivo']) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=10><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->intestazione (array("","Nuova Password","","Conferma Nuova Password","","","","","","",""));
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Nuova Password</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip">Conferma Nuova Password</td>
|
||||
<td colspan="7" class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><input type="password" size="16" name=pwd1 id=pwd1></td>
|
||||
<td class="colip"><input type="password" name=pwd1 id=pwd1></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><input type="password" size="16" name=pwd2 id=pwd2></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
@@ -162,10 +149,9 @@ if ($dato['attivo']) {
|
||||
<td class="colip"><input id=pwd type=text></p></td>
|
||||
<td colspan="3" class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=10><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr><td class="spaziov" colspan=10><input type="submit" value="Conferma"></td></tr>
|
||||
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -44,11 +44,9 @@ if (isset($_POST['id'])) {
|
||||
|
||||
<form name="" method="post">
|
||||
<input type="hidden" name="id" value="0">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
|
||||
<?php
|
||||
html_spazi (array(2,10,2,16,2,10,0));
|
||||
html_intestazione (array ("","Prefisso","","Intervallo","","Lunghezza",""), array("","","","radio","","",""));
|
||||
$tabella = new html (0,"90%",array(2,10,2,16,2,10,0));
|
||||
$tabella->intestazione (array ("","Prefisso","","Intervallo","","Lunghezza",""), array("","","","radio","","",""));
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
@@ -64,8 +62,10 @@ html_intestazione (array ("","Prefisso","","Intervallo","","Lunghezza",""), arra
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=7><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php html_intestazione (array ("","Lunghezza Password","","Tempo assegnato (h)","","","")); ?>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->intestazione (array ("","Lunghezza Password","","Tempo assegnato (h)","","",""));
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="colip"><input type="text" size="3" name="lpwd"></td>
|
||||
@@ -73,12 +73,11 @@ html_intestazione (array ("","Prefisso","","Intervallo","","Lunghezza",""), arra
|
||||
<td class="colip"><input type="text" size="3" name="tempo" value=24></td>
|
||||
<td colspan=3 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=7><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spaziov" colspan=6><input type="submit" value="Conferma"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</form>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
|
||||
@@ -3,9 +3,8 @@ include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
$tabella = new html (0,"90%",array (3,3,3,2,10,2,13,2,10,2,10,0));
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php html_spazi (array (5,5,5,2,10,2,13,2,10,2,10,0)); ?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh"><a href="users_group_edit.php"><img src="<?php print $CONF['base_url'] ?>/img/addresource.png"></a></td>
|
||||
@@ -28,7 +27,7 @@ $query = " SELECT
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
html_intestazione (array ("","","","","Utente","","Nome Completo","","Primo Accesso","","Ultimo Accesso",""));
|
||||
$tabella->intestazione (array ("","","","","Utente","","Nome Completo","","Primo Accesso","","Ultimo Accesso",""));
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
@@ -57,10 +56,8 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=12><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer(); ?>
|
||||
|
||||
@@ -3,9 +3,9 @@ include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
view_top();
|
||||
|
||||
$tabella = new html (0,"90%", array (5,5,5,2,10,2,13,2,12,2,10,0));
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php html_spazi (array (5,5,5,2,10,2,13,2,10,2,10,0)); ?>
|
||||
<tr>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spazioh"><a href="users_edit.php"><img src="<?php print $CONF['base_url'] ?>/img/addresource.png"></a></td>
|
||||
@@ -28,7 +28,7 @@ $query = " SELECT
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
html_intestazione (array ("","","","","Utente","","Nome Completo","","Ultimo Accesso","","IP Associato",""));
|
||||
$tabella->intestazione (array ("","","","","Utente","","Nome Completo","","Ultimo Accesso","","IP Associato",""));
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
@@ -57,10 +57,9 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=12><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer();
|
||||
?>
|
||||
|
||||
@@ -39,6 +39,7 @@ td.valoretxt { font-family: verdana; font-size: 14px; text-align: left; vertica
|
||||
td.col0 { font-family: verdana; font-size: 14px; text-align: left; width:20px; vertical-align:text-top; text-decoration: none; color: #000000; background-color: #dcd2d2; white-space: nowrap}
|
||||
|
||||
td.ltop { font-family: verdana; font-size: 14px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; }
|
||||
td.ctop { font-family: verdana; font-size: 14px; text-align: center; vertical-align:text-top; text-decoration: none; color: #000000; }
|
||||
td.rtop { font-family: verdana; font-size: 14px; text-align: right; vertical-align:text-top; text-decoration: none; color: #000000; }
|
||||
td.lbottom { font-family: verdana; font-size: 14px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; }
|
||||
td.rbottom { font-family: verdana; font-size: 14px; text-align: right; vertical-align:text-top; text-decoration: none; color: #5191D5; }
|
||||
@@ -66,6 +67,9 @@ td.col3valore { font-family: verdana; font-size: 12px; text-align: left; vertic
|
||||
td.col3valore2 { font-family: verdana; font-size: 10px; text-align: left; vertical-align:middle; width:200px; height: 10px; text-decoration: none; color: #000000; }
|
||||
|
||||
td.colip { font-family: verdana; font-size: 10px; text-align: left; vertical-align:middle; width:80px; height: 10px; text-decoration: none; color: #000000; white-space: nowrap}
|
||||
td.textr { font-family: verdana; font-size: 10px; text-align: right; vertical-align:middle; width:80px; height: 10px; text-decoration: none; color: #000000; white-space: nowrap}
|
||||
td.textc { font-family: verdana; font-size: 10px; text-align: center; vertical-align:middle; width:80px; height: 10px; text-decoration: none; color: #000000; white-space: nowrap}
|
||||
td.textl { font-family: verdana; font-size: 10px; text-align: left; vertical-align:middle; width:80px; height: 10px; text-decoration: none; color: #000000; white-space: nowrap}
|
||||
td.colspeed { font-family: verdana; font-size: 10px; text-align: left; vertical-align:middle; width:80px; height: 10px; text-decoration: none; color: #000000; white-space: nowrap}
|
||||
td.colimg { font-family: verdana; font-size: 11px; text-align: left; height:1px; text-decoration: none; color: #8e8e8e; white-space: nowrap}
|
||||
|
||||
|
||||
@@ -16,14 +16,16 @@ function PopupG(apri)
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
$tabella = new html (0,"90%",array(3,3,3,2,15,2,15,2,15,2,15,2,15,2,0));
|
||||
?>
|
||||
<tr>
|
||||
<td class="spaziov" colspan=4><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td><a href="modutenti.php"><img src="<?php print $CONF['base_url'] ?>/img/addusers.png" border="0" ALT="Aggiungi utente" TITLE="Aggiungi utente"></a></td>
|
||||
<td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="spaziov" colspan=10><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=14><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$query = "SELECT id, utente, admin, creazione, modifica, ultimo, attivo FROM utenti ORDER BY utente";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
@@ -48,38 +50,35 @@ while ($dato = mysql_fetch_array ( $res )) {
|
||||
<td rowspan=2 class="col3btn"><img src="<?php print $CONF['base_url'] ?>/img/utente.png" ALT="Utente" TITLE="Utente"></td>
|
||||
<?php } ?>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="col3campo2">Utente</td>
|
||||
<td class="descrizione">Utente</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="col3valore2">Creazione</td>
|
||||
<td class="descrizione">Creazione</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="col3valore2">Ultima Modifica</td>
|
||||
<td class="descrizione">Ultima Modifica</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="col3valore2">Ultimo accesso</td>
|
||||
<td class="descrizione">Ultimo accesso</td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="col3valore2">Numero accessi</td>
|
||||
<td rowspan=2 class="col3btn">
|
||||
<td class="descrizione">Numero accessi</td>
|
||||
<td class="col3btn">
|
||||
<a href="permessiutenti.php?id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/dettagli.png" width="20" height="20" border="0" ALT="Gestione regole" TITLE="Gestione Regole"></a>
|
||||
<a href="javascript:PopupG('logutenti.php?idutente=<?php print $dato['id'] ?>')"><img border="0" src="<?php print $CONF['base_url'] ?>/img/iconSystemLog.gif" ALT="Grafico Utilizzo" TITLE="Grafico Utilizzo"></a>
|
||||
<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descrizione"><?php print $dato['utente'] ?></td>
|
||||
<td class="colip"><?php print $dato['utente'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $dato['creazione'] ?></td>
|
||||
<td class="colip"><?php print $dato['creazione'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $dato['modifica'] ?></td>
|
||||
<td class="colip"><?php print $dato['modifica'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $dato['ultimo'] ?></td>
|
||||
<td class="colip"><?php print $dato['ultimo'] ?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $records ?></td>
|
||||
|
||||
|
||||
|
||||
<td class="colip"><?php print $records ?></td>
|
||||
<td class="col3btn"><a href="javascript:PopupG('logutenti.php?idutente=<?php print $dato['id'] ?>')"><img border="0" src="<?php print $CONF['base_url'] ?>/img/iconSystemLog.gif" ALT="Grafico Utilizzo" TITLE="Grafico Utilizzo"></a></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=14><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php view_footer(); ?>
|
||||
$tabella->riga();
|
||||
}
|
||||
$tabella->close();
|
||||
view_footer();
|
||||
?>
|
||||
|
||||
@@ -2,15 +2,11 @@
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti('Admin');
|
||||
//isadmin();
|
||||
?>
|
||||
<body>
|
||||
<link rel="stylesheet" type="text/css" href="<?php print $CONF['base_url'] ?>/css/stile.css" />
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
|
||||
$idutente = $_GET['idutente'];
|
||||
$query = "SELECT utente FROM utenti WHERE id = '$idutente'";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
@@ -26,30 +22,47 @@ if (isset($_GET['pag'])) {
|
||||
$inizio = 0;
|
||||
}
|
||||
|
||||
$query = "SELECT COUNT(id) AS quanti, MIN(quando) AS inizio, MAX(quando) AS termine, sessione, ip FROM accessi_utenti WHERE utente = '$nomeutente' GROUP BY sessione ORDER BY termine DESC LIMIT $inizio, $righe";
|
||||
$query = " SELECT
|
||||
COUNT(id) AS quanti,
|
||||
MIN(quando) AS inizio,
|
||||
MAX(quando) AS termine,
|
||||
sessione,
|
||||
ip
|
||||
FROM
|
||||
accessi_utenti
|
||||
WHERE
|
||||
utente = '$nomeutente'
|
||||
GROUP BY
|
||||
sessione
|
||||
ORDER BY
|
||||
termine DESC
|
||||
LIMIT $inizio, $righe
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$fatte = mysql_num_rows($res);
|
||||
|
||||
$tabella = new html (0,"90%", array (2,15,2,30,2,30,2,10,2,3,0));
|
||||
$tabella->intestazione (array("","Indirizzo IP","","Accesso","","Uscita","","Numero pagine","","",""));
|
||||
$tabella->riga();
|
||||
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="campo">Indirizzo IP: <?php print $dato['ip']?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo">Accesso: <?php print $dato['inizio']?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo">Uscita: <?php print $dato['termine']?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo">Numero pagine: <?php print $dato['quanti']?></td>
|
||||
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo"><?php print $dato['ip']?></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo"><?php print $dato['inizio']?></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo"><?php print $dato['termine']?></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="campo"><?php print $dato['quanti']?></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td rowspan=2 class="col3btn"><a href="dettlogutenti.php?ses=<?php print $dato['sessione']?>&idutente=<?php print $idutente ?>"><img src="<?php print $CONF['base_url'] ?>/img/dettagli.png" width="20" height="20" border="0" ALT="Dettaglio sessione" TITLE="Dettaglio sessione"></a></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=9><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($fatte < $righe) {
|
||||
for ($i = $fatte; $i<=$righe; $i++) { ?>
|
||||
<tr><td class="campo" colspan=9> </td></tr>
|
||||
<?php }
|
||||
$tabella->riga();
|
||||
}
|
||||
|
||||
$query = "SELECT sessione FROM accessi_utenti WHERE utente = '$nomeutente' GROUP BY sessione";
|
||||
@@ -58,7 +71,7 @@ $records = mysql_num_rows($res);
|
||||
$pagine = ceil($records / $righe)
|
||||
?>
|
||||
<tr>
|
||||
<td align="center" colspan=9>
|
||||
<td align="center" colspan=11>
|
||||
<?php
|
||||
for ($i=1;$i<=$pagine;$i++) {
|
||||
if ($i == $pagina) {
|
||||
@@ -70,5 +83,5 @@ for ($i=1;$i<=$pagine;$i++) {
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php $tabella->close(); ?>
|
||||
</body>
|
||||
|
||||
@@ -34,48 +34,69 @@ if (isset($_GET['id'])) {
|
||||
|
||||
if ( $rm == 1) {
|
||||
$testo = "L'utente e' stato correttamente rimosso";
|
||||
$query = "DELETE FROM permessi WHERE id_utenti = $id";
|
||||
$query2 = "DELETE FROM utenti WHERE id = $id";
|
||||
$query = " DELETE FROM
|
||||
permessi
|
||||
WHERE
|
||||
id_utenti = $id
|
||||
";
|
||||
|
||||
$query2 = " DELETE FROM
|
||||
utenti
|
||||
WHERE
|
||||
id = $id
|
||||
";
|
||||
|
||||
} elseif ($id > 0) {
|
||||
$testo = "L'utente e' stato correttamente modificato";
|
||||
$query = "UPDATE utenti SET $querypwd admin = $admin, attivo=$attivo, modifica = NOW(), mail='$mail' WHERE `id`=$id";
|
||||
$query = " UPDATE
|
||||
utenti
|
||||
SET
|
||||
$querypwd
|
||||
utente = '$utente',
|
||||
admin = $admin,
|
||||
attivo=$attivo,
|
||||
modifica = NOW(),
|
||||
mail='$mail'
|
||||
WHERE
|
||||
id=$id
|
||||
";
|
||||
} else {
|
||||
$testo = "L'utente e' stato correttamente inserito";
|
||||
$query = "INSERT INTO utenti SET utente = '$utente', $querypwd admin = $admin, attivo=$attivo, modifica = NOW(), creazione = NOW(), mail='$mail'";
|
||||
$query = " INSERT INTO
|
||||
utenti
|
||||
SET
|
||||
$querypwd
|
||||
utente = '$utente',
|
||||
admin = $admin,
|
||||
attivo=$attivo,
|
||||
modifica = NOW(),
|
||||
creazione = NOW(),
|
||||
mail='$mail'
|
||||
";
|
||||
}
|
||||
|
||||
$tabella = new html (0,"90%", array (0));
|
||||
$tabella->riga();
|
||||
|
||||
if (mysql_query( $query, $DB_ID ) && ((!is_null ($query2) && mysql_query( $query2, $DB_ID )) || (is_null ($query2)))) {
|
||||
} else {
|
||||
$testo = "Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: ".mysql_error();
|
||||
}
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="10" alt=""><td>
|
||||
<td align="center"><?php print $testo ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (mysql_query( $query, $DB_ID ) && ((!is_null ($query2) && mysql_query( $query2, $DB_ID )) || (is_null ($query2)))) { ?>
|
||||
<?php print $testo ?><br>
|
||||
<?php } else { ?>
|
||||
Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: <?php print mysql_error() ?><br>
|
||||
<?php print $query ?><br>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td align="center"><input type="button" value="Ok" onclick="location.href = '<?php print $CONF['base_url'] ?>/utenti/index.php';"></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" value="Ok" onclick="location.href = '<?php print $CONF['base_url'] ?>/utenti/index.php';"></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="10" alt=""></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$tabella->close();
|
||||
} else {
|
||||
$bottone = "Aggiungi";
|
||||
$modifica = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (($modifica == 0 || $modifica == 1) && !isset($_GET['rm'])) { ?>
|
||||
if (($modifica == 0 || $modifica == 1) && !isset($_GET['rm'])) { ?>
|
||||
|
||||
<script type="text/javascript" src="<?php print $CONF['base_url'] ?>/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="<?php print $CONF['base_url'] ?>/jquery/jquery.validate.js"></script>
|
||||
@@ -123,7 +144,6 @@ $(document).ready(function()
|
||||
|
||||
},
|
||||
|
||||
// the errorPlacement has to take the table layout into account
|
||||
errorPlacement: function(error, element) {
|
||||
error.prependTo( element.parent().next() );
|
||||
},
|
||||
@@ -141,48 +161,51 @@ $(document).ready(function()
|
||||
</script>
|
||||
|
||||
<form action="modutenti.php" method="post" id="modulo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php if ($modifica == 1) { ?>
|
||||
<?php
|
||||
$tabella = new html (0,"90%", array (2,20,2,20,0));
|
||||
if ($modifica == 1) { ?>
|
||||
<input type="hidden" name="id" id="id" value="<?php print $dato['id'] ?>">
|
||||
<input type="hidden" name="rm" id="rm" value="0">
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id" d="id" value="-1">
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="30" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lusername" for="username">Nome Utente</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field"><input id="utente" name="utente" type="text" value="<?php print $dato['utente']?>" maxlength="50" /></td>
|
||||
<td class="status" colspan="6"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="30" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lmail" for="mail">Indirizzo E-Mail</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field"><input id="mail" name="mail" type="text" value="<?php print $dato['mail']?>" maxlength="50" /></td>
|
||||
<td class="status" colspan="6"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="80" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td>Attivo <input name="attivo" type="checkbox" value=1 <?php if ($dato['attivo']) { print "checked=\"checked\""; } ?>></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="20" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<?php if ($UTENTE['admin']) { ?>
|
||||
<td>Admin <input name="admin" type="checkbox" value=1 <?php if ($dato['admin']) { print "checked=\"checked\""; } ?>></td>
|
||||
<?php } else { ?>
|
||||
<td> </td>
|
||||
<?php } ?>
|
||||
<td colspan="4"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="250" height="1" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td class="col1" colspan="9">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<td class="col1" colspan="6">
|
||||
<?php $tabella2 = new html (0, "100%", array(2,20,2,30,30,0)); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="40" height="50" alt=""></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lpassword" for="password">Password</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="field" width="30"><input id="password1" name="password1" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>" /></td>
|
||||
<td class="status" width="400">
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field"><input id="password1" name="password1" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>" /></td>
|
||||
<td class="status">
|
||||
<div class="password-meter">
|
||||
<div class="password-meter-message"> </div>
|
||||
<div class="password-meter-bg">
|
||||
@@ -190,21 +213,22 @@ $(document).ready(function()
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<?php $tabella2->riga(); ?>
|
||||
<tr>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="40" height="50" alt=""></td>
|
||||
<td class="label"><label id="lpassword_confirm" for="password_confirm">Password</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="field" width="30"><input id="password2" name="password2" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>" /></td>
|
||||
<td class="status" width="400"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="label"><label id="lpassword_confirm" for="password_confirm">Conferma Password</label></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
<td class="field"><input id="password2" name="password2" type="password" size="30" maxlength="32" value="<?php print $dato['password'] ?>" /></td>
|
||||
<td class="status"></td>
|
||||
<td><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="9" class="spaziov"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" alt=""></td></tr>
|
||||
</table>
|
||||
<?php $tabella2->close(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td align="center" colspan="9">
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr><td align="center" colspan="6">
|
||||
<input type="submit" value="<?php print $bottone ?>">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = '<?php print $CONF['base_url'] ?>/utenti/index.php';"></button>
|
||||
@@ -213,10 +237,10 @@ $(document).ready(function()
|
||||
<input type="submit" value="Rimuovi" onclick="DoSubmit()">
|
||||
<?php } ?>
|
||||
</td></tr>
|
||||
|
||||
<tr><td colspan="9"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
$tabella->riga();
|
||||
$tabella->close();
|
||||
?>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php view_footer(); ?>
|
||||
<?php }
|
||||
view_footer(); ?>
|
||||
|
||||
@@ -50,11 +50,15 @@ $res = mysql_query( $query, $DB_ID );
|
||||
$dato = mysql_fetch_array ($res);
|
||||
|
||||
$livelli = get_levels();
|
||||
//$livelli = array(0=>"Negato", 5=>"Utente", 10=>"Admin");
|
||||
?>
|
||||
<script type="text/javascript" src="<?php print $CONF['base_url']?>/jquery/jquery-1.8.0.min.js"></script>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="40%">
|
||||
<?php
|
||||
$tabella = new html (0,"90%", array (0)); ?>
|
||||
<tr>
|
||||
<td align="center">
|
||||
|
||||
<?php $tabella1 = new html (0,"40%", array (20,0)); ?>
|
||||
<tr>
|
||||
<?php if ($dato['admin']) { ?>
|
||||
<td rowspan=2 class="col3btn"><img src="<?php print $CONF['base_url'] ?>/img/admin.png" ALT="Admin" TITLE="Admin"></td>
|
||||
@@ -62,13 +66,16 @@ $livelli = get_levels();
|
||||
<td rowspan=2 class="col3btn"><img src="<?php print $CONF['base_url'] ?>/img/utente.png" ALT="Utente" TITLE="Utente"></td>
|
||||
<?php } ?>
|
||||
<td class="col3campo2"><?php print $dato['utente'] ?></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<img src="img/spazio.gif" width="1" height="20" alt="">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="60%">
|
||||
<?php while ($dato = mysql_fetch_array ( $permessi )) { ?>
|
||||
<?php $tabella1->close(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $tabella->riga(); ?>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<?php
|
||||
$tabella2 = new html (0,"60%", array(30,0));
|
||||
while ($dato = mysql_fetch_array ( $permessi )) { ?>
|
||||
<tr>
|
||||
<td class="col3campo2"><?php print $dato['nome']?></td>
|
||||
<td>
|
||||
@@ -79,12 +86,14 @@ $livelli = get_levels();
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
<img src="img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php
|
||||
$tabella2->riga();
|
||||
}
|
||||
$tabella2->close();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $tabella->close(); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
Reference in New Issue
Block a user