home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
202.53.64.216
/
202.53.64.216.tar
/
202.53.64.216
/
janahitha
/
Admin
/
AdsAdminUpdateZone.asp
< prev
next >
Wrap
Text File
|
2004-11-26
|
5KB
|
133 lines
<%
if session("AdminLogin")="" then Response.Redirect "default.asp"
%>
<!-- #include file="AdsAdminConstants.asp" -->
<!-- #include file="../AdsOpenConn.asp" -->
<%
if Request.Form.Count = 0 then
zoneid = Request.querystring("zoneid")
msg = ""
set rs = server.CreateObject("adodb.recordset")
sql = "select ZoneName, ZoneDescription,Zoneimage, ZoneStatus from ZoneMaster where ZoneId=" + zoneid
rs.open sql, con, 3, 3
zonename = rs("ZoneName")
zonedescription = rs("ZoneDescription")
zonestatus = rs("ZoneStatus")
Zoneimage=rs("Zoneimage")
rs.close
%>
<html>
<head>
<title> <%=SiteName%> - Welcome </title>
<meta name="author" content="Jagadish">
<script language="javascript" src="../func.js"></script>
<script language="javascript">
function check()
{
validateform = document.updatezoneform;
if(isempty(validateform.zonename))
validateform.zonename.focus();
else
if(isempty(validateform.zonedescription))
validateform.zonedescription.focus();
else
validateform.submit();
}
</script>
</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=100 bgcolor="<%=OuterTblBGColor%>">
<br>
<form name="updatezoneform" method=post action="<%=Request.ServerVariables("script_name")%>">
<table cellpadding=0 cellspacing=0 border=0>
<tr> <td bgcolor="<%=TblBorderColor%>">
<table cellspacing=1 cellpadding=3 border=0 width=350>
<tr bgcolor="<%=TblHeadBGColor%>">
<th colspan=2>
<font face=verdana color="<%=TblHeadFGColor%>"> Update A Zone </font>
</td>
</tr>
<tr bgcolor="<%=TblBGColor%>">
<td width="50%">
<font face="verdana" size=2 color="<%=TblFGColor%>"> Zone Name </font>
</td>
<td width="50%">
<input type=text name="zonename" maxlength="50" value="<%=zonename%>">
</td>
</tr>
<tr bgcolor="<%=TblBGColor%>">
<td>
<font face="verdana" size=2 color="<%=TblFGColor%>"> Description </font>
</td>
<td>
<input type=text name="zonedescription" maxlength="250" value="<%=zonedescription%>">
</td>
</tr>
<tr bgcolor="<%=TblBGColor%>">
<td>
<font face="verdana" size=2 color="<%=TblFGColor%>"> Active Or Not? </font>
</td>
<td>
<font face=verdana size=2 color="<%=RadioColor%>">
<input type=radio name="zonestatus" value="1" <%if zonestatus then%>checked<%end if%>> Yes
<input type=radio name="zonestatus" value="0" <%if not zonestatus then%>checked<%end if%>> No
</font>
</td>
</tr>
</table>
</td> </tr>
</table>
<br>
<input type=hidden name="zoneid" value="<%=zoneid%>">
<input type=button value="Update The Zone" onclick="javascript:check();" id=button1 name=button1>
</form><br>
<image src="../mapimages/<%=Zoneimage%>" width=200 height=200>
<font face=verdana size=2 color="<%=ContentColor%>"> Do you want to update the image </br>
<form enctype="multipart/form-data" name="form" method=post action="AdsAdminUpdateZoneImage.asp">
Select The Image</font> <input type=file name=YourFile>
<input type=hidden name=hid value=<%=zoneid%>><br>
<input type=submit value="Upload" id=submit1 name=submit1>
</form>
</td>
<td bgcolor="<%=RightColor%>"> </td>
</tr>
<tr>
<td colspan=2 bgcolor="<%=LeftColor%>"> </td>
<td colspan=2 bgcolor="<%=RightColor%>"> </td>
</tr>
</table>
</body>
</html>
<%
set rs = nothing
else
zoneid = Request.Form("zoneid")
zonename = replace(trim(Request.Form("zonename")), "'", "''")
zonedescription = replace(trim(Request.Form("zonedescription")), "'", "''")
zonestatus = Request.Form("zonestatus")
sql = "update ZoneMaster set ZoneName='" + zonename + "', ZoneDescription='" + zonedescription + "', ZoneStatus=" + zonestatus + " where ZoneId=" + zoneid
con.execute sql
Response.Redirect "AdsAdminViewZones.asp"
end if
%>
<!-- #include file="../AdsCloseConn.asp" -->