One Hat Cyber Team
Your IP :
216.73.216.240
Server IP :
162.240.106.28
Server :
Linux server.ganesand.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thoa
/
public_html
/
admin
/
View File Name :
mg_subform.php
<? error_reporting(0); session_start(); include 'config.php'; $_POST['username']=$_SESSION['username']; $_POST['password']=$_SESSION['password']; $sql=mysql_query("select * from admin where USERNAME='".$_POST['username']."' and PASSWORD='".$_POST['password']."'"); if(mysql_num_rows($sql)==1) { $AP_ID = $_GET['AP_ID']; $view = mysql_query("select * from newapplication where AP_ID = '".$AP_ID."'"); // for editing $data = mysql_fetch_array($view); if($_POST['submit']){ $apno = mysql_real_escape_string($_POST['apno']); $apmob = mysql_real_escape_string($_POST['apmob']); /* $regno = mysql_real_escape_string($_POST['regno']); */ $uid = mysql_real_escape_string($_POST['uid']); $aid = mysql_real_escape_string($_POST['aid']); $foapp = mysql_real_escape_string($_POST['foapp']); if($foapp =="YES") { $foapptext="APPLICATION and"; } $fomed = mysql_real_escape_string($_POST['fomed']); if($fomed =="YES") { $fomedtext="MEDICAL CERTIFICATE and"; } $fopass = mysql_real_escape_string($_POST['fopass']); if($fopass =="YES") { $fopasstext="PASSPORT and"; } $fono = mysql_real_escape_string($_POST['fono']); $footh = mysql_real_escape_string($_POST['footh']); $focard = mysql_real_escape_string($_POST['focard']); $fono1 = mysql_real_escape_string($_POST['fono1']); $foph = mysql_real_escape_string($_POST['foph']); if($foph =="YES") { $fophtext="PHOTO'S"; } $fovs = mysql_real_escape_string($_POST['fovs']); $fops = mysql_real_escape_string($_POST['fops']); $foss = mysql_real_escape_string($_POST['foss']); $foinj = mysql_real_escape_string($_POST['foinj']); if($foinj =="YES") { $foinjtext="INJECTION CARD and"; } $apman = ($_FILES['apman']['name']); $tmp_img = $_FILES['apman']['tmp_name']; move_uploaded_file($tmp_img, "images/".$apman); $apcard = ($_FILES['apcard']['name']); $tmp_img1 = $_FILES['apcard']['tmp_name']; move_uploaded_file($tmp_img1, "images/".$apcard); $display = "Assalamu alaikum. Application No: ".$_POST['apno']. ". We received your ".$foapptext." " .$fomedtext." ".$fopasstext." ".$foinjtext." ".$fophtext.". Sha Haj Service (India) Pvt Ltd. Mobile 24x6: 94451 50009."; $i=1; if($_FILES['apman']['name']!="" && $_FILES['apcard']['name']!="" && $_GET['AP_ID']!=""){ $update1 = mysql_query("update newapplication set FO_APP='$foapp',FO_MED='$fomed',FO_PASS='$fopass',FO_NO='$fono',FO_OTH='$footh',FO_CARD='$focard',FO_NO1='$fono1',FO_PH='$foph',FO_VS='$fovs',FO_PS='$fops',FO_SS='$foss',AP_MAN='$apman',FO_INJ='$foinj',IMG_CARD='$apcard' where AP_ID = '".$AP_ID."' "); ?><script>alert("Form details Updated sucessfully"); window.location ="mg_subform.php" </script><? } else if($_FILES['apman']['name']!="" && $_GET['AP_ID']!="") { $update1 = mysql_query("update newapplication set FO_APP='$foapp',FO_MED='$fomed',FO_PASS='$fopass',FO_NO='$fono',FO_OTH='$footh',FO_CARD='$focard',FO_NO1='$fono1',FO_PH='$foph',FO_VS='$fovs',FO_PS='$fops',FO_SS='$foss',AP_MAN='$apman',FO_INJ='$foinj' where AP_ID = '".$AP_ID."' "); ?><script>alert("Form details Updated sucessfully"); window.location ="mg_subform.php" </script><? } else if( $_FILES['apcard']['name']!="" && $_GET['AP_ID']!="") { $update1 = mysql_query("update newapplication set FO_APP='$foapp',FO_MED='$fomed',FO_PASS='$fopass',FO_NO='$fono',FO_OTH='$footh',FO_CARD='$focard',FO_NO1='$fono1',FO_PH='$foph',FO_VS='$fovs',FO_PS='$fops',FO_SS='$foss',FO_INJ='$foinj',IMG_CARD='$apcard' where AP_ID = '".$AP_ID."' "); ?><script>alert("Form details Updated sucessfully"); window.location ="mg_subform.php" </script><? } elseif( $_GET['AP_ID']!=""){ $update1 = mysql_query("update newapplication set FO_APP='$foapp',FO_MED='$fomed',FO_PASS='$fopass',FO_NO='$fono',FO_OTH='$footh',FO_CARD='$focard',FO_NO1='$fono1',FO_PH='$foph',FO_VS='$fovs',FO_PS='$fops',FO_SS='$foss',FO_INJ='$foinj' where AP_ID = '".$AP_ID."' "); ?><script>alert("Form details Updated sucessfully"); window.location ="mg_subform.php" </script><? if($i=='1') { $username = 'SHAHAJ'; $key = '9fc19b3ab1XX'; $mobile = $apmob; $sender = 'SHAHAJ'; $accusage = '1'; $smstext = $display; $message = urlencode($smstext); $data1 = 'user='.$username.'&key='.$key."&mobile=".$mobile."&message=".$message."&senderid=".$sender."&accusage=".$accusage ; $ch = curl_init('http://mobicomm.dove-sms.com/submitsms.jsp?'.$data1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $i++; } } else { ?> <script>alert("Unable to Update Form details"); window.location ="mg_subform.php" </script> <? } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Admin Panel</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/datepicker3.css" rel="stylesheet"> <link href="css/styles.css" rel="stylesheet"> <link href="css/bootstrap-table.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <script src="js/respond.min.js"></script> <![endif]--> <script> function showUser(str) { $.ajax({ type: "GET", url: "getsub.php?q="+str, success: function(result){ $("#subcat").html(result); } }); } </script> <script> function outputfo(item){ if(item.value=="YES") { document.getElementById('output').innerHTML = "APPLICATION and"; } else { document.getElementById('output').innerHTML = ""; } } function outputme(item){ if(item.value=="YES") { document.getElementById('output1').innerHTML = "MEDICAL CERTIFICATE and"; } else { document.getElementById('output1').innerHTML = ""; } } function outputps(item){ if(item.value=="YES") { document.getElementById('output2').innerHTML = "PASSPORT and"; } else { document.getElementById('output2').innerHTML = ""; } } function outputin(item){ if(item.value=="YES") { document.getElementById('output3').innerHTML = "INJECTION CARD and"; } else { document.getElementById('output3').innerHTML = ""; } } function outputph(item){ if(item.value=="YES") { document.getElementById('output4').innerHTML = "PHOTO'S"; } else { document.getElementById('output4').innerHTML = ""; } } function outputno(item6){ document.getElementById('output6').innerHTML = item6.value; } </script> </head> <script type="text/javascript" src="js/tinymce/tinymce.min.js"></script> <body> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse"> <a href="#"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> </button> <a class="navbar-brand" href="#">Admin</a> <ul class="user-menu"> <li class="dropdown pull-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> User <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="#"><span class="glyphicon glyphicon-user"></span> Profile</a></li> <li><a href="#"><span class="glyphicon glyphicon-cog"></span> Settings</a></li> <li><a href="logou.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> </ul> </li> </ul> </div> </div><!-- /.container-fluid --> </nav> <div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar"> <form role="search"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search"> </div> </form> <? include('header.php');?> </div><!--/.sidebar--> <div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main"> <div class="row"> <ol class="breadcrumb"> <li><a href="dash.php"><span class="glyphicon glyphicon-home"></span></a></li> <li class="active">Manage Passport Subform Details</li> </ol> </div><!--/.row--> <!--/.row--> <section class="content" style="position: absolute;top: 380px;"> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">Add Passport Subform Details</h2> </div> </div> <div class="row"> <!-- left column --> <div class="col-xs-12"> <!-- general form elements --> <div class="box box-primary"> <!-- form start --> <div class="container"> <form role="form" method="post" action="" enctype="multipart/form-data"> <?php if($AP_ID){?> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Online Application No:</label> <input type="text" class="form-control" id="apno" name="apno" value="<?php echo $data['AP_NO']; ?>" readonly autofocus> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Mobile Number : </label> <input type="text" class="form-control" id="apmob" name="apmob" value="<?php echo $data['AP_MOB']; ?>"> </div> <? } ?> <div class="form-group col-sm-11"> <label for="sel1">Application Form: </label> <? if($AP_ID) {?> <select class="form-control" id="foapp" name="foapp" onclick="outputfo(this)"> <option value="<?php echo $data['FO_APP']; ?>"><?php echo $data['FO_APP']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="foapp" name="foapp" onChange="outputfo(this)" required> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="sel1">Medical Certificate: </label> <? if($AP_ID) {?> <select class="form-control" id="fomed" name="fomed" onclick="outputme(this)"> <option value="<?php echo $data['FO_MED']; ?>"><?php echo $data['FO_MED']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="fomed" name="fomed" onChange="outputme(this)" required> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="sel1">Passport: </label> <? if($AP_ID) {?> <select class="form-control" id="fopass" name="fopass" onclick="outputps(this)"> <option value="<?php echo $data['FO_PASS']; ?>"><?php echo $data['FO_PASS']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="fopass" name="fopass" onChange="outputps(this)" required> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Number: </label> <input type="text" class="form-control" id="fono" name="fono" value="<?php echo $data['FO_NO']; ?>"> </div> <div class="form-group col-sm-11"> <label for="sel1">Other Country Citizen: </label> <? if($AP_ID) {?> <select class="form-control" id="footh" name="footh"> <option value="<?php echo $data['FO_OTH']; ?>"><?php echo $data['FO_OTH']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="footh" name="footh"> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="sel1">Card Name: </label> <? if($AP_ID) {?> <select class="form-control" id="focard" name="focard"> <option value="<?php echo $data['FO_CARD']; ?>"><?php echo $data['FO_CARD']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="focard" name="focard"> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Number: </label> <input type="text" class="form-control" id="fono1" name="fono1" value="<?php echo $data['FO_NO1']; ?>"> </div> <div class="form-group col-sm-11"> <label for="sel1">Injection card: </label> <? if($AP_ID) {?> <select class="form-control" id="foinj" name="foinj" onclick="outputin(this)"> <option value="<?php echo $data['FO_INJ']; ?>"><?php echo $data['FO_INJ']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="foinj" name="foinj" onChange="outputin(this)" required> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="sel1">Photo's: </label> <? if($AP_ID) {?> <select class="form-control" id="foph" name="foph" onclick="outputph(this)"> <option value="<?php echo $data['FO_PH']; ?>"><?php echo $data['FO_PH']; ?></option> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php } else { ?> <select class="form-control" id="foph" name="foph" onChange="outputph(this)" required> <option value="YES">Yes</option> <option value="NO">No</option> </select> <?php }?> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1"> Visa Size </label> <input type="number" class="form-control" id="fovs" name="fovs" value="<?php echo $data['FO_VS']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1"> Passport Size </label> <input type="number" class="form-control" id="fops" name="fops" value="<?php echo $data['FO_PS']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1"> Stamp Size </label> <input type="number" class="form-control" id="foss" name="foss" value="<?php echo $data['FO_SS']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputFile">Upload Manual Application:</label> <input type="file" name="apman" id="exampleInputFile"> <?php if($AP_ID){?> <iframe src="images/<?php echo $data['AP_MAN'];?>" width="200px" style="height:200px"></iframe> <?php } ?> <label for="exampleInputFile">(Size:5 MB Max, Format:.pdf)</label> </div> <div class="form-group col-sm-11"> <label for="exampleInputFile">Upload ID-CARD:</label> <input type="file" name="apcard" id="exampleInputFile"> <?php if($AP_ID){?> <img src = "images/<?php echo $data['IMG_CARD'];?>" height="100" width="100"></img> <?php } ?> <label for="exampleInputFile">(Size:5 MB Max, Format:.jpg)</label> </div> <!-- <div class="form-group col-sm-11"> <label for="sel1">No. of Seats Currently Avaiable</label> <button id="button12" type="button" class ="button-click"><blink><?//echo $row['A_NOS']?></blink></button> </div> <div class="checkbox col-sm-11"> <label><input type="checkbox" value="">I hereby accept to the Terms & Conditions.<a href="images/terms.pdf" target="_blank">click here</a></label> </div>--> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">SMS Info</label> <br> <label >Assalamu alaikum. Application No:<span id="output6" style="color:red;"></span>. We received your <span id="output" style="color:red;"></span> <span id="output1" style="color:red;"></span> <span id="output2" style="color:red;"></span> <span id="output3" style="color:red;"></span> <span id="output4" style="color:red;"></span>. Thank You Sha Haj Service (India) Private Limited. Through 24x6: 94451 50009.</label> </div> <div class="box-footer col-sm-11"> <button type="submit" name="submit" value="submit" class="btn btn-primary">Update</button> <button type="reset" class="btn btn-primary">Reset</button> </div> </form> </div> </div> </div> </div> </section> <hr> <div class="row" style="position: absolute;float:top;"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading">View /Update Passport Subform Data Table</div> <div class="container"> <?php $queryear=mysql_query("select * from year ORDER BY Y_LIST DESC"); while($rowyear=mysql_fetch_array($queryear)) {?> <div class="box"> <div class="top"> <?php echo $yr=$rowyear['Y_LIST'];?> </div> <hr> <?php $querypak=mysql_query("select * from package"); while($rowpak=mysql_fetch_array($querypak)) {?> <div class="panel-body bottom"> <div class="box1"> <h4 style="color:red;" class="top1"><?php echo $pk=$rowpak['P_NAME'];?></h4> <div class="panel-body bottom1"> <table data-toggle="table" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-select-item-name="toolbar1" data-pagination="true" data-sort-name="name" data-sort-order="desc"> <thead> <tr> <th data-field="state" data-checkbox="true" >Item ID</th> <th data-field="id" data-sortable="false">Item ID</th> <th data-field="ano" data-sortable="true">App No</th> <th data-field="aname" data-sortable="true">Name</th> <th data-field="astatus" data-sortable="true">Status</th> </tr> </thead> <tbody> <?php $table = mysql_query("select * from newapplication where APP_DATE like '$yr-%-%' AND AP_SEL='$pk' ORDER BY AP_ID DESC"); $AP_ID=1; while($row=mysql_fetch_array($table)) { ?> <tr> <td></td> <td><?php echo $AP_ID;?></td> <td><?php echo $row['AP_NO'];?></td> <td><?php echo $row['AP_NAME'];?></td> <td><a href= "mg_subform.php?AP_ID=<?php echo $row['AP_ID'];?>">Edit</a></td> </tr> <?php $AP_ID++; }?> </tbody> </table> </div> </div> </div> <? } ?> </div> <? } ?> </div> </div> </div> </div> </div> <!--/.main--> <script src="js/jquery-1.11.1.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/chart.min.js"></script> <script src="js/chart-data.js"></script> <script src="js/easypiechart.js"></script> <script src="js/easypiechart-data.js"></script> <script src="js/bootstrap-datepicker.js"></script> <script src="js/bootstrap-table.js"></script> <script> $(document).ready(function() { $('ul.subcat').hide(); $('li').click(function(event) { event.stopPropagation(); $('> ul', this).toggle(); }); }); </script> <script> $(document).ready(function() { $("#pyes").hide(); $("#pno").hide(); $("#cno").hide(); $("#cyes").hide(); $("#scard").hide(); $("#usr").hide(); $("#age").hide(); }); function usagent(val1){ if(val1 == 'user'){ $("#age").hide(); $("#usr").show(); } else if(val1 == 'agent'){ $("#usr").hide(); $("#age").show(); } } function extra(val){ if(val == 'yes'){ $("#pno").hide(); $("#pyes").show(); } else if(val == 'no'){ $("#pyes").hide(); $("#pno").show(); } } function cextra(val){ if(val == 'yes'){ $("#cno").hide(); $("#cyes").show(); } else if(val == 'no'){ $("#cyes").hide(); $("#cno").show(); } } function sextra(val){ if(val == 'tak'){ $("#scard").show(); } else if(val == 'ord'){ $("#scard").show(); } else if(val == 'not'){ $("#scard").hide(); } } </script> <script> $('.top').on('click', function() { $parent_box = $(this).closest('.box'); $parent_box.siblings().find('.bottom').hide(); $parent_box.find('.bottom').toggle(); }); $('.top1').on('click', function() { $parent_box = $(this).closest('.box1'); $parent_box.siblings().find('.bottom1').hide(); $parent_box.find('.bottom1').toggle(); }); </script> <script> window.onload = function() { document.getElementById('output6').innerHTML = apno.value; } </script> <style> .container .box1 .top1 { padding: 12px; background-color: blue; color: white; cursor: pointer; } .container .box1 .bottom1 { display: none; } .container .box .top { padding: 12px; background-color: blue; color: white; cursor: pointer; } .container .box .bottom { display: none; } @media (min-width: 501px) and (max-width: 2000px){ .container .box { width:auto; max-width:900px; } .container .box1 { width:auto; max-width:900px; } } @media (min-width: 5px) and (max-width: 500px){ .container .box { width:100%; max-width:350px; } .container .box1 { width:100%; max-width:350px; } } </style> </body> </html> <? } else { $queryu=mysql_query("select * from admin where ID='1'"); $rowu=mysql_fetch_array($queryu); if($rowu) { $rowu['A_LOG']; $log = $rowu['A_LOG'] - 1; $upd_sts = mysql_query("UPDATE admin SET A_LOG ='$log' where ID='1'"); } header("Location: home.php"); } ?>