Merge pull request #575 from wrongecho/more-tidy

More tidying/cleanups
This commit is contained in:
Johnny 2023-01-25 18:28:42 -05:00 committed by GitHub
commit fa8ce92b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 42 additions and 49 deletions

View File

@ -9,7 +9,7 @@
</div>
<form action="post.php" method="post" autocomplete="off">
<div class="modal-body bg-white">
<div class="form-group">
<label>Account Name <strong class="text-danger">*</strong></label>
<div class="input-group">
@ -19,7 +19,7 @@
<input type="text" class="form-control" name="name" placeholder="Account name" required autofocus>
</div>
</div>
<div class="form-group">
<label>Opening Balance</label>
<div class="input-group">
@ -38,7 +38,7 @@
</div>
<select class="form-control select2" name="currency_code" required>
<option value="">- Currency -</option>
<?php foreach($currencies_array as $currency_code => $currency_name) { ?>
<?php foreach ($currencies_array as $currency_code => $currency_name) { ?>
<option <?php if ($session_company_currency == $currency_code) { echo "selected"; } ?> value="<?php echo $currency_code; ?>"><?php echo "$currency_code - $currency_name"; ?></option>
<?php } ?>
</select>
@ -49,7 +49,7 @@
<label>Notes</label>
<textarea class="form-control" rows="5" placeholder="Enter some notes" name="notes"></textarea>
</div>
</div>
<div class="modal-footer bg-white">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
@ -58,4 +58,4 @@
</form>
</div>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
<?php require_once("inc_all_settings.php");
if (!empty($_GET['sb'])) {
$sb = strip_tags(mysqli_real_escape_string($mysqli,$_GET['sb']));
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
} else {
$sb = "account_name";
}

View File

@ -34,7 +34,7 @@ if (isset($_GET['certificate_fetch_parse_json_details'])) {
// Get certificate (using verify peer false to allow for self-signed certs)
$socket = "ssl://$url:$port";
$get = stream_context_create(array("ssl" => array("capture_peer_cert" => TRUE, "verify_peer" => FALSE,)));
$get = stream_context_create(array("ssl" => array("capture_peer_cert" => true, "verify_peer" => false,)));
$read = stream_socket_client($socket, $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $get);
$cert = stream_context_get_params($read);
$cert_public_key_obj = openssl_x509_parse($cert['options']['ssl']['peer_certificate']);
@ -121,7 +121,7 @@ if (isset($_GET['merge_ticket_get_json_details'])) {
//Return ticket, client and contact details for the given ticket number
$response = mysqli_fetch_array($sql);
$response = array_map('htmlentities', $response);
echo json_encode( $response);
echo json_encode($response);
}
}
@ -308,4 +308,4 @@ if (isset($_GET['get_totp_token'])) {
$otp = TokenAuth6238::getTokenCode($_GET['totp_secret']);
echo json_encode($otp);
}
}

View File

@ -24,7 +24,6 @@ if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
// SESSION FINGERPRINT
$session_ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip()));
//$session_os = strip_tags(mysqli_real_escape_string($mysqli,get_os()));
// User agent
$session_user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT']));

View File

@ -9,17 +9,17 @@
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<div class="modal-body bg-white">
<div class="modal-body bg-white">
<div class="form-group">
<input type="text" class="form-control" name="name" placeholder="Template name" required autofocus>
</div>
<div class="form-group">
<textarea class="form-control summernote" name="content"></textarea>
</div>
</div>
<div class="modal-footer bg-white">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
@ -29,4 +29,4 @@
</form>
</div>
</div>
</div>
</div>

View File

@ -7,34 +7,31 @@
<!-- ./wrapper -->
<!-- REQUIRED SCRIPTS -->
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Custom js-->
<script src="plugins/moment/moment.min.js"></script>
<script src="plugins/chart.js/Chart.min.js"></script>
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- <script src='plugins/fullcalendar/main.min.js'></script> -->
<script src='plugins/daterangepicker/daterangepicker.js'></script>
<script src='plugins/select2/js/select2.min.js'></script>
<script src='plugins/inputmask/jquery.inputmask.min.js'></script>
<script src="plugins/summernote/summernote-bs4.min.js"></script>
<script src="plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
<script src="plugins/clipboardjs/clipboard.min.js"></script>
<!-- <script src="plugins/dropzone/min/dropzone.min.js"></script> -->
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>
<?php
<?php
// Calculate Execution time Uncomment for test
//$time_end = microtime(true);
//$execution_time = ($time_end - $time_start);
//echo 'Total Execution Time: '.number_format((float) $execution_time, 10) .' seconds';
?>

View File

@ -1,4 +1,4 @@
<?php
<?php
// Calculate Execution time start
// uncomment for test
@ -22,8 +22,6 @@ header("X-Frame-Options: DENY");
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> -->
<!-- Custom Style Sheet -->
<link href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" type="text/css">
@ -32,11 +30,11 @@ header("X-Frame-Options: DENY");
<link href='plugins/daterangepicker/daterangepicker.css' rel='stylesheet' />
<link href="plugins/summernote/summernote-bs4.min.css" rel="stylesheet">
<link href="plugins/toastr/toastr.min.css" rel="stylesheet">
<!-- <link href="plugins/dropzone/min/dropzone.min.css" rel="stylesheet"> -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<script src="plugins/toastr/toastr.min.js"></script>
</head>
<body class="hold-transition sidebar-mini layout-fixed accent-<?php echo $config_theme; ?>">
<div class="wrapper text-sm">
<div class="wrapper text-sm">

