Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Project
- Index.html
- <html>
- <head>
- <title>CAT PROCESS, SCSE, VIT UNIVERSITY, VELLORE, TAMIL NADU, INDIA</title>
- </head>
- <frameset cols="25%,80%">
- <frame src ="Login.html" name="leftframe"/>
- <frame src= "right.html" name ="rightframe"/>
- </frameset>
- </html>
- Login.html
- <html>
- <STYLE>
- font.nf
- {
- text-align:left;
- line-height:17pt;
- font-size: 18pt;
- color:magenta;
- }
- </STYLE>
- <body>
- <font color=green size=+3>
- Sign Up</font>
- <font class= nf>
- <form method=post action="login.php" align =center>
- Name: <br><input type=text name="LoginName"><br>
- Password: <br><input type =password name ="PassName"><br><br>
- <input type=submit value="Login">
- </font>
- </form>
- </body>
- </html>
- Right.html
- <HTML>
- <STYLE>
- font.bf
- {
- text-align:center;
- line-height:20pt;
- font-size:24pt;
- color:green
- }
- font.mf
- {
- text-align:center;
- line-height:17pt;
- font-size: 24pt;
- color:blue;
- }
- </STYLE>
- <BODY background ="pic2.jpg" align=center>
- <br><br>
- <font class=bf>
- <h1>CAT EXAM PROCESS</h1></font>
- <font class=mf>
- <h2>SCSE</H2>
- <H3>VIT UNIVERSITY,VELLORE</H3></font>
- </BODY>
- </HTML>
- Login.php
- <?php
- session_start();
- $username=$_POST['LoginName'];
- $pwd=$_POST['PassName'];
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db=mysql_select_db("cat",$con) or die(mysql_error());
- $query="select * from admin where username = '".$username."' and password = '".md5($pwd)."'";
- $rs=mysql_query($query,$con) or die(mysql_error());
- if (mysql_num_rows($rs) == 1)
- {
- // HAS TO DISPLAY THE MENUS
- echo "<font size=+1 color=black>";
- $_SESSION["loginname"]=$username;
- echo "Hi, $username<br>";
- echo "<a href= exam_Data_Process.php target=rightframe>CAT DATA PROCESS</a><br><br>";
- echo "<a href= Exam_Hall_Process.php target=rightframe>EXAM HALL PROCESS</a><br><br>";
- echo "<a href= CAT_Document_Process.html target=rightframe>CAT DOCUMENT PROCESS</a><br><br>";
- echo "<a href= Change_Password_Process.php target=rightframe>CHANGE PASSWORD</a><br><BR>";
- echo "<a href= Logout.php> LOGOUT</a>";
- }
- else
- echo "<html>Not authenticated please login again<br> <a href=login.html target=leftframe> Login</a></html>";
- mysql_close($con) or die(mysql_error());
- ?>
- Exam_Hall_Process.php
- <?php
- session_start();
- if (isset($_SESSION['loginname']))
- {
- echo "<body background=\"pic2.jpg\">";
- echo "<h1 align=center color=blue size =+2> EXAM HALL PROCESS</h1>";
- echo "<br><hr><br>";
- echo "<form action=\"view_exam_hall.php\">";
- echo "<input type=submit value=\"VIEW EXAM HALL\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</form>";
- echo "<form action=\"add_exam_hall.php\">";
- echo "<input type=submit value=\"ADD EXAM HALL\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</form> <form action=\"modify_exam_hall.php\">";
- echo "<input type=submit value=\"MODIFY EXAM HALL\" style=\"width:200px; height:50px; font-size:100%;color:green\"></form>";
- echo "<form action=\"remove_exam_hall.php\">";
- echo "<input type=submit value=\"REMOVE EXAM HALL\" style=\"width:200px; height:50px; font-size:100%;color:green\"> </form></font>";
- echo "</BODY></HTML>";
- }
- else
- echo "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly</font>";
- ?>
- View exam hall.php
- <?php
- session_start();
- if (isset($_SESSION['loginname']))
- {
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db = mysql_select_db("cat",$con) or die(mysql_error());
- $query="select classnum,capacity from class order by classnum";
- $class_rec_set = mysql_query($query,$con) or die(mysql_error());
- echo "<body background=\"pic2.jpg\">";
- echo "<form action= \"exam_hall_process.php\">";
- echo "<input type=submit value=\"<< GO BACK\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></b></html>";
- echo "<h1 align=center><font color=blue>EXAM ROOM DETAILS</H1>";
- echo "<font size=+2 color=maroon>";
- echo "<table border=1 style =\"font-size:+25\" align=center><b><tr><th>S. No.</th><th> ROOM NUMBER</th><th> CAPACITY</th></tr>";
- $count=0;
- while($class_rec = mysql_fetch_assoc($class_rec_set))
- {
- $count++;
- echo "<tr align=center><td>$count</td><td>",$class_rec['classnum'],"</td><td>",$class_rec['capacity'], "</td></tr>";
- }
- echo "</table><br><br>";
- echo "<form action= \"exam_hall_process.php\">";
- echo "<input type=submit value=\"<< GO BACK\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></b></html>";
- mysql_close($con);
- }
- else
- echo "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly";
- ?>
- Add exam hall.php
- <?php
- session_start();
- if (isset($_SESSION['loginname']))
- {
- echo "<body background=\"pic2.jpg\"><font size=+2><form action=\"add_room.php\" method=post><b>";
- echo "Enter Room Number: <input type = text name=\"roomnum\">";
- echo "<br><br>Room Capacity: <input type=radio name =\"roomcapacity\" value =40 checked> 40";
- echo "<input type=radio name =\"roomcapacity\" value =60> 60<br><br>";
- echo "<input type=submit value=\"ADD ROOM\" style=\"width:200px; height:50px; font-size:100%;color:green\"></b></form></font>";
- }
- else
- echo "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly";
- ?>
- Add room.php
- <?php
- session_start();
- $room_num=strtoupper($_POST['roomnum']);
- $room_capacity=$_POST['roomcapacity'];
- settype($room_capacity,'integer');
- if (isset($_SESSION['loginname']))
- {
- echo "<body background=\"pic2.jpg\"><font size =+2>";
- if ($room_num <> "")
- {
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db = mysql_select_db("cat",$con) or die(mysql_error());
- $query="insert into class (classnum,capacity,availability) values('".$room_num."',".$room_capacity. ",".$room_capacity.")";
- $rec_set=mysql_query($query,$con) or die(mysql_error());
- echo "<font size=+2 >Room Added</font>";
- mysql_close($con);
- }
- else
- {
- echo "<font size=+3> Room number is empty pl check it</font>";
- echo "<form action= \"add_exam_hall.php\">";
- echo "<input type=submit value=\" CONTINUE\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- }
- echo "<form action= \"exam_hall_process.php\"><font size=+2>";
- echo "<input type=submit value=\"<< MENU\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- }
- else
- echo "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly";
- ?>
- Modify exam hall.php
- <?php
- session_start();
- if (isset($_SESSION['loginname']))
- {
- echo "<body background=\"pic2.jpg\">";
- echo "<h1 align=center color=blue size =+2> EXAM HALL PROCESS</h1>";
- echo "<br><hr><br>";
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db = mysql_select_db("cat",$con) or die(mysql_error());
- $query = "select classnum,capacity from class order by classnum";
- $class_rec_set=mysql_query($query) or die(mysql_error());
- echo "<form action=\"modify_room.php\" method =post>";
- echo "<font size=+2>Exam Halls: <br><select name=\"roomnum\" size=5> ";
- while ($class_rec = mysql_fetch_assoc($class_rec_set))
- echo "<option value='".$class_rec['classnum']."'> ". $class_rec['classnum'];
- echo "</select>";
- echo "<br>Capacity: <input type=radio name=\"roomcapacity\" value =40 checked>40";
- echo "<input type=radio name=\"roomcapacity\" value =60 >60<br>";
- echo "<input type = submit value =\"UPDATE\" style=\"width:200px; height:50px; font-size:100%;color:green\"></FORM>";
- echo "<form action= \"exam_hall_process.php\">";
- echo "<input type=submit value=\"<< CANCEL\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- mysql_close($con);
- }
- else
- echo "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly</font>";
- ?>
- Modify room.php
- <?PHP
- session_start();
- echo "<body background =\"pic2.jpg\">";
- if (isset($_POST['roomnum']))
- {
- $room_number =$_POST['roomnum'];
- $room_capacity=$_POST['roomcapacity'];
- settype($room_capacity,'integer');
- if (isset($_SESSION['loginname']))
- {
- echo "<body background=\"pic2.jpg\">";
- echo "<h1 align=center color=blue size =+2> EXAM HALL MODIFY PROCESS</h1>";
- echo "<br><hr><br>";
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db=mysql_select_db("cat",$con) or die(mysql_error());
- $query="update class set capacity = ".$room_capacity." where classnum = '". $room_number. "'";
- $update_rec_set= mysql_query($query,$con) or die(mysql_error());
- echo "Updated ".$room_number."'s capacity as ".$room_capacity."<br>";
- }
- else
- {
- die( "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly</font>");
- }
- }
- else
- {
- echo "</font><font size=+2> No room was selected. Pl select a room";
- echo "<form action= \"modify_exam_hall.php\">";
- echo "<input type=submit value=\"CONTINUE\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- }
- echo "<form action= \"exam_hall_process.php\">";
- echo "<input type=submit value=\"<< MENU\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- ?>
- Remove exam hall.php
- <?php
- session_start();
- if (isset($_SESSION['loginname']))
- {
- echo "<body background=\"pic2.jpg\">";
- echo "<h1 align=center color=blue size =+2> EXAM HALL PROCESS</h1>";
- echo "<br><hr><br>";
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db = mysql_select_db("cat",$con) or die(mysql_error());
- $query = "select classnum,capacity from class order by classnum";
- $class_rec_set=mysql_query($query) or die(mysql_error());
- echo "<form action=\"remove_room.php\" method =post>";
- echo "<font size=+2>Exam Halls: <br><select name=\"roomnum\" size=5> ";
- while ($class_rec = mysql_fetch_assoc($class_rec_set))
- echo "<option value='".$class_rec['classnum']."'> ". $class_rec['classnum'];
- echo "</select><br>";
- echo "<input type = submit value =\"REMOVE\" style=\"width:200px; height:50px; font-size:100%;color:green\"></FORM>";
- echo "<form action= \"exam_hall_process.php\">";
- echo "<input type=submit value=\"<< CANCEL\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- mysql_close($con);
- }
- else
- echo "<font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly</font>";
- ?>
- Remove room.php
- <?PHP
- session_start();
- echo "<body background=\"pic2.jpg\">";
- echo "<h1 align=center color=blue size =+2> EXAM HALL MODIFY PROCESS</h1>";
- echo "<br><hr><br>";
- if (isset($_POST['roomnum']))
- {
- $room_num=$_POST['roomnum'];
- if (isset($_SESSION['loginname']))
- {
- $con=mysql_connect("localhost","root","") or die(mysql_error());
- $db=mysql_select_db("cat",$con) or die(mysql_error());
- $query ="delete from class where classnum = '".$room_num."'";
- mysql_query($query,$con) or die(mysql_error());
- echo "<font size=+2> $room_num Removed from list";
- }
- else
- {
- die( "</font><font size=+2> Sorry, You are not authorized user. Please <b>Login </b>properly </font>");
- }
- }
- else
- {
- echo "</font><font size=+2> No room was selected. Pl select a room";
- echo "<form action= \"remove_exam_hall.php\">";
- echo "<input type=submit value=\"CONTINUE\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- }
- echo "<form action= \"exam_hall_process.php\">";
- echo "<font size=+2><input type=submit value=\"<< MENU\" style=\"width:200px; height:50px; font-size:100%;color:green\">";
- echo "</font></form></html>";
- ?>
Add Comment
Please, Sign In to add comment