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


PHP Filter::setAdditionalCondition方法代码示例

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


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

示例1: auth

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

	$auth = new auth("SITEPAGE_MASTER");
	$page = new page("Sitepage-Master");

	$filter = new Filter("sitepage_master", "SPM_ID");
	$filter->addRule($lang->get("name"), "NAME", "NAME");
	$filter->addRule($lang->get("description"), "DESCRIPTION", "NAME");
	$filter->setAdditionalCondition("DELETED = 0 AND VERSION=0");
	$filter->setNewAction($c["docroot"]."modules/pagetemplate/sitepage_master.php");
	$filter->icon = "li_template.gif";
	$filter->type_name = "Templates";

	$filtermenu = new Filtermenu($lang->get("spm"), $filter);
	if ($oid!="") {
	  $title = getDBCell("sitepage_master", "NAME", "SPM_ID = $oid");
	} else {
	  $title = "";	
	}
	
	$form = new stdEDForm($lang->get("spm_edit")." - ".$title, "i_scheme.gif");
	$cond = $form->setPK("sitepage_master", "SPM_ID");
		
	if ($oid != "") {
		$form->addHeaderLink(crHeaderLink($lang->get("edit_spm", "Edit template properties"), "modules/pagetemplate/sitepage_master.php?sid=$sid&oid=$oid&go=update"));
		$filename = getDBCell("sitepage_master", "TEMPLATE_PATH", "SPM_ID = $oid");
		$form->add(new PHPEditor("phpedit", $filename, "standard"));
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:edit_template.php

示例2: getInformation

    }
    /**
     * Returns the configuration of the object on position 
     * @param integer Position of the object information is asked for
     */
    function getInformation($position)
    {
        global $lang;
        return $lang->get("ready_to_use", "Ready to use");
    }
}
$page = new page("Meta-Template Scheme");
$filter = new Filter("meta_templates", "MT_ID");
$filter->addRule($lang->get("name"), "NAME", "NAME");
$filter->setNewAction("meta.php");
$filter->setAdditionalCondition("INTERNAL = 0 AND VERSION=0");
$filter->icon = "li_meta.gif";
$filter->type_name = "Meta Templates";
$filtermenu = new Filtermenu($lang->get("metatemplates"), $filter);
$page->tipp = $lang->get("help_metatemp", "A meta template is used for defining which metadata fields need to go on a new page. When you create a new metadata field in the template, each new page based on that template will contain that field. ");
if (value("oid", "NUMERIC") != "0") {
    $form = new MetaTemplateForm($lang->get("mt_scheme"), "i_meta.gif");
    $form->width = '100%';
    $form->headerlink = crHeaderLink($lang->get('mt_properties'), 'modules/meta/meta.php?sid=' . $sid . '&oid=' . $oid . '&go=update');
    $form->define_home("meta_templates", "MT_ID", $oid);
    $form->define_item("meta_template_items", "MTI_ID", "NAME", "MT_ID", "MTYPE_ID");
    $form->define_new("meta_datatypes", "MTYPE_ID");
    $page->add($form);
}
$page->addMenu($filtermenu);
$page->draw();
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:metascheme.php

