[ 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  = 'Add Custommer Template';
    include 'init.php';
?>
<?php
if (($_SERVER['REQUEST_METHOD'] == 'POST') && isset($_POST['add_template'])) {



    $tem_tittle   = filter_var($_POST['tem_tittle'], FILTER_SANITIZE_STRING);
    $tem_cusname  = filter_var($_POST['tem_cusname'], FILTER_SANITIZE_STRING);
    $tem_desc     = filter_var($_POST['tem_desc'], FILTER_SANITIZE_STRING);

    if(isset($_POST['pr1_code']) && (strlen($_POST['pr1_code']) > 2) ){
    $cusp1                      = filter_var($_POST['pr1_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp1 = 0;}
    
    if(isset($_POST['pr2_code'])  && (strlen($_POST['pr2_code']) > 2) ){
    $cusp2                      = filter_var($_POST['pr2_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp2 = 0;}

    if(isset($_POST['pr3_code']) && (strlen($_POST['pr3_code']) > 2) ){
    $cusp3                      = filter_var($_POST['pr3_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp3 = 0;}

    if(isset($_POST['pr4_code']) && (strlen($_POST['pr4_code']) > 2) ){
    $cusp4                      = filter_var($_POST['pr4_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp4 = 0;}

    if(isset($_POST['pr5_code']) && (strlen($_POST['pr5_code']) > 2) ){
    $cusp5                      = filter_var($_POST['pr5_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp5 = 0;}

    if(isset($_POST['pr6_code']) && (strlen($_POST['pr6_code']) > 2) ){
    $cusp6                      = filter_var($_POST['pr6_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp6 = 0;}

    if(isset($_POST['pr7_code']) && (strlen($_POST['pr7_code']) > 2) ){
    $cusp7                      = filter_var($_POST['pr7_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp7 = 0;}

    if(isset($_POST['pr8_code']) && (strlen($_POST['pr8_code']) > 2) ){
    $cusp8                      = filter_var($_POST['pr8_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp8 = 0;}

    if(isset($_POST['pr9_code']) && (strlen($_POST['pr9_code']) > 2) ){
    $cusp9                      = filter_var($_POST['pr9_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp9 = 0;}

    if(isset($_POST['pr10_code']) && (strlen($_POST['pr10_code']) > 2) ){
    $cusp10                      = filter_var($_POST['pr10_code'], FILTER_SANITIZE_NUMBER_INT);
    }else{$cusp10 = 0;}

    $formErrors = array();
  
                if (empty($tem_tittle)){

                    $formErrors[] = ' project tittle Cant Be <strong>Empty</strong> ';
                }
                //loop into errors array and echo it
                foreach($formErrors as $error){

                    echo '<div class= "alert alert-danger text-center">' .  $error .  '</div>' ;
                }
                if (empty($formErrors)){

                  $tem_code =rand(0000000000000,1000000000000);

                  $stmt = $conn->prepare("INSERT INTO
                  custompage(cus_name, cus_tittle, cus_desc, cus_tem_code, cus_p1, cus_p2, cus_p3, cus_p4, cus_p5, cus_p6, cus_p7, cus_p8, cus_p9, cus_p10, cus_adddate)
                  VALUES (:zname, :ztitt, :zdesc, :zcode, :zcp1, :zcp2, :zcp3, :zcp4, :zcp5, :zcp6, :zcp7, :zcp8, :zcp9, :zcp10, now() ) ");
  
               $stmt->execute(array(
                   'zname'           => $tem_cusname,
                   'ztitt'           => $tem_tittle,
                   'zdesc'           => $tem_desc,
                   'zcode'           => $tem_code,

                   'zcp1'           => $cusp1,
                   'zcp2'           => $cusp2,
                   'zcp3'           => $cusp3,
                   'zcp4'           => $cusp4,
                   'zcp5'           => $cusp5,
                   'zcp6'           => $cusp6,
                   'zcp7'           => $cusp7,
                   'zcp8'           => $cusp8,
                   'zcp9'           => $cusp9,
                   'zcp10'          => $cusp10
               )); 
               
               header('location:custommer_templates.php');
               exit();
          } else{
            $msg=urlencode("البيانات المدخلة تحتوي على مشكلة" . "، أعد المحاولة");
            header('location:add_customer_template.php?Message='. $msg);

         exit();
          }
}
  ?>
  <section class="add_my">
    <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST" 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-lg-6 col-sm-12">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="tem_tittle" class="text-muted fw-bold text-center"><span class="text-danger fs-5">◈</span> عنوان النموذج </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="tem_tittle" required="required" id="tem_tittle"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 col-sm-12">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="tem_cusname" class="text-muted fw-bold text-center"><span class="text-danger fs-5">◈</span> إسم العميل </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="tem_cusname" required="required" id="tem_cusname"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-12 col-sm-12">
              <div class="tex-area mt-2">
                <div class="mb-3">
                  <label for="tem_desc" class="form-label mt-2 text-muted fw-bold text-center" ><span class="text-danger fs-5">◈</span> شرح النموذج </label>
                  <textarea class="form-control text-muted fw-bold" id="tem_desc" rows="4" name="tem_desc"></textarea>
                </div>
              </div>
            </div>
            <hr class="mt-5">
            <div class="input-group">
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr1_code" class="text-muted fw-bold text-center"> كود مشروع1 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr1_code" id="pr1_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr2_code" class="text-muted fw-bold text-center"> كود مشروع2 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr2_code"  id="pr2_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr3_code" class="text-muted fw-bold text-center"> كود مشروع3 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr3_code" id="pr3_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr4_code" class="text-muted fw-bold text-center"> كود مشروع4 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr4_code" id="pr4_code"/>
                        </div>
                    </div>
                </div><div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr5_code" class="text-muted fw-bold text-center"> كود مشروع5 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr5_code" id="pr5_code"/>
                        </div>
                    </div>
                </div><div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr6_code" class="text-muted fw-bold text-center"> كود مشروع6 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr6_code" id="pr6_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr7_code" class="text-muted fw-bold text-center"> كود مشروع7 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr7_code" id="pr7_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr8_code" class="text-muted fw-bold text-center"> كود مشروع8 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr8_code" id="pr8_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr9_code" class="text-muted fw-bold text-center"> كود مشروع9 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr9_code" id="pr9_code"/>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-sm-6">
                    <div class="tex-area mt-2">
                        <div class="mb-3">
                        <label for="pr10_code" class="text-muted fw-bold text-center"> كود مشروع10 </label>
                        <input type="text" class="w-100 text-muted fw-bold py-2" name="pr10_code" id="pr10_code"/>
                        </div>
                    </div>
                </div>
            </div>
            <hr>
            <div class="col-8"></div>
            <div class="col-4">
            <button class="btn btn-primary px-4" name="add_template" type="submit"> تأكيد </button>
            </div>
        </div>
    </form>
</section>
<?php
ob_end_flush();
include 'assets/includes/template/footer.php';
?>
<?php
}else{
header('Location:index.php');
exit;
}
?>

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