mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Migrated Vendor Templates to its own table, lots of code modifications here
This commit is contained in:
@@ -14,15 +14,15 @@ if (isset($_POST['add_software_from_template'])) {
|
||||
$client_id = intval($_POST['client_id']);
|
||||
$software_template_id = intval($_POST['software_template_id']);
|
||||
|
||||
// GET Software Info
|
||||
$sql_software = mysqli_query($mysqli,"SELECT * FROM software WHERE software_id = $software_template_id");
|
||||
$row = mysqli_fetch_array($sql_software);
|
||||
$name = sanitizeInput($row['software_name']);
|
||||
$version = sanitizeInput($row['software_version']);
|
||||
$description = sanitizeInput($row['software_description']);
|
||||
$type = sanitizeInput($row['software_type']);
|
||||
$license_type = sanitizeInput($row['software_license_type']);
|
||||
$notes = sanitizeInput($row['software_notes']);
|
||||
// GET Software Template Info
|
||||
$sql_software_templates = mysqli_query($mysqli,"SELECT * FROM software_templates WHERE software_template_id = $software_template_id");
|
||||
$row = mysqli_fetch_array($sql_software_templates);
|
||||
$name = sanitizeInput($row['software_template_name']);
|
||||
$version = sanitizeInput($row['software_template_version']);
|
||||
$description = sanitizeInput($row['software_template_description']);
|
||||
$type = sanitizeInput($row['software_template_type']);
|
||||
$license_type = sanitizeInput($row['software_template_license_type']);
|
||||
$notes = sanitizeInput($row['software_template_notes']);
|
||||
$vendor = sanitizeInput($_POST['vendor'] ?? 0);
|
||||
|
||||
// Software add query
|
||||
|
||||
@@ -143,9 +143,6 @@ if (isset($_GET['delete_vendor'])) {
|
||||
|
||||
mysqli_query($mysqli,"DELETE FROM vendors WHERE vendor_id = $vendor_id");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Vendor', log_action = 'Delete', log_description = '$session_name deleted vendor $vendor_name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id");
|
||||
|
||||
// Logging
|
||||
logAction("Vendor", "Delete", "$session_name deleted vendor $vendor_name", $client_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user