$updateHandler = new ActionHandler("UPDATE");
	$updateHandler->addFNCAction("syncSPMVariations");

	$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 == "") {
	// initialize
	$action = value("action");
	$oid = value("oid", "NUMERIC");
	$deleteobject = value("deleteobject");
	
    $forward = "";
	// processing page actions
	if ($action != "0") {
		if ($action == $lang->get("new_folder") && $auth->checkAccessToFunction("NEW_FOLDER")) {
			if (value("go") == "0")
				$go = "insert";

			if ($go == "insert")
				$page_action = "INSERT";

			$form = new stdEDForm($lang->get("r_newfolder"), "i_newfolder.gif");
			$cond = $form->setPK("categories", "CATEGORY_ID");
			$catname = new TextInput($lang->get("r_foldername"), "categories", "CATEGORY_NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE");
			$catname->setFilter("PARENT_CATEGORY_ID = $pnode");
			$form->add($catname);
			$form->add(new Hidden("action", $lang->get("new_folder")));
			$form->add(new Hidden("pnode", $pnode));
			$form->add(new NonDisplayedValueOnInsert("categories", "PARENT_CATEGORY_ID", $cond, $pnode, "NUMBER"));
			$form->add(new NonDisplayedValueOnInsert("categories", "DELETED", $cond, 0, "NUMBER"));
			$form->forbidDelete(true);
			$page->add($form);
			$handled = true;
			$forward = doc();
		} else if ($action == $lang->get("del_folder") && $auth->checkAccessToFunction("DELETE_FOLDER") && $pnode != "0") {
			if (!isset($go))
				$go = "start";
Exemplo n.º 3
0
<?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_calendars", "CALID");
$filter->addRule($lang->get("cal_name", "Calendar Name"), "NAME", "NAME");
$filter->type_name = $lang->get("calendars", "Calendars");
$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");
$filtermenu->tipp = $lang->get("calendars_tipp", "You can create several calendars here. Each calendar will have its own events and dates.");
$deleteHandler = new ActionHandler("DELETE");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_calendars WHERE CALID = {$oid}");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_appointment WHERE CALID = {$oid}");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_categories WHERE CALID = {$oid}");
if ($oid == 0) {
    $addtext = "";
} else {
    $addtext = ": " . getDBCell("pgn_cal_calendars", "NAME", "CALID = " . $oid);
}
$form = new stdEDForm($lang->get("calendar", "Calendar") . $addtext);
$cond = $form->setExPK("pgn_cal_calendars", "CALID");
$form->add(new TextInput($lang->get("name"), "pgn_cal_calendars", "NAME", $cond, "type:text,width:200,size:64", "MANDATORY&UNIQUE"));
$form->registerActionHandler($deleteHandler);
$page->addMenu($filtermenu);
$page->add($form);
$page->draw();
Exemplo n.º 4
0
$filter->icon = "li_channel.gif";
$filtermenu = new Filtermenu("", $filter);
$filtermenu->tipp = $lang->get("help_channel", "Topic categories defining the contents of articles created by N/X. i.e. News, Persons ");
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";
Exemplo n.º 5
0
	$page->setJS("md5");
	
	$filter = new Filter("auth_user", "user_id");
	$filter->addRule($lang->get("email"), "email", "email");

	$filter->icon = "li_user.gif";
	$filter->type_name = "Users";

	$filtermenu = new Filtermenu($lang->get("user_filtermenu"), $filter);
	$filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php", "user_premissions.php");
	
	
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM auth_user where user_id=$oid and user_id > 999");
	
	$form = new stdEDForm($lang->get("user_head"), "i_myprofile.gif");
	$form->submitButtonAction = "if (document.form1.auth_user_password_1.value != '') document.form1.auth_user_password_1.value = document.form1.auth_user_password_2.value = hex_md5(document.form1.auth_user_password_1.value);";

	$cond = $form->setPK("auth_user", "user_id");
	
	$form->add(new TextInput($lang->get("email"), "auth_user", "email", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("password"), "auth_user", "password", $cond, "type:text,width:200,size:40", "MANDATORY"));
	$form->add(new CheckboxInput($lang->get("user_active"), "auth_user", "active", $cond, "1", "0"));
	$form->add(new TextInput($lang->get("confirmcode", "Confirm-Code"), "auth_user", "confirm", $cond, "type:text,width:300,size:40", "MANDATORY&UNIQUE"));
	// Control Information
	$form->add(new NonDisplayedValueOnInsert("auth_user", "registration_date", $cond, "NOW()", "TIMESTAMP"));
	$form->registerActionHandler($deleteHandler);	

	$page->addMenu($filtermenu);
	$page->add($form);
	$page->drawAndForward("modules/communitylogin/user_general.php?sid=$sid&go=update&oid=<oid>");
Exemplo n.º 6
0
	$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"));
	}

	$form->forbidDelete(true);

	$page->addMenu($filtermenu);
	$page->add($form);
	$page->draw();
	$db->close();
?>
		if ($action == "launch" && $aclf->checkAccessToFunction("OBJECT_LAUNCH")) {
			launchContent($oid, 10, $variation);
			if ($errors == "") {
				$topText = $lang->get("objlaunch_success", "The object was successfully launched.");
			}	
		}
		
		if ($action == $lang->get("new_content") && $aclf->checkAccessToFunction("NEW_OBJECT")) {
			$handled = true;

			if (!isset($go) || $go == "0")
				$go = "insert";

			if ($go == "insert")
				$page_action = "INSERT";
			$form = new stdEDForm($lang->get("o_new"), "i_edit.gif");
			$cond = $form->setPK("content", "CID");
			$oname = new TextInput($lang->get("o_name"), "content", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE");
			$oname->setFilter("CATEGORY_ID = $pnode");
			$form->add($oname);
			$form->add(new SelectOneInput($lang->get("type"), "content", "MODULE_ID", "modules", "MODULE_NAME", "MODULE_ID", "MODULE_TYPE_ID=1", "1", "type:dropdown", "MANDATORY"));
			$form->add(new SelectMultiple2Input($lang->get("variations"), "content_variations", "VARIATION_ID", "1", "variations", "NAME", "VARIATION_ID", "DELETED=0"));
			$form->add(new SelectOneInput($lang->get("metatemplate"), "content", "MT_ID", "meta_templates", "NAME", "MT_ID", "INTERNAL=0 AND VERSION=0", "1", "type:dropdown", "MANDATORY"));
			$form->add(new TextInput($lang->get("description"), "content", "DESCRIPTION", $cond, "type:textarea, width:300,size:3", ""));
			$form->add(new TextInput($lang->get("keywords"), "content", "KEYWORDS", $cond, "type:textarea, width:300,size:3", ""));
			$form->add(new Hidden("action", "newobject"));
			$form->add(new NonDisplayedValueOnInsert("content", "CATEGORY_ID", $cond, $pnode, "NUMBER"));
			$form->add(new NonDisplayedValueOnInsert("content", "CREATED", $cond, "", "TIMESTAMP"));
			$form->add(new NonDisplayedValue("content", "LAST_MODIFIER", $cond, $auth->user, "TEXT"));
			$form->add(new NonDisplayedValue("content", "LAST_MOD_DATE", $cond, "", "TIMESTAMP"));
			$form->add(new NonDisplayedValueOnInsert("content", "DELETED", $cond, 0, "NUMBER"));
Exemplo n.º 8
0
 *    the Free Software Foundation; either version 2 of the License, or
 *    (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_once "../../config.inc.php";
$auth = new auth("ADMINISTRATOR");
$page = new Page("Edit Link");
$form = new stdEDForm($lang->get("edlink", "Edit Link"));
$cond = $form->setPK("pgn_linkexchange", "ID");
$form->addHeaderLink(crHeaderLink($lang->get("back"), "plugin/linkexchange/overview.php?sid=" . $sid));
$form->add(new TextInput($lang->get("title", "Title"), "pgn_linkexchange", "TITLE", $cond, "type:text,size:128,width:300", "MANDATORY"));
$form->add(new TextInput($lang->get("url", "URL"), "pgn_linkexchange", "URL", $cond, "type:url,size:256,width:300", "MANDATORY"));
$form->add(new TextInput($lang->get("backlink", "Backlink"), "pgn_linkexchange", "RECIPROCALURL", $cond, "type:url,size:256,width:300", ""));
$form->add(new TextInput($lang->get("email"), "pgn_linkexchange", "EMAIL", $cond, "type:text,size:256,width:300", ""));
$form->add(new SitepageSelector('Page', 'pgn_linkexchange', 'SOURCEID', $cond, "", "", "NUMBER", true));
$form->add(new CheckboxTxtInput($lang->get("approved", "Approved"), "pgn_linkexchange", "APPROVED", $cond));
$form->add(new TextInput($lang->get("description"), "pgn_linkexchange", "DESCRIPTION", $cond, "type:textarea,size:5,width:300", ""));
$form->add(new TextInput($lang->get("Keywords"), "pgn_linkexchange", "KEYWORDS", $cond, "type:textarea,size:5,width:300", ""));
$form->add(new NonDisplayedValueOnInsert("pgn_linkexchange", 'INSERTTIMESTAMP', $cond, getdate()));
$deleteHandler = new ActionHandler("DELETE");
$deleteHandler->addDbAction("DELETE FROM pgn_linkexchange WHERE ID={$oid} ");
$form->registerActionHandler($deleteHandler);
$page->add($form);
Exemplo n.º 9
0
	$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);
	
	$deleteHandler = new ActionHandler("DELETE");
	// add update action for referenced meta-templates!!!
	$deleteHandler->addDbAction("DELETE FROM meta_templates where MT_ID=$oid and MT_ID > 999");
	$deleteHandler->addDbAction("DELETE FROM meta_template_items where MT_ID=$oid and MT_ID>999");

	$form = new stdEDForm($lang->get("mt_properties"), "i_meta.gif");
	$cond = $form->setPK("meta_templates", "MT_ID");
	$form->add(new TextInput($lang->get("name"), "meta_templates", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("description"), "meta_templates", "DESCRIPTION", $cond, "type:textarea,width:300,size:4", ""));
	$form->registerActionHandler($deleteHandler);
	//check, if deletion is alowed or not.
	$amount = countRows("cluster_templates", "MT_ID", "MT_ID = $oid");
	$amount += countRows("content", "MT_ID", "MT_ID = $oid");

	if ($amount > 0)
		$form->forbidDelete(true);

	if ($page_action == 'UPDATE' || $page_action == "DELETE" || ($page_action=="INSERT" && $page_state == 'processing' && $errors == "")) {
		$form->headerlink = crHeaderLink($lang->get('mt_scheme', 'Edit Scheme'), 'modules/meta/metascheme.php?sid='.$sid.'&oid=<oid>&go=update');
	}
				$form->add(new Label("lbl", $lang->get("newname", "New Name"), "standardlight"));
				$form->add(new Input("copyname", "Cluster Template", "standard"));
				$form->add(new Hidden("action", $lang->get("createcopy")));
				$form->add(new Hidden("oid", $oid));
				$form->add(new Hidden("prcstate", "data"));
				$form->forbidDelete(true);				
				$page->add($form);
			}
		}
			
		/** Create a new object **/
		if ($action == "newobject" && $aclf->checkAccessToFunction("NEW_CL_TEMP")) {
			if ($go == "insert")
				$page_action = "INSERT";

			$form = new stdEDForm($lang->get("clt_new"), "i_scheme.gif");
			$cond = $form->setPK("cluster_templates", "CLT_ID");
			$oname = new TextInput($lang->get("clt_name"), "cluster_templates", "NAME", $cond, "type:text,width:300,size:32", "MANDATORY&UNIQUE");
			$oname->setFilter("CATEGORY_ID = $pnode");
			$form->add($oname);
			$form->add(new SelectOneInput($lang->get("metatemplate"), "cluster_templates", "MT_ID", "meta_templates", "NAME", "MT_ID", "INTERNAL=0 AND VERSION=0", "1", "type:dropdown,width:300", "MANDATORY"));
			$form->add(new TextInput($lang->get("description"), "cluster_templates", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
			$tempbox = new CheckboxTxtInput($lang->get("is_compound","Compound Cluster with own Layout" ), "cluster_templates", "CLT_TYPE_ID", $cond, "1", "0");
			$tempbox->setJSPayload("onClick='toggle(\"templ\");'");
			$form->add($tempbox);
			$show = ' style="display:none;" ';
			$form->add(new IDWrapper("templ", new TextInput($lang->get("template", "Template"), "cluster_templates", "TEMPLATE", $cond, "type:textarea,width:400,size:20") ,"embedded", $show,2));	
						
			$form->add(new Hidden("action", "newobject"));
			$form->add(new NonDisplayedValueOnInsert("cluster_templates", "CATEGORY_ID", $cond, $pnode, "NUMBER"));
			$form->add(new NonDisplayedValueOnInsert("cluster_templates", "DELETED", $cond, 0, "NUMBER"));
Exemplo n.º 11
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("ADMINISTRATOR|DEVELOPER");
	$page = new page("Global Values");

	$filter = new Filter("global", "G_ID");
	$filter->addRule("Key", "NAME", "NAME");

	$filtermenu = new Filtermenu("Global Values", $filter);
	$filtermenu->addMenuEntry("Edit Values", "global.php");

	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM global where g_id=$oid and g_id > 999");

	$form = new stdEDForm("Edit Values", "i_user.gif");
	$cond = $form->setPK("global", "G_ID");
	$form->add(new TextInput("Key", "global", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput("Value", "global", "VALUE", $cond, "type:textarea,width:300,size:4", ""));
	$form->registerActionHandler($deleteHandler);

	$page->addMenu($filtermenu);
	$page->add($form);
	$page->draw();
?>
	$filter->addRule($lang->get("user_email"), "EMAIL", "EMAIL");
	$filter->icon = "li_user.gif";
	$filter->type_name = "Users";

	$filtermenu = new Filtermenu($lang->get("user_filtermenu"), $filter);
	$filtermenu->addMenuEntry($lang->get("user_link"), "user_general.php", "user_permissions.php");
	$filtermenu->addMenuEntry($lang->get("group_link"), "group_general.php");
	$filtermenu->addMenuEntry($lang->get("role_link"), "role_general.php");

	if ($oid == 0) {
		$addtext = "";
	} else {
		$addtext = ": " . getDBCell("users", "USER_NAME", "USER_ID = " . $oid);
	}

	$form = new stdEDForm($lang->get("userperm_head", "Edit user permissions"). $addtext, "i_myprofile.gif");
	$cond = $form->setPK("users", "USER_ID");

	if ($oid != "") {
		$form->headerlink = crHeaderLink($lang->get("user_general", "Edit general user data"), "modules/user/user_general.php?sid=$sid&oid=$oid&go=update");
	}

	// User Permissions
	$groups = createNameValueArray("groups", "GROUP_NAME", "GROUP_ID", "1");
	$roles = createNameValueArray("roles", "ROLE_NAME", "ROLE_ID", "1");

	$headlines = array (
		"head1" => $lang->get("acl_groups", "Select Group to add"),
		"head1_selected" => $lang->get("acl_groupedit", "Select group to edit roles"),
		"head2_selected" => $lang->get("acl_role", "Select roles for group")
	);
Exemplo n.º 13
0
$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);
}
$page->addMenu($selch);
$page->addMenu($filtermenu);
$page->draw();
Exemplo n.º 14
0
 *    the Free Software Foundation; either version 2 of the License, or
 *    (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_once "../../config.inc.php";
$auth = new auth("ADDRESS");
$page = new Page("Edit Contacts");
$form = new stdEDForm($lang->get("edcontact", "Edit contact"));
$cond = $form->setPK("address", "GGUID");
$form->addHeaderLink(crHeaderLink($lang->get("back"), "modules/address/overview.php?sid=" . $sid));
$form->add(new Subtitle("st", $lang->get("personal_information", "Personal Information")));
if ($page_action != "CREATE") {
    $form->add(new DisplayedValue($lang->get("nr", "NO"), "address", "GGUID", $cond));
}
$form->add(new TextInput($lang->get("adrletter", "Salutation"), "address", "AddressLetter", $cond, "type:text,size:64,width:200", ""));
$form->add(new TextInput($lang->get("name", "Name"), "address", "Name", $cond, "type:text,size:64,width:200", "MANDATORY"));
$form->add(new TextInput($lang->get("firstname", "Firstname"), "address", "Firstname", $cond, "type:text,size:64,width:200", ""));
$form->add(new TextInput($lang->get("email", "E-Mail"), "address", "MailAddress", $cond, "type:text,size:128,width:200", ""));
$form->add(new DateInput($lang->get("birthday", "Birthday"), "address", "Birthday", $cond));
$form->add(new Spacer(2));
$form->add(new Subtitle('st', $lang->get("company", "Company")));
$form->add(new TextInput($lang->get("compname", "Company Name"), "address", "Company", $cond, "type:text,size:64,width:200", ""));
$form->add(new Spacer(2));
Exemplo n.º 15
0
$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 CALID = {$oid}");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_appointments WHERE CALID = {$oid}");
$deleteHandler->addDbAction("DELETE FROM pgn_cal_categories WHERE CALID = {$oid}");
$oid = value("oid", "NUMERIC");
if ($selcal->selected != "0" && $selcal->selected != "-1") {
    if ($oid == "0" && $page_action != "INSERT") {
        $form = new MenuForm($lang->get("sel_event", "Select Event or Appointment"), array($lang->get("startdate", "Startdate"), $lang->get("starttime", "Starttime"), $lang->get("title", "Title")), "pgn_cal_appointment", "APID", array("STARTDATE", "STARTTIME", "TITLE"), "CALID=" . $selcal->selected);
        $form->newAction = "plugin/calendar/edit.php?sid={$sid}&go=create";
    } else {
        $deleteHandler = new ActionHandler("DELETE");
        $deleteHandler->addDbAction("DELETE FROM pgn_cal_appointment WHERE APID = {$oid}");
        $addtext = ": " . getDBCell("pgn_cal_appointment", "TITLE", "APID = " . $oid);
        $form = new stdEDForm($lang->get("cal_edit", "Edit Appointment") . $addtext);
        $form->addHeaderLink(crHeaderLink('Back', "plugin/calendar/edit.php?sid={$sid}"));
        $cond = $form->setExPK("pgn_cal_appointment", "APID");
        $form->add(new TextInput($lang->get("title"), "pgn_cal_appointment", "TITLE", $cond, "type:text,width:300,size:64", "MANDATORY"));
        $form->add(new RichEditInput($lang->get("description"), "pgn_cal_appointment", "DESCRIPTION", $cond, "type:rich,width:350,size:6", ""));
        $form->add(new DateInput($lang->get("startdate"), "pgn_cal_appointment", "STARTDATE", $cond, "param:form1", "MANDATORY"));
        $form->add(new TimeInput($lang->get("starttime"), "pgn_cal_appointment", "STARTTIME", $cond));
        $form->add(new DateInput($lang->get("endate"), "pgn_cal_appointment", "ENDDATE", $cond, "param:form1", "MANDATORY"));
        $form->add(new TimeInput($lang->get("endtime"), "pgn_cal_appointment", "ENDTIME", $cond));
        $form->add(new SelectOneInput($lang->get("category"), "pgn_cal_appointment", "CATID", "pgn_cal_categories", "NAME", "CATID", "CALID = " . $selcal->selected, $cond));
        $form->add(new NonDisplayedValueOnInsert("pgn_cal_appointment", "CALID", $cond, $selcal->selected, "NUMBER"));
        $form->add(new SubTitle("st", $lang->get("Report", "Veranstaltungsbericht"), 3));
        $form->add(new RichEditInput($lang->get("report"), "pgn_cal_appointment", "REPORT", $cond, "type:rich,width:350,size:6", ""));
        $form->add(new PluginInput("", "pgn_cal_appointment", "GALLERY", $cond, "GALLERY", $form));
        $form->registerActionHandler($deleteHandler);
    }
Exemplo n.º 16
0
$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"));
    $form->registerActionHandler($deleteHandler);
    $page->add($form);
}
$page->addMenu($selcal);
$page->addMenu($filtermenu);
$page->draw();
echo $errors;
	}
	
	
	$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");
	} else {
		$members = array();	
	}
	$form->add(new SelectMultipleInputPos($lang->get("cpg_members_select", "Select members of this compound group"), $members, "compound_group_members", "CGMID", "CGID", $cond, "cluster_node", "CLNID", "NAME", "standardlight", 2));
	$form->forbidDelete(true);
	$page->addMenu($filtermenu);
	$page->add($form);
	$page->draw();
Exemplo n.º 18
0
	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);
	$page->tipp = $lang->get("help_variation", "Content may have different variations. So variations can be languages or different profiles of content.");
	$page->draw();
	$db->close();
