AdMentor homepage

/asp/freeapps/prodmentor/admin_question.asp

<!--#include file="includelogin.asp"--> <!--#include file="menu.inc"--> <!--#include file="incfaq.asp"--> <% Dim oConn Set oConn = CATEGORY_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 "&CATEGORY_GetTablePrefix()&"model where fldAuto = " & sID, oConn, 1, 3 Select Case Request.QueryString("action") Case "new" oRS.AddNew oRS("model").Value = Request.Form("model") oRS("descr").Value = Request.Form("descr") oRS("imgurl").Value = Request.Form("imgurl") oRS("orderingfield").Value = "ZZZZZZZZZZ" oRS("brand_fldAuto").Value = Request.QueryString("brand_fldAuto") Case "edit" oRS("model").Value = Request.Form("model") oRS("descr").Value = Request.Form("descr") oRS("imgurl").Value = Request.Form("imgurl") Case "del" oRS.Delete End Select oRS.Update oRS.Close Set oRS = Nothing oConn.Close Set oConn = Nothing Response.Redirect "admin_questions.asp?brand_fldAuto=" & Request.QueryString("brand_fldAuto") 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 name, descr, imgurl imgurl = "put your image url here" If Request.QueryString("action") = "edit" Then Dim oRS2 Set oRS2 = oConn.Execute( "select * from "&CATEGORY_GetTablePrefix()&"model where fldAuto = " & Request.QueryString("fldAuto") ) name = oRS2("model").Value descr = oRS2("descr").Value imgurl = oRS2("imgurl").Value oRS2.Close Set oRS2 = Nothing Else End If Dim oRSBrand, sCATEGORYName, nBrandID Set oRSBrand = oConn.Execute ("select * from "&CATEGORY_GetTablePrefix()&"brand where fldAuto = " & Request.QueryString("brand_fldAuto") ) nBrandID = Request.QueryString("brand_fldAuto") sCATEGORYName = oRSBrand("name") oRSBrand.Close Set oRSBrand = Nothing 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>ProductMentor - 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">ProdMentor <%=Session("fullname")%></font></b> </td> <td width="50%"> <%=CATEGORY_GetAd(1)%> </td> </tr> </table> <hr color="#000066" noShade SIZE="1"> <p><font size="+1"><%=sCATEGORYName%></font></p> <table border="0" width="100%"> <tr> <td width="70%"> <p align="left"><b>Model</b><br> <% Dim sURL sURL = "admin_question.asp?save=yes&action=" & Request.QueryString("action") sURL = sURL & "&fldAuto=" & Request.QueryString("fldAuto") sURL = sURL & "&brand_fldAuto=" & Request.QueryString("brand_fldAuto") %> <form method="POST" action="<%=sURL%>"> <p align="left">Model: <input type="text" name="model" size="40" value="<%=name%>"></p> <p align="left">Description:<textarea rows="4" name="descr" cols="35"><%=descr%></textarea></p> <p align="left">Image URL: <input type="text" name="imgurl" size="40" value='<%=imgurl%>'></p> <p align="left"><input type="submit" value="Submit" name="B1"></p> </form> <p><a href="admin_questions.asp?brand_fldAuto=<%=nBrandID%>">Back to current brand ( <%=sCATEGORYName%>)&nbsp;</a> <p><a href="admin_default.asp">Back to home&nbsp;</a> <p><font face="helvetica, arial" size="2">ProdMentor is developed by <a href="http://www.aspcode.net">ASPCode.net</a>. Usage of it is totally free.</font></p> <br> <table border="0" width="100%"> <tr> <td width="50%"> <%=CATEGORY_GetAd(3)%> </td> <td width="50%"> <%=CATEGORY_GetAd(2)%> </td> </tr> </table> </tr> <tr> <td width="70%"> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </body> </html>
Privacy policy