diff --git a/client_print.php b/client_print.php index d7e736ae..135e16df 100644 --- a/client_print.php +++ b/client_print.php @@ -452,7 +452,7 @@ if(isset($_GET['client_id'])){ 0){ ?> -

Web Domains ()

+

Domains ()

diff --git a/client_print_old.php b/client_print_old.php new file mode 100644 index 00000000..10a04f7c --- /dev/null +++ b/client_print_old.php @@ -0,0 +1,542 @@ + + +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
+ + + + +