Updates to Vendors added additional fields such as PIN, Support Hours, SLA etc, removed Vendor Address details not really needed for vendors. Beginning works of Vendor Templates aka Global Vendors this will make it easy to update common vendors

This commit is contained in:
johnnyq 2022-10-14 21:48:24 -04:00
parent a20a939b21
commit 4b9ba0b3c1
8 changed files with 187 additions and 196 deletions

View File

@ -15,7 +15,6 @@
<?php echo CURRENT_DATABASE_VERSION; ?>
<script>toastr.success('Have Fun Wozz')</script>
<script>toastr.success('Have Fun Wozz!!')</script>
<?php include("footer.php"); ?>

View File

@ -85,11 +85,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$vendor_description_display = $vendor_description;
}
$vendor_account_number = $row['vendor_account_number'];
$vendor_country = $row['vendor_country'];
$vendor_address = $row['vendor_address'];
$vendor_city = $row['vendor_city'];
$vendor_state = $row['vendor_state'];
$vendor_zip = $row['vendor_zip'];
$vendor_contact_name = $row['vendor_contact_name'];
if(empty($vendor_contact_name)){
$vendor_contact_name_display = "-";
@ -100,7 +95,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$vendor_extension = $row['vendor_extension'];
$vendor_email = $row['vendor_email'];
$vendor_website = $row['vendor_website'];
$vendor_hours = $row['vendor_hours'];
$vendor_sla = $row['vendor_sla'];
$vendor_code = $row['vendor_code'];
$vendor_notes = $row['vendor_notes'];
$vendor_template_id = $row['vendor_template_id'];
?>
<tr>

View File

@ -330,16 +330,52 @@ if(LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION){
// Then, update the database to the next sequential version
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.0'");
}
//if(CURRENT_DATABASE_VERSION == '0.2.0'){
// Insert queries here required to update to DB version 0.2.1
// Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.1'");
//}
}
else{
if(CURRENT_DATABASE_VERSION == '0.2.0'){
//Insert queries here required to update to DB version 0.2.1
mysqli_query($mysqli, "ALTER TABLE `vendors`
ADD `vendor_hours` VARCHAR(200) NULL DEFAULT NULL AFTER `vendor_website`,
ADD `vendor_sla` VARCHAR(200) NULL DEFAULT NULL AFTER `vendor_hours`,
ADD `vendor_code` VARCHAR(200) NULL DEFAULT NULL AFTER `vendor_sla`,
ADD `vendor_template_id` INT(11) DEFAULT 0 AFTER `vendor_archived_at`
");
mysqli_query($mysqli, "ALTER TABLE `vendors`
DROP `vendor_country`,
DROP `vendor_address`,
DROP `vendor_city`,
DROP `vendor_state`,
DROP `vendor_zip`,
DROP `vendor_global`
");
//Create New Vendor Templates Table
mysqli_query($mysqli, "CREATE TABLE `vendor_templates` (`vendor_template_id` int(11) AUTO_INCREMENT PRIMARY KEY,
`vendor_template_name` varchar(200) NOT NULL,
`vendor_template_description` varchar(200) NULL DEFAULT NULL,
`vendor_template_phone` varchar(200) NULL DEFAULT NULL,
`vendor_template_email` varchar(200) NULL DEFAULT NULL,
`vendor_template_website` varchar(200) NULL DEFAULT NULL,
`vendor_template_hours` varchar(200) NULL DEFAULT NULL,
`vendor_template_created_at` datetime DEFAULT CURRENT_TIMESTAMP,
`vendor_template_updated_at` datetime NULL ON UPDATE CURRENT_TIMESTAMP,
`vendor_template_archived_at` datetime NULL DEFAULT NULL,
`company_id` int(11) NOT NULL
)");
//Then, update the database to the next sequential version
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.1'");
}
//if(CURRENT_DATABASE_VERSION == '0.2.1'){
// Insert queries here required to update to DB version 0.2.2
// Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.2'");
//}
}else{
// Up-to-date
}
}

35
db.sql
View File

@ -1431,6 +1431,29 @@ CREATE TABLE `vendor_logins` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vendor_templates`
--
DROP TABLE IF EXISTS `vendor_templates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendor_templates` (
`vendor_template_id` int(11) NOT NULL AUTO_INCREMENT,
`vendor_template_name` varchar(200) NOT NULL,
`vendor_template_description` varchar(200) DEFAULT NULL,
`vendor_template_phone` varchar(200) DEFAULT NULL,
`vendor_template_email` varchar(200) DEFAULT NULL,
`vendor_template_website` varchar(200) DEFAULT NULL,
`vendor_template_hours` varchar(200) DEFAULT NULL,
`vendor_template_created_at` datetime DEFAULT current_timestamp(),
`vendor_template_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`vendor_template_archived_at` datetime DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vendors`
--
@ -1442,22 +1465,20 @@ CREATE TABLE `vendors` (
`vendor_id` int(11) NOT NULL AUTO_INCREMENT,
`vendor_name` varchar(200) NOT NULL,
`vendor_description` varchar(200) DEFAULT NULL,
`vendor_country` varchar(200) DEFAULT NULL,
`vendor_address` varchar(200) DEFAULT NULL,
`vendor_city` varchar(200) DEFAULT NULL,
`vendor_state` varchar(200) DEFAULT NULL,
`vendor_zip` varchar(200) DEFAULT NULL,
`vendor_contact_name` varchar(200) DEFAULT NULL,
`vendor_phone` varchar(200) DEFAULT NULL,
`vendor_extension` varchar(200) DEFAULT NULL,
`vendor_email` varchar(200) DEFAULT NULL,
`vendor_website` varchar(200) DEFAULT NULL,
`vendor_hours` varchar(200) DEFAULT NULL,
`vendor_sla` varchar(200) DEFAULT NULL,
`vendor_code` varchar(200) DEFAULT NULL,
`vendor_account_number` varchar(200) DEFAULT NULL,
`vendor_notes` text DEFAULT NULL,
`vendor_global` tinyint(1) DEFAULT NULL,
`vendor_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`vendor_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`vendor_archived_at` datetime DEFAULT NULL,
`vendor_template_id` int(11) DEFAULT 0,
`vendor_client_id` int(11) DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_id`)
@ -1473,4 +1494,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-09-17 18:03:12
-- Dump completed on 2022-10-14 21:46:21

