当前位置: 首页>>代码示例>>PHP>>正文


PHP auth::checkAccessToFunction方法代码示例

本文整理汇总了PHP中auth::checkAccessToFunction方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::checkAccessToFunction方法的具体用法?PHP auth::checkAccessToFunction怎么用?PHP auth::checkAccessToFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在auth的用法示例。


在下文中一共展示了auth::checkAccessToFunction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteChannel

require_once $c["path"] . "modules/channels/menu.inc.php";
if (strtoupper(value("deletion")) == "DELETE" && strtoupper(value("commit")) == strtoupper($lang->get("YES"))) {
    deleteChannel(value("oid", "NUMERIC"));
}
if ($page_action == "INSERT") {
    $oid = 0;
}
if ($oid == 0) {
    $addtext = "";
} else {
    $addtext = ": " . getDBCell("channels", "NAME", "CHID = " . $oid);
}
$form = new stdEDForm($lang->get("channel", "Channel") . $addtext);
$cond = $form->setExPK("channels", "CHID");
// Add a Toolbar for showing the launch button
if ($auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
    $form->buttonbar->add("action", $lang->get("launch"));
    $form->add(new Hidden("action", ""));
    if (value("action") == $lang->get("launch")) {
        launchChannel($oid);
        if ($errors == "") {
            $form->addToTopText($lang->get("chnlaunched", "The channel was launched successfully."));
            $form->topicon = "ii_success.gif";
        } else {
            $form->addToTopText($lang->get("chnlaunchederr", "An error occured while launching the channel."));
            $form->topicon = "ii_error.gif";
        }
        $page_action = "UPDATE";
        $go = "update";
        $processing = "no";
        $page_state = "start";
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:channels.php

示例2: auth

<?php

require_once "../../config.inc.php";
$auth = new auth("CHANNEL_EDIT");
$page = new Page("Edit Channels");
require_once $c["path"] . "modules/channels/article_select_form.php";
if (value("action") == "deletearticle" && $auth->checkAccessToFunction("CHANNEL_DELETE")) {
    $article = value("article", "NUMERIC");
    deleteArticle($article);
}
if (value("action") == "launcharticle" && $auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
    $article = value("article", "NUMERIC");
    launchArticle($article, 10, variation());
}
if (value("action") == "expirearticle" && $auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
    $article = value("article", "NUMERIC");
    expireArticle($article, 10, variation());
}
$selch = new SelectMenu($lang->get("channel_select", "Select Channel"), "chsel", "channels", "NAME", "CHID", "1");
$lang->delete("help_articles");
$selch->tipp = $lang->get("help_articles", "The form displays articles.<br><br>The color codes are:<li>red: article not published<li>grey: article not translated<li>green: article published");
$rowOrderFilter = "VERSION=0 AND CHID=" . $selch->selected;
if (value("action") == "up") {
    $article = value("article", "NUMERIC");
    moveRowUp("channel_articles", "ARTICLE_ID", $article, "POSITION", $rowOrderFilter);
} else {
    if (value("action") == "down") {
        $article = value("article", "NUMERIC");
        moveRowDown("channel_articles", "ARTICLE_ID", $article, "POSITION", $rowOrderFilter);
    }
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:overview.php

示例3: auth

require_once "../../config.inc.php";
$auth = new auth("CHANNEL_EDIT");
$aclf = $auth;
// no acls present yet.
$page = new Page("Edit Channels");
require_once $c["path"] . "modules/channels/article_select_form.php";
$oid = value("oid", "NUMERIC");
$clnid = $oid;
$action = value("action");
if (value("setch", "NUMERIC") != "0") {
    pushVar("chsel", value("setch", "NUMERIC"));
}
$chid = getVar("chsel");
$variation = variation();
if (value("laction") == $lang->get("ar_launch") && $auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
    launchArticle($oid, 10, $variation);
} else {
    if (value("laction") == $lang->get("ar_expire") && $auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
        expireArticle($oid, 10, $variation);
    }
}
if ($action == "createarticle") {
    $go = "CREATE";
    $page_action = "INSERT";
    $form = new stdEDForm($lang->get("create_article", "Create new Article in channel") . " " . getDBCell("channels", "NAME", "CHID = " . $chid), "");
    $cond = $form->setPK("channel_articles", "ARTICLE_ID");
    $oname = new TextInput($lang->get("name"), "channel_articles", "TITLE", $cond, "type:text,width:300,size:64", "MANDATORY");
    $form->add($oname);
    $form->add(new SelectOneInput($lang->get("template"), "channel_articles", "CLT_ID", "cluster_templates, channel_cluster_templates", "NAME", "channel_cluster_templates.CLT_ID AS CLT", "cluster_templates.CLT_ID = channel_cluster_templates.CLT_ID AND channel_cluster_templates.CHID = {$chid} ORDER BY POSITION ASC", $cond, "TYPE:DROPDOWN", "MANDATORY"));
    $form->add(new SelectOneInput($lang->get("category"), "channel_articles", "CH_CAT_ID", "channel_categories", "NAME", "CH_CAT_ID", "CHID = {$chid}", $cond, "type:dropdown", "MANDATORY"));
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:30,代码来源:edit.php

示例4: ActionHandler

	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDBAction("UPDATE sitepage_master SET DELETED=1 WHERE SPM_ID = $oid");
	$deleteHandler->addDBAction("UPDATE sitepage SET DELETED=1 WHERE SPM_ID = $oid");
	$deleteHandler->addDBAction("UPDATE sitemap SET DELETED = 1 WHERE SPM_ID = $oid");
	$deleteHandler->addDBAction("DELETE FROM sitepage_variations WHERE SPM_ID = $oid");
	if ($oid!="") {
	  $title = getDBCell("sitepage_master", "NAME", "SPM_ID = $oid");
	} else {
	  $title = "";	
	}
	$action = value("action");
	
	$form = new stdEDForm($lang->get("spm_edit")." - ".$title, "i_scheme.gif");
	$cond = $form->setPK("sitepage_master", "SPM_ID");
	if ($auth->checkAccessToFunction("B_RELAUNCH_INST")) {
	  $form->buttonbar->add("action", $lang->get("spm_rlaunch", "Refresh instances"), "submit", "", "", true, $lang->get("tt_refresh", "Refresh Instances updates the changes made to a template to cached pages."));
	}
	
	// process action...
	if ($action == $lang->get("spm_rlaunch", "Refresh instances") && $auth->checkAccessToFunction("B_RELAUNCH_INST")) {
		$go = "update";

		$processing = "no";
		$page_action = "UPDATE";
		$page_state = "start";
		relaunchPagesBySPM (value("oid", "NUMERIC"));

		if ($errors == "") {
			$form->addToTopText($lang->get("spm_lauch_success", "The pages based on this master were relaunched successfully.<br>"));
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:30,代码来源:sitepage_master.php


注:本文中的auth::checkAccessToFunction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。