コード例 #1
0
ファイル: edit.php プロジェクト: BackupTheBerlios/nxwcms-svn
 *    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);
コード例 #2
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();
?>
コード例 #3
0
ファイル: edit.php プロジェクト: BackupTheBerlios/nxwcms-svn
 *
 *    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", ""));
コード例 #4
0
ファイル: edit.php プロジェクト: BackupTheBerlios/nxwcms-svn
$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);
コード例 #5
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);