More webgui development

This commit is contained in:
2024-04-30 19:38:28 +02:00
parent c3b5ef95a9
commit 0c09ce2916
21 changed files with 1056 additions and 155 deletions
+13 -1
View File
@@ -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;