403Webshell
Server IP : 89.46.109.6  /  Your IP : 216.73.216.84
Web Server : Apache
System : Linux hlpi1ws-c284v20.ad.aruba.it 6.8.0-139-generic #139-Ubuntu SMP PREEMPT_DYNAMIC Sat Aug 1 03:52:05 UTC 2026 x86_64
User : ID19067310 ( 19067310)
PHP Version : 5.3.29
Disable Function : system,popen,dl,passthru,proc_open,shell_exec
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /web/htdocs/www.edizacco.it/home/pannello/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /web/htdocs/www.edizacco.it/home/pannello/gestione_account.php
<?php 
ob_start();
@session_start();
require_once('../include/connect_db.php');
require_once('include/templates.php');
include('include/sessione.inc.php');
require_once 'include/class.ycpager.php';
$meta_title = TITLE;
$_SESSION['page'] = "account";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo"$meta_title | Area Riservata"; ?></title>
<link href="css/master.css" rel="stylesheet" type="text/css" />
<link href="css/paginazione.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="js/sortable_table/themes/style.css" type="text/css" media="print, projection, screen" />
<script type="text/javascript" src="js/sortable_table/js/jquery-latest.js"></script> 
<script type="text/javascript" src="js/sortable_table/js/jquery.tablesorter.js"></script> 
	<script type="text/javascript">
	$(function() {		
		$("#tablesorter-demo").tablesorter({sortList:[[0,0],[2,1]], widgets: ['zebra']});
		$("#options").tablesorter({sortList: [[0,0]], headers: { 3:{sorter: false}, 4:{sorter: false}}});
	});	
	</script>
	<!-- MOSTRA NASCONDI PASSWORD -->
	<!--<script src="js/jquery.min.js" type="text/javascript"></script>-->
	<script src="js/show_password.js"></script>
	<script>
	$(document).ready(function() {
		$(':password').showPassword({
			linkRightOffset: 60,
			linkTopOffset: -3
		});
	});
	</script>
	<!-- MOSTRA NASCONDI PASSWORD -->

</head>

<body>
<!-- WRAPPER INIZIO -->
<div id="wrapper">

	<!-- WRAPPER HEADER INIZIO-->
	<div id="wrapper_header">
		<div id="header"><?php select_header(); ?></div>
	</div>
	<!-- WRAPPER HEADER FINE-->

	<!-- WRAPPER CONTAINER INIZIO-->
	<div id="wrapper_container">
	
		<!-- MENU INIZIO-->
		<div id="menu"><?php select_menu(); ?></div>
		<!-- MENU FINE-->
		
		<!-- CONTENUTI INIZIO-->
		<div id="contenuto">
<?php
// GESTIONE PAGINA
if ( isset($_REQUEST['action']) ) {	$action = $_REQUEST['action']; } else {	$action = "account"; }
				
switch ($action) {
	case 'account': account(); break;
	case 'modulo': modulo(); break;
	case 'save': save(); break;
	case 'delete': delete(); break;
	default: account(); break;
}