?>
Exemplo n.º 19
0
	$deleteHandler->addDbAction("DELETE FROM temp_vars where user_id=$oid and user_id > 999");
	$deleteHandler->addDbAction("DELETE FROM user_session where user_id=$oid and user_id > 999");
	$deleteHandler->addDbAction("DELETE FROM user_permissions where user_id=$oid and user_id > 999");

	$insertHandler = new ActionHandler("INSERT");
	$insertHandler->addDbAction("INSERT INTO user_session (USER_ID) VALUES (<oid>)");
	$insertHandler->addDbAction("INSERT INTO temp_vars (NAME, USER_ID, VALUE) VALUES ('variation', <oid>, 1)");
	$insertHandler->addDBAction("INSERT INTO temp_vars (NAME, USER_ID, VALUE) VALUES ('mid', <oid>, 0)");

	if ($oid == 0) {
		$addtext = "";
	} else {
		$addtext = ": " . getDBCell("users", "USER_NAME", "USER_ID = " . $oid);
	}

	$form = new stdEDForm($lang->get("user_head"). $addtext, "i_myprofile.gif");
	$form->submitButtonAction = "if (document.form1.users_PASSWORD_1.value != '') document.form1.users_PASSWORD_1.value = document.form1.users_PASSWORD_2.value = hex_md5(document.form1.users_PASSWORD_1.value);";

	$cond = $form->setPK("users", "USER_ID");

	if ($oid != "") {
		$form->headerlink = crHeaderLink($lang->get("user_permission", "Edit user permissions"), "modules/user/user_permissions.php?sid=$sid&go=update&oid=$oid");
	}

	$form->add(new TextInput($lang->get("user_name"), "users", "USER_NAME", $cond, "type:text,width:200,size:16", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("full_name"), "users", "FULL_NAME", $cond, "type:text,width:200,size:32", "MANDATORY"));
	$form->add(new PasswordInput($lang->get("password"), "users", "PASSWORD", $cond, "type:text,width:200,size:32", "MANDATORY"));
	$form->add(new TextInput($lang->get("user_email"), "users", "EMAIL", $cond, "type:text,width:200,size:64", "MANDATORY"));
	$form->add(new CheckboxInput($lang->get("user_active"), "users", "ACTIVE", $cond, "1", "0"));
	$form->add(new SelectOneInput($lang->get("user_bl"), "users", "LANGID", "internal_resources_languages", "NAME", "LANGID", "1", $cond, "type:dropdown", "MANDATORY", "TEXT"));
