Shell File Manager
<?php
include_once('../include/config.php');
$case_id = $_GET['case_id'];
$log_status = $_GET['log_status'];
if (isset($_POST['messages'])) {
$result = mysqli_query($connection, "SELECT * FROM usertable where log_status='$log_status'");
$row = mysqli_fetch_array($result);
$user_id = $row['id'];
$message = $_POST['message'];
// print_r($added_date);
$sqlpayment = "INSERT INTO services_case_messages (case_id, user_id , message) VALUES('$case_id', ' $user_id ' , '$message' )";
$resultpayment = mysqli_query($connection, $sqlpayment);
$result2 = mysqli_query($connection, "SELECT * FROM services_case_messages where case_id='$case_id'");
$row2 = mysqli_fetch_array($result2);
$case_date_mes = $row2['case_date_mes'];
$case = $row2['case_id'];;
// echo date("20y-m-d", strtotime($row['case_date']));
$NewDate = Date('20y-m-d', strtotime($case_date_mes . '+7 days'));
$Today = date('y:m:d');
if ($Today = $NewDate) {
$update_code = "UPDATE services_case_messages SET status=1 where case_id='$case_id' ";
$update_code_run = mysqli_query($connection, $update_code);
}
// print_r($Today);
// print_r($NewDate);
}
?>
<?php $support = 'support' ?>
<?php $support2 = 'services' ?>
<?php
include_once('../include/config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>CamScan FZCO |Support</title>
<?php
include('../include/header.php');
include('../include/nav.php');
$log_status = $_GET['log_status'];
?>
<body>
<!-- ======= Gallery Section ======= -->
<section id="gallery" class="gallery">
<div class="container" data-aos="fade-up">
<div class="section-title ">
<h2>Case Details</h2>
</div>
<div style="text-align: left;">
<?php
$count = 0;
$query = " SELECT * from services_case where case_id='$case_id' ORDER BY `services_case`.`case_id` ASC";
$query_run = mysqli_query($connection, $query);
// print_r( $query);
?>
<p>
<table class="table">
<thead>
</thead>
<tbody>
<?php
if (mysqli_num_rows($query_run) > 0) {
$count++;
while ($row = mysqli_fetch_assoc($query_run)) {
// print_r($count);
?>
<tr>
<td>
<h3> Basic Information </h3>
<strong> Product type : </strong> <?php echo $row['type']; ?><br>
<strong> Product category : </strong> <?php echo $row['category']; ?><br>
<strong> Product line : </strong> <?php echo $row['line']; ?><br>
<strong> Product name : </strong> <?php echo $row['name']; ?><br>
<strong> Serial number : </strong> <?php echo $row['s_number']; ?><br>
<strong> Distributor : </strong> <?php echo $row['distributor']; ?><br>
<strong> Subject : </strong> <?php echo $row['subject']; ?><br>
<strong> Description : </strong> <?php echo $row['description']; ?><br>
<strong> No of camera : </strong> <?php echo $row['number_c']; ?><br>
</td>
</tr>
<br>
<tr>
<td>
<h3> Project Information </h3>
<strong> NVR software used : </strong> <?php echo $row['NVR_used']; ?><br>
<strong> HDD brand : </strong> <?php echo $row['HD_brand']; ?><br>
<strong> HDD capacity : </strong> <?php echo $row['HD_capacity']; ?><br>
<strong> HDD model number : </strong> <?php echo $row['HD_model']; ?><br>
<strong> HDD serial number : </strong> <?php echo $row['HD_s_number']; ?><br>
<strong> Project power supply : </strong> <?php echo $row['power']; ?><br>
<strong> Cable type : </strong> <?php echo $row['cable']; ?><br>
<strong> Date : </strong> <?php echo date("20y-m-d", strtotime($row['case_date'])); ?><br>
</td>
</tr>
<br> <br>
<?php
}
} else {
echo "No Record Found";
}
?>
</tbody>
</table>
<?php
$count2 = 0;
$query2 = " SELECT * from services_case_messages inner join usertable on services_case_messages.user_id=usertable.id and case_id='$case_id' ORDER BY `services_case_messages`.`case_date_mes` ASC";
$query_run2 = mysqli_query($connection, $query2);
// print_r( $query);
?>
<p>
<table class="table">
<thead>
</thead>
<tbody>
<div class="section-title ">
<h2>Replies</h2>
</div>
<?php
if (mysqli_num_rows($query_run2) > 0) {
$count2++;
while ($row2 = mysqli_fetch_assoc($query_run2)) {
// print_r($count);
?>
<tr>
<td>
<strong> - By </strong> <?php echo $row2['name']; ?> - Post Date <?php echo date("20y-m-d", strtotime($row2['case_date_mes'])); ?><br>
<strong> - Replay || </strong> <?php echo $row2['message']; ?><br>
<?php
}
} else {
echo "No Record Found";
}
?>
<?php
$case_id = $_GET['case_id'];
$result3 = mysqli_query($connection, "SELECT * FROM services_case_messages where case_id='$case_id'");
$row3 = mysqli_fetch_array($result3);
$status = $row3['status'];
$case_id = $row3['case_id'];
if ($status == 0 && $case_id == $case_id) {
?>
<form method="POST" action="">
<div class="row">
<div class="form-group mt-3 ">
<textarea name="message" class="form-control" id="type" placeholder="Company Name" required> </textarea>
<br>
<button class="btn rounded-pill" type="submit" name="messages" style="background-color: #015d62; color:white ; font-size:16px"> Send New Replay </button>
</div>
</div>
</form>
<?php
}
?>
</td>
</tr>
</tbody>
</table>
</p>
</div>
</div>
</div>
</section><!-- End Gallery Section -->
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<?php
include '../include/footer.php';
?>
</body>
<?php
?>
Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]