Anda di halaman 1dari 20

LOGIN.

ASP

<html>
<body>
<center>
<table width="100%" border="0">
<tr>
<td width="100%" bgcolor="#8AC5FF" height="101">
<p align="center"><b><font face="Verdana" size="4" color="#000080">
Alamuri Ratnamala Institute of Engineering & Technology</font></b>
<p align="center"><b><font face="Verdana" size="4"
color="#000080">
B.E. - Notice Board</font></b><p align="center"><b><font
face="Verdana" size="2" color="#000080">&nbsp;Login
Page</font></b></td>
</tr>
<tr>
<td>
<form method="POST" action="verify.asp">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" width="100%" id="AutoNumber5" height="81">
<tr>
<td width="50%" height="27"><div align="right"><b>
<font color="#569BE0" size="2" face="Verdana">User
ID:</font></b></div></td>
<td width="50%" height="27">
<input name="uid" size="20" style="font-size: 10pt; font-family: Verdana;
border: 1px solid navy; color:navy; background=white; float:left"></td>
</tr>
<tr>

<td width="50%" height="27"><div align="right"><b>


<font color="#569BE0" size="2"
face="Verdana">Password:</font></b></div></td>
<td width="50%" height="27">
<input type=password name="pass" size="20" style="font-size: 10pt; fontfamily: Verdana; border: 1px solid navy; color:navy; background=white; float:left"></td>
</tr>
<tr>
<td width="50%" height="27">&nbsp;</td>
<td width="50%" height="27">
<input type="submit" value="Login" name="B1" style="font-size: 8pt; fontfamily: Verdana; border: 1px solid navy; color:navy; background=white; float:left"></td>
</tr>
</table>
</form>
</td>
</tr>
</table></center></body></html>
OUTPUT:

ADDNOTICE.ASP
<%
'Check if user is logged in
if Session("name") = "" then
'If not, go to login page
Response.Redirect("login.asp")
else %>
<html><head><title>ARMIET B.E. Notice Board</title></head>
<body bgcolor="#333333">
<form method="POST" action="publish.asp" name="frm1">
<div align="left">
<p align="center"><font size="5" color="#FFFFFF">ARMIET B.E. Notice
Board</font></p>
<p align="center"><font size="4" color="#FFFFFF">
<font face="Verdana">
| </font><a href="logout.asp">
<span style="text-decoration: none">
<font color="#FFFFFF" face="Verdana">
Logout</font></span></a><font face="Verdana"> | <font color="#FFFFFF">
<a target="_blank" href="notice.asp">
<span style="text-decoration: none"><font color="#FFFFFF">Show Notice
Board</font></span></a> |</font></font></font></p>
<p align="center"><font face="Verdana" size="5" color="#FFFFFF">Write
Notice</font></p>
<div align="center">
<table border="1" width="49%" cellspacing="1" style="bordercollapse: collapse">
<tr>
<td width="102" align="right">

<font face="Verdana" size="1"


color="#FFFFFF">Date :</font></td>
<td width="412">
<font face="Verdana">
<input type="text" name="T1" size="21" style="borderstyle: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px" tabindex="1" value="<%=date%>"></font> </td>
</tr>
<tr>
<td width="102" align="right">
<font face="Verdana" size="1"
color="#FFFFFF">Time :</font></td>
<td>
<input type="text" name="T4" size="21" style="borderstyle: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px" tabindex="1" value="<%=time%>"></td>
</tr>
<tr>
<td width="102" align="right">
<font face="Verdana" size="1" color="#FFFFFF">Notice
By :</font></td>
<td>
<font face="Verdana">
<input type="text" name="T2" size="34" style="borderstyle: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px" tabindex="2"></font></td>
</tr>
<tr>
<td width="102" align="right" height="25">
<font face="Verdana" size="1" color="#FFFFFF">Subject
:</font></td>
<td height="25">

<font face="Verdana">
<input type="text" name="T3" size="49" style="borderstyle: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px" tabindex="3"></font></td>
</tr>
<tr>
<td align="right">
<p align="left">
<font face="Verdana" size="1"
color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;
Notice :</font></td>
<td align="right">
<p align="left">
<font face="Verdana">
<textarea rows="8" name="S1" cols="42" style="borderstyle: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px;
padding-bottom: 1px; font-family:Verdana; font-size:10pt"
tabindex="4"></textarea></font></td>
</tr>
<tr>
<td width="102" align="right">&nbsp;</td>
<td><input type="submit" value="Submit" name="B1">
<input type="reset" value="Clear" name="B2"></td>
</tr>
</table>
</div>
</div>
</form>
</body>
</html>

<%end if%>
OUTPUT:

