Complete Project Coding: Sourabh Gupta 29 0700115049
Complete Project Coding: Sourabh Gupta 29 0700115049
Complete Project Coding: Sourabh Gupta 29 0700115049
<?php
session_start();
?>
<!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=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
a:link {color:#FF0000; text-decoration:none}
a:visited {color:#999900; text-decoration:none;}
a:hover {color: #FFFFFF; text-decoration:none;}
a:active {color:#0000FF; text-decoration:none;}
<!--
.style4 {
color: #fff;
font-size: 16px;
text-transform:uppercase;
font-family:Arial, Helvetica, sans-serif;
text-decoration:none;
Coding:
<?php
mysql_connect("localhost","root","")or die("server connection failed".mysql_error());
mysql_select_db("trainingportal2")or die("Database connection failed".mysql_error());
if(isset($_REQUEST['sbmt']))
{
$qry="select * from admins where user_id='$_REQUEST[tbid]' and
pass='$_REQUEST[tbpass]'";
$rst=mysql_query($qry)or die("Login Query failed".mysql_error());
if(mysql_num_rows($rst)>0)
{
$_SESSION['admin_id']=$_REQUEST['tbid'];
$row=mysql_fetch_row($rst);
$_SESSION['admin_name']=$row[2];
?><script>window.location="adminwelcome.php";</script><?
}
}
?>
<!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=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
Login Page:
}
?>
function check_val()
{
var go_ahead=true;
var wrong_field="";
val=document.getElementById("registrationid").value;
if(val=="")
{
go_ahead=false;
if(wrong_field=="")
{
wrong_field="registration id";
}
}
val=document.getElementById("password").value;
if(val=="")
{
go_ahead=false;
if(wrong_field=="")
{
wrong_field="password";
}
}
if(wrong_field!="" && go_ahead==false)
{
alert("invalid entry for field "+wrong_field);
return go_ahead;
}
}
</script>
<style type="text/css">
<!--
.style29 {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
color: #009933;
}
.style30 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
}
-->
<body>
<form method="post">
<table width="283" border="0">
<tr>
<td colspan="2" height="45"><span class="style1 style29">Login with your Registration id ....
</span></td>
</tr>
<tr>
<td width="120" height="32"><span class="style3 style30">Registration id </span></td>
<td width="147"><input type="text" id="registrationid" name="registrationid" /></td>
</tr>
<tr>
<td height="31"><span class="style3 style30">Password</span></td>
<td><input type="password" id="password" name="password" />
</tr>
<tr>
<td height="37" colspan="2" align="center"><input type="submit" id="sbmt" name="sbmt"
value="Sign in" onClick="return check_val()" /></td>
</tr>
<tr>
<td height="29" colspan="2" bgcolor="#006633"><span class="style5 style30">if you are new
user then<a href="main.php?np=signup"> Sign up</a> first... </span></td>
</tr>
</table>
</form>
</body>
</html>
Coding:
<?php
session_start();
if(!(isset($_SESSION['admin_id'])))
{
header("location:http://$_SERVER[HTTP_HOST]/trainingportal/main.php");
}
?>
<body background="images/1926.jpg"><center>
<table width="1042" height="589" border="0" bgcolor="#FFFFFF">
<tr>
<td width="176" rowspan="2"><img src="images/pic1.JPG" width="175" height="178"
/></td>
<td height="129" colspan="4" align="center" bgcolor="#006600"><span
class="style1">PANACEA</span><span class="style2"> Training Institute</span><br />
<span class="style3">The best way of computer knowledge...</span></td>
<td width="261" rowspan="2"><img src="images/pic2.JPG" width="171" height="175"
/></td>
</tr>
<tr>
<td height="43" colspan="4" align="center" bgcolor="#009933"><span
class="style3">Welcome <?=$_SESSION['admin_name']?></span></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td height="300">
<table width="100%" height="93%" bordercolor="#006633" border="1">
<tr>
<td height="49" align="left" bgcolor="#669966"><span
class="style9"> . <a href="?np=add">Add a Course</a></span></td>
</tr>
<tr>
<td height="47" align="left" bgcolor="#669966"><span
class="style9"> . <a href="?np=modifycourse">Modify a
Course</a></span></td>
</tr>
<tr>
<td height="46" align="left" bgcolor="#669966"><span
class="style9"> . <a href="?np=addschedule">Add a
Schedule</a></span></td>
</tr>
<tr>
<td height="45" align="left" bgcolor="#669966"><span
class="style9"> . <a href="?np=modifyschedule">Modify
Schedule</a></span></td>
</tr>
<tr>
<td height="47" align="left" bgcolor="#669966"><span
class="style9"> . <a href="?np=viewfeedback">view
feedback</a></span></td>
</tr>
<tr>
<td height="48" align="left" bgcolor="#669966"><span
class="style9"> . <a href="?np=modifyfeedback">Modify
Feedback</a></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="23" bgcolor="#009966"> </td>
<td colspan="5" bgcolor="#009966"> </td>
</tr>
</table>
</center>
</body></html>
<?php
session_start();
if(!(isset($_SESSION['registration_id'])))
{
header("location:http://$_SERVER[HTTP_HOST]/trainingportal/main.php");
}
?>
<head>
<link rel="stylesheet" type="text/css" href="calendar/dhtmlgoodies_calendar.css" />
<script type="text/javascript" src="calendar/dhtmlgoodies_calendar.js?
random=20060118"></script>
/*Css style include*/</head>
<body background="images/vista-green-wallpaper.jpg"><center>
<table width="913" height="572" border="0" bgcolor="#FFFFFF">
<tr>
<td width="175" rowspan="2"><img src="images/pic1.JPG" width="175" height="178"
/></td>
<td height="129" colspan="4" align="center" bgcolor="#006600"><span
class="style1">PANACEA</span><span class="style2"> Training Institute</span><br />
<span class="style3">The best way of computer knowledge...</span></td>
<td width="171" rowspan="2"><img src="images/pic2.JPG" width="171" height="175"
/></td>
</tr>
<tr>
<td height="43" colspan="4" align="center" bgcolor="#009933"><span
class="style3">Welcome <?=$_SESSION['user_name']?></span></td>
</tr>
<tr>
<td colspan="2" height="33" align="center" bgcolor="#006600"><span class="style4"><a
href="?np=home">Home</a></span></td>
<td width="233" align="center" bgcolor="#006600"><span class="style4"><a href="?
np=project">Projects</a></span></td>
<td width="162" align="center" bgcolor="#006600"><span class="style4"><a href="?
np=forum">Forum</a></span></td>
<td width="149" align="center" bgcolor="#006600"> <span class="style4"><a href="?
np=notes">Notes</a></span></td>
<td align="center" bgcolor="#006600"><span class="style4"><a
href="adminlogout.php">Logout</a></span></td>
</tr>
<tr>
<td rowspan="5" align="center" bgcolor="#009966"><span class="style11">Instructor
</span></td>
<td height="25" colspan="5" bgcolor="#009966"></td>
</tr>
<tr>
<td colspan="5" rowspan="5" valign="top">
<div style="overflow:auto; height:300px; text-align:left;">
<?php
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td height="289">
<table width="100%" height="100%" border="1" bordercolor="#006633">
<tr>
<td width="164" height="58" align="left" bgcolor="#669966"><span
class="style12"> . <a href="?np=genattendence">Generate
Attendence</a></span></td>
</tr>
<tr>
<td height="49" align="left" bgcolor="#669966"><span
class="style12"> . <a href="?np=viewfeedback">View Feedback
</a></span></td>
</tr>
<tr>
<td height="49" align="left" bgcolor="#669966"><span
class="style12"> . <a href="?np=viewschedule">View Schedule
</a></span></td>
</tr>
</table>
</td>
<?php
session_start();
if(!(isset($_SESSION['registration_id'])))
{
header("location:http://$_SERVER[HTTP_HOST]/trainingportal/main.php");
}
?>
<!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>/*css style*/</head>
<body background="images/vista-green-wallpaper.jpg"><center>
<table width="904" height="607" border="0" bgcolor="#FFFFFF">
<tr>
<td width="175" rowspan="2"><img src="images/pic1.JPG" width="175" height="178"
/></td>
<td height="129" colspan="4" align="center" bgcolor="#006600" width="600px"><span
class="style1">PANACEA</span><span class="style2"> Training Institute</span><br />
<span class="style3">( The best way of computer knowledge ) </span></td>
<td width="170" rowspan="2" align="center"><img src="images/pic2.JPG" width="167"
height="180" /></td>
</tr>
<tr>
<td height="43" colspan="4" align="center" bgcolor="#009933"><span
class="style3">Welcome <?=$_SESSION['user_name']?></span></td>
</tr>
<tr>
<td colspan="6" height="33" align="center" bgcolor="#006600"> </td>
</tr>
<tr>
<td rowspan="5" align="center" bgcolor="#009966"><span class="style11">Approver
</span></td>
<td height="25" colspan="5" bgcolor="#009966"></td>
</tr>
<tr>
<td colspan="5" rowspan="5" valign="top">
<div style="overflow:auto; height:300px; text-align:left;">
<?php
</tr>
<tr>
</tr>
<tr> </tr>
<tr>
<td height="289" valign="top">
<table width="100%" height="95%" border="1">
<tr>
<td height="45" align="left" valign="top" bgcolor="#669966"><span
class="style12"> . <a href="?np=trainingapprove">Training
Approve</a></span></td>
</tr>
<tr><td height="42" align="left" valign="top" bgcolor="#669966"><span
class="style12"> . <a href="?np=modifyapprove">Modify
Approve</a></span></td>
</tr>
<tr><td height="42" align="left" valign="top" bgcolor="#669966"><span
class="style12"> . <a href="?np=training">Training
Details</a></span></td>
</tr>
<tr><td height="194" rowspan="3" align="left" valign="top" bgcolor="#669966"><span
class="style12"> . <a href="adminlogout.php">Log out</a></span></td>
</tr>
</table>
</td> </tr>
<tr>
<td height="23" bgcolor="#009966"> </td>
<td colspan="5" bgcolor="#009966"> </td>
</tr>
</table>
</center>
</body>
</html>
</tr>
<tr>
</tr>
<tr>
<td height="289">
<table width="100%" height="100%" border="1">
<tr>
<td height="50" align="left" bgcolor="#669966"><span
class="style12"> . <a href="?
np=unregistration">Unregister</a></span></td>
</tr>
<tr>
<td height="49" align="left" bgcolor="#669966"><span
class="style12"> . <a href="?np=addfeedback">Add a
Feedback</a></span></td>
</tr>
<tr>
<td height="48" align="left" bgcolor="#669966"><span
class="style12"> . <a href="?np=attendedtraining">Attended
Training</a></span></td></tr>
</table>
</td></tr><tr>
<td height="23" bgcolor="#009966"> </td> <td colspan="5"
bgcolor="#009966"> </td>
</tr></table>
</center></body></html>