Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/crm/action/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); include '../include/config.php'; // $uid = $_SESSION["userId"]; date_default_timezone_set('Asia/Kolkata'); $cudate = date("Y-m-d") ; extract($_POST); $id = $_GET['id']; $table = $_GET['table']; if($table == 'user') { $sql = "delete from tbl_user where id='$id'"; $result = mysqli_query($con, $sql) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../user_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../user_list.php'; </script>"; } } elseif ($table == 'categories') { # code... $sqls = "delete from categories where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../category_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../category_list.php'; </script>"; } } elseif ($table == 'expense') { # code... $sqls = "delete from expenses where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../expense_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../expense_list.php'; </script>"; } } elseif ($table == 'emp') { # code... $sqls = "delete from employee where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../emp_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../emp_list.php'; </script>"; } } elseif ($table == 'certificate') { # code... $sqls = "delete from tbl_certificate where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../certificate_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../certificate_list.php'; </script>"; } } elseif ($table == 'client_follwup') { # code... $sqls = "delete from client_follwup where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../client_follow_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../client_follow_list.php'; </script>"; } } elseif ($table == 'religion') { # code... $sqls = "delete from tbl_religion where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../religion_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../religion_list.php'; </script>"; } } elseif ($table == 'subbroker') { # code... $sqls = "delete from tbl_subbroker where id='$id'"; $result = mysqli_query($con, $sqls) or die(mysqli_error($con)); if($result>0) { // $_SESSION["userId"] = $id; echo "<script>; alert('Data Delete Succesfully'); window.location.href='../religion_list.php'; </script>"; } else { echo "<script>; alert('Data Not Delete Succesfully'); window.location.href='../religion_list.php'; </script>"; } } // header('location: ../bank_list.php'); ?>