Location: PHPKode > projects > chillyCMS > chillyCMS/admin/groupform.site.php
<?php
//#################################################################################################
//	Groupform 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.backend.include.php");
require_once(PATH."/admin/groupform.include.php");

if (isset($_POST["action"])) { $action = only_text($_POST["action"]); } else { $action = false; }
if (isset($_POST["kickout"])) { $kickout = intval($_POST["kickout"]); } else { $kickout = 0; }
if (isset($_POST["chmod"])) { $chmod = intval($_POST["chmod"]); } else { $chmod = 0; }
if (isset($_POST["do"])) { $do = only_text($_POST["do"]); } else { $do = false; }
if (isset($_POST["id"])) { $id = intval($_POST["id"]); } else { $id = 0; }
if (isset($_POST["addbutton"])) { $member = $_POST["members"]; } else { $member = false; }

if ($do=="updategroup") { $msg = update_group($id); }
elseif ($kickout>0) { $msg = kickout($kickout); }
elseif ($chmod>0) { $msg = change_moderator($chmod); }
elseif (isset($_POST["addbutton"]) && (html_entity_decode($_POST["addbutton"])==html_entity_decode($l_gen["lbl_add"])))	{
	$msg = add_member($id,$member); }
else { $msg = false; }

if ($action=="new") { $myaction = $l_ugs["lbl_newgroup"]; }
elseif ($action=="edit") { $myaction = $l_ugs["lbl_egroup"]; }
else { $myaction = false; }

//special case: group was just created
if ($action=='new' && isset( $_POST['savebutton']) && $_POST['savebutton'] == $l_gen['lbl_save']) {
	if ($id==0 && $msg[1]=='good') {
		$id = $page->db->next_autoincrement('system_groups')-1;
		$myaction = $l_ugs['lbl_egroup'];
	}
}

$page->print_head();
$page->add(groupform($id));
$page->print_body($msg);
?>
Return current item: chillyCMS