Viewing file: inicio.php (1.4 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
setlocale(LC_ALL,"es_ES@euro","es_ES","esp");
$hoy = ucfirst(strftime("%A, %d de %B del %Y"));
if ($_POST['action'] == "checkdata") {
if ($_SESSION['tmptxt'] == $_POST['tmptxt']) {
if (file_exists($_POST['name'] && $_POST['sales'])) {
echo "<script language='JavaScript' type='text/javascript'>
alert('Error al Crear La Carpeta $_POST[name], esta ya existe');
window.location.href='index.php';
</script>";
}
else{
if ($_POST[sales] == "resoluciones" || $_POST[sales] == "autos" )
{
$estructura = "../../../$_POST[sales]/$_POST[name]";
}
else
{
$estructura = "../../$_POST[sales]/$_POST[name]";
}
if(!mkdir($estructura, 0, true))
{
die('Fallo al crear carpeta...');
}
else
echo "<script language='JavaScript' type='text/javascript'>
alert('Carpeta $_POST[name] creada satisfactoriamente');
window.location.href='index.php';
</script>";
}
} else {
echo "<script language='JavaScript' type='text/javascript'>
alert('El texto no coincide con la imagen')
window.location.href='index.php';
</script>";
}
}
//echo "$mensaje";
?>
|