Mini Shell
<?
include"menu.php";
switch ($permissao)
{
case "2":
break;
default:
echo "<script>
alert('sem permissão! ');
</script>";
exit();
break;
}
?>
<div class="container">
<?
if($_POST){
// print_r($_POST);
$pisoo = $_POST["pisoo"];
if(empty($pisoo))
{
}
else
{
include"conexao.php";
// Create connection
$conn = new mysqli($host, $user, $pass, $db);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "update pisosalarial set piso ='$pisoo' where id='1'";
// echo"$sql";
if ($conn->query($sql) === TRUE) {
echo "<script>
alert('MODIFICADO COM SUCESSO !!!!');
window.history.back();
</script>";
} else {
echo "Error updating record: " . $conn->error;
}
$conn->close();
exit();
}
$texto = $_POST["texto"];
$idd = $_POST["idd"];
$texto = utf8_decode($texto);
//echo"$texto";
include"conexao.php";
// Create connection
$conn = new mysqli($host, $user, $pass, $db);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "update conteudo set conteudo ='$texto' where id='$idd'";
// echo"$sql";
if ($conn->query($sql) === TRUE) {
echo "<script>
alert('MODIFICADO COM SUCESSO !!!!');
window.history.back();
</script>";
} else {
echo "Error updating record: " . $conn->error;
}
$conn->close();
exit();
}
$id = $_GET["id"];
$id = utf8_decode($id);
include"conexao.php";
$sql = "select * from conteudo where titulo='$id' limit 01 ";
$res = mysqli_query($con, $sql);
//echo"**** $sql ***";
// conta o número de registros
$total = mysqli_num_rows($res);
//echo "aqui o total encontrado <p>Total de Resultados: " . $total . "</p>";
// loop pelos registros
while ($f = mysqli_fetch_array($res))
{
$idd = $f['id'];
$id = $f['id'];
$titulo = $f['titulo'];
$tit= base64_encode($titulo);
$conteudo = $f['conteudo'];
$permissao = $f['permissao'];
$titulo = utf8_encode($titulo);
$conteudo = utf8_encode($conteudo);
$foto = $f['foto'];
}
// echo"$tit";
echo"<center>
<div class=\"alert alert-info\" role=\"alert\"><b>$titulo</b></div>";
switch ($foto)
{
case "fotos/semfoto.jpg":
$fotoantiga = "";
break;
default:
$fotoantiga = "$foto";
break;
}
echo"
<div align='center'>
<img src='$foto' style='width:100px;'class='img-responsive'>
<a data-fancybox data-type=\"iframe\" href=\"trocafotodados.php?id=$id&fotoantiga=$fotoantiga&veio=$tit\" clasSs=\"btn btn-primary\" data-small-btn=\"true\" data-iframe='{\"preload\":true}'>
<p style=\"font-size:12px;color:#000000;\"> TROCAR FOTO
</a>
</div>";
?>
<script language="Javascript" src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="Javascript" src="htmlbox.colors.js" type="text/javascript"></script>
<script language="Javascript" src="htmlbox.styles.js" type="text/javascript"></script>
<script language="Javascript" src="htmlbox.syntax.js" type="text/javascript"></script>
<script language="Javascript" src="xhtml.js" type="text/javascript"></script>
<script language="Javascript" src="htmlbox.min.js" type="text/javascript"></script>
<hr>
<table width="100%" border="0">
<tr>
<td width="2%"> </td>
<td width="98%">
<form name="form1" action="dados.php" method="post" >
<textarea id='ha' name="texto"><? echo"$conteudo";?></textarea>
<script language="Javascript" type="text/javascript">
$("#ha").css("height","150px").css("width","100%").htmlbox({
toolbars:[
[
// Cut, Copy, Paste
"separator","cut","copy","paste",
// Undo, Redo
"separator","undo","redo",
// Bold, Italic, Underline, Strikethrough, Sup, Sub
"separator","bold","italic","underline","strike","sup","sub",
// Left, Right, Center, Justify
"separator","justify","left","center","right",
// Ordered List, Unordered List, Indent, Outdent
"separator","ol","ul","indent","outdent",
// Hyperlink, Remove Hyperlink, Image
"separator","link","unlink","image"
],
[// Show code
"separator","code",
// Formats, Font size, Font family, Font color, Font, Background
"separator","formats","fontsize","fontfamily",
"separator","fontcolor","highlight",
],
[
//Strip tags
"separator","removeformat","striptags","hr","paragraph",
// Styles, Source code syntax buttons
"separator","quote","styles","syntax"
]
],
skin:"blue"
});
</script>
<input type="hidden" name="idd" value="<? echo "$idd" ; ?>">
</p>
<p>
<input type="submit" name="Submit" value="SALVAR">
</p>
</form>
<?
$tit= base64_encode($titulo);
echo"<div class=\"alert alert-info\" role=\"alert\"><b><center>ARQUIVOS COMPLEMENTARES ( DOC. PDF, XLS ETC ... ) </center></b>
<center><a data-fancybox data-type=\"iframe\" href=\"anexaarquivo.php?id=$titulo\" clasSs=\"btn btn-primary\" data-small-btn=\"true\" data-iframe='{\"preload\":true}'>
<p style=\"width:280px;font-size:13px;color:#FFFFFF;\" class=\"btn btn-primary\" > ANEXAR ARQUIVOS</p>
</a></center>
</div>";
include"conexao.php";
$sql = "select * from anexos where local='$tit' order by id desc ";
$res = mysqli_query($con, $sql);
// echo"**** $sql ***";
// conta o número de registros
$total = mysqli_num_rows($res);
//echo "aqui o total encontrado <p>Total de Resultados: " . $total . "</p>";
// loop pelos registros
while ($f = mysqli_fetch_array($res))
{
$idarquivo = $f['id'];
$arquivo = $f['arquivo'];
$legenda = $f['legenda'];
$arquivoo= base64_encode($arquivo);
$idarquivoo= base64_encode($idarquivo);
$legenda = utf8_encode("$legenda");
echo"
<form name=\"form1\" action=\"editalegendadados.php\" method=\"POST\" >
<input type='hidden' name='id' value='$idarquivoo'>
<label>
<input type=\"text\" placeholder = \"lEGENDA\" name=\"legenda\" value = \"$legenda\" class = \"form-control\" style=\"width:380px;\">
</label>
<label>
<button type=\"submit\" class=\"btn btn-success\" value=\"\" style='width:90px;'>
<i class='fa fa-save' style='font-size:18px'></i>
SALVAR
</button>
</label>
<a href = 'https://sicomerciomppa.com.br/adm/fotos/dados/$arquivo' target = '_blank' > VER </a>
</form>
<form name=\"form1\" action=\"apagaarquivo.php\" method=\"POST\" >
<input type='hidden' name='id' value='$idarquivoo'>
<input type='hidden' name='arquivo' value='$arquivoo'>
<label>
<button type=\"submit\" class=\"btn btn-danger\" value=\"\" style='margin-top:-15px;width:90px;' onclick='return pergunta$idarquivo();'>
<i class='fa fa-trash-o' style='font-size:18px'></i>
Excluir
</button>
</label>
</form>
<script type=\"text/javascript\">
function pergunta$idarquivo(){
return confirm('Tem certeza que quer excluir $legenda');
}
</script>
";
}
?>
</br></br></br>
<?
echo"
<div class=\"alert alert-info\" role=\"alert\"><b><center>FOTOS COMPLEMENTARES ( JPG. ) </b>
<a data-fancybox data-type=\"iframe\" href=\"anexaarquivofoto.php?id=$tit\" clasSs=\"btn btn-primary\" data-small-btn=\"true\" data-iframe='{\"preload\":true}'>
<br>
<p style=\"width:280px;font-size:13px;color:#FFFFFF;\" class=\"btn btn-primary\" > ANEXAR FOTOS</center>
</a></div>
";
include"conexao.php";
$sql = "select * from fotos where local='$tit' order by id desc ";
$res = mysqli_query($con, $sql);
// echo"**** $sql ***";
// conta o número de registros
$total = mysqli_num_rows($res);
//echo "aqui o total encontrado <p>Total de Resultados: " . $total . "</p>";
// loop pelos registros
while ($f = mysqli_fetch_array($res))
{
$idarquivo = $f['id'];
$arquivo = $f['arquivo'];
$legenda = $f['legenda'];
$arquivoo= base64_encode($arquivo);
$idarquivoo= base64_encode($idarquivo);
echo"<center>
<label style = \"background-color:#ffffff;\" >
<img src='fotos/dados/$arquivo' style='height:150px; margin-left:8px;'class='img-responsive'>
$legenda
</br>
<script type=\"text/javascript\">
function pergunta$idarquivo(){
return confirm('Tem certeza que quer excluir a foto?');
}
</script>
<form name=\"form1\" action=\"apagaarquivofoto.php\" method=\"POST\" >
<input type='hidden' name='id' value='$idarquivoo'>
<input type='hidden' name='arquivo' value='$arquivoo'>
<button type=\"submit\" class=\"btn btn-danger\" value=\"\" style='width:90px;' onclick='return pergunta$idarquivo();'>
<i class='fa fa-trash-o' style='font-size:18px'></i>
Excluir
</button>
</form>
</center>
</label>
";
}
switch ($titulo)
{
case "JURIDICO":
// piso salarial
echo"</BR></BR>
<div class=\"alert alert-info\"style = \"background-color:red; color:#FFFFFF;\" role=\"alert\"><center><b>PISO SALARIAL </b></center></div>";
include"conexao.php";
$sql = "select * from pisosalarial where id='1' ";
$res = mysqli_query($con, $sql);
// echo"**** $sql ***";
// conta o número de registros
$total = mysqli_num_rows($res);
//echo "aqui o total encontrado <p>Total de Resultados: " . $total . "</p>";
// loop pelos registros
while ($f = mysqli_fetch_array($res))
{
$piso = $f['piso'];
echo"
<form name=\"form1\" action=\"dados.php\" method=\"post\" >
<textarea class = 'form-control' rows=\"10\" cols=\"40\" name=\"pisoo\">$piso</textarea>
<input type=\"submit\" name=\"Submit\" value=\"SALVAR\">
</form>
";
}
echo"</BR></BR>
<div class=\"alert alert-info\"style = \"background-color:red; color:#FFFFFF;\" role=\"alert\"><center><b>CARTAZES OBRIGATÓRIOS</b></center></div>";
echo"
<div class=\"alert alert-info\" role=\"alert\"><b><center>ARQUIVOS EM PDF OU JPG ( .JPG OU .PDF ) </b>
<a data-fancybox data-type=\"iframe\" href=\"anexaarcartaz.php?id=$tit\" clasSs=\"btn btn-primary\" data-small-btn=\"true\" data-iframe='{\"preload\":true}'>
<br>
<p style=\"width:280px;font-size:13px;color:#FFFFFF;\" class=\"btn btn-primary\" > ANEXAR</center>
</a></div>
";
include"conexao.php";
$sql = "select * from cartazes order by id desc ";
$res = mysqli_query($con, $sql);
// echo"**** $sql ***";
// conta o número de registros
$total = mysqli_num_rows($res);
//echo "aqui o total encontrado <p>Total de Resultados: " . $total . "</p>";
// loop pelos registros
while ($f = mysqli_fetch_array($res))
{
$idarquivo = $f['id'];
$arquivo = $f['arquivo'];
$legenda = $f['legenda'];
$arquivoo= base64_encode($arquivo);
$idarquivoo= base64_encode($idarquivo);
$legenda = utf8_encode("$legenda");
echo"
<form name=\"form1\" action=\"editalegendadados-cartazes.php\" method=\"POST\" >
<input type='hidden' name='id' value='$idarquivoo'>
<label>
<input type=\"text\" placeholder = \"lEGENDA\" name=\"legenda\" value = \"$legenda\" class = \"form-control\" style=\"width:380px;\">
</label>
<label>
<button type=\"submit\" class=\"btn btn-success\" value=\"\" style='width:90px;'>
<i class='fa fa-save' style='font-size:18px'></i>
SALVAR
</button>
</label>
<a href = 'https://sicomerciomppa.com.br/adm/fotos/dados/$arquivo' target = '_blank' > VER </a>
</form>
<form name=\"form1\" action=\"apagaarquivo-cartazes.php\" method=\"POST\" >
<input type='hidden' name='id' value='$idarquivoo'>
<input type='hidden' name='arquivo' value='$arquivoo'>
<label>
<button type=\"submit\" class=\"btn btn-danger\" value=\"\" style='margin-top:-15px;width:90px;' onclick='return pergunta$idarquivo();'>
<i class='fa fa-trash-o' style='font-size:18px'></i>
Excluir
</button>
</label>
</form>
<script type=\"text/javascript\">
function pergunta$idarquivo(){
return confirm('Tem certeza que quer excluir $legenda');
}
</script>
";
}
break;
}
?>
</br></br></br></br></br></br></br></br></br>
</br></br></br></br></br></br></br></br></br>
</div>
</center>
Zerion Mini Shell 1.0