Migrated from sbadmin to AdminLTE CSS framework

This commit is contained in:
johnny@pittpc.com 2019-11-19 18:29:02 -05:00
parent bf9b659283
commit e5036253ed
2393 changed files with 218489 additions and 148153 deletions

View File

@ -167,7 +167,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
</div>
<input type="text" class="form-control" name="ip" placeholder="IP Address">
<input type="text" class="form-control" name="ip" placeholder="IP Address" data-inputmask="'alias': 'ip'">
</div>
</div>

View File

@ -107,7 +107,7 @@
</div>
<div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">
<div class="tab-pane fade" id="pills-contact">
<div class="form-group">
<label>Primary Contact</label>
@ -125,7 +125,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
</div>
<input type="text" class="form-control" name="phone" placeholder="Phone Number" data-inputmask="'mask': '999-999-9999'">
<input type="text" class="form-control" name="phone" placeholder="Phone Number" data-inputmask="'mask': '999-999-9999'" data-mask>
</div>
</div>

View File

@ -36,7 +36,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-route"></i></span>
</div>
<input type="text" class="form-control" name="gateway" placeholder="ex 192.168.1.1" required>
<input type="text" class="form-control" name="gateway" placeholder="ex 192.168.1.1" data-inputmask="'alias': 'ip'" required>
</div>
</div>

View File

