File: /home/nyiet8349bzl/Backup/sbc_back/homedir/public_html/livable-cities/dashboard.php
<?php
include("Conf2017admin/conn/db_conn.php");
?>
<?php
if(isset($_POST['submit'])){
$name = $_POST['name'];
$desig = $_POST['desig'];
$affil = mysql_real_escape_string($_POST['affil']);
$addr = mysql_real_escape_string($_POST['addr']);
$emails = mysql_real_escape_string($_POST['email']);
$mobile = mysql_real_escape_string($_POST['mobile']);
$category = mysql_real_escape_string($_POST['category']);
$regist_type = mysql_real_escape_string($_POST['regist_type']);
$reg_theme = mysql_real_escape_string($_POST['theme']);
$reg_title = mysql_real_escape_string($_POST['title']);
$keyw = $_POST['keyword'];
$aun = $_POST['auname'];
$aunames = implode(',', $aun);
$auaff =$_POST['auaffli'];
$auaffili = implode(',', $auaff);
$auema =$_POST['auemail'];
$auemaill = implode(',' , $auema);
$abstract = mysql_real_escape_string($_POST['abstract']);
/*echo "<script>location.href='index.php'</script>";*/
$data=0;
if(!(preg_match("/^[a-zA-Z ]{3,30}$/",$_POST['name']))){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Your Correct Name</strong></div></div></div>";
$data++;
}
if(!(preg_match("/^[a-zA-Z ]{3,30}$/",$_POST['desig']))){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Your Correct Designation</strong></div></div></div>";
$data++;
}
if(!(preg_match("/^[a-zA-Z ]{3,30}$/",$_POST['affil']))){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Your Correct Affiliation</strong></div></div></div>";
$data++;
}
if(!(preg_match("/^[7-9][0-9]{9,9}$/",$_POST['mobile']))){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Your Correct Number</strong></div></div></div>";
$data++;
}
if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Your Correct Email Id</strong></div></div></div>";
$data++;
}
if(($_POST['category'])==""){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Deligate Category</strong></div></div></div>";
$data++;
}
if(($_POST['regist_type'])==""){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Registration Type</strong></div></div></div>";
$data++;
}
if(($_POST['theme'])==""){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Theme of Research Paper</strong></div></div></div>";
$data++;
}
if(($_POST['abstract'])==""){
$error="<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>Please Enter Abstract</strong></div></div></div>";
$data++;
}
else {
if($data=='0'){
$query = mysql_query("insert into tbl_regist(fld_name ,fld_desig,fld_affili,fld_address,fld_email,fld_mobile,fld_category ,fld_type,fld_theme,fld_title,fld_key,fld_auname,fld_auaffil,fld_auemail,fld_abstract,fld_date) values('".$name."','".$desig."','".$affil."','".$addr."','".$emails."','".$mobile."','".$category."','".$regist_type."','".$reg_theme."','".$reg_title."','".$keyw."','".$aunames."','".$auaffili."','".$auemaill."','".$abstract."',CURDATE())") or die(mysql_error());
if($query){
$txt = "SBS_";
$cod = $txt.mt_rand(100,999);
$id = mysql_insert_id();
$code= $txt.mt_rand(100,999).$id;
$query1 = mysql_query("update tbl_regist SET fld_regcode='".$code."' where fld_id='".$id."'");
if($query1){
$to_1 = $emails;
$from = "asha.guppta421@gmail.com";
$subject_1 = "Successfully Registered";
$message_1 = "You Are successfully registered for the International conference";
$headers_1 = 'From: ' . $from . "\r\n";
$headers_1 .= "MIME-Version: 1.0" . "\r\n";
$headers_1 .= "Content-type:text/html;charset=utf-8" . "\r\n";
mail($to_1, $subject_1, $message_1, $headers_1);
/* send to 2nd recipient */
$to_2 = "vicky21kashyap@gmail.com";
$from = "asha.guppta421@gmail.com";
$subject_2 = "Internation Conference Registration ";
$message_2 = "<div style='width:750px; height:300px;'>".
"<div style='float:left; width:170px; height:300px; border:1px solid #399; background:#CCC;'>".
"<div style='width:80px; height:90px; margin:auto; background:#Fff; margin-top:50px; border-radius:10px;'>".
"<div style='width:100%; height:25px; background:#06F; border-top-left-radius:10px; border-top-right-radius:10px;
box-shadow: 5px 5px 5px 2px #666; text-align:center'>".date('M')."</div>".
"<div style='width:100%; height:40px; background:#FFF;box-shadow: 5px 5px 5px 2px #666;text-align:center;
font-size:24px'><b>".date('d')."</b></div>".
"<div style='width:100%; height:25px;background:#FFF; border-top:1px dotted #666666; border-bottom-left-radius:10px;
border-bottom-right-radius:10px; box-shadow: 5px 5px 5px 2px #666;text-align:center'>". date('Y')."</div>
</div>
</div>".
"<div style='float:right; width:566px; height:300px; border:1px solid #399; background:#fff;'>
<div style='width:540px; height:275px; margin:auto; background:#fff; margin-top:10px; border-radius:10px;'>".
"<div style='width:100%; height:33px; background:#06F; border-top-left-radius:10px; border-top-right-radius:10px;
box-shadow: 5px 5px 5px 2px #666; text-align:center;margin-left:10px;color:#fff;font-size:25px;'>". @$subject. "</div>".
"<div style='width:auto; height:240px; background:#FFF;box-shadow: 5px 5px 5px 2px #666;text-align:center;
font-size:14px; border-bottom-left-radius:10px;border-bottom-right-radius:10px; box-shadow: 5px 5px 5px 2px #666;
text-align:center;'>".
"<table border='1' width='100%' cellpadding='3' style='margin-left:10px;'>
<tr>
<td><b>Name</b></td><td><p>". @$name."</p></td>
</tr>
<tr>
<td><b>Email-ID</b></td><td><p>". @$emails."</p></td>
</tr>
<tr>
<td><b>Contact</b></td><td><p>".@$mobile."</p></td>
</tr>
<tr>
<td><b>Designation</b></td><td><p>".@$desig."</p></td>
</tr>
<tr>
<td><b>Affiliation</b></td><td><p>".@$affil."</p></td>
</tr>
<tr>
<td>Theme</td><td>".$reg_theme."</td>
</tr>
</table>".
" </div>".
"</div>".
"</div>".
"</div>";
$headers_2 = 'From: ' . $from . "\r\n";
$headers_2 .= "MIME-Version: 1.0" . "\r\n";
$headers_2 .= "Content-type:text/html;charset=utf-8" . "\r\n";
$a = mail($to_2, $subject_2, $message_2, $headers_2);
if($a){
echo "<script>location.href='index.php'</script>";
$mesg = "<div class='row'><div class='col-md-offset-3 col-md-6 col-md-offset-3'><div class='alert alert-danger alert-dismissible'><a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a><strong>You Are successfully Registered for International Conference</strong></div></div></div>";
}
}
}
}
}
}
?>
<link href="assets/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<!-- CORE CSS TEMPLATE - START -->
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
.err{
color:#FFF;
padding:3px 3px 3px 3px;
background-color:#000;
}
</style>
<!-- START CONTAINER -->
<div class="container">
<div class="col-lg-8">
<section class="well">
<div><?php echo $error;?></div>
<div><?php if(isset($mesg)){echo $mesg;}?></div>
<header class="panel_header">
<h2 class="title pull-left">Registration Form</h2>
</header>
<div class="content-body "><div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<form id="commentForm" method="post" action="index.php" enctype="multipart/form-data">
<div class=" col-md-12 col-sm-12 col-xs-10" style="background: background-size: 100% 100%; ">
<div class='row'><br></div>
<h4 style="font-size:1.1em; color:#781e17; font-weight:bold">Personal Detail</h4><hr style="height:1px;border:none;color:#333;background-color:#333; margin-top:1px;">
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-1"> Name :</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" class="form-control" value="" placeholder="Full Name" name="name" id="txtFullName">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-5">Designation</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" placeholder="Designation" class="form-control" name="desig" id="field-5" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-8">Affiliation</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" placeholder="Affiliation" class="form-control" name="affil" id="field-8" maxlength="500" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-7">Email Address</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="email" placeholder="Email Address" class="form-control" name="email" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-6">Phone Number</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" placeholder="Phone Number" class="form-control" name="mobile" id="field-6" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-2">Address</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" placeholder="Enter Your Address" class="form-control" name="addr" minlength="2" maxlength="500" id="field-2" required>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<label class="form-label" for="field-5">Deligate Category</label>
<span class="desc" id="gen_error"></span>
</div>
</div>
<div class="col-sm-9">
<select class="form-control" name="category" id="title" required="required">
<option value="">Please Select</option>
<option value="Research Scholars/ Participants from University of Delhi">Research Scholars/ Participants from University of Delhi</option>
<option value="Other Delegates">Other Delegates</option>
<option value="Foreign Delegates ">Foreign Delegates </option>
<option value=" Institutional/Corporate Delegates "> Institutional/Corporate Delegates </option>
<option value="Young Scholar">Young Scholar</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="form-label" for="field-5">Registration Type</label>
<span class="desc" id="gen_error"></span>
</div>
</div>
<div class="col-md-9">
<select class="form-control" id="category" name="regist_type" required="required" >
<option value="">Please Select</option>
<option value="Presenting Paper"> Presenting Paper</option>
<option value="Presenting Poster"> Presenting Poster</option>
<option value="Participation"> Participation</option>
<option value="Accompanying person">Accompanying person</option>
</select>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h4 style="font-size:1.1em; color:#781e17; font-weight:bold">Abstract Submission</h4><hr style="height:1px;border:none;color:#333;background-color:#333; margin-top:1px;"></div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="form-label" for="field-5">Theme of Paper</label>
<span class="desc" id="gen_error"></span>
</div>
</div>
<div class="col-md-9">
<select class="form-control" id="category" name="theme" required="required" >
<option value="">Please Select</option>
<option value="Urban Housing, Infrastructure and Urban Governance">Urban Housing, Infrastructure and Urban Governance</option>
<option value="Urban Crime and Safety Issues ( with special focus on Gender in Cities) ">Urban Crime and Safety Issues ( with special focus on Gender in Cities) </option>
<option value="Urban Health and Wellbeing ">Urban Health and Wellbeing </option>
<option value="Sustainable Livelihood, Lifestyle in Cities">Sustainable Livelihood, Lifestyle in Cities</option>
<option value="Smart and Resilient Cities">Smart and Resilient Cities </option>
<option value="Sustainable Urban Tourism ">Sustainable Urban Tourism </option>
<option value="Urban Environment and Urban Waste Management">Urban Environment and Urban Waste Management</option>
<option value="Urban Disaster and Urban Sustainability">Urban Disaster and Urban Sustainability</option>
<option value="Urban Migration and Urban Refuge Issues ">Urban Migration and Urban Refuge Issues </option>
<option value="Urban Landscapes and Green Spaces">Urban Landscapes and Green Spaces</option>
<option value="Gender and Urban Spaces">Gender and Urban Spaces</option>
<option value="Core-Periphery Dynamics">Core-Periphery Dynamics</option>
<option value="Urban Planning and Policy Assessment">Urban Planning and Policy Assessment</option>
<option value="Pollution, Water and Sanitation Issues">Pollution, Water and Sanitation Issues</option>
</select>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-2">Paper Title</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" placeholder="Paper Title" class="form-control" name="title" minlength="2" maxlength="400" id="field-2" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="form-group">
<label class="form-label" for="field-2">keyword</label>
</div>
</div>
<div class="col-lg-9">
<div class="controls">
<input type="text" placeholder="Keyword" class="form-control" name="keyword" minlength="10" maxlength="3000" id="field-2" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h4 style="font-size:1.1em; color:#781e17; font-weight:bold">Author Detail</h4><hr style="height:1px;border:none;color:#333;background-color:#333; margin-top:1px;"></div>
</div>
<div class="row" id="dynamicInput">
<div class="col-lg-12">
<label class="form-label" for="field-2"><u>Author 1:</u></label>
</div>
<div class="col-lg-4">
<div class="form-group">
<label class="form-label" for="field4">Full Name</label>
<div class="controls">
<input type="text" placeholder="Full Name" class="form-control" name="auname[]" minlength="4" maxlength="40" required>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<label class="form-label" for="field-4">Affiliation</label>
<div class="controls">
<input type="text" placeholder="Affiliation" class="form-control" name="auaffli[]" minlength="5" maxlength="40" id="field-4" required>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<label class="form-label" for="field-4">Email Address</label>
<div class="controls">
<input type="text" placeholder="Email Address" class="form-control" name="auemail[]" minlength="5" maxlength="50" id="field-4" required>
</div>
</div>
</div>
</div>
<div class="col-lg-offset-8 col-lg-4">
<input type="button" name="pay" value="Add More" style="margin-left:38%; padding:5px 15px;border-radius:9px; background-color:#36F; color:white;" onClick="addInput('dynamicInput');">
</div>
<div class="row">
<div class="col-lg-12">
<h4 style="font-size:1.1em; color:#781e17; font-weight:bold">Abstract</h4><hr style="height:1px;border:none;color:#333;background-color:#333; margin-top:1px;"></div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label class="form-label" for="field-2">Abstract </label>
<div class="controls">
<textarea type="text" placeholder="Abstract" class="form-control" name="abstract" minlength="3000" maxlength="5000" id="field-2" required></textarea>
</div>
</div>
</div>
</div>
<div class="col-lg-offset-5 col-lg-8 col-md-8 col-sm-12 col-xs-12">
<input type="submit" name="submit" value="Submit" style=" padding:7px 30px;border-radius:9px; background-color:#FC3; color:white; margin-top:10px;margin-bottom:10px;" >
</div>
</div>
</form>
</div>
</div>
</div>
</section>
</div>
<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- LOAD FILES AT PAGE END FOR FASTER LOADING -->
<!-- CORE JS FRAMEWORK - START -->
<script src="assets/js/jquery-1.11.2.min.js" type="text/javascript"></script>
<script src="assets/js/jquery.easing.min.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/js/viewportchecker.js" type="text/javascript"></script>
<!-- CORE JS FRAMEWORK - END -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - START -->
<script src="assets/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="assets/js/jquery.bootstrap.wizard.min.js" type="text/javascript"></script> <script src="assets/js/form-validation.js" type="text/javascript"></script> <!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - END -->
<!-- CORE TEMPLATE JS - START -->
<script src="assets/js/scripts.js" type="text/javascript"></script>
<!-- END CORE TEMPLATE JS - END -->
<script>
var counter = 1;
var limit = 5;
function addInput(divName){
if (counter == limit) {
alert("Only 5 Authors are allowed");
}
else {
var newdiv = document.createElement('div');
newdiv.innerHTML = '<div class="row" id="dynamicInput" style="margin-left:7px;"><div class="col-lg-12"><label class="form-label" for="field-2"><u>Author'+ (counter + 1) +':</u></label></div><div class="col-lg-4"><div class="form-group"><label class="form-label" for="field4">Full Name</label><div class="controls"><input type="text" placeholder="Full Name" class="form-control" name="auname[]" id="auna" minlength="4" maxlength="40" required></div></div></div><div class="col-lg-4"><div class="form-group"><label class="form-label" for="field4">Affiliation</label><div class="controls"><input type="text" placeholder="Affiliation" class="form-control" name="auaffli[]" minlength="5" maxlength="40" required></div></div></div><div class="col-lg-4"><div class="form-group"><label class="form-label" for="field4">Email Address</label><div class="controls"><input type="text" placeholder="Email Address" class="form-control" name="auemail[]" id="city" minlength="4" maxlength="40" required></div></div></div></div>';
document.getElementById(divName).appendChild(newdiv);
counter++;
}
}
</script>