|
From: Benjamin C. <bc...@us...> - 2002-04-03 19:04:14
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv15437/admin
Modified Files:
resolution.php
Log Message:
Smarty stuff
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- resolution.php 3 Apr 2002 00:58:26 -0000 1.26
+++ resolution.php 3 Apr 2002 18:24:47 -0000 1.27
@@ -43,7 +43,7 @@
}
function do_form($resolutionid = 0) {
- global $db, $me, $_pv, $STRING;
+ global $db, $me, $_pv, $STRING, $t;
extract($_pv);
$error = '';
@@ -52,7 +52,7 @@
$error = $STRING['givename'];
elseif (!$resolution_desc = trim($resolution_desc))
$error = $STRING['givedesc'];
- if ($error) { list_items($resolutionid, $error); return; }
+ if ($error) { show_form($resolutionid, $error); return; }
if (!$resolutionid) {
$db->query("insert into ".TBL_RESOLUTION.
@@ -66,7 +66,11 @@
', resolution_desc = '.$db->quote(stripslashes($resolution_desc)).
", sort_order = $sort_order where resolution_id = $resolutionid");
}
- header("Location: $me?");
+ if ($use_js) {
+ $t->display('admin/edit-submit.html');
+ } else {
+ header("Location: $me?");
+ }
}
function show_form($resolutionid = 0, $error = '') {
@@ -79,6 +83,8 @@
} else {
$t->assign($_pv);
}
+ $t->assign('error', $error);
+ $t->display('admin/resolution-edit.html');
}
@@ -110,16 +116,13 @@
sorting_headers($me, $headers, $order, $sort, "page=$page");
- show_form($resolutionid, $error);
-
$t->display('admin/resolutionlist.html');
}
$perm->check('Admin');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($_gv['resolution_id']); break;
+ case 'edit' : show_form($_gv['resolution_id']); break;
case 'del' : del_item($_gv['resolution_id']); break;
} elseif(isset($_pv['submit'])) {
do_form($_pv['resolution_id']);
|