PUBLISH.ASP
<html><head><title>B.E. Notice Board</title></head>
<body bgcolor="#333333">
<%
dim tdate,tby,ttitle,tnotice,ttime
tdate=request.form("T1")
tby=request.form("T2")
ttitle=request.form("T3")
tnotice=request.form("S1")
ttime=request.form("T4")
%>
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF"></font></b><font
color="#FFFFFF" face="Verdana" size="2"><b>Please Check the notice before you publish, If
</font>
<font color="#FF0000" face="Verdana" size="2">not proper</font><font color="#FFFFFF"
face="Verdana" size="2"> go back else&nbsp; </font><font color="#FFFF00"
face="Verdana" size="2">Click Publish</font><font color="#FFFFFF" face="Verdana"
size="2"> </font></b><p align="center">
<font color="#FFFFFF" face="Verdana" size="2"><b>&nbsp;</b></font>
<div align="center">
<table border="1" width="66%" cellspacing="0" cellpadding="0"
bordercolor="#FFFFFF" style="border-collapse: collapse"><tr><td>
<table border="0" width="99%" cellpadding="0" style="border-collapse: collapse"
height="117">
<tr>

<td width="17%" align="right" height="22">


<font size="1" face="Verdana"
color="#C0C0C0">Date :</font></td>
<font size="5" color="#FFFFFF">
<td align="left" height="22" width="39%"><b>
<font size="2" color="#FFFFFF"
face="Verdana">&nbsp;<%=tdate%></font></b></td>

<font face="Verdana" size="5" color="#FFFFFF">


<td align="center" height="22"
width="44%">&nbsp;</td>
</tr>

<tr>
<td width="17%" align="right" height="19">
<font size="1" face="Verdana" color="#C0C0C0">Time :</font></td>
<td align="left" width="39%" height="19"><b>
<font color="#FFFFFF" face="Verdana" size="2">&nbsp;<%=ttime
%></font></b></td>
<td align="center" width="44%" height="19">&nbsp;</td>
</tr>

<tr>
<td width="17%" align="right" height="19">
<font face="Verdana" size="1" color="#C0C0C0">
Notice By: </font>
</td>
<font size="5" color="#FFFFFF">
<td align="left" width="39%" height="19"><b>
<font size="2" color="#FFFFFF" face="Verdana">&nbsp;<%=tby
%></font></b></td>
<td align="center" width="44%" height="19">&nbsp;</td>
</tr>

<tr>
<td width="17%" align="right" height="19">

<font size="1" color="#C0C0C0">Subject:</font><font


size="1" face="Verdana" color="#C0C0C0">&nbsp; </font>
</td>
<td align="left" width="39%" height="19"><b>
<font size="2" color="#FFFFFF" face="Verdana">&nbsp;<
%=ttitle%></font></b></td>
<td align="left" width="44%" height="19">&nbsp;</td>
</tr>

<tr><td colspan="3"><p align="center"><b><u><font


face="Verdana" size="1" color="#C0C0C0">Notice</font></u></b></td></tr>
<tr><td colspan="3" height="23"><p style="margin-left: 5px;
text-indent:20px"><b><font size="2" color="#FFFFFF" face="Verdana">&nbsp;<%=tnotice
%></font></b></td>
</tr>
</table>
<form method="POST" action="dopublish.asp?T1=<%=tdate%>&T4=<%=ttime
%>&T2=<%=tby%>&T3=<%=ttitle%>&S1=<%=tnotice%>">
<p style="text-indent: 20px; margin-left: 5px" align="center">
<input type="submit" value="Publish" name="B1"></p>

20px">&nbsp;</td>

</form>
</tr>

</table>
</div></p></body></html>
OUTPUT:

<p style="margin-left:

