Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux in-mum-web983.main-hosting.eu 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : u520472703 ( 520472703)
PHP Version : 8.2.29
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Directory :  /home/u520472703/domains/gadhiaassociate.com/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u520472703/domains/gadhiaassociate.com/public_html/admin/category.php
<?php include "components/header.php"; ?>
<?php

if (isset($_POST['delete'])) {

	$checkbox = $_POST['check'];
  
	$n = 0;
	for ($i = 0; $i < count($checkbox); $i++) {
	  $del_id = $checkbox[$i];
	  $msg = $checkbox[$i] . "Data deleted successfully !";
	  $sql = "DELETE FROM category WHERE c_id =" . $del_id;
	  mysqli_query($conn, $sql);
  
	  $n++;
	  // $msg = "Data deleted successfully !";
  
	}
	$msg = $n . " Items deleted successfully !";
	// mysqli_query($conn,"DELETE FROM employee WHERE userid='".$del_id."'");
  }
  

?>
				<a class="btn btn-primary p-4 my-3 rounded-4" href="edit-category.php?act=add"> <i class="glyphicon glyphicon-plus-sign"></i> Add New Category</a>

				<h1>Category</h1>
				<p>This table includes <?php echo counting("category", "id");?> categories.</p>
<form method="post" action="">
				<table id="sorted" class="table table-striped table-bordered">
				<thead>
				
				<tr>
					<th  colspan="2">
						<button type="submit" onclick="return confirm('Are you sure you want to proceed?');" class="btn btn-danger btn-sm me-2" name="delete">DELETE SELECTED</button>
						<button type="button" onclick="toggleSelection()" class="btn btn-primary btn-sm" name="selectall">SELECT ALL</button>
					</th>
				</tr>

				<tr>
					<th>C_ID</th>
					<th >Name</th>
					<th class="not">Edit</th>
					<th class="not">Delete</th>
					<th class="not">Select</th>
				</tr>
				</thead>

				<?php
				$category = getAll("category");
				if($category) foreach ($category as $categories):
					?>
					<tr>
		<td><?php echo $categories['c_id']?></td>
		<td><?php echo $categories['name']?></td>

        <td><a href="edit-category.php?act=edit&id=<?php echo $categories['c_id']?>"><i class="glyphicon glyphicon-edit"></i></a></td>
        <td><a href="save.php?act=delete&id=<?php echo $categories['c_id']?>&cat=category" onclick="return navConfirm(this.href);"><i class="glyphicon glyphicon-trash"></i></a></td>
		<td style="text-align: center">
            <input style="height: 18px; width: 18px; text-align: center;" type='checkbox' id='checkItem' name='check[]'
              value='<?php echo $categories['c_id'] ?>'>
          </td>
						</tr>
					<?php endforeach; ?>
					</table></form>
        <?php include "components/footer.php";?>
				

Al-HUWAITI Shell