View File

@ -762,6 +762,7 @@ if(isset($_GET['delete_company'])){
mysqli_query($mysqli,"DELETE FROM trips WHERE company_id = $company_id");
mysqli_query($mysqli,"DELETE FROM user_companies WHERE company_id = $company_id");
mysqli_query($mysqli,"DELETE FROM vendors WHERE company_id = $company_id");
mysqli_query($mysqli,"DELETE FROM vendor_templates WHERE company_id = $company_id");
// Delete Company Files
removeDirectory('uploads/clients/$company_id');
@ -1733,19 +1734,18 @@ if(isset($_POST['add_vendor'])){
$name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['name'])));
$description = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['description'])));
$account_number = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['account_number'])));
$country = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['country'])));
$address = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['address'])));
$city = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['city'])));
$state = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['state'])));
$zip = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['zip'])));
$contact_name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_name'])));
$phone = preg_replace("/[^0-9]/", '',$_POST['phone']);
$extension = preg_replace("/[^0-9]/", '',$_POST['extension']);
$extension = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['extension'])));
$email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['email'])));
$website = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['website'])));
$hours = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['hours'])));
$sla = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['sla'])));
$code = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['code'])));
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes'])));
$template_id = intval($_POST['template_id']);
mysqli_query($mysqli,"INSERT INTO vendors SET vendor_name = '$name', vendor_description = '$description', vendor_country = '$country', vendor_address = '$address', vendor_city = '$city', vendor_state = '$state', vendor_zip = '$zip', vendor_contact_name = '$contact_name', vendor_phone = '$phone', vendor_extension = '$extension', vendor_email = '$email', vendor_website = '$website', vendor_account_number = '$account_number', vendor_notes = '$notes', vendor_client_id = $client_id, company_id = $session_company_id");
mysqli_query($mysqli,"INSERT INTO vendors SET vendor_name = '$name', vendor_description = '$description', vendor_contact_name = '$contact_name', vendor_phone = '$phone', vendor_extension = '$extension', vendor_email = '$email', vendor_website = '$website', vendor_hours = '$hours', vendor_sla = '$sla', vendor_code = '$code', vendor_account_number = '$account_number', vendor_notes = '$notes', vendor_template_id = $template_id, vendor_client_id = $client_id, company_id = $session_company_id");
$vendor_id = mysqli_insert_id($mysqli);
@ -1763,19 +1763,18 @@ if(isset($_POST['edit_vendor'])){
$name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['name'])));
$description = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['description'])));
$account_number = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['account_number'])));
$country = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['country'])));
$address = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['address'])));
$city = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['city'])));
$state = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['state'])));
$zip = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['zip'])));
$contact_name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['contact_name'])));
$phone = preg_replace("/[^0-9]/", '',$_POST['phone']);
$extension = preg_replace("/[^0-9]/", '',$_POST['extension']);
$extension = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['extension'])));
$email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['email'])));
$website = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['website'])));
$hours = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['hours'])));
$sla = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['sla'])));
$code = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['code'])));
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes'])));
$template_id = intval($_POST['template_id']);
mysqli_query($mysqli,"UPDATE vendors SET vendor_name = '$name', vendor_description = '$description', vendor_country = '$country', vendor_address = '$address', vendor_city = '$city', vendor_state = '$state', vendor_zip = '$zip', vendor_contact_name = '$contact_name', vendor_phone = '$phone', vendor_extension = '$extension', vendor_email = '$email', vendor_website = '$website', vendor_account_number = '$account_number', vendor_notes = '$notes' WHERE vendor_id = $vendor_id AND company_id = $session_company_id");
mysqli_query($mysqli,"UPDATE vendors SET vendor_name = '$name', vendor_description = '$description', vendor_contact_name = '$contact_name', vendor_phone = '$phone', vendor_extension = '$extension', vendor_email = '$email', vendor_website = '$website', vendor_hours = '$hours', vendor_sla = '$sla', vendor_code = '$code',vendor_account_number = '$account_number', vendor_notes = '$notes', vendor_template_id = $template_id WHERE vendor_id = $vendor_id AND company_id = $session_company_id");
//Logging
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Vendor', log_action = 'Modify', log_description = '$session_name modified vendor $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id, company_id = $session_company_id");