View File

@ -22,22 +22,22 @@ $location_phone = formatPhoneNumber($location_phone);
?>
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $location_phone?>"><?php echo $location_phone; ?></a>
<br>
<?php
}
<?php
}
?>
<?php
if (!empty($client_website)) {
?>
<i class="fa fa-fw fa-globe text-secondary ml-1 mr-2 mb-2"></i> <a target="_blank" href="//<?php echo $client_website; ?>"><?php echo $client_website; ?></a>
<br>
<?php
<?php
}
?>
<?php
if (!empty($client_tag_name_display_array)) {
?>
<?php echo $client_tags_display; ?>
<?php
<?php
}
?>
</div>
@ -63,7 +63,7 @@ $location_phone = formatPhoneNumber($location_phone);
if (!empty($contact_phone)) {
?>
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?> </a>
<?php
<?php
if (!empty($contact_extension)) {
?>
x<?php echo $contact_extension; ?>
@ -71,18 +71,18 @@ $location_phone = formatPhoneNumber($location_phone);
}
?>
<br>
<?php
}
<?php
}
?>
<?php
if (!empty($contact_mobile)) {
?>
<i class="fa fa-fw fa-mobile-alt text-secondary ml-1 mr-2 mb-2"></i> <a href="tel:<?php echo $contact_mobile; ?>"> <?php echo $contact_mobile; ?> </a>
<?php
}
<?php
}
?>
</div>
<?php if ($session_user_role == 1 || $session_user_role == 3 AND $config_module_enable_accounting == 1) { ?>
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
<div class="col-md border-left">
<h4 class="text-secondary">Billing</h4>
<h6 class="ml-1 text-secondary">Paid <div class="text-dark float-right"> <?php echo numfmt_format_currency($currency_format, $amount_paid, $client_currency_code); ?></div></h6>
@ -120,10 +120,10 @@ $location_phone = formatPhoneNumber($location_phone);
</div>
</div>
<?php
<?php
include("client_edit_modal.php");
include("client_delete_modal.php");
include("category_quick_add_modal.php");
?>
?>

View File

@ -223,7 +223,7 @@ if (isset($_POST['login'])) {
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<?php if(!empty($company_logo)) { ?>
<?php if (!empty($company_logo)) { ?>
<img alt="<?=$company_name?> logo" height="110" width="380" class="img-fluid" src="<?php echo "uploads/settings/1/$company_logo"; ?>">
<?php } else { ?>
<b>IT</b>Flow
@ -233,7 +233,7 @@ if (isset($_POST['login'])) {
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg"><?php if(isset($response)) { echo $response; } ?></p>
<p class="login-box-msg"><?php if (isset($response)) { echo $response; } ?></p>
<form method="post">
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Agent Email" name="email" value="<?php if(!empty($token_field)){ echo $email; }?>" required <?php if(empty($token_field)){ echo "autofocus"; } ?> >

View File

@ -22,7 +22,6 @@ if (!$_SESSION['client_logged_in']) {
// SESSION FINGERPRINT
$session_ip = strip_tags(mysqli_real_escape_string($mysqli, get_ip()));
$session_os = strip_tags(mysqli_real_escape_string($mysqli, get_os()));
// Get user agent
$session_user_agent = strip_tags(mysqli_real_escape_string($mysqli, $_SERVER['HTTP_USER_AGENT']));

View File

@ -91,10 +91,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])) {
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<?php if(!empty($company_logo)) { ?>
<?php if (!empty($company_logo)) { ?>
<img alt="<?=$company_name?> logo" height="110" width="380" class="img-fluid" src="<?php echo "../uploads/settings/1/$company_logo"; ?>">
<?php } else { ?>
<b><?=$company_name?></b> <br>Client Portal Login</h2>
<b><?=$company_name?></b> <br>Client Portal Login</h2>
<?php } ?>
</div>
<div class="card">

View File

@ -4,7 +4,7 @@
* Primary contact view: all tickets
*/
require('inc_portal.php');
require_once('inc_portal.php');
if ($session_contact_id !== $session_client_primary_contact_id) {
header("Location: portal_post.php?logout");
@ -62,7 +62,7 @@ $all_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN contacts O
$ticket_subject = htmlentities($row['ticket_subject']);
$ticket_status = htmlentities($row['ticket_status']);
$ticket_contact_name = htmlentities($row['contact_name']);
echo "<tr>";
echo "<td> <a href='ticket.php?id=$ticket_id'> $ticket_prefix$ticket_id</a></td>";
echo "<td> <a href='ticket.php?id=$ticket_id'> $ticket_subject</a></td>";
@ -76,4 +76,4 @@ $all_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN contacts O
</div>
<?php
require_once('portal_footer.php');
require_once('portal_footer.php');

View File

@ -131,7 +131,7 @@
<?php } ?>
<?php if ($session_user_role == 1 OR $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
<li class="nav-header mt-3">ACCOUNTING</li>
<li class="nav-item">