0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: delete_stockaccount.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>Delete Stock Category| 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"> <!-- #apDiv3 { position:absolute; width:65px; height:40px; z-index:1; top: 314px; left: 585px; } .style2 {font-size: 14px} --> </style> </head> <body> <p><?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; //MySql connection //require_once BASE_DIR."/Proposels/imagePath.php"; ?> <!--<div id="headerbg"> <div id="headerblank">--> <?php include("include/userheader.php"); $id=$_GET['group_id']; $u_id=@$_SESSION['user_id']; if(isset($_POST['Delete'])) { $stockaccname = $_POST['txtstockaccname']; $stockaccid=$_POST['txtgstockaccid']; $active_flag=0; $sql="select * from stockcategory where user_id='$u_id' and category_name ='$stockaccname'"; $sql=mysql_query($sql); while($row=mysql_fetch_array($sql)) { $table_id = $row['category_id']; } $sql="select * from stockitem where user_id='$u_id' and category_name ='$stockaccname'"; $sql=mysql_query($sql); $row=mysql_fetch_array($sql); if($row != NULL) { $active_flag=1; } if($active_flag==1) { $message="This is an active details. You cannot delete this details."; } else { $sql="delete from stockcategory where user_id='$u_id' and category_id='$stockaccid'"; mysql_query($sql); $message="Delete successfully.."; } $url="http://".$server_ip."/CPFMS/USER/search_stockacc.php?message=$message"; echo "<script>window.location='$url'</script>"; exit(); }?> </div> </div> </p> <form action="delete_stockaccount.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <p> </p> <div align="center" class="projectboldtxt">Delete Category Details</div> <p align="center"> </p> <div id="apDiv1"><a href="search_emp.php"></a></div> <table width="415" align="center"> <tr> <td width="106"><div align="right" class="projectboldtxt"> <div align="left" class="projectboldtxt">Category ID</div> </div></td> <td width="339"><label> <input type="text" name="txtgstockaccid" id="txtgstockaccid" value="<?php echo $_GET['id'];?>" readonly="readonly"/> </label></td> </tr> <tr> <td class="projectboldtxt">Category name</td> <td><input type="text" name="txtstockaccname" id="txtstockaccname" value="<?php echo $_GET['name'];?>" readonly="readonly"/></td> </tr> </table> <div id="apDiv2"><a href="search_emp.php"></a></div> <p> </p> <table width="345" align="center"> <tr> <td width="220" class="projectboldtxt"> Do you want to delete the Category...?</td> <td width="113"><label> <input type="submit" name="Delete" id="Delete" value="Delete" /> <a href="search_stockacc.php" class="projectboldtxt style2">Back</a></label></td> </tr> </table> <a href="search_emp.php"></a> </div> </div> </p> </form> <p> </p> <p> <?php include "include/footer.php"; ?> </p> </body> </html>