mirror of https://github.com/itflow-org/itflow
Merge pull request #624 from wrongecho/software-bug
Bugfix Software/logins on contact details page
This commit is contained in:
commit
fbe2a65ba8
|
|
@ -50,7 +50,14 @@ if (isset($_GET['contact_id'])) {
|
|||
|
||||
// Related Software Query
|
||||
//$sql_related_software = mysqli_query($mysqli, "SELECT * FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software.company_id = $session_company_id ORDER BY software.software_id DESC");
|
||||
$sql_related_software = mysqli_query($mysqli, "SELECT * FROM software_contacts LEFT JOIN software ON software_contacts.software_id = software.software_id LEFT JOIN logins on software.software_id = logins.login_id WHERE software_contacts.contact_id = $contact_id AND software.company_id = $session_company_id ORDER BY software.software_id DESC");
|
||||
$sql_related_software = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM software_contacts
|
||||
LEFT JOIN software ON software_contacts.software_id = software.software_id
|
||||
LEFT JOIN logins on software.software_id = logins.login_software_id
|
||||
WHERE software_contacts.contact_id = $contact_id AND software.company_id = $session_company_id
|
||||
ORDER BY software.software_id DESC"
|
||||
);
|
||||
|
||||
$software_count = mysqli_num_rows($sql_related_software);
|
||||
|
||||
|
|
|
|||
6
post.php
6
post.php
|
|
@ -4305,7 +4305,7 @@ if(isset($_POST['add_contact'])){
|
|||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Contact', log_action = 'Create', log_description = '$session_name created contact $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $contact_id, company_id = $session_company_id");
|
||||
|
||||
$_SESSION['alert_message'] .= "Contact <strong>$name</strong> created" . $extended_alert_description;
|
||||
$_SESSION['alert_message'] = "Contact <strong>$name</strong> created" . $extended_alert_description;
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
|
|
@ -5556,8 +5556,8 @@ if(isset($_POST['edit_software'])){
|
|||
$expire = "0000-00-00";
|
||||
}
|
||||
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes'])));
|
||||
$username = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['username'])));
|
||||
$password = trim(mysqli_real_escape_string($mysqli,encryptLoginEntry($_POST['password'])));
|
||||
$username = trim(mysqli_real_escape_string($mysqli, encryptLoginEntry($_POST['username'])));
|
||||
$password = trim(mysqli_real_escape_string($mysqli, encryptLoginEntry($_POST['password'])));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE software SET software_name = '$name', software_version = '$version', software_type = '$type', software_key = '$key', software_license_type = '$license_type', software_seats = $seats, software_purchase = '$purchase', software_expire = '$expire', software_notes = '$notes' WHERE software_id = $software_id AND company_id = $session_company_id");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue