function update_log(&$db, &$state) { $sql = "UPDATE " . $db->prefix . "b10_eventlog\n\t\t\tSET session_count=" . $_POST["sessions"] . ", attendance=" . $_POST["attendance"] . ",\n\t\t\tcomments=:comments\n\t\t\tWHERE eventlog_id=" . $_POST["recID"] . ";"; $stmt = $db->prepare($sql); $stmt->bindValue(':comments', input_edit("comments"), PDO::PARAM_STR); $stmt->execute(); $state->msgStatus = "-"; //tell server_call to reset page }
if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; } switch ($_REQUEST["action"]) { case 'save': form_save(); break; case 'input_remove': input_remove(); header("Location: graph_templates.php?action=template_edit&id=" . $_GET["graph_template_id"]); break; case 'input_edit': include_once("./include/top_header.php"); input_edit(); include_once("./include/bottom_footer.php"); break; } function form_save() { if ((isset($_POST["save_component_input"])) && (!is_error_message())) { $graph_input_values = array(); $selected_graph_items = array(); $save["id"] = $_POST["graph_template_input_id"]; $save["hash"] = get_hash_graph_template($_POST["graph_template_input_id"], "graph_template_input"); $save["graph_template_id"] = $_POST["graph_template_id"]; $save["name"] = form_input_validate($_POST["name"], "name", "", false, 3); $save["description"] = form_input_validate($_POST["description"], "description", "", true, 3);