Skip to content

Commit

Permalink
Reworked Client Section URL routing to be standard with standard URL …
Browse files Browse the repository at this point in the history
…routing of ITFlow. It was just too confusing to mix to different URL routing operations
  • Loading branch information
johnnyq committed Sep 18, 2022
1 parent 5d2e645 commit d7090d3
Show file tree
Hide file tree
Showing 43 changed files with 665 additions and 710 deletions.
2 changes: 1 addition & 1 deletion calendar_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
$event_title = $row['vendor_name'];
$event_start = $row['vendor_created_at'];

echo "{ id: '$event_id', title: ". json_encode($event_title) .", start: '$event_start', color: 'brown', url: 'client.php?client_id=$event_id&tab=vendors'},";
echo "{ id: '$event_id', title: ". json_encode($event_title) .", start: '$event_start', color: 'brown', url: 'client_vendors.php?client_id=$event_id'},";
}
?>

Expand Down
352 changes: 0 additions & 352 deletions client.php

This file was deleted.

9 changes: 6 additions & 3 deletions client_assets.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

//Get Asset Counts
Expand Down Expand Up @@ -79,7 +81,6 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<input type="hidden" name="type" value="<?php echo strip_tags($_GET['type']); ?>">
<div class="row">

Expand Down Expand Up @@ -124,7 +125,7 @@

<div class="col-md-2">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_assets_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#importAssetModal"><i class="fa fa-fw fa-upload"></i> Import</button>
</div>
</div>
Expand Down Expand Up @@ -362,4 +363,6 @@
<?php
include("client_asset_add_modal.php");
include("client_asset_import_modal.php");
?>
?>

<?php include("footer.php"); ?>
10 changes: 6 additions & 4 deletions client_certificates.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
<?php include("inc_all_client.php"); ?>

<?php

if(!empty($_GET['sb'])){
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
Expand Down Expand Up @@ -28,12 +29,11 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
<div class="input-group mb-3 mb-md-0">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search <?php echo ucwords(strip_tags($_GET['tab'])); ?>">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Certificates">
<div class="input-group-append">
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
</div>
Expand All @@ -42,7 +42,7 @@

<div class="col-md-8">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_certificates_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
</div>
</div>

Expand Down Expand Up @@ -197,3 +197,5 @@ function(data){
);
}
</script>

