
PK 
<?php
ob_start();
//error_reporting(E_ALL ^ E_NOTICE);
@session_start();
ini_set('allow_url_include',1);
date_default_timezone_set("Asia/Kolkata");
set_time_limit(600);
ini_set('max_execution_time',600);
//include '../admin/includes/settings/constant.php';
require_once '../admin/includes/settings/PDODB.php';
include '../admin/includes/modules/functions.php';
$function = new FUNCTIONS();
$coursedata = $function->getCourse($id=NULL,$isActive=1,$orderBy='ASC');
$stateListdata = $function->getStateList($id=NULL,$isActive=1);
if(isset($_POST['visitformbtn']) && !empty($_POST)){
//print_r($_POST); //exit; $_POST['email']
$mobileno = !empty($_POST['mobileno'])?trim($_POST['mobileno']):"";
$uemail = !empty($_POST['uemail'])?trim($_POST['uemail']):"";
$pdodb = PDODB::getInstance();
$sqlemail = "SELECT * FROM `tn_studentvisit` WHERE `uemail` = '".$uemail."' AND `isActive`=1";
$resultemail = $pdodb->query($sqlemail);
$sqlmobile = "SELECT * FROM `tn_studentvisit` WHERE `mobileno` = '".$mobileno."' AND `isActive`=1";
$resultmobile = $pdodb->query($sqlmobile);
if ($resultemail == true) {
$error = "This email already exists";
}elseif ($resultmobile == true) {
$error = "This Phone number already exists";
}else {
//print_r($_POST); exit;
$centrename = !empty($_POST['centrename'])?trim($_POST['centrename']):"";
$username = !empty($_POST['username'])?trim($_POST['username']):"";
$mobileno = !empty($_POST['mobileno'])?trim($_POST['mobileno']):"";
$uemail = !empty($_POST['uemail'])?trim($_POST['uemail']):"";
$dob = !empty($_POST['dob'])?trim($_POST['dob']):"";
$studentAddress = !empty($_POST['studentAddress'])?trim($_POST['studentAddress']):"";
$state = !empty($_POST['state'])?trim($_POST['state']):"";
//$courseName = !empty($_POST['courseName'])?trim($_POST['courseName']):"";
$healthIssue = !empty($_POST['healthIssue'])?trim($_POST['healthIssue']):"";
$emergencyPhoneNo = !empty($_POST['emergencyPhoneNo'])?trim($_POST['emergencyPhoneNo']):"";
$relationWith = !empty($_POST['relationWith'])?trim($_POST['relationWith']):"";
$whichCourse = !empty($_POST['whichCourse'])?trim($_POST['whichCourse']):"";
$gstNo = !empty($_POST['gstNo'])?trim($_POST['gstNo']):"";
$companyName = !empty($_POST['companyName'])?trim($_POST['companyName']):"";
$companyAddress = !empty($_POST['companyAddress'])?trim($_POST['companyAddress']):"";
$companyState = !empty($_POST['companyState'])?trim($_POST['companyState']):"";
$leavesOption = !empty($_POST['leavesOption'])?trim($_POST['leavesOption']):"";
$internship = !empty($_POST['internship'])?trim($_POST['internship']):"";
$error_msg = "";
//passport image save
$file = $_FILES['passportPhoto'];
$newfilename = uniqid('passportPhoto-',false);
if (!file_exists('../uploads/passportPhoto')) {
mkdir('../uploads/passportPhoto', 0777, true);
}
$foldername = "../uploads/passportPhoto/";
$passportPhoto = $function->uploadFile($newfilename, $foldername, 'passportPhoto');
//address Proof image save
$file = $_FILES['addressProof'];
$newfilenames = uniqid('addressProof-',false);
if (!file_exists('../uploads/addressProof')) {
mkdir('../uploads/addressProof', 0777, true);
}
$foldernameS = "../uploads/addressProof/";
$addressProof = $function->uploadFile($newfilenames, $foldernameS, 'addressProof');
$courseName = $_POST["courseName"];
$courseNameString = implode(",", $courseName);
//echo "Selected colors: " . $selectedColorsString;
$pdodb = PDODB::getInstance();
$sql = "INSERT INTO `tn_studentvisit` SET centrename='".$centrename."',username='".$username."', mobileno='".$mobileno."', uemail='".strtolower($uemail)."',
dob='".$dob."', studentAddress='".$studentAddress."', state='".$state."', courseName='".$courseNameString."', healthIssue='".$healthIssue."', emergencyPhoneNo='".$emergencyPhoneNo."', relationWith='".$relationWith."', whichCourse='".$whichCourse."', gstNo='".$gstNo."', companyName='".$companyName."', companyAddress='".$companyAddress."', companyState='".$companyState."', leavesOption='".$leavesOption."', internship='".$internship."', passportPhoto='".$passportPhoto[2]."', addressProof='".$addressProof[2]."'";
//exit;
$result = $pdodb->query($sql);
$array = explode(",", $courseNameString);
//$coursedata = $function->getCourse($id=$courseName,$isActive=1,$orderBy='ASC');
//$coursename = $coursedata[0]['courseName'];
$courselist = $function->getCourse($id=NULL,$isActive=1,$orderBy='ASC');
$courseNames = array(); // Initialize an array to store course names
for ($k = 0; $k < count($courselist); $k++) {
$courseid = $courselist[$k]['id'];
if (in_array($courseid, $array)) {
$courseNames[] = $courselist[$k]['courseName']; // Add course name to the array
}
}
$coursename = implode(', ', $courseNames); // Convert array to comma-separated string
//echo $courseName;
PDODB::closeInstance();
if(!empty($result)) {
$error_msg = 'Successfully Submitted.';
// mail send
$to = $uemail;
$subject = "Submission of Form";
$messagebody = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
<meta name='x-apple-disable-message-reformatting' />
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<meta name='color-scheme' content='light dark' />
<meta name='supported-color-schemes' content='light dark' />
<title></title>
<style type='text/css' rel='stylesheet' media='all'>
@import url('https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap');
body {
width: 100% !important;
height: 100%;
margin: 0;
-webkit-text-size-adjust: none;
}
a {
color: #3869D4;
}
a img {
border: none;
}
td {
word-break: break-word;
}
.preheader {
display: none !important;
visibility: hidden;
mso-hide: all;
font-size: 1px;
line-height: 1px;
max-height: 0;
max-width: 0;
opacity: 0;
overflow: hidden;
}
body,
td,
th {
font-family: 'Nunito Sans', Helvetica, Arial, sans-serif;
}
h1 {
margin-top: 0;
color: #333333;
font-size: 22px;
font-weight: bold;
text-align: left;
}
h2 {
margin-top: 0;
color: #333333;
font-size: 16px;
font-weight: bold;
text-align: left;
}
h3 {
margin-top: 0;
color: #333333;
font-size: 14px;
font-weight: bold;
text-align: left;
}
td,
th {
font-size: 16px;
}
p,
ul,
ol,
blockquote {
margin: .4em 0 1.1875em;
font-size: 16px;
line-height: 1.625;
}
p.sub {
font-size: 13px;
}
.align-right {
text-align: right;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.u-margin-bottom-none {
margin-bottom: 0;
}
.button {
background-color: #3869D4;
border-top: 10px solid #3869D4;
border-right: 18px solid #3869D4;
border-bottom: 10px solid #3869D4;
border-left: 18px solid #3869D4;
display: inline-block;
color: #FFF;
text-decoration: none;
border-radius: 3px;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
-webkit-text-size-adjust: none;
box-sizing: border-box;
}
.button--green {
background-color: #22BC66;
border-top: 10px solid #22BC66;
border-right: 18px solid #22BC66;
border-bottom: 10px solid #22BC66;
border-left: 18px solid #22BC66;
}
.button--red {
background-color: #FF6136;
border-top: 10px solid #FF6136;
border-right: 18px solid #FF6136;
border-bottom: 10px solid #FF6136;
border-left: 18px solid #FF6136;
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
text-align: center !important;
}
}
.attributes {
margin: 0 0 21px;
}
.attributes_content {
background-color: #F4F4F7;
padding: 16px;
}
.attributes_item {
padding: 0;
}
.related {
width: 100%;
margin: 0;
padding: 25px 0 0 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.related_item {
padding: 10px 0;
color: #CBCCCF;
font-size: 15px;
line-height: 18px;
}
.related_item-title {
display: block;
margin: .5em 0 0;
}
.related_item-thumb {
display: block;
padding-bottom: 10px;
}
.related_heading {
border-top: 1px solid #CBCCCF;
text-align: center;
padding: 25px 0 10px;
}
.discount {
width: 100%;
margin: 0;
padding: 24px;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #F4F4F7;
border: 2px dashed #CBCCCF;
}
.discount_heading {
text-align: center;
}
.discount_body {
text-align: center;
font-size: 15px;
}
.social {
width: auto;
}
.social td {
padding: 0;
width: auto;
}
.social_icon {
height: 20px;
margin: 0 8px 10px 8px;
padding: 0;
}
.purchase {
width: 100%;
margin: 0;
padding: 35px 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.purchase_content {
width: 100%;
margin: 0;
padding: 25px 0 0 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.purchase_item {
padding: 10px 0;
color: #51545E;
font-size: 15px;
line-height: 18px;
}
.purchase_heading {
padding-bottom: 8px;
border-bottom: 1px solid #EAEAEC;
}
.purchase_heading p {
margin: 0;
color: #85878E;
font-size: 12px;
}
.purchase_footer {
padding-top: 15px;
border-top: 1px solid #EAEAEC;
}
.purchase_total {
margin: 0;
text-align: right;
font-weight: bold;
color: #333333;
}
.purchase_total--label {
padding: 0 15px 0 0;
}
body {
background-color: #F2F4F6;
color: #51545E;
}
p {
color: #51545E;
}
.email-wrapper {
width: 100%;
margin: 0;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #F2F4F6;
}
.email-content {
width: 100%;
margin: 0;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.email-masthead {
padding: 25px 0;
text-align: center;
}
.email-masthead_logo {
width: 94px;
}
.email-masthead_name {
font-size: 16px;
font-weight: bold;
color: #A8AAAF;
text-decoration: none;
text-shadow: 0 1px 0 white;
}
.email-body {
width: 100%;
margin: 0;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.email-body_inner {
width: 570px;
margin: 20px auto;
padding: 0;
-premailer-width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #FFFFFF;
}
.email-footer {
width: 570px;
margin: 0 auto;
padding: 0;
-premailer-width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
text-align: center;
}
.email-footer p {
color: #A8AAAF;
}
.body-action {
width: 100%;
margin: 30px auto;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
text-align: center;
}
.body-sub {
margin-top: 25px;
padding-top: 25px;
border-top: 1px solid #EAEAEC;
}
.content-cell {
padding: 45px;
}
@media only screen and (max-width: 600px) {
.email-body_inner,
.email-footer {
width: 100% !important;
}
}
@media (prefers-color-scheme: dark) {
body,
.email-body,
.email-body_inner,
.email-content,
.email-wrapper,
.email-masthead,
.email-footer {
background-color: #333333 !important;
color: #FFF !important;
}
p,
ul,
ol,
blockquote,
h1,
h2,
h3,
span,
.purchase_item {
color: #FFF !important;
}
.attributes_content,
.discount {
background-color: #222 !important;
}
.email-masthead_name {
text-shadow: none !important;
}
}
:root {
color-scheme: light dark;
supported-color-schemes: light dark;
}
</style>
</head>
<body>
<table class='email-wrapper' width='100%' cellpadding='0' cellspacing='0' role='presentation'>
<tr>
<td align='center'>
<table class='email-content' width='100%' cellpadding='0' cellspacing='0' role='presentation'>
<tr>
<td class='email-body' width='570' cellpadding='0' cellspacing='0'>
<table class='email-body_inner' align='center' width='570' cellpadding='0' cellspacing='0' role='presentation'>
<tr>
<td>
<div style='width: 570px; margin: 0px auto; padding: 20px 30px;'>
<div style='float: left;'>
<img src='https://www.trufflenation.questend.com/images/truffle-nation-logo-1.png' width='120px;'>
</div>
<div style='float: right;'>
<img src='https://www.trufflenation.questend.com/images/bake-better-logo.png' width='100px;'>
</div>
</div>
</td>
</tr>
<tr>
<td class='content-cell'>
<div class='f-fallback'>
<h1>Dear $username!,</h1>
<p>
Thank you for your interest in the program <b> $coursename </b> of the premier baking school of India - Bake Better ! <br>
With a 100% hands on approach and an optimal trainer to student ratio we strive to turn your passion for baking into a career.
</p>
<table class='body-sub' role='presentation'>
<tr>
<td>
<p class='f-fallback'>
Kindly contact our administrator for the registration process.<br>
Best Wishes,
</p>
<p class='f-fallback'>Team Bake Better</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>";
$mail = $function->sendMail2($to=$to,$subject=$subject,$messagebody=$messagebody);
}
}
}
if(isset($_POST['paststudentformbtn']) && !empty($_POST)){
//print_r($_POST); //exit;
$error = "";
$mobileno = !empty($_POST['mobileno'])?trim($_POST['mobileno']):"";
$uemail = !empty($_POST['uemail'])?trim($_POST['uemail']):"";
$pdodb = PDODB::getInstance();
$sqlemail = "SELECT * FROM `tn_student` WHERE `uemail` = '".$uemail."'";
$resultemail = $pdodb->query($sqlemail);
$sqlmobile = "SELECT * FROM `tn_student` WHERE `mobileno` = '".$mobileno."'";
$resultmobile = $pdodb->query($sqlmobile);
if ($resultemail == true) {
$_SESSION['uid'] = $resultemail[0]['id'];
header("Location: existsstudent.php");
}elseif ($resultmobile == true) {
$_SESSION['uid'] = $resultmobile[0]['id'];
header("Location: existsstudent.php");
}else {
$error = 'Not Match';
//exit();
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/css/bootstrap-select.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
<title>Site Visit Form</title>
<style type="text/css">
.hide {
display: none;
}
.col-form-label span { color: red; }
@font-face {
font-family: 'GothamMedium';
src: url('fonts/Gotham-Medium.woff') format('woff'), url('fonts/Gotham-Medium.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body{ font-family: 'GothamMedium'; font-size: 20px; }
/*#grad {
background-image: linear-gradient(#eec5eb, #bde7fb, #e4e9ce);
}*/
.borders {
position: relative;
border: 4px solid #000;
}
.borders:before {
content: " ";
position: absolute;
z-index: 0;
top: 3px;
left: 3px;
right: 3px;
bottom: 3px;
border: 1px solid #000;
}
.btnsubmit{
padding: 10px 40px;
border-radius: 30px !important;
color: #ffffff;
background-color: #ed1c24;
font-size: 18px;
font-weight: 400;
margin-top: 15px;
}
.error{color: red;}
.subtext {
display: block;
font-size: 60%;
color: #6c757d;
}
.main-box {
padding: 0px;
margin-top: 50px;
margin-bottom: 50px;
}
.form-box {
padding: 2rem 4rem!important;
margin: 1rem!important;
}
@media only screen and (max-width: 480px) {
.main-box {
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
.form-box {
padding: 1rem!important;
margin: 1rem!important;
}
}
@media only screen and (max-width: 780px) {
.form-box {
padding: 2rem!important;
margin: 1rem!important;
}
}
@media only screen and (max-width: 992px) {
.form-box {
padding: 3rem!important;
margin: 1rem!important;
}
}
</style>
</head>
<body id="grad">
<div class="container">
<div class="row justify-content-md-center">
<div class="col col-lg-10 borders bg-white main-box">
<div class='row' style="padding: 5% 5% 0% 5%;">
<div class='col-lg-6'>
<img src='../images/truffle-nation-logo-1.png' width='100px;'>
<h3 style='font-size: 22px; font-style: italic; color: #000;'>Bake Better Network LLP.</h3>
<p style='font-size: 18px; color: #000;'>(Truffle Nation)</p>
</div>
<div class='col-lg-6' style='text-align: right;'>
<img src='../images/bake-better-logo.png' width='100px;'>
<p class='marginright'>
133-A, First Floor, Lane No. 1,<br>
Western Marg, Saidulajab,<br>
Back side Saket Metro Station,<br>
New Delhi - 110030 <br>
Tel.: 08700939817
</p>
</div>
</div>
<div class="row justify-content-md-center form-box">
<div class="col-sm-12">
<h3 style="text-align:center;"> <u>Student Registration Form </u></h3>
<div class="form-group row">
<label class="col-sm-6 col-form-label">Whether current or past student</label>
<div class="col-sm-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="currentPastStudent" value="No" onclick="show1();">
<label class="form-check-label">No</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="currentPastStudent" value="Yes" onclick="show2();">
<label class="form-check-label">Yes</label>
</div>
</div>
</div>
<?php if (!empty($error_msg)) { ?>
<div class="alert alert-success" role="alert" id="msgdiv">
<button type="button" class="close" data-dismiss="alert">x</button>
<?=$error_msg;?>
</div>
<?php } if (!empty($error)) { ?>
<div class="alert alert-danger" role="alert" id="msgdiv">
<button type="button" class="close" data-dismiss="alert">x</button>
<?=$error;?>
</div>
<?php } ?>
<div class="hide" id="div1">
<form class="font-weight-bold" method="POST" action="" id="salesLead" enctype="multipart/form-data">
<div class="form-group row">
<div class="col-sm-9"></div>
<div class="col-sm-3">
<div class="img-preview img-preview-sm text-right">
<img alt="Image Display Here" id="test" src="../images/passportsize.jpg" style="min-width: 0px !important; min-height: 0px !important; max-width: none !important; max-height: none !important; width: 150px;">
</div>
<input type="file" id="passportPhoto" class="form-control border-0" onchange="readURL(this);" name="passportPhoto">
<!-- <span style="font-size: 14px;">Image Dimensions 3.5 x 4.5 CM</span> -->
</div>
</div>
<div class="form-group row">
<label for="Centre" class="col-sm-4 col-form-label">Centre <span>*</span> </label>
<div class="col-sm-8">
<select id="centrename" name="centrename" class="selectpicker form-control" data-live-search="true" required>
<option value="">Choose Centre</option>
<option value="DELHI">DELHI</option>
<option value="NOIDA">NOIDA</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="username" class="col-sm-4 col-form-label">Name <span>*</span> </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="username" name="username">
</div>
</div>
<div class="form-group row">
<label for="mobileno" class="col-sm-4 col-form-label">Mobile Number <span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="mobileno" name="mobileno">
</div>
</div>
<div class="form-group row">
<label for="uemail" class="col-sm-4 col-form-label">E-mail ID <span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="uemail" name="uemail" value="">
</div>
</div>
<div class="form-group row">
<label for="dob" class="col-sm-4 col-form-label">Date of Birth <span>*</span></label>
<div class="col-sm-8">
<input class="form-control" id="dob" name="dob" type="date">
</div>
</div>
<div class="form-group row">
<label for="studentAddress" class="col-sm-4 col-form-label">Student Address <span>*</span></label>
<div class="col-sm-8">
<textarea name="studentAddress" id="studentAddress" class="form-control" rows="3"></textarea>
</div>
</div>
<div class="form-group row">
<label for="state" class="col-sm-4 col-form-label">Select States <span>*</span></label>
<div class="col-sm-8">
<select name="state" id="state" class="form-control">
<option value="">Choose...</option>
<?php for($i=0;$i<count($stateListdata);$i++){ ?>
<option value="<?=$stateListdata[$i]['id'];?>"><?=$stateListdata[$i]['state'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group row">
<label for="courseName" class="col-sm-4 col-form-label">Select Course <span>*</span></label>
<div class="col-sm-8">
<select id="courseName" name="courseName[]" class="selectpicker form-control" multiple data-live-search="true" required>
<option value="">Choose...</option>
<?php foreach ($coursedata as $key => $value) { ?>
<option value="<?=$value['id'];?>" data-cprice="<?=$value['coursePrice'];?>"><?=$value['courseName'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group row">
<label for="coursePrice" class="col-sm-4 col-form-label">Course Fees (Excl. GST)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="coursePrice" name="coursePrice" disabled>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">Do you need GST invoice?</label>
<div class="col-sm-8">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" checked name="gstinvoice" value="no" onclick="gst1();">
<label class="form-check-label">No</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gstinvoice" value="yes" onclick="gst2();">
<label class="form-check-label">Yes</label>
</div>
</div>
</div>
<div class="hide" id="gstdiv">
<div class="form-group row">
<label for="gstNo" class="col-sm-4 col-form-label">GST Number<span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="gstNo" name="gstNo">
</div>
</div>
<div class="form-group row">
<label for="companyName" class="col-sm-4 col-form-label">Company Name<span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="companyName" name="companyName">
</div>
</div>
<div class="form-group row">
<label for="companyAddress" class="col-sm-4 col-form-label">Company Address<span>*</span></label>
<div class="col-sm-8">
<textarea name="companyAddress" id="companyAddress" class="form-control" rows="3"></textarea>
</div>
</div>
<div class="form-group row">
<label for="courseName" class="col-sm-4 col-form-label">Company States <span>*</span></label>
<div class="col-sm-8">
<select name="companyState" id="companyState" class="form-control">
<option value="">Choose...</option>
<?php for($i=0;$i<count($stateListdata);$i++){ ?>
<option value="<?=$stateListdata[$i]['id'];?>"><?=$stateListdata[$i]['state'];?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="form-group row">
<label for="healthIssue" class="col-sm-4 col-form-label">Any health issue / Allergies <span>*</span></label>
<div class="col-sm-8">
<textarea name="healthIssue" id="healthIssue" class="form-control" rows="3"></textarea>
</div>
</div>
<div class="form-group row">
<label for="emergencyPhoneNo" class="col-sm-4 col-form-label">Emergency Phone no <span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="emergencyPhoneNo" name="emergencyPhoneNo">
</div>
</div>
<div class="form-group row">
<label for="relationWith" class="col-sm-4 col-form-label">Relation with above <span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="relationWith" name="relationWith">
</div>
</div>
<div class="form-group row hide">
<label class="col-sm-4 col-form-label">Leaves option <span>*</span></label>
<div class="col-sm-8">
<textarea name="leavesOption" id="leavesOption" class="form-control" rows="3"></textarea>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">Do you want internship?</label>
<div class="col-sm-8">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" checked name="internship" value="no">
<label class="form-check-label">No</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="internship" value="yes">
<label class="form-check-label">Yes</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">Address Proof <span>*</span></label>
<div class="col-sm-8">
<input type="file" class="form-control" name="addressProof" id="addressProof">
</div>
</div>
<div class="form-group row form-check">
<div class="col-sm-12" style="font-size: 16px; font-weight: 100">
<input type="checkbox" class="form-check-input" name="termscondition" id="termscondition">
<label class="form-check-label" for="exampleCheck1">By checking this box I certify that I have read the <a href="terms-&-conditions.php" target="_blank">Terms & Conditions & Rules & Regulations</a> of Truffle Nation Academy and Bake Better LLP with respect to the course I have opted to register for hereinabove and also the indemnity form and affidavits regarding my admission into the aforementioned course and I hereby agree to the Terms & Conditions, Rules & Regulations of Truffle Nation Academy and Bake Better LLP and also sign the indemnity form and affidavits related thereto. No separate signatures are required.</label>
</div>
</div>
<center>
<div class="col-sm-6">
<button type="submit" name="visitformbtn" id="visitformbtn" class="btnsubmit mb-5">SUBMIT</button>
</div>
</center>
</form>
</div>
<div class="hide" id="div2">
<form class="font-weight-bold" method="POST" action="" id="pastStudentfrm">
<?php if (!empty($error_msg)) { ?>
<div class="alert alert-success" role="alert" id="msgdiv">
<button type="button" class="close" data-dismiss="alert">x</button>
<?=$error_msg;?>
</div>
<?php } if (!empty($error)) { ?>
<div class="alert alert-danger" role="alert" id="msgdiv">
<button type="button" class="close" data-dismiss="alert">x</button>
<?=$error;?>
</div>
<?php } ?>
<div class="form-group row">
<label for="mobileno" class="col-sm-4 col-form-label">Mobile Number <span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="mobileno" name="mobileno">
</div>
</div>
<div class="form-group row">
<label for="uemail" class="col-sm-4 col-form-label">E-mail ID <span>*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" id="uemail" name="uemail" value="">
</div>
</div>
<center>
<div class="col-sm-6">
<button type="submit" name="paststudentformbtn" id="paststudentformbtn" class="btnsubmit mb-5" >SUBMIT</button>
</div>
</center>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<!-- <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> -->
<script src="../admin/js/jquery.form-validator.min.js"></script>
<script type="text/javascript">
$("#pastStudentfrm").validate({
rules: {
username: {
required: true
},
mobileno: {
required: true,
minlength: 10,
maxlength: 10,
//number: true
digits: true
},
uemail: {
required: true,
email: true,
},
dob: {
required: true,
},
studentAddress: {
required: true,
},
state: {
required: true,
},
courseName: {
required: true,
},
healthIssue: {
required: true,
},
emergencyPhoneNo: {
required: true,
minlength: 10,
maxlength: 10,
digits: true
},
relationWith: {
required: true,
},
whichCourse: {
required: true,
},
gstNo: {
required: true,
minlength: 14,
maxlength: 15
},
companyName: {
required: true,
},
companyAddress: {
required: true,
},
companyState: {
required: true,
},
passportPhoto: {
required: true,
},
addressProof: {
required: true,
},
leavesOption: {
required: true,
},
termscondition: {
required: true,
},
centrename: {
required: true,
}
},
messages: {
username: {
required: "Please enter your name"
},
mobileno: {
required: "Please enter mobile No",
minlength: "Mobile No Must Contain at least 10 digit",
maxlength: "Mobile No Must Not Exceed 10 digit",
digits: "Please enter only digit"
},
uemail: {
required: "Please enter email",
email: "Please enter valid email"
},
dob: {
required: "Please enter Date of Birth"
},
studentAddress: {
required: "Please enter your Address"
},
state: {
required: "Please select state name"
},
courseName: {
required: "Please select Course"
},
healthIssue: {
required: "Please enter any health issue / Allergies"
},
emergencyPhoneNo: {
required: "Please enter Emergency Phone",
minlength: "Mobile No Must Contain at least 10 digit",
maxlength: "Mobile No Must Not Exceed 10 digit",
digits: "Please enter only digit"
},
relationWith: {
required: "Please enter Relation with above"
},
whichCourse: {
required: "Please select"
},
gstNo: {
required: "Please enter GST number",
minlength: "GST No Must Contain at least 14 digit",
maxlength: "GST No Must Not Exceed 15 digit"
},
companyName: {
required: "Please enter Company Name"
},
companyAddress: {
required: "Please enter Company Address"
},
companyState: {
required: "Please select state name"
},
passportPhoto: {
required: "Please select Passport Photo"
},
addressProof: {
required: "Please upload Address Proof"
},
leavesOption: {
required: "Please enter"
},
termscondition: {
required: "Please check the box to confirm having read and agreeing to abide by the Terms & Conditions and Rules & Regulations"
},
centrename: {
required: "Please select Branch "
}
},
submitHandler: function(form) {
form.submit();
}
});
$("#salesLead").validate({
rules: {
username: {
required: true
},
mobileno: {
required: true,
minlength: 10,
maxlength: 10,
//number: true
digits: true
},
uemail: {
required: true,
email: true,
},
dob: {
required: true,
},
studentAddress: {
required: true,
},
state: {
required: true,
},
courseName: {
required: true,
},
healthIssue: {
required: true,
},
emergencyPhoneNo: {
required: true,
minlength: 10,
maxlength: 10,
digits: true
},
relationWith: {
required: true,
},
whichCourse: {
required: true,
},
gstNo: {
required: true,
minlength: 14,
maxlength: 15
},
companyName: {
required: true,
},
companyAddress: {
required: true,
},
companyState: {
required: true,
},
passportPhoto: {
required: true,
},
addressProof: {
required: true,
},
leavesOption: {
required: true,
},
termscondition: {
required: true,
}
},
messages: {
username: {
required: "Please enter your name"
},
mobileno: {
required: "Please enter mobile No",
minlength: "Mobile No Must Contain at least 10 digit",
maxlength: "Mobile No Must Not Exceed 10 digit",
digits: "Please enter only digit"
},
uemail: {
required: "Please enter email",
email: "Please enter valid email"
},
dob: {
required: "Please enter Date of Birth"
},
studentAddress: {
required: "Please enter your Address"
},
state: {
required: "Please select state name"
},
courseName: {
required: "Please select Course"
},
healthIssue: {
required: "Please enter any health issue / Allergies"
},
emergencyPhoneNo: {
required: "Please enter Emergency Phone",
minlength: "Mobile No Must Contain at least 10 digit",
maxlength: "Mobile No Must Not Exceed 10 digit",
digits: "Please enter only digit"
},
relationWith: {
required: "Please enter Relation with above"
},
whichCourse: {
required: "Please select"
},
gstNo: {
required: "Please enter GST number",
minlength: "GST No Must Contain at least 14 digit",
maxlength: "GST No Must Not Exceed 15 digit"
},
companyName: {
required: "Please enter Company Name"
},
companyAddress: {
required: "Please enter Company Address"
},
companyState: {
required: "Please select state name"
},
passportPhoto: {
required: "Please select Passport Photo"
},
addressProof: {
required: "Please upload Address Proof"
},
leavesOption: {
required: "Please enter"
},
termscondition: {
required: "Please check the box to confirm having read and agreeing to abide by the Terms & Conditions and Rules & Regulations"
}
},
submitHandler: function(form) {
$(form).find('button[type="submit"]').prop('disabled', true);
$(form).find('button[type="submit"]').text('Please wait..', true);
form.submit();
}
});
</script>
<script>
$('#courseName').on('change', function() {
var totalPrice = 0;
$('#courseName option:selected').each(function() {
totalPrice += parseInt($(this).data('cprice'));
});
$("#coursePrice").val(totalPrice);
});
</script>
<script type="text/javascript">
function gst1(){
document.getElementById("gstdiv").classList.add('hide');
document.getElementById("gstdiv").classList.remove('show');
//document.getElementById('gstdiv').style.display ='none';
}
function gst2(){
document.getElementById("gstdiv").classList.add('show');
document.getElementById("gstdiv").classList.remove('hide');
//document.getElementById('gstdiv').style.display = 'block';
}
</script>
<script type="text/javascript">
function show1(){
document.getElementById("div2").classList.remove('show');
document.getElementById("div2").classList.add('hide');
document.getElementById("div1").classList.remove('hide');
document.getElementById("div1").classList.add('show');
}
function show2(){
document.getElementById("div1").classList.remove('show');
document.getElementById("div1").classList.add('hide');
document.getElementById("div2").classList.remove('hide');
document.getElementById("div2").classList.add('show');
//document.getElementById('div1').style.display = 'block';
}
</script>
<script type="text/javascript">
setTimeout(function () {
document.getElementById("msgdiv").classList.add('hide');
}, 9000);
</script>
<script type="text/javascript">
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#test').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
};
</script>
<script>
$('select').selectpicker();
</script>
</body>
</html>


PK 99