Location: PHPKode > projects > chillyCMS > chillyCMS/admin/modules.site.php
<?php
//#################################################################################################
//	Modules page
//#################################################################################################
//	chillyCMS - Content Management System
//	Copyright (C) 2008
//	Stefanie Wiegand <hide@address.com> & Johannes Cox <hide@address.com>
//	
//	This program is licensed under the GPL 3.0 license. For more information see LICENSE.txt.
//#################################################################################################
define('DOIT',true);

require_once("../core/session.admin.include.php");
require_once(PATH."/core/frontendpage.class.php");
require_once(PATH."/admin/modules.include.php");
require_once(PATH."/admin/modulesedit.include.php");

$src_file=$msg=$path="";

if (isset($_POST["action"])) { $action = only_text($_POST["action"]); } else { $action = false; }
if (isset($_POST["status"])) { $status = only_text($_POST["status"]); } else { $status = false; }
if (isset($_POST["access"])) { $access = intval($_POST["access"]); } else { $access = 0; }
if (isset($_POST["direction"])) { $direction = only_text($_POST["direction"]); } else { $direction = false; }
if (isset($_POST["id"])) { $id = intval($_POST["id"]); } else { $id = 0; }
//Upload file?
if (isset($_FILES["newmodule"])) {
	$src_file = $_FILES["newmodule"]["tmp_name"];
	$path = PATH.'/modules';
} else {
	$src_file = $path = false;
}

if	($src_file != "")		{ $msg	= add_module($src_file, $path);			}
elseif	($action=="deleteinstalled")	{ $msg	= delete_installedmodule($id);			}
elseif	($action=="deleteactive")	{ $msg	= delete_activemodule($id);			}
elseif	($action=="undo")		{ $msg	= undo_modcreation($id);			}
elseif	($action=="switch")		{ $msg	= switch_status_module($status,$id);		}
elseif	($action=="switchaccess")	{ $msg	= switch_access_module($id,$access);		}
elseif	($action=="move")		{ $msg	= move_item($id,$direction,"site_modules");	}

$page->print_head();
$page->add(show_activemodules());
$page->add(uploadform());
$page->add(show_installedmodules());
$page->print_body($msg);
?>
Return current item: chillyCMS