View file sman/set/import.php

File size: 764B
<?php

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

$file_opt = 'true';

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

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

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

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

$url = trim($_POST['url']);

$file_name = basename($url);

copy($url, ROOT.'/'.$path.'/'.$file_name);

header("Location: /sman/file.php?path=".$path."/".htmlspecialchars($file_name)."&ok");

exit;


}

echo '<form action = "?path='.$path.'" method = "POST">

Ссылка на файл: <br />

<input name = "url">

<br />

<input type = "submit" value = "Импортировать">

<br />';

} else {

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

exit;

}


echo '</div>';

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