BLACKSITE
:
3.147.46.136
:
103.154.184.216 / www.astitvaad.com
:
Linux vps.readyhost.in 4.18.0-553.6.1.el8.x86_64 #1 SMP Thu May 30 04:13:58 UTC 2024 x86_64
:
/
home
/
astitvaad
/
public_html
/
admin
/
Upload File:
files >> /home/astitvaad/public_html/admin/hordinng.php
<?php include '../connection.php'; ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>ASTITVAA</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="assets/materialize/css/materialize.min.css" media="screen,projection" /> <link href="assets/css/bootstrap.css" rel="stylesheet" /> <link href="assets/css/font-awesome.css" rel="stylesheet" /> <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" /> <link href="assets/css/custom-styles.css" rel="stylesheet" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' /> <link rel="stylesheet" href="assets/js/Lightweight-Chart/cssCharts.css"> <link rel="shortcut icon" href="../images/favicon.png"> <script> function validateForm() { var x = document.forms["myForm"]["name"].value; if (x == "") { alert("Name must be filled out"); return false; } } </script> </head> <body> <div id="wrapper"> <nav class="navbar navbar-default top-navbar" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand waves-effect waves-dark" href="dashboard.php"><i class="large material-icons"></i><img src="../images/logo.png"width="140px"height="60px"></a> <div id="sideNav" href=""><i class="material-icons dp48">toc</i></div> </div> <a href="logout.php" class="pull-right"><img src="exit.jpg" width="50" class="pull-right"></a> </nav> <?php include 'header.php';?> <div id="page-wrapper" > <div class="header"> </div> <div id="page-inner"> <div class="row"> <div class="col-lg-12"> <div class="card"> <center> <img src="../images/logo.png"width="140px"height="60px"> </center> <div class="row"> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="dashboard.php">Dashboard</a> </li> <li class="breadcrumb-item active"> <a href="Serviceus.php">Services</a> </li> <!-- <li class="breadcrumb-item active"> <a href="hordinng.php">Hordings</a> </li> <li class="breadcrumb-item active"> <a href="bus.php">Bus-Que-Shelter</a> </li> <li class="breadcrumb-item active"> <a href="trafficbooth.php">Traffic-Booth</a> </li> <li class="breadcrumb-item active"> <a href="pool.php">Pool-kiosk</a> </li> <li class="breadcrumb-item active"> <a href="socialmedia.php">Social-Media</a> </li> <li class="breadcrumb-item active"> <a href="ledscreen.php">Led-Screen</a> </li> <li class="breadcrumb-item active"> <a href="Serviceus.php">Van-Activation</a> </li> <li class="breadcrumb-item active"> <a href="auto.php">Auto-Add</a> </li> --> </ol> <h3 align="center"><font color="#30cc7b"><!-- <div class="card-action"> --> HOARDING <!-- </div> --></font></h3> </div> <h5 align="left"><font color="#30cc7b"><strong> <?php echo "Today Date : " . date("Y/m/d") . "<br>";?></font></strong></h5> <div class="card-content"> <form method="post" id="image_gallery"> <p id="msg"></p> <div class="row"> <div class="input-field col s3"> <input id="location" type="text" class="form-control" name="location" placeholder="location"> <label for=""><font size="2px"></font></label> </div> <div class="input-field col s3"> <input id="city" type="text" class="form-control" name="city" placeholder="city/town"> <label for=""><font size="2px"></font></label> </div> <div class="input-field col s3"> <input type="text" name="size" class="form-control" id="size" placeholder="size"> <label for=""><font size="2px"></font></label> </div> <div class="input-field col s3"> <select name="status" id="status" class="form-control"> <option value="">Select...</option> <option>Book</option> <option>Vacant</option> </select> </div> </div> <div class="row"> <div class="input-field col s4"> <input type="text" name="area" id="area" class="form-control" placeholder="area"> <!-- <label for=""><font size="2px">Email</font></label> --> </div> <div class="input-field col s4"> <input id="type" type="text" class="validate"name="type" class="form-control" placeholder="type"> <!-- <label for=""><font size="2px">M</font></label> --> </div> <div class="input-field col s4"> <input type="file" name="upload_profile" id="upload_profile" class="form-control" placeholder="type"> <!-- <label for=""><font size="2px">M</font></label> --> </div> </div> <center> <input type="submit"name="submit"value="submit" class="btn btn-sm btn-primary"> </center> </form> </div> </div> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-lg-12"> <table class="table table-striped table-bordered table-hover"> <thead class="thead-dark"> <tr> <th class="text-center">ID</th> <th class="text-center">LOCATION</th> <th class="text-center">CITY</th> <th class="text-center">SIZE</th> <th class="text-center">AREA</th> <th class="text-center">TYPE</th> <th class="text-center">FILE</th> <th class="text-center">STATUS</th> <th class="text-center">ACTION</th> </tr> </thead> <tbody> <?php if (isset($_GET['page_no']) && $_GET['page_no']!="") { $page_no = $_GET['page_no']; } else { $page_no = 1; } $total_records_per_page = 10; $offset = ($page_no-1) * $total_records_per_page; $previous_page = $page_no - 1; $next_page = $page_no + 1; $adjacents = "2"; $result_count = mysqli_query($conn,"SELECT COUNT(*) As total_records FROM `hordinng`"); $total_records = mysqli_fetch_array($result_count); $total_records = $total_records['total_records']; $total_no_of_pages = ceil($total_records / $total_records_per_page); $second_last = $total_no_of_pages - 1; // total page minus 1 $result = mysqli_query($conn,"SELECT * FROM `hordinng` ORDER BY id DESC LIMIT $offset, $total_records_per_page"); $sno= 1; while($row = mysqli_fetch_array($result)){ echo "<tr> <td class='text-center'>".$sno."</td> <td class='text-center'>".$row['location']."</td> <td class='text-center'>".$row['city']."</td> <td class='text-center'>".$row['size']."</td> <td class='text-center'>".$row['area']."</td> <td class='text-center'>".$row['type']."</td> <td class='text-center'data-label='VIEW'><a href='images/Hording/".$row['file']."'><u class='btn btn-info'>View</u></a></td> <td class='text-center'><button class='btn btn-sm btn-primary'>".$row['status']."</button></td> <td class='text-center'><a href='del_hording.php?id=".$row['id']."'><button class='btn btn-sm btn-danger'>Delete</button></a> <a href='edit_hording.php?id=".$row['id']."'><button class='btn btn-sm btn-warning'>Edit</button></a> </td> </tr>"; $sno++; } mysqli_close($conn); ?> </tbody> </table> <div style='padding: 10px 20px 0px; border-top: dotted 1px #CCC;'> <strong>Page <?php echo $page_no." of ".$total_no_of_pages; ?></strong> </div> <ul class="pagination"> <?php // if($page_no > 1){ echo "<li><a href='?page_no=1'>First Page</a></li>"; } ?> <li <?php if($page_no <= 1){ echo "class='disabled'"; } ?>> <a <?php if($page_no > 1){ echo "href='?page_no=$previous_page'"; } ?>>Previous</a> </li> <?php if ($total_no_of_pages <= 10){ for ($counter = 1; $counter <= $total_no_of_pages; $counter++){ if ($counter == $page_no) { echo "<li class='active'><a>$counter</a></li>"; }else{ echo "<li><a href='?page_no=$counter'>$counter</a></li>"; } } } elseif($total_no_of_pages > 10){ if($page_no <= 4) { for ($counter = 1; $counter < 8; $counter++){ if ($counter == $page_no) { echo "<li class='active'><a>$counter</a></li>"; }else{ echo "<li><a href='?page_no=$counter'>$counter</a></li>"; } } echo "<li><a>...</a></li>"; echo "<li><a href='?page_no=$second_last'>$second_last</a></li>"; echo "<li><a href='?page_no=$total_no_of_pages'>$total_no_of_pages</a></li>"; } elseif($page_no > 4 && $page_no < $total_no_of_pages - 4) { echo "<li><a href='?page_no=1'>1</a></li>"; echo "<li><a href='?page_no=2'>2</a></li>"; echo "<li><a>...</a></li>"; for ($counter = $page_no - $adjacents; $counter <= $page_no + $adjacents; $counter++) { if ($counter == $page_no) { echo "<li class='active'><a>$counter</a></li>"; }else{ echo "<li><a href='?page_no=$counter'>$counter</a></li>"; } } echo "<li><a>...</a></li>"; echo "<li><a href='?page_no=$second_last'>$second_last</a></li>"; echo "<li><a href='?page_no=$total_no_of_pages'>$total_no_of_pages</a></li>"; } else { echo "<li><a href='?page_no=1'>1</a></li>"; echo "<li><a href='?page_no=2'>2</a></li>"; echo "<li><a>...</a></li>"; for ($counter = $total_no_of_pages - 6; $counter <= $total_no_of_pages; $counter++) { if ($counter == $page_no) { echo "<li class='active'><a>$counter</a></li>"; }else{ echo "<li><a href='?page_no=$counter'>$counter</a></li>"; } } } } ?> <li <?php if($page_no >= $total_no_of_pages){ echo "class='disabled'"; } ?>> <a <?php if($page_no < $total_no_of_pages) { echo "href='?page_no=$next_page'"; } ?>>Next</a> </li> <?php if($page_no < $total_no_of_pages){ echo "<li><a href='?page_no=$total_no_of_pages'>Last ››</a></li>"; } ?> </ul> </div> </div> </div> </div> <?php include 'footer.php';?> </body> <?php include 'script.php';?> </html> <script src="js/validate.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#image_gallery").validate({ rules: { location: { required: true, }, city: { required: true, }, size: { required: true, }, area: { required: true, }, type: { required: true, }, file: { required: true, }, status: { required: true, } }, messages: { location: { required: "Please enter location" }, city: { required: "Please enter city/town" }, size: { required: "Please enter a Valid size", }, area: { required: "Please enter a Valid ", }, area: { required: "Please enter a Area", }, type: { required: "Please enter Type you Want", }, file: { required: "Please choose required file", }, status: { required: "Please enter status" } }, errorPlacement: function(label, element) { label.addClass('mt2 text-danger'); label.insertAfter(element); }, highlight: function(element, errorClass) { $(element).parent().addClass('has-danger') $(element).addClass('form-control-danger') }, submitHandler:function(){ var formData = new FormData($('#image_gallery')[0]); formData.append('file', $('input#upload_profile')[0].files[0]); $.ajax({ url:'ajax/hordinng.php', method:'POST', dataType:'json', contentType: false, cache: false, processData:false, data: formData, success:function(data){ if (data.success=='ok') { $("#msg").removeClass('text-danger').addClass('text-success').text('You have successfully Added').slideDown().delay(5000).slideUp(); $("#image_gallery").trigger('reset'); } else{ $("#msg").removeClass('text-success').addClass('text-danger').text('some error occured,try again').slideDown().delay(5000).slideUp(); } $('#datable_1').load(location.href+" #datable_1>*",""); }, error:function(){ alert("Fail to submit"); } }) return false; } }); }); </script>