@ -8,7 +8,9 @@ if(isset($_GET['calendar_id'])){
?>
<div id='calendar'></div>
<div class="card">
<div id='calendar'></div>
</div>
<?php include("add_calendar_event_modal.php"); ?>
<?php include("add_calendar_modal.php"); ?>

View File

@ -1,246 +1,231 @@
<!-- Client Sidebar -->
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4 d-print-none">
<!-- Brand Logo -->
<a href="index3.html" class="brand-link">
<img src="dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light"><?php echo $config_app_name; ?></span>
</a>
<ul class="sidebar navbar-nav d-print-none bg-primary">
<li class="nav-item">
<a class="nav-link" href="clients.php">
<button class="btn btn-outline-light btn-block">
<i class="fas fa-fw fa-arrow-left"></i>
<span>Back</span>
</button>
</a>
</li>
<!-- Sidebar -->
<div class="sidebar">
<li class="nav-item <?php if($_GET['tab'] == "overview") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=overview">
<i class="fas fa-fw fa-chart-bar mx-2"></i>
<span>Overview</span>
</a>
</li>
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<li class="nav-item">
<a href="clients.php" class="nav-link">
<i class="nav-icon fas fa-arrow-left"></i>
<p>Back</p>
</a>
</li>
<li class="nav-header">CLIENT</li>
<li class="nav-item <?php if($_GET['tab'] == "contacts") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=contacts">
<i class="fas fa-fw fa-users mx-2"></i>
<span>Contacts
<?php
if($num_contacts > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_contacts; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=contacts" class="nav-link <?php if($_GET['tab'] == "contacts") { echo "active"; } ?>">
<i class="nav-icon fas fa-users"></i>
<p>
Contacts
<?php
if($num_contacts > 0){ ?>
<span class="right badge badge-light"><?php echo $num_contacts; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "locations") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=locations">
<i class="fas fa-fw fa-map-marker-alt mx-2"></i>
<span>Locations
<?php
if($num_locations > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_locations; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "assets") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=assets">
<i class="fas fa-fw fa-laptop mx-2"></i>
<span>Assets
<?php
if($num_assets > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_assets; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=locations" class="nav-link <?php if($_GET['tab'] == "locations") { echo "active"; } ?>">
<i class="nav-icon fas fa-map-marker-alt"></i>
<p>
Locations
<?php
if($num_locations > 0){ ?>
<span class="right badge badge-light"><?php echo $num_locations; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "tickets") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=tickets">
<i class="fas fa-fw fa-tags mx-2"></i>
<span>Tickets
<?php
if($num_tickets > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_tickets; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "vendors") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=vendors">
<i class="fas fa-fw fa-building mx-2"></i>
<span>Vendors
<?php
if($num_vendors > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_vendors; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "logins") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=logins">
<i class="fas fa-fw fa-key mx-2"></i>
<span>Logins
<?php
if($num_logins > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_logins; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "networks") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=networks">
<i class="fas fa-fw fa-network-wired mx-2"></i>
<span>Networks
<?php
if($num_networks > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_networks; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "domains") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=domains">
<i class="fas fa-fw fa-globe mx-2"></i>
<span>Domains
<?php
if($num_domains > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_domains; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "software") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=software">
<i class="fas fa-fw fa-rocket mx-2"></i>
<span>Software
<?php
if($num_software > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_software; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "invoices") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=invoices">
<i class="fas fa-fw fa-file mx-2"></i>
<span>Invoices
<?php
if($num_invoices > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_invoices; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "recurring") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=recurring">
<i class="fas fa-fw fa-copy mx-2"></i>
<span>Recurring
<?php
if($num_recurring > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_recurring; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "quotes") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=quotes">
<i class="fas fa-fw fa-file mx-2"></i>
<span>Quotes
<?php
if($num_quotes > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_quotes; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "payments") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=payments">
<i class="fas fa-fw fa-credit-card mx-2"></i>
<span>Payments
<?php
if($num_payments > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_payments; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=assets" class="nav-link <?php if($_GET['tab'] == "assets") { echo "active"; } ?>">
<i class="nav-icon fas fa-laptop"></i>
<p>
Assets
<?php
if($num_assets > 0){ ?>
<span class="right badge badge-light"><?php echo $num_assets; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "files") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=files">
<i class="fas fa-fw fa-paperclip mx-2"></i>
<span>Files
<?php
if($num_files > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_files; ?></small>
<?php
}
?>
</span>
</a>
</li>
<li class="nav-item <?php if($_GET['tab'] == "notes") { echo "active"; } ?>">
<a class="nav-link"
href="?client_id=<?php echo $client_id; ?>&tab=notes">
<i class="fas fa-fw fa-edit mx-2"></i>
<span>Notes
<?php
if($num_notes > 0){ ?>
<small class="float-right badge-secondary badge-pill mt-1"><?php echo $num_notes; ?></small>
<?php
}
?>
</span>
</a>
</li>
</ul>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=tickets" class="nav-link <?php if($_GET['tab'] == "tickets") { echo "active"; } ?>">
<i class="nav-icon fas fa-tags"></i>
<p>
Tickets
<?php
if($num_tickets > 0){ ?>
<span class="right badge badge-light"><?php echo $num_tickets; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=vendors" class="nav-link <?php if($_GET['tab'] == "vendors") { echo "active"; } ?>">
<i class="nav-icon fas fa-building"></i>
<p>
Vendors
<?php
if($num_vendors > 0){ ?>
<span class="right badge badge-light"><?php echo $num_vendors; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-header">ASSETS</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=logins" class="nav-link <?php if($_GET['tab'] == "logins") { echo "active"; } ?>">
<i class="nav-icon fas fa-key"></i>
<p>
Logins
<?php
if($num_logins > 0){ ?>
<span class="right badge badge-light"><?php echo $num_logins; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=networks" class="nav-link <?php if($_GET['tab'] == "networks") { echo "active"; } ?>">
<i class="nav-icon fas fa-network-wired"></i>
<p>
Networks
<?php
if($num_networks > 0){ ?>
<span class="right badge badge-light"><?php echo $num_networks; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=domains" class="nav-link <?php if($_GET['tab'] == "domains") { echo "active"; } ?>">
<i class="nav-icon fas fa-globe"></i>
<p>
Domains
<?php
if($num_domains > 0){ ?>
<span class="right badge badge-light"><?php echo $num_domains; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=software" class="nav-link <?php if($_GET['tab'] == "software") { echo "active"; } ?>">
<i class="nav-icon fas fa-rocket"></i>
<p>
Software
<?php
if($num_software > 0){ ?>
<span class="right badge badge-light"><?php echo $num_software; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-header">PAYMENTS</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=invoices" class="nav-link <?php if($_GET['tab'] == "invoices") { echo "active"; } ?>">
<i class="nav-icon fas fa-file"></i>
<p>
Invoices
<?php
if($num_invoices > 0){ ?>
<span class="right badge badge-light"><?php echo $num_invoices; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=recurring" class="nav-link <?php if($_GET['tab'] == "recurring") { echo "active"; } ?>">
<i class="nav-icon fas fa-copy"></i>
<p>
Recurring
<?php
if($num_recurring > 0){ ?>
<span class="right badge badge-light"><?php echo $num_recurring; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=quotes" class="nav-link <?php if($_GET['tab'] == "quotes") { echo "active"; } ?>">
<i class="nav-icon fas fa-file"></i>
<p>
Quotes
<?php
if($num_quotes > 0){ ?>
<span class="right badge badge-light"><?php echo $num_quotes; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=payments" class="nav-link <?php if($_GET['tab'] == "payments") { echo "active"; } ?>">
<i class="nav-icon fas fa-credit-card"></i>
<p>
Payments
<?php
if($num_payments > 0){ ?>
<span class="right badge badge-light"><?php echo $num_payments; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-header">MORE</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=files" class="nav-link <?php if($_GET['tab'] == "files") { echo "active"; } ?>">
<i class="nav-icon fas fa-paperclip"></i>
<p>
Files
<?php
if($num_files > 0){ ?>
<span class="right badge badge-light"><?php echo $num_files; ?></span>
<?php } ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="?client_id=<?php echo $client_id; ?>&tab=notes" class="nav-link <?php if($_GET['tab'] == "notes") { echo "active"; } ?>">
<i class="nav-icon fas fa-edit"></i>
<p>
Notes
<?php
if($num_notes > 0){ ?>
<span class="right badge badge-light"><?php echo $num_notes; ?></span>
<?php } ?>
</p>
</a>
</li>
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>

View File

@ -45,12 +45,25 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
?>
<div class="card mb-3">
<div class="card-header bg-dark text-white">
<h6 class="float-left mt-2"><i class="fa fa-users mr-2"></i>Clients</h6>
<button type="button" class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientModal"><i class="fas fa-fw fa-plus"></i></button>
<div class="card">
<div class="card-header">
<h3 class="card-title">Simple Full Width Table</h3>
<div class="card-tools">
<ul class="pagination pagination-sm float-right">
<li class="page-item"><a class="page-link" href="#">&laquo;</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">&raquo;</a></li>
</ul>
</div>
</div>
<div class="card-header bg-gray-dark border-0">
<h3 class="card-title">Clients</h3>
<div class="card-tools">
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addClientModal">add</button>
</div>
</div>
<div class="card-body">
<form autocomplete="off">

191
clients_new.php Normal file
View File

@ -0,0 +1,191 @@
<?php include("header_new.php");
//Rebuild URL
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $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 = "client_id";
}
if(isset($_GET['o'])){
if($_GET['o'] == 'ASC'){
$o = "ASC";
$disp = "DESC";
}else{
$o = "DESC";
$disp = "ASC";
}
}else{
$o = "DESC";
$disp = "ASC";
}
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM clients WHERE (client_name LIKE '%$q%' OR client_email LIKE '%$q%' OR client_contact LIKE '%$q%') AND company_id = $session_company_id ORDER BY $sb $o LIMIT $record_from, $record_to");
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
?>
<div class="card mb-3">
<div class="card-header bg-dark text-white">
<h6 class="float-left mt-2"><i class="fa fa-users mr-2"></i>Clients</h6>
<button type="button" class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientModal"><i class="fas fa-fw fa-plus"></i></button>
</div>
<div class="card-body">
<form autocomplete="off">
<div class="input-group">
<input type="search" class="form-control col-md-4" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Clients">
<div class="input-group-append">
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
<hr>
<div class="table-responsive">
<table class="table table-striped table-borderless table-hover">
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
<tr>
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Name <i class="fa fa-sort-alpha<?php if($disp=='ASC'){ echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_type&o=<?php echo $disp; ?>">Type <i class="fa fa-sort"></i></a></th>
<th>Contact</th>
<th class="text-right">Balance</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql)){
$client_id = $row['client_id'];
$client_name = $row['client_name'];
$client_type = $row['client_type'];
$client_address = $row['client_address'];
$client_city = $row['client_city'];
$client_state = $row['client_state'];
$client_zip = $row['client_zip'];
$client_contact = $row['client_contact'];
$client_phone = $row['client_phone'];
if(strlen($client_phone)>2){
$client_phone = substr($row['client_phone'],0,3)."-".substr($row['client_phone'],3,3)."-".substr($row['client_phone'],6,4);
}
$client_mobile = $row['client_mobile'];
if(strlen($client_mobile)>2){
$client_mobile = substr($row['client_mobile'],0,3)."-".substr($row['client_mobile'],3,3)."-".substr($row['client_mobile'],6,4);
}
$client_email = $row['client_email'];
$client_website = $row['client_website'];
$client_net_terms = $row['client_net_terms'];
$client_hours = $row['client_hours'];
//Add up all the payments for the invoice and get the total amount paid to the invoice
$sql_invoice_amounts = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS invoice_amounts FROM invoices WHERE client_id = $client_id AND invoice_status NOT LIKE 'Draft' AND invoice_status NOT LIKE 'Cancelled' ");
$row = mysqli_fetch_array($sql_invoice_amounts);
$invoice_amounts = $row['invoice_amounts'];
$sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS amount_paid FROM payments, invoices WHERE payments.invoice_id = invoices.invoice_id AND invoices.client_id = $client_id");
$row = mysqli_fetch_array($sql_amount_paid);
$amount_paid = $row['amount_paid'];
$balance = $invoice_amounts - $amount_paid;
//set Text color on balance
if($balance > 0){
$balance_text_color = "text-danger font-weight-bold";
}else{
$balance_text_color = "";
}
?>
<tr>
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=contacts"><?php echo $client_name; ?></a></td>
<td><?php echo $client_type; ?></td>
<td>
<?php
if(!empty($client_contact)){
?>
<i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i><?php echo $client_contact; ?>
<br>
<?php
}
?>
<?php
if(!empty($client_phone)){
?>
<i class="fa fa-fw fa-phone text-secondary mr-2 mb-2"></i><?php echo $client_phone; ?>
<br>
<?php
}
?>
<?php
if(!empty($client_mobile)){
?>
<i class="fa fa-fw fa-mobile-alt text-secondary mr-2 mb-2"></i><?php echo $client_mobile; ?>
<br>
<?php
}
?>
<?php
if(!empty($client_email)){
?>
<i class="fa fa-fw fa-envelope text-secondary mr-2 mb-2"></i><a href="mailto:<?php echo $client_email; ?>"><?php echo $client_email; ?></a>
<?php
}
?>
</td>
<td class="text-right text-monospace <?php echo $balance_text_color; ?>">$<?php echo number_format($balance,2); ?></td>
<td>
<div class="dropdown dropleft text-center">
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-ellipsis-h"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editClientModal<?php echo $client_id; ?>">Edit</a>
<a class="dropdown-item" href="post.php?delete_client=<?php echo $client_id; ?>">Delete</a>
</div>
</div>
<?php include("edit_client_modal.php"); ?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php include("pagination.php"); ?>
</div>
</div>
</div>
<?php include("add_client_modal.php"); ?>
<?php include("footer_new.php");

View File

@ -72,6 +72,11 @@ $total_miles = $row['total_miles'];
$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'];
//Get Total of Recurring Invoices
$sql_total_recurring_invoice_amount = mysqli_query($mysqli,"SELECT SUM(recurring_amount) AS total_recurring_invoice_amount FROM recurring WHERE YEAR(payment_date) = $year AND company_id = $session_company_id");
$row = mysqli_fetch_array($sql_total_recurring_invoice_amount);
$total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
?>
<form>
@ -92,38 +97,77 @@ $clients_added = $row['clients_added'];
<!-- Icon Cards-->
<div class="row">
<div class="col-xl-4 col-sm-6 mb-3">
<div class="card text-white bg-primary o-hidden h-100">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-money-check"></i>
</div>
<div class="mr-5">Total Incomes <h1>$<?php echo number_format($total_income,2); ?></h1></div>
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-primary">
<div class="inner">
<h3>$<?php echo number_format($total_income,2); ?></h3>
<p>Total Incomes</p>
<hr>
Recievables: $<?php echo number_format($recievables,2); ?>
<small>Recievables: $<?php echo number_format($recievables,2); ?></small>
</div>
<div class="icon">
<i class="fa fa-money-check"></i>
</div>
</div>
</div>
<div class="col-xl-4 col-sm-6 mb-3">
<div class="card text-white bg-danger o-hidden h-100">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-shopping-cart"></i>
</div>
<div class="mr-5">Total Expenses <h1>$<?php echo number_format($total_expenses,2); ?></h1></div>
</div>
</div>
</div>
<div class="col-xl-4 col-sm-6 mb-3">
<div class="card text-white bg-success o-hidden h-100">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-heart"></i>
</div>
<div class="mr-5">Total Profit <h1>$<?php echo number_format($profit,2); ?></h1></div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-danger">
<div class="inner">
<h3>$<?php echo number_format($total_expenses,2); ?></h3>
<p>Total Expenses</p>
</div>
<div class="icon">
<i class="fa fa-shopping-cart"></i>
</div>
</div>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-success">
<div class="inner">
<h3>$<?php echo number_format($profit,2); ?></h3>
<p>Profit</p>
</div>
<div class="icon">
<i class="fa fa-heart"></i>
</div>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-info">
<div class="inner">
<h3><?php echo $total_miles; ?></h3>
<p>Miles Driven</p>
</div>
<div class="icon">
<i class="fa fa-bicycle"></i>
</div>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<div class="small-box bg-secondary">
<div class="inner">
<h3><?php echo $clients_added; ?></h3>
<p>New Clients</p>
</div>
<div class="icon">
<i class="fa fa-users"></i>
</div>
</div>
</div>
<!-- ./col -->
<div class="col-md-12">
<div class="card mb-3">
@ -294,24 +338,6 @@ $clients_added = $row['clients_added'];
</div> <!-- .col -->
</div> <!-- row -->
<div class="row mt-3">
<div class="col-md-6">
<div class="card">
<div class="card-header">
Fun Stats
</div>
<div class="card-body">
<ul class="list-unstyled">
<li>Miles Driven: <?php echo $total_miles; ?></li>
<li>Clients Added: <?php echo $clients_added; ?></li>
</ul>
</div>
</div>
</div> <!-- .col -->
</div> <!-- row -->
<?php include("footer.php"); ?>
<script>
// Set new default font family and font color to mimic Bootstrap's default styling

28485
dist/css/adminlte.css vendored Executable file

File diff suppressed because it is too large Load Diff

1
dist/css/adminlte.css.map vendored Executable file

File diff suppressed because one or more lines are too long

12
dist/css/adminlte.min.css vendored Executable file

File diff suppressed because one or more lines are too long

1
dist/css/adminlte.min.css.map vendored Executable file

File diff suppressed because one or more lines are too long

5013
dist/css/alt/adminlte.components.css vendored Normal file

File diff suppressed because it is too large Load Diff

126
dist/css/alt/adminlte.components.css.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

15398
dist/css/alt/adminlte.core.css vendored Normal file

File diff suppressed because it is too large Load Diff

242
dist/css/alt/adminlte.core.css.map vendored Normal file

File diff suppressed because one or more lines are too long

13
dist/css/alt/adminlte.core.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1049
dist/css/alt/adminlte.extra-components.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

444
dist/css/alt/adminlte.pages.css vendored Normal file
View File

@ -0,0 +1,444 @@
/*!
* AdminLTE v3.0.0
* Only Pages
* Author: Colorlib
* Website: AdminLTE.io <http://adminlte.io>
* License: Open source - MIT <http://opensource.org/licenses/MIT>
*/
.close, .mailbox-attachment-close {
float: right;
font-size: 1.5rem;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #ffffff;
opacity: .5;
}
.close:hover, .mailbox-attachment-close:hover {
color: #000;
text-decoration: none;
}
.close:not(:disabled):not(.disabled):hover, .mailbox-attachment-close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus, .mailbox-attachment-close:not(:disabled):not(.disabled):focus {
opacity: .75;
}
button.close, button.mailbox-attachment-close {
padding: 0;
background-color: transparent;
border: 0;
appearance: none;
}
a.close.disabled, a.disabled.mailbox-attachment-close {
pointer-events: none;
}
.mailbox-messages > .table {
margin: 0;
}
.mailbox-controls {
padding: 5px;
}
.mailbox-controls.with-border {
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}
.mailbox-read-info {
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
padding: 10px;
}
.mailbox-read-info h3 {
font-size: 20px;
margin: 0;
}
.mailbox-read-info h5 {
margin: 0;
padding: 5px 0 0;
}
.mailbox-read-time {
color: #999;
font-size: 13px;
}
.mailbox-read-message {
padding: 10px;
}
.mailbox-attachments {
padding-left: 0;
list-style: none;
}
.mailbox-attachments li {
border: 1px solid #eee;
float: left;
margin-bottom: 10px;
margin-right: 10px;
width: 200px;
}
.mailbox-attachment-name {
color: #666;
font-weight: bold;
}
.mailbox-attachment-icon,
.mailbox-attachment-info,
.mailbox-attachment-size {
display: block;
}
.mailbox-attachment-info {
background: #f8f9fa;
padding: 10px;
}
.mailbox-attachment-size {
color: #999;
font-size: 12px;
}
.mailbox-attachment-size > span {
display: inline-block;
padding-top: 0.75rem;
}
.mailbox-attachment-icon {
color: #666;
font-size: 65px;
max-height: 132.5px;
padding: 20px 10px;
text-align: center;
}
.mailbox-attachment-icon.has-img {
padding: 0;
}
.mailbox-attachment-icon.has-img > img {
height: auto;
max-width: 100%;
}
.lockscreen {
background: #e9ecef;
}
.lockscreen .lockscreen-name {
font-weight: 600;
text-align: center;
}
.lockscreen-logo {
font-size: 35px;
font-weight: 300;
margin-bottom: 25px;
text-align: center;
}
.lockscreen-logo a {
color: #495057;
}
.lockscreen-wrapper {
margin: 0 auto;
margin-top: 10%;
max-width: 400px;
}
.lockscreen-item {
border-radius: 4px;
background: #ffffff;
margin: 10px auto 30px;
padding: 0;
position: relative;
width: 290px;
}
.lockscreen-image {
border-radius: 50%;
background: #ffffff;
left: -10px;
padding: 5px;
position: absolute;
top: -25px;
z-index: 10;
}
.lockscreen-image > img {
border-radius: 50%;
height: 70px;
width: 70px;
}
.lockscreen-credentials {
margin-left: 70px;
}
.lockscreen-credentials .form-control {
border: 0;
}
.lockscreen-credentials .btn {
background-color: #ffffff;
border: 0;
padding: 0 10px;
}
.lockscreen-footer {
margin-top: 10px;
}
.login-logo,
.register-logo {
font-size: 2.1rem;
font-weight: 300;
margin-bottom: .9rem;
text-align: center;
}
.login-logo a,
.register-logo a {
color: #495057;
}
.login-page,
.register-page {
align-items: center;
background: #e9ecef;
display: flex;
height: 100vh;
justify-content: center;
}
.login-box,
.register-box {
width: 360px;
}
@media (max-width: 576px) {
.login-box,
.register-box {
margin-top: 20px;
width: 90%;
}
}
.login-card-body,
.register-card-body {
background: #ffffff;
border-top: 0;
color: #666;
padding: 20px;
}
.login-card-body .input-group .form-control,
.register-card-body .input-group .form-control {
border-right: 0;
}
.login-card-body .input-group .form-control:focus,
.register-card-body .input-group .form-control:focus {
box-shadow: none;
}
.login-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text {
border-color: #80bdff;
}
.login-card-body .input-group .form-control.is-valid:focus,
.register-card-body .input-group .form-control.is-valid:focus {
box-shadow: none;
}
.login-card-body .input-group .form-control.is-valid ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control.is-valid ~ .input-group-append .input-group-text {
border-color: #28a745;
}
.login-card-body .input-group .form-control.is-invalid:focus,
.register-card-body .input-group .form-control.is-invalid:focus {
box-shadow: none;
}
.login-card-body .input-group .form-control.is-invalid ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control.is-invalid ~ .input-group-append .input-group-text {
border-color: #dc3545;
}
.login-card-body .input-group .input-group-text,
.register-card-body .input-group .input-group-text {
background-color: transparent;
border-bottom-right-radius: 0.25rem;
border-left: 0;
border-top-right-radius: 0.25rem;
color: #777;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.login-box-msg,
.register-box-msg {
margin: 0;
padding: 0 20px 20px;
text-align: center;
}
.social-auth-links {
margin: 10px 0;
}
.error-page {
margin: 20px auto 0;
width: 600px;
}
@media (max-width: 767.98px) {
.error-page {
width: 100%;
}
}
.error-page > .headline {
float: left;
font-size: 100px;
font-weight: 300;
}
@media (max-width: 767.98px) {
.error-page > .headline {
float: none;
text-align: center;
}
}
.error-page > .error-content {
display: block;
margin-left: 190px;
}
@media (max-width: 767.98px) {
.error-page > .error-content {
margin-left: 0;
}
}
.error-page > .error-content > h3 {
font-size: 25px;
font-weight: 300;
}
@media (max-width: 767.98px) {
.error-page > .error-content > h3 {
text-align: center;
}
}
.invoice {
background: #ffffff;
border: 1px solid rgba(0, 0, 0, 0.125);
position: relative;
}
.invoice-title {
margin-top: 0;
}
.profile-user-img {
border: 3px solid #adb5bd;
margin: 0 auto;
padding: 3px;
width: 100px;
}
.profile-username {
font-size: 21px;
margin-top: 5px;
}
.post {
border-bottom: 1px solid #adb5bd;
color: #666;
margin-bottom: 15px;
padding-bottom: 15px;
}
.post:last-of-type {
border-bottom: 0;
margin-bottom: 0;
padding-bottom: 0;
}
.post .user-block {
margin-bottom: 15px;
width: 100%;
}
.post .row {
width: 100%;
}
.product-image {
max-width: 100%;
height: auto;
width: 100%;
}
.product-image-thumbs {
align-items: stretch;
display: flex;
margin-top: 2rem;
}
.product-image-thumb {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
border-radius: 0.25rem;
background-color: #ffffff;
border: 1px solid #dee2e6;
display: flex;
margin-right: 1rem;
max-width: 7rem;
padding: 0.5rem;
}
.product-image-thumb img {
max-width: 100%;
height: auto;
align-self: center;
}
.product-image-thumb:hover {
opacity: 0.5;
}
.product-share a {
margin-right: .5rem;
}
.projects td {
vertical-align: middle;
}
.projects .list-inline {
margin-bottom: 0;
}
.projects img.table-avatar,
.projects .table-avatar img {
border-radius: 50%;
display: inline;
width: 2.5rem;
}
.projects .project-state {
text-align: center;
}
/*# sourceMappingURL=adminlte.pages.css.map */

124
dist/css/alt/adminlte.pages.css.map vendored Normal file

File diff suppressed because one or more lines are too long

8
dist/css/alt/adminlte.pages.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5977
dist/css/alt/adminlte.plugins.css vendored Normal file

File diff suppressed because it is too large Load Diff

130
dist/css/alt/adminlte.plugins.css.map vendored Normal file

File diff suppressed because one or more lines are too long

8
dist/css/alt/adminlte.plugins.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
dist/img/AdminLTELogo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
dist/img/avatar.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
dist/img/avatar04.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
dist/img/avatar2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
dist/img/avatar3.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
dist/img/avatar5.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
dist/img/boxed-bg.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
dist/img/boxed-bg.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
dist/img/credit/american-express.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
dist/img/credit/cirrus.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
dist/img/credit/mastercard.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
dist/img/credit/mestro.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
dist/img/credit/paypal.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
dist/img/credit/paypal2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dist/img/credit/visa.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
dist/img/default-150x150.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

BIN
dist/img/icons.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
dist/img/photo1.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 KiB

BIN
dist/img/photo2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

BIN
dist/img/photo3.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

BIN
dist/img/photo4.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
dist/img/prod-1.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
dist/img/prod-2.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
dist/img/prod-3.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
dist/img/prod-4.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
dist/img/prod-5.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
dist/img/user1-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
dist/img/user2-160x160.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
dist/img/user3-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
dist/img/user4-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
dist/img/user5-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
dist/img/user6-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
dist/img/user7-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
dist/img/user8-128x128.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

1790
dist/js/adminlte.js vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/js/adminlte.js.map vendored Normal file

File diff suppressed because one or more lines are too long

7
dist/js/adminlte.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/adminlte.min.js.map vendored Normal file

File diff suppressed because one or more lines are too long

413
dist/js/demo.js vendored Normal file
View File

@ -0,0 +1,413 @@
/**
* AdminLTE Demo Menu
* ------------------
* You should not use this file in production.
* This file is for demo purposes only.
*/
(function ($) {
'use strict'
var $sidebar = $('.control-sidebar')
var $container = $('<div />', {
class: 'p-3 control-sidebar-content'
})
$sidebar.append($container)
var navbar_dark_skins = [
'navbar-primary',
'navbar-secondary',
'navbar-info',
'navbar-success',
'navbar-danger',
'navbar-indigo',
'navbar-purple',
'navbar-pink',
'navbar-teal',
'navbar-cyan',
'navbar-dark',
'navbar-gray-dark',
'navbar-gray',
]
var navbar_light_skins = [
'navbar-light',
'navbar-warning',
'navbar-white',
'navbar-orange',
]
$container.append(
'<h5>Customize AdminLTE</h5><hr class="mb-2"/>'
)
var $no_border_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-header').hasClass('border-bottom-0'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('border-bottom-0')
} else {
$('.main-header').removeClass('border-bottom-0')
}
})
var $no_border_container = $('<div />', {'class': 'mb-1'}).append($no_border_checkbox).append('<span>No Navbar border</span>')
$container.append($no_border_container)
var $text_sm_body_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('body').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('text-sm')
} else {
$('body').removeClass('text-sm')
}
})
var $text_sm_body_container = $('<div />', {'class': 'mb-1'}).append($text_sm_body_checkbox).append('<span>Body small text</span>')
$container.append($text_sm_body_container)
var $text_sm_header_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-header').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('text-sm')
} else {
$('.main-header').removeClass('text-sm')
}
})
var $text_sm_header_container = $('<div />', {'class': 'mb-1'}).append($text_sm_header_checkbox).append('<span>Navbar small text</span>')
$container.append($text_sm_header_container)
var $text_sm_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('text-sm')
} else {
$('.nav-sidebar').removeClass('text-sm')
}
})
var $text_sm_sidebar_container = $('<div />', {'class': 'mb-1'}).append($text_sm_sidebar_checkbox).append('<span>Sidebar nav small text</span>')
$container.append($text_sm_sidebar_container)
var $text_sm_footer_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-footer').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-footer').addClass('text-sm')
} else {
$('.main-footer').removeClass('text-sm')
}
})
var $text_sm_footer_container = $('<div />', {'class': 'mb-1'}).append($text_sm_footer_checkbox).append('<span>Footer small text</span>')
$container.append($text_sm_footer_container)
var $flat_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-flat'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-flat')
} else {
$('.nav-sidebar').removeClass('nav-flat')
}
})
var $flat_sidebar_container = $('<div />', {'class': 'mb-1'}).append($flat_sidebar_checkbox).append('<span>Sidebar nav flat style</span>')
$container.append($flat_sidebar_container)
var $legacy_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-legacy'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-legacy')
} else {
$('.nav-sidebar').removeClass('nav-legacy')
}
})
var $legacy_sidebar_container = $('<div />', {'class': 'mb-1'}).append($legacy_sidebar_checkbox).append('<span>Sidebar nav legacy style</span>')
$container.append($legacy_sidebar_container)
var $compact_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-compact'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-compact')
} else {
$('.nav-sidebar').removeClass('nav-compact')
}
})
var $compact_sidebar_container = $('<div />', {'class': 'mb-1'}).append($compact_sidebar_checkbox).append('<span>Sidebar nav compact</span>')
$container.append($compact_sidebar_container)
var $child_indent_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-child-indent'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-child-indent')
} else {
$('.nav-sidebar').removeClass('nav-child-indent')
}
})
var $child_indent_sidebar_container = $('<div />', {'class': 'mb-1'}).append($child_indent_sidebar_checkbox).append('<span>Sidebar nav child indent</span>')
$container.append($child_indent_sidebar_container)
var $no_expand_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-sidebar').hasClass('sidebar-no-expand'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-sidebar').addClass('sidebar-no-expand')
} else {
$('.main-sidebar').removeClass('sidebar-no-expand')
}
})
var $no_expand_sidebar_container = $('<div />', {'class': 'mb-1'}).append($no_expand_sidebar_checkbox).append('<span>Main Sidebar disable hover/focus auto expand</span>')
$container.append($no_expand_sidebar_container)
var $text_sm_brand_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.brand-link').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.brand-link').addClass('text-sm')
} else {
$('.brand-link').removeClass('text-sm')
}
})
var $text_sm_brand_container = $('<div />', {'class': 'mb-4'}).append($text_sm_brand_checkbox).append('<span>Brand small text</span>')
$container.append($text_sm_brand_container)
$container.append('<h6>Navbar Variants</h6>')
var $navbar_variants = $('<div />', {
'class': 'd-flex'
})
var navbar_all_colors = navbar_dark_skins.concat(navbar_light_skins)
var $navbar_variants_colors = createSkinBlock(navbar_all_colors, function (e) {
var color = $(this).data('color')
var $main_header = $('.main-header')
$main_header.removeClass('navbar-dark').removeClass('navbar-light')
navbar_all_colors.map(function (color) {
$main_header.removeClass(color)
})
if (navbar_dark_skins.indexOf(color) > -1) {
$main_header.addClass('navbar-dark')
} else {
$main_header.addClass('navbar-light')
}
$main_header.addClass(color)
})
$navbar_variants.append($navbar_variants_colors)
$container.append($navbar_variants)
var sidebar_colors = [
'bg-primary',
'bg-warning',
'bg-info',
'bg-danger',
'bg-success',
'bg-indigo',
'bg-navy',
'bg-purple',
'bg-fuchsia',
'bg-pink',
'bg-maroon',
'bg-orange',
'bg-lime',
'bg-teal',
'bg-olive'
]
var accent_colors = [
'accent-primary',
'accent-warning',
'accent-info',
'accent-danger',
'accent-success',
'accent-indigo',
'accent-navy',
'accent-purple',
'accent-fuchsia',
'accent-pink',
'accent-maroon',
'accent-orange',
'accent-lime',
'accent-teal',
'accent-olive'
]
var sidebar_skins = [
'sidebar-dark-primary',
'sidebar-dark-warning',
'sidebar-dark-info',
'sidebar-dark-danger',
'sidebar-dark-success',
'sidebar-dark-indigo',
'sidebar-dark-navy',
'sidebar-dark-purple',
'sidebar-dark-fuchsia',
'sidebar-dark-pink',
'sidebar-dark-maroon',
'sidebar-dark-orange',
'sidebar-dark-lime',
'sidebar-dark-teal',
'sidebar-dark-olive',
'sidebar-light-primary',
'sidebar-light-warning',
'sidebar-light-info',
'sidebar-light-danger',
'sidebar-light-success',
'sidebar-light-indigo',
'sidebar-light-navy',
'sidebar-light-purple',
'sidebar-light-fuchsia',
'sidebar-light-pink',
'sidebar-light-maroon',
'sidebar-light-orange',
'sidebar-light-lime',
'sidebar-light-teal',
'sidebar-light-olive'
]
$container.append('<h6>Accent Color Variants</h6>')
var $accent_variants = $('<div />', {
'class': 'd-flex'
})
$container.append($accent_variants)
$container.append(createSkinBlock(accent_colors, function () {
var color = $(this).data('color')
var accent_class = color
var $body = $('body')
accent_colors.map(function (skin) {
$body.removeClass(skin)
})
$body.addClass(accent_class)
}))
$container.append('<h6>Dark Sidebar Variants</h6>')
var $sidebar_variants = $('<div />', {
'class': 'd-flex'
})
$container.append($sidebar_variants)
$container.append(createSkinBlock(sidebar_colors, function () {
var color = $(this).data('color')
var sidebar_class = 'sidebar-dark-' + color.replace('bg-', '')
var $sidebar = $('.main-sidebar')
sidebar_skins.map(function (skin) {
$sidebar.removeClass(skin)
})
$sidebar.addClass(sidebar_class)
}))
$container.append('<h6>Light Sidebar Variants</h6>')
var $sidebar_variants = $('<div />', {
'class': 'd-flex'
})
$container.append($sidebar_variants)
$container.append(createSkinBlock(sidebar_colors, function () {
var color = $(this).data('color')
var sidebar_class = 'sidebar-light-' + color.replace('bg-', '')
var $sidebar = $('.main-sidebar')
sidebar_skins.map(function (skin) {
$sidebar.removeClass(skin)
})
$sidebar.addClass(sidebar_class)
}))
var logo_skins = navbar_all_colors
$container.append('<h6>Brand Logo Variants</h6>')
var $logo_variants = $('<div />', {
'class': 'd-flex'
})
$container.append($logo_variants)
var $clear_btn = $('<a />', {
href: 'javascript:void(0)'
}).text('clear').on('click', function () {
var $logo = $('.brand-link')
logo_skins.map(function (skin) {
$logo.removeClass(skin)
})
})
$container.append(createSkinBlock(logo_skins, function () {
var color = $(this).data('color')
var $logo = $('.brand-link')
logo_skins.map(function (skin) {
$logo.removeClass(skin)
})
$logo.addClass(color)
}).append($clear_btn))
function createSkinBlock(colors, callback) {
var $block = $('<div />', {
'class': 'd-flex flex-wrap mb-3'
})
colors.map(function (color) {
var $color = $('<div />', {
'class': (typeof color === 'object' ? color.join(' ') : color).replace('navbar-', 'bg-').replace('accent-', 'bg-') + ' elevation-2'
})
$block.append($color)
$color.data('color', color)
$color.css({
width : '40px',
height : '20px',
borderRadius: '25px',
marginRight : 10,
marginBottom: 10,
opacity : 0.8,
cursor : 'pointer'
})
$color.hover(function () {
$(this).css({ opacity: 1 }).removeClass('elevation-2').addClass('elevation-4')
}, function () {
$(this).css({ opacity: 0.8 }).removeClass('elevation-4').addClass('elevation-2')
})
if (callback) {
$color.on('click', callback)
}
})
return $block
}
})(jQuery)