DOPUBLISH.ASP
<html>
<head><title>B.E. Notice Board</title></head>
<body bgcolor="#333333">
<p align="center"><font size="5" color="#FFFFFF">
<%
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath
("Notice.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
rs.Open "select * from notice",conn,3,3
rs.AddNew

rs.fields(0)=request.QueryString("T1")
rs.fields(1)=request.QueryString("T4")
rs.fields(2)=request.QueryString("T2")
rs.fields(3)=request.QueryString("T3")
rs.fields(4)=request.QueryString("S1")
rs.Update
rs.close
conn.close
set conn=nothing
%>Your notice has been published successfully...
</font></p>
<p align="center"><b><font face="Verdana" size="2"><a href="notice.asp">
<font color="#FFFFFF"><span style="text-decoration: none">
<a target="_blank" href="notice.asp"><font color="#FFFFFF">
<span style="text-decoration: none">Preview your
notice</span></font></a></span></font></a><a target="_blank"
href="notice.asp"><font color="#FFFFFF"><span style="text-decoration: none">
</span></font></a></font></b></p>
</body>
</html>

OUTPUT:

NOTICE.ASP

<html>
<head><title>B.E. Notice Board</title></head>
<body bgcolor="#333333">
<p align="center"> <font face="Verdana" size="5" color="#FFFFFF"><b>ARMIET B.E.
Notice Board</b></font>
<p align="center"><p align="center">
<font face="Verdana" color="#FFFFFF" size="1"><a href="noticeall.asp">
<font color="#FFFFFF"><span style="text-decoration: none">Click here to view Previous
Notices</span></font></a></font><p align="center">
<font face="Verdana" size="5" color="#FFFFFF">&nbsp;Today's Notice</font><p
align="center">
<font face="Verdana" size="5" color="#FFFFFF"><br>
<%
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath
("Notice.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
rs.Open "select * from notice where ndate='"& date &"' order by id desc " ,conn,3,3
if not rs.EOF then
while not rs.EOF
%>
<div align="center">
<table border="1" width="66%" cellspacing="0" cellpadding="0"
bordercolor="#FFFFFF" style="border-collapse: collapse">
<tr>
<td>
<table border="0" width="99%" cellpadding="0" style="bordercollapse: collapse" height="117">
<tr>

<td width="17%" align="right" height="22">


<font size="1" face="Verdana"
color="#C0C0C0">Date :</font></td>
<font size="5" color="#FFFFFF">
<td align="left" height="22" width="41%"><b>

<font size="2" color="#FFFFFF"


face="Verdana">&nbsp;<%=rs.fields(0)%></font></b></td>
<font face="Verdana" size="5" color="#FFFFFF">
<td align="center" height="22" width="42%">
<p align="left">&nbsp;</td>
</tr>

<tr>
<td width="17%" align="right" height="19">
<font face="Verdana" size="1" color="#C0C0C0">
Time :</td>
<td align="left" width="41%" height="19"><b>
<font size="2" color="#FFFFFF">&nbsp;<
%=rs.fields(1)%></font></b></td>
<td align="center" width="42%" height="19">&nbsp;</td>
</tr>

<tr>
<td width="17%" align="right" height="19">
<font face="Verdana" size="1" color="#C0C0C0">
Notice By: </font>
</td>
<font size="5" color="#FFFFFF">
<td align="left" width="41%" height="19"><b>

<font size="2" color="#FFFFFF" face="Verdana">&nbsp;<


%=rs.fields(2)%></font></b></td>
<td align="center" width="42%" height="19">&nbsp;</td>
</tr>

<tr>
<td width="17%" align="right" height="19">
<font size="1" color="#C0C0C0">Subject:</font><font
size="1" face="Verdana" color="#C0C0C0">&nbsp; </font>
</td>
<td align="left" width="41%" height="19"><b>
<font size="2" color="#FFFFFF" face="Verdana">&nbsp;<
%=rs.fields(3)%></font></b></td>
<td align="left" width="42%" height="19">&nbsp;</td>
</tr>

<tr>
<td colspan="3">
<p align="center">
<b><u>
<font face="Verdana" size="1"
color="#C0C0C0">Notice</font></u></b></td>
</tr>
<tr>
<td colspan="3" height="23">
<p style="margin-left: 5px; text-indent:20px">
<b>
<font size="2" color="#FFFFFF">&nbsp;<
%=rs.fields(4)%></font></b></td>
</tr>

</table>
<p style="margin-left: 20px">&nbsp;</td>
</tr>
</table>
</div>

<br>

<%
rs.movenext
wend
else
response.write("No Notice Today")
end if
rs.close
conn.close
set conn=nothing
%>

</body>

</html>

OUTPUT:

EMPTY.ASP
<html><body><center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#569BE0" width="800" id="AutoNumber1">
<tr>
<td width="50%">
<form method="POST" action="../rate_pro/verify.asp">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
width="100%" bordercolor="#E1F0FF" id="AutoNumber2" height="58">
<tr>
<td width="100%" bgcolor="#E1F0FF" height="21">
<p align="left"><b><font face="Verdana" size="2" color="#000080">&nbsp;Error
Found:</font></b></td>
</tr>
<tr>
<td width="100%" height="36">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" width="100%" id="AutoNumber3" height="161">
<tr>
<td width="1%" height="161">&nbsp;</td>
<td width="98%" height="161"><center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" width="350" id="AutoNumber4" height="95">
<tr>
<td width="33%" height="35">
<p align="center"><b>
<font color="#FF0000" size="2" face="Verdana">ERROR!</font></b></td>

</tr>
<tr>
<td width="33%" height="60">
<p align="center"><b>
<font face="Verdana" size="2" color="#569BE0">Field is
empty....</font></b></td>
</tr>
<tr>
<td width="33%" height="19">
<p align="center">
</font><font face="Verdana,Geneva,Arial,Helvetica"
size="2">
<img src="arrow.gif">
<A HREF=Javascript:history.go(-1) style="text-decoration: none">
<font color="#000080">Go Back</font></a></font></p>
</td>
</tr>
</table>
</td>
<td width="1%" height="161">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr></table></body>

</html>
OUTPUT:

Anda mungkin juga menyukai