mirror of https://github.com/itflow-org/itflow
Officially moved client nav to the side, moved add new client items to each tavb instead bolded client balance if negative
This commit is contained in:
parent
bdbbecfc7b
commit
b24fa9f3de
48
client.php
48
client.php
|
|
@ -109,21 +109,8 @@ if(isset($_GET['client_id'])){
|
|||
<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="#addClientContactModal">New Contact</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientLocationModal">New Location</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientAssetModal">New Asset</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientVendorModal">New Vendor</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientLoginModal">New Login</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientNetworkModal">New Network</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientDomainModal">New Domain</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientApplicationModal">New Application</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientInvoiceModal">New Invoice</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addRecurringInvoiceModal">New Recurring</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addQuoteModal">New Quote</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientFileModal">Upload File</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientNoteModal">New Note</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="client_print.php?client_id=<?php echo $client_id; ?>">Print</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<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>
|
||||
|
|
@ -133,37 +120,14 @@ if(isset($_GET['client_id'])){
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<?php include("client_nav.php"); ?>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<?php include("client_routes.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include("client_routes.php"); ?>
|
||||
|
||||
<?php include("edit_client_modal.php"); ?>
|
||||
<?php include("add_client_contact_modal.php"); ?>
|
||||
<?php include("add_client_location_modal.php"); ?>
|
||||
<?php include("add_client_asset_modal.php"); ?>
|
||||
<?php include("add_client_vendor_modal.php"); ?>
|
||||
<?php include("add_client_login_modal.php"); ?>
|
||||
<?php include("add_client_network_modal.php"); ?>
|
||||
<?php include("add_client_domain_modal.php"); ?>
|
||||
<?php include("add_client_application_modal.php"); ?>
|
||||
<?php include("add_client_note_modal.php"); ?>
|
||||
<?php include("add_client_invoice_modal.php"); ?>
|
||||
<?php include("add_recurring_invoice_modal.php"); ?>
|
||||
<?php include("add_invoice_payment_modal.php"); ?>
|
||||
<?php include("add_quote_modal.php"); ?>
|
||||
<?php include("add_client_file_modal.php"); ?>
|
||||
|
||||
<?php
|
||||
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
|
@ -1,81 +1,91 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_applications WHERE client_id = $client_id ORDER BY client_application_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Application</th>
|
||||
<th>Type</th>
|
||||
<th>License</th>
|
||||
<th></th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_application_id = $row['client_application_id'];
|
||||
$client_application_name = $row['client_application_name'];
|
||||
$client_application_type = $row['client_application_type'];
|
||||
$client_application_license = $row['client_application_license'];
|
||||
|
||||
$sql2 = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_vendor_id = $client_vendor_id");
|
||||
$row = mysqli_fetch_array($sql2);
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
$client_application_id_relation = $row['client_application_id'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_application_name; ?></td>
|
||||
<td><?php echo $client_application_type; ?></td>
|
||||
<td><?php echo $client_application_license; ?></td>
|
||||
<td>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-box"></i> Applications</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientApplicationModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Application</th>
|
||||
<th>Type</th>
|
||||
<th>License</th>
|
||||
<th></th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($client_application_id == $client_application_id_relation){
|
||||
?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $client_login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_application_id = $row['client_application_id'];
|
||||
$client_application_name = $row['client_application_name'];
|
||||
$client_application_type = $row['client_application_type'];
|
||||
$client_application_license = $row['client_application_license'];
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $client_login_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-key"></i> Login</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h2><?php echo $client_login_username; ?></h2>
|
||||
<h3><?php echo $client_login_password; ?></h3>
|
||||
$sql2 = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_vendor_id = $client_vendor_id");
|
||||
$row = mysqli_fetch_array($sql2);
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
$client_application_id_relation = $row['client_application_id'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_application_name; ?></td>
|
||||
<td><?php echo $client_application_type; ?></td>
|
||||
<td><?php echo $client_application_license; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($client_application_id == $client_application_id_relation){
|
||||
?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $client_login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $client_login_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-key"></i> Login</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h2><?php echo $client_login_username; ?></h2>
|
||||
<h3><?php echo $client_login_password; ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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="#editClientApplicationModal<?php echo $client_application_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_application=<?php echo $client_application_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_application_modal.php");
|
||||
}
|
||||
?>
|
||||
</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="#editClientApplicationModal<?php echo $client_application_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_application=<?php echo $client_application_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_application_modal.php");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("add_client_application_modal.php"); ?>
|
||||
|
|
@ -1,99 +1,110 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_assets WHERE client_id = $client_id ORDER BY client_asset_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Name</th>
|
||||
<th>Make/Model</th>
|
||||
<th>Serial</th>
|
||||
<th></th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_asset_id = $row['client_asset_id'];
|
||||
$client_asset_type = $row['client_asset_type'];
|
||||
$client_asset_name = $row['client_asset_name'];
|
||||
$client_asset_make = $row['client_asset_make'];
|
||||
$client_asset_model = $row['client_asset_model'];
|
||||
$client_asset_serial = $row['client_asset_serial'];
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-tag"></i> Assets</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientAssetModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
$sql2 = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_asset_id = $client_asset_id");
|
||||
$row = mysqli_fetch_array($sql2);
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
$client_asset_id_relation = $row['client_asset_id'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_asset_type"; ?></td>
|
||||
<td><?php echo "$client_asset_name"; ?></td>
|
||||
<td><?php echo "$client_asset_make $client_asset_model"; ?></td>
|
||||
<td><?php echo "$client_asset_serial"; ?></td>
|
||||
<td>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Name</th>
|
||||
<th>Make/Model</th>
|
||||
<th>Serial</th>
|
||||
<th></th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($client_asset_id == $client_asset_id_relation){
|
||||
?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $client_login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_asset_id = $row['client_asset_id'];
|
||||
$client_asset_type = $row['client_asset_type'];
|
||||
$client_asset_name = $row['client_asset_name'];
|
||||
$client_asset_make = $row['client_asset_make'];
|
||||
$client_asset_model = $row['client_asset_model'];
|
||||
$client_asset_serial = $row['client_asset_serial'];
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $client_login_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-key"></i> Login</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_username; ?>" readonly>
|
||||
$sql2 = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_asset_id = $client_asset_id");
|
||||
$row = mysqli_fetch_array($sql2);
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
$client_asset_id_relation = $row['client_asset_id'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_asset_type"; ?></td>
|
||||
<td><?php echo "$client_asset_name"; ?></td>
|
||||
<td><?php echo "$client_asset_make $client_asset_model"; ?></td>
|
||||
<td><?php echo "$client_asset_serial"; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($client_asset_id == $client_asset_id_relation){
|
||||
?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $client_login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $client_login_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-key"></i> Login</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_username; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_password; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_password; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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="#editClientAssetModal<?php echo $client_asset_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_asset=<?php echo $client_asset_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_asset_modal.php");
|
||||
}
|
||||
?>
|
||||
</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="#editClientAssetModal<?php echo $client_asset_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_asset=<?php echo $client_asset_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_asset_modal.php");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("add_client_asset_modal.php"); ?>
|
||||
|
|
@ -1,54 +1,63 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_contacts WHERE client_id = $client_id ORDER BY client_contact_id DESC"); ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-users"></i> Contacts</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientContactModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Title</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_contact_id = $row['client_contact_id'];
|
||||
$client_contact_name = $row['client_contact_name'];
|
||||
$client_contact_title = $row['client_contact_title'];
|
||||
$client_contact_phone = $row['client_contact_phone'];
|
||||
if(strlen($client_contact_phone)>2){
|
||||
$client_contact_phone = substr($row['client_contact_phone'],0,3)."-".substr($row['client_contact_phone'],3,3)."-".substr($row['client_contact_phone'],6,4);
|
||||
}
|
||||
$client_contact_email = $row['client_contact_email'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_contact_name"; ?></td>
|
||||
<td><?php echo "$client_contact_title"; ?></td>
|
||||
<td><a href="mailto:<?php echo $client_contact_email; ?>"><?php echo "$client_contact_email"; ?></a></td>
|
||||
<td><?php echo "$client_contact_phone"; ?></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="#editClientContactModal<?php echo $client_contact_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_contact=<?php echo $client_contact_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Title</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_contact_id = $row['client_contact_id'];
|
||||
$client_contact_name = $row['client_contact_name'];
|
||||
$client_contact_title = $row['client_contact_title'];
|
||||
$client_contact_phone = $row['client_contact_phone'];
|
||||
if(strlen($client_contact_phone)>2){
|
||||
$client_contact_phone = substr($row['client_contact_phone'],0,3)."-".substr($row['client_contact_phone'],3,3)."-".substr($row['client_contact_phone'],6,4);
|
||||
}
|
||||
$client_contact_email = $row['client_contact_email'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_contact_name"; ?></td>
|
||||
<td><?php echo "$client_contact_title"; ?></td>
|
||||
<td><a href="mailto:<?php echo $client_contact_email; ?>"><?php echo "$client_contact_email"; ?></a></td>
|
||||
<td><?php echo "$client_contact_phone"; ?></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="#editClientContactModal<?php echo $client_contact_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_contact=<?php echo $client_contact_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
include("edit_client_contact_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
include("edit_client_contact_modal.php");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("add_client_contact_modal.php"); ?>
|
||||
|
|
@ -1,51 +1,62 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_domains WHERE client_id = $client_id ORDER BY client_domain_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Registrar</th>
|
||||
<th>Expire</th>
|
||||
<th>Server</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_domain_id = $row['client_domain_id'];
|
||||
$client_domain_name = $row['client_domain_name'];
|
||||
$client_domain_registrar = $row['client_domain_registrar'];
|
||||
$client_domain_expire = $row['client_domain_expire'];
|
||||
$client_domain_server = $row['client_domain_server'];
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-globe"></i> Domains</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientDomainModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_domain_name; ?></td>
|
||||
<td><?php echo $client_domain_registrar; ?></td>
|
||||
<td><?php echo $client_domain_expire; ?></td>
|
||||
<td><?php echo $client_domain_server; ?></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="#editClientDomainModal<?php echo $client_domain_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_domain=<?php echo $client_domain_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Registrar</th>
|
||||
<th>Expire</th>
|
||||
<th>Server</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_domain_id = $row['client_domain_id'];
|
||||
$client_domain_name = $row['client_domain_name'];
|
||||
$client_domain_registrar = $row['client_domain_registrar'];
|
||||
$client_domain_expire = $row['client_domain_expire'];
|
||||
$client_domain_server = $row['client_domain_server'];
|
||||
|
||||
<?php
|
||||
include("edit_client_domain_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_domain_name; ?></td>
|
||||
<td><?php echo $client_domain_registrar; ?></td>
|
||||
<td><?php echo $client_domain_expire; ?></td>
|
||||
<td><?php echo $client_domain_server; ?></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="#editClientDomainModal<?php echo $client_domain_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_domain=<?php echo $client_domain_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
include("edit_client_domain_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_client_domain_modal.php"); ?>
|
||||
|
|
@ -1,25 +1,37 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id ORDER BY file_id DESC"); ?>
|
||||
<h3>Pictures</h3>
|
||||
<hr>
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$file_id = $row['file_id'];
|
||||
$file_name = $row['file_name'];
|
||||
|
||||
?>
|
||||
<div class="col-2 mb-3">
|
||||
<?php echo $file_name; ?>
|
||||
<a href="#" data-toggle="modal" data-target="#viewClientFileModal<?php echo $file_id; ?>">
|
||||
<img class="img-fluid" src="<?php echo $file_name; ?>">
|
||||
</a>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-paperclip"></i> Files</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientFileModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<h3>Pictures</h3>
|
||||
<hr>
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$file_id = $row['file_id'];
|
||||
$file_name = $row['file_name'];
|
||||
|
||||
?>
|
||||
<div class="col-2 mb-3">
|
||||
<?php echo $file_name; ?>
|
||||
<a href="#" data-toggle="modal" data-target="#viewClientFileModal<?php echo $file_id; ?>">
|
||||
<img class="img-fluid" src="<?php echo $file_name; ?>">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("view_client_file_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("view_client_file_modal.php");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php include("add_client_file_modal.php"); ?>
|
||||
|
|
@ -4,89 +4,100 @@
|
|||
|
||||
?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th class="text-right">Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Due</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$invoice_id = $row['invoice_id'];
|
||||
$invoice_number = $row['invoice_number'];
|
||||
$invoice_status = $row['invoice_status'];
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = $row['invoice_amount'];
|
||||
|
||||
$now = time();
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-file"></i> Invoices</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientInvoiceModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
if(($invoice_status == "Sent" or $invoice_status == "Partial") and strtotime($invoice_due) < $now ){
|
||||
$overdue_color = "text-danger font-weight-bold";
|
||||
$overdue_badge = "badge-danger";
|
||||
$invoice_status = "Overdue";
|
||||
}else{
|
||||
$overdue_color = "";
|
||||
$overdue_badge = "";
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th class="text-right">Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Due</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$invoice_id = $row['invoice_id'];
|
||||
$invoice_number = $row['invoice_number'];
|
||||
$invoice_status = $row['invoice_status'];
|
||||
$invoice_date = $row['invoice_date'];
|
||||
$invoice_due = $row['invoice_due'];
|
||||
$invoice_amount = $row['invoice_amount'];
|
||||
|
||||
$now = time();
|
||||
|
||||
if(($invoice_status == "Sent" or $invoice_status == "Partial") and strtotime($invoice_due) < $now ){
|
||||
$overdue_color = "text-danger font-weight-bold";
|
||||
$overdue_badge = "badge-danger";
|
||||
$invoice_status = "Overdue";
|
||||
}else{
|
||||
$overdue_color = "";
|
||||
$overdue_badge = "";
|
||||
}
|
||||
|
||||
//Set Badge color based off of invoice status
|
||||
if($invoice_status == "Sent"){
|
||||
$invoice_badge_color = "warning";
|
||||
}elseif($invoice_status == "Partial"){
|
||||
$invoice_badge_color = "primary";
|
||||
}elseif($invoice_status == "Paid"){
|
||||
$invoice_badge_color = "success";
|
||||
}elseif($invoice_status == "Overdue"){
|
||||
$invoice_badge_color = "danger";
|
||||
}else{
|
||||
$invoice_badge_color = "secondary";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>">INV-<?php echo $invoice_number; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_amount,2); ?></td>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td><div class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></div></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $invoice_badge_color; ?> echo $overdue_badge;">
|
||||
<?php echo $invoice_status; ?>
|
||||
</span>
|
||||
</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="#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="post.php?email_invoice=<?php echo $invoice_id; ?>">Send</a>
|
||||
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
//Set Badge color based off of invoice status
|
||||
if($invoice_status == "Sent"){
|
||||
$invoice_badge_color = "warning";
|
||||
}elseif($invoice_status == "Partial"){
|
||||
$invoice_badge_color = "primary";
|
||||
}elseif($invoice_status == "Paid"){
|
||||
$invoice_badge_color = "success";
|
||||
}elseif($invoice_status == "Overdue"){
|
||||
$invoice_badge_color = "danger";
|
||||
}else{
|
||||
$invoice_badge_color = "secondary";
|
||||
}
|
||||
?>
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>">INV-<?php echo $invoice_number; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_amount,2); ?></td>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td><div class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></div></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $invoice_badge_color; ?> echo $overdue_badge;">
|
||||
<?php echo $invoice_status; ?>
|
||||
</span>
|
||||
</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="#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="post.php?email_invoice=<?php echo $invoice_id; ?>">Send</a>
|
||||
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("add_client_invoice_modal.php"); ?>
|
||||
|
|
@ -1,53 +1,64 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_locations WHERE client_id = $client_id ORDER BY client_location_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>Phone</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_location_id = $row['client_location_id'];
|
||||
$client_location_name = $row['client_location_name'];
|
||||
$client_location_address = $row['client_location_address'];
|
||||
$client_location_city = $row['client_location_city'];
|
||||
$client_location_state = $row['client_location_state'];
|
||||
$client_location_zip = $row['client_location_zip'];
|
||||
$client_location_phone = $row['client_location_phone'];
|
||||
if(strlen($client_location_phone)>2){
|
||||
$client_location_phone = substr($row['client_location_phone'],0,3)."-".substr($row['client_location_phone'],3,3)."-".substr($row['client_location_phone'],6,4);
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_location_name"; ?></td>
|
||||
<td><a href="//maps.<?php echo $session_map_source; ?>.com?q=<?php echo "$client_location_address $client_location_zip"; ?>" target="_blank"><?php echo "$client_location_address"; ?></td>
|
||||
<td><?php echo "$client_location_phone"; ?></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="#editClientLocationModal<?php echo $client_location_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_location=<?php echo $client_location_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-map-marker"></i> Locations</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientLocationModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<?php
|
||||
include("edit_client_location_modal.php");
|
||||
}
|
||||
?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>Phone</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_location_id = $row['client_location_id'];
|
||||
$client_location_name = $row['client_location_name'];
|
||||
$client_location_address = $row['client_location_address'];
|
||||
$client_location_city = $row['client_location_city'];
|
||||
$client_location_state = $row['client_location_state'];
|
||||
$client_location_zip = $row['client_location_zip'];
|
||||
$client_location_phone = $row['client_location_phone'];
|
||||
if(strlen($client_location_phone)>2){
|
||||
$client_location_phone = substr($row['client_location_phone'],0,3)."-".substr($row['client_location_phone'],3,3)."-".substr($row['client_location_phone'],6,4);
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_location_name"; ?></td>
|
||||
<td><a href="//maps.<?php echo $session_map_source; ?>.com?q=<?php echo "$client_location_address $client_location_zip"; ?>" target="_blank"><?php echo "$client_location_address"; ?></a></td>
|
||||
<td><?php echo "$client_location_phone"; ?></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="#editClientLocationModal<?php echo $client_location_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_location=<?php echo $client_location_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
include("edit_client_location_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_client_location_modal.php"); ?>
|
||||
|
|
@ -1,47 +1,57 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_id = $client_id ORDER BY client_login_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th>Username</th>
|
||||
<th>Password</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_description = $row['client_login_description'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_login_description"; ?></td>
|
||||
<td><?php echo "$client_login_username"; ?></td>
|
||||
<td><?php echo "$client_login_password"; ?></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="#editClientLoginModal<?php echo $client_login_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_login=<?php echo $client_login_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-key"></i> Logins</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientLoginModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th>Username</th>
|
||||
<th>Password</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_description = $row['client_login_description'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo "$client_login_description"; ?></td>
|
||||
<td><?php echo "$client_login_username"; ?></td>
|
||||
<td><?php echo "$client_login_password"; ?></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="#editClientLoginModal<?php echo $client_login_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_login=<?php echo $client_login_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_login_modal.php");
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
include("edit_client_login_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_client_login_modal.php"); ?>
|
||||
|
|
@ -1,51 +1,61 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_networks WHERE client_id = $client_id ORDER BY client_network_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Network</th>
|
||||
<th>Gateway</th>
|
||||
<th>DHCP Range</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_network_id = $row['client_network_id'];
|
||||
$client_network_name = $row['client_network_name'];
|
||||
$client_network = $row['client_network'];
|
||||
$client_network_gateway = $row['client_network_gateway'];
|
||||
$client_network_dhcp_range = $row['client_network_dhcp_range'];
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-network-wired"></i> Networks</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientNetworkModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Network</th>
|
||||
<th>Gateway</th>
|
||||
<th>DHCP Range</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_network_id = $row['client_network_id'];
|
||||
$client_network_name = $row['client_network_name'];
|
||||
$client_network = $row['client_network'];
|
||||
$client_network_gateway = $row['client_network_gateway'];
|
||||
$client_network_dhcp_range = $row['client_network_dhcp_range'];
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_network_name; ?></td>
|
||||
<td><?php echo $client_network; ?></td>
|
||||
<td><?php echo $client_network_gateway; ?></td>
|
||||
<td><?php echo $client_network_dhcp_range; ?></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="#editClientNetworkModal<?php echo $client_network_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_network=<?php echo $client_network_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_network_name; ?></td>
|
||||
<td><?php echo $client_network; ?></td>
|
||||
<td><?php echo $client_network_gateway; ?></td>
|
||||
<td><?php echo $client_network_dhcp_range; ?></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="#editClientNetworkModal<?php echo $client_network_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_network=<?php echo $client_network_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_network_modal.php");
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
include("edit_client_network_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_client_network_modal.php"); ?>
|
||||
|
|
@ -1,43 +1,55 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_notes WHERE client_id = $client_id ORDER BY client_note_id DESC"); ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-edit"></i> Notes</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientNoteModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_note_id = $row['client_note_id'];
|
||||
$client_note_subject = $row['client_note_subject'];
|
||||
$client_note_body = $row['client_note_body'];
|
||||
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_note_id = $row['client_note_id'];
|
||||
$client_note_subject = $row['client_note_subject'];
|
||||
$client_note_body = $row['client_note_body'];
|
||||
|
||||
?>
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
|
||||
<?php echo $client_note_subject; ?>
|
||||
<div class="dropdown dropleft text-center float-right">
|
||||
<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="#viewClientNoteModal<?php echo $client_note_id; ?>">View</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editClientNoteModal<?php echo $client_note_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_note=<?php echo $client_note_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
|
||||
<?php echo $client_note_subject; ?>
|
||||
<div class="dropdown dropleft text-center float-right">
|
||||
<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="#viewClientNoteModal<?php echo $client_note_id; ?>">View</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editClientNoteModal<?php echo $client_note_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_note=<?php echo $client_note_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php
|
||||
$Parsedown = new Parsedown();
|
||||
echo $Parsedown->text("$client_note_body");
|
||||
?>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small>Created 2019-02-13 - Updated 2019-04-22</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php
|
||||
$Parsedown = new Parsedown();
|
||||
echo $Parsedown->text("$client_note_body");
|
||||
?>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small>Created 2019-02-13 - Updated 2019-04-22</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("view_client_note_modal.php");
|
||||
include("edit_client_note_modal.php");
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
include("view_client_note_modal.php");
|
||||
include("edit_client_note_modal.php");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_client_note_modal.php"); ?>
|
||||
|
|
|
|||
|
|
@ -4,75 +4,85 @@
|
|||
|
||||
?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th class="text-right">Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$quote_id = $row['quote_id'];
|
||||
$quote_number = $row['quote_number'];
|
||||
$quote_status = $row['quote_status'];
|
||||
$quote_date = $row['quote_date'];
|
||||
$quote_amount = $row['quote_amount'];
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-file"></i> Quotes</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientQuoteModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th class="text-right">Amount</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$quote_id = $row['quote_id'];
|
||||
$quote_number = $row['quote_number'];
|
||||
$quote_status = $row['quote_status'];
|
||||
$quote_date = $row['quote_date'];
|
||||
$quote_amount = $row['quote_amount'];
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
|
||||
if($quote_status == "Sent"){
|
||||
$quote_badge_color = "warning";
|
||||
}elseif($quote_status == "Viewed"){
|
||||
$quote_badge_color = "primary";
|
||||
}elseif($quote_status == "Approved"){
|
||||
$quote_badge_color = "success";
|
||||
}else{
|
||||
$quote_badge_color = "secondary";
|
||||
}
|
||||
if($quote_status == "Sent"){
|
||||
$quote_badge_color = "warning";
|
||||
}elseif($quote_status == "Viewed"){
|
||||
$quote_badge_color = "primary";
|
||||
}elseif($quote_status == "Approved"){
|
||||
$quote_badge_color = "success";
|
||||
}else{
|
||||
$quote_badge_color = "secondary";
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="quote.php?quote_id=<?php echo $quote_id; ?>">QUO-<?php echo $quote_number; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_amount,2); ?></td>
|
||||
<td class="text-right text-monospace <?php echo $balance_text_color; ?>">$<?php echo number_format($balance,2); ?></td>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td><div class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></div></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $invoice_badge_color; ?>">
|
||||
<?php echo $invoice_status; ?>
|
||||
</span>
|
||||
</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="#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="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="quote.php?quote_id=<?php echo $quote_id; ?>">QUO-<?php echo $quote_number; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_amount,2); ?></td>
|
||||
<td class="text-right text-monospace <?php echo $balance_text_color; ?>">$<?php echo number_format($balance,2); ?></td>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td><div class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></div></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $invoice_badge_color; ?>">
|
||||
<?php echo $invoice_status; ?>
|
||||
</span>
|
||||
</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="#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="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("add_client_quote_modal.php"); ?>
|
||||
|
|
@ -6,75 +6,86 @@
|
|||
ORDER BY recurring_invoices.recurring_invoice_id DESC");
|
||||
?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Frequency</th>
|
||||
<th>Start Date</th>
|
||||
<th>Last Sent</th>
|
||||
<th>Next Date</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$recurring_invoice_id = $row['recurring_invoice_id'];
|
||||
$recurring_invoice_frequency = $row['recurring_invoice_frequency'];
|
||||
$recurring_invoice_status = $row['recurring_invoice_status'];
|
||||
$recurring_invoice_start_date = $row['recurring_invoice_start_date'];
|
||||
$recurring_invoice_last_sent = $row['recurring_invoice_last_sent'];
|
||||
$recurring_invoice_next_date = $row['recurring_invoice_next_date'];
|
||||
$invoice_id = $row['invoice_id'];
|
||||
if($recurring_invoice_status == 1){
|
||||
$status = "Active";
|
||||
$status_badge_color = "success";
|
||||
}else{
|
||||
$status = "Inactive";
|
||||
$status_badge_color = "secondary";
|
||||
}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-copy"></i> Recurring Invoices</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addRecurringInvoiceModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Frequency</th>
|
||||
<th>Start Date</th>
|
||||
<th>Last Sent</th>
|
||||
<th>Next Date</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$recurring_invoice_id = $row['recurring_invoice_id'];
|
||||
$recurring_invoice_frequency = $row['recurring_invoice_frequency'];
|
||||
$recurring_invoice_status = $row['recurring_invoice_status'];
|
||||
$recurring_invoice_start_date = $row['recurring_invoice_start_date'];
|
||||
$recurring_invoice_last_sent = $row['recurring_invoice_last_sent'];
|
||||
$recurring_invoice_next_date = $row['recurring_invoice_next_date'];
|
||||
$invoice_id = $row['invoice_id'];
|
||||
if($recurring_invoice_status == 1){
|
||||
$status = "Active";
|
||||
$status_badge_color = "success";
|
||||
}else{
|
||||
$status = "Inactive";
|
||||
$status_badge_color = "secondary";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo ucwords($recurring_invoice_frequency); ?>ly</td>
|
||||
<td><?php echo $recurring_invoice_start_date; ?></td>
|
||||
<td><?php echo $recurring_invoice_last_sent; ?></td>
|
||||
<td><?php echo $recurring_invoice_next_date; ?></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $status_badge_color; ?>">
|
||||
<?php echo $status; ?>
|
||||
</span>
|
||||
</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="recurring_invoice.php?recurring_invoice_id=<?php echo $recurring_invoice_id; ?>">Edit</a>
|
||||
<?php if($recurring_invoice_status == 1){ ?>
|
||||
<a class="dropdown-item" href="post.php?recurring_deactivate=<?php echo $recurring_invoice_id; ?>">Deactivate</a>
|
||||
<?php }else{ ?>
|
||||
<a class="dropdown-item" href="post.php?recurring_activate=<?php echo $recurring_invoice_id; ?>">Activate</a>
|
||||
<?php } ?>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo ucwords($recurring_invoice_frequency); ?>ly</td>
|
||||
<td><?php echo $recurring_invoice_start_date; ?></td>
|
||||
<td><?php echo $recurring_invoice_last_sent; ?></td>
|
||||
<td><?php echo $recurring_invoice_next_date; ?></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $status_badge_color; ?>">
|
||||
<?php echo $status; ?>
|
||||
</span>
|
||||
</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="recurring_invoice.php?recurring_invoice_id=<?php echo $recurring_invoice_id; ?>">Edit</a>
|
||||
<?php if($recurring_invoice_status == 1){ ?>
|
||||
<a class="dropdown-item" href="post.php?recurring_deactivate=<?php echo $recurring_invoice_id; ?>">Deactivate</a>
|
||||
<?php }else{ ?>
|
||||
<a class="dropdown-item" href="post.php?recurring_activate=<?php echo $recurring_invoice_id; ?>">Activate</a>
|
||||
<?php } ?>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("add_recurring_invoice_modal.php"); ?>
|
||||
|
|
@ -1,97 +1,107 @@
|
|||
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_vendors WHERE client_id = $client_id ORDER BY client_vendor_id DESC"); ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vendor</th>
|
||||
<th>Description</th>
|
||||
<th>Account Number</th>
|
||||
<th></th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_vendor_id = $row['client_vendor_id'];
|
||||
$client_vendor_name = $row['client_vendor_name'];
|
||||
$client_vendor_description = $row['client_vendor_description'];
|
||||
$client_vendor_account_number = $row['client_vendor_account_number'];
|
||||
$client_login_id = $row['client_login_id'];
|
||||
|
||||
$sql2 = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_vendor_id = $client_vendor_id");
|
||||
$row = mysqli_fetch_array($sql2);
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
$client_vendor_id_relation = $row['client_vendor_id'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_vendor_name; ?></td>
|
||||
<td><?php echo $client_vendor_description; ?></td>
|
||||
<td><?php echo $client_vendor_account_number; ?></td>
|
||||
<td>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><i class="fa fa-building"></i> Vendors</h6>
|
||||
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientVendorModal"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vendor</th>
|
||||
<th>Description</th>
|
||||
<th>Account Number</th>
|
||||
<th></th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($client_vendor_id == $client_vendor_id_relation){
|
||||
?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $client_login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$client_vendor_id = $row['client_vendor_id'];
|
||||
$client_vendor_name = $row['client_vendor_name'];
|
||||
$client_vendor_description = $row['client_vendor_description'];
|
||||
$client_vendor_account_number = $row['client_vendor_account_number'];
|
||||
$client_login_id = $row['client_login_id'];
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $client_login_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-key"></i> Login</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_username; ?>" readonly>
|
||||
$sql2 = mysqli_query($mysqli,"SELECT * FROM client_logins WHERE client_vendor_id = $client_vendor_id");
|
||||
$row = mysqli_fetch_array($sql2);
|
||||
$client_login_id = $row['client_login_id'];
|
||||
$client_login_username = $row['client_login_username'];
|
||||
$client_login_password = $row['client_login_password'];
|
||||
$client_vendor_id_relation = $row['client_vendor_id'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $client_vendor_name; ?></td>
|
||||
<td><?php echo $client_vendor_description; ?></td>
|
||||
<td><?php echo $client_vendor_account_number; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($client_vendor_id == $client_vendor_id_relation){
|
||||
?>
|
||||
<button type="button" class="btn btn-dark btn-sm" data-toggle="modal" data-target="#viewPasswordModal<?php echo $client_login_id; ?>"><i class="fas fa-key"></i></button>
|
||||
|
||||
<div class="modal" id="viewPasswordModal<?php echo $client_login_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-key"></i> Login</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_username; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_password; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" value="<?php echo $client_login_password; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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="#editClientVendorModal<?php echo $client_vendor_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_vendor=<?php echo $client_vendor_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
include("edit_client_vendor_modal.php");
|
||||
}
|
||||
?>
|
||||
</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="#editClientVendorModal<?php echo $client_vendor_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="post.php?delete_client_vendor=<?php echo $client_vendor_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include("edit_client_vendor_modal.php");
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php include("add_client_vendor_modal.php"); ?>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
$balance = $invoice_amounts - $amount_paid;
|
||||
//set Text color on balance
|
||||
if($balance > 0){
|
||||
$balance_text_color = "text-danger";
|
||||
$balance_text_color = "text-danger font-weight-bold";
|
||||
}else{
|
||||
$balance_text_color = "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,4 +203,62 @@ $sql_latest_expenses = mysqli_query($mysqli,"SELECT * FROM expenses, vendors, ca
|
|||
|
||||
|
||||
|
||||
<?php include("footer.php"); ?>
|
||||
<?php include("footer.php"); ?>
|
||||
<script>
|
||||
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("myAreaChart");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"],
|
||||
datasets: [{
|
||||
label: "Sessions",
|
||||
lineTension: 0.3,
|
||||
backgroundColor: "rgba(2,117,216,0.2)",
|
||||
borderColor: "rgba(2,117,216,1)",
|
||||
pointRadius: 5,
|
||||
pointBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointBorderColor: "rgba(255,255,255,0.8)",
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointHitRadius: 50,
|
||||
pointBorderWidth: 2,
|
||||
data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'date'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 7
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: 40000,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(0, 0, 0, .125)",
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
<script src="vendor/easy-markdown-editor-2.5.1/dist/easymde.min.js"></script>
|
||||
|
||||
<script src="vendor/select2/dist/js/select2.min.js"></script>
|
||||
|
||||
<script src="vendor/chart.js/Chart.min.js"></script>
|
||||
|
||||
<!-- Custom scripts for all pages-->
|
||||
|
|
|
|||
|
|
@ -25,12 +25,6 @@
|
|||
<!-- Page level plugin CSS-->
|
||||
<link href="vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Page level plugin CSS-->
|
||||
<link href="vendor/select2/dist/css/select2.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Page level plugin CSS-->
|
||||
<link href="vendor/select2/dist/css/select2-bootstrap4.min.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">
|
||||
|
||||
|
|
|
|||
58
js/app.js
58
js/app.js
|
|
@ -1,61 +1,3 @@
|
|||
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("myAreaChart");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"],
|
||||
datasets: [{
|
||||
label: "Sessions",
|
||||
lineTension: 0.3,
|
||||
backgroundColor: "rgba(2,117,216,0.2)",
|
||||
borderColor: "rgba(2,117,216,1)",
|
||||
pointRadius: 5,
|
||||
pointBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointBorderColor: "rgba(255,255,255,0.8)",
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointHitRadius: 50,
|
||||
pointBorderWidth: 2,
|
||||
data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'date'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 7
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: 40000,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(0, 0, 0, .125)",
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//Prevents resubmit on refresh or back
|
||||
if ( window.history.replaceState ) {
|
||||
window.history.replaceState( null, null, window.location.href );
|
||||
|
|
|
|||
Loading…
Reference in New Issue