<?php include("footer.php"); ?>
7 changes: 5 additions & 2 deletions client_contacts.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(isset($_GET['q'])){
Expand Down Expand Up @@ -42,7 +44,6 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
Expand All @@ -56,7 +57,7 @@

<div class="col-md-8">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_contacts_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#importContactModal"><i class="fa fa-fw fa-upload"></i> Import</button>
</div>
</div>
Expand Down Expand Up @@ -217,3 +218,5 @@
include("client_contact_import_modal.php");

?>

<?php include("footer.php"); ?>
10 changes: 7 additions & 3 deletions client_document_details.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(isset($_GET['folder_id'])){
Expand Down Expand Up @@ -30,14 +32,14 @@
<a href="clients.php">Clients</a>
</li>
<li class="breadcrumb-item">
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=overview"><?php echo $client_name; ?></a>
<a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
</li>
<li class="breadcrumb-item">
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=documents">Documents</a>
<a href="client_documents.php?client_id=<?php echo $client_id; ?>">Documents</a>
</li>
<?php if($folder_id > 0){ ?>
<li class="breadcrumb-item">
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=documents&folder_id=<?php echo $folder_id; ?>"><i class="fas fa-folder-open"></i> <?php echo $folder_name; ?></a>
<a href="client_documents.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $folder_id; ?>"><i class="fas fa-folder-open"></i> <?php echo $folder_name; ?></a>
</li>
<?php } ?>
<li class="breadcrumb-item active"><i class="fas fa-file"></i> <?php echo "$document_name"; ?></li>
Expand Down Expand Up @@ -81,3 +83,5 @@
include("share_modal.php");

?>

<?php include("footer.php"); ?>
15 changes: 9 additions & 6 deletions client_documents.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

// Folder
Expand Down Expand Up @@ -68,7 +70,7 @@
<hr>
<ul class="nav nav-pills flex-column bg-light">
<li class="nav-item">
<a class="nav-link <?php if($get_folder_id == 0){ echo "active"; } ?>" href="?client_id=<?php echo $client_id; ?>&tab=documents&folder_id=0">/</a>
<a class="nav-link <?php if($get_folder_id == 0){ echo "active"; } ?>" href="?client_id=<?php echo $client_id; ?>&folder_id=0">/</a>
</li>
<?php
$sql_folders = mysqli_query($mysqli,"SELECT * FROM folders WHERE folder_client_id = $client_id ORDER BY folder_name ASC");
Expand All @@ -84,7 +86,7 @@
<li class="nav-item">
<div class="row">
<div class="col-10">
<a class="nav-link <?php if($get_folder_id == $folder_id){ echo "active"; } ?> " href="?client_id=<?php echo $client_id; ?>&tab=documents&folder_id=<?php echo $folder_id; ?>">
<a class="nav-link <?php if($get_folder_id == $folder_id){ echo "active"; } ?> " href="?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $folder_id; ?>">
<?php
if($get_folder_id == $folder_id){ ?>
<i class="fas fa-fw fa-folder-open"></i>
Expand Down Expand Up @@ -126,10 +128,9 @@
<div class="col-md-9">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo intval($client_id); ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<input type="hidden" name="folder_id" value="<?php echo $get_folder_id; ?>">
<div class="input-group">
<input type="search" class="form-control " name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search <?php echo ucwords(strip_tags($_GET['tab'])); ?>">
<input type="search" class="form-control " name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Documents">
<div class="input-group-append">
<button class="btn btn-secondary"><i class="fa fa-search"></i></button>
</div>
Expand Down Expand Up @@ -170,7 +171,7 @@

<tr>
<td>
<a href="?client_id=<?php echo $client_id; ?>&tab=document_details&folder_id=<?php echo $document_folder_id; ?>&document_id=<?php echo $document_id; ?>"><i class="fas fa-fw fa-file-alt"></i> <?php echo $document_name; ?></a>
<a href="client_document_details.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $document_folder_id; ?>&document_id=<?php echo $document_id; ?>"><i class="fas fa-fw fa-file-alt"></i> <?php echo $document_name; ?></a>
</td>
<td><?php echo $document_created_at; ?></td>
<td><?php echo $document_updated_at; ?></td>
Expand Down Expand Up @@ -211,4 +212,6 @@


<?php include("share_modal.php"); ?>
<?php include("client_document_add_modal.php"); ?>
<?php include("client_document_add_modal.php"); ?>

<?php include("footer.php"); ?>
9 changes: 6 additions & 3 deletions client_domains.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(!empty($_GET['sb'])){
Expand Down Expand Up @@ -28,12 +30,11 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
<div class="input-group mb-3 mb-md-0">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search <?php echo ucwords(strip_tags($_GET['tab'])); ?>">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Domains">
<div class="input-group-append">
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
</div>
Expand All @@ -42,7 +43,7 @@

<div class="col-md-8">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_domains_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
</div>
</div>

Expand Down Expand Up @@ -195,3 +196,5 @@ function(data){
);
}
</script>

<?php include("footer.php"); ?>
4 changes: 4 additions & 0 deletions client_events.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<link href='plugins/fullcalendar/main.min.css' rel='stylesheet' />

<?php
Expand Down Expand Up @@ -92,3 +94,5 @@
});

</script>

<?php include("footer.php"); ?>
6 changes: 5 additions & 1 deletion client_files.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

$sql_files_images = mysqli_query($mysqli,"SELECT * FROM files WHERE file_client_id = $client_id AND (file_ext LIKE 'JPG' OR file_ext LIKE 'jpg' OR file_ext LIKE 'JPEG' OR file_ext LIKE 'jpeg' OR file_ext LIKE 'png' OR file_ext LIKE 'PNG') ORDER BY file_name ASC");
Expand Down Expand Up @@ -107,4 +109,6 @@
<?php
include("client_file_add_modal.php");
include("share_modal.php");
?>
?>

<?php include("footer.php"); ?>
11 changes: 7 additions & 4 deletions client_invoices.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(!empty($_GET['sb'])){
Expand Down Expand Up @@ -35,12 +37,11 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
<div class="input-group mb-3 mb-md-0">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search <?php echo ucwords(strip_tags($_GET['tab'])); ?>">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Invoices">
<div class="input-group-append">
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
</div>
Expand All @@ -49,7 +50,7 @@

<div class="col-md-8">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_invoices_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
</div>
</div>

Expand Down Expand Up @@ -162,4 +163,6 @@
</div>
</div>

<?php include("invoice_add_modal.php"); ?>
<?php include("invoice_add_modal.php"); ?>

<?php include("footer.php"); ?>
11 changes: 7 additions & 4 deletions client_locations.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(isset($_GET['q'])){
Expand Down Expand Up @@ -41,12 +43,11 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
<div class="input-group mb-3 mb-md-0">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search <?php echo ucwords(strip_tags($_GET['tab'])); ?>">
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Locations">
<div class="input-group-append">
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
</div>
Expand All @@ -55,7 +56,7 @@

<div class="col-md-8">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_locations_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#importLocationModal"><i class="fa fa-fw fa-upload"></i> Import</button>
</div>
</div>
Expand Down Expand Up @@ -153,4 +154,6 @@
include("client_location_add_modal.php");
include("client_location_import_modal.php");

?>
?>

<?php include("footer.php"); ?>
9 changes: 6 additions & 3 deletions client_logins.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(!empty($_GET['sb'])){
Expand Down Expand Up @@ -28,7 +30,6 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
Expand All @@ -42,7 +43,7 @@

<div class="col-md-8">
<div class="float-right">
<a href="post.php?export_client_<?php echo strip_tags($_GET['tab']); ?>_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<a href="post.php?export_client_logins_csv=<?php echo $client_id; ?>" class="btn btn-default"><i class="fa fa-fw fa-download"></i> Export</a>
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#importLoginModal"><i class="fa fa-fw fa-upload"></i> Import</button>
</div>
</div>
Expand Down Expand Up @@ -166,4 +167,6 @@ function generatePassword(){
include("share_modal.php");
include("client_login_import_modal.php");

?>
?>

<?php include("footer.php"); ?>
7 changes: 5 additions & 2 deletions client_logs.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php include("inc_all_client.php"); ?>

<?php

if(!empty($_GET['sb'])){
Expand Down Expand Up @@ -34,7 +36,6 @@
<div class="card-body">
<form autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="tab" value="<?php echo strip_tags($_GET['tab']); ?>">
<div class="row">

<div class="col-md-4">
Expand Down Expand Up @@ -105,4 +106,6 @@
</div>
<?php include("pagination.php"); ?>
</div>
</div>
</div>

<?php include("footer.php"); ?>
Loading

0 comments on commit d7090d3

Please sign in to comment.