<?php
ob_start();
session_start();
?>
<?php
if(isset($_SESSION['user_liwwan_admin_2023930']) AND ($_SESSION['type'] == "manager_session_alliwan") && ($_SERVER['REQUEST_METHOD'] == 'POST') ){
$pageTitle = 'EDIT IMG';
include 'init.php';
?>
<?php
$myid = $_POST['pr_id'];
$st = $conn->prepare("SELECT * FROM projects WHERE pid = $myid ");
$st->execute();
$info = $st->Fetch();
?>
<?php
/*################################################################################
########################### DO EDIT IMAGES #######################################
###################################################################################*/
/* EDIT IMG [1] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img1'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName1 = $_FILES['img1']['name'];
$avatarTmp1 = $_FILES['img1']['tmp_name'];
$img1 = rand(0, 1000000000) . '_' . $avatarName1;
$delimg1 = $info['img1'];
$path1 = "images/uploads/projects/$delimg1";
move_uploaded_file($avatarTmp1, "images/uploads/projects/" . $img1);
$stmt = $conn->prepare("UPDATE
projects
SET
img1 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img1));
if (file_exists($path1)) {@unlink("images/uploads/projects/$delimg1");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [2] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img2'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName2 = $_FILES['img2']['name'];
$avatarTmp2 = $_FILES['img2']['tmp_name'];
$img2 = rand(0, 1000000000) . '_' . $avatarName2;
$delimg2 = $info['img2'];
$path2 = "images/uploads/projects/$delimg2";
move_uploaded_file($avatarTmp2, "images/uploads/projects/" . $img2);
$stmt = $conn->prepare("UPDATE
projects
SET
img2 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img2));
if (file_exists($path2)) {@unlink("images/uploads/projects/$delimg2");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [3] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img3'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName3 = $_FILES['img3']['name'];
$avatarTmp3 = $_FILES['img3']['tmp_name'];
$img3 = rand(0, 1000000000) . '_' . $avatarName3;
$delimg3 = $info['img3'];
$path3 = "images/uploads/projects/$delimg3";
move_uploaded_file($avatarTmp3, "images/uploads/projects/" . $img3);
$stmt = $conn->prepare("UPDATE
projects
SET
img3 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img3));
if (file_exists($path3)) {@unlink("images/uploads/projects/$delimg3");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [4] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img4'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName4 = $_FILES['img4']['name'];
$avatarTmp4 = $_FILES['img4']['tmp_name'];
$img4 = rand(0, 1000000000) . '_' . $avatarName4;
$delimg4 = $info['img4'];
$path4 = "images/uploads/projects/$delimg4";
move_uploaded_file($avatarTmp4, "images/uploads/projects/" . $img4);
$stmt = $conn->prepare("UPDATE
projects
SET
img4 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img4));
if (file_exists($path4)) {@unlink("images/uploads/projects/$delimg4");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [5] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img5'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName5 = $_FILES['img5']['name'];
$avatarTmp5 = $_FILES['img5']['tmp_name'];
$img5 = rand(0, 1000000000) . '_' . $avatarName5;
$delimg5 = $info['img5'];
$path5 = "images/uploads/projects/$delimg5";
move_uploaded_file($avatarTmp5, "images/uploads/projects/" . $img5);
$stmt = $conn->prepare("UPDATE
projects
SET
img5 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img5));
if (file_exists($path5)) {@unlink("images/uploads/projects/$delimg5");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [6] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img6'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName6 = $_FILES['img6']['name'];
$avatarTmp6 = $_FILES['img6']['tmp_name'];
$img6 = rand(0, 1000000000) . '_' . $avatarName6;
$delimg6 = $info['img6'];
$path6 = "images/uploads/projects/$delimg6";
move_uploaded_file($avatarTmp6, "images/uploads/projects/" . $img6);
$stmt = $conn->prepare("UPDATE
projects
SET
img6 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img6));
if (file_exists($path6)) {@unlink("images/uploads/projects/$delimg6");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [7] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img7'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName7 = $_FILES['img7']['name'];
$avatarTmp7 = $_FILES['img7']['tmp_name'];
$img7 = rand(0, 1000000000) . '_' . $avatarName7;
$delimg7 = $info['img7'];
$path7 = "images/uploads/projects/$delimg7";
move_uploaded_file($avatarTmp7, "images/uploads/projects/" . $img7);
$stmt = $conn->prepare("UPDATE
projects
SET
img7 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img7));
if (file_exists($path7)) {@unlink("images/uploads/projects/$delimg7");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [8] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img8'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName8 = $_FILES['img8']['name'];
$avatarTmp8 = $_FILES['img8']['tmp_name'];
$img8 = rand(0, 1000000000) . '_' . $avatarName8;
$delimg8 = $info['img8'];
$path8 = "images/uploads/projects/$delimg8";
move_uploaded_file($avatarTmp8, "images/uploads/projects/" . $img8);
$stmt = $conn->prepare("UPDATE
projects
SET
img8 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img8));
if (file_exists($path8)) {@unlink("images/uploads/projects/$delimg8");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [9] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img9'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName9 = $_FILES['img9']['name'];
$avatarTmp9 = $_FILES['img9']['tmp_name'];
$img9 = rand(0, 1000000000) . '_' . $avatarName9;
$delimg9 = $info['img9'];
$path9 = "images/uploads/projects/$delimg9";
move_uploaded_file($avatarTmp9, "images/uploads/projects/" . $img9);
$stmt = $conn->prepare("UPDATE
projects
SET
img9 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img9));
if (file_exists($path9)) {@unlink("images/uploads/projects/$delimg9");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/* EDIT IMG [10] */
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['doedit_img10'])) { ?>
<?php
$prid = $_POST["pr_id"];
$avatarName10 = $_FILES['img10']['name'];
$avatarTmp10 = $_FILES['img10']['tmp_name'];
$img10 = rand(0, 1000000000) . '_' . $avatarName10;
$delimg10 = $info['img10'];
$path10 = "images/uploads/projects/$delimg10";
move_uploaded_file($avatarTmp10, "images/uploads/projects/" . $img10);
$stmt = $conn->prepare("UPDATE
projects
SET
img10 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img10));
if (file_exists($path10)) {@unlink("images/uploads/projects/$delimg10");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMAGeS START
// DELETING IMG 1
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img1'])) {
$prid = $_POST["pr_id"];
$img1 = rand(0, 1000000000);
$delimg1 = $info['img1'];
$path1 = "images/uploads/projects/$delimg1";
$stmt = $conn->prepare("UPDATE
projects
SET
img1 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img1));
if (file_exists($path1)) {@unlink("images/uploads/projects/$delimg1");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 2
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img2'])) {
$prid = $_POST["pr_id"];
$img2 = rand(0, 1000000000);
$delimg2 = $info['img2'];
$path2 = "images/uploads/projects/$delimg2";
$stmt = $conn->prepare("UPDATE
projects
SET
img2 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img2));
if (file_exists($path2)) {@unlink("images/uploads/projects/$delimg2");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 3
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img3'])) {
$prid = $_POST["pr_id"];
$img3 = rand(0, 1000000000);
$delimg3 = $info['img3'];
$path3 = "images/uploads/projects/$delimg3";
$stmt = $conn->prepare("UPDATE
projects
SET
img3 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img3));
if (file_exists($path3)) {@unlink("images/uploads/projects/$delimg3");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 4
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img4'])) {
$prid = $_POST["pr_id"];
$img4 = rand(0, 1000000000);
$delimg4 = $info['img4'];
$path4 = "images/uploads/projects/$delimg4";
$stmt = $conn->prepare("UPDATE
projects
SET
img4 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img4));
if (file_exists($path4)) {@unlink("images/uploads/projects/$delimg4");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 5
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img5'])) {
$prid = $_POST["pr_id"];
$img5 = rand(0, 1000000000);
$delimg5 = $info['img5'];
$path5 = "images/uploads/projects/$delimg5";
$stmt = $conn->prepare("UPDATE
projects
SET
img5 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img5));
if (file_exists($path5)) {@unlink("images/uploads/projects/$delimg5");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 6
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img6'])) {
$prid = $_POST["pr_id"];
$img6 = rand(0, 1000000000);
$delimg6 = $info['img6'];
$path6 = "images/uploads/projects/$delimg6";
$stmt = $conn->prepare("UPDATE
projects
SET
img6 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img6));
if (file_exists($path6)) {@unlink("images/uploads/projects/$delimg6");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 7
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img7'])) {
$prid = $_POST["pr_id"];
$img7 = rand(0, 1000000000);
$delimg7 = $info['img7'];
$path7 = "images/uploads/projects/$delimg7";
$stmt = $conn->prepare("UPDATE
projects
SET
img7 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img7));
if (file_exists($path7)) {@unlink("images/uploads/projects/$delimg7");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 8
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img8'])) {
$prid = $_POST["pr_id"];
$img8 = rand(0, 1000000000);
$delimg8 = $info['img8'];
$path8 = "images/uploads/projects/$delimg8";
$stmt = $conn->prepare("UPDATE
projects
SET
img8 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img8));
if (file_exists($path8)) {@unlink("images/uploads/projects/$delimg8");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 9
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img9'])) {
$prid = $_POST["pr_id"];
$img9 = rand(0, 1000000000);
$delimg9 = $info['img9'];
$path9 = "images/uploads/projects/$delimg9";
$stmt = $conn->prepare("UPDATE
projects
SET
img9 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img9));
if (file_exists($path9)) {@unlink("images/uploads/projects/$delimg9");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
// DELETING IMG 10
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['delete_img10'])) {
$prid = $_POST["pr_id"];
$img10 = rand(0, 1000000000);
$delimg10 = $info['img10'];
$path10 = "images/uploads/projects/$delimg10";
$stmt = $conn->prepare("UPDATE
projects
SET
img10 = ?
WHERE
pid = $prid
");
$stmt->execute(array($img10));
if (file_exists($path10)) {@unlink("images/uploads/projects/$delimg10");}
header('location:projects.php?edpr');
exit();
?>
<?php }?>
<?php
/*################################################################################
########################### EDIT IMAGES FORMS #######################################
###################################################################################*/
$strlenimg1 = strlen( $info['img1']);
$strlenimg2 = strlen( $info['img2']);
$strlenimg3 = strlen( $info['img3']);
$strlenimg4 = strlen( $info['img4']);
$strlenimg5 = strlen( $info['img5']);
$strlenimg6 = strlen( $info['img6']);
$strlenimg7 = strlen( $info['img7']);
$strlenimg8 = strlen( $info['img8']);
$strlenimg9 = strlen( $info['img9']);
$strlenimg10 = strlen( $info['img10']);
?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img1'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg1 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img1" class="text-muted fw-bold text-center"> Edit img1 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img1']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img1" name="img1" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img1" class="text-muted fw-bold text-center"> ADD img1 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img1" name="img1" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img1" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img2'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg2 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img2" class="text-muted fw-bold text-center"> Edit img2 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img2']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img2" name="img2" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img2" class="text-muted fw-bold text-center"> ADD img2 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img2" name="img2" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img2" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img3'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg3 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img3" class="text-muted fw-bold text-center"> Edit img3 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img3']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img3" name="img3" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img3" class="text-muted fw-bold text-center"> ADD img3 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img3" name="img3" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img3" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img4'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg4 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img4" class="text-muted fw-bold text-center"> Edit img4 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img4']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img4" name="img4" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img4" class="text-muted fw-bold text-center"> ADD img4 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img4" name="img4" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img4" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img5'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg5 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img5" class="text-muted fw-bold text-center"> Edit img5 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img5']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img5" name="img5" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img5" class="text-muted fw-bold text-center"> ADD img5 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img5" name="img5" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img5" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img6'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg6 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img6" class="text-muted fw-bold text-center"> Edit img6 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img6']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img6" name="img6" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img6" class="text-muted fw-bold text-center"> ADD img6 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img6" name="img6" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img6" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img7'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg7 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img7" class="text-muted fw-bold text-center"> Edit img7 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img7']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img7" name="img7" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img7" class="text-muted fw-bold text-center"> ADD img7 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img7" name="img7" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img7" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img8'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg8 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img8" class="text-muted fw-bold text-center"> Edit img8 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img8']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img8" name="img8" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img8" class="text-muted fw-bold text-center"> ADD img8 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img8" name="img8" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img8" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img9'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg9 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img9" class="text-muted fw-bold text-center"> Edit img9 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<img src="images/uploads/projects/<?php echo $info ['img9']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="file" id="img9" name="img9" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img9" class="text-muted fw-bold text-center"> ADD img9 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img9" name="img9" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img9" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_img10'])) { ?>
<section class="add_my">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form mt-5">
<p class="text-center h3 fw-bold text-center m-auto add_my_p">تعديل صورة لمشروع</p>
<div class="row">
<div class="input-group">
<div class="col-12">
<?php if($strlenimg10 > 10 ){?>
<div class="upload_img_benfs my-4">
<label for="img10" class="text-muted fw-bold text-center"> Edit img10 </label>
<img src="images/uploads/projects/<?php echo $info ['img10']; ?>" class="img-fluid ed_img rounded p-3" alt="">
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img10" name="img10" class="btn btn-primary w-100 text-start" required="required">
</div>
<?php }else {?>
<label for="img10" class="text-muted fw-bold text-center"> ADD img10 </label>
<input type="hidden" name="pr_id" value="<?php echo $info['pid'];?>">
<input type="file" id="img10" name="img10" class="btn btn-primary w-100 text-start" required="required">
<?php }?>
</div>
</div>
<hr>
<button class="btn btn-primary px-4" name="doedit_img10" type="submit">تأكيد</button>
</div>
</div>
</form>
</section>
<?php }?>
<?php
ob_end_flush();
include 'assets/includes/template/footer.php';
?>
<?php
} else{
header('Location:index.php');
exit;
}
?>
<?php
ob_end_flush();