264
dist/js/pages/dashboard.js vendored Normal file
View File

@ -0,0 +1,264 @@
/*
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This is a demo file used only for the main dashboard (index.html)
**/
$(function () {
'use strict'
// Make the dashboard widgets sortable Using jquery UI
$('.connectedSortable').sortable({
placeholder : 'sort-highlight',
connectWith : '.connectedSortable',
handle : '.card-header, .nav-tabs',
forcePlaceholderSize: true,
zIndex : 999999
})
$('.connectedSortable .card-header, .connectedSortable .nav-tabs-custom').css('cursor', 'move')
// jQuery UI sortable for the todo list
$('.todo-list').sortable({
placeholder : 'sort-highlight',
handle : '.handle',
forcePlaceholderSize: true,
zIndex : 999999
})
// bootstrap WYSIHTML5 - text editor
$('.textarea').summernote()
$('.daterange').daterangepicker({
ranges : {
'Today' : [moment(), moment()],
'Yesterday' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month' : [moment().startOf('month'), moment().endOf('month')],
'Last Month' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
startDate: moment().subtract(29, 'days'),
endDate : moment()
}, function (start, end) {
window.alert('You chose: ' + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
})
/* jQueryKnob */
$('.knob').knob()
// jvectormap data
var visitorsData = {
'US': 398, //USA
'SA': 400, //Saudi Arabia
'CA': 1000, //Canada
'DE': 500, //Germany
'FR': 760, //France
'CN': 300, //China
'AU': 700, //Australia
'BR': 600, //Brazil
'IN': 800, //India
'GB': 320, //Great Britain
'RU': 3000 //Russia
}
// World map by jvectormap
$('#world-map').vectorMap({
map : 'usa_en',
backgroundColor : 'transparent',
regionStyle : {
initial: {
fill : 'rgba(255, 255, 255, 0.7)',
'fill-opacity' : 1,
stroke : 'rgba(0,0,0,.2)',
'stroke-width' : 1,
'stroke-opacity': 1
}
},
series : {
regions: [{
values : visitorsData,
scale : ['#ffffff', '#0154ad'],
normalizeFunction: 'polynomial'
}]
},
onRegionLabelShow: function (e, el, code) {
if (typeof visitorsData[code] != 'undefined')
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors')
}
})
// Sparkline charts
var sparkline1 = new Sparkline($("#sparkline-1")[0], {width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9'});
var sparkline2 = new Sparkline($("#sparkline-2")[0], {width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9'});
var sparkline3 = new Sparkline($("#sparkline-3")[0], {width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9'});
sparkline1.draw([1000, 1200, 920, 927, 931, 1027, 819, 930, 1021]);
sparkline2.draw([515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921]);
sparkline3.draw([15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21]);
// The Calender
$('#calendar').datetimepicker({
format: 'L',
inline: true
})
// SLIMSCROLL FOR CHAT WIDGET
$('#chat-box').overlayScrollbars({
height: '250px'
})
/* Chart.js Charts */
// Sales chart
var salesChartCanvas = document.getElementById('revenue-chart-canvas').getContext('2d');
//$('#revenue-chart').get(0).getContext('2d');
var salesChartData = {
labels : ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label : 'Digital Goods',
backgroundColor : 'rgba(60,141,188,0.9)',
borderColor : 'rgba(60,141,188,0.8)',
pointRadius : false,
pointColor : '#3b8bba',
pointStrokeColor : 'rgba(60,141,188,1)',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(60,141,188,1)',
data : [28, 48, 40, 19, 86, 27, 90]
},
{
label : 'Electronics',
backgroundColor : 'rgba(210, 214, 222, 1)',
borderColor : 'rgba(210, 214, 222, 1)',
pointRadius : false,
pointColor : 'rgba(210, 214, 222, 1)',
pointStrokeColor : '#c1c7d1',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
data : [65, 59, 80, 81, 56, 55, 40]
},
]
}
var salesChartOptions = {
maintainAspectRatio : false,
responsive : true,
legend: {
display: false
},
scales: {
xAxes: [{
gridLines : {
display : false,
}
}],
yAxes: [{
gridLines : {
display : false,
}
}]
}
}
// This will get the first returned node in the jQuery collection.
var salesChart = new Chart(salesChartCanvas, {
type: 'line',
data: salesChartData,
options: salesChartOptions
}
)
// Donut Chart
var pieChartCanvas = $('#sales-chart-canvas').get(0).getContext('2d')
var pieData = {
labels: [
'Instore Sales',
'Download Sales',
'Mail-Order Sales',
],
datasets: [
{
data: [30,12,20],
backgroundColor : ['#f56954', '#00a65a', '#f39c12'],
}
]
}
var pieOptions = {
legend: {
display: false
},
maintainAspectRatio : false,
responsive : true,
}
//Create pie or douhnut chart
// You can switch between pie and douhnut using the method below.
var pieChart = new Chart(pieChartCanvas, {
type: 'doughnut',
data: pieData,
options: pieOptions
});
// Sales graph chart
var salesGraphChartCanvas = $('#line-chart').get(0).getContext('2d');
//$('#revenue-chart').get(0).getContext('2d');
var salesGraphChartData = {
labels : ['2011 Q1', '2011 Q2', '2011 Q3', '2011 Q4', '2012 Q1', '2012 Q2', '2012 Q3', '2012 Q4', '2013 Q1', '2013 Q2'],
datasets: [
{
label : 'Digital Goods',
fill : false,
borderWidth : 2,
lineTension : 0,
spanGaps : true,
borderColor : '#efefef',
pointRadius : 3,
pointHoverRadius : 7,
pointColor : '#efefef',
pointBackgroundColor: '#efefef',
data : [2666, 2778, 4912, 3767, 6810, 5670, 4820, 15073, 10687, 8432]
}
]
}
var salesGraphChartOptions = {
maintainAspectRatio : false,
responsive : true,
legend: {
display: false,
},
scales: {
xAxes: [{
ticks : {
fontColor: '#efefef',
},
gridLines : {
display : false,
color: '#efefef',
drawBorder: false,
}
}],
yAxes: [{
ticks : {
stepSize: 5000,
fontColor: '#efefef',
},
gridLines : {
display : true,
color: '#efefef',
drawBorder: false,
}
}]
}
}
// This will get the first returned node in the jQuery collection.
var salesGraphChart = new Chart(salesGraphChartCanvas, {
type: 'line',
data: salesGraphChartData,
options: salesGraphChartOptions
}
)
})

267
dist/js/pages/dashboard2.js vendored Normal file
View File

@ -0,0 +1,267 @@
$(function () {
'use strict'
/* ChartJS
* -------
* Here we will create a few charts using ChartJS
*/
//-----------------------
//- MONTHLY SALES CHART -
//-----------------------
// Get context with jQuery - using jQuery's .get() method.
var salesChartCanvas = $('#salesChart').get(0).getContext('2d')
var salesChartData = {
labels : ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label : 'Digital Goods',
backgroundColor : 'rgba(60,141,188,0.9)',
borderColor : 'rgba(60,141,188,0.8)',
pointRadius : false,
pointColor : '#3b8bba',
pointStrokeColor : 'rgba(60,141,188,1)',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(60,141,188,1)',
data : [28, 48, 40, 19, 86, 27, 90]
},
{
label : 'Electronics',
backgroundColor : 'rgba(210, 214, 222, 1)',
borderColor : 'rgba(210, 214, 222, 1)',
pointRadius : false,
pointColor : 'rgba(210, 214, 222, 1)',
pointStrokeColor : '#c1c7d1',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
data : [65, 59, 80, 81, 56, 55, 40]
},
]
}
var salesChartOptions = {
maintainAspectRatio : false,
responsive : true,
legend: {
display: false
},
scales: {
xAxes: [{
gridLines : {
display : false,
}
}],
yAxes: [{
gridLines : {
display : false,
}
}]
}
}
// This will get the first returned node in the jQuery collection.
var salesChart = new Chart(salesChartCanvas, {
type: 'line',
data: salesChartData,
options: salesChartOptions
}
)
//---------------------------
//- END MONTHLY SALES CHART -
//---------------------------
//-------------
//- PIE CHART -
//-------------
// Get context with jQuery - using jQuery's .get() method.
var pieChartCanvas = $('#pieChart').get(0).getContext('2d')
var pieData = {
labels: [
'Chrome',
'IE',
'FireFox',
'Safari',
'Opera',
'Navigator',
],
datasets: [
{
data: [700,500,400,600,300,100],
backgroundColor : ['#f56954', '#00a65a', '#f39c12', '#00c0ef', '#3c8dbc', '#d2d6de'],
}
]
}
var pieOptions = {
legend: {
display: false
}
}
//Create pie or douhnut chart
// You can switch between pie and douhnut using the method below.
var pieChart = new Chart(pieChartCanvas, {
type: 'doughnut',
data: pieData,
options: pieOptions
})
//-----------------
//- END PIE CHART -
//-----------------
/* jVector Maps
* ------------
* Create a world map with markers
*/
$('#world-map-markers').mapael({
map: {
name : "usa_states",
zoom: {
enabled: true,
maxLevel: 10
},
},
}
);
// $('#world-map-markers').vectorMap({
// map : 'world_en',
// normalizeFunction: 'polynomial',
// hoverOpacity : 0.7,
// hoverColor : false,
// backgroundColor : 'transparent',
// regionStyle : {
// initial : {
// fill : 'rgba(210, 214, 222, 1)',
// 'fill-opacity' : 1,
// stroke : 'none',
// 'stroke-width' : 0,
// 'stroke-opacity': 1
// },
// hover : {
// 'fill-opacity': 0.7,
// cursor : 'pointer'
// },
// selected : {
// fill: 'yellow'
// },
// selectedHover: {}
// },
// markerStyle : {
// initial: {
// fill : '#00a65a',
// stroke: '#111'
// }
// },
// markers : [
// {
// latLng: [41.90, 12.45],
// name : 'Vatican City'
// },
// {
// latLng: [43.73, 7.41],
// name : 'Monaco'
// },
// {
// latLng: [-0.52, 166.93],
// name : 'Nauru'
// },
// {
// latLng: [-8.51, 179.21],
// name : 'Tuvalu'
// },
// {
// latLng: [43.93, 12.46],
// name : 'San Marino'
// },
// {
// latLng: [47.14, 9.52],
// name : 'Liechtenstein'
// },
// {
// latLng: [7.11, 171.06],
// name : 'Marshall Islands'
// },
// {
// latLng: [17.3, -62.73],
// name : 'Saint Kitts and Nevis'
// },
// {
// latLng: [3.2, 73.22],
// name : 'Maldives'
// },
// {
// latLng: [35.88, 14.5],
// name : 'Malta'
// },
// {
// latLng: [12.05, -61.75],
// name : 'Grenada'
// },
// {
// latLng: [13.16, -61.23],
// name : 'Saint Vincent and the Grenadines'
// },
// {
// latLng: [13.16, -59.55],
// name : 'Barbados'
// },
// {
// latLng: [17.11, -61.85],
// name : 'Antigua and Barbuda'
// },
// {
// latLng: [-4.61, 55.45],
// name : 'Seychelles'
// },
// {
// latLng: [7.35, 134.46],
// name : 'Palau'
// },
// {
// latLng: [42.5, 1.51],
// name : 'Andorra'
// },
// {
// latLng: [14.01, -60.98],
// name : 'Saint Lucia'
// },
// {
// latLng: [6.91, 158.18],
// name : 'Federated States of Micronesia'
// },
// {
// latLng: [1.3, 103.8],
// name : 'Singapore'
// },
// {
// latLng: [1.46, 173.03],
// name : 'Kiribati'
// },
// {
// latLng: [-21.13, -175.2],
// name : 'Tonga'
// },
// {
// latLng: [15.3, -61.38],
// name : 'Dominica'
// },
// {
// latLng: [-20.2, 57.5],
// name : 'Mauritius'
// },
// {
// latLng: [26.02, 50.55],
// name : 'Bahrain'
// },
// {
// latLng: [0.33, 6.73],
// name : 'São Tomé and Príncipe'
// }
// ]
// })
})

140
dist/js/pages/dashboard3.js vendored Normal file
View File

@ -0,0 +1,140 @@
$(function () {
'use strict'
var ticksStyle = {
fontColor: '#495057',
fontStyle: 'bold'
}
var mode = 'index'
var intersect = true
var $salesChart = $('#sales-chart')
var salesChart = new Chart($salesChart, {
type : 'bar',
data : {
labels : ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],
datasets: [
{
backgroundColor: '#007bff',
borderColor : '#007bff',
data : [1000, 2000, 3000, 2500, 2700, 2500, 3000]
},
{
backgroundColor: '#ced4da',
borderColor : '#ced4da',
data : [700, 1700, 2700, 2000, 1800, 1500, 2000]
}
]
},
options: {
maintainAspectRatio: false,
tooltips : {
mode : mode,
intersect: intersect
},
hover : {
mode : mode,
intersect: intersect
},
legend : {
display: false
},
scales : {
yAxes: [{
// display: false,
gridLines: {
display : true,
lineWidth : '4px',
color : 'rgba(0, 0, 0, .2)',
zeroLineColor: 'transparent'
},
ticks : $.extend({
beginAtZero: true,
// Include a dollar sign in the ticks
callback: function (value, index, values) {
if (value >= 1000) {
value /= 1000
value += 'k'
}
return '$' + value
}
}, ticksStyle)
}],
xAxes: [{
display : true,
gridLines: {
display: false
},
ticks : ticksStyle
}]
}
}
})
var $visitorsChart = $('#visitors-chart')
var visitorsChart = new Chart($visitorsChart, {
data : {
labels : ['18th', '20th', '22nd', '24th', '26th', '28th', '30th'],
datasets: [{
type : 'line',
data : [100, 120, 170, 167, 180, 177, 160],
backgroundColor : 'transparent',
borderColor : '#007bff',
pointBorderColor : '#007bff',
pointBackgroundColor: '#007bff',
fill : false
// pointHoverBackgroundColor: '#007bff',
// pointHoverBorderColor : '#007bff'
},
{
type : 'line',
data : [60, 80, 70, 67, 80, 77, 100],
backgroundColor : 'tansparent',
borderColor : '#ced4da',
pointBorderColor : '#ced4da',
pointBackgroundColor: '#ced4da',
fill : false
// pointHoverBackgroundColor: '#ced4da',
// pointHoverBorderColor : '#ced4da'
}]
},
options: {
maintainAspectRatio: false,
tooltips : {
mode : mode,
intersect: intersect
},
hover : {
mode : mode,
intersect: intersect
},
legend : {
display: false
},
scales : {
yAxes: [{
// display: false,
gridLines: {
display : true,
lineWidth : '4px',
color : 'rgba(0, 0, 0, .2)',
zeroLineColor: 'transparent'
},
ticks : $.extend({
beginAtZero : true,
suggestedMax: 200
}, ticksStyle)
}],
xAxes: [{
display : true,
gridLines: {
display: false
},
ticks : ticksStyle
}]
}
}
})
})

View File

@ -173,7 +173,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-ethernet"></i></span>
</div>
<input type="text" class="form-control" name="ip" value="<?php echo $asset_ip; ?>" placeholder="IP Address">
<input type="text" class="form-control" name="ip" value="<?php echo $asset_ip; ?>" placeholder="IP Address" data-inputmask="'alias': 'ip'">
</div>
</div>

View File

@ -36,7 +36,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-route"></i></span>
</div>
<input type="text" class="form-control" name="gateway" placeholder="ex 192.168.1.1" value="<?php echo $network_gateway; ?>" required>
<input type="text" class="form-control" name="gateway" placeholder="ex 192.168.1.1" value="<?php echo $network_gateway; ?>" data-inputmask="'alias': 'ip'" required>
</div>
</div>

View File

@ -1,59 +1,32 @@
</div>
<!-- /.container-fluid -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
</div>
<!-- ./wrapper -->
</div>
<!-- /.content-wrapper -->
<!-- REQUIRED SCRIPTS -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Custom js-->
<script src="plugins/chart.js/Chart.min.js"></script>
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<script src="plugins/moment/moment.min.js"></script>
<script src='plugins/fullcalendar/main.min.js'></script>
<script src='plugins/fullcalendar-bootstrap/main.min.js'></script>
<script src='plugins/fullcalendar-daygrid/main.min.js'></script>
<script src='plugins/fullcalendar-timegrid/main.min.js'></script>
<script src='plugins/daterangepicker/daterangepicker.js'></script>
<script src='plugins/select2/js/select2.min.js'></script>
<script src='plugins/inputmask/min/jquery.inputmask.bundle.min.js'></script>
<script src='plugins/inputmask/min/inputmask/bindings/inputmask.binding.min.js'></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<script src="js/app.js"></script>
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Page level plugin JavaScript-->
<script src="vendor/chart.js/Chart.min.js"></script>
<script src="vendor/easy-markdown-editor/js/easymde.js"></script>
<script src="vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.min.js"></script>
<script src="vendor/moment/moment.min.js"></script>
<script src="vendor/datepicker/js/tempusdominus-bootstrap-4.min.js"></script>
<script src='vendor/fullcalendar/core/main.min.js'></script>
<script src='vendor/fullcalendar/bootstrap/main.min.js'></script>
<script src='vendor/fullcalendar/daygrid/main.min.js'></script>
<script src='vendor/fullcalendar/timegrid/main.min.js'></script>
<script src='vendor/fullcalendar/list/main.min.js'></script>
<script src='vendor/bootstrap-select/js/bootstrap-select.min.js'></script>
<script src='vendor/bootstrap-showpassword/bootstrap-show-password.min.js'></script>
<script src='vendor/daterangepicker/daterangepicker.js'></script>
<script src='vendor/Inputmask/dist/inputmask.min.js'></script>
<script src='vendor/Inputmask/dist/bindings/inputmask.binding.js'></script>
<script src="vendor/clipboard.js/dist/clipboard.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin.min.js"></script>
<!-- Custom js-->
<script src="js/app.js"></script>
</body>
</html>
<?php
//Debug - Page Load time
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo 'Page generated in '.$total_time.' seconds.';
?>
</body>
</html>

View File

@ -1,30 +1,27 @@
</div><!-- /.container-fluid -->
</div>
<!-- /.container-fluid -->
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- ./wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin.min.js"></script>
<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- Custom js-->
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<script src="plugins/moment/moment.min.js"></script>>
<script src='plugins/daterangepicker/daterangepicker.js'></script>
<script src='plugins/select2/js/select2.min.js'></script>
<script src='plugins/inputmask/min/inputmask/inputmask.min.js'></script>
<script src="js/app.js"></script>
</body>
</body>
</html>

View File

@ -1,38 +1,44 @@
<?php
include("config.php");
include("check_login.php");
include("functions.php");
?>
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php echo $company_name; ?></title>
<title><?php echo $config_app_name; ?></title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template-->
<link href="css/sb-admin.css" rel="stylesheet" type="text/css">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> -->
<!-- Custom Style Sheet -->
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" type="text/css">
<link href="plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css">
<link href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css" rel="stylesheet" type="text/css">
<link href='plugins/daterangepicker/daterangepicker.css' rel='stylesheet' />
</head>
<body id="page-top">
<div id="wrapper">
<body class="layout-top-nav">
<div class="wrapper text-sm">
<div id="content-wrapper">
<div class="container">
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Main content -->
<div class="content">
<div class="container">

View File

@ -107,9 +107,9 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
}
?>
<div class="row d-print-none">
<div class="col-md-12">
<div class="card">
<div class="card-header d-print-none">
<div class="float-right">
<a class="btn btn-primary" href="#" onclick="window.print();"><i class="fa fa-fw fa-print"></i> Print</a>
<a class="btn btn-primary" download target="_blank" href="guest_post.php?pdf_invoice=<?php echo $invoice_id; ?>&url_key=<?php echo $url_key; ?>"><i class="fa fa-fw fa-download"></i> Download</a>
@ -120,158 +120,157 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
<?php } ?>
</div>
</div>
</div>
<hr class="d-print-none">
<div class="row mb-4">
<div class="col-sm-2">
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
</div>
<div class="col-sm-10">
<h3 class="text-right"><strong>Invoice</strong><br><small class="text-secondary"><?php echo $invoice_number; ?></small></h3>
</div>
</div>
<div class="row mb-4">
<div class="col-sm">
<ul class="list-unstyled">
<li><h4><strong><?php echo $company_name; ?></strong></h4></li>
<li><?php echo $config_company_address; ?></li>
<li><?php echo "$config_company_city $config_company_state $config_company_zip"; ?></li>
<li>P: <?php echo $config_company_phone; ?></li>
<li><?php echo $config_company_email; ?></li>
</ul>
</div>
<div class="col-sm">
<ul class="list-unstyled text-right">
<li><h4><strong><?php echo $client_name; ?></strong></h4></li>
<li><?php echo $client_address; ?></li>
<li><?php echo "$client_city $client_state $client_zip"; ?></li>
<li>P: <?php echo $client_phone; ?></li>
<li>E: <?php echo $client_email; ?></li>
</ul>
</div>
</div>
<div class="row mb-4">
<div class="col-sm-8">
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<td>Invoice Date</td>
<td class="text-right"><?php echo $invoice_date; ?></td>
</tr>
<tr>
<td>Due Date</td>
<td class="text-right"><div class="<?php echo $invoice_color; ?>"><?php echo $invoice_due; ?></div></td>
</tr>
</table>
</div>
</div>
<?php $sql_invoice_items = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE invoice_id = $invoice_id ORDER BY item_id ASC"); ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th class="text-right">Price</th>
<th class="text-right">Tax</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_invoice_items)){
$item_id = $row['item_id'];
$item_name = $row['item_name'];
$item_description = $row['item_description'];
$item_quantity = $row['item_quantity'];
$item_price = $row['item_price'];
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
<tr>
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_total,2); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-7">
<div class="card">
<div class="card-body">
<div><?php echo $invoice_note; ?></div>
<div class="card-body">
<div class="row mb-4">
<div class="col-sm-2">
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
</div>
<div class="col-sm-10">
<h3 class="text-right"><strong>Invoice</strong><br><small class="text-secondary"><?php echo $invoice_number; ?></small></h3>
</div>
</div>
</div>
<div class="col-3 offset-2">
<table class="table table-borderless">
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right text-monospace">$<?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($discount > 0){ ?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right text-monospace">$<?php echo number_format($invoice_discount,2); ?></td>
</tr>
<?php } ?>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right text-monospace">$<?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<?php if($amount_paid > 0){ ?>
<tr class="border-bottom">
<td><div class="text-success">Paid to Date</div></td>
<td class="text-right text-monospace text-success">$<?php echo number_format($amount_paid,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Balance Due</strong></td>
<td class="text-right text-monospace"><strong>$<?php echo number_format($balance,2); ?></strong></td>
</tr>
</tbody>
</table>
<div class="row mb-4">
<div class="col-sm">
<ul class="list-unstyled">
<li><h4><strong><?php echo $company_name; ?></strong></h4></li>
<li><?php echo $config_company_address; ?></li>
<li><?php echo "$config_company_city $config_company_state $config_company_zip"; ?></li>
<li>P: <?php echo $config_company_phone; ?></li>
<li><?php echo $config_company_email; ?></li>
</ul>
</div>
<div class="col-sm">
<ul class="list-unstyled text-right">
<li><h4><strong><?php echo $client_name; ?></strong></h4></li>
<li><?php echo $client_address; ?></li>
<li><?php echo "$client_city $client_state $client_zip"; ?></li>
<li>P: <?php echo $client_phone; ?></li>
<li>E: <?php echo $client_email; ?></li>
</ul>
</div>
</div>
<div class="row mb-4">
<div class="col-sm-8">
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<td>Invoice Date</td>
<td class="text-right"><?php echo $invoice_date; ?></td>
</tr>
<tr>
<td>Due Date</td>
<td class="text-right"><div class="<?php echo $invoice_color; ?>"><?php echo $invoice_due; ?></div></td>
</tr>
</table>
</div>
</div>
<?php $sql_invoice_items = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE invoice_id = $invoice_id ORDER BY item_id ASC"); ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th class="text-right">Price</th>
<th class="text-right">Tax</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_invoice_items)){
$item_id = $row['item_id'];
$item_name = $row['item_name'];
$item_description = $row['item_description'];
$item_quantity = $row['item_quantity'];
$item_price = $row['item_price'];
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
<tr>
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_total,2); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-7">
<div class="card">
<div class="card-body">
<div><?php echo $invoice_note; ?></div>
</div>
</div>
</div>
<div class="col-3 offset-2">
<table class="table table-borderless">
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right text-monospace">$<?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($discount > 0){ ?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right text-monospace">$<?php echo number_format($invoice_discount,2); ?></td>
</tr>
<?php } ?>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right text-monospace">$<?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<?php if($amount_paid > 0){ ?>
<tr class="border-bottom">
<td><div class="text-success">Paid to Date</div></td>
<td class="text-right text-monospace text-success">$<?php echo number_format($amount_paid,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Balance Due</strong></td>
<td class="text-right text-monospace"><strong>$<?php echo number_format($balance,2); ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr class="mt-5">
<center><?php echo $config_invoice_footer; ?></center>
</div>
</div>
<hr class="mt-5">
<center><?php echo $config_invoice_footer; ?></center>
<?php
}else{
echo "GTFO";

View File

@ -88,8 +88,9 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
?>
<div class="row d-print-none">
<div class="col-md-12">
<div class="card">
<div class="card-header d-print-none">
<div class="float-right">
<a class="btn btn-primary" href="#" onclick="window.print();"><i class="fa fa-fw fa-print"></i> Print</a>
<a class="btn btn-primary" download target="_blank" href="guest_post.php?pdf_quote=<?php echo $quote_id; ?>&url_key=<?php echo $url_key; ?>"><i class="fa fa-fw fa-download"></i> Download</a>
@ -101,152 +102,152 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
<?php } ?>
</div>
</div>
</div>
<div class="card-body">
<hr class="d-print-none">
<div class="row mb-4">
<div class="col-sm-2">
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
</div>
<div class="col-sm-10">
<h3 class="text-right"><strong>Quote</strong><br><small class="text-secondary"><?php echo $quote_number; ?></small></h3>
</div>
</div>
<div class="row mb-4">
<div class="col-sm">
<ul class="list-unstyled">
<li><h4><strong><?php echo $company_name; ?></strong></h4></li>
<li><?php echo $config_company_address; ?></li>
<li><?php echo "$config_company_city $config_company_state $config_company_zip"; ?></li>
<li>P: <?php echo $config_company_phone; ?></li>
<li><?php echo $config_company_email; ?></li>
</ul>
</div>
<div class="col-sm">
<ul class="list-unstyled text-right">
<li><h4><strong><?php echo $client_name; ?></strong></h4></li>
<li><?php echo $client_address; ?></li>
<li><?php echo "$client_city $client_state $client_zip"; ?></li>
<li>P: <?php echo $client_phone; ?></li>
<li>E: <?php echo $client_email; ?></li>
</ul>
</div>
</div>
<div class="row mb-4">
<div class="col-sm-8">
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<td>Quote Date</td>
<td class="text-right"><?php echo $quote_date; ?></td>
</tr>
</table>
</div>
</div>
<?php $sql_items = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE quote_id = $quote_id ORDER BY item_id ASC"); ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th class="text-right">Price</th>
<th class="text-right">Tax</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_items)){
$item_id = $row['item_id'];
$item_name = $row['item_name'];
$item_description = $row['item_description'];
$item_quantity = $row['item_quantity'];
$item_price = $row['item_price'];
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
<tr>
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right">$<?php echo number_format($item_total,2); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-7">
<div class="card">
<div class="card-body">
<div><?php echo $quote_note; ?></div>
<div class="row mb-4">
<div class="col-sm-2">
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
</div>
<div class="col-sm-10">
<h3 class="text-right"><strong>Quote</strong><br><small class="text-secondary"><?php echo $quote_number; ?></small></h3>
</div>
</div>
</div>
<div class="col-3 offset-2">
<table class="table table-borderless">
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right">$<?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($discount > 0){ ?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right">$<?php echo number_format($quote_discount,2); ?></td>
</tr>
<?php } ?>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right">$<?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Total</strong></td>
<td class="text-right"><strong>$<?php echo number_format($quote_amount,2); ?></strong></td>
</tr>
</tbody>
</table>
<div class="row mb-4">
<div class="col-sm">
<ul class="list-unstyled">
<li><h4><strong><?php echo $company_name; ?></strong></h4></li>
<li><?php echo $config_company_address; ?></li>
<li><?php echo "$config_company_city $config_company_state $config_company_zip"; ?></li>
<li>P: <?php echo $config_company_phone; ?></li>
<li><?php echo $config_company_email; ?></li>
</ul>
</div>
<div class="col-sm">
<ul class="list-unstyled text-right">
<li><h4><strong><?php echo $client_name; ?></strong></h4></li>
<li><?php echo $client_address; ?></li>
<li><?php echo "$client_city $client_state $client_zip"; ?></li>
<li>P: <?php echo $client_phone; ?></li>
<li>E: <?php echo $client_email; ?></li>
</ul>
</div>
</div>
<div class="row mb-4">
<div class="col-sm-8">
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<td>Quote Date</td>
<td class="text-right"><?php echo $quote_date; ?></td>
</tr>
</table>
</div>
</div>
<?php $sql_items = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE quote_id = $quote_id ORDER BY item_id ASC"); ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<table class="table">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th class="text-right">Price</th>
<th class="text-right">Tax</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_items)){
$item_id = $row['item_id'];
$item_name = $row['item_name'];
$item_description = $row['item_description'];
$item_quantity = $row['item_quantity'];
$item_price = $row['item_price'];
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
<tr>
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right">$<?php echo number_format($item_total,2); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-7">
<div class="card">
<div class="card-body">
<div><?php echo $quote_note; ?></div>
</div>
</div>
</div>
<div class="col-3 offset-2">
<table class="table table-borderless">
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right">$<?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($discount > 0){ ?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right">$<?php echo number_format($quote_discount,2); ?></td>
</tr>
<?php } ?>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right">$<?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Total</strong></td>
<td class="text-right"><strong>$<?php echo number_format($quote_amount,2); ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr class="mt-5">
<center><?php echo $config_quote_footer; ?></center>
</div>
</div>
<hr class="mt-5">
<center><?php echo $config_quote_footer; ?></center>
<?php
}else{
echo "GTFO";

View File

@ -1,62 +1,46 @@
<?php
//Debug - Page Load Time
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
?>
<?php
include("config.php");
include("check_login.php");
include("vendor/Parsedown.php");
include("functions.php");
?>
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php echo $config_app_name; ?></title>
<link href="vendor/easy-markdown-editor/css/easymde.css" rel="stylesheet" type="text/css">
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template-->
<link href="css/sb-admin.css" rel="stylesheet" type="text/css">
<link href="vendor/datepicker/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" type="text/css">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> -->
<!-- Custom Style Sheet -->
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="vendor/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet" type="text/css">
<link href='vendor/fullcalendar/core/main.min.css' rel='stylesheet' />
<link href='vendor/fullcalendar/daygrid/main.min.css' rel='stylesheet' />
<link href='vendor/fullcalendar/timegrid/main.min.css' rel='stylesheet' />
<link href='vendor/fullcalendar/list/main.min.css' rel='stylesheet' />
<link href='vendor/fullcalendar/bootstrap/main.min.css' rel='stylesheet' />
<link href='vendor/daterangepicker/daterangepicker.css' rel='stylesheet' />
<link href="vendor/Inputmask/css/inputmask.css" rel="stylesheet" />
<link href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" type="text/css">
<link href="plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css">
<link href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css" rel="stylesheet" type="text/css">
<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />
<link href='plugins/fullcalendar-daygrid/main.min.css' rel='stylesheet' />
<link href='plugins/fullcalendar-timegrid/main.min.css' rel='stylesheet' />
<link href='plugins/fullcalendar-bootstrap/main.min.css' rel='stylesheet' />
<link href='plugins/daterangepicker/daterangepicker.css' rel='stylesheet' />
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper text-sm">
<?php include("top_nav.php"); ?>
<body id="page-top">
<?php include("top_nav.php"); ?>
<div id="wrapper">
<?php
if(basename(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH)) == "client.php"){
@ -65,27 +49,30 @@
}else{
include("side_nav.php");
}
}
?>
<div id="content-wrapper">
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Main content -->
<div class="content mt-3">
<div class="container-fluid">
<?php
//Alert Feedback
if(!empty($_SESSION['alert_message'])){
?>
<div class="alert alert-success alert-<?php echo $_SESSION['alert_type']; ?>" id="alert">
<?php echo $_SESSION['alert_message']; ?>
<button class='close' data-dismiss='alert'>&times;</button>
</div>
<?php
<div class="container-fluid">
$_SESSION['alert_type'] = '';
$_SESSION['alert_message'] = '';
<?php
//Alert Feedback
if(!empty($_SESSION['alert_message'])){
?>
<div class="alert alert-success alert-<?php echo $_SESSION['alert_type']; ?>" id="alert">
<?php echo $_SESSION['alert_message']; ?>
<button class='close' data-dismiss='alert'>&times;</button>
</div>
<?php
$_SESSION['alert_type'] = '';
$_SESSION['alert_message'] = '';
}
}
?>
?>

