Ejemplo n.º 1
0
    if (value("action") == "uninstall" && is_numeric($oid)) {
        uninstallPlugin($oid);
    }
}
if (value("action") == $lang->get("settings")) {
    if ($page_action == "") {
        $page_action = 'UPDATE';
        $page_state = "start";
    }
    //if (!isset($go)) $go="update";
    //$page_action="UPDATE";
    $oid = value("oid", "NUMERIC");
    $form = new StdEDForm($lang->get("settings"));
    $cond = $form->setPK("modules", "MODULE_ID");
    $form->forbidDelete(true);
    $form->addHeaderLink(crHeaderLink($lang->get("Back"), 'modules/plugins/install.php?oid=' . $oid . '&sid=' . $sid . '&go=update'));
    $form->add(new DisplayedValue($lang->get("name"), "modules", "MODULE_NAME", "MODULE_ID={$oid}"));
    $region[0][0] = 'Please Select';
    $region[0][1] = '0';
    $region[1][0] = 'Website Header';
    $region[1][1] = 'HEAD1';
    $region[2][0] = 'Website Footer';
    $region[2][1] = 'FOOT1';
    $region[3][0] = 'Content Header';
    $region[3][1] = 'HEAD2';
    $region[4][0] = 'Content Footer';
    $region[4][1] = 'FOOT2';
    $region[5][0] = 'Content Side';
    $region[5][1] = 'SIDE1';
    $form->add(new SelectOneInputFixed($lang->get("region", "Place"), "modules", "REGION", $region, $cond, "type:dropdown", "MANDATORY", "TEXT"));
    $form->add(new TextInput($lang->get("position"), "modules", "POSITION", $cond, "type:text", "", "NUMBER"));
Ejemplo n.º 2
0
 *    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);
$page->add($form);
Ejemplo n.º 3
0
    /**
     * Returns the configuration of the object on position 
     * @param integer Position of the object information is asked for
     */
    function getInformation($position)
    {
        global $lang;
        return $lang->get("ready_to_use", "Ready to use");
    }
}
$page = new page("Meta-Template Scheme");
$filter = new Filter("meta_templates", "MT_ID");
$filter->addRule($lang->get("name"), "NAME", "NAME");
$filter->setNewAction("meta.php");
$filter->setAdditionalCondition("INTERNAL = 0 AND VERSION=0");
$filter->icon = "li_meta.gif";
$filter->type_name = "Meta Templates";
$filtermenu = new Filtermenu($lang->get("metatemplates"), $filter);
$page->tipp = $lang->get("help_metatemp", "A meta template is used for defining which metadata fields need to go on a new page. When you create a new metadata field in the template, each new page based on that template will contain that field. ");
if (value("oid", "NUMERIC") != "0") {
    $form = new MetaTemplateForm($lang->get("mt_scheme"), "i_meta.gif");
    $form->width = '100%';
    $form->headerlink = crHeaderLink($lang->get('mt_properties'), 'modules/meta/meta.php?sid=' . $sid . '&oid=' . $oid . '&go=update');
    $form->define_home("meta_templates", "MT_ID", $oid);
    $form->define_item("meta_template_items", "MTI_ID", "NAME", "MT_ID", "MTYPE_ID");
    $form->define_new("meta_datatypes", "MTYPE_ID");
    $page->add($form);
}
$page->addMenu($filtermenu);
$page->draw();
$db->close();
Ejemplo n.º 4
0
	$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);
	$form->registerActionHandler($insertHandler);

	$page->addMenu($filtermenu);
	
	$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();
?>
Ejemplo 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();
?>
	$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));
    

	$form->add(new SelectOneInputFixed($lang->get("ordercomp", "Order of Compounds"), "compound_groups", "SORTMODE", $values, $cond, "type:dropdown"));
	$form->registerActionHandler($deleteHandler);
Ejemplo n.º 8
0
$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);
    }
    $page->add($form);
Ejemplo n.º 9
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);
	$page->add($form);
	$page->draw();
	$db->close();
?>
							case 7:
								$result = $lang->get("cp_group"). "&nbsp;" . getDBCell("compound_groups", "NAME", "CGID = $fkid");
                         		break;
                            case 8: //channel.
                                 $result = $lang->get("ready_to_use", "Ready to use.");
						}
					}
					return $result;
				}
								
			}

			// -- end of ClusterTemplatForm --
			$form = new ClusterTemplateForm($lang->get("clt_scheme"));
			$form->width = '100%';
			$form->headerlink = crHeaderLink($lang->get('ed_properties'), "modules/clustertemplate/clustertemplates.php?sid=$sid&oid=".value("oid", "NUMERIC")."&action=objectprop&go=update");				
			$form->define_home("cluster_templates", "CLT_ID", $oid);
			$form->define_item("cluster_template_items", "CLTI_ID", "NAME", "CLT_ID", "CLTITYPE_ID");
			$form->define_new("cluster_template_item_types", "CLTITYPE_ID");
			$form->add(new Hidden("action", "editobject"));
			$page->add($form);
			
		}
		
	} else {
	  $page_action = "update";
	  $form = new Form($lang->get("clt"));

	  
  	  include $c["path"] . "modules/common/buttonbar_folder.inc.php";
	$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")
	);

	$pk = array ( array (
		"USER_ID",
		$oid,
Ejemplo n.º 12
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("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")));
$form->add(new TextInput($lang->get("street1", "Street 1"), "address", "Street1", $cond, "type:text,size:128,width:300", ""));
Ejemplo n.º 13
0
		$go = "update";

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

		if ($errors == "") {
			$form->addToTopText($lang->get("spm_lauch_success", "The pages based on this master were relaunched successfully.<br>"));
		}
	}

	

	if ($oid != "") {
		$form->addHeaderLink(crHeaderLink($lang->get('edit_template'), "modules/pagetemplate/edit_template.php?sid=$sid&oid=$oid&go=update"));		
	}

	$form->add(new TextInput($lang->get("name"), "sitepage_master", "NAME", $cond, "type:text,width:200,size:32", "MANDATORY&UNIQUE"));
	$form->add(new TextInput($lang->get("spm_path"), "sitepage_master", "TEMPLATE_PATH", $cond, "type:text,width:200,size:64", "MANDATORY"));
	$form->add(new TextInput($lang->get("description"), "sitepage_master", "DESCRIPTION", $cond, "type:textarea,width:300,size:3", ""));
	
	$form->add(new ManualDropdownInput($lang->get("spm_selectthumb", "Select Thumbnail"), "sitepage_master", "THUMBNAIL", getThumbnailList(), $cond));
	
	//$form->add(new TextInput($lang->get("spm_thumbnail", "Thumbnail"), "sitepage_master", "THUMBNAIL", $cond, "type:text,width:200,size:64", ""));
	
	if (($go == "create") || ($creating != "0")) {
		$form->add(new SelectOneInput($lang->get("spm_type"), "sitepage_master", "SPMTYPE_ID", "sitepage_types", "NAME", "SPMTYPE_ID", "1", $cond, "type:dropdown", "MANDATORY"));

		$clts = new CLTSelector($lang->get("spm_cluster"), "sitepage_master", "CLT_ID", $cond, 0, "", "MANDATORY");
		$form->add($clts);