One Hat Cyber Team
Your IP :
172.16.0.254
Server IP :
58.26.163.33
Server :
Windows NT DGPENSV2LPKMN 10.0 build 14393 (Windows Server 2016) AMD64
Server Software :
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.3.25
PHP Version :
7.3.25
Buat File
|
Buat Folder
Eksekusi
Dir :
C:
/
xampp7
/
htdocs
/
edgpens
/
edg
/
View File Name :
tabs_old.php
<?php $curr_page = $_GET['np']; if($_POST): $ii = (is_numeric($_GET['ii'])) ? $_GET['ii'] : 0 ; $do = $_POST['type_submit']; $curr_page = $_POST['curr_page']; $marine_bypass = $_POST['marine_bypass']; $resubmit = $_POST['resubmit']; if($ii > 0){ if($do=="submit_me"){ if($marine_bypass == 'Y'){ $idApproveMFSO = 99999; $commentsMFSO = '-bypass-'; $flagApproveMFSO = 'Y'; }else{ $commentsMFSO = ''; } if($resubmit == 'T'){ $sql = "UPDATE permohonan_main SET submit = 'Y', idApproveMFSO = 0, commentsMFSO = '{$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,"APPLICATION UPDATE (SUBMIT)"); }else{ // $sql1 = "CREATE TEMPORARY TABLE tmp SELECT * from permohonan_main WHERE idPermohonan = ?"; // $sql2 = "ALTER TABLE tmp drop idPermohonan"; // $sql3 = "INSERT INTO permohonan_main SELECT 0,tmp.* FROM tmp"; // $sql4 = "DROP TEMPORARY TABLE tmp"; // $param_type = "auto"; // $param_data = array( // "idPermohonan" => $ii // ); // $data1 = mysqli_prepare_audit($sql1,$param_type,$param_data); // $data2 = $mysqli->query($sql2); // $data3 = mysqli_prepare_audit($sql3,$param_type,$param_data); // $data4 = $mysqli->query($sql4); // $last_id = $data3[0]; // $sql = "select * FROM permohonan_main";; // $sql = "CALL copy_app(?,@idp_new)";; // $stmt = $mysqli->prepare($sql); // $xyz = $ii; // $stmt->bind_param("i", $xyz); // $stmt->execute(); // $param_type = "i"; // $param_data = array( // "idPermohonan" => $ii // ); // $data = mysqli_prepare_audit($sql,$param_type,$param_data); $idp = $ii; $conn = $mysqli; $stmt = $conn->stmt_init(); $stmt->prepare("SET @idp := ?"); $stmt->bind_param('i', $idp); $stmt->execute(); $sql = "CALL copy_app(@idp,@idp_new)"; $result = $conn->query($sql) or die($mysqli->error); $data = $result->fetch_assoc(); $stmt->close(); $idp_n = $data['idPermohonan']; while (mysqli_next_result($mysqli)) {;} audit_insert("CALL copy_app({$idp},{$idp_n})","APPLICATION UPDATE (RESUBMIT)"); $ii = $idp_n; // print_r($data); /* UPDATE OLD APPLICATION */ // $sql = "UPDATE // permohonan_main // SET // status = 'R', // old_id = ? // WHERE // idPermohonan = ?"; // $param_type = "auto"; // $param_data = array( // "idPermohonan" => $ii // "old_id" => $last_id // ); // $data = mysqli_prepare_audit($sql,$param_type,$param_data); /* UPDATE NEW APPLICATION */ // $sql = "UPDATE // permohonan_main // SET // submit = 'Y', // idApproveMFSO = 0, // commentsMFSO = '{$commentsMFSO}', // flagApproveMFSO = 'N', // idApproveDG = 0, // commentsDG = '', // flagApproveDG = 'N', // idApproveMTSO = 0, // commentsMTSO = '', // flagApproveMTSO = 'N' // WHERE // idPermohonan = ?"; // $param_type = "auto"; // $param_data = array( // "idPermohonan" => $last_id // ); // $data = mysqli_prepare_audit($sql,$param_type,$param_data); /* COPY DG IF EXIST*/ // $stmt = $mysqli->stmt_init(); // $stmt->prepare("SELECT // a.idPP, // a.idPermohonanMain, // a.idPelabuhan, // DATE_FORMAT(a.tarikhTiba,'%d-%m-%Y') AS tarikhTiba, // DATE_FORMAT(a.tarikhBerlepas,'%d-%m-%Y') AS tarikhBerlepas, // a.securityLevel, // b.nama, // b.hadMasa // FROM // permohonan_dg a // WHERE // a.idPermohonanMain=? // "); // $stmt->bind_param("auto",$permohonan_main = $ii); // $stmt->execute(); // if ($stmt->error) // print_r('error executing statement: ' . $stmt->error); // $result2 = $stmt->get_result(); // $stmt->close(); // while($aa = $result2->fetch_assoc()){ // } // exit(); } $success = 1; $msg = "APPLICATION SUCCESSFULL SUBMIT."; } } if($success == 1){ $_SESSION['success'] = 1; $_SESSION['success_msg'] = $msg; }else if($success == 2){ $_SESSION['success'] = 2; $_SESSION['success_msg'] = $msg; }else if($success == 3){ $_SESSION['success'] = 3; $_SESSION['success_msg'] = $msg; } if($success){ echo "<script>window.location.replace('index.php?page=edg/main&np={$curr_page}&ii={$ii}&success={$success}');</script>"; exit(); } endif; $ship = ""; $ship_href = "index.php?page=edg/main&np=edg/ship_particular&ii={$ii}"; $isps = "disabled"; $isps_href = "javascript:void(0)"; $port = "disabled"; $port_href = "javascript:void(0)"; $other = "disabled"; $other_href = "javascript:void(0)"; $upload = "disabled"; $upload_href = "javascript:void(0)"; $dg = "disabled"; $dg_href = "javascript:void(0)"; $cont_submit = "N"; if($ii>0){ unset($query); unset($result); $query = " SELECT a.*, if(a.idMarineFacility>0,1,0) AS isps, 1 AS port, if(a.flagDG='Y',1,0) AS dg, SUM(if(b.idPermohonanMain is not null,1,0)) AS dg_record, c.flagBP, d.nama AS disclaimer FROM permohonan_main a LEFT JOIN permohonan_dg b ON b.idPermohonanMain = a.idPermohonan LEFT JOIN kod_marine_facility c ON c.idMarineFacility = a.idMarineFacility INNER JOIN (SELECT * FROM kod_disclaimer WHERE kod = 'FORM') d WHERE a.idPermohonan = '{$ii}' GROUP BY a.idPermohonan"; $result = $mysqli->query($query); $row_now = $result->fetch_assoc(); $isps = ""; $isps_href = "index.php?page=edg/main&np=edg/isps_info&ii={$ii}"; if($row_now['isps']==1){ $port = ""; $port_href = "index.php?page=edg/main&np=edg/port_call&ii={$ii}"; $other = ""; $other_href = "index.php?page=edg/main&np=edg/other_part&ii={$ii}"; $cont_submit = "Y"; if($row_now['dg']==1){ $dg = ""; $dg_href = "index.php?page=edg/main&np=edg/dg&ii={$ii}"; if($row_now['dg_record']==0) $cont_submit = "N"; } } } $ship = ($curr_page=="edg/ship_particular") ? "active" : $ship ; $ship_href = ($curr_page=="edg/ship_particular") ? "javascript:void(0)" : $ship_href ; $isps = ($curr_page=="edg/isps_info") ? "active" : $isps ; $isps_href = ($curr_page=="edg/isps_info") ? "javascript:void(0)" : $isps_href ; $port = ($curr_page=="edg/port_call") ? "active" : $port ; $port_href = ($curr_page=="edg/port_call") ? "javascript:void(0)" : $port_href ; $other = ($curr_page=="edg/other_part") ? "active" : $other ; $other_href = ($curr_page=="edg/other_part") ? "javascript:void(0)" : $other_href ; $dg = ($curr_page=="edg/dg") ? "active" : $dg ; $dg_href = ($curr_page=="edg/dg") ? "javascript:void(0)" : $dg_href ; $resubmit = "T"; ?> <?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 $resubmit = "Y"; }?> <!-- Get Started Title --> <div class="block-section"> <form class="submit_me" action="index.php?page=edg/main&np=edg/tabs&ii=<?php echo $ii;?>" method="post"> <ul class="nav nav-pills nav-justified nav-pills-custom"> <li class="<?php echo $ship; ?>"><a href="<?php echo $ship_href; ?>">Ship Particular</a></li> <li class="<?php echo $isps; ?>"><a href="<?php echo $isps_href; ?>">ISPS Information</a></li> <li class="<?php echo $port; ?>"><a href="<?php echo $port_href; ?>">Last 10 Port Calls</a></li> <li class="<?php echo $other; ?>"><a href="<?php echo $other_href; ?>">Other Particular</a></li> <li class="<?php echo $dg; ?>"><a href="<?php echo $dg_href; ?>">Dangerous Goods</a></li> <?php if($ii > 0 && $cont_submit=="Y"){ ?> <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"> <input type="hidden" name="resubmit" value="<?php echo $resubmit;?>"> <input type="hidden" name="marine_bypass" value="<?php echo $row_now['flagBP'];?>"> <input type="hidden" name="curr_page" value="<?php echo $curr_page;?>"> </form> </div> <div class="hidden disc_text"><?php echo nl2br($row_now['disclaimer']);?></div> <script type="text/javascript"> $(document).ready(function(){ $(".submit_form").on("click",function(){ $.confirm({ title: 'Confirm!', content: $(".disc_text").text(), buttons: { confirm: function () { $(".submit_me").trigger("submit"); }, cancel: function () { // $.alert('Canceled!'); } } }); }); }); </script>