Shell File Manager
<?php $support = 'support' ?>
<?php $support2 = 'services' ?>
<?php
include_once('../include/config.php');
session_start();
$log_status = $_GET['log_status'];
if ($log_status == '') {
header("Location: ../Login/login-user.php");
}
if ($log_status == $_SESSION['log_status']) {
$result = mysqli_query($connection, "SELECT * FROM usertable where log_status='$log_status'");
$row = mysqli_fetch_array($result);
$user_id = $row['id'];
if (isset($_POST['submit'])) {
$success = "";
function test_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
// $user_id =$_GET['user_id'];
$type = $_POST['type'];
$category = $_POST['category'];
$line = $_POST["line"];
$name = $_POST["name"];
$s_number = $_POST["s_number"];
$distributor = $_POST["distributor"];
$subject = $_POST["subject"];
$description = $_POST["description"];
$number_c = $_POST["number_c"];
$NVR_used = $_POST["NVR_used"];
$HD_brand = $_POST["HD_brand"];
$HD_capacity = $_POST["HD_capacity"];
$HD_model = $_POST["HD_model"];
$HD_s_number = $_POST["HD_s_number"];
$power = $_POST["power"];
$cable = $_POST["cable"];
// print_r($user_id);
$inser_case = "INSERT INTO services_case (user_id, type, category,line,name,s_number,distributor,subject,description,number_c,NVR_used,HD_brand,HD_capacity,HD_model,HD_s_number,power,cable)
VALUES ('$user_id', '$type', '$category','$line','$name','$s_number','$distributor','$subject','$description','$number_c','$NVR_used','$HD_brand','$HD_capacity','$HD_model','$HD_s_number','$power','$cable')";
if ($connection->query($inser_case) === TRUE) {
$success = "New case created successfully";
} else {
echo "Error: " . $inser_case . "<br>" . $connection->error;
}
}
?>
<!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'];
?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Overpass:300,400,600,800'>
<link rel="stylesheet" href="../company/press_center.css">
<body>
<!-- ======= Gallery Section ======= -->
<section id="gallery" class="gallery">
<div class="container" data-aos="fade-up">
<div class="section-title ">
<h2>Service & Repair Center</h2>
</div>
<h5 style="text-align: right;"> <a href=""> <i class="bi bi-person-circle"></i> Personal Account </a></h5>
<div style="text-align: left;">
<!-- <p> CamScan FZCO LIMITED releases monthly statements to update the press, customers, suppliers, and affiliates with the latest news and innovations from CamScan FZCO 𝖴𝖠𝖤.</p> <br><br> -->
<div class="tabset">
<input type="radio" name="tabset" id="tab1" aria-controls="1">
<label for="tab1">Case List</label>
<input type="radio" name="tabset" id="tab2" aria-controls="2">
<label for="tab2">New Case</label>
<input type="radio" name="tabset" id="tab3" aria-controls="3">
<label for="tab3">RMA Request List</label>
<input type="radio" style="text-align: right;" name="tabset" id="tab4" aria-controls="4">
<label for="tab4">New RMA </label>
<div class="tab-panels">
<!-- case list -->
<section id="2" class="tab-panel">
<h4>Case List</h4>
<?php
$count = 0;
$query = " SELECT * from services_case where user_id='$user_id' ORDER BY `services_case`.`case_id` ASC";
$query_run = mysqli_query($connection, $query);
// print_r( $query);
?>
<p>
<table class="table">
<thead>
<tr>
<th scope="col">Sl No.</th>
<th scope="col">Product Details</th>
<th scope="col">Serial Number</th>
<th scope="col">Subject</th>
<th scope="col">Date</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php
if (mysqli_num_rows($query_run) > 0) {
$count++;
while ($row = mysqli_fetch_assoc($query_run)) {
// print_r($count);
?>
<tr>
<th scope="row"><?php echo $count++; ?></th>
<td>
Product Type : <?php echo $row['type']; ?> <br>
Product Category : <?php echo $row['category']; ?> <br>
Product line : <?php echo $row['line']; ?> <br>
Product name : <?php echo $row['name']; ?> <br>
</td>
<td><?php echo $row['s_number']; ?></td>
<td><?php echo $row['subject']; ?></td>
<td><?php echo date("20y-m-d", strtotime($row['case_date'])); ?></td>
<td> <a href="case_list_details.php?case_id=<?php echo $row['case_id']; ?>&log_status=<?php echo $log_status; ?>" class="btn btn-secondary"> view </a></td>
</tr>
<?php
}
} else {
echo "No Record Found";
}
?>
</tbody>
</table>
</p>
</section>
<!-- New list -->
<section id="1" class="tab-panel">
<h4>New Case </h4>
<section id="contact" class="contact">
<div class="container">
<?php if (isset($success)) { ?>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Congratulations!</strong> <?php echo $success; ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</div>
<?php } ?>
<div class="row">
<div class="col-md-6">
<div class="info-box">
<h3>Basic Information</h3>
<form method="POST" action="" style="margin:20px">
<div class="row">
<div class="form-group mt-3 ">
<input type="text" name="type" class="form-control" id="type" placeholder="Product Type" required>
</div>
<div class="form-group mt-3">
<input type="text" name="category" class="form-control" id="category" placeholder="Product Category" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="line" id="line" placeholder="Product Line" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="name" id="name" placeholder="Product Name" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="s_number" id="s_number" placeholder="Serial Number" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="distributor" id="distributor" placeholder="Distributor Who Sold the Product" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" required>
</div>
</div>
<div class="form-group mt-3">
<textarea class="form-control" name="description" rows="5" placeholder="Description" required></textarea>
</div>
</div>
</div>
<div class="col-md-6">
<div class="info-box">
<h3>Project Information</h3>
<div style="margin:20px">
<div class="row">
<div class=" form-group mt-3">
<input type="text" name="number_c" class="form-control" id="number_c" placeholder="Number of Cameras">
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="NVR_used" id="NVR_used" placeholder="NVR Software Used">
</div>
<div class=" form-group mt-3">
<input type="text" name="HD_brand" class="form-control" id="HD_brand" placeholder="Hard Disc Brand">
</div>
<div class=" form-group mt-3">
<input type="text" name="HD_capacity" class="form-control" id="HD_capacity" placeholder="Hard Disc Capacity ">
</div>
<div class=" form-group mt-3">
<input type="text" name="HD_model" class="form-control" id="HD_model" placeholder="Hard Disc Model Number">
</div>
<div class=" form-group mt-3">
<input type="text" name="HD_s_number" class="form-control" id="HD_s_number" placeholder="Hard Disc Serial Number">
</div>
<div class=" form-group mt-3">
<select name="power" class="form-control" id="power" placeholder="Project power supply">
<option value="">Select Project power supply</option>
<option value="CAMSAC SPS per Camera">CAMSAC SPS per Camera</option>
<option value="Non-CamScan FZCO SPS per Camera">Non-CamScan FZCO SPS per Camera </option>
<option value="Centeralized DC power">Centeralized DC power</option>
<option value="POE">POE</option>
</select>
</div>
<div class=" form-group mt-3">
<select name="cable" class="form-control" id="cable" placeholder="Cable Type">
<option value="">Select Cable Type</option>
<option value="CS-RG59-305B">CS-RG59-305B</option>
<option value="CS-RG59-500B">CS-RG59-500B</option>
<option value="CS-RG59-250A">CS-RG59-250A</option>
<option value="CS-RG59-P250">CS-RG59-P250</option>
<option value="CS-RG59-PC250">CS-RG59-PC250</option>
<option value="CS-TPC5011-305">CS-TPC5011-305</option>
<option value="CS-TPC5013-305">CS-TPC5013-305</option>
<option value="CS-TPC6011-305">CS-TPC6011-305</option>
<option value="CS-TPC6013-305">CS-TPC6013-305</option>
<option value="CS-TPC6061-305">CS-TPC6061-305</option>
<option value="CS-TPC6511-305">CS-TPC6511-305</option>
<option value="CS-TPC6513-305">CS-TPC6513-305</option>
<option value="CS-TPC6531-305">CS-TPC6531-305</option>
<option value="Non-CamScan FZCO coaxial">Non-CamScan FZCO coaxial</option>
<option value="Non-CamScan FZCO Twisted pair">Non-CamScan FZCO Twisted pair</option>
</select>
</div>
</div>
</div>
</div>
<div class="text-center">
<br>
<input class="btn rounded-pill" type="submit" value="Send New Case " name="submit" style="background-color: #015d62; color:white ; font-size:18px">
</div>
</form>
</section>
</section>
<!-- RMA List -->
<section id="3" class="tab-panel">
<h4>RMA Request List</h4>
<?php
$count = 0;
$query = " SELECT * from services_rma where user_id='$user_id' ORDER BY `services_rma`.`rma_id` ASC";
$query_run = mysqli_query($connection, $query);
// print_r( $query);
?>
<p>
<table class="table">
<thead>
<tr>
<th scope="col">Sl No.</th>
<th scope="col">Company Name</th>
<th scope="col">Contact Person</th>
<th scope="col">Email</th>
<th scope="col">Telephone</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php
if (mysqli_num_rows($query_run) > 0) {
$count++;
while ($row = mysqli_fetch_assoc($query_run)) {
// print_r($count);
?>
<tr>
<th scope="row"><?php echo $count++; ?></th>
<td> <?php echo $row['c_name']; ?> </td>
<td> <?php echo $row['c_person']; ?></td>
<td> <?php echo $row['email']; ?> </td>
<td> <?php echo $row['tele']; ?> </td>
<td> <a href="rma_list_details.php?rma_id=<?php echo $row['rma_id']; ?>" class="btn btn-secondary"> view </a></td>
</tr>
<?php
}
} else {
echo "No Record Found";
}
?>
</tbody>
</table>
</p>
</section>
<section id="4" class="tab-panel">
<h4> New RMA Request</h4>
<p>
<section id="contact" class="contact">
<div class="container">
<?php if (isset($successrma)) { ?>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Congratulations!</strong> <?php echo $successrma; ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</div>
<?php } ?>
<div class="row">
<div class="col-md-6">
<div class="info-box">
<h3>Company / Personal Information</h3>
<form method="POST" action="rma_form.php?log_status=<?php echo $log_status; ?>" style="margin:20px">
<div class="row">
<div class="form-group mt-3 ">
<input type="text" name="c_name" class="form-control" id="type" placeholder="Company Name" required>
</div>
<div class="form-group mt-3">
<input type="text" name="c_person" class="form-control" id="category" placeholder="Contact Person" required>
</div>
<div class="form-group mt-3">
<input type="email" class="form-control" name="email" id="line" placeholder="Email" required>
</div>
<div class="form-group mt-3">
<input type="number" class="form-control" name="tele" id="name" placeholder="Telephone" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="Fax" id="s_number" placeholder="Fax">
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="Address" id="distributor" placeholder="Address">
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="pos_code" id="distributor" placeholder="Postal Code">
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="city" id="distributor" placeholder="City" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="country" id="distributor" placeholder="Country" required>
</div>
</div>
<!-- <div class="form-group mt-3">
<textarea class="form-control" name="description" rows="5" placeholder="Description" required></textarea>
</div> -->
</div>
</div>
<div class="col-md-6">
<div class="info-box">
<h3>Merchandise Information</h3>
<div style="margin:20px">
<div class="row">
<div class=" form-group mt-3">
<input type="date" name="invoice_date" class="form-control" id="number_c" placeholder="Invoice date" required>
</div>
<div class="form-group mt-3">
<input type="text" class="form-control" name="invoice_num" id="NVR_used" placeholder="Invoice number ">
</div>
<div class=" form-group mt-3">
<input type="text" name="distributor_name" class="form-control" id="HD_brand" placeholder="Distributor name">
</div>
<h3>Product Description</h3>
<div class="field_wrapper">
<div>
<br> <input type="text" name="model_number[]" class=" form-control" placeholder="Model Number" /> </textarea>
<br> <input type="text" name="serial_number[]" class=" form-control" placeholder="Serial Number" />
<br> <textarea class="form-control" name="problem[]" rows="5" placeholder="Problem"> </textarea>
<a href="javascript:void(0);" class="add_button " title="Add field"> <br> <button type="button" class="btn btn-outline-dark"> + Add More Products </button> <br> <br> </a>
</div>
</div>
</div>
</div>
</div>
<div class="text-center">
<br>
<button class="btn rounded-pill" type="submit" name="rma" style="background-color: #015d62; color:white ; font-size:18px"> Send New Case </button>
</div>
</form>
</section>
</p>
</section>
</div>
</div>
</div>
</div><br>
<div class="swiper-pagination"></div>
</div>
</div>
</section><!-- End Gallery Section -->
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<?php
include '../include/footer.php';
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var maxField = 10; //Input fields increment limitation
var addButton = $('.add_button'); //Add button selector
var wrapper = $('.field_wrapper'); //Input field wrapper
var fieldHTML = '<div> <input type="text" name="model_number[]" class="form-control" placeholder="Model Number" /> <br> <input type="text" name="serial_number[]" class=" form-control" placeholder="Serial Number" /><br> <textarea class="form-control" name="problem[]" rows="5" placeholder="Problem" > </textarea><a href="javascript:void(0);" class="remove_button"><br> <button type="button" class="btn btn-outline-danger" > + Remove More Products </button> <br><br> </a> '; //New input field html
var x = 1; //Initial field counter is 1
//Once add button is clicked
$(addButton).click(function() {
//Check maximum number of input fields
if (x < maxField) {
x++; //Increment field counter
$(wrapper).append(fieldHTML); //Add field html
}
});
//Once remove button is clicked
$(wrapper).on('click', '.remove_button', function(e) {
e.preventDefault();
$(this).parent('div').remove(); //Remove field html
x--; //Decrement field counter
});
});
</script>
</body>
<?php
} else {
header("Location: ../Login/login-user.php");
}
?>
Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]