晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
| DIR:/home/bolconlineco/public_html/coordinator/ |
| Current File : //home/bolconlineco/public_html/coordinator/registerstudent_1.php |
<?php
ob_start();
session_start();
?>
<?php //include('includes/header.php'); ?>
<?php include('../includes/connection/func.inc.php');
if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
{
header("location:../index.php");
exit();
}
?>
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Brentwood</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
<link href="../assets/plugins/gritter/css/jquery.gritter.css" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/fullcalendar/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/jqvmap/jqvmap/jqvmap.css" rel="stylesheet" type="text/css"/>
<link href="../assets/plugins/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css"/>
<!-- END PAGE LEVEL PLUGIN STYLES -->
<!-- BEGIN THEME STYLES -->
<link href="../assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
<link href="../assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="../assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
<link href="../assets/css/plugins.css" rel="stylesheet" type="text/css"/>
<link href="../assets/css/pages/tasks.css" rel="stylesheet" type="text/css"/>
<link href="../assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="../assets/css/print.css" rel="stylesheet" type="text/css" media="print"/>
<link href="../assets/css/custom.css" rel="stylesheet" type="text/css"/>
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<?php
$co=$_SESSION['coordinator'];
$r=mysql_query("select * from programe_co where email='$co'");
$rr=mysql_fetch_array($r);
$t=$rr['title'];
$n=$rr['name'];
$fullname=$n.' '.$rr['fathername']; ?>
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<div class="header navbar navbar-fixed-top">
<!-- BEGIN TOP NAVIGATION BAR -->
<div class="header-inner">
<!-- BEGIN LOGO -->
<a class="navbar-brand" href="dashboard.php" class="logo_admin">
<span class="logo_first" style="color: #fff;">BRENTWOOD</span>
</a>
<!-- END LOGO -->
<!-- BEGIN RESPONSIVE MENU TOGGLER -->
<a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<img src="../assets/img/menu-toggler.png" alt=""/>
</a>
<ul class="nav navbar-nav pull-right">
<li class="dropdown user">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-Hover="dropdown" data-close-others="true">
<i class="fa fa-angle-down"></i>
</a>
<ul class="dropdown-menu">
<li>
<a href="javascript:;" id="trigger_fullscreen">
<i class="fa fa-arrows"></i> Full Screen
</a>
</li>
<li>
<a href="logout.php">
<i class="fa fa-key"></i> Log Out
</a>
</li>
</ul>
</li>
</ul>
<!-- END RESPONSIVE MENU TOGGLER -->
</div>
<!-- END TOP NAVIGATION BAR -->
</div>
<!-- END HEADER -->
<div class="clearfix">
</div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<?php include ("includes/sidebar.php"); ?>
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<div class="page-content">
<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
<!-- BEGIN STYLE CUSTOMIZER -->
<!-- END STYLE CUSTOMIZER -->
<!-- BEGIN DASHBOARD STATS -->
<!-- END DASHBOARD STATS -->
<div class="clearfix">
<div class="row" id="con_id">
<div class="col-md-12">
<h3 class="page-title">Student Registration Form</h3>
<ul class="page-breadcrumb breadcrumb">
<li><i class="fa fa-home"></i> <a href="dashbord.php"> Home </a> <i class="fa fa-angle-right"></i> </li>
<li class="active">Student Registration Form </li>
</ul>
<?php
if(isset($_GET['msg'])){
echo "<div class='alert alert-success'>".$_GET['msg']."</div>";
echo "<br>";
}else if(isset($_GET['error']))
{
echo "<div class='alert alert-success'>This Email is already Registered</div>";
}
?><?php
if(isset($_POST['add-student']))
{
$studentId = sql_strip($_POST['studentId']);
$title = !empty($_POST['titles'])?$_POST['titles']:$_POST['title'];
if($title==3)
{
$title=sql_strip($_POST['title']);
}
$fname =mysql_real_escape_string($_POST['fname']);
$lname = mysql_real_escape_string($_POST['lname']);
if(!empty($_POST['registrationdate']))
{
$reg=sql_strip($_POST['registrationdate']);
$d=explode('/',$reg);
$registrationdate= $_POST['registrationdate'];
//$registrationdate=$d[2].'-'.$d[0].'-'.$d[1];
// exit();
} else {
$registrationdate=date('Y-m-d');
}
//$registrationdate = !empty($_POST['registrationdate'])?date('Y-m-d',strtotime($_POST['registrationdate'])):date('Y-m-d') ;
/*$dob1 = $_POST['dob'];
$d=explode('/',$dob1);
$dob=$d[2].'-'.$d[1].'-'.$d[0];*/
$day=$_POST['day'];
$month=$_POST['month'];
$year=$_POST['year'];
$dob=$year.'-'.$month.'-'.$day;
$phone = sql_strip($_POST['phone']);
$mobile = sql_strip($_POST['mobile']);
$admission_source = sql_strip($_POST['admission_source']);
$email = mysql_real_escape_string($_POST['email']);
$address1 = sql_strip($_POST['address1']);
$address2 = sql_strip($_POST['address2']);
$address3 = sql_strip($_POST['address3']);
$city = sql_strip($_POST['city']);
$country = sql_strip($_POST['country']);
$postcode=sql_strip($_POST['postcode']);
$education = sql_strip($_POST['education']);
$jobtitle=sql_strip($_POST['jobtitle']);
$companyname=sql_strip($_POST['companyname']);
$addressline1=sql_strip($_POST['addressline1']);
$addressline2=sql_strip($_POST['addressline2']);
$addressline3=sql_strip($_POST['addressline3']);
$ecity=sql_strip($_POST['ecity']);
$epostcode=sql_strip($_POST['epostcode']);
$ecountry=sql_strip($_POST['ecountry']);
//$category=sql_strip($_POST['category']);
$course=sql_strip($_POST['course']);
$tutor=sql_strip($_POST['tutor']);
$note=sql_strip($_POST['note']);
$pass = sql_strip($_POST['pass']);
$stage = sql_strip($_POST['stage']);
// $rollno=mt_rand(1111,9999);
$StudentQuery="select SId from student where rollno='$studentId'";
$StudentQueryResult=mysql_query($StudentQuery) or die(mysql_error());
if(mysql_num_rows($StudentQueryResult) > 0)
{
$msg="This Student Id is already in system";
header("location:registerstudent_1.php?msg=$msg");
exit();
}else
{
$sql="select SId from student where email='$email'";
$result=mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($result) > 0 )
{
header("location:registerstudent_1.php?error");
exit();
}
$sql1="select tutorId from tutor where email='$email'";
$rr=mysql_query($sql1) or die(mysql_error());
if(mysql_num_rows($rr) > 0)
{
header("location:registerstudent_1.php?error");
exit();
}
$sq="select PCId from programe_co where email='$email'";
$rr=mysql_query($sq) or die(mysql_error());
if(mysql_num_rows($rr) >0)
{
header("location:registerstudent_1.php?error");
exit();
}
else{
if(add_student($title, $studentId,$fname,$lname,$registrationdate,$dob,$phone,$mobile,$email,$address1,$address2,$address3,$city,$country,$postcode,$education,$jobtitle,$companyname,$addressline1,$addressline2,$addressline3,$ecity,$epostcode,$ecountry, $admission_source, $stage))
{
$q="insert into studentnote(note, edittime, rollno, role, name) values ('$note',now(),'$studentId',2,'$fullname')";
$result=mysql_query($q) or die(mysql_error());
$query="insert into assigncourse (rollno, courseid, tutorId, CourseStatus) values ('$studentId','$course','$tutor',0)";
$result=mysql_query($query) or die(mysql_error());
$rand=mt_rand(112325,999990);
// $pass="ABCD".$rand;
if(add_tutor_info($email,$pass,4))
{
$headers="";
$str="";
// $to="sohail@solutionica.com";
//$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
//$headers .= "X-Priority: 1\n";
//$headers .= "X-MSmail-Priority: High\n";
//$headers .= "X-mailer: My mailer\n";
$headers .= 'From:admissions@bolc.co.uk' . "\r\n";
$subject="Welcome To BOLC";
/*
$str .= "<p>Your Account has been created:</p>";
$str .= "<p>User name:<b> " . $email . " </b></p>";
$str .= "<p>PassWord:<b> " . $pass . " </b></p>";
*/
$str.='<div id="mail" style="width:600px; padding-right:5px; font-family:Arial, Gadget, sans-serif; font-size:12px; margin:0 auto;">';
$str.='<div style="font-weight:bold; margin-bottom:8px; font-size:16px;">Dear Student</div>';
$str.='<div id="second" style="font-weight:500; margin-bottom:8px; font-style:normal; font-variant:normal;">Thank you for choosing BOLC. We welcome you to the BOLC student community
and hope you will enjoy your course with us.</div>';
$str.='<div id="third" style="font-weight:500; margin-bottom:8px;">The course has been written in easy to understand language especially for home study. The first thing you need to do is, please read the study guide carefully before starting on the course. Apart from explaining study procedure at BOLC, this study guide gives you a clear guidance about preparing assignments as well. Tutor\'s help will be available to you through email whenever you needed.
</div>';
$str.='<div id="log" style="margin-bottom:8px;">Please find your log in details below:</div>';
$str.='<div style="font-weight:500; margin-bottom:8px; color:#096;"><a href="http://bolconline.co.uk/" style="color:#03F; font-size:14px;">bolconline.co.uk</a></div>
<div style="font-weight:500; margin-bottom:8px;">
<p><span style="font-weight:bold;">User Name: </span>'. $email.'</p>
<p><span style="font-weight:bold;">Password : </span>'.$pass.'</p>
</div>';
$str.='<div style="font-weight:500; margin-bottom:10px;">
<span style="font-weight:bold; font-size:20px;">Step 1:<br /><br /></span>
<span style="padding-top:50px;">Log into the system using the details given above.</span>
</div>
<div style="font-weight:500; margin-bottom:8px;">
<span style="font-size:20px; font-weight:bold; padding-bottom:30px;">Step 2:<br /><br /></span>
<span>Once you are logged in to the system first of all download the following guides which you can find under the
heading of <span style="color:red;">support materials:</span></span>
</div>
<div style="font-weight:500; margin-bottom:8px;">
<span style="font-weight:bold; font-size:17px;">1. User Guide:</span> This guide explains step by step procedures of using the system.
</div>
<div style="margin-bottom:10px;"><span style="font-weight:bold; font-size:17px;">2. Study Guide:</span> This guide explains all the procedures for completing and sending the assignments, study
tips, BOLC policies and procedures that the student must be aware of.</div>
<div style="font-weight:500; margin-bottom:8px;">Best Wishes and Good Luck for your Course</div>
<div style="font-weight:500; margin-bottom:8px;">BOLC admin team</div>
<div style="font-weight:500; margin-bottom:8px;">Email: admissions@bolc.co.uk</div>
</div>';
$message="<html><body>".$str."</body></html>";
if(mail($email, $subject, $message, $headers,"-f".$email)) {
$msg="Student Register Successfully";
header("location:registerstudent_1.php?msg=$msg");
exit();
}
}
}
}
}
} ?>
<div class="row clearfix">
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption"> <i class="fa fa-globe"></i>Personal Details</div>
</div>
<div class="portlet-body clearfix">
<div class="col-md-6">
<form id="ID" action="" method="post" class="form-horizontal">
<div class="form-group">
<label for="title" class="col-sm-3 control-label"> Title:</label>
<div class="col-sm-8">
<select name="titles" id="tt" onchange='checkValue(this.value)' class="cstat form-control">
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Mis">Mis</option>
<option value="3">Other</option>
</select>
<input type="text" name="title" value="" id="otther" style="width:160px; display:none;" />
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-3 control-label"> Student Id:</label>
<div class="col-sm-8">
<input class="validate[required] form-control" type="text" id="studentId" name="studentId" value="" onblur="validateId(this.value);" autocomplete="off" required/>
</div>
<div class="col-sm-1">
<div class="idValidation" id="idValidation" style="margin-left: -30px;">
</div>
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-3 control-label">First Name:</label>
<div class="col-sm-8">
<input class="validate[required] form-control" type="text" id="name" name="fname" value="" required/>
</div>
</div>
<div class="form-group">
<label for="fname" class="col-sm-3 control-label">Last name:</label>
<div class="col-sm-8">
<input class="validate[required] form-control" type="text" id="fname" name="lname" value="" required />
</div>
</div>
<div class="form-group">
<label for="fname" class="col-sm-3 control-label">Reg Date:</label>
<div class="col-sm-8">
<input class="form-control" type="date" id="r" name="registrationdate" value="<?php echo date('Y-m-d'); ?>" />
</div>
</div>
<div class="form-group">
<label for="dob" class="col-sm-3 control-label">Date of Birth:</label>
<div class="col-sm-6">
<select name="day" class="cstat">
<option value=""> Day</option>
<?php
for( $d=01; $d<=31; $d++)
{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
}
?>
</select>
<select name="month" class="cstat" style="width:80px;">
<option value=""> Month </option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="year" class="cstat" style="width:76px;">
<option value="">Year</option>
<?php
for($d=date("Y"); $d>=1930; $d--)
{
?>
<option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
<?php
} ?>
</select>
</div>
</div>
<div class="form-group">
<label for="mobile" class="col-sm-3 control-label">Phone:</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="phone" name="phone" value="" />
</div>
</div>
<div class="form-group">
<label for="mobile" class="col-sm-3 control-label">Mobile:</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="mobile" name="mobile" value="" />
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-3 control-label">Email:</label>
<div class="col-sm-8">
<input class="validate[required,custom[email]] form-control" type="email" id="email" name="email" value="" autocomplete="off" required onblur="validateEmail(this.value);"/>
</div>
<div class="col-sm-1">
<div class="emailValidation" id="emailValidation" style="margin-left: -30px;">
</div>
</div>
</div>
<div class="form-group">
<label for="pass" class="col-sm-3 control-label">Password:</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="pass" name="pass" value="" autocomplete="off" required/>
<input type="text" class="form-control" id="show_password" style="display:none;">
</div>
<a href="#" id="pass_tog">Show</a>
</div>
<div class="form-group">
<label for="pass" class="col-sm-3 control-label">Admission Source:</label>
<div class="col-sm-8">
<select class="form-control" type="text" id="admission_source" name="admission_source" required>
<option value="">Select Source</option>
<option value="Reed">Reed</option>
<option value="Groupuae">Groupuae</option>
<option value="Groupuk">Groupuk</option>
<option value="Emagister">Emagister</option>
<option value="Hotcourses">Hotcourses</option>
<option value="Free">Free</option>
<option value="Website">Website</option>
<option value="Ekupon">Ekupon</option>
<option value="Course Deals">Course Deals</option>
<option value="Fave Biz">Fave Biz</option>
<option value="CPD Reed">CPD Reed</option>
<option value="STS Reed">STS Reed</option>
<option value="Gulf Talent">Gulf Talent</option>
<option value="Course Deals">Course Deals</option>
<option value="Living Social">Living Social</option>
<option value="Laimoon">Laimoon</option>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group clearfix">
<label for="address" class="col-sm-4 control-label">Address line 1:</label>
<div class="col-sm-8">
<input type="text" id="address" value="" class="form-control" name="address1" />
</div>
</div>
<div class="form-group clearfix">
<label for="address" class="col-sm-4 control-label">Address line 2:</label>
<div class="col-sm-8">
<input type="text" id="address" value="" class="form-control" name="address2" />
</div>
</div>
<div class="form-group clearfix">
<label for="address" class="col-sm-4 control-label">Address line 3:</label>
<div class="col-sm-8">
<input type="text" id="address" value="" class="form-control" name="address3" />
</div>
</div>
<div class="form-group clearfix">
<label for="city" class="col-sm-4 control-label">City:</label>
<div class="col-sm-8">
<input type="text" id="city" value="" class="form-control" name="city" />
</div>
</div>
<div class="form-group clearfix">
<label for="country" class="col-sm-4 control-label">Country:</label>
<div class="col-sm-8">
<select name="country" class="cstat form-control">
<option value="">-- SELECT --</option>
<?php
$q="select * from country order by name";
$r=mysql_query($q) or die(mysql_error());
while($row=mysql_fetch_array($r)) { ?>
<option value="<?php echo $row['name'];?>"><?php echo $row['name'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group clearfix">
<label for="country" class="col-sm-4 control-label">Post Code:</label>
<div class="col-sm-8">
<input type="text" id="country" name="postcode" class="form-control" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="education" class="col-sm-4 control-label">Education:</label>
<div class="col-sm-8">
<textarea name="education" rows="7" cols="28" class="form-control"></textarea>
</div>
</div>
<div class="form-group clearfix">
<label for="ecountry" class="col-sm-4 control-label">Stage:</label>
<div class="col-sm-8">
<select name="stage" class="cstat form-control">
<option value="">-- SELECT --</option>
<?php
$q="select * from stages order by id asc";
$r=mysql_query($q) or die(mysql_error());
while($row=mysql_fetch_array($r))
{
?>
<option value="<?php echo $row['id'];?>"><?php echo $row['title'];?></option>
<?php
}
?>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption"> <i class="fa fa-globe"></i>Employment Details</div>
</div>
<div class="portlet-body clearfix">
<div class="form-group clearfix">
<label for="title" class="col-sm-2 control-label">Job Title:</label>
<div class="col-sm-6">
<input type="text" name="jobtitle" class="form-control"/>
</div>
</div>
<div class="form-group clearfix">
<label for="companyname" class="col-sm-2 control-label">Company Name:</label>
<div class="col-sm-6">
<input type="text" id="companyname" name="companyname" value="" class="form-control" />
</div>
</div>
<div class="form-group clearfix">
<label for="addressline1" class="col-sm-2 control-label">Address line 2:</label>
<div class="col-sm-6">
<input class="form-control" type="text" id="addressline1" name="addressline1" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="addressline2" class="col-sm-2 control-label">Address line 2:</label>
<div class="col-sm-6">
<input class="form-control" type="text" id="addressline2" name="addressline2" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="addressline3" class="col-sm-2 control-label">Address line 3:</label>
<div class="col-sm-6">
<input class="form-control" type="text" id="" name="addressline3" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="ecity" class="col-sm-2 control-label">City:</label>
<div class="col-sm-6">
<input class="form-control" type="text" id="ecity" name="ecity" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="epostcode" class="col-sm-2 control-label">PostCode:</label>
<div class="col-sm-6">
<input class="form-control" type="text" id="epostcode" name="epostcode" value="" />
</div>
</div>
<div class="form-group clearfix">
<label for="ecountry" class="col-sm-2 control-label">Country:</label>
<div class="col-sm-6">
<select name="ecountry" class="cstat form-control">
<option value="">-- SELECT --</option>
<?php
$q="select * from country order by name";
$r=mysql_query($q) or die(mysql_error());
while($row=mysql_fetch_array($r))
{
?>
<option value="<?php echo $row['name'];?>"><?php echo $row['name'];?></option>
<?php
}
?>
</select>
</div>
</div>
</div>
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption"> <i class="fa fa-globe"></i>Course Details</div>
</div>
<div class="portlet-body clearfix">
<div class="form-group clearfix">
<label for="category" class="col-sm-2 control-label">Category:</label>
<div class="col-sm-6">
<select name="category" id="category" class="validate[required] cstat form-control" required>
<option value="">-- SELECT --</option>
<?php
$query="select * from category where CategoryStatus=1";
$result=mysql_query($query) or die(mysql_error());
while($row=mysql_fetch_array($result))
{ ?>
<option value="<?php echo $row['CategoryId'];?>"><?php echo $row['CategoryName'];?></option>
<?php
} ?>
</select>
</div>
</div>
<div class="form-group clearfix">
<label for="course" class="col-sm-2 control-label">Course:</label>
<div class="col-sm-6">
<select name="course" id="course" disabled="disabled" class="validate[required] cstat form-control" required>
<option value="">--SELECT --</option>
</select>
</div>
</div>
<div class="form-group clearfix">
<label for="tutor" class="col-sm-2 control-label">Tutor:</label>
<div class="col-sm-6">
<select name="tutor" id="tutor" disabled="disabled" class="validate[required] cstat form-control" required>
<option value="">-- SELECT --</option>
</select>
</div>
</div>
<div class="form-group clearfix">
<label for="note" class="col-sm-2 control-label">Note:</label>
<div class="col-sm-6">
<textarea name="note" cols="28" rows="5" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-6 col-sm-offset-2">
<!--<input class="Add2" type="reset" value="Clear" style="margin-right:10px;" />-->
<input class="add2 btn btn-success" type="submit" name="add-student" value="Register"/>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- end content -->
</div><!-- end wrapper -->
<?php include('../includes/footer.php');?>
<script language="javascript">
jQuery("document").ready(function($){
var tutor=$('#tutor');
$("#course").change(function(){
var courseid=$(this).val();
$.post('tutorbycourse.php',{id:courseid},function(data){
tutor.html(data);
tutor.removeAttr('disabled');
});
});
});
</script>
<script language="javascript">
jQuery("document").ready(function($){
var course=$('#course');
$("#category").change(function(){
var categoryId=$(this).val();
$.post('get_courses.php',{id:categoryId},function(data){
course.html(data);
course.removeAttr('disabled');
});
});
});
</script>
<script language="javascript">
jQuery("document").ready(function($){
$('#pass').get(0).type = 'password';
$("#showpass").bind('click',function(){
if($("#showpass").prop('checked') == true)
{
$('#pass').get(0).type = 'text';
}
else
{
$('#pass').get(0).type = 'password';
}
});
})
</script>
<script>
//student id validation from database and also change password value.
function validateId(val)
{
$.ajax({
type:'POST',
url:"ajax/validation.php",
data:'stuId='+val,
dataType:"text",
success: function(result){
document.getElementById('idValidation').innerHTML = result;
document.getElementById('pass').value = val;
document.getElementById('show_password').value = val;
}
});
}
//Email validation from database
function validateEmail(val)
{
$.ajax({
type:'POST',
url:"ajax/validation.php",
data:'stuEmail='+val,
dataType:"text",
success: function(result){
document.getElementById('emailValidation').innerHTML = result;
}
});
}
</script> |