Added Quick Category/Tag Add throughout utilizes the new ajax modal

This commit is contained in:
johnnyq
2025-02-25 17:05:34 -05:00
parent bac76871c1
commit f23afdd85c
42 changed files with 525 additions and 98 deletions

24
post/user/tag.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
/*
* ITFlow - GET/POST request handler for tagging
*/
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
if (isset($_POST['add_tag'])) {
require_once 'post/user/tag_model.php';
mysqli_query($mysqli,"INSERT INTO tags SET tag_name = '$name', tag_type = $type, tag_color = '$color', tag_icon = '$icon'");
$tag_id = mysqli_insert_id($mysqli);
// Logging
logAction("Tag", "Create", "$session_name created tag $name", 0, $tag_id);
$_SESSION['alert_message'] = "Tag <strong>$name</strong> created";
header("Location: " . $_SERVER["HTTP_REFERER"]);
}