Working project

This commit is contained in:
grez911
2017-02-04 14:34:24 +03:00
parent 053b3aca01
commit b3b392b354
293 changed files with 40557 additions and 0 deletions

40
del_list.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
require("init.php");
$list_name = isset($_GET["list_name"]) ? $_GET["list_name"] : "";
$domain = $_SESSION["domain"];
// We do not print any error in the next three cases, because a legitimate
// user will never produce such results, even with disables javascript
if ( preg_match("/[^a-z0-9_]/", $list_name) )
{
header("Location: error.php");
exit();
}
if ( strlen($list_name) > 30 )
{
header("Location: error.php");
exit();
}
// Test list existence
if( !is_dir("$lists_path/$domain/$list_name") )
{
header("Location: error.php");
exit();
}
if (!isset($_SESSION["auth"]) || $_SESSION["auth"] != 1)
{
// If not authenticated, then redirect to login page
header("Location: login.php");
exit();
}
if(!empty($list_name))
{
shell_exec("rm -rf $lists_path/$domain/$list_name");
header("Location: index.php");
exit();
}
?>