diff --git a/client.php b/client.php index 3bc08704..c9b16ce2 100644 --- a/client.php +++ b/client.php @@ -218,7 +218,8 @@ $location_phone = formatPhoneNumber($location_phone);
diff --git a/client_print_old.php b/client_print_old.php deleted file mode 100644 index 10a04f7c..00000000 --- a/client_print_old.php +++ /dev/null @@ -1,542 +0,0 @@ - - -2){ - $client_phone = substr($row['client_phone'],0,3)."-".substr($row['client_phone'],3,3)."-".substr($row['client_phone'],6,4); - } - $client_website = $row['client_website']; - $client_net_terms = $row['client_net_terms']; - - //Query each table and store them in their array - $sql_contacts = mysqli_query($mysqli,"SELECT * FROM contacts WHERE client_id = $client_id ORDER BY contact_name ASC"); - $sql_locations = mysqli_query($mysqli,"SELECT * FROM locations WHERE client_id = $client_id ORDER BY location_name ASC"); - $sql_assets = mysqli_query($mysqli,"SELECT * FROM assets WHERE client_id = $client_id ORDER BY asset_type ASC"); - $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE client_id = $client_id ORDER BY vendor_name ASC"); - $sql_logins = mysqli_query($mysqli,"SELECT *, AES_DECRYPT(login_password, '$config_aes_key') AS login_password FROM logins WHERE client_id = $client_id ORDER BY login_name ASC"); - $sql_networks = mysqli_query($mysqli,"SELECT * FROM networks WHERE client_id = $client_id ORDER BY network_name ASC"); - $sql_domains = mysqli_query($mysqli,"SELECT * FROM domains WHERE client_id = $client_id ORDER BY domain_name ASC"); - $sql_software = mysqli_query($mysqli,"SELECT * FROM software WHERE client_id = $client_id ORDER BY software_name ASC"); - $sql_invoices = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id ORDER BY invoice_number DESC"); - - $sql_payments = mysqli_query($mysqli,"SELECT * FROM payments, invoices, accounts - WHERE invoices.client_id = $client_id - AND payments.invoice_id = invoices.invoice_id - AND payments.account_id = accounts.account_id - ORDER BY payments.payment_id DESC"); - - $sql_quotes = mysqli_query($mysqli,"SELECT * FROM quotes WHERE client_id = $client_id ORDER BY quote_number DESC"); - - $sql_recurring = mysqli_query($mysqli,"SELECT * FROM recurring WHERE client_id = $client_id ORDER BY recurring_id DESC"); - - $sql_documents = mysqli_query($mysqli,"SELECT * FROM documents WHERE client_id = $client_id ORDER BY document_created_at DESC"); - - //Get Counts - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('contact_id') AS num FROM contacts WHERE client_id = $client_id")); - $num_contacts = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('location_id') AS num FROM locations WHERE client_id = $client_id")); - $num_locations = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('asset_id') AS num FROM assets WHERE client_id = $client_id")); - $num_assets = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('vendor_id') AS num FROM vendors WHERE client_id = $client_id")); - $num_vendors = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('login_id') AS num FROM logins WHERE client_id = $client_id")); - $num_logins = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('network_id') AS num FROM networks WHERE client_id = $client_id")); - $num_networks = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('domain_id') AS num FROM domains WHERE client_id = $client_id")); - $num_domains = $row['num']; - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('software_id') AS num FROM software WHERE client_id = $client_id")); - $num_software = $row['num']; - - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('invoice_id') AS num FROM invoices WHERE client_id = $client_id")); - $num_invoices = $row['num']; - - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('payment_id') AS num FROM payments, invoices WHERE payments.invoice_id = invoices.invoice_id AND invoices.client_id = $client_id")); - $num_payments = $row['num']; - - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('quote_id') AS num FROM quotes WHERE client_id = $client_id")); - $num_quotes = $row['num']; - - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('recurring_id') AS num FROM recurring WHERE client_id = $client_id")); - $num_recurring = $row['num']; - - $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('document_id') AS num FROM documents WHERE client_id = $client_id")); - $num_documents = $row['num']; - -?> - - - - - - -
-
- - - - - - - - - - - - - -
DocumentIT DocumentationDate
Prepared ByConfidential
-
-
-
-
-

