mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Added Client Asset Status functionality need to work on the names
This commit is contained in:
6
post.php
6
post.php
@@ -4993,6 +4993,7 @@ if(isset($_POST['add_asset'])){
|
||||
$os = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['os'])));
|
||||
$ip = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['ip'])));
|
||||
$mac = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['mac'])));
|
||||
$status = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['status'])));
|
||||
$location = intval($_POST['location']);
|
||||
$vendor = intval($_POST['vendor']);
|
||||
$contact = intval($_POST['contact']);
|
||||
@@ -5011,7 +5012,7 @@ if(isset($_POST['add_asset'])){
|
||||
}
|
||||
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes'])));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO assets SET asset_name = '$name', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_purchase_date = '$purchase_date', asset_warranty_expire = '$warranty_expire', asset_install_date = '$install_date', asset_notes = '$notes', asset_network_id = $network, asset_client_id = $client_id, company_id = $session_company_id");
|
||||
mysqli_query($mysqli,"INSERT INTO assets SET asset_name = '$name', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = '$purchase_date', asset_warranty_expire = '$warranty_expire', asset_install_date = '$install_date', asset_notes = '$notes', asset_network_id = $network, asset_client_id = $client_id, company_id = $session_company_id");
|
||||
|
||||
if(!empty($_POST['username'])) {
|
||||
$asset_id = mysqli_insert_id($mysqli);
|
||||
@@ -5046,6 +5047,7 @@ if(isset($_POST['edit_asset'])){
|
||||
$os = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['os'])));
|
||||
$ip = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['ip'])));
|
||||
$mac = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['mac'])));
|
||||
$status = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['status'])));
|
||||
$location = intval($_POST['location']);
|
||||
$vendor = intval($_POST['vendor']);
|
||||
$contact = intval($_POST['contact']);
|
||||
@@ -5066,7 +5068,7 @@ if(isset($_POST['edit_asset'])){
|
||||
$username = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['username'])));
|
||||
$password = trim(mysqli_real_escape_string($mysqli,encryptLoginEntry($_POST['password'])));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE assets SET asset_name = '$name', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_purchase_date = '$purchase_date', asset_warranty_expire = '$warranty_expire', asset_install_date = '$install_date', asset_notes = '$notes', asset_network_id = $network WHERE asset_id = $asset_id AND company_id = $session_company_id");
|
||||
mysqli_query($mysqli,"UPDATE assets SET asset_name = '$name', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = '$purchase_date', asset_warranty_expire = '$warranty_expire', asset_install_date = '$install_date', asset_notes = '$notes', asset_network_id = $network WHERE asset_id = $asset_id AND company_id = $session_company_id");
|
||||
|
||||
//If login exists then update the login
|
||||
if($login_id > 0){
|
||||
|
||||
Reference in New Issue
Block a user