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']; //Query each table and store them in their array $sql_contacts = mysqli_query($mysqli,"SELECT * FROM client_contacts WHERE client_id = $client_id ORDER BY client_contact_id DESC"); $sql_locations = mysqli_query($mysqli,"SELECT * FROM client_locations WHERE client_id = $client_id ORDER BY client_location_id DESC"); $sql_assets = mysqli_query($mysqli,"SELECT * FROM client_assets WHERE client_id = $client_id ORDER BY client_asset_id DESC"); $sql_vendors = mysqli_query($mysqli,"SELECT * FROM client_vendors WHERE client_id = $client_id ORDER BY client_vendor_id DESC"); $sql_logins = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_id = $client_id ORDER BY client_login_id DESC"); $sql_networks = mysqli_query($mysqli,"SELECT * FROM client_networks WHERE client_id = $client_id ORDER BY client_network_id DESC"); $sql_domains = mysqli_query($mysqli,"SELECT * FROM client_domains WHERE client_id = $client_id ORDER BY client_domain_id DESC"); $sql_applications = mysqli_query($mysqli,"SELECT * FROM client_applications WHERE client_id = $client_id ORDER BY client_application_id DESC"); $sql_invoices = mysqli_query($mysqli,"SELECT * FROM invoices WHERE client_id = $client_id ORDER BY invoices.invoice_date 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_invoices, invoices WHERE invoices.invoice_id = recurring_invoices.invoice_id AND invoices.client_id = $client_id ORDER BY recurring_invoices.recurring_invoice_id DESC"); $sql_notes = mysqli_query($mysqli,"SELECT * FROM client_notes WHERE client_id = $client_id ORDER BY client_note_id DESC"); //Get Counts $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_contact_id') AS num FROM client_contacts WHERE client_id = $client_id")); $num_contacts = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_location_id') AS num FROM client_locations WHERE client_id = $client_id")); $num_locations = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_asset_id') AS num FROM client_assets WHERE client_id = $client_id")); $num_assets = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_vendor_id') AS num FROM client_vendors WHERE client_id = $client_id")); $num_vendors = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_login_id') AS num FROM client_logins WHERE client_id = $client_id")); $num_logins = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_network_id') AS num FROM client_networks WHERE client_id = $client_id")); $num_networks = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_domain_id') AS num FROM client_domains WHERE client_id = $client_id")); $num_domains = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_application_id') AS num FROM client_applications WHERE client_id = $client_id")); $num_applications = $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_invoice_id') AS num FROM recurring_invoices, invoices WHERE recurring_invoices.invoice_id = invoices.invoice_id AND invoices.client_id = $client_id")); $num_recurring = $row['num']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_note_id') AS num FROM client_notes WHERE client_id = $client_id")); $num_notes = $row['num']; ?>

Address
City State Zip
Phone
Email
Website
Table of Contents
    0){ ?>
  • Contacts
  • 0){ ?>
  • Locations
  • 0){ ?>
  • Assets
  • 0){ ?>
  • Vendors
  • 0){ ?>
  • Logins
  • 0){ ?>
  • Networks
  • 0){ ?>
  • Domains
  • 0){ ?>
  • Applications
  • 0){ ?>
  • Invoices
  • 0){ ?>
  • Payments
  • 0){ ?>
  • Quotes
  • 0){ ?>
  • Recurring
  • 0){ ?>
  • Attachments
  • 0){ ?>
  • Notes
0){ ?>

Contacts

2){ $client_contact_phone = substr($row['client_contact_phone'],0,3)."-".substr($row['client_contact_phone'],3,3)."-".substr($row['client_contact_phone'],6,4); } $client_contact_email = $row['client_contact_email']; ?>
Name Title Phone Email
0){ ?>

Locations

2){ $client_location_phone = substr($row['client_location_phone'],0,3)."-".substr($row['client_location_phone'],3,3)."-".substr($row['client_location_phone'],6,4); } ?>
Location Address Phone
0){ ?>

Assets

Type Name Make Serial
0){ ?>

Vendors

Vendor Description Account Number
0){ ?>

Logins

Description Username Password
0){ ?>

Networks

Name Network Gateway DHCP Range
0){ ?>

Domains

Domain Registrar Expire Server
0){ ?>

Applications

Application Type License
0){ ?>

Invoices

Number Amount Date Due Status
INV- $
0){ ?>

Payments

Date Invoice Amount Account Method
INV- $
0){ ?>

Quotes

Number Amount Date Status
QUO- $
0){ ?>

Recurring Invoices

Frequency Start Date Last Sent Next Date Status
ly
0){ ?>

Notes