<?php
session_start();
require_once "../init.php";
require_once "../authority.inc.php";

$key = $_GET['key'];
$DocID = $_GET['DocID'];

if(!CheckHashKey('doc'.$DocID,$key)){
   $DB->close();
   die("·Η·¨ΘλΗΦ");
}
$sql = "delete from doc where DocID='$DocID'";
$DB->query($sql);
$DB->close();
header("location:doc_list.php");
?>