1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php $formid = $_REQUEST['formid']; require_once "inc/configure.php";
//echo"del"; exit;
if(havePermission("BMu")==false){ myerror("Invalid Permission"); }
$act = filter_var($_REQUEST['act'], FILTER_SANITIZE_STRING); $drawing_no = filter_var($_REQUEST['drawing_no'], FILTER_SANITIZE_STRING); $refid = (int)$_REQUEST['refid'];
if( $_POST['action']=="dgn_extrabom_delete" && !empty($refid) ){
//delete existing bom detail $sql = "DELETE from dgn_extra_bom_dtl WHERE extrabom_refid=:extrabom_refid"; $sth = $dbh->prepare($sql); $q= $sth->execute( array(':extrabom_refid'=> $refid) ); pdo_showerror($sth, $q);
//delete existing bom header $sql = "DELETE from dgn_extra_bom WHERE refid=:refid"; $sth = $dbh->prepare($sql); $q= $sth->execute( array(':refid'=> $refid) ); pdo_showerror($sth, $q); //header("Location: dgn_master_index.php?act=resume&refid=$refid&msg=Saved."); header("Location: iframe_dgn_extrabom_modifyform.php?action=$act&edit=1&drawing_no=$drawing_no&formid=$formid&msg=Saved."); print "Saved."; exit; } myerror("Invaild request");
?>
|