Просмотр файла sman/set/create_path.php

Размер файла: 788B
<?php

include_once '../../sman/includs/configurations.php';

$file_opt = 'true';

include_once '../../sman/includs/head.php';

if (isset($_GET['path'])) {

$path_name = htmlspecialchars($_GET['path']);


if (isset($_POST['create_path'])) {

mkdir(ROOT.'/'.$path_name.'/'.htmlspecialchars($_POST['create_path']));

header("Location: /sman/index.php?path=".$path_name."/".htmlspecialchars($_POST['create_path']));

exit;


}
echo '<div class = "vhod">';
echo '<form action = "?path='.$_GET['path'].'" method = "POST">

Имя папки: <br />

<input name = "create_path">

<br />

<input type = "submit" value = "Создать папку">

<br />';

} else {

header("Location: /sman/index.php");

exit;

}


echo '</div>';

include_once '../../sman/includs/foot.php';
?>