31 lines
No EOL
652 B
PHP
31 lines
No EOL
652 B
PHP
<?php
|
|
|
|
if(!defined("COMMON"))
|
|
require("Common.php");
|
|
|
|
$js = getJsonizedInput();
|
|
$DB = get_DB();
|
|
|
|
$clientKey = $js['client'];
|
|
|
|
$complete=false;
|
|
if($clientKey == md5(CLIENTPSK)) {
|
|
// Authorized
|
|
$complete=true;
|
|
$name = $js['name'];
|
|
$type = $js['invType'];
|
|
$parent = $js['parent'];
|
|
$owner = $js['owner'];
|
|
$id = $js['id'];
|
|
|
|
$res = $DB->query("INSERT INTO `inventoryfolders` (folderName, type, version, folderID, agentID, parentFolderID ) VALUES ('$name', '$type', 0, '$id', '$owner', '$parent');");
|
|
|
|
if(!$res) $complete=false;
|
|
}
|
|
|
|
|
|
die(json_encode(array(
|
|
"done" => $complete,
|
|
"type" => "S2CSimpleReply"
|
|
)));
|
|
?>
|