- - - - - - - - - - - - - - - - - - - - - -
Address - -
- -
Phone
Email
Website
Net Terms Day
-
-
-
-
- Table of Contents -
-
- -
-
-
-
- - - 0){ ?> - -
-

Contacts ()

- - - - - - - - - - - - 2){ - $contact_phone = substr($row['contact_phone'],0,3)."-".substr($row['contact_phone'],3,3)."-".substr($row['contact_phone'],6,4); - } - $contact_extension = $row['contact_extension']; - if(!empty($contact_extension)){ - $contact_extension = "x$contact_extension"; - } - $contact_mobile = $row['contact_mobile']; - if(strlen($contact_mobile)>2){ - $contact_mobile = substr($row['contact_mobile'],0,3)."-".substr($row['contact_mobile'],3,3)."-".substr($row['contact_mobile'],6,4); - } - $contact_email = $row['contact_email']; - - ?> - - - - - - - - - - - -
NameTitleEmailPhoneMobile
-
- - - 0){ ?> -

Locations ()

- - - - - - - - - - 2){ - $location_phone = substr($row['location_phone'],0,3)."-".substr($row['location_phone'],3,3)."-".substr($row['location_phone'],6,4); - } - - ?> - - - - - - - - - -
LocationAddressPhone
$location_city $location_state $location_zip"; ?>
- - - - 0){ ?> -

Assets ()

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameMakeModelSerialOSIPMACPurchase DateWarranty Expire
- - - - 0){ ?> -

Vendors ()

- - - - - - - - - - - - - - 2){ - $vendor_phone = substr($row['vendor_phone'],0,3)."-".substr($row['vendor_phone'],3,3)."-".substr($row['vendor_phone'],6,4); - } - $vendor_email = $row['vendor_email']; - $vendor_website = $row['vendor_website']; - - ?> - - - - - - - - - - - - - -
VendorDescriptionContact NamePhoneEmailWebsiteAccount Number
- - - - 0){ ?> -

Logins ()

- - - - - - - - - - - - - - - - - - - - - - -
NameURL/HostUsernamePassword
- - - - 0){ ?> -

Networks ()

- - - - - - - - - - - - - - - - - - - - - - - -
NamevLANNetworkGatewayDHCP Range
- - - - 0){ ?> -

Domains ()

- - - - - - - - - - - - - - - - - - - - - - - -
DomainRegistrarWebhostExpire
- - - - 0){ ?> -

Software ()

- - - - - - - - - - - - - - - - - - - -
SoftwareTypeLicense
- - - - - @@ -221,7 +236,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); if(!empty($client_type)){ ?>
- + -
Added: diff --git a/edit_client_modal.php b/edit_client_modal.php index 84e4bdca..5bbbca84 100644 --- a/edit_client_modal.php +++ b/edit_client_modal.php @@ -26,6 +26,9 @@ +
@@ -262,6 +265,36 @@ + +
+ + + +
diff --git a/post.php b/post.php index 32e4d7cc..c1e3ff08 100644 --- a/post.php +++ b/post.php @@ -5371,7 +5371,9 @@ if(isset($_GET['export_client_pdf'])){ $sql_contacts = mysqli_query($mysqli,"SELECT * FROM contacts WHERE contact_client_id = $client_id ORDER BY contact_name ASC"); $sql_locations = mysqli_query($mysqli,"SELECT * FROM locations WHERE location_client_id = $client_id ORDER BY location_name ASC"); $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE vendor_client_id = $client_id ORDER BY vendor_name ASC"); - $sql_logins = mysqli_query($mysqli,"SELECT *, AES_DECRYPT(login_password, '$config_aes_key') AS login_password FROM logins WHERE login_client_id = $client_id ORDER BY login_name ASC"); + if(isset($_GET['passwords'])){ + $sql_logins = mysqli_query($mysqli,"SELECT *, AES_DECRYPT(login_password, '$config_aes_key') AS login_password FROM logins WHERE login_client_id = $client_id ORDER BY login_name ASC"); + } $sql_assets = mysqli_query($mysqli,"SELECT * FROM assets WHERE asset_client_id = $client_id ORDER BY asset_type ASC"); $sql_networks = mysqli_query($mysqli,"SELECT * FROM networks WHERE network_client_id = $client_id ORDER BY network_name ASC"); $sql_domains = mysqli_query($mysqli,"SELECT * FROM domains WHERE domain_client_id = $client_id ORDER BY domain_name ASC"); @@ -5675,6 +5677,7 @@ if(isset($_GET['export_client_pdf'])){ //Vendors END //Logins Start + { text: 'Logins', style: 'title' @@ -5744,6 +5747,7 @@ if(isset($_GET['export_client_pdf'])){ ] } }, + //Logins END //Assets Start