home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
202.53.64.216
/
202.53.64.216.tar
/
202.53.64.216
/
janahitha
/
Admin
/
AdsAdminViewZones.asp
< prev
next >
Wrap
Text File
|
2004-11-26
|
7KB
|
179 lines
<%
if session("AdminLogin")="" then Response.Redirect "default.asp"
%>
<!-- #include file="AdsAdminConstants.asp" -->
<!-- #include file="../AdsOpenConn.asp" -->
<%
if Request.Form.Count=0 then
sql = "select ZoneId, ZoneName, ZoneDescription, ZoneStatus from ZoneMaster Order by ZoneName"
set rs = server.CreateObject("adodb.recordset")
msg = ""
rs.open sql, con, 3, 3
if rs.RecordCount=0 then msg = "No Records Found"
rs.Close
if msg<>"" then
%>
<html>
<head>
<title> <%=SiteName%> - Welcome </title>
<meta name="author" content="Jagadish">
</head>
<body bottommargin=0 topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 bgcolor=#ffffff>
<table cellpadding=0 cellspacing=0 border=0 width=780 height=450>
<tr height=1>
<td width="100" bgcolor="<%=LeftColor%>"><font face=verdana size=1> </font></td>
<td width="290" bgcolor="<%=LeftColor%>"><font face=verdana size=1> </font></td>
<td width="290" bgcolor="<%=RightColor%>"><font face=verdana size=1> </font></td>
<td width="100" bgcolor="<%=RightColor%>"><font face=verdana size=1> </font></td>
</tr>
<tr>
<td bgcolor="<%=LeftColor%>" colspan=2 valign=top > <font face="courier new" size=6 color="<%=SiteNameColor%>"> <b> <%=SiteName%> </b> </font> </td>
<td bgcolor="<%=RightColor%>" colspan=2 align=right valign=top> <font face=verdana size=2> <a href="AdsAdminHome.asp"><font color="<%=TopLinksColor%>">Home</font></a> <a href="AdsAdminHome.asp?lo"><font color="<%=TopLinksColor%>">Logout</font></a> </font> </td>
</tr>
<tr>
<td bgcolor="<%=LeftColor%>"> </td>
<td colspan=2 align=center height=200 bgcolor="<%=OuterTblBGColor%>">
<table cellpadding=2 cellspacing=0 border=0>
<tr> <td bgcolor="<%=OuterTblBorderColor%>">
<table width="576" bgcolor=<%=OuterTblBGColor%> height=200 border=0 cellpadding=0 cellspacing=0>
<tr>
<th>
<br>
<font face=verdana size=2 color="<%=ErrMsgColor%>">
<%=msg%> <br> <br>
<a href="javascript:history.back();"><font color="<%=ErrMsgColor%>">Back</font></a>
</font>
</th>
</tr>
</table>
</td> </tr>
</table>
</td>
<td bgcolor="<%=RightColor%>"> </td>
</tr>
<tr>
<td colspan=2 bgcolor="<%=LeftColor%>"> </td>
<td colspan=2 bgcolor="<%=RightColor%>"> </td>
</tr>
</table>
</body>
</html>
<%
Response.End
end if
%>
<html>
<head>
<title> <%=SiteName%> - Welcome </title>
<meta name="author" content="Jagadish">
</head>
<body bottommargin=0 topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 bgcolor=#ffffff>
<table cellpadding=0 cellspacing=0 border=0 width=780 height=450>
<tr height=1>
<td width="50" bgcolor="<%=LeftColor%>"><font face=verdana size=1> </font></td>
<td width="340" bgcolor="<%=LeftColor%>"><font face=verdana size=1> </font></td>
<td width="340" bgcolor="<%=RightColor%>"><font face=verdana size=1> </font></td>
<td width="50" bgcolor="<%=RightColor%>"><font face=verdana size=1> </font></td>
</tr>
<tr>
<td bgcolor="<%=LeftColor%>" colspan=2 valign=top > <font face="courier new" size=6 color="<%=SiteNameColor%>"> <b> <%=SiteName%> </b> </font> </td>
<td bgcolor="<%=RightColor%>" colspan=2 align=right valign=top> <font face=verdana size=2> <a href="AdsAdminHome.asp"><font color="<%=TopLinksColor%>">Home</font></a> <a href="AdsAdminHome.asp?lo"><font color="<%=TopLinksColor%>">Logout</font></a> </font> </td>
</tr>
<tr>
<td bgcolor="<%=LeftColor%>"> </td>
<td colspan=2 align=center height=200 bgcolor="<%=OuterTblBGColor%>">
<br>
<form name="viewbookingform" method=post action="<%=Request.ServerVariables("script_name")%>">
<table cellpadding=0 cellspacing=0 border=0>
<tr> <td bgcolor="<%=TblBordercolor%>">
<table width="600" border=0 cellpadding=3 cellspacing=1>
<tr bgcolor="<%=TblHeadBGColor%>">
<th>
<font face=verdana size=2 color="<%=TblHeadFGColor%>"> SNo </font>
</th>
<th>
<font face=verdana size=2 color="<%=TblHeadFGColor%>"> Zone Name </font>
</th>
<th>
<font face=verdana size=2 color="<%=TblHeadFGColor%>"> Zone Description </font>
</th>
<th>
<font face=verdana size=2 color="<%=TblHeadFGColor%>"> Status </font>
</th>
<th>
<font face=verdana size=2 color="<%=TblHeadFGColor%>"> </font>
</th>
<th>
<font face=verdana size=2 color="<%=TblHeadFGColor%>"> Delete </font>
</th>
</tr>
<%
rs.Open sql, con, 3, 3
sno = 0
while not rs.EOF
sno = sno + 1
if rs("ZoneStatus") then
Status = "Active"
else
Status = "Inactive"
end if
%>
<tr bgcolor="<%=TblBGColor%>">
<td align=right>
<font face=verdana size=2 color="<%=TblFGColor%>"> <%=sno%> </font>
<input type=hidden name="ids" value="<%=rs("ZoneId")%>">
</td>
<td>
<font face=verdana size=2 color="<%=TblFGColor%>"> <%=rs("ZoneName")%> </font>
</td>
<td>
<font face=verdana size=2 color="<%=TblFGColor%>"> <%=rs("ZoneDescription")%> </font>
</td>
<td align=center>
<font face=verdana size=2 color="<%=TblFGColor%>"> <%=Status%> </font>
</td>
<td align=center>
<a href="AdsAdminUpdateZone.asp?zoneid=<%=rs("ZoneId")%>"><font face=verdana size=2 color="<%=NewLinkColor%>">Update</font></a>
</td>
<td align=center>
<input type=checkbox name="delete<%=rs("ZoneId")%>">
</td>
</tr>
<%
rs.MoveNext
wend
rs.Close
set rs = nothing
%>
<tr bgcolor="<%=TblHeadBGColor%>">
<th colspan=7>
<input type=submit value=" Delete Selected Zones ">
</th>
</tr>
</table>
</td> </tr>
</table>
</form>
</td>
<td bgcolor="<%=RightColor%>"> </td>
</tr>
<tr>
<td colspan=2 bgcolor="<%=LeftColor%>"> </td>
<td colspan=2 bgcolor="<%=RightColor%>"> </td>
</tr>
</table>
</body>
</html>
<%
else
ids = split(Request.Form("ids"), ", ")
for i = 0 to ubound(ids)
if Request.Form("delete" + ids(i))="on" then
sql = "delete from ZoneMaster where ZoneId=" + ids(i)
con.execute sql
end if
next
Response.Redirect Request.ServerVariables("script_name")
end if
%>
<!-- #include file="../AdsCloseConn.asp" -->