!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/home/memoriacel/public_html/2018/panel/   drwxr-xr-x
Free 985.28 GB of 1859.98 GB (52.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     modificar-cupon.php (3.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
$pagina_actual
="administrar-cupones";
$categoria_actual="cupones";
require_once(
"includes/config.php");
require_once(
"includes/funciones.php");

if (isset(
$_POST["id"])){
    
    
extract($_POSTEXTR_SKIP);
    
    
$result=$mysqli->query("
    UPDATE cupon SET 
    nombre='"
.utf8_decode($nombre)."',
    fecha_inicio='"
.$fecha_inicio."',
    fecha_fin='"
.$fecha_fin."',
    tipo='"
.$tipo."',
    valor='"
.$valor."',
    codigo='"
.utf8_decode($codigo)."',
    stock='"
.$stock."',
    compra_minima='"
.$compra_minima."'
    WHERE id='
$id'
    "
);        
    
header('Location: '.$_SESSION["ultimo_administrar"]);  
}

if (isset(
$_GET["id"])){
    
$id=cadena_segura($_GET["id"],11);
    
    
$result=$mysqli->query("
    SELECT id, nombre, fecha_inicio, fecha_fin, tipo, valor, codigo, stock, compra_minima
    FROM cupon
    WHERE id='
$id'
    "
);
    
$item mysqli_fetch_assoc($result);
/*
$paises = $mysqli->query("
SELECT p.id, p.nombre 
FROM pais p
ORDER by nombre
");
*/
?>
<div class="modal-content">
    <form method="post" action="modificar-cupon.php">
    <input type="hidden" name="id" value="<?=$id?>">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title"></h4>
    </div>
    <div class="modal-body">
    
        <div class="row">

            <div class="form-group col-lg-6">
                <label>Nombre</label>
                <input class="form-control" name="nombre" value="<?=utf8_encode($item["nombre"])?>" required>
            </div>

            <div class="form-group col-lg-6">
                <label>Código</label>
                <input class="form-control" name="codigo" value="<?=utf8_encode($item["codigo"])?>" required>
            </div>
        
            <div class="form-group col-lg-3">
                <label>Fecha inicio</label>
                <input class="form-control" name="fecha_inicio" type="date" required value="<?=$item["fecha_inicio"]?>">
            </div>  

            <div class="form-group col-lg-3">
                <label>Fecha fin</label>
                <input class="form-control" name="fecha_fin" type="date" required value="<?=$item["fecha_fin"]?>">
            </div> 

            <div class="form-group col-lg-3">
                <label>Valor</label>
                <input class="form-control" name="valor" value="<?=utf8_encode($item["valor"])?>" required>
            </div>

            <div class="form-group col-lg-3">
                <label>Tipo</label>
                <select class="form-control" name="tipo">
                    <option <?=$item["tipo"]=="$"?"selected":""?> value="$">$</option>
                    <option <?=$item["tipo"]=="%"?"selected":""?> value="%">%</option>                                                    
                </select>
            </div>  

            <div class="form-group col-lg-3">
                <label>Stock</label>
                <input type="number" class="form-control" name="stock" value="<?=utf8_encode($item["stock"])?>" required>
            </div> 

            <div class="form-group col-lg-3">
                <label>Compra mínima</label>
                <input class="form-control" name="compra_minima" value="<?=utf8_encode($item["compra_minima"])?>">
            </div>

        </div>
                               
    </div>
    <div class="modal-footer">
        <a href="#" class="btn btn-white" data-dismiss="modal">Cerrar</a>
        <input type="submit" class="btn btn-primary" value="Modificar">
    </div>
    </form>
</div><!-- /.modal-content -->
<? }?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.5646 ]--