403Webshell
Server IP : 92.204.40.98  /  Your IP : 216.73.216.201
Web Server : LiteSpeed
System : Linux amster.dnsfors.com 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64
User : tmksyste ( 2190)
PHP Version : 8.3.31
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/tmksyste/domains/tmksystems.in/private_html/TMAdmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tmksyste/domains/tmksystems.in/private_html/TMAdmin//service_edit.php
<?php
include"header.php";
$todo=  mysqli_real_escape_string($con,$_GET['id']);
include"sidebar.php";

?>

<!-- ============================================================== -->
<!-- Start right Content here -->
<!-- ============================================================== -->
<div class="main-content">
 <div class="page-content">
       <div class="container-fluid">

                    <!-- start page title -->
                    <div class="row">
                        <div class="col-12">
                            <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                                <h4 class="mb-sm-0">Edit Amenities</h4>

                                <div class="page-title-right">
                                    <ol class="breadcrumb m-0">
                                        <li class="breadcrumb-item"><a href="javascript: void(0);">User</a></li>
                                        <li class="breadcrumb-item active">Amenities</li>
                                    </ol>
                                </div>

                            </div>
                        </div>
                    </div>
                    <!-- end page title -->
                    <?php
					 $query="SELECT * FROM  service where id='$todo' ";


 $result = mysqli_query($con,$query);
$i=0;
while($row = mysqli_fetch_array($result))
{
	$id="$row[id]";
	$service_title="$row[service_title]";
	$service_desc="$row[service_desc]";
  $service_detail="$row[service_detail]";
   $slider_image="$row[ufile]";
}
  ?>

                    <div class="row">

                        <!--end col-->
                        <div class="col-lg-12">
							<div class="card">
                                <div class="card-header">
                                    <ul class="nav nav-tabs-custom rounded card-header-tabs border-bottom-0" role="tablist">
                                        <li class="nav-item">
                                            <a class="nav-link active" data-bs-toggle="tab" href="#personalDetails" role="tab" aria-selected="false">
                                                <i class="fas fa-home"></i> Edit Amenities
                                            </a>
                                        </li>


                                    </ul>
                                </div>



                                <?php
           $status = "OK"; //initial status
$msg="";
           if(ISSET($_POST['save'])){
$service_title = mysqli_real_escape_string($con,$_POST['service_title']);
$service_desc = mysqli_real_escape_string($con,$_POST['service_desc']);
$service_detail = mysqli_real_escape_string($con,$_POST['service_detail']);


 if(!empty($_FILES["ufile"]["tmp_name"]))
 {
	 

$uploads_dir = 'uploads/services';

        $tmp_name = $_FILES["ufile"]["tmp_name"];
        // basename() may prevent filesystem traversal attacks;
        // further validation/sanitation of the filename may be appropriate
        $name = basename($_FILES["ufile"]["name"]);
        $random_digit=rand(0000,9999);
        $new_file_name=str_replace(' ','',$random_digit.$name);
		$new_file_name=trim($new_file_name," ");
		

        move_uploaded_file($tmp_name,"$uploads_dir/$new_file_name");
		unlink('uploads/services/'.$slider_image);
 }
 else
	 $new_file_name=$slider_image;
	 
	 
	  if(!empty($_FILES["ifile"]["tmp_name"]))
 {
	 

$uploads_dir = 'uploads/services';

        $tmp_name = $_FILES["ifile"]["tmp_name"];
        // basename() may prevent filesystem traversal attacks;
        // further validation/sanitation of the filename may be appropriate
        $name1 = basename($_FILES["ifile"]["name"]);
        $random_digit=rand(0000,9999);
        $new_file_name1=str_replace(' ','',$random_digit.$name1);
		$new_file_name1=trim($new_file_name1," ");
		

        move_uploaded_file($tmp_name,"$uploads_dir/$new_file_name1");
		unlink('uploads/services/'.$service_detail);
 }
 else
	 $new_file_name1=$service_detail;
	 
	 

if($status=="OK")
{
$qb=mysqli_query($con,"update service set service_title='$service_title', service_desc='$service_desc', service_detail='$service_detail' where id='$todo'");

 header('location:services');
	echo '<META HTTP-EQUIV="Refresh" Content="0; URL=services">';


		if($qb){
		    	$errormsg= "
<div class='alert alert-success alert-dismissible alert-outline fade show'>
                 Service Updated successfully.
                  <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
                  </div>
 "; //printing error if found in validation

		}
	}

        elseif ($status!=="OK") {
            $errormsg= "
<div class='alert alert-danger alert-dismissible alert-outline fade show'>
                     ".$msg." <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button> </div>"; //printing error if found in validation


    }
    else{
			$errormsg= "
      <div class='alert alert-danger alert-dismissible alert-outline fade show'>
                 Some Technical Glitch Is There. Please Try Again Later Or Ask Admin For Help.
                 <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
                 </div>"; //printing error if found in validation


		}
           }
           ?>



                                <div class="card-body p-4">
                                    <div class="tab-content">
                                        <div class="tab-pane active" id="personalDetails" role="tabpanel">
										                <?php
					 $query="SELECT * FROM  service where id='$todo' ";


 $result = mysqli_query($con,$query);
$i=0;
while($row = mysqli_fetch_array($result))
{
	$id="$row[id]";
	$service_title="$row[service_title]";
	$service_desc="$row[service_desc]";
  $service_detail="$row[service_detail]";
   $slider_image="$row[ufile]";
}
  ?>
                                        <?php
if($_SERVER['REQUEST_METHOD'] == 'POST')
						{
						print $errormsg;
						}
   ?>
              <form action="" method="post" enctype="multipart/form-data">
                                                <div class="row">



   <div class="col-lg-6">
                                                        <div class="mb-3">
                                                            <label for="firstnameInput" class="form-label"> Amenities Title</label>
                                                            <input type="text" class="form-control" id="firstnameInput" name="service_title" value="<?php print $service_title ?>" placeholder="Enter Amenities Title">
                                                        </div>
                                                    </div>

                                                    <div class="col-lg-6">
                                                        <div class="mb-3">
                            <label for="firstnameInput" class="form-label"> Short Description</label>
                            <textarea class="form-control" id="exampleFormControlTextarea5" name="service_desc" rows="2"><?php print $service_desc ?></textarea>
                                                        </div>
                                                    </div>

                                                      <div class="col-lg-6">
                                                        <div class="mb-3">
                                                            <label for="firstnameInput" class="form-label"> Amenities Icon</label><br>
                                                            <b>For Icon Search : <a href="https://fontawesome.com/v4/icons/ " target="_blank">Click Here</a>
                                                              <textarea class="form-control" id="exampleFormControlTextarea5" name="service_detail" rows="2"><?php print $service_detail ?></textarea>
                                 
                                                        </div>
                                                    </div>


                                                    <!--end col-->

                                                    <!--end col-->
                                                    <div class="col-lg-12">
                                                        <div class="hstack gap-2 justify-content-end">
                                <button type="submit" name="save" class="btn btn-primary">Update Amenities</button>

                                                        </div>
                                                    </div>
                                                    <!--end col-->
                                                </div>
                                                <!--end row-->
                                            </form>
                                        </div>
                                        <!--end tab-pane-->

                                        <!--end tab-pane-->

                                        <!--end tab-pane-->
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--end col-->
                    </div>


                </div>
                <!-- container-fluid -->
            </div>
            <!-- End Page-content -->

            <?php include"footer.php";?>

Youez - 2016 - github.com/yon3zu
LinuXploit