///////////////////////////////////////////////////////////////////////////////////////////
/// ACCOUNT ///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
function account(){
	$prefix = PREFIX;
	$total = mysql_query( "SELECT id_login FROM ".$prefix."_login WHERE id_login <> '1'");
	$numero_notizie = mysql_num_rows( $total );
	echo'<h1>GESTIONE ACCOUNT:</h1>';

	if( $numero_notizie > 0 ) {
		$limite = 12; // NUMERO VISUALIZZAIONI PER PAGINA
		$p = !empty($_GET['p']) ? $_GET['p'] : 1;
		$redirect_to = 'gestione_account.php?'; // NOME PAGINA
		$pager = new YCPager( $p, $numero_notizie, $limite, $redirect_to );
		$offset = $pager->getQueryOffset();
		
		echo'
		<table id="tablesorter-demo" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
			<thead>
				<tr> 
					<th width="70" align="center"><b>Azione</b></td>
					<th align="left" axis="string"><b>Account</b></td>
				</tr> 
			</thead> 
		<tbody>
		';
				
		$carica = mysql_query( "SELECT * FROM ".$prefix."_login WHERE id_login <> '1' ORDER BY id_login ASC LIMIT $limite OFFSET $offset ");
		while( $row_carica = mysql_fetch_assoc($carica)) {
			$id_login = $row_carica['id_login'];
			$nickname = stripslashes($row_carica['nickname']);
			
			if( $id_login == "2" ){
				$btn_delete = '';
			}else{
				$btn_delete = '<a href="gestione_account.php?action=delete&amp;id_login='.$id_login.'" title="ELIMINA ACCOUNT" onclick="return confirm(\'ATTENZIONE. ELIMINARE ACCOUNT: '.$nickname.'?\')"><img src="images/btn_delete.png" alt="ELIMINA ACCOUNT" border="0"/></a>';
			}
			echo'
				<tr id="'.$id_login.'" >
					<td align="center">
						<a href="gestione_account.php?action=modulo&amp;act=edit&amp;id_login='.$id_login.'" title="MODIFICA ACCOUNT"><img src="images/btn_edit.png" alt="MODIFICA ACCOUNT" border="0"/></a>
						'.$btn_delete.'
					</td>
					<td>'.$nickname.'</td>
				</tr>
			';
		}
				
		echo'
				</tbody>
				<tfoot>
					<tr>
						<th align="center">Azione</th>
						<th align="left">Account</th>
					</tr>
				</tfoot>
			 </table>
			 
			<script type="text/javascript">
				var myTable = {};
				window.addEvent(\'domready\', function(){
					myTable = new sortableTable(\'myTable\');
				});
			</script>
			 
			<p class="add_style"><a href="gestione_account.php?action=modulo&amp;act=add" class="add_button">Aggiungi Account</a></p>	
		';
				
		if ( $numero_notizie > $limite ) { $pager->getPager(); }else{ echo''; }
				
	}else{
		echo'';
	}

}
///////////////////////////////////////////////////////////////////////////////////////////
/// MODULO ////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
function modulo(){
	$prefix = PREFIX;
	$act = $_REQUEST['act'];
	
	if( $act == "add" ){
		$tag_h1 = 'NUOVO';
		$value_username = '';
		$value_password = '';
		$value_nickname = '';
		$value_email = '';
		$g_account = '0';
		$g_news = '1';
		$g_comunicati = '1';
		$g_newsletter = '1';
		$g_bannerhome = '1';
		$g_prodotti = '1';
		$g_ordini = '1';
		$g_gallery = '1';
		$tag_submit = 'AGGIUNGI';
		$tag_hidden_id = '';
		$tag_act = '<input name="act" type="hidden" value="add" />';
	}elseif ( $act == "edit" ){
		$id_login = isset($_GET['id_login']) ? (int)$_GET['id_login'] : 0;
		$carica_profilo = mysql_fetch_assoc(mysql_query("SELECT * FROM ".$prefix."_login WHERE id_login = '$id_login'"));
		$tag_h1 = 'MODIFICA';
		$value_username = 'value="'.htmlspecialchars(stripslashes($carica_profilo['username'])).'"';
		$value_password = 'value="'.htmlspecialchars(stripslashes($carica_profilo['password'])).'"';
		$value_nickname = 'value="'.htmlspecialchars(stripslashes($carica_profilo['nickname'])).'"';
		$value_email = 'value="'.htmlspecialchars(stripslashes($carica_profilo['email'])).'"';
		$g_account = $carica_profilo['gestione_account'];
		$g_news = $carica_profilo['gestione_news'];
		$g_comunicati = $carica_profilo['gestione_comunicati'];
		$g_newsletter = $carica_profilo['gestione_newsletter'];
		$g_bannerhome = $carica_profilo['gestione_bannerhome'];
		$g_prodotti = $carica_profilo['gestione_prodotti'];
		$g_ordini = $carica_profilo['gestione_ordini'];
		$g_gallery = $carica_profilo['gestione_gallery'];
		$tag_submit = 'MODIFICA';
		$tag_hidden_id = '<input name="id_login" type="hidden" value="'.$id_login.'" />';
		$tag_act = '<input name="act" type="hidden" value="edit" />';
	}
	
	echo'		
		<h1>GESTIONE ACCOUNT > <b>'.$tag_h1.' ACCOUNT</b></h1>
		<form action="gestione_account.php?action=save" method="post" enctype="multipart/form-data" name="modulo" id="modulo" onsubmit="return OkAccount(this)">
			<h2>Dati Account</h2>
			<p><label class="label">Username:</label><input name="username" type="text" class="input" '.$value_username.'/></p>
			<p><label class="label">Password:</label><input name="password" type="password" class="input" '.$value_password.'/></p>
			<p><label class="label">Nickname:</label><input name="nickname" type="text" class="input" '.$value_nickname.'/></p>
			<p><label class="label">Email:</label><input name="email" type="text" class="input" '.$value_email.'/></p>
			<h2 style="margin-top:20px;">Permessi Account</h2>
			<p>
				<label class="label account">Gestione Account:</label>
				<input type="radio" name="gestione_account" value="1" class="radio img"';if($g_account=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input name="gestione_account" type="radio" class="radio img" value="0"';if($g_account=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>
				<label class="label news">Gestione News:</label>
				<input type="radio" name="gestione_news" value="1" class="radio img"';if($g_news=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input type="radio" name="gestione_news" value="0" class="radio img"';if($g_news=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>
				<label class="label bacheca">Gestione Comunicati:</label>
				<input type="radio" name="gestione_comunicati" value="1" class="radio img"';if($g_comunicati=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input type="radio" name="gestione_comunicati" value="0" class="radio img"';if($g_comunicati=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>
				<label class="label newsletter">Gestione Newsletter:</label>
				<input type="radio" name="gestione_newsletter" value="1" class="radio img"';if($g_newsletter=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input type="radio" name="gestione_newsletter" value="0" class="radio img"';if($g_newsletter=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>
				<label class="label bannerhome">Gestione Banner Home:</label>
				<input type="radio" name="gestione_bannerhome" value="1" class="radio img"';if($g_bannerhome=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input type="radio" name="gestione_bannerhome" value="0" class="radio img"';if($g_bannerhome=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>
				<label class="label prodotti">Gestione Prodotti:</label>
				<input type="radio" name="gestione_prodotti" value="1" class="radio img"';if($g_prodotti=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input type="radio" name="gestione_prodotti" value="0" class="radio img"';if($g_prodotti=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>
				<label class="label gallery">Gestione Gallery:</label>
				<input type="radio" name="gestione_gallery" value="1" class="radio img"';if($g_gallery=='1'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">SI</span>
				<input type="radio" name="gestione_gallery" value="0" class="radio img"';if($g_gallery=='0'){echo' checked="checked"';}else{echo'';} echo'/><span class="text_radio img">NO</span>
			</p>
			<p>&nbsp;'.$tag_hidden_id.''.$tag_act.'</p>
			<p><label class="label"></label><input type="submit" name="submit" id="submit" value="'.$tag_submit.'" /></p>
		</form>
		<p class="back_style"><a href="gestione_account.php" class="back_button">Torna Indietro</a></p>	
	';
}
///////////////////////////////////////////////////////////////////////////////////////////
/// SAVE //////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
function save(){
	$prefix = PREFIX;
	$act = addslashes($_POST['act']);
	$username = addslashes($_POST['username']);
	$password = addslashes($_POST['password']);
	$nickname = addslashes($_POST['nickname']);
	$email = addslashes($_POST['email']);
	$gestione_account = addslashes($_POST['gestione_account']);
	$gestione_news = addslashes($_POST['gestione_news']);
	$gestione_comunicati = addslashes($_POST['gestione_comunicati']);
	$gestione_newsletter = addslashes($_POST['gestione_newsletter']);
	$gestione_bannerhome = addslashes($_POST['gestione_bannerhome']);
	$gestione_prodotti = addslashes($_POST['gestione_prodotti']);
	$gestione_ordini = addslashes($_POST['gestione_ordini']);
	$gestione_gallery = addslashes($_POST['gestione_gallery']);
	if( $act == 'add' ) {
		$insert = "INSERT INTO ".$prefix."_login (nickname, username, password, email, gestione_account, gestione_news, gestione_comunicati, gestione_newsletter, gestione_bannerhome, gestione_prodotti, gestione_gallery) VALUES ('$nickname', '$username', '$password', '$email', '$gestione_account', '$gestione_news', '$gestione_comunicati', '$gestione_newsletter', '$gestione_bannerhome', '$gestione_prodotti', '$gestione_gallery')"; 
		echo'<h1>GESTIONE ACCOUNT > <b>NUOVO ACCOUNT</b></h1>';
		if(mysql_query($insert)){ echo status_ok(); }else{ echo status_errore(); }
	}elseif( $act == 'edit' ){
		$id_login = addslashes($_POST['id_login']);
		$update = "UPDATE ".$prefix."_login SET username = '$username', password = '$password', nickname = '$nickname', email = '$email', gestione_account = '$gestione_account', gestione_news = '$gestione_news', gestione_comunicati = '$gestione_comunicati', gestione_newsletter = '$gestione_newsletter', gestione_bannerhome = '$gestione_bannerhome', gestione_prodotti = '$gestione_prodotti', gestione_gallery = '$gestione_gallery' WHERE id_login = '$id_login'";
		echo'<h1>GESTIONE ACCOUNT > <b>MODIFICA ACCOUNT</b></h1>';
		if(mysql_query($update)){ echo status_ok(); }else{ echo status_errore(); }
	}
	header('Refresh: 1; URL=gestione_account.php');
	ob_end_flush();
}
///////////////////////////////////////////////////////////////////////////////////////////
/// DELETE ////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
function delete(){
	$prefix = PREFIX;
	$id_login = isset($_GET['id_login']) ? (int)$_GET['id_login'] : 0;
	$delete = "DELETE FROM ".$prefix."_login WHERE id_login = '$id_login'" ;
	echo'<h1>GESTIONE ACCOUNT > <b>ELIMINA ACCOUNT</b></h1>';
	if(mysql_query($delete)){ echo status_ok(); }else{ echo status_errore(); }
	header('Refresh: 1; URL=gestione_account.php');
	ob_end_flush();
}
?>						
		</div>
		<!-- CONTENUTI FINE-->
	</div>
	<!-- WRAPPER CONTAINER FINE-->

	<div class="push"></div>
</div>
<!-- WRAPPER FINE -->


<!-- WRAPPER FOOTER INIZIO-->
<div id="wrapper_footer"><?php select_footer(); ?></div>
<!-- WRAPPER FOOTER FINE-->

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit