<?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();
<?
	/**********************************************************************
	 * @module Application
	 **********************************************************************/
	require_once "../../config.inc.php";

	$auth = new auth("USER_MANAGEMENT");
	$page = new page("User Administration");
	$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"));
 * @module Application

 **********************************************************************/



 require_once "../../config.inc.php";

$auth= new auth("CUSTOMERCARE");
$page= new page ("Tickets Category Administration");



 $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"));
 *
 *	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
 **********************************************************************/
$go = "UPDATE";
require_once "../../config.inc.php";
$auth = new auth("PLUGIN_CONTROL");
$page = new page("Install Plugin");
$filter = new Filter("modules", "MODULE_ID");
$filter->addRule($lang->get("name"), "MODULE_NAME", "MODULE_NAME");
$filter->icon = "li_plugin.gif";
$filter->type_name = "Plugins";
$filter->newLabel = $lang->get('install_pgn', 'Install a plugin');
$filtermenu = new Filtermenu($lang->get("pg_title"), $filter);
$filtermenu->tipp = $lang->get("help_pgn", "Plug-ins allow you to enhance N/X beyond its standard features. Typically, plug-ins are used to create new objects types in addition to the two standard object types text and image.");
//$oid = value("oid", "NUMERIC", '');
if ($pagestate->insert) {
    $form = new EditForm($lang->get("pg_install"), "i_plugin.gif");
    $form->addToTopText($lang->get("pg_installdesc") . "<br><br>");
    $form->add(new Label("lbl", $lang->get("pg_choose"), "standard"));
    $form->add(new Dropdown("filenameselect", getPluginFileList(), "standard"));
    $form->add(new Hidden("go", "CREATE"));
    $form->add(new Hidden("action", "install"));
}
if (!$pagestate->insert || value("action") == "install" || value("action") == "uninstall") {
 *
 *	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("NEWSLETTERADM");
$page = new page("Newsletter configuration");
include "logic/menudef.inc.php";
$filter = new Filter("mailinglist", "MAILINGLIST_ID");
$filter->addRule($lang->get("name"), "NAME", "NAME");
$filter->type_name = $lang->get("newsletter", "Newsletter");
$filtermenu = new Filtermenu($lang->get("newsletter"), $filter);
$deleteHandler = new ActionHandler("Delete");
$deleteHandler->addDBAction("Delete from mailinglist Where MAILINGLIST_ID = <oid>");
$form = new StdEDForm($lang->get("edit_newsletter", "Edit newsletter"));
$cond = $form->setPK("mailinglist", "MAILINGLIST_ID");
$form->add(new TextInput($lang->get("name"), "mailinglist", "NAME", $cond, "type:text,width:300,size:128", "MANDATORY&UNIQUE"));
$form->add(new TextInput($lang->get("description"), "mailinglist", "DESCRIPTION", $cond, "type:textarea,width:300,size:8"));
$form->add(new TextInput($lang->get("from_name", 'Sender Name'), "mailinglist", "FROM_NAME", $cond, "type:text,width:300,size:128", "MANDATORY"));
$form->add(new TextInput($lang->get("from_email", 'Sender EMail'), "mailinglist", "FROM_EMAIL", $cond, "type:text,width:300,size:128", "MANDATORY"));
$form->registerActionHandler($deleteHandler);
$page->addMenu($filtermenu);
$page->add($form);
$page->draw();
echo $errors;
<?
	/**********************************************************************
	 * @module Application
	 **********************************************************************/
	require_once "../../config.inc.php";

	$auth = new auth("USER_MANAGEMENT");
	$page = new page("User Administration");
	$page->setJS("md5");
	
	$filter = new Filter("users", "USER_ID");
	$filter->addRule($lang->get("user_name"), "USER_NAME", "USER_NAME");
	$filter->addRule($lang->get("full_name"), "FULL_NAME", "FULL_NAME");
	$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_premissions.php");
	$filtermenu->addMenuEntry($lang->get("group_link"), "group_general.php");
	$filtermenu->addMenuEntry($lang->get("role_link"), "role_general.php");    
 
	
	$deleteHandler = new ActionHandler("DELETE");
	$deleteHandler->addDbAction("DELETE FROM users where user_id=$oid and user_id > 999");
	$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>)");
Beispiel #7
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";

	$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);
<?
/**********************************************************************
 * @module Application
 **********************************************************************/

 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", ""));
<?
	/**********************************************************************
	 * @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"));
<?
	/**********************************************************************
	 * @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 = "";
Beispiel #11
0
<?
	/**********************************************************************
	 * @module Application
	 **********************************************************************/
	require_once "../../config.inc.php";

	// Check Authorization
	$auth = new auth("ADMINISTRATOR");
	
	// Initialize Page-Container
	$page = new page("Tags");

	// Create Menu-Filter
	$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"));
<?
	/**********************************************************************
	 * @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);
<?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"));
Beispiel #14
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";

	$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);