More general code cleanup/formatting
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
|
||||
}else{
|
||||
} else {
|
||||
$sb = "log_id";
|
||||
}
|
||||
|
||||
@@ -22,31 +22,31 @@ if (empty($_GET['canned_date'])) {
|
||||
if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
$dtf = strip_tags(mysqli_real_escape_string($mysqli,$_GET['dtf']));
|
||||
$dtt = strip_tags(mysqli_real_escape_string($mysqli,$_GET['dtt']));
|
||||
}elseif ($_GET['canned_date'] == "today") {
|
||||
} elseif ($_GET['canned_date'] == "today") {
|
||||
$dtf = date('Y-m-d');
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "yesterday") {
|
||||
} elseif ($_GET['canned_date'] == "yesterday") {
|
||||
$dtf = date('Y-m-d',strtotime("yesterday"));
|
||||
$dtt = date('Y-m-d',strtotime("yesterday"));
|
||||
}elseif ($_GET['canned_date'] == "thisweek") {
|
||||
} elseif ($_GET['canned_date'] == "thisweek") {
|
||||
$dtf = date('Y-m-d',strtotime("monday this week"));
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "lastweek") {
|
||||
} elseif ($_GET['canned_date'] == "lastweek") {
|
||||
$dtf = date('Y-m-d',strtotime("monday last week"));
|
||||
$dtt = date('Y-m-d',strtotime("sunday last week"));
|
||||
}elseif ($_GET['canned_date'] == "thismonth") {
|
||||
} elseif ($_GET['canned_date'] == "thismonth") {
|
||||
$dtf = date('Y-m-01');
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "lastmonth") {
|
||||
} elseif ($_GET['canned_date'] == "lastmonth") {
|
||||
$dtf = date('Y-m-d',strtotime("first day of last month"));
|
||||
$dtt = date('Y-m-d',strtotime("last day of last month"));
|
||||
}elseif ($_GET['canned_date'] == "thisyear") {
|
||||
} elseif ($_GET['canned_date'] == "thisyear") {
|
||||
$dtf = date('Y-01-01');
|
||||
$dtt = date('Y-m-d');
|
||||
}elseif ($_GET['canned_date'] == "lastyear") {
|
||||
} elseif ($_GET['canned_date'] == "lastyear") {
|
||||
$dtf = date('Y-m-d',strtotime("first day of january last year"));
|
||||
$dtt = date('Y-m-d',strtotime("last day of december last year"));
|
||||
}else{
|
||||
} else {
|
||||
$dtf = "0000-00-00";
|
||||
$dtt = "9999-00-00";
|
||||
}
|
||||
@@ -54,7 +54,7 @@ if ($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])) {
|
||||
//Rebuild URL
|
||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM logs
|
||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM logs
|
||||
LEFT JOIN users ON log_user_id = user_id
|
||||
LEFT JOIN clients ON log_client_id = client_id
|
||||
WHERE (log_type LIKE '%$q%' OR log_action LIKE '%$q%' OR log_description LIKE '%$q%' OR log_ip LIKE '%$q%' OR log_user_agent LIKE '%$q%' OR user_name LIKE '%$q%' OR client_name LIKE '%$q%')
|
||||
@@ -62,11 +62,11 @@ $sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM logs
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
);
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-eye"></i> Audit Logs</h3>
|
||||
</div>
|
||||
@@ -181,6 +181,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php include("pagination.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php require_once("inc_all_settings.php"); ?>
|
||||
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-database"></i> Download Database</h3>
|
||||
</div>
|
||||
@@ -9,9 +9,9 @@
|
||||
<a class="btn btn-primary btn-lg p-3" href="post.php?download_database"><i class="fa fa-fw fa-4x fa-download"></i><br><br>Download</a>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-key"></i> Backup Master Encryption Key</h3>
|
||||
</div>
|
||||
@@ -28,6 +28,6 @@
|
||||
</form>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<?php require_once("inc_all_settings.php"); ?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-file"></i> Quote Settings</h3>
|
||||
</div>
|
||||
@@ -58,6 +58,6 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
||||
+11
-13
@@ -1,35 +1,33 @@
|
||||
<?php require_once("inc_all_settings.php"); ?>
|
||||
|
||||
<?php
|
||||
<?php require_once("inc_all_settings.php");
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
|
||||
}else{
|
||||
} else {
|
||||
$sb = "tag_name";
|
||||
}
|
||||
|
||||
//Rebuild URL
|
||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM tags
|
||||
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM tags
|
||||
WHERE tag_name LIKE '%$q%'
|
||||
AND company_id = $session_company_id
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to"
|
||||
);
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
if ($num_row > 0) {
|
||||
//Colors Used
|
||||
$sql_colors_used = mysqli_query($mysqli,"SELECT tag_color FROM tags
|
||||
$sql_colors_used = mysqli_query($mysqli, "SELECT tag_color FROM tags
|
||||
WHERE tag_archived_at IS NULL
|
||||
AND company_id = $session_company_id"
|
||||
);
|
||||
);
|
||||
|
||||
while ($color_used_row = mysqli_fetch_array($sql_colors_used)) {
|
||||
while ($color_used_row = mysqli_fetch_array($sql_colors_used)) {
|
||||
$colors_used_array[] = $color_used_row['tag_color'];
|
||||
}
|
||||
$colors_diff = array_diff($colors_array,$colors_used_array);
|
||||
}
|
||||
$colors_diff = array_diff($colors_array, $colors_used_array);
|
||||
|
||||
}else{
|
||||
$colors_diff = $colors_array;
|
||||
@@ -119,8 +117,8 @@ $colors_diff = array_diff($colors_array,$colors_used_array);
|
||||
|
||||
<?php
|
||||
|
||||
include("settings_tag_add_modal.php");
|
||||
include("settings_tag_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
|
||||
if (!empty($_GET['sb'])) {
|
||||
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
|
||||
}else{
|
||||
} else {
|
||||
$sb = "tax_name";
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ $num_rows = mysqli_num_rows($sql);
|
||||
|
||||
<?php
|
||||
|
||||
include("settings_tax_add_modal.php");
|
||||
include("settings_tax_add_modal.php");
|
||||
|
||||
include("footer.php");
|
||||
include("footer.php");
|
||||
|
||||
?>
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?php require_once("inc_all_settings.php"); ?>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fa fa-fw fa-palette"></i> Theme</h3>
|
||||
</div>
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<?php
|
||||
|
||||
foreach($colors_array as $color) {
|
||||
foreach ($colors_array as $color) {
|
||||
|
||||
?>
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("footer.php");
|
||||
|
||||
Reference in New Issue
Block a user