<?php
ob_start();
session_start();
?>
<?php
if(isset($_SESSION['user_liwwan_admin_2023930']) AND ($_SESSION['type'] == "manager_session_alliwan") ){
$pageTitle = 'Images Project';
include 'init.php';
?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_imgs'])) { ?>
<?php
$id = $_POST['pr_id'];
$sql = "SELECT * FROM projects WHERE pid = ".$id." LIMIT 1";
$result = $conn->query($sql);
while($row = $result->fetch()) {
?>
<?php
$strlenimg1 = strlen( $row['img1']);
$strlenimg2 = strlen( $row['img2']);
$strlenimg3 = strlen( $row['img3']);
$strlenimg4 = strlen( $row['img4']);
$strlenimg5 = strlen( $row['img5']);
$strlenimg6 = strlen( $row['img6']);
$strlenimg7 = strlen( $row['img7']);
$strlenimg8 = strlen( $row['img8']);
$strlenimg9 = strlen( $row['img9']);
$strlenimg10 = strlen( $row['img10']);
?>
<section class="ed_img_show">
<h3 class="text-center fw-bold my-3">صور المشروع رقم : <span class="text-center py-1 px-3 bg-dark text-white rounded"><?php echo $row['code']; ?></span></h3>
<hr class="py-1 bgdark w-50 rounded m-auto">
<div class="container">
<div class="row">
<?php if($strlenimg1 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img1']; ?>" alt="image">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img1" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 1</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img1" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 1</button>
</form>
</div>
</div>
<?php } else{?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img1" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 1</button>
</form>
</div>
<?php }?>
<?php if($strlenimg2 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img2']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img2" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 2</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img2" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 2</button>
</form>
</div>
</div>
<?php } else{?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img2" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 2</button>
</form>
</div>
<?php }?>
<?php if($strlenimg3 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img3']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img3" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 3</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img3" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 3</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img3" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 3</button>
</form>
</div>
<?php }?>
<?php if($strlenimg4 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img4']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img4" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 4</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img4" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 4</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img4" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 4</button>
</form>
</div>
<?php }?>
<?php if($strlenimg5 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img5']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img5" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 5</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img5" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 5</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img5" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 5</button>
</form>
</div>
<?php }?>
<?php if($strlenimg6 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img6']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img6" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 6</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img6" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 6</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img6" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 6</button>
</form>
</div>
<?php }?>
<?php if($strlenimg7 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img7']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img7" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 7</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img7" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 7</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img7" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 7</button>
</form>
</div>
<?php }?>
<?php if($strlenimg8 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img8']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img8" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 8</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img8" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 8</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img8" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 8</button>
</form>
</div>
<?php }?>
<?php if($strlenimg9 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img9']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img9" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 9</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img9" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 9</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img9" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 9</button>
</form>
</div>
<?php }?>
<?php if($strlenimg10 > 10 ){?>
<div class="col-lg-6 col-sm-12">
<div>
<img class="img-fluid my_imgshow" src="images/uploads/projects/<?php echo $row['img10']; ?>" alt="as">
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img10" class="w-100 btn btn-dark fw-bold bg-none border-0">EDIT IMG 10</button>
</form>
</div>
<div class="col-lg-4 col-sm-12 m-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="delete_img10" onclick="return confirm('متأكد من حذف الصورة؟');" class="w-100 btn btn-danger fw-bold bg-none border-0">Delete IMG 10</button>
</form>
</div>
</div>
<?php }else {?>
<div class="col-lg-6 col-sm-12 my-2">
<form action="ac_edit_imgs.php" method="POST">
<input type="hidden" name="pr_id" value="<?php echo $row ['pid'];?>">
<button href="ac_edit_imgs.php" type="submit" name="edit_img10" class="w-100 btn btn-dark text-warning rounded shadow fw-bold border-0 my-3 py-4">ADD IMG 10</button>
</form>
</div>
<?php }?>
</div>
</div>
</section>
<?php }?>
<?php }?>
<?php
ob_end_flush();
include 'assets/includes/template/footer.php';
?>
<?php
} else{
header('Location:index.php');
exit;
}
?>
<?php
ob_end_flush();| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| assets | Folder | 0755 |
|
|
| images | Folder | 0755 |
|
|
| ac_citycalc.php | File | 15.27 KB | 0644 |
|
| ac_edit_admin.php | File | 2.67 KB | 0644 |
|
| ac_edit_admininfo.php | File | 4.36 KB | 0644 |
|
| ac_edit_imgs.php | File | 34.27 KB | 0644 |
|
| ac_edit_pr.php | File | 10.72 KB | 0644 |
|
| ac_projects.php | File | 5.24 KB | 0644 |
|
| ac_workshops.php | File | 18.62 KB | 0644 |
|
| add_admin.php | File | 4.32 KB | 0644 |
|
| add_customer_template.php | File | 11.1 KB | 0644 |
|
| add_project.php | File | 17.22 KB | 0644 |
|
| add_workshop.php | File | 5.15 KB | 0644 |
|
| admins.php | File | 4.81 KB | 0644 |
|
| citycalc.php | File | 5.01 KB | 0644 |
|
| cons_orders.php | File | 4.51 KB | 0644 |
|
| custommer_templates.php | File | 4.59 KB | 0644 |
|
| dashboard.php | File | 4.11 KB | 0644 |
|
| edit_cus_template.php | File | 11.74 KB | 0644 |
|
| editadminpassword.php | File | 5.17 KB | 0644 |
|
| error_log | File | 309.84 KB | 0644 |
|
| imgs.php | File | 18.17 KB | 0644 |
|
| index.php | File | 3.19 KB | 0644 |
|
| init.php | File | 183 B | 0644 |
|
| logout.php | File | 186 B | 0644 |
|
| newsletter.php | File | 3.13 KB | 0644 |
|
| projects.php | File | 13.89 KB | 0644 |
|
| projects_card.php | File | 13.29 KB | 0644 |
|
| show.php | File | 8.81 KB | 0644 |
|
| workshop_details.php | File | 12.08 KB | 0644 |
|
| workshops.php | File | 4.63 KB | 0644 |
|