示例3: auth

	$auth = new auth("COMPOUND_GROUPS");
	
	if (strtoupper($go) != "UPDATE" || $oid == 0) {
		$db->close();

		header ("Location: " . $c["docroot"] . "modules/compoundgroup/compound_groups.php?sid=$sid&go=$go");
		exit;
	}
	
	
	$page = new page("Compound Groups");

	$filter = new Filter("compound_groups", "CGID");
	$filter->addRule($lang->get("name"), "NAME", "NAME");
	$filter->setAdditionalCondition("VERSION = 0");
	$filter->type_name = $lang->get("cp_group");;
	$filter->icon = "li_cggroup.gif";
	
	$filtermenu = new Filtermenu($lang->get("cp_group"), $filter);
	
	
	$name = getDBCell("compound_groups", "NAME", "CGID = $oid");
	$form = new stdEDForm($lang->get("ed_cpgroup", "Edit Compound Group").":".$name);
	$cond = $form->setPK("compound_groups", "CGID");
	if ($oid != "") {
		$form->headerlink = crHeaderLink($lang->get("ed_cpgroupgeneral", "Edit Group General"), "modules/compoundgroup/compound_groups.php?sid=$sid&oid=$oid&go=update");
	}
	$compoundClts = createDBCArray("cluster_templates", "CLT_ID", "CLT_TYPE_ID=1");
	if (count($compoundClts) > 0 ) {
		$members = createNameValueArrayEx("cluster_node", "NAME", "CLNID", "VERSION=0 AND CLT_ID IN (".implode(", ", $compoundClts).")", "ORDER BY NAME ASC");
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:30,代码来源:compound_group_members.php

示例4: auth

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

	require_once "configurator.php";

	$auth = new auth("USER_MANAGEMENT");
	$page = new page("Role Administration");

	$filter = new Filter("roles", "ROLE_ID");
	$filter->addRule($lang->get("role_name"), "ROLE_NAME", "ROLE_NAME");
	$filter->setAdditionalCondition("UPPER(ROLE_NAME) <> 'ADMINISTRATOR'");
	$filter->prevent_sysvar_disp = false;
	$filter->icon = "li_role.gif";
	$filter->type_name = "Roles";

	$filtermenu = new Filtermenu($lang->get("role_filtermenu"), $filter);
	$filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php");
	$filtermenu->addMenuEntry($lang->get("group_link"), "group_general.php");
	$filtermenu->addMenuEntry($lang->get("role_link"), "role_general.php");
	$filtermenu->tipp = "";
	//$filtermenu->addLink("test", "test.php");
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM roles where role_id=$oid AND role_id>999");
	$deleteHandler->addDbAction("DELETE FROM user_permissions where role_id=$oid AND role_id > 999");
	$deleteHandler->addDbAction("DELETE FROM role_sys_functions where role_id=$oid AND role_id > 999");

	if ($oid == 0) {
		$addtext = "";
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:role_general.php

示例5: auth

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

	$auth = new auth("VARIATIONS");
	$page = new page("Variations");

	$filter = new Filter("variations", "VARIATION_ID");
	$filter->prevent_sysvar_disp = false;
	$filter->addRule($lang->get("v_name"), "NAME", "NAME");
	$filter->addRule($lang->get("v_short"), "SHORTTEXT", "SHORTTEXT");
	$filter->setAdditionalCondition("DELETED=0");
	$filter->icon = "li_variation.gif";	

	$filtermenu = new Filtermenu($lang->get("variations"), $filter);
	include "menu.php";		
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("UPDATE variations SET DELETED=1 where variation_id=$oid and variation_id > 999");

	$form = new stdEDForm($lang->get("v_name", "Edit Language"), "i_variation.gif");
	$cond = $form->setExPK("variations", "VARIATION_ID");
	$form->add(new TextInput($lang->get("v_name"), "variations", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("v_short"), "variations", "SHORTTEXT", $cond, "type:text,width:40,size:5", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("description"), "variations", "DESCRIPTION", $cond, "type:textarea,width:300,size:4", ""));
	if ($oid==1)
	  $form->forbidDelete(true);
	$form->registerActionHandler($deleteHandler);
	$page->addMenu($filtermenu);
	$page->add($form);
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:variations.php

示例6: auth

<?php

require_once "../../config.inc.php";
$auth = new auth("CALENDAR_CREATE");
$page = new Page("Edit Calendars");
$selcal = new SelectMenu($lang->get("calendar_select", "Select Calendar"), "calsel", "pgn_cal_calendars", "NAME", "CALID", "1");
$filter = new Filter("pgn_cal_categories", "CATID");
$filter->addRule($lang->get("cat_name", "Category"), "NAME", "NAME");
$filter->setAdditionalCondition(" CALID=" . $selcal->selected . " AND CALID <> 0");
$filter->type_name = $lang->get("category", "Category");
$filtermenu = new Filtermenu("", $filter);
$filtermenu->addMenuEntry($lang->get("calendars_edit", "Edit Calendar"), "edit.php", "", "CALENDAR_EDIT");
$filtermenu->addMenuEntry($lang->get("calendars_define", "Define Calendars"), "calendars.php", "", "CALENDAR_CREATE");
$filtermenu->addMenuEntry($lang->get("calendars_cat_define", "Define Categories"), "categories.php", "", "CALENDAR_CREATE");
$deleteHandler = new ActionHandler("DELETE");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_calendars WHERE CATID = {$oid}");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_categories WHERE CATID = {$oid}");
if ($oid == 0) {
    $addtext = "";
} else {
    $addtext = ": " . getDBCell("pgn_cal_categories", "NAME", "CATID = " . $oid);
}
if ($selcal->selected != "0" && $selcal->selected != "-1") {
    $form = new stdEDForm($lang->get("category") . $addtext);
    $cond = $form->setExPK("pgn_cal_categories", "CATID");
    $nameInput = new TextInput($lang->get("name"), "pgn_cal_categories", "NAME", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE");
    $nameInput->setFilter("CALID = " . $selcal->selected);
    $form->add($nameInput);
    $form->add(new TextInput($lang->get("description"), "pgn_cal_categories", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
    $form->add(new TextInput($lang->get("color", "Color"), "pgn_cal_categories", "COLOR", $cond, "type:color,param:form1", ""));
    $form->add(new NonDisplayedValueOnInsert("pgn_cal_categories", "CALID", $cond, $selcal->selected, "NUMBER"));
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:categories.php

示例7: auth

<?php

require_once "../../config.inc.php";
$auth = new auth("CALENDAR_CREATE");
$page = new Page("Edit Calendars");
$selch = new SelectMenu($lang->get("channel_select", "Select Channel"), "chsel", "channels", "NAME", "CHID", "1");
$filter = new Filter("channel_categories", "CH_CAT_ID");
$filter->addRule($lang->get("cat_name", "Category"), "NAME", "NAME");
$filter->setAdditionalCondition(" CHID=" . $selch->selected . " AND CHID <> 0");
$filter->type_name = $lang->get("category", "Category");
$filter->icon = "li_categories.gif";
$filtermenu = new Filtermenu("", $filter);
include $c["path"] . "modules/channels/menu.inc.php";
if (strtoupper(value("deletion")) == "DELETE" && strtoupper(value("commit")) == "YES") {
    deleteChannelCategory(value("oid", "NUMERIC"));
}
if ($oid == 0) {
    $addtext = "";
} else {
    $addtext = ": " . getDBCell("channel_categories", "NAME", "CH_CAT_ID = " . $oid);
}
if ($selch->selected != "0" && $selch->selected != "-1" && $selch->selected != 0) {
    $form = new stdEDForm($lang->get("category") . $addtext);
    $cond = $form->setExPK("channel_categories", "CH_CAT_ID");
    $nameInput = new TextInput($lang->get("name"), "channel_categories", "NAME", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE");
    $nameInput->setFilter("CHID = " . $selch->selected);
    $form->add($nameInput);
    $form->add(new SitepageSelector($lang->get("outputpage", "Output Page", 'Page where the articles will be rendered to.'), 'channel_categories', 'PAGE_ID', $cond));
    $form->add(new NonDisplayedValueOnInsert("channel_categories", "CHID", $cond, $selch->selected, "NUMBER"));
    $page->add($form);
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:categories.php


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