46 lines
No EOL
1.2 KiB
PHP
46 lines
No EOL
1.2 KiB
PHP
<?php
|
|
if(!empty($_POST['logout'])){
|
|
session_unset();
|
|
}
|
|
|
|
if(!empty($_POST['page'])){
|
|
$page = filter_input(INPUT_POST, 'page', FILTER_SANITIZE_SPECIAL_CHARS);
|
|
}
|
|
|
|
if(!empty($_GET['page'])){
|
|
$page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_SPECIAL_CHARS);
|
|
}
|
|
|
|
if(!empty($_POST['createLogin'])){
|
|
$createLogin = filter_input(INPUT_POST, 'createLogin', FILTER_SANITIZE_SPECIAL_CHARS);
|
|
}
|
|
|
|
if(!empty($_POST['createPassword'])){
|
|
$createPassword = password_hash($_POST['createPassword'], PASSWORD_DEFAULT);
|
|
}
|
|
|
|
if(!empty($_POST['createPath'])){
|
|
$createPath = explode(';', $_POST['createPath']);
|
|
$createPath = array_filter($createPath);
|
|
array_walk($createPath, 'trim_value');
|
|
foreach($createPath as $key => &$value){
|
|
if(empty($value)){
|
|
unset($createPath[$key]);
|
|
}
|
|
if(substr($value, -1) !== '/'){
|
|
$value = $value.'/';
|
|
}
|
|
}
|
|
}
|
|
|
|
if(isset($_POST['videoUrl'])){
|
|
$url = escapeshellcmd($_POST['videoUrl']);
|
|
$destination = escapeshellcmd($_POST['destination']);
|
|
require 'apps/createTask.php';
|
|
//exec('bash script/cronTask.sh.sample', $array);
|
|
}
|
|
|
|
function trim_value(&$value)
|
|
{
|
|
$value = trim($value);
|
|
} |