Location: PHPKode > projects > chillyCMS > chillyCMS/modules/download/addfiles.php
<?php
define('DOIT',true);
require_once("../../config.php");
require_once("../../core/session.backend.include.php");
require_once(PATH."/modules/download/languages/$settings[language].php");
require_once("addfiles.include.php");

if (isset($_POST["modid"])) { $modid = intval($_POST["modid"]); } else { $modid = intval($_GET["modid"]); }
if (isset($_POST["action"])) { 
	$action		= only_text($_POST["action"]);
	$file		= $_POST["file"];
	if (isset($_POST["location"])) {
		$location = $_POST["location"];
	} else {
		$location = "media";
	}
} else {
	$action = false;
}

if (isset($_POST["folder"])) { $showfolder = $_POST["folder"]; }
else { $showfolder="../../media"; }

if	($action=="add")	{ $msg = add_file($modid,$file,$location);	}
elseif	($action=="remove")	{ $msg = remove_file($modid,$file);		}
else				{ $msg = "";					}

$page->set_type("popup");
$page->print_head();
$page->add(add_files($msg));
$page->print_body();
?>
Return current item: chillyCMS