Aggiunta sezione WhiteFox

This commit is contained in:
cmaffio
2016-11-09 13:23:04 +01:00
parent 6079f8d6d9
commit 520bb3384b
6 changed files with 517 additions and 1 deletions

61
wf/wf_gest.php Executable file
View File

@@ -0,0 +1,61 @@
<?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 "wf_on":
$query = "UPDATE wf_iscritto SET attivo = 1 WHERE id = $id";
$testo = "Confermate l'abilitazione dell'utente?";
break;
case "wf_off":
$query = "UPDATE wf_iscritto SET attivo = 0 WHERE id = $id";
$testo = "Confermate la disabilitazione dell'utente?";
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 }
}
}
?>