<?php

require "../../config.inc.php";
$disableMenu = true;
$auth = new auth("OBJ_USAGE");
$page = new page("Object Usage");
// start processing
$oid = value("oid", "NUMERIC");
$objFolder = getDBCell("content", "CATEGORY_ID", "CID={$oid}");
//// ACL Check ////
$aclf = aclFactory($objFolder, "folder");
$aclf->load();
if (!$aclf->checkAccessToFunction("OBJ_USAGE")) {
    header("Location: " . $c["docroot"] . "modules/common/noaccess.php?sid={$sid}&guid={$pnode}");
}
//// ACL Check ////
$form = new Form("Object: " . $objectName, "");
$form->width = 250;
$form->add(new Label("lbl", "The object {$objectName} is used in following pages...", "informationheader", 2));
// Initializing Array
$clusters = array();
// Determine cluster_templates using the object as static content...
$sql = "SELECT CLT_ID FROM cluster_template_items WHERE FKID = {$oid}";
$query = new query($db, $sql);
while ($query->getrow()) {
    // Determine clusters using this template
    $sql = "SELECT CLNID FROM cluster_node WHERE CLT_ID = " . $query->field("CLT_ID");
    $subquery = new query($db, $sql);
    while ($subquery->getrow()) {
        array_push($clusters, $subquery->field("CLNID"));
    }
示例#2
0
<?php

require_once "../../config.inc.php";
$auth = new auth("B_LIVE_AUTHORING", false);
$page = value("page", "NUMERIC");
$menu = getDBCell("sitepage", "MENU_ID", "SPID={$page}");
//// ACL Check ////
$aclf = aclFactory($menu, "page");
$aclf->load();
if (!$aclf->hasAccess($auth->userId) || !$aclf->checkAccessToFunction("B_LIVE__AUTHORING")) {
    header("Location: " . $c["docroot"] . "modules/common/noaccess.php?sid={$sid}&guid={$pnode}");
}
//// ACL Check ////
$spm = getDBCell("sitepage", "SPM_ID", "SPID = {$page}");
$path = getDBCell("sitepage_master", "TEMPLATE_PATH", "SPM_ID = {$spm}");
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
	<head>
		<title>N/X Live Authoring</title>
	</head>

	<frameset border = 0 framespacing = 0 frameborder = 2 framespacing = 0 rows = "100%">
		<frame name = "content" src = "<?php 
echo $c["devdocroot"] . $path . "?page={$page}&v={$v}&sma=1&sid={$sid}";
?>
" scrolling = auto>
	</frameset>
</html>
	
	if ($action == "" && value("changevariation", "", "") != "") {
	  $action = value("acstate");
	  $clt = initValueEx("clt", "clt", "", "NUMERIC");
	}
	
	$go = value("go", "NOSPACES", "");
	$pnode = initValueEx("pnode", "pnode", "0", "NUMERIC");

	//// ACL Check ////
	$aclf = aclFactory($pnode, "folder");
	$aclf->load();
	if (! $aclf->hasAccess($auth->userId)) {
		$pnode = "0";
		delVar($pnode);
		$aclf = aclFactory(0, "folder");
		$aclf->load();
		if (! $aclf->hasAccess($auth->userId))
		   header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	}
	//// ACL Check ////

    $clnid = value("clnid");
    $oid = value("oid");
	$view = value("view", "NUMERIC");
	if ($clt != "")
	  pushVar("clt", $clt);

	if ($clnid == 0)
		$clnid = $oid;
	if ($oid == 0)
	 *	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";
	$content_MODULE_ID = getDBCell("content", "MODULE_ID", "CID = $oid");
	$variation = variation();
	$fkid = getDBCell("content_variations", "FK_ID", "VARIATION_ID = $variation AND CID = $oid AND DELETED=0");
	 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	 *	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_once "../../config.inc.php";

	$auth = new auth("B_DESTROY_TREE");
	$page = new page("Destroy Tree");
	@ini_set("max_execution_time", $c["timeout"]);

	$del = value("del","NUMERIC");
	//// ACL Check ////
	$aclf = aclFactory($del, "page");
	$aclf->load();
	if (! $aclf->checkAccessToFunction("B_DESTROY_TREE") || $del < 100000) {		
		header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	}
	//// ACL Check ////
	

	$go = value("go");

	if ($go == "0")
		$go = "start";

	$form = new CommitForm("Destroy Tree");

	$pageHandler = new ActionHandler("destroypages");
<?php

require_once $c["path"] . "api/userinterface/panels/acl_editor.php";
// Copyright 2003 by S.Weih
// $aclType must be set!!!!!
// $aclid must be set!!!!
// $aclPanel must exist!
//$debug = true;
if ($aclType != "") {
    $aclObject = aclFactory($aclid, $aclType);
    $aclObject->load();
    $aclPanel->add(new ACLEditor($aclObject, $title));
    // Special for Site-page editing
    if ($mpProp) {
        $aclPanel->add(new Hidden("acstate", "pproperties"));
    }
    $aclPanel->add(new Hidden("oid", $aclid));
    $aclPanel->add(new Hidden("view", $view));
    $aclPanel->add(new Hidden("processing", "yes"));
}
示例#7
0
	$sm = getDBCell("sitepage", "MENU_ID", "SPID=$source");
	
	if ($dest<1000) {
		$dm = 1;
	} else {
		$dm = getDBCell("sitepage", "MENU_ID", "SPID=$dest");
	}

	//// ACL Check ////
	$acl = aclFactory($dm, "page");
	$acl->load();
	
	if (! $acl->checkAccessToFunction("ROLLOUT")) {				   
		   header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	}
	$acl = aclFactory($sm, "page");
	$acl->load();
	if (! $acl->checkAccessToFunction("ROLLOUT")) {				   
		   header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	}
	//// ACL Check ////

 
 if ($dest=="0") {
 	$destMenu = "0";
 } else {
	$destMenu = getDBCell("sitepage", "MENU_ID", "SPID = $dest");
 }
 
 if ($source=="0") {
 	$sourceMenu = "0";
<?php

require "../../config.inc.php";
$disableMenu = true;
$auth = new auth("CL_USAGE");
$page = new page("Cluster Usage");
// start processing
$oid = value("oid", "NUMERIC");
$clt = getDBCell("cluster_node", "CLT_ID", "CLNID={$oid}");
$cat = getDBCell("cluster_templates", "CATEGORY_ID", "CLT_ID = {$clt}");
//// ACL Check ////
$aclf = aclFactory($cat, "folder");
$aclf->load();
if (!$aclf->hasAccess($auth->userId) || !$aclf->checkAccessToFunction("CL_USAGE")) {
    header("Location: " . $c["docroot"] . "modules/common/noaccess.php?sid={$sid}&guid={$pnode}");
}
//// ACL Check ////
$objectName = getDBCell("cluster_node", "NAME", "CLNID={$oid}");
$form = new Form("Cluster: " . $objectName, "");
$form->width = 250;
$form->add(new Label("lbl", "The cluster {$objectName} is used in following pages...", "informationheader", 2));
// Initializing Array
$clusters = array($oid);
//echo "USED:".count($usedPageClusters)." UNUSED:".count($unusedPageClusters);
//echo " ALL CLUSTERS:".count($clusters);
// now find all clusters recursive that contain the unused values...
function parentClusters($clArray, $level = 0)
{
    $clnids = array();
    if ($level > 5) {
        return $clnids;
		/**
		 * Build Sitemap structure
		 * @param $startnode Reference to the latest node.
		 * @param $parentId ID of the the page where to start with
		 */
		function buildSitemap(&$startnode, $parentId, $spmType="1", $isLocked=0) {
			global $db, $sid, $lang, $variation;
			
			// define icons
			$red = "site_red.gif";
			$green = "site_green.gif";
			$yellow = "site_yellow.gif";
			$siteadd = "site_add.gif";
			$folder = "folder.gif";
			$expandedfolder = "folder-expanded.gif";
			
			// Add new Funktion					
			if ($isLocked != 1) {
				$acl = 	$aclf = aclFactory($parentId, "page");
				$acl->load();				
				
				if ( $acl->checkAccessToFunction("ADD_SITEPAGE") && ($spmType == "1" || $parentId=="0")) {
				  $node = &$startnode->addItem(new HTML_TreeNode(array (
					'text' => $lang->get("sp_newpage"),
					'class' => "treemenu",
					'link' => $this->action . "?sid=$sid&mid=" . $parentId . "&action=newpage&go=insert",
					'icon' => $siteadd,
					'expandedIcon' => $siteadd,
					isDynamic => true
				  )));				
				}
			}
			
			// build tree
			$sql = "SELECT s.MENU_ID, s.NAME, s.IS_LOCKED, m.SPMTYPE_ID, sp.SPID FROM  sitepage_master m, sitemap s LEFT JOIN sitepage sp ON s.MENU_ID = sp.MENU_ID AND sp.POSITION < 2 WHERE s.DELETED=0 AND s.SPM_ID = m.SPM_ID AND s.VERSION=0 AND s.PARENT_ID = " . $parentId . " ORDER BY s.POSITION ASC";
			$query = new query($db, $sql);
			
			while ($query->getrow()) {
				$id = $query->field("MENU_ID");
				$type = $query->field("SPMTYPE_ID");
				$name = $query->field("NAME");
				$locked = $query->field("IS_LOCKED");
				$spid = $query->field("SPID");				
				if ($spid != "") {
                				if ($type == 1) {							
                					$href =  $this->action . "?sid=$sid&mid=" . $id . "&oid=$spid&go=update&action=editobject";
                					if (isSPVarLiveEx($spid, $variation)) {
                						$icon = $green;
                						$expandedicon = $green;
                					} else {
                					  	$icon = $red;
                					  	$expandedicon = $red;	
                					}
                				} else if ($type == 2 || $type == 3) {	
                					$icon = $folder;
                					$expandedicon = $folderexpanded;
                					$href =  $this->action . "?sid=$sid&mid=" . $parentId . "&oid=$id&action=pproperties&view=1";
                				}
                	
                				$acl = 	$aclf = aclFactory($id, "page");
                				$acl->load();						
                				if (   ($acl->checkAccessToFunction("SET_PAGE_ACCESS")
                		 			|| $acl->checkAccessToFunction("EDIT_CONTENT")
                		 			|| $acl->checkAccessToFunction("EDIT_META_DATA")
                		 			|| $acl->checkAccessToFunction("SITEPAGE_PROPS")
                		 			|| $acl->checkAccessToFunction("MENU"))) {
                		 
                					$node = &$startnode->addItem(new HTML_TreeNode(array (
                						'text' => $name,
                						'class' => "treemenu",
                						'link' => $href,
                						'icon' => $icon,
                						'expandedIcon' => $expandedicon,
                						isDynamic => true
                					)));				
                				
                					if ($type == 1) {
                				  		$this->buildSitemap($node, $id, $type, $locked);
                					} else if ($type==2 || $type == 3) {
                						$this->buildInstances($node, $id, $locked);	
                					}
                			}
				}
			}
		}
			$form = new MessageForm($lang->get("not_found", "Sorry, I found nothing"), $lang->get("pnf", "The page with the ID you entered was not found."), $c["docroot"] . "modules/sitepages/sitepagebrowser.php?sid=$sid");
			$page->add($form);
			$page->draw();
			$db->close();
			exit;
		}
	}
	
	
	//// ACL Check ////
	$aclf = aclFactory($mid, "page");
	$aclf->load();
	if (! $aclf->hasAccess($auth->userId)) {		
		$mid="0";
		pushVar("mid", "0");
		$aclf = aclFactory(0, "page");
		$aclf->load();		
		if (! $aclf->hasAccess($auth->userId)) 
		   
		   header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	}
	//// ACL Check ////
	
	if ( ! ($aclf->checkAccessToFunction("SET_PAGE_ACCESS")
		 || $aclf->checkAccessToFunction("EDIT_CONTENT")
		 || $aclf->checkAccessToFunction("EDIT_META_DATA")
		 || $aclf->checkAccessToFunction("SITEPAGE_PROPS")
		 || $aclf->checkAccessToFunction("MENU"))) {
		   header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");			
	}