TreeIndex.default.inc.php 5.2 KB
<?php
/**
 *	@filesource 	TreeIndex.default.inc.php
 *
 * @category freeSN
 * @copyright Copyright by mensch.coop e.G. 2009
 * @mailto	dev [at] mensch.coop
 * @version 0.4.200901
 * @link http://mensch.coop
 */

{
	$DOMElement_Top = $DOMDocument->createElement("XMLSite_Top");
	$Content->appendChild($DOMElement_Top);

	//				$DOMElement_SubPages = $DOMDocument->createElement("XMLMenu_SubPages");
	//					$DOMElement_Top->appendChild($DOMElement_SubPages);
}
{
	$DOMElement_Left = $DOMDocument->createElement("XMLSite_Left");
	$Content->appendChild($DOMElement_Left);

	//				$DOMElement_ProfileBC = $DOMDocument->createElement("XMLMenu_ProfileBC");
	//					$DOMElement_Left->appendChild($DOMElement_ProfileBC);
	$DOMElement_SubPages = $DOMDocument->createElement("XMLMenu_SubPages");
	$DOMElement_Left->appendChild($DOMElement_SubPages);
	$DOMElement_UrlBC = $DOMDocument->createElement("XMLMenu_UrlBC");
	$DOMElement_Left->appendChild($DOMElement_UrlBC);

}
{
	$DOMElement_Display = $DOMDocument->createElement("XMLSite_Display");
	$Content->appendChild($DOMElement_Display);
}
{
	$DOMElement_Right = $DOMDocument->createElement("XMLSite_Right");
	$Content->appendChild($DOMElement_Right);
}



$PartOf = false;
$var_RequestProfileID = 0;
$param_MenuLink=$param_url=$param_Tree=null;

/**	Button und Anzeige */
/**
 * Single View at top
 */
if(array_key_exists('p', $_GET) && is_array($_GET['p']) && $_GET['p'][0]=='showSingle' && $_GET['p'][1]=='ID'  && is_numeric($_GET['p'][2])) {
	$var_PartOfBE =& MultimediaText::loadElement($HostAccount, $DB, $var_MultimediaTextClassName='*', $var_PartOfID=$_GET['p'][2]);

	if($var_PartOfBE) {
		$var_PartOfBEDOMElement = $DOMElement_Display->appendChild($var_PartOfBE->getObjDOMElement($HostAccount, $DB, $DOMDocument));
		if(array_key_exists(3, $_GET['p']) && $_GET['p'][3]) {
			$var_BasisClipboardname = $_GET['p'][3];
			Controller::runTree($HostAccount, $DB, $DOMDocument, $var_BasisClipboardname, $param_MenuLink, $var_PartOfBEDOMElement, $var_PartOfBE, $param_GET_index=3, $param_url, $_GET, $param_Tree, $param_showDefault=0, $param_MaxDetph=0);
		}
	}
}
//		if(false)
{
	$var_BC = 'ThreadMessageBC::Blog';

	$var_PartOfBE = MultimediaText::loadElement($HostAccount, $DB, $var_MultimediaTextClassName='*', $_LOSP_SIMPLEPAGE_ID, $param_PartOf=null, array());
	if(empty($_GET)) {
		$_GET['p'][0] = $var_BC;
		//				$_GET['c'][$_LOSP_SIMPLEPAGE_ID][$var_BC]['0-asc'] = '';
	}
	if($var_PartOfBE) {

		Controller::runTree($HostAccount, $DB, $DOMDocument, $var_BC, $param_MenuLink, $DOMElement_Display, $var_PartOfBE, $param_GET_index=0, $param_url, $_GET, $param_Tree, $param_showDefault=0, $param_MaxDetph=0);
	}
}

//		if(false)
{
	$param_url=null;
	$param_Tree=null;

	$var_BC = 'DateBC';
	$var_PartOfBE = MultimediaText::loadElement($HostAccount, $DB, $var_MultimediaTextClassName='*', $_LOSP_SIMPLEPAGE_ID, $param_PartOf=null, array());
	$var_get['p'][0] = $var_BC;

	if($var_PartOfBE) {
		Controller::runTree($HostAccount, $DB, $DOMDocument, $var_BC, $param_MenuLink, $DOMElement_Right, $var_PartOfBE, $param_GET_index=0, $param_url, $var_get, $param_Tree, $param_showDefault=0, $param_MaxDetph=0);
	}
}

if(false)
{
	$var_BC = 'ProfileBC';
	$var_PartOfBE = MultimediaText::loadElement($HostAccount, $DB, $var_MultimediaTextClassName='*', $_LOSP_SIMPLEPAGE_ID, $param_PartOf=null, array($var_BC => true));
	$var_get['p'][0] = $var_BC;
	if($var_PartOfBE) {
		Controller::runTree($HostAccount, $DB, $DOMDocument, $var_BC, $param_MenuLink, $DOMElement_ProfileBC, $var_PartOfBE, $param_GET_index=0, $param_url, $var_get, $param_Tree, $param_showDefault=0, $param_MaxDetph=0);
	}
}

//		if(false)
{
	$var_BC = 'Blog::SubPages';
	$var_PartOfBE = MultimediaText::loadElement($HostAccount, $DB, $var_MultimediaTextClassName='*', $_LOSP_SIMPLEPAGE_ID, $param_PartOf=null, array($var_BC => true));
	$var_get['p'][0] = $var_BC;
	if($var_PartOfBE) {
		Controller::runTree($HostAccount, $DB, $DOMDocument, $var_BC, $param_MenuLink, $DOMElement_SubPages, $var_PartOfBE, $param_GET_index=0, $param_url, $var_get, $param_Tree, $param_showDefault=0, $param_MaxDetph=0);
	}
}

/** Top Leiste */
$XMLButton = $DOMElement_Top->appendChild($DOMDocument->createElement("XMLButton"));
$XMLButton->appendChild($DOMDocument->createElement("URL","index.php"));
$XMLButton->appendChild($DOMDocument->createElement("LinkDisplay","[LOSP] Local Open Source Portal"))->setAttribute('kind', 'text');

if($_LOSP_DEV) {
	$_DEV_TITLE = "[LOSP] :: DEV//Forest/$_TREE/Design/$_LOSP_DESIGNDIR/ - ";
} else {
	$_DEV_TITLE ='';
}

if(is_object($var_PartOfBE)) {
	$DOMElement_Top->setAttribute('Subject', $var_PartOfBE->getObjVar('Subject'));
	$_TITLE = $_DEV_TITLE.''.$var_PartOfBE->getObjVar('Name').' - '.$var_PartOfBE->getObjVar('Subject');
} else {
	D::li('konnte Objekt nicht laden');
}


$DOMElement_Display->appendChild(Error::getAllXML($DOMDocument));

/**	vorstrukturierte DOMElemente werden dem Haupt XML DOMDocument hizugefügt */
$Content->appendChild($DOMElement_HTMLTagHead);

if (array_key_exists('HTTP_USER_AGENT', $_SERVER) && eregi('Win',$_SERVER["HTTP_USER_AGENT"])) {
	$var_css = $_LOSP_PATH_TO_ROOT.'include/Forest/'.$_TREE.'/Design/'.$_LOSP_DESIGNDIR.'/css/default_win.css';
} else {
	$var_css = $_LOSP_PATH_TO_ROOT.'include/Forest/'.$_TREE.'/Design/'.$_LOSP_DESIGNDIR.'/css/default.css';
}
?>