0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: delete_custemaccountcashentry.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 Custem Account Cash Entry details| 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" /> </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"; ?> <?php include("include/first_userheader.php"); if(isset($_POST['Delete'])) { $u_id=@$_SESSION['user_id']; $p_id=@$_SESSION['project_id']; $custem_id=$_POST['txtcustemid']; $active_flag=0; $sql="select * from custemaccount_cashentry where user_id='$u_id' and project_id ='$p_id' and custem_id ='$custem_id'"; $sql1=mysql_query($sql); while($row=mysql_fetch_array($sql1)) { $custem_id_db=$row['custem_id']; } $ledgertype="Custem Account"; //$sql="select * from ledger where user_id='$u_id' and project_id ='$p_id' and type_id='$custem_id_db' and ledger_type='$ledgertype'"; // // $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 custemaccount_cashentry where user_id='$u_id' and project_id ='$p_id' and custem_id ='$custem_id'"; mysql_query($sql); $sql="delete from ledger where user_id='$u_id' and project_id ='$p_id' and ledger_type='$ledgertype' and type_id ='$custem_id'"; mysql_query($sql); $message="Delete successfully.."; $url="http://".$server_ip."/CPFMS/USER/search_custemaccountcashentry.php?message=$message"; echo "<script>window.location='$url'</script>"; exit(); } ?> </p> <p> </p> <form action="delete_custemaccountcashentry.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <p> </p> <p> </p> <p> </p> <table width="415" align="center"> <tr> <td width="106"><div align="right" class="projectboldtxt"> <div align="left" class="projectboldtxt">Custem ID</div> </div></td> <td width="339"><label> <input type="text" name="txtcustemid" id="txtcustemid" value="<?php echo $_GET['id'];?>" readonly="readonly"/> </label></td> </tr> </table> <p> </p> <table width="594" align="center"> <tr> <td width="308" class="projectboldtxt"> Do you want to delete Costem account cash entry details...?</td> <td width="52"><label> <input type="submit" name="Delete" id="Delete" value="Delete" /> </label></td> <td width="218"><a href="search_custemaccountcashentry.php" class="projectboldtxt style2">Back</a></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>