diff --git a/client.php b/client.php index a8943b74..887ed6a2 100644 --- a/client.php +++ b/client.php @@ -98,14 +98,14 @@ if(isset($_GET['client_id'])){
-
+ -
+

Contact

-
+

Standings

Paid
$
Balance
$
-
+

Net Terms

Days
-
+
+
+
+ + +
+ +
+ +
+
+
+
+
+ + "> + + + + + + + + + + + 2){ + $contact_phone = substr($row['contact_phone'],0,3)."-".substr($row['contact_phone'],3,3)."-".substr($row['contact_phone'],6,4); + } + $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']; + $contact_photo = $row['contact_photo']; + $contact_initials = initials($contact_name); + $client_id = $row['client_id']; + $client_name = $row['client_name']; + + ?> + + + + + + + + + + + + + + +
NameClientTitleEmailPhoneAction
+ + + + + + + + + + + +
+ + +
+
+
+ + +
+ + + +
+ +
+ + +
+ + + +
+
+
+ + \ No newline at end of file diff --git a/dashboard.php b/dashboard.php index 05b9ab73..ebc95e92 100644 --- a/dashboard.php +++ b/dashboard.php @@ -63,6 +63,15 @@ $sql_latest_expenses = mysqli_query($mysqli,"SELECT * FROM expenses, vendors, ca ORDER BY expense_id DESC LIMIT 5" ); +//Get Total Miles Driven +$sql_miles_driven = mysqli_query($mysqli,"SELECT SUM(trip_miles) AS total_miles FROM trips WHERE YEAR(trip_date) = $year AND company_id = $session_company_id"); +$row = mysqli_fetch_array($sql_miles_driven); +$total_miles = $row['total_miles']; + +//Get Total Clients added +$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_id') AS clients_added FROM clients WHERE YEAR(client_created_at) = $year AND company_id = $session_company_id")); +$clients_added = $row['clients_added']; + ?>
@@ -285,6 +294,22 @@ $sql_latest_expenses = mysqli_query($mysqli,"SELECT * FROM expenses, vendors, ca
+
+
+
+
+ Fun Stats +
+
+
    +
  • Miles Driven:
  • +
  • Clients Added:
  • +
+
+
+
+
+ diff --git a/domains.php b/domains.php new file mode 100644 index 00000000..54a48861 --- /dev/null +++ b/domains.php @@ -0,0 +1,142 @@ + $sb, 'o' => $o))); + +if(isset($_GET['p'])){ + $p = intval($_GET['p']); + $record_from = (($p)-1)*10; + $record_to = 10; +}else{ + $record_from = 0; + $record_to = 10; + $p = 1; +} + +if(isset($_GET['q'])){ + $q = mysqli_real_escape_string($mysqli,$_GET['q']); +}else{ + $q = ""; +} + +if(!empty($_GET['sb'])){ + $sb = mysqli_real_escape_string($mysqli,$_GET['sb']); +}else{ + $sb = "domain_id"; +} + +if(isset($_GET['o'])){ + if($_GET['o'] == 'ASC'){ + $o = "ASC"; + $disp = "DESC"; + }else{ + $o = "DESC"; + $disp = "ASC"; + } +}else{ + $o = "ASC"; + $disp = "DESC"; +} + +$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM domains, clients + WHERE domains.client_id = clients.client_id AND domains.company_id = $session_company_id AND (domain_name LIKE '%$q%') + ORDER BY $sb $o LIMIT $record_from, $record_to"); + +$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); +$total_found_rows = $num_rows[0]; +$total_pages = ceil($total_found_rows / 10); + +?> + +
+
+
Domains
+ +
+
+ +
+ +
+ +
+
+ +
+
+ + "> + + + + + + + + + + + + + + + + + + + + + + + + +
DomainClientRegistrarWebHostExpireAction
+ + +
+ + + +
+
+
+ + + diff --git a/footer.php b/footer.php index effc0922..2849aaba 100644 --- a/footer.php +++ b/footer.php @@ -35,6 +35,7 @@ + diff --git a/get_settings.php b/get_settings.php index 6e5e5e0a..39ffc81f 100644 --- a/get_settings.php +++ b/get_settings.php @@ -52,6 +52,10 @@ $config_default_net_terms = $row['config_default_net_terms']; $config_recurring_auto_send_invoice = $row['config_recurring_auto_send_invoice']; +$config_stripe_enable = $row['config_stripe_enable']; +$config_stripe_publishable = $row['config_stripe_publishable']; +$config_stripe_secret = $row['config_stripe_secret']; + $config_api_key = $row['config_api_key']; $config_base_url = $row['config_base_url']; $config_enable_cron = $row['config_enable_cron']; diff --git a/guest_view_invoice.php b/guest_view_invoice.php index 75fb835f..e7a5edbb 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -56,6 +56,10 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ } $config_company_email = $row['config_company_email']; $config_invoice_logo = $row['config_invoice_logo']; + $config_stripe_enable = $row['config_stripe_enable']; + $config_stripe_publishable = $row['config_stripe_publishable']; + $config_stripe_secret = $row['config_stripe_secret']; + $ip = get_ip(); $os = get_os(); $browser = get_web_browser(); @@ -112,9 +116,9 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ Print Download PDF - Pay Online (Comming Soon) + Pay Online (Coming Soon)
diff --git a/post.php b/post.php index 2cecfc85..24e581a4 100644 --- a/post.php +++ b/post.php @@ -318,6 +318,22 @@ if(isset($_POST['edit_alert_settings'])){ } +if(isset($_POST['edit_online_payment_settings'])){ + + $config_stripe_enable = intval($_POST['config_stripe_enable']); + $config_stripe_publishable = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_stripe_publishable'])); + $config_stripe_secret = strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_stripe_secret'])); + + mysqli_query($mysqli,"UPDATE settings SET config_stripe_enable = $config_stripe_enable, config_stripe_publishable = '$config_stripe_publishable', config_stripe_secret = '$config_stripe_secret' WHERE company_id = $session_company_id"); + + //Logging + mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Settings', log_action = 'Modified', log_description = 'Online Payment', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id"); + + $_SESSION['alert_message'] = "Online Payment Settings Updated"; + + header("Location: " . $_SERVER["HTTP_REFERER"]); +} + if(isset($_POST['enable_2fa'])){ $token = mysqli_real_escape_string($mysqli,$_POST['token']); diff --git a/settings-nav.php b/settings-nav.php index a803ba3a..67cae493 100644 --- a/settings-nav.php +++ b/settings-nav.php @@ -63,6 +63,14 @@ Alerts + + +