0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: file_delete.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; //MySql connection require_once BASE_DIR."/Proposels/imagePath.php"; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>File delete| OFMSP</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../style.css" rel="stylesheet" type="text/css" /> <link rel="icon" href="../images/icon.ico" /> <style type="text/css"> <!-- .style3 { font-weight: bold; color: #660000; } #apDiv1 { position:absolute; width:68px; height:39px; z-index:1; left: 737px; top: 259px; } --> </style> </head> <body> <p> <!--<div id="headerbg"> <div id="headerblank">--> <?php include("include/first_userheader.php"); $id=$_GET['file_shelf_id ']; //$sql=mysql_query($sql); //$row=mysql_fetch_row($sql) if(isset($_POST['Delete'])) { //$u_name=@$_SESSION['username']; $file_id=$_POST['txtfileid']; $file_name = $_POST['txtfilename']; $active_flag=0; $sql="select * from fileshelf where filename ='$file_name' order by filename"; $sql=mysql_query($sql); while($row=mysql_fetch_array($sql)) { $file_proposels = $row['fileupload']; } $DelFilePath = ROOT_DIR . $file_proposels; if (file_exists($DelFilePath)) { unlink ($DelFilePath); } $sql="delete from fileshelf where file_shelf_id ='$file_id'"; mysql_query($sql); $message="Delete successfully.."; //} $url=$server_ip."/USER/delete_file.php?message=$message"; echo "<script>window.location='$url'</script>"; exit(); } ?> </div> </div> </p> <div align="center" class="style3"><span class="style1">Delete file Details</span> </p> </div> <form action="file_delete.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <p> </p> <div id="apDiv1"><a href="delete_file.php"><img src="../images/back_button_up.jpg" alt="" width="61" height="35" /></a></div> <table width="457" align="center"> <tr> <td width="106"> <div align="right" class="projectboldtxt"> <div align="left">File shelf id</div> </div></td> <td width="339"><label> <input type="text" name="txtfileid" id="txtfileid" value="<?php echo $_GET['id'];?>" readonly="readonly"/> </label></td> </tr> <tr> <td class="projectboldtxt">File name</td> <td><input type="text" name="txtfilename" id="txtfilename" value="<?php echo $_GET['name'];?>" readonly="readonly"/></td> </tr> </table> <p> </p> <table width="457" align="center"> <tr> <td width="212" class="projectboldtxt"> Do you want to delete the file...?</td> <td width="233"><label> <input type="submit" name="Delete" id="Delete" value="Delete" /> </label></td> </tr> </table> </form> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </div> <?php include "include/footer.php"; ?> </p> </body> </html>