$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 ////
	$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;
<?
	/**********************************************************************
	 *@module Application
	 **********************************************************************/
	
	//// ACL Check ////
	if (! $aclf->hasAccess($auth->userId))
	  header("Location: ". $c["docroot"]."modules/common/noaccess.php?sid=$sid&guid=$pnode");
	//// ACL Check ////

	// process object actions.
	$linkset = value("linkset");
	$filter = value("filter");
	$handled = false;
	if (value('resetfilter', 'NUMERIC', '0') == '1') 
	  delVar('linkset');
	if ($action != "0" || $view != "0") {
		
		
		//check if cluster exists in this variation
		if ($clnid != "0") {
			if ($action == "cr_cluster" && value("decision") == $lang->get("yes")) {
			  $oid = value("oid", "NUMERIC");
			  $crvar = value("crvar", "NUMERIC");	
  			  if ($oid != "0" && $crvar != "0") {
			    if (getDBCell("cluster_variations", "CLID", "CLNID = $oid AND VARIATION_ID = $crvar") != "") {
			      $sql = "UPDATE cluster_variations SET DELETED=0 WHERE CLNID = $oid AND VARIATION_ID = $crvar"; 	
			      $query = new query($db, $sql);
			      $query->free(); 
			    } else {
			      createCluster($oid, $crvar, $auth->userName);
	}

	$page = new page("Object Browser");
	$page->setJS("TREE");
	$page->setJS("FCKLIB");
	// Reset Filter
	
	// initialize variables
	$action = value("action");
	$handled = false;
	$pnode = initValueEx("pnode", "pnode", "0", "NUMERIC");
	//// ACL Check ////
	$aclf = aclFactory($pnode, "folder");
	$aclf->load();
	if (! $aclf->hasAccess($auth->userId)) {
		delVar("pnode");	
		$pnode="0";	
		$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 ////
	
	
	$browser = new Foldermenu($lang->get("library", "Library"));
	$browser->action = $c["docroot"] . "modules/content/objectbrowser.php";
	$browser->tipp = $lang->get("help_objbrowse", "Content library contains all content material of the site");
	$page->addMenu($browser);
	require_once $c["path"] . "modules/common/folder_logic.inc.php";
	require_once $c["path"] . "modules/content/object_logic.inc.php";
示例#4
0
	/**
	 * Pops a Variable form the variable stack.
	 * @param string name of the variable
	 * @returns variant Value of the variable.
	 */
	function popVar($name) {
		$back = getVar($name);

		delVar ($name);
		return $back;
	}
	 *	(at your option) any later version.
	 *
	 *	N/X is distributed in the hope that it will be useful,
	 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
	 *	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 "../../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
	 ************************************************************************************/