More work on application editor

This commit is contained in:
jengo 2000-08-19 14:49:32 +00:00
parent 7ad447b37a
commit 2536a54522
2 changed files with 27 additions and 13 deletions

View File

@ -41,6 +41,7 @@
case "title": $s = "Title"; break; case "title": $s = "Title"; break;
case "enabled": $s = "Enabled"; break; case "enabled": $s = "Enabled"; break;
case "applications": $s = "Applications"; break;
case "installed applications": case "installed applications":
$s = "Installed applications"; break; $s = "Installed applications"; break;
@ -55,8 +56,11 @@
case "application title": case "application title":
$s = "Application title"; break; $s = "Application title"; break;
case "edit application":
$s = "Edit application"; break;
case "you must enter an application name and title.":
$s = "You must enter an application name and title."; break;
case "are you sure you want to delete this group ?": case "are you sure you want to delete this group ?":

View File

@ -17,10 +17,29 @@
$phpgw_flags["currentapp"] = "admin"; $phpgw_flags["currentapp"] = "admin";
include("../header.inc.php"); include("../header.inc.php");
if (! $submit) { if ($submit) {
if (! $n_app_name || ! $n_app_title) {
$error = lang_admin("You must enter an application name and title.");
} else {
$phpgw->db->query("insert into applications (app_name,app_title,app_enabled) values('"
. addslashes($n_app_name) . "','" . addslashes($n_app_title) . "','"
. "$n_app_enabled')");
Header("Location: " . $phpgw->link("applications.php"));
exit;
}
}
if ($error) {
$phpgw->common->header();
$phpgw->common->navbar();
}
echo "<p>" . lang_admin("Add new application") . "<hr><p>";
if ($error) {
echo "<p><center>$error</center><br>";
}
?> ?>
<p>
<?php echo lang_admin("Add new application"); ?><hr><p>
<form action="newapplication.php"> <form action="newapplication.php">
<?php echo $phpgw->session->hidden_var(); ?> <?php echo $phpgw->session->hidden_var(); ?>
@ -47,12 +66,3 @@
</form> </form>
<?php <?php
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
} else {
$phpgw->db->query("insert into applications (app_name,app_title,app_enabled) values ('"
. addslashes($n_app_name) . "','" . addslashes($n_app_title) . "','"
. "$n_app_enabled')");
Header("Location: " . $phpgw->link("applications.php"));
}