View File

@ -87,7 +87,6 @@ if(isset($_GET['invoice_id'])){
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=invoices"><?php echo $client_name; ?></a>
</li>
<li class="breadcrumb-item active"><?php echo $invoice_number; ?></li>
<span class="p-2 ml-2 badge badge-<?php echo $invoice_badge_color; ?>"><?php echo $invoice_status; ?></span>
<?php if(isset($invoice_overdue)){ ?>
<span class="p-2 ml-2 badge badge-danger"><?php echo $invoice_overdue; ?></span>
<?php } ?>
@ -95,204 +94,216 @@ if(isset($_GET['invoice_id'])){
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
<div class="row mb-4 d-print-none">
<div class="col-md-4">
<button class="btn btn-success btn-sm" type="submit" name="save_invoice"><i class="fa fa-fw fa-check"></i> Save</button>
</div>
<div class="col-md-8">
<div class="dropdown dropleft text-center">
<button class="btn btn-primary btn-sm float-right" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-fw fa-ellipsis-v"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editInvoiceModal<?php echo $invoice_id; ?>">Edit</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceCopyModal<?php echo $invoice_id; ?>">Copy</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceRecurringModal<?php echo $invoice_id; ?>">Create Recurring</a>
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">Send</a>
<?php if($invoice_status == 'Draft'){ ?><a class="dropdown-item" href="post.php?mark_invoice_sent=<?php echo $invoice_id; ?>">Mark Sent</a><?php } ?>
<?php if($invoice_status !== 'Paid' and $invoice_status !== 'Cancelled'){ ?><a class="dropdown-item" href="#" data-toggle="modal" data-target="#addPaymentModal">Add Payment</a><?php } ?>
<a class="dropdown-item" href="#" onclick="window.print();">Print</a>
<a class="dropdown-item" href="guest_view_invoice.php?invoice_id=<?php echo "$invoice_id&url_key=$invoice_url_key"; ?>">Guest URL</a>
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
<?php if($invoice_status !== 'Cancelled' and $invoice_status !== 'Paid'){ ?>
<a class="dropdown-item" href="post.php?cancel_invoice=<?php echo $invoice_id; ?>">Cancel</a>
<?php } ?>
<div class="card">
<div class="card-header d-print-none">
<div class="row">
<div class="col-md-4">
<button class="btn btn-success btn-sm" type="submit" name="save_invoice"><i class="fa fa-fw fa-check"></i> Save</button>
</div>
<div class="col-md-8">
<div class="dropdown dropleft text-center">
<button class="btn btn-primary btn-sm float-right" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-fw fa-ellipsis-v"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editInvoiceModal<?php echo $invoice_id; ?>">Edit</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceCopyModal<?php echo $invoice_id; ?>">Copy</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addInvoiceRecurringModal<?php echo $invoice_id; ?>">Create Recurring</a>
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">Send</a>
<?php if($invoice_status == 'Draft'){ ?><a class="dropdown-item" href="post.php?mark_invoice_sent=<?php echo $invoice_id; ?>">Mark Sent</a><?php } ?>
<?php if($invoice_status !== 'Paid' and $invoice_status !== 'Cancelled'){ ?><a class="dropdown-item" href="#" data-toggle="modal" data-target="#addPaymentModal">Add Payment</a><?php } ?>
<a class="dropdown-item" href="#" onclick="window.print();">Print</a>
<a class="dropdown-item" href="guest_view_invoice.php?invoice_id=<?php echo "$invoice_id&url_key=$invoice_url_key"; ?>">Guest URL</a>
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
<?php if($invoice_status !== 'Cancelled' and $invoice_status !== 'Paid'){ ?>
<a class="dropdown-item" href="post.php?cancel_invoice=<?php echo $invoice_id; ?>">Cancel</a>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="d-print-none">
<div class="row mb-4">
<div class="col-sm-2">
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
</div>
<div class="col-sm-10">
<h3 class="text-right"><strong>Invoice</strong><br><small class="text-secondary"><?php echo $invoice_number; ?></small></h3>
</div>
</div>
<div class="row mb-4">
<div class="col-sm">
<ul class="list-unstyled">
<li><h4><strong><?php echo $config_company_name; ?></strong></h4></li>
<li><?php echo $config_company_address; ?></li>
<li><?php echo "$config_company_city $config_company_state $config_company_zip"; ?></li>
<li>P: <?php echo $config_company_phone; ?></li>
<li><?php echo $config_company_email; ?></li>
</ul>
</div>
<div class="col-sm">
<ul class="list-unstyled text-right">
<li><h4><strong><?php echo $client_name; ?></strong></h4></li>
<li><?php echo $client_address; ?></li>
<li><?php echo "$client_city $client_state $client_zip"; ?></li>
<li>P: <?php echo $client_phone; ?></li>
<li>E: <?php echo $client_email; ?></li>
</ul>
</div>
</div>
<div class="row mb-4">
<div class="col-sm-8">
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<td>Invoice Date</td>
<td class="text-right"><?php echo $invoice_date; ?></td>
</tr>
<tr>
<td>Due Date</td>
<td class="text-right"><div class="<?php echo $invoice_color; ?>"><?php echo $invoice_due; ?></div></td>
</tr>
</table>
</div>
</div>
<?php $sql_invoice_items = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE invoice_id = $invoice_id ORDER BY item_id ASC"); ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<table class="table">
<thead>
<tr>
<th class="d-print-none"></th>
<th>Product</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th class="text-right">Price</th>
<th class="text-right">Tax</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_invoice_items)){
$item_id = $row['item_id'];
$item_name = $row['item_name'];
$item_description = $row['item_description'];
$item_quantity = $row['item_quantity'];
$item_price = $row['item_price'];
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
<tr>
<td class="text-center d-print-none">
<a class="text-secondary" href="#" data-toggle="modal" data-target="#editItemModal<?php echo $item_id; ?>"><i class="fa fa-fw fa-edit"></i></a>
<a class="text-danger" href="post.php?delete_invoice_item=<?php echo $item_id; ?>"><i class="fa fa-fw fa-trash-alt"></i></a>
</td>
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_total,2); ?></td>
</tr>
<?php
include("edit_item_modal.php");
}
?>
<tr class="d-print-none">
<td></td>
<td><input type="text" class="form-control" name="name" placeholder="Product"></td>
<td><textarea class="form-control" rows="1" name="description" placeholder="Description"></textarea></td>
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: center;" name="qty" placeholder="Quantity"></td>
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: right;" name="price" placeholder="Price"></td>
<td>
<select dir="rtl" class="form-control" name="tax">
<option <?php if($item_tax == '0.00'){ echo "selected"; } ?> value="0.00">None</option>
<option <?php if($item_tax == '0.07'){ echo "selected"; } ?> value="0.07">State Tax 7%</option>
</select>
</td>
<td></td>
</tr>
</tbody>
</table>
<div class="card-body">
<div class="row mb-4">
<div class="col-sm-2">
<img class="img-fluid" src="<?php echo $config_invoice_logo; ?>">
</div>
<div class="col-sm-10">
<div class="ribbon-wrapper">
<div class="ribbon bg-<?php echo $invoice_badge_color; ?>">
<?php echo $invoice_status; ?>
</div>
</div>
<h3 class="text-right mt-5"><strong>Invoice</strong><br><small class="text-secondary"><?php echo $invoice_number; ?></small></h3>
</div>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-7">
<div class="card d-none d-print-block">
<div class="card-body">
<div><?php echo $invoice_note; ?></div>
<div class="row mb-4">
<div class="col-sm">
<ul class="list-unstyled">
<li><h4><strong><?php echo $config_company_name; ?></strong></h4></li>
<li><?php echo $config_company_address; ?></li>
<li><?php echo "$config_company_city $config_company_state $config_company_zip"; ?></li>
<li>P: <?php echo $config_company_phone; ?></li>
<li><?php echo $config_company_email; ?></li>
</ul>
</div>
<div class="col-sm">
<ul class="list-unstyled text-right">
<li><h4><strong><?php echo $client_name; ?></strong></h4></li>
<li><?php echo $client_address; ?></li>
<li><?php echo "$client_city $client_state $client_zip"; ?></li>
<li>P: <?php echo $client_phone; ?></li>
<li>E: <?php echo $client_email; ?></li>
</ul>
</div>
</div>
<textarea rows="6" class="form-control mb-2 d-print-none" name="invoice_note" placeholder="Notes"><?php echo $invoice_note; ?></textarea>
</div>
<div class="col-3 offset-2">
<table class="table table-borderless">
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right text-monospace">$<?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($discount > 0){ ?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right text-monospace">$<?php echo number_format($invoice_discount,2); ?></td>
</tr>
<?php } ?>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right text-monospace">$<?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<?php if($amount_paid > 0){ ?>
<tr class="border-bottom">
<td><div class="text-success">Paid to Date</div></td>
<td class="text-right text-monospace text-success">$<?php echo number_format($amount_paid,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Balance Due</strong></td>
<td class="text-right text-monospace"><strong>$<?php echo number_format($balance,2); ?></strong></td>
</tr>
</tbody>
</table>
</div>
<div class="row mb-4">
<div class="col-sm-8">
</div>
<div class="col-sm-4">
<table class="table">
<tr>
<td>Invoice Date</td>
<td class="text-right"><?php echo $invoice_date; ?></td>
</tr>
<tr>
<td>Due Date</td>
<td class="text-right"><div class="<?php echo $invoice_color; ?>"><?php echo $invoice_due; ?></div></td>
</tr>
</table>
</div>
</div>
<?php $sql_invoice_items = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE invoice_id = $invoice_id ORDER BY item_id ASC"); ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<table class="table">
<thead>
<tr>
<th class="d-print-none"></th>
<th>Product</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th class="text-right">Price</th>
<th class="text-right">Tax</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql_invoice_items)){
$item_id = $row['item_id'];
$item_name = $row['item_name'];
$item_description = $row['item_description'];
$item_quantity = $row['item_quantity'];
$item_price = $row['item_price'];
$item_subtotal = $row['item_price'];
$item_tax = $row['item_tax'];
$item_total = $row['item_total'];
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
<tr>
<td class="text-center d-print-none">
<a class="text-secondary" href="#" data-toggle="modal" data-target="#editItemModal<?php echo $item_id; ?>"><i class="fa fa-fw fa-edit"></i></a>
<a class="text-danger" href="post.php?delete_invoice_item=<?php echo $item_id; ?>"><i class="fa fa-fw fa-trash-alt"></i></a>
</td>
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right text-monospace">$<?php echo number_format($item_total,2); ?></td>
</tr>
<?php
include("edit_item_modal.php");
}
?>
<tr class="d-print-none">
<td></td>
<td><input type="text" class="form-control" name="name" placeholder="Product"></td>
<td><textarea class="form-control" rows="1" name="description" placeholder="Description"></textarea></td>
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: center;" name="qty" placeholder="Quantity"></td>
<td><input type="number" step="0.01" min="0" class="form-control" style="text-align: right;" name="price" placeholder="Price"></td>
<td>
<select dir="rtl" class="form-control" name="tax">
<option <?php if($item_tax == '0.00'){ echo "selected"; } ?> value="0.00">None</option>
<option <?php if($item_tax == '0.07'){ echo "selected"; } ?> value="0.07">State Tax 7%</option>
</select>
</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-7">
<div class="card d-none d-print-block">
<div class="card-body">
<div><?php echo $invoice_note; ?></div>
</div>
</div>
<textarea rows="6" class="form-control mb-2 d-print-none" name="invoice_note" placeholder="Notes"><?php echo $invoice_note; ?></textarea>
</div>
<div class="col-3 offset-2">
<table class="table table-borderless">
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right text-monospace">$<?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($discount > 0){ ?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right text-monospace">$<?php echo number_format($invoice_discount,2); ?></td>
</tr>
<?php } ?>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right text-monospace">$<?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<?php if($amount_paid > 0){ ?>
<tr class="border-bottom">
<td><div class="text-success">Paid to Date</div></td>
<td class="text-right text-monospace text-success">$<?php echo number_format($amount_paid,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Balance Due</strong></td>
<td class="text-right text-monospace"><strong>$<?php echo number_format($balance,2); ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
<hr class="d-none d-print-block mt-5">
<center class="d-none d-print-block"><?php echo $config_invoice_footer; ?></center>
</div>
</form>
<hr class="d-none d-print-block mt-5">
<center class="d-none d-print-block"><?php echo $config_invoice_footer; ?></center>
</div>
<div class="row d-print-none mb-3">
<div class="col-sm">

View File

@ -104,57 +104,61 @@
?>
<div class="row">
<div class="col-xl-3 col-sm-6 mb-3">
<a class="text-white text-decoration-none" href="?q=Draft">
<div class="card text-white bg-secondary o-hidden">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-pencil-ruler"></i>
</div>
<div class="mr-5"><?php echo $draft_count; ?> Draft <h1>$<?php echo number_format($total_draft,2); ?></h1></div>
</div>
<div class="col-lg-3 col-6">
<!-- small box -->
<a href="?q=Draft" class="small-box bg-secondary">
<div class="inner">
<h3>$<?php echo number_format($total_draft,2); ?></h3>
<p><?php echo $draft_count; ?> Draft</p>
</div>
<div class="icon">
<i class="fa fa-pencil-ruler"></i>
</div>
</a>
</div>
<!-- ./col -->
<div class="col-xl-3 col-sm-6 mb-3">
<a class="text-white text-decoration-none" href="?q=Sent">
<div class="card text-white bg-warning o-hidden">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-paper-plane"></i>
</div>
<div class="mr-5"><?php echo $sent_count; ?> Sent <h1>$<?php echo number_format($total_sent,2); ?></h1></div>
</div>
<div class="col-lg-3 col-6">
<!-- small box -->
<a href="?q=Sent" class="small-box bg-warning">
<div class="inner text-white">
<h3>$<?php echo number_format($total_sent,2); ?></h3>
<p><?php echo $sent_count; ?> Sent</p>
</div>
<div class="icon">
<i class="fa fa-paper-plane"></i>
</div>
</a>
</div>
<!-- ./col -->
<div class="col-xl-3 col-sm-6 mb-3">
<a class="text-white text-decoration-none" href="?q=Viewed">
<div class="card text-white bg-info o-hidden">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-eye"></i>
</div>
<div class="mr-5"><?php echo $viewed_count; ?> Viewed <h1>$<?php echo number_format($total_viewed,2); ?></h1></div>
</div>
<div class="col-lg-3 col-6">
<!-- small box -->
<a href="?q=Viewed" class="small-box bg-info">
<div class="inner">
<h3>$<?php echo number_format($total_viewed,2); ?></h3>
<p><?php echo $viewed_count; ?> Viewed</p>
</div>
<div class="icon">
<i class="fa fa-eye"></i>
</div>
</a>
</div>
<div class="col-xl-3 col-sm-6 mb-3">
<a class="text-white text-decoration-none" href="?q=Partial">
<div class="card text-white bg-primary o-hidden">
<div class="card-body">
<div class="card-body-icon">
<i class="fas fa-fw fa-wine-glass-alt"></i>
</div>
<div class="mr-5"><?php echo $partial_count; ?> Partial <h1>$<?php echo number_format($total_partial,2); ?></h1></div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-6">
<!-- small box -->
<a href="?q=Partial" class="small-box bg-primary">
<div class="inner">
<h3>$<?php echo number_format($total_partial,2); ?></h3>
<p><?php echo $partial_count; ?> Partial</p>
</div>
<div class="icon">
<i class="fa fa-wine-glass-alt"></i>
</div>
</a>
</div>
<!-- ./col -->
</div>

127
login.php
View File

@ -78,85 +78,82 @@ if(isset($_POST['login'])){
?>
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo $config_app_name; ?> | Login</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<!-- Font Awesome -->
<link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> -->
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<b><?php echo $config_app_name; ?></b> Login
</div>
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg"><?php if(isset($response)) { echo $response; } ?></p>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php echo $config_app_name; ?> | Login</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template-->
<link href="css/sb-admin.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body class="bg-secondary">
<div class="container">
<div class="card card-login mx-auto mt-5 bg-dark">
<div class="card-header mt-2 text-white text-center"><h3>Login</h3></div>
<div class="card-body bg-white">
<?php if(isset($response)) { echo $response; } ?>
<form method="post">
<div class="input-group mb-3">
<input type="email" class="form-control" placeholder="Email" name="email" required autofocus>
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-envelope"></span>
</div>
</div>
</div>
<div class="input-group mb-3">
<input type="password" class="form-control" placeholder="Password" name="password" required>
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-lock"></span>
</div>
</div>
</div>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Token" name="current_code">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-key"></span>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<input type="text" class="form-control" name="email" placeholder="Username" required autofocus>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
</div>
<input type="password" class="form-control" name="password" placeholder="Password" required>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
</div>
<input type="text" class="form-control" name="current_code" placeholder="Token">
</div>
</div>
<button class="btn btn-primary btn-block" type="submit" name="login">Sign in</button>
<button type="submit" class="btn btn-primary btn-block" name="login">Sign In</button>
</form>
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- Prevents resubmit on refresh or back -->
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
if(window.history.replaceState){
window.history.replaceState(null,null,window.location.href);
}
</script>
</body>
</body>
</html>

View File

@ -0,0 +1,47 @@
/*
* DOM element rendering detection
* https://davidwalsh.name/detect-node-insertion
*/
@keyframes chartjs-render-animation {
from { opacity: 0.99; }
to { opacity: 1; }
}
.chartjs-render-monitor {
animation: chartjs-render-animation 0.001s;
}
/*
* DOM element resizing detection
* https://github.com/marcj/css-element-queries
*/
.chartjs-size-monitor,
.chartjs-size-monitor-expand,
.chartjs-size-monitor-shrink {
position: absolute;
direction: ltr;
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
pointer-events: none;
visibility: hidden;
z-index: -1;
}
.chartjs-size-monitor-expand > div {
position: absolute;
width: 1000000px;
height: 1000000px;
left: 0;
top: 0;
}
.chartjs-size-monitor-shrink > div {
position: absolute;
width: 200%;
height: 200%;
left: 0;
top: 0;
}

1
plugins/chart.js/Chart.min.css vendored Normal file
View File

@ -0,0 +1 @@
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}

View File

@ -0,0 +1,20 @@
{
"name": "daterangepicker",
"main": [
"daterangepicker.js",
"daterangepicker.css"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"moment.js",
"moment.min.js"
],
"dependencies": {
"jquery": "1.9.1 - 3",
"moment": ">=2.9.0"
}
}

Some files were not shown because too many files have changed in this diff Show More