[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: check_user_pre_register.php
<?php include('header.php'); ?> <style type="text/css"> #fli,#fli1 { } #display { position:absolute; width:485px; margin-left:0; margin-top:0; max-height:300px; padding:2px; display:none; border-top:0px; overflow:auto; border:1px #CCC solid; background-color: white; z-index:1000; } .show,.show1 { padding:7px; border-bottom:1px #999 dashed; font-size:15px; } .show:hover,.show1:hover { background:#151964; color:#FFF; cursor:pointer; } .widget{ overflow:visible !important; } </style> <script> /*$(document).ready(function(){ $("#uid").keyup(function() { var name = $('#uid').val(); //alert(name); if(name=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "check_user.php", data: "name="+ name , success: function(data){ var patt = new RegExp(","); var res = patt.test(data); var datum=data.split(','); if(res!=true){ //alert('aa'); document.getElementById("demo").innerHTML = "Sorry Duplicate Barcode Present Please enter product Code"; $('#uid').focus(); }else{ $('#name1').val(datum[0]); $('#phn').val(datum[1]); $('#em').val(datum[2]); $('#dis').val(datum[3]); $('#fname').val(datum[4]); $('#adhar').val(datum[5]); $('#add').val(datum[6]); $('#date2').val(datum[7]); $('#user_id').val(name); document.getElementById("demo").innerHTML = " "; } } }); } }); });*/ function fill(Value,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10,Value11,Value12) { $('#fli').val(Value); $('#name1').val(Value2); $('#phn').val(Value3); $('#em').val(Value4); $('#dis').val(Value5); $('#fname').val(Value6); $('#adhar').val(Value7); $('#add').val(Value8); $('#date12').val(Value9); $('#user_id').val(Value); $('#gen').val(Value10); $('#pin').val(Value11); $('#st').val(Value12); $('#display').hide(); } $(document).ready(function(){ $("#fli").keyup(function() { var name = $('#fli').val(); if(name=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "check_user.php", data: "name="+ name , success: function(html){ $("#display").html(html).show(); } }); } }); }); </script> <div id="page-wrapper"> <div class="main-page"> <div class="row"> <div id="col-md-12"> <div class="form-grids row widget-shadow" data-example-id="basic-forms"> <div class="form-title"> <h4>Post Training Registration</h4> </div> <div class="form-body"> <form method="post" action="check_user_pre_register.php" data-toggle="validator" enctype="multipart/form-data" > <div class="form-group"> <div class="col-md-6"> <label>User ID</label> <input type="text" class="form-control" name="uid" id="fli" placeholder="Please Give User ID" /> <div id="display"></div> <p id="demo"></p> </div> <div class="col-md-6"> <label>Registration Date:</label> <input class="form-control" type="text" id="" name="date" value="<?php echo date('d-m-Y'); ?>" readonly /> </div> <div class="clearfix"></div> </div> <div class="form-group"> <div class="col-md-6"> <div class="form-group"> <label>Name of the Candidate</label> <input type="text" class="form-control" placeholder="Name of the Candidate" name="name" id="name1"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Father Name</label> <input type="text" class="form-control" placeholder="Father Name" name="father" id="fname"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Aadhar Number</label> <input type="text" class="form-control" placeholder="Aadhar Number" name="aadhar" id="adhar"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Gender</label> <input type="text" class="form-control" placeholder="Aadhar Number" name="aadhar" id="gen"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Email ID</label> <input type="text" class="form-control" placeholder="Email ID" name="email" id="em"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Mobile Number</label> <input type="text" class="form-control" placeholder="Mobile Number" name="phn" id="phn"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>District</label> <input type="text" class="form-control" placeholder="District" name="district" id="dis"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Date of Birth</label> <input type="text" class="form-control" id="date12" placeholder="Date of Birth" name="dob" style="line-height: inherit;"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Pincode</label> <input type="text" class="form-control" id="pin" placeholder="Pin code" name="district"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>State</label> <input type="text" class="form-control" id="st" placeholder="State" name="district"> </div><!-- /.form group --> </div> <div class="col-md-6"> <div class="form-group"> <label>Address</label> <textarea class="form-control" name="add" id="add" placeholder="Address"></textarea> </div><!-- /.form group --> </div> <div class="clearfix"></div> </div> <div class="form-group"> <?php //set it to writable location, a place for temp generated PNG files $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //html PNG location prefix $PNG_WEB_DIR = 'temp/'; include "phpqrcode/qrlib.php"; //ofcourse we need rights to create temp dir if (!file_exists($PNG_TEMP_DIR)) mkdir($PNG_TEMP_DIR); $filename = $PNG_TEMP_DIR.'test.png'; //processing form input //remember to sanitize user input in real-life solution !!! $errorCorrectionLevel = 'L'; if (isset($_REQUEST['level']) && in_array($_REQUEST['level'], array('L','M','Q','H'))) $errorCorrectionLevel = $_REQUEST['level']; $matrixPointSize = 4; if (isset($_REQUEST['size'])) $matrixPointSize = min(max((int)$_REQUEST['size'], 1), 10); if (isset($_REQUEST['data'])) { //it's very important! if (trim($_REQUEST['data']) == '') die('data cannot be empty! <a href="?">back</a>'); // user data $filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); $filename1 = 'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; } else { //default data // echo 'You can provide data in GET parameter: <a href="?data=like_that">like that</a><hr/>'; QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2); } //display generated file // echo '<img src="'.$PNG_WEB_DIR.basename($filename).'" /><hr/>'; //config form echo ' <input name="data" id="user_id" type="hidden"/> <select name="level" style="display:none"> <option value="L"'.(($errorCorrectionLevel=='L')?' selected':'').'>L - smallest</option> <option value="M"'.(($errorCorrectionLevel=='M')?' selected':'').'>M</option> <option value="Q"'.(($errorCorrectionLevel=='Q')?' selected':'').'>Q</option> <option value="H"'.(($errorCorrectionLevel=='H')?' selected':'').'>H - best</option> </select> <select name="size" style="display:none">'; for($i=1;$i<=10;$i++) echo '<option value="'.$i.'"'.(($matrixPointSize==$i)?' selected':'').'>'.$i.'</option>'; echo '</select> '; // benchmark // QRtools::timeBenchmark(); ?> </div> <div class="form-group"> <div class="col-md-6"> <input type="submit" class="btn btn-info" id="btn" name="sub" value="REGISTER"> </div> <div class="clearfix"></div> </div> </div> </div> </form> <?php if(isset($_POST['sub'])){ $uid=$_POST['uid']; include('ids.php'); // include('phpqrcode/index.php'); /*$sq="insert into user(number,paper_id,date) values('".trim($_POST['no'])."','".$id."',curdate())"; $r=mysqli_query($con,$sq) or mysqli_error($con); */ //echo $sq; //echo "<script>alert('Post registration is done.');window.location.href='set_barcode.php?id=".$uid."';</script>"; $sq="update user set barcode='".$filename1."',type='post-register' where user_id='".$uid."'"; $r=mysqli_query($con,$sq) or mysqli_error($con); if($r){ echo "<script>alert('Post registration is done.');window.location.href='all_client_post.php';</script>"; } } ?> </div> </div> </div> </div> </div> </div> <script src="js/bootstrap-datepicker.js"></script> <script type="text/javascript"> // When the document is ready $(document).ready(function(){ $("#date1").datepicker({ format: 'dd-mm-yyyy', }); $("#date2").datepicker({ format: 'dd-mm-yyyy', }); $("#date2").datepicker({ format: 'dd-mm-yyyy', }); </script> <!--footer--> <?php include('footer.php'); ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 678.23 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619