<?
session_start();
require_once "../init.php";
require_once "../security_a.inc.php";
require_once "../authority.inc.php";
$DB->close();
$AgentDir = "../../com_data/$AgentID";
$AgentTemplateDir = $AgentDir."/templates";
if(!is_dir($AgentDir)) mkdir($AgentDir);
if(!is_dir($AgentTemplateDir)) mkdir($AgentTemplateDir);
$_SESSION['UserPriTemplateDir'] = realpath($AgentTemplateDir);
$_SESSION['HashKey'] = md5("UserPriTemplateDir".$_SESSION['UserPriTemplateDir']);
header("location:../FileExplorer/index.php");
?>