}
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 {
            // draw list with all items.
            $page = new page("foo");
Пример #2
0
	$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>");
	$db->close();
?>
			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"));
			$form->add(new Hidden("action", $lang->get("new_content")));
Пример #4
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();
?>
Пример #5
0
 *    (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));
$form->add(new Subtitle('st', $lang->get("address", "Address")));
Пример #6
0
	$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"));

	// Control Information
	$form->add(new NonDisplayedValueOnInsert("users", "REGISTRATION_DATE", $cond, "NOW()", "TIMESTAMP"));
	$form->registerActionHandler($deleteHandler);
Пример #7
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");
} else {
Пример #8
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);

 



 $page->addMenu($menu);
Пример #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');
	}

	$page->addMenu($filtermenu);
Пример #10
0
	$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);
	
Пример #11
0
 *    (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);
$page->draw();
Пример #12
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();
?>
				$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"));
			$form->forbidDelete(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);

			$page->add($form);
	
	
	$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();
	$db->close();
	$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";
Пример #17
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();
?>
Пример #18
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} ");
$form->registerActionHandler($deleteHandler);
		$sql = "UPDATE sitepage SET CLNID=0 WHERE SPID = $spid";
		$query = new query($db, $sql);
		$query->free();
		$action = "editobject";
		$go = "CREATE";
		$processing = "no";
		$page_state = "start";
	}

	if ($action == "newpage" && $aclf->checkAccessToFunction("ADD_SITEPAGE")) {
		if ($go == "insert")
			$page_action = "INSERT";
		$mid = initValueEx("mid", "mid", "0");
		$form = new stdEDForm($lang->get("sp_newpage"), "i_edit.gif");
		$cond = $form->setPK("sitemap", "MENU_ID");
		$form->add(new IconSelectInput($lang->get("tmpl_name", "Select a template"), "sitemap", "SPM_ID", "sitepage_master", "NAME", "SPM_ID", "DESCRIPTION", $c["spmthumbdocroot"], "THUMBNAIL", "DELETED=0 AND VERSION=0", $cond, "type:dropdown", "MANDATORY"));
		$oname = new TextInput($lang->get("stname", "Select a name to identify this page in the sitemap"), "sitemap", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE");
		$oname->setFilter("PARENT_ID = $mid");
		$form->add($oname);
		$form->add(new SitemapPosition($lang->get("pos_in_menu"), "sitemap", "POSITION", $cond, 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 ActionField("newpage"));
		$form->add(new NonDisplayedValueOnInsert("sitemap", "PARENT_ID", $cond, $mid, "NUMBER"));
		$form->add(new NonDisplayedValueOnInsert("sitemap", "DELETED", $cond, 0, "NUMBER"));
		$form->add(new NonDisplayedValueOnInsert("sitemap", "IS_DISPLAYED", $cond, 1, "NUMBER"));
		$form->forbidDelete(true);
		$form->forbidUpdate(true);

		$handler = new ActionHandler("INSERT");