<?
	/**********************************************************************
	 * @module Application
	 **********************************************************************/
	 require_once "../../config.inc.php";

	// include extra language file
	// include extra language file
	$auth = new auth("CL_BROWSER");
	if (value('resetfilter', 'NUMERIC', '0') == '1')
	  delVar('linkset');
	
	$page = new page("Cluster Browser");

	$page->setJS("TREE");
	$page->setJS("FCKLIB");

	//initialize
	$variation = variation();
	$action = value("action", "", "");
	$clt = value("clt", "NUMERIC", "");
	
	if ($action == "" && value("changevariation", "", "") != "") {
	  $action = value("acstate");
	  $clt = initValueEx("clt", "clt", "", "NUMERIC");
	}
	
	$go = value("go", "NOSPACES", "");
	$pnode = initValueEx("pnode", "pnode", "0", "NUMERIC");

	//// ACL Check ////
<?
	/**********************************************************************
	 * @module Application
	 **********************************************************************/
	require_once "../../config.inc.php";

	$auth = new auth("USER_MANAGEMENT");
	$page = new page("User Administration");
	$page->setJS("md5");
	
	$filter = new Filter("auth_user", "user_id");
	$filter->addRule($lang->get("email"), "email", "email");

	$filter->icon = "li_user.gif";
	$filter->type_name = "Users";

	$filtermenu = new Filtermenu($lang->get("user_filtermenu"), $filter);
	$filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php", "user_premissions.php");
	
	
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM auth_user where user_id=$oid and user_id > 999");
	
	$form = new stdEDForm($lang->get("user_head"), "i_myprofile.gif");
	$form->submitButtonAction = "if (document.form1.auth_user_password_1.value != '') document.form1.auth_user_password_1.value = document.form1.auth_user_password_2.value = hex_md5(document.form1.auth_user_password_1.value);";

	$cond = $form->setPK("auth_user", "user_id");
	
	$form->add(new TextInput($lang->get("email"), "auth_user", "email", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("password"), "auth_user", "password", $cond, "type:text,width:200,size:40", "MANDATORY"));
	$form->add(new CheckboxInput($lang->get("user_active"), "auth_user", "active", $cond, "1", "0"));
	 *	GNU General Public License for more details.
	 *
	 *	You should have received a copy of the GNU General Public License
	 *	along with N/X; if not, write to the Free Software
	 *	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
	 **********************************************************************/
	require "../../config.inc.php";
	$auth = new auth("EDIT_OBJECT|OBJECT_PROPS");
	if (value("resetfilter") == '1') {		
		delVar ("filter");
		delVar ("sname");
		pushVar("linkset", '');		
	}
	
	$page = new page("Edit Object");
	$page->setJS("TREE");	
	if (strlen(getVar("linkset")) > 1) $disableMenu = true;
	//// ACL Check ////
	$aclf = aclFactory($pnode, "folder");
	$aclf->load();
	if (! $aclf->hasAccess($auth->userId))
	  header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	//// ACL Check ////
	/************************************************************************************
	 * Initializing
	 ************************************************************************************/
	$oid = value("oid", "NUMERIC");
	$template = getDBCell("content", "MT_ID", "CID = $oid");
	$name = getDBCell("content", "NAME", "CID = $oid");
	$category_id = getDBCell("content", "CATEGORY_ID", "CID = $oid");
	$cond = "CID = $oid";
	
	for ($i=0; $i<count($sitepages); $i++) {
		$spid = $sitepages[$i][1];
		
		$spm = getDBCell("sitepage", "SPM_ID", "SPID = ".$spid);
		if ($spm != "") {
			$template = getDBCell("sitepage_master", "TEMPLATE_PATH", "SPM_ID = ".$spm);
			$sitepages[$i][1] = $c["devdocroot"].$template."?page=".$spid;
		}
	}
	
	$go = 1;
	$page_action = "UPDATE";
	
	$page = new page("Internal Link Selector");
	$page->setJS("FCKLIB");
	
	$form = new Form("Select Sitepage", "");
	$form->add(new Label("lbl", "Link destination:", "standardlight", 1));
	$form->add(new Dropdown("link", $sitepages, "standardlight", $sitepages[0][1], 450, 1));
	$container = new HTMLContainer("container", "", "2"); // ("buttons", "standardlight");
	$button = new ButtonInline("Submit", $lang->get('select', 'Select'), "navelement", "button", "javascript:getDoc(form1.link.value); ok();", "form1", 2);
	$out = $button->draw();
	$container->add("<div align=\"right\"><br>".$out."</div>");
	
	$form->add($container);
	
	$page->add($form);
	$page->draw();
	 
?>
<?
	/**********************************************************************
	 * @module Application
	 **********************************************************************/
	require_once "../../config.inc.php";
	require_once $c["path"] . "modules/sitepages/sitemap_menu2.inc.php";
	// include extra language file
	require_once $c["path"] . "modules/cluster/lang_clusterbrowser.inc.php";
	$auth = new auth("EXPLORE_SITE_S");
	$page = new page("Sitepage Browser");
	$page->setJS('TREE');
	$action = value("action");

	$mid = value("mid", "NUMERIC");
	$spid = value("oid", "NUMERIC");	
	$isDeletable = (defined('ADMINMODE') || (getDBCell("sitepage", "DELETABLE", "SPID = $spid")=='1'));
	
	if ($mid == "0" && $spid != "0") 
		$mid = getDBCell("sitepage", "MENU_ID", "SPID = $spid");
	if ($mid == "") $mid = "0";

		if (value("jump") != "0") {
		  $oid = value("oid");
		  if (! is_numeric($oid)) $oid="-1";

		if (countRows("sitepage", "SPID", "SPID=$oid") > 0) {
			// check if is live id...
			$check = getDBCell("state_translation", "IN_ID", "OUT_ID=$oid");

			if ($check != "")
				$oid = $check;