View File

@ -10,6 +10,7 @@
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="client_id" value="<?php if(isset($_GET['client_id'])){ echo $client_id; }else{ echo 0; } ?>">
<input type="hidden" name="template_id" value="0">
<div class="modal-body bg-white">
@ -18,10 +19,7 @@
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-address">Address</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-contact">Contact</a>
<a class="nav-link" data-toggle="pill" href="#pills-support">Support</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-notes">Notes</a>
@ -35,12 +33,12 @@
<div class="tab-pane fade show active" id="pills-details">
<div class="form-group">
<label>Name <strong class="text-danger">*</strong></label>
<label>Vendor Name <strong class="text-danger">*</strong></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
</div>
<input type="text" class="form-control" name="name" placeholder="Name" required autofocus>
<input type="text" class="form-control" name="name" placeholder="Vendor Name" required autofocus>
</div>
</div>
@ -64,80 +62,21 @@
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-address">
<div class="form-group">
<label>Address</label>
<label>Account Manager</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<input type="text" class="form-control" name="address"placeholder="Street Address" >
</div>
</div>
<div class="form-group">
<label>City</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-city"></i></span>
</div>
<input type="text" class="form-control" name="city" placeholder="City">
</div>
</div>
<div class="form-group">
<label>State / Province</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-flag"></i></span>
</div>
<input type="text" class="form-control" name="state" placeholder="State or Province">
</div>
</div>
<div class="form-group">
<label>Zip / Postal Code</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fab fa-fw fa-usps"></i></span>
</div>
<input type="text" class="form-control" name="zip" placeholder="Zip or Postal Code">
</div>
</div>
<div class="form-group">
<label>Country</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-flag"></i></span>
</div>
<select class="form-control select2" name="country">
<option value="">- Country -</option>
<?php foreach($countries_array as $country_name) { ?>
<option <?php if($session_company_country == $country_name){ echo "selected"; } ?> ><?php echo $country_name; ?></option>
<?php } ?>
</select>
<input type="text" class="form-control" name="contact_name" placeholder="Account manager's name">
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-contact">
<div class="tab-pane fade" id="pills-support">
<div class="form-group">
<label>Contact Name</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<input type="text" class="form-control" name="contact_name" placeholder="Vendor contact name">
</div>
</div>
<label>Phone</label>
<label>Support Phone</label>
<div class="form-row">
<div class="col-8">
<div class="form-group">
@ -150,27 +89,57 @@
</div>
</div>
<div class="col-4">
<input type="text" class="form-control" name="extension" placeholder="Extension">
<input type="text" class="form-control" name="extension" placeholder="Prompts">
</div>
</div>
<div class="form-group">
<label>Support Hours</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
</div>
<input type="text" class="form-control" name="hours" placeholder="Support Hours">
</div>
</div>
<div class="form-group">
<label>Email</label>
<label>Support Email</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
</div>
<input type="email" class="form-control" name="email" placeholder="Email">
<input type="email" class="form-control" name="email" placeholder="Support Email">
</div>
</div>
<div class="form-group">
<label>Website</label>
<label>Support Website URL</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
</div>
<input type="text" class="form-control" name="website" placeholder="Website include http://">
<input type="text" class="form-control" name="website" placeholder="Do not include http(s)://">
</div>
</div>
<div class="form-group">
<label>Pin/Code</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
</div>
<input type="text" class="form-control" name="code" placeholder="Access Code or Pin">
</div>
</div>
<div class="form-group">
<label>SLA</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-handshake"></i></span>
</div>
<input type="text" class="form-control" name="sla" placeholder="SLA Response Time">
</div>
</div>

