*/
include("session.php");
require_once("class_functions.php");
require_once("class_folders.php");
require_once("class_db.php");
if(file_exists($_SESSION['config']['lang'].'.php'))
{
include($_SESSION['config']['lang'].'.php');
}
else
{
$_SESSION['error'] = "Language file missing...
";
}
$func = new functions();
//Le classeur
if(!isset($_GET['folder_id']) || empty($_GET['folder_id']))
{
$_SESSION['error'] = _SELECT_FOLDER_FIRST;
}
else
{
$s_folderid = addslashes($func->wash($_GET['folder_id'], "no", _THE_FOLDER));
}
//Le document
if(!isset($_GET['id']) || empty($_GET['id']))
{
$_SESSION['error'] = _NO_DOCUMENT_CORRESPOND_TO_IDENTIFIER;
}
else
{
$s_id = addslashes($func->wash($_GET['id'], "num", _THE_DOC));
}
//L'action
if(isset($_GET['action']))
{
$action = $_GET['action'];
}
else
{
$action = "";
}
if(!empty($_SESSION['error']))
{
?>
connect();
$db->query("delete from ".$_SESSION['tablename']['folderres']." where RES_ID = ".$s_id." and FOLDER_ID = '".$s_folderid."'");
header("location: index.php?page=folders&action=".$action."&folder_id=".$s_folderid);
exit;
}
?>