More webgui development
This commit is contained in:
+13
-1
@@ -10,6 +10,19 @@ require 'globals.inc';
|
||||
$pagetitle = _('Checklists');
|
||||
|
||||
$id = gpc_get_int($_REQUEST, 'id', 0);
|
||||
$c = gpc_get_int($_REQUEST, 'c', -1);
|
||||
|
||||
function create_clitem_form($script, $clid, $formtype, $row=NULL) {
|
||||
|
||||
// formtype: insert or update
|
||||
$update = ($formtype == 'update');
|
||||
echo '<form method="post" action="', $script, '">';
|
||||
echo '<input type="hidden" name="id" value="', $clid, '">';
|
||||
if ($update) {
|
||||
echo '<input type="hidden" name="v" value="', $row['checkid'], '">';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ========== ACTIONS START ===================================================
|
||||
|
||||
@@ -24,7 +37,6 @@ switch ($submit = form_get_action()) {
|
||||
|
||||
case 'insert':
|
||||
$p[':title'] = gpc_get_string($_POST, 'title');
|
||||
$p[':clstate'] = gpc_get_string($_POST, 'clstate');
|
||||
$id = db_exec_insert('checklist', $p);
|
||||
$action = ACT_VIEW;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user