Exemplo n.º 20
0
	$filter = new Filter("pgn_recipes_tags", "TAG_ID");
	$filter->addRule($lang->get("name"), "TAG", "TAG");
	$filter->type_name = "Tags";

	// Create Menu
	$filtermenu = new Filtermenu("Recipe Editor", $filter);	
	$filtermenu->addMenuEntry("Recipes", "overview.php");
    $filtermenu->addMenuEntry("Tags", "tags.php");    
	
    // ActionHandler for deleting groups
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM pgn_recipes_tags Where TAG_ID=$oid");
	$deleteHandler->addDbAction("DELETE FROM pgn_recipes_tag_relation Where TAG_ID=$oid");

	// Create Form Container and add widgets
	$form = new stdEDForm("Edit Tags");
	$cond = $form->setPK("pgn_recipes_tags", "TAG_ID");
	$form->add(new TextInput("Tag", "pgn_recipes_tags", "TAG", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE"));
	
	$values = array();
	$values[] = array("Category 1",1);
	$values[] = array("Category 2",2);
	$values[] = array("Internal",0);
	$form->add(new SelectOneInputFixed("Tag-Type", "pgn_recipes_tags", "TAG_CAT", $values, $cond));
	
	
	$form->registerActionHandler($deleteHandler);

	// Register Menu and form in Pagbe
	$page->addMenu($filtermenu);
	$page->add($form);
Exemplo n.º 21
0
	 *	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("ADMINISTRATOR|QUOTER");
	$page = new page("Quote of the day");

	$filter = new Filter("pgn_quote", "QUOTE_ID");
	$filter->addRule("Title", "TITLE", "TITLE");
	$filter->addRule("Quote", "QUOTE", "TITLE");

	$filtermenu = new Filtermenu("Browse Quotes", $filter);

	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM pgn_quote where QUOTE_ID=$oid");

	$form = new stdEDForm("Edit Quote", "");
	$cond = $form->setPK("pgn_quote", "QUOTE_ID");
	$form->add(new TextInput("Title", "pgn_quote", "TITLE", $cond, "type:text,width:300,size:64", "MANDATORY&UNIQUE"));
	$form->add(new TextInput("Quote", "pgn_quote", "QUOTE", $cond, "type:textarea,width:300,size:3", ""));

	$form->registerActionHandler($deleteHandler);

	$page->addMenu($filtermenu);
	$page->add($form);
	$page->draw();
?>
Exemplo n.º 22
0
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"));
    $form->add(new PositionInput($lang->get("position", "Position"), "channel_articles", "POSITION", $cond, "CHID={$chid} AND VERSION=0", "size:4,width:50"));
    $form->add(new Hidden("action", "createarticle"));
    $form->add(new NonDisplayedValueOnInsert("channel_articles", "CHID", $cond, $chid, "NUMBER"));
    $form->add(new NonDisplayedValueOnInsert("channel_articles", "ARTICLE_DATE", $cond, "NOW()", "NUMBER"));
    $form->forbidDelete(true);
    $handler = new ActionHandler("INSERT");
    $handler->addFncAction("createClusterNodeForArticle");
    $form->registerActionHandler($handler);
    $page->add($form);
    $page->drawAndForward("modules/channels/edit.php?sid={$sid}&oid=<oid>&go=update");
if ($width < 200) {
    $width = 200;
}
drawIFOHeader('', true);
$configuratorId = value("value", "NUMERIC", LoadFromSession("configuratorId"));
br();
if ($configuratorId != 0) {
    SaveToSession("configuratorId");
    $action = value("go", "NOSPACES", 0);
    $ar = array();
    $ar[] = array("Checkbox", 0);
    $ar[] = array("Dropdown", 1);
    $ar[] = array("Textinput", 2);
    if (sameText($action, "create") || sameText($action, "update")) {
        don();
        $form = new stdEDForm("Create configurator item");
        $form->width = 700;
        $cond = $form->setPK("shop_configurator_item", "GUID");
        $form->add(new NonDisplayedValueOnInsert("shop_configurator_item", "CONFIGURATOR_ID", $cond, $configuratorId, "NUMBER"));
        $form->add(new TextInput($lang->get("title", "Title"), "shop_configurator_item", "TITLE", $cond, "type:text,size:255,width:300", "MANDATORY", "TEXT"));
        $form->add(new TextInput($lang->get("position", "Position"), "shop_configurator_item", "POSITION", $cond, "type:text,size:2,width:40", "MANDATORY&NUMBER", "NUMBER"));
        $form->add(new SelectOneInputFixed($lang->get("conf_type", "Configurator Type"), "shop_configurator_item", "TYPE", $ar, $cond, "type:dropdown,width:150", "MANDATORY", "NUMBER"));
        $form->add(new TextInput($lang->get("configuration", "Configuration"), "shop_configurator_item", "VALUE", $cond, "type:text,size:1024,width:300", "", "TEXT"));
        $form->add(new Hidden("go", $action));
        $form->check();
        $form->process();
        echo $form->draw();
    } else {
        if (sameText($action, "update")) {
            echo $action;
        } else {
Exemplo n.º 24
0
	$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 = "";
	} else {
		$addtext = ": " . getDBCell("roles", "ROLE_NAME", "ROLE_ID = " . $oid);
	}

	$form = new stdEDForm($lang->get("role_head"). $addtext, "i_role.gif");
	$cond = $form->setExPK("roles", "ROLE_ID");
	$cond .= " AND UPPER(ROLE_NAME) <> 'ADMINISTRATOR'";

	if ($oid != "") {
		$form->headerlink = crHeaderLink($lang->get("role_permission", "Edit role permissions"), "modules/user/role_permissions.php?sid=$sid&go=update&oid=$oid");
	}

	$form->add(new TextInput($lang->get("role_name"), "roles", "ROLE_NAME", $cond, "type:text,width:200,size:16", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("role_description"), "roles", "DESCRIPTION", $cond, "type:textarea,width:340,size:2", ""));
	$form->registerActionHandler($deleteHandler);

	$page->addMenu($filtermenu);
	$page->add($form);
	$page->drawAndForward("modules/user/role_general.php?sid=$sid&go=update&oid=<oid>");
	$db->close();
				$handled = true;
			} else if (value("decision") != $lang->get("no")) {
				$title = getDBCell("cluster_node", "NAME", "CLNID = $oid");
				$form = new YesNoForm($lang->get("cl_del"). " $title", $lang->get("cl_delmes", "Do you really want to delete this cluster-instance?"));
				$form->add(new Hidden("action", $lang->get("CL_DEL")));
				$form->add(new Hidden("oid", $oid));
				$page->add($form);
				$handled = true;				
			}
		} else if (($action == $lang->get("cl_new")) && $aclf->checkAccessToFunction("NEW_INSTANCE")) {
			if (!isset($go) || $go == "0")
				$go = "insert";

			$page_action = "INSERT";		
			$clt = getVar("clt");
			$form = new stdEDForm($lang->get("cl_new"), "i_edit.gif");
			$cond = $form->setPK("cluster_node", "CLNID");
			$oname = new TextInput($lang->get("name"), "cluster_node", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE");
			$oname->setFilter("CLT_ID = $clt");
			$form->add($oname);
			$form->add(new SelectMultiple2Input($lang->get("variations"), "cluster_variations", "VARIATION_ID", "1", "variations", "NAME", "VARIATION_ID", "DELETED=0"));
			$form->add(new Hidden("action", $lang->get("cl_new")));
			$form->add(new NonDisplayedValueOnInsert("cluster_node", "CLT_ID", $cond, $clt, "NUMBER"));
			$form->add(new NonDisplayedValueOnInsert("cluster_node", "DELETED", $cond, 0, "NUMBER"));
			$form->forbidDelete(true);
			$form->forbidUpdate(true);

			$handler = new ActionHandler("INSERT");
			$handler->addFncAction("syncClusterVariations");
			$form->registerActionHandler($handler);
Exemplo n.º 26
0
 **********************************************************************/

 require_once "../../config.inc.php";
 $auth= new auth("CUSTOMERCAREADMIN");
 $page= new page ("Tickets Category Administration");

 $filter = new Filter("tickets_categories", "id");
 $filter->addRule("Category", "name", "name");

 $menu = new Filtermenu("Edit Categories", $filter);
 include "menudef.inc.php";
  
 $deleteHandler = new ActionHandler("DELETE");
 $deleteHandler->addDbAction("DELETE FROM tickets_categories where id=$oid");
 
 $form = new stdEDForm("Edit Ticket Categories", "");
 $cond = $form->setPK("tickets_categories", "id");
 $form->add(new TextInput("Name", "tickets_categories", "name", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
 $form->add(new TextInput("POP-Server", "tickets_categories", "pophost", $cond, "type:text,width:200,size:32", "MANDATORY"));
 $form->add(new TextInput("POP-Username", "tickets_categories", "popuser", $cond, "type:text,width:200,size:32", "MANDATORY"));
 $form->add(new TextInput("POP-Password", "tickets_categories", "poppass", $cond, "type:text,width:200,size:32", "MANDATORY"));
 $form->add(new TextInput("Reply-To-Address", "tickets_categories", "replyto", $cond, "type:text,width:200,size:32", "MANDATORY"));

 $form->add(new TextInput("Notify From", "tickets_categories", "notify_from", $cond, "type:text,width:200,size:64", ""));
 $form->add(new TextInput("Notify To", "tickets_categories", "notify_to", $cond, "type:text,width:200,size:64", ""));
 $form->add(new TextInput("Notify Subject", "tickets_categories", "notify_subject", $cond, "type:text,width:200,size:64", ""));
 $form->add(new TextInput("Notify ReplyTo", "tickets_categories", "notify_replyto", $cond, "type:text,width:200,size:64", ""));
 $form->add(new TextInput("Notify Body", "tickets_categories", "notify_body", $cond, "type:textarea,width:350,size:6", ""));
 $form->add(new TextInput("Notify Headers", "tickets_categories", "notify_headers", $cond, "type:textarea,width:350,size:6", ""));

 $form->registerActionHandler($deleteHandler);
Exemplo n.º 27
0

 $filter = new Filter("pgn_tickets", "ID");

 $filter->addRule("Name", "name", "name");



$menu = new Filtermenu("Edit Contact", $filter);
include "menudef.inc.php";

if ($auth->checkPermission("ADMINISTRATOR")) $menu->addMenuEntry("Edit Categories", "category.php");

  

  $form = new stdEDForm("Browse Contacts", "");

 $cond = $form->setPK("pgn_tickets_categories", "id");

 $form->add(new TextInput("Name", "pgn_tickets", "name", $cond, "type:text,width:300,size:64", "MANDATORY"));

 $form->add(new TextInput("E-Mail", "pgn_tickets", "email", $cond, "type:text,width:300,size:64", ""));

 $form->add(new TextInput("Phone", "pgn_tickets", "phone", $cond, "type:text,width:200,size:32", ""));

 $form->forbidDelete(true);

 


Exemplo n.º 28
0
	$page = new page("Compound Groups");

	$filter = new Filter("compound_groups", "CGID");
	$filter->addRule($lang->get("name"), "NAME", "NAME");
	$filter->setAdditionalCondition("VERSION = 0");
	$filter->icon = "li_cggroup.gif";
	
	$filter->type_name = $lang->get("cp_group");
	$filtermenu = new Filtermenu($lang->get("cp_group"), $filter);
	$filtermenu->tipp = $lang->get("help_compgrp", "Compound group is a group of clusters. Clusters templates may have an own layout. This enables you to build your homepage out of blocks, e.g. News-Article, Poll, Image-Gallery all on one page and on demand.");
	
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM compound_groups where CGID=$oid AND CGID > 999");
	$deleteHandler->addDbAction("DELETE FROM compound_group_members where CGID=$oid");

	$form = new stdEDForm($lang->get("ed_cpgroup", "Edit Compound Group"));
	$cond = $form->setPK("compound_groups", "CGID");
	
	if ($oid != "" && $page_action != "DELETE") {		
		$form->buttonbar->add("todo", $lang->get("launch"), "submit", "");	
		$form->headerlink = crHeaderLink($lang->get("ed_cpgroup"), "modules/compoundgroup/compound_group_members.php?sid=$sid&oid=$oid&go=update");
	}
	$form->add(new TextInput($lang->get("group_name"), "compound_groups", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("group_description", "Description"), "compound_groups", "DESCRIPTION", $cond, "type:textarea,width:340,size:2", ""));
	$form->add(new Hidden("todo", ""));
	
    $values = array();
    array_push($values, array($lang->get("latest", "Latest changed first"), 2));
    array_push($values, array($lang->get("oldest", "Oldest changed first"), 3));    
    array_push($values, array($lang->get("by_order", "By order"), 4));
    array_push($values, array($lang->get("random", "Random"), 1));
Exemplo n.º 29
0
 *
 *    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_once "../../config.inc.php";
require_once "ingredient_editor.php";
require_once "tag_selector.php";
$auth = new auth("ADMINISTRATOR");
$page = new Page("Edit Recipe");
$form = new stdEDForm($lang->get("edrecipe", "Edit Recipe"));
$cond = $form->setPK("pgn_recipes", "ID");
$form->addHeaderLink(crHeaderLink($lang->get("back"), "plugin/recipe/overview.php?sid=" . $sid));
$form->add(new TextInput($lang->get("name", "NAME"), "pgn_recipes", "NAME", $cond, "type:text,size:64,width:200", "MANDATORY"));
if ($page_action == "UPDATE") {
    $values = createNameValueArrayEx("pgn_recipes_tags", "TAG", "TAG_ID", "1", "ORDER BY TAG ASC");
    $form->add(new TagEditor("Tags", "pgn_recipes_tag_relation", "REC_ID", $oid, "TAG_ID", $values));
}
$form->add(new SubTitle("st", $lang->get("ingredients", "Ingredients"), 2));
$form->add(new IngredientEditor("pgn_recipes", $cond));
$form->add(new SubTitle("st", $lang->get("preparation", "Preparation"), 2));
$form->add(new TextInput($lang->get("preparation", "Preparation"), "pgn_recipes", "PREPARATION", $cond, "type:textarea,size:6,width:300", ""));
$form->add(new TextInput($lang->get("description", "Description"), "pgn_recipes", "DESCRIPTION", $cond, "type:textarea,size:6,width:300", ""));
$deleteHandler = new ActionHandler("DELETE");
$deleteHandler->addDbAction("DELETE FROM pgn_recipes WHERE ID={$oid} ");
$deleteHandler->addDbAction("DELETE FROM pgn_recipes_tag_relation WHERE REC_ID={$oid} ");
Exemplo n.º 30
0
		$handler = new ActionHandler("INSERT");
		$handler->addFncAction("createMenuEntry");
		$handler->addFncAction("createContentPage");
		$form->registerActionHandler($handler);

		$page->add($form);
	} else if ($action == "newinstance") {
		if ($go == "insert")
			$page_action = "INSERT";

		$mid = initValue("mid", "mid","0");
		$spm = getDBCell("sitemap", "SPM_ID", "MENU_ID = $mid");
		$type = getDBCell("sitepage_master", "SPMTYPE_ID", "SPM_ID = $spm");

		if ($type == 2) {
			$form = new stdEDForm($lang->get("sp_newinstance"), "");

			$form->add(new MultipagePosition($lang->get("pos_in_menu"), "sitepage", "POSITION", "SPID=0", 0, $mid));			
			$form->add(new Label("lbl", $lang->get("cr_content", "Create Content for this page?"), "standard"));
			$form->add(new Checkbox("createpage", "1", "standard", true));	
			$form->add(new Label("lbl", $lang->get("cl_name", "Cluster Name"), "standard", 1));
			$form->add(new Input("cluster_name", $lang->get("insname", "<Cluster Name>"), "standard", 32));
			
			$form->add(new ActionField("newinstance"));
			$form->forbidDelete(true);
			$form->forbidUpdate(true);
			$handler = new ActionHandler("INSERT");
			$handler->addFncAction("createPage");
			$form->registerActionHandler($handler);
			$page->add($form);
		} // if type==2