[ Th3_Err0r Bypassed ]




Upload:

Command:

liwaavux@216.73.217.165: ~ $
<?php 
ob_start();
session_start();
?>
<?php
if(isset($_SESSION['user_liwwan_admin_2023930']) AND ($_SESSION['type'] == "manager_session_alliwan") ){
    
    $pageTitle  = 'edit project';
    include 'init.php';
?>

<?php
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['edit_project'])) { ?>

<?php 
    $id   = $_POST['prid'];
    $code = $_POST['prcode'];

    $type                        = filter_var($_POST['type'], FILTER_SANITIZE_STRING);
    $donedate                    = filter_var($_POST['donedate'], FILTER_SANITIZE_STRING);

    $tittle                      = filter_var($_POST['tittle'], FILTER_SANITIZE_STRING);
    $compname                    = filter_var($_POST['compname'], FILTER_SANITIZE_STRING);
    $description                 = filter_var($_POST['description'], FILTER_SANITIZE_STRING);
    $country                     = filter_var($_POST['country'], FILTER_SANITIZE_STRING);
    
    $ar_tittle                   = filter_var($_POST['ar_tittle'], FILTER_SANITIZE_STRING);
    $ar_compname                 = filter_var($_POST['ar_compname'], FILTER_SANITIZE_STRING);
    $ar_description              = filter_var($_POST['ar_description'], FILTER_SANITIZE_STRING);
    $ar_country                  = filter_var($_POST['ar_country'], FILTER_SANITIZE_STRING);

$stmt = $conn->prepare("UPDATE 
                             projects 
                             SET
                             type  = ?,
                             donedate  = ?,
                             tittle  = ?,
                             compname  = ?,
                             description  = ?,
                             country  = ?,
                             ar_tittle  = ?,
                             ar_compname  = ?,
                             ar_description  = ?,
                             ar_country  = ?
                             
                             WHERE
                             pid  = $id
                             AND
                             code = $code ");
$stmt->execute(array($type,$donedate,$tittle,$compname,$description,$country,$ar_tittle,$ar_compname,$ar_description,$ar_country));     
    
    header('location:projects.php');
    exit();
}
?>
<?php 
if (isset($_POST['edit_pr'])){
    $prid   = $_POST["pr_id"];


    // select All Data Depend on this ID
$stmt2 = $conn->prepare("SELECT * FROM projects WHERE pid = $prid");

// execute Query

$stmt2->execute();

// fetch the data

$info = $stmt2->fetch();

?>
<section class="add_my">
    <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" enctype="multipart/form-data" class="form">
      <p class="text-center h3 text-secondary fw-bold text-center m-auto add_my_p"> تعديل مشروع </p>
      <!-- Progress bar -->
      <div class="progressbar">
        <div class="progress" id="progress"></div>
        
        <div class="progress-step progress-step-active" data-title="Basic"></div>
        <div class="progress-step" data-title="ENGLISH"></div>
        <div class="progress-step" data-title="عربي"></div>
      </div>

      <div class="ermsg">
        <?php if (isset($_GET['Message'])){?>
        <div class="box-root padding-top--5 padding-bottom--2 flex-flex flex-justifyContent--center">
          <p class="custom_msg"><?php echo $_GET['Message']; ?></p>
        </div>
        <?php }?>
      </div>
          <!-- Steps -->
          <div class="form-step form-step-active">
            <div class="row">
              <div class="justtitle mt-5">
                <p class="text-muted mt-1 shadow p-3 rounded-pill text-center m-auto fs-4 w-50"> Basic </p>
              </div>
                <div class="col-6">
                    <div class="type mt-4">
                        <label for="type" class="text-muted fw-bold"> Project Type (إختر نوع المشروع) <span class="text-danger fs-5">◈</span></label>
                        <select class="form-select" aria-label="Default select example" value="<?php echo $info['type']; ?>" name="type" required="required">
                        <option selected disabled class="fw-bold text-primary"> Project Type </option>
                        <option value="1" <?php if ($info['type'] == 1){echo "selected"; } ?> >ديكور داخلي (interior decoration)</option>
                        <option value="2"<?php if ($info['type'] == 2){echo "selected"; } ?> >تصميم خارجي (Exterior design)</option>
                        <option value="3" <?php if ($info['type'] == 3){echo "selected"; } ?> >مكاتب  شركات (Corporate offices)</option>
                        <option value="4" <?php if ($info['type'] == 4){echo "selected"; } ?> >لاندسكيب (landscape)</option> 
                        <option value="5" <?php if ($info['type'] == 5){echo "selected"; } ?> > تصماميم الفيلات  (villa designs)</option>
                        <option value="6" <?php if ($info['type'] == 6){echo "selected"; } ?> > تصميم & تنفيذ  (Design & Execution)</option>
                    </select>
                    </div>
                </div>
                <div class="col-6">
                    <div class="input-group">
                        <label for="donedate" class="text-muted fw-bold"> Done DATE (تاريخ إنجاز المشروع) <span class="text-danger fs-5">◈</span></label>
                        <input type="date" name="donedate" id="donedate" value="<?php echo $info['donedate']; ?>" required="required" />
                    </div>
                </div>
                <input type="hidden" name="prid" value="<?php echo $info['pid']; ?>">
                <input type="hidden" name="prcode" value="<?php echo $info['code']; ?>">
            </div>
            <hr>
            <div class="mt-5">
            <a href="#" class="btn btn-next w-25 m-auto">Next</a>
            </div>
        </div>
        <div class="form-step">
            <div class="justtitle mt-5">
              <p class="text-muted mt-3 shadow p-3 rounded-pill text-center m-auto fs-4 w-50"><img src="../img/flags/en.png" alt="en">  ENGLISH  <img src="../img/flags/en.png" alt="en"></p>
            </div>
            <div class="row">
              <!-- first column -->
              <div class="col-lg-6 col-sm-12">
                <div class="input-group">
                  <label for="tittle" class="text-muted fw-bold"> Project Tittle <span class="text-danger fs-5">◈</span></label>
                  <input type="text" name="tittle" value="<?php echo $info['tittle'] ?>" id="tittle" required="required" />
                </div>
                <div class="input-group">
                  <label for="compname" class="text-muted fw-bold"> Company Name <span class="text-danger fs-5">◈</span></label>
                  <input type="text" name="compname" value="<?php echo $info['compname'] ?>" id="compname" required="required" />
                </div>
              </div>
              <!-- second column -->
              <div class="col-lg-6 col-sm-12">
                <div class="input-group">
                  <label for="country" class="text-muted fw-bold"> Project Country <span class="text-danger fs-5">◈</span></label>
                  <input type="text" name="country" value="<?php echo $info['country'] ?>" id="country" required="required" />
                </div>
              </div>
              <div class="col-lg-12 col-sm-12">
                <div class="tex-area mt-2">
                  <div class="mb-3">
                    <label for="description" class="form-label mt-2 text-muted fw-bold" >  Project Description <span class="text-danger fs-5">◈</span></label>
                    <textarea class="form-control" id="description" value="<?php echo $info['description'] ?>" rows="3" name="description"><?php echo $info['description'] ?></textarea>
                  </div>
                </div>
              </div>
            </div>
            <hr>
            <div class="btns-group">
              <a href="#" class="btn btn-prev w-25">Previous</a>
              <a href="#" class="btn btn-next w-25">Next</a>
            </div>
        </div>

        <div class="form-step">
            <div class="justtitle mt-5">
              <p class="text-muted mt-3 shadow p-3 rounded-pill text-center m-auto fs-4 w-50"><img src="../img/flags/ar.png" alt="en">  Arabic  <img src="../img/flags/eg.png" alt="en"></p>
            </div>
            <div class="row">
              <!-- first column -->
              <div class="col-lg-6 col-sm-12">
                <div class="input-group">
                  <label for="ar_tittle" class="text-muted fw-bold"> عنوان المشروع <span class="text-danger fs-5">◈</span></label>
                  <input type="text" name="ar_tittle" value="<?php echo $info['ar_tittle'] ?>" id="ar_tittle"  required="required" />
                </div>
                <div class="input-group">
                  <label for="ar_compname" class="text-muted fw-bold"> إسم الشركة <span class="text-danger fs-5">◈</span></label>
                  <input type="text" name="ar_compname" value="<?php echo $info['ar_compname'] ?>" id="ar_compname" required="required" />
                </div>
              </div>
              <!-- second column -->
              <div class="col-lg-6 col-sm-12">
                <div class="input-group">
                  <label for="ar_country" class="text-muted fw-bold"> بلد المشروع <span class="text-danger fs-5">◈</span></label>
                  <input type="text" name="ar_country" id="ar_country" value="<?php echo $info['ar_country'] ?>" required="required" />
                </div>
              </div>
              <div class="col-lg-12 col-sm-12">
                <div class="tex-area mt-2">
                  <div class="mb-3">
                    <label for="ar_description" class="form-label mt-2 text-muted fw-bold" > شرح المشروع <span class="text-danger fs-5">◈</span></label>
                    <textarea class="form-control" id="ar_description" value="<?php echo $info['ar_description'] ?>" rows="3" name="ar_description"><?php echo $info['ar_description'] ?></textarea>
                  </div>
                </div>
              </div>
            </div>
            <hr class="mt-5">
            <div class="btns-group">
              <a href="#" class="btn btn-prev w-25">Previous</a>
              <input type="submit" name="edit_project" value="Submit" class="btn btn-primary opacity-100" />
            </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();

Filemanager

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