/asp/freeapps/postcardmentor/admin_cat.asp
<!--#include file="menu.inc"-->
<!--#include file="inccard.asp"-->
<!--#include file="includelogin.asp"-->
<%
Dim oConn
Set oConn = Postcard_GetDatabaseConn()
Dim oRS
If Request.QueryString("save")="yes" Then
Set oRS = Server.CreateObject("ADODB.Recordset")
Dim sID
sID = Request.QueryString("fldAuto")
If sID = "" Then
sID = 0
Else
sID = CInt( sID)
End If
oRS.Open "select * from " & Postcard_GetTablePrefix() & "cat where fldAuto = " & sID, oConn, 1, 3
Select Case Request.QueryString("action")
Case "new"
oRS.AddNew
oRS("name").Value = Request.Form("name")
Case "edit"
oRS("name").Value = Request.Form("name")
Case "del"
oRS.Delete
End Select
oRS.Update
oRS.Close
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
Response.Redirect "admin_cats.asp"
Response.Flush
Response.End
End If
%>
<html>
<head>
<%
''''''''''' (C) Stefan Holmberg 1999
''''''''''' Free to use if these sourcecode lines is not deleted
''''''''''' Contact me at webmaster@sqlexperts.com
''''''''''' http://www.sqlexperts.com
''''''''''' AdMentor homepage at http://www.create-a-webshop.com
Dim sName
If Request.QueryString("action") = "edit" Then
Dim oRS2
Set oRS2 = oConn.Execute( "select name from " & Postcard_GetTablePrefix() & "cat where fldAuto = " & Request.QueryString("fldAuto") )
sName = oRS2("name").Value
oRS2.Close
Set oRS2 = Nothing
End If
oConn.Close
Set oConn = Nothing
%>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>PostcardMentor - Admin interface</title>
<style type="text/css">
<!--
body { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
td { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
th { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: underline;}
-->
</style>
</head>
<body>
<table align="center" bgColor="#ECECD9" border="0" cellPadding="3" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td vAlign="top" width="50%" height="60">
<b><a href="http://www.aspcode.net"><font face="verdana,arial,helvetica" size="1">http://www.aspcode.net</font></a></b>
</td>
<td vAlign="top" width="468" height="60">
<b><font face="verdana,arial,helvetica" size="+2">Admin
interface</font></b>
<table border="0" width="100%">
<tr>
<td width="50%">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100%" vAlign="top" width="100%" colspan="2">
<table align="center" bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td height="100%" vAlign="top" width="85%">
<table bgColor="#ffffff" border="0" cellPadding="10" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td align="left" height="100%" vAlign="top" width="65%">
<table border="0" width="100%">
<tr>
<td width="50%"><b><font color="#aa3333" face="verdana,arial,helvetica" size="4">PostcardMentor <%=Session("fullname")%></font></b>
</td>
<td width="50%">
<b>Categories</b>
</td>
</tr>
</table>
<font color="#aa3333" face="verdana,arial,helvetica" size="+2">
<hr color="#000066" noShade SIZE="1">
</font>
<table border="0" width="100%">
<tr>
<td width="120" valign="top">
<%AdAdminWriteMenu%></td>
<td width="70%">
<p align="left"><br>
<%
Dim sURL
sURL = "admin_cat.asp?save=yes&action=" & Request.QueryString("action")
If Request.QueryString("action") <> "new" Then
sURL = sURL & "&fldAuto=" & Request.QueryString("fldAuto")
End If
%>
<form method="POST" action="<%=sURL%>">
<p align="left">Name: <input type="text" name="name" size="20" value="<%=sName%>"></p>
<p align="left"><input type="submit" value="Submit" name="B1"></p>
</form>
<p>
<p><font face="helvetica, arial" size="2">PostcardMentor is
developed by <a href="http://www.aspcode.net">ASPCode.net</a>. Usage of it is totally free.</font></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>