Web Technology Lab Ma
Web Technology Lab Ma
Procedure:
Main.html
<html>
<head>
<title>Main</title>
<FRAMESET rows=”20%,8%,8”>
<frame src=”TopPage.html”id=”f”>
<frame src=”NavigationPagehtml”id=”f1”>
<FRAMESET cols=”11%,*>
<frame src=”Branches.html”id=”f2”>
<frame src=”Home.html”id=”main””>
</FRAMESET>
</head>
<body>
</body>
</html>
Home.html
<html>
<head>
<title>Home Page</title>
</head>
<body>
<h1 style="text-align:center">Welcome to Online Shopping Site</h1>
<imgsrc="images/home.jpg" width="800" height="300" border="0">
</body>
</html>
TopPage.html
<html>
<head>
<title>Top Page</title>
</head>
<body bgcolor="#005387">
<table width="100%">
<tr>
<td align=center><imgsrc="images/ons.jpg" align="left"></td>
<td align=center><h1 align="center" ><font face="Algerian" size="10" color="white">Online
Shopping Site</h1></td>
</tr>
</table>
Branches.html
<html>
<head>
<title>Branches list</title>
</head>
<body bgcolor="#99ffff">
<table cellspacing="20" >
<i><font size="4" >Select Your Branch</i>
<tr><td><a href="CseCatalogue.html" target="main"><font size="5"
color="black">CSE</a></td></tr>
<tr><td><a href="EceCatalogue.html" target="main"><font size="5"
color="black">ECE</a></td></tr>
<tr><td><a href="EEECatalogue.html" target="main"><font
size="5"color="black">EEE</a></td></tr>
<tr><td><a href="MechCatalogue.html" target="main"><font size="5"
color="black">MECH</a></td></tr>
<tr><td><a href="CivilCatalogue.html" target="main"><font size="5"
color="black">CIVIL</a></td></tr>
</font>
</table>
</body>
</html>
NavigationPage.html
<html>
<head>
<title> Navigation Page </title>
</head>
<body bgcolor="#333">
<table width="100%" border="0" cellspacing="5" align="top">
<tr>
<td align="center">
<a href="Home.html" target="main" >
<Font face="Algerian" size="4" color="#ffffff">Home
</a>
</td>
<td align="center">
<a href="Login.html" target="main">
<Font face="Algerian" size="4" color="#ffffff">Login
</a></td>
<td align="center">
<a href="RegistrationPage.html" target="main">
<Font face="Algerian" size="4" color="#ffffff">Registration
O/p:
Login.html
<html>
<head>
<title>Login Page</title>
</head>
<body>
<Form name="MyForm">
<table align="center" width="30%" bgcolor="#99ccff">
<tr>
<td>Login</td>
<td><input type="text" id="txtbx" placeholder="User ID"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" id="pwd" placeholder="Password"></td></tr>
<tr>
<td><input type="Submit" value="Submit"></td>
<td><input type="Reset" value="Reset"></td>
</tr>
</table>
</Form>
</body>
</html>
O/P:
Catalog.html
<html>
<head>
<title>Catalogue.html</title>
</head>
<body>
<marquee bgcolor="red"><font color="white" size="4">Please Select your Branch to add books
to the CART</marquee>
<table align="center" id="catlog" width="60%" border="1">
<tr>
<td align="center"><h2>Preview</h2></td>
<td align="center"><h2>Description</h2></td>
<td align="center"><h2>Price</h2></td>
</tr>
<tr>
<td><imgsrc="images/e2.jpg"></td>
<td>
<b>Book:</b>Electronic Devices&Circuits<br>
<b>Author:</b>Millman And Hawkins<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td align="center">
<b>$40.5</b><br>
(inclusive of all taxes)
</td>
</tr>
<tr>
<td><imgsrc="images/1.jpg"></td>
<td>
<b>Book:</b>Programming in C<br>
<b>Author:</b>Balagurusamy<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td align="center">
<b >$40.5</b><br>
(inclusive of all taxes)
</td>
</tr>
CivilCatalogue.html
<html>
<head>
<title>Civil Catalogue</title>
</head>
<body>
<table align="center" width="70%" border="1" id="ece">
<tr>
<td><h2>Preview</h2></td>
<td><h2>Description</h2></td>
<td><h2>Price</h2></td>
<td><h2>Cart</h2></td>
</tr>
<tr>
<td><imgsrc="images/c1.jpg"></td>
<td>
<b>Book:</b>TextBook Of Geology<br>
<b>Author:</b>Millman And Hawkins<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$40.5</b><br>
(inclusive of all taxes)
</td>
<td><a href=""><imgsrc="images/Addtocart.jpg"></a></td>
</tr>
<tr>
<td><imgsrc="images/c2.jpg"></td>
<td>
<b>Book:</b>Strength of Materials<br>
<b>Author:</b>Shibu K V<br>
<b>Publication:</b>Technical Publication<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$53</b><br>
(inclusive of all taxes)
CseCatalogue.html
<html>
<head>
<title>CseCatalogue</title>
</head>
<body>
<table align="center" width="70%" border="1" id="cse" method="get">
<tr>
<td><h2>Preview</h2></td>
<td><h2>Description</h2></td>
Ece Catalogue.html
<html>
<head>
<title>EceCatalogue</title>
</head>
<body>
<table align="center" width="70%" border="1" id="ece">
<tr>
<td><h2>Preview</h2></td>
<td><h2>Description</h2></td>
<td><h2>Price</h2></td>
<td><h2>Cart</h2></td>
</tr>
<tr>
<td><imgsrc="images/e2.jpg"></td>
<td>
<b>Book:</b>Electronic Devices And Circuits<br>
<b>Author:</b>Millman And Hawkins<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$40.5</b><br>
(inclusive of all taxes)
Prepared By: MR.G.SREENIVASULU
MR.B.SRIKANTH Page 10
</td>
<td><a href=""><imgsrc="images/Addtocart.jpg"></a></td>
</tr>
<tr>
<td><imgsrc="images/e3.jpg"></td>
<td>
<b>Book:</b>Embeded Systems<br>
<b>Author:</b>Shibu K V<br>
<b>Publication:</b>Technical Publication<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$53</b><br>
(inclusive of all taxes)
</td>
<td><a href=""><imgsrc="images/Addtocart.jpg"></a></td>
</tr>
<tr>
<td><imgsrc="images/e4.jpg"></td>
<td>
<b>Book:</b>Signalling Systems<br>
<b>Author:</b>Travis Russel<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$68</b><br>
(inclusive of all taxes)
</td>
<td><a href=""><imgsrc="images/Addtocart.jpg"></a></td>
</tr>
<tr>
<td><imgsrc="images/e1.jpg"></td>
<td>
<b>Book:</b>Computer Organisation<br>
<b>Author:</b> William Stallings<br>
<b>Publication:</b>Pearson Publications<br>
<b>Availability:</b>Available<br>
</td>
<td>
EEE Catalogue.html
<html>
<head>
<title>EEE Catalogue</title>
</head>
<body>
<table align="center" width="70%" border="1" id="ece">
<tr>
<td><h2>Preview</h2></td>
<td><h2>Description</h2></td>
<td><h2>Price</h2></td>
<td><h2>Cart</h2></td>
</tr>
<tr>
<td><imgsrc="images/ee1.jpg"></td>
<td>
<b>Book:</b>Power Systems<br>
<b>Author:</b>Millman And Hawkins<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$40.5</b><br>
(inclusive of all taxes)
</td>
<td><a href=""><imgsrc="images/Addtocart.jpg"></a></td>
</tr>
<tr>
<td><imgsrc="images/ee2.jpg"></td>
MechCatalogue.html
<html>
<head>
<title>MechCatalogue</title>
</head>
<body>
<table align="center" width="70%" border="1" id="ece">
<tr>
<td><h2>Preview</h2></td>
<td><h2>Description</h2></td>
<td><h2>Price</h2></td>
<td><h2>Cart</h2></td>
</tr>
<tr>
<td><imgsrc="images/m1.jpg"></td>
<td>
<b>Book:</b>Solid Mechanics<br>
<b>Author:</b>Millman And Hawkins<br>
<b>Publication:</b>Tata McGrawhills<br>
<b>Availability:</b>Available<br>
</td>
<td>
<b>$40.5</b><br>
(inclusive of all taxes)
</td>
<td><a href=""><imgsrc="images/Addtocart.jpg"></a></td>
</tr>
<tr>
<td><imgsrc="images/m2.jpg"></td>
<td>
<b>Book:</b>Thermodynamics<br>
<b>Author:</b>Shibu K V<br>
<b>Publication:</b>Technical Publication<br>
<b>Availability:</b>Available<br>
</td>
Registration Page:
<html>
<head>
<title>Registration Page</title>
</head>
<body>
<h1 align="center">Registration Form</h1>
<form name="MyForm">
<table align="center" cellspacing="5" cellpadding="2" bgcolor="#b7eff9">
<tr>
<td>Name</td>
<td><input type="text" name="txtbx" Autofocus></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="pwd"></td>
</tr>
<tr>
<td>Confirm Password</td>
<td><input type="password" name="pwd2"></td>
</tr>
<tr>
<td>Date of Birth</td>
0i</tr>
<tr>
<td>Day
<select id="day">
<option>1
<option>2
<option>3
<option>4
<option>5
Prepared By: MR.G.SREENIVASULU
MR.B.SRIKANTH Page 17
<option>6
<option>7
<option>8
<option>9
<option>10
<option>11
<option>12
<option>13
<option>14
<option>15
<option>16
<option>17
<option>18
<option>19
<option>20
<option>21
<option>22
<option>23
<option>24
<option>25
<option>26
<option>27
<option>28
<option>29
<option>30
<option>31
</select>
</td>
<td>Month
<select name="month" id="month">
<option value=01>JAN</option>
<option value=02>FEB</option>
<option value=03>MAR</option>
<option value=04>APR</option>
<option value=05>MAY</option>
<option value=06>JUN</option>
<option value=07>JUL</option>
<option value=08>AUG</option>
<option value=09>SEP</option>
<option value=10>OCT</option>
<option value=11>NOV</option>
<option value=12>DEC</option>
</select>
</td>
<td>Year
</select></td>
</tr>
<tr>
<td>Gender</td>
<td><input type="radio" name="radbtn">Male <input type="radio"
name="radbtn">Female</td>
</tr>
<tr>
<td>Email Id</td>
<td><input type="text" name="emailbx"></td>
</tr>
<tr>
<td>Mobile Number</td>
<td><input type="text" name="mobnumbx"></td>
</tr>
<tr>
<td>Languages Known</td>
</tr>
<tr>
<tr>
<td>Address</td>
<td><textarea rows="5" cols="25" style="overflow:hidden;" ></textarea></td>
</tr>
<tr>
<td><input type="submit" value="Submit" onclick="FormValidation()"></td>
<td><input type="reset" value="Reset"></td>
</tr>
</table></form></body></html>
O/P:
Validation.html
<html>
<head>
<title>Registration</title>
<script src="valid.js">
</script>
</head>
<body bgcolor=#7D9EC0>
<center>
<form name=f>
<table align=center border=0 width=65% height=100%>
<caption align=center> REGISTRATION FORM </caption>
<tr>
<td>UserName :</td>
<td ><input type=text name=user></td>
</td>
</tr>
<tr>
<td>Password:</td>
<td ><input type=password name=pwd></td>
</tr>
<tr>
<td>E-mail id:</td>
<td ><input type=text name=email></td>
</tr>
<tr>
<td>Phone Number:</td>
<td><input type=text name=phone></td>
<td><p id= "ph"></p></td>
</tr>
<tr>
<td><input type=button value="Submit" onclick=validate()></td>
<td><input type=reset value="Reset"></td>
</tr>
</table></form>
Prepared By: MR.G.SREENIVASULU
MR.B.SRIKANTH Page 21
</body>
</html>
Valid.js
function validate()
{
var c1=new RegExp("^[\\w]{6,}$");
var c2=new RegExp("^[\\w]{6,}$");
var c3=new RegExp("^[\\w]+@[\\w]+.com$");
var c4=new RegExp("^[\\d]{10}$");
var name=document.f.user.value;
varpwd=document.f.pwd.value;
var email=document.f.email.value;
var phone=document.f.phone.value;
var error="";
if(!name.
match(c1))
{ error+="should be min of 6 char\n" }
if(!pwd.match(c2))
{
error+="should be min of 6 char\n"
}
if(!email.match(c3))
{
error+="should be of format [email protected]\n"
}Procedure:
if(!phone.match(c4))
{
error+="should be of 10 digits"
}
if(error!="")
{
window.alert(error);
}
else {
window.alert("u entered valid information");
}
}
Procedure:
<xsl:template match="/">
<html>
<body>
<table align="center" cellspacing="5" cellpadding="10">
<caption>BOOKS INFORMATION</caption>
<trbgcolor="light brown ">
<th>Title</th>
<th>Author</th>
<th>ISBN</th>
Output:
3. When prompted for the download, click "Save" and wait for your download to finish.
5.Accept the default settings. A command will open and offer an initial installation prompt. Just
hit the Enter key, and accept the default settings. To simplify installation, just hit ENTER when
Prepared By: MR.G.SREENIVASULU
MR.B.SRIKANTH Page 29
prompted on the command line. You can always change settings, by editing the configuration
files later.
6.When your installation is complete, exit the command window by typing x on the
command line.
9.Verify the Apache install, by clicking on the Apache administrative link in the Control Panel.
If the verification steps are successful, XAMPP should be successfully installed on your
PC. Open a browser and enter "localhost" on your address bar. You will be redirected to
a page telling you that you've successfully installed xampp on your system
INSTALLING JOOMLA
Step-3:
Step-1:
Step-4.3
fs fffs f
Mysql database
Procedure:
Reg.html:
<html>
<head>
<title> validation </title>
</head>
<body bgcolor="magenta">
<form action="Register.jsp" method="post">
<h1 align="center">REGISTRATION FORM</h1>
<table border="0">
<tr>
<td>Name:</td>
<td><input type="text" name="t1" min length="6"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="t2"></td>
</tr>
<tr>
<td>Phone number:</td>
<td><input type="text" name="t3"></td>
</tr>
<tr>
<td>E-mail id:</td>
<td><input type="text" name="t4"></td>
</tr>
<tr>
<td><input type="submit" value="submit"></td>
<td><input type="reset" value="cancel"></td>
</tr>
</table>
</form>
</body>
</html>
Output:2
Procedure:
Login.html:
<html>
<head>
<title> login page </title>
</head>
<body bgcolor="cyan"><center>
<right>
<form action="valid.jsp" method="post" >
<h4>username<input type="text" name="t1">
<h4>password <input type="password" name="t2" ><br><br>
<input type="submit" value="submit">
<input type="reset" value="reset"></form>
</body>
</html>
Valid.jsp:
<%@ page language="java" import="java.sql.*,javax.servlet.*" %>
<html>
<form>
<%
int v=0;
String v1,v2,v3,v4,str;
v1=request.getParameter("t1");
v2=request.getParameter("t2");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cn=DriverManager.getConnection("jdbc:odbc:oradsn","scott","tiger");
Statement st=cn.createStatement();
ResultSetrs=st.executeQuery("select * from register");
Output:
PROGRAM:
<?php
//date_default_timezone_set('Asia/Calcutta');
$inTwoMonths = 60 * 60 * 24 * 60 + time();
if(isset($_COOKIE['lastVisit']))
$visit = $_COOKIE['lastVisit'];
else
?>
<html>
<body>
</form>
</html>
LOGIN .PHP
<html>
<body>
</form>
</body>
</html>
SESSIONEX.PHP
<?php
session_start();
$_SESSION["user1"]="pwd1";
$_SESSION["user2"]="pwd2";
$_SESSION["user3"]="pwd3";
$user=$_GET["t1"];
$pwd=$_GET["p1"];
if($_SESSION[$user]==$pwd)
echo "welcome" , $user;
else
echo "you are not an authorized user";
?>
PROGRAM:
REG.HTML
<html>
<body>
<form action=”display.php”>
<option>INDIA</option>
<option>PAKISTAN</option>
<option>OTHER</option>
</select><br>
</form>
</body>
</html>
DISLAY.PHP
<?php
$_user=$_get[“user name”];
$pwd=$_get[“user pass”];
$country=$_get[“user country”];
$dbhost=”localhost:3306”;
$dbuser=”root”;
$conn=mysql_connect($dbhost,$dbuser);
if(!$conn)
mysql_selct_db(‘sreekanth’);
$update val=mysql_query($update_sql,$conn);
if(!$updateval)
else
$sql=’select*from registeruser’;
$retval=mysql_query($sql,$conn);
if(!$retval)
echo”<center>registration detailsare”;
echo”<table border=1>”;
while($row=mysql_fetch_array($retval,MYSQL_ASSOC))
echo”<tr><td>{$row[‘user email’]}</td><td>”;
echo”{$row[‘usercountry’]}</td></tr>”;
echo”</table></center>”;
mysql_close($conn);
?>