View File

@ -9,6 +9,7 @@
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="vendor_id" value="<?php echo $vendor_id; ?>">
<input type="hidden" name="template_id" value="0">
<div class="modal-body bg-white">
<ul class="nav nav-pills nav-justified mb-3">
@ -16,10 +17,7 @@
<a class="nav-link active" data-toggle="pill" href="#pills-details<?php echo $vendor_id; ?>">Details</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-address<?php echo $vendor_id; ?>">Address</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-contact<?php echo $vendor_id; ?>">Contact</a>
<a class="nav-link" data-toggle="pill" href="#pills-support<?php echo $vendor_id; ?>">Support</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-notes<?php echo $vendor_id; ?>">Notes</a>
@ -33,12 +31,12 @@
<div class="tab-pane fade show active" id="pills-details<?php echo $vendor_id; ?>">
<div class="form-group">
<label>Name <strong class="text-danger">*</strong></label>
<label>Vendor Name <strong class="text-danger">*</strong></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
</div>
<input type="text" class="form-control" name="name" placeholder="Name" value="<?php echo "$vendor_name"; ?>" required>
<input type="text" class="form-control" name="name" placeholder="Vendor Name" value="<?php echo "$vendor_name"; ?>" required>
</div>
</div>
@ -62,71 +60,8 @@
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-address<?php echo $vendor_id; ?>">
<div class="form-group">
<label>Address</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
</div>
<input type="text" class="form-control" name="address"placeholder="Street Address" value="<?php echo $vendor_address; ?>">
</div>
</div>
<div class="form-group">
<label>City</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-city"></i></span>
</div>
<input type="text" class="form-control" name="city" placeholder="City" value="<?php echo $vendor_city; ?>">
</div>
</div>
<div class="form-group">
<label>State / Province</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-flag"></i></span>
</div>
<input type="text" class="form-control" name="state" placeholder="State or Province" value="<?php echo $vendor_state; ?>">
</div>
</div>
<div class="form-group">
<label>Zip / Postal Code</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fab fa-fw fa-usps"></i></span>
</div>
<input type="text" class="form-control" name="zip" placeholder="Zip or Postal Code" value="<?php echo $vendor_zip; ?>">
</div>
</div>
<div class="form-group">
<label>Country</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-flag"></i></span>
</div>
<select class="form-control select2" name="country">
<option value="">- Country -</option>
<?php foreach($countries_array as $country_name) { ?>
<option <?php if($vendor_country == $country_name) { echo "selected"; } ?>><?php echo $country_name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-contact<?php echo $vendor_id; ?>">
<div class="form-group">
<label>Contact Name</label>
<label>Account Manager</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
@ -135,7 +70,11 @@
</div>
</div>
<label>Phone</label>
</div>
<div class="tab-pane fade" id="pills-support<?php echo $vendor_id; ?>">
<label>Support Phone</label>
<div class="form-row">
<div class="col-8">
<div class="form-group">
@ -148,27 +87,57 @@
</div>
</div>
<div class="col-4">
<input type="text" class="form-control" name="extension" placeholder="Extension" value="<?php echo $vendor_extension; ?>">
<input type="text" class="form-control" name="extension" placeholder="Prompts" value="<?php echo $vendor_extension; ?>">
</div>
</div>
<div class="form-group">
<label>Support Hours</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
</div>
<input type="text" class="form-control" name="hours" placeholder="Support Hours" value="<?php echo $vendor_hours; ?>">
</div>
</div>
<div class="form-group">
<label>Email</label>
<label>Support Email</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
</div>
<input type="email" class="form-control" name="email" placeholder="Email" value="<?php echo $vendor_email; ?>">
<input type="email" class="form-control" name="email" placeholder="Support Email" value="<?php echo $vendor_email; ?>">
</div>
</div>
<div class="form-group">
<label>Website</label>
<label>Support Website URL</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
</div>
<input type="text" class="form-control" name="website" placeholder="Website include http://" value="<?php echo $vendor_website; ?>">
<input type="text" class="form-control" name="website" placeholder="Do not include http(s)://" value="<?php echo $vendor_website; ?>">
</div>
</div>
<div class="form-group">
<label>SLA</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-handshake"></i></span>
</div>
<input type="text" class="form-control" name="sla" placeholder="SLA Response Time" value="<?php echo $vendor_sla; ?>">
</div>
</div>
<div class="form-group">
<label>Pin/Code</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
</div>
<input type="text" class="form-control" name="code" placeholder="Access Code or Pin" value="<?php echo $vendor_code; ?>">
</div>
</div>

View File

@ -105,11 +105,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$vendor_description_display = $vendor_description;
}
$vendor_account_number = $row['vendor_account_number'];
$vendor_country = $row['vendor_country'];
$vendor_address = $row['vendor_address'];
$vendor_city = $row['vendor_city'];
$vendor_state = $row['vendor_state'];
$vendor_zip = $row['vendor_zip'];
$vendor_contact_name = $row['vendor_contact_name'];
if(empty($vendor_contact_name)){
$vendor_contact_name_display = "-";
@ -120,7 +115,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$vendor_extension = $row['vendor_extension'];
$vendor_email = $row['vendor_email'];
$vendor_website = $row['vendor_website'];
$vendor_notes = $row['vendor_notes']
$vendor_hours = $row['vendor_hours'];
$vendor_sla = $row['vendor_sla'];
$vendor_code = $row['vendor_code'];
$vendor_notes = $row['vendor_notes'];
$vendor_template_id = $row['vendor_template_id'];
?>