AdMentor homepage

/asp/freeapps/prodmentor/admin_chapters.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") 'Change ordering... Dim sID, nFldAuto sID = Request.QueryString("category_fldAuto") sID = CInt( sID) oRS.Open "select * from "&CATEGORY_GetTablePrefix()&"brand where category_fldAuto = " & sID, oConn, 1, 3 While Not oRS.EOF nFldAuto = oRS("fldAuto") oRS("orderingfield") = Request.Form("order" & nFldAuto) oRS.Update oRS.MoveNext Wend oRS.Close Set oRS = Nothing 'oConn.Close 'Set oConn = Nothing 'Response.Redirect "default.asp" 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 Dim oRSBrands Set oRSBrands = oConn.Execute("select * from "&CATEGORY_GetTablePrefix()&"brand where category_fldAuto=" & Request.QueryString("category_fldAuto") & " order by orderingfield" ) Dim oRSCATEGORY, sCATEGORYName Set oRSCATEGORY = oConn.Execute ("select * from "&CATEGORY_GetTablePrefix()&"category where fldAuto = " & Request.QueryString("category_fldAuto") ) sCATEGORYName = oRSCATEGORY("name") oRSCATEGORY.Close Set oRSCATEGORY = 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%"> <% Dim sURL sURL = "admin_chapters.asp?category_fldAuto=" & Request.QueryString("category_fldAuto") & "&save=yes" %> <form method="POST" action="<%=sURL%>" name="FrontPage_Form1"> <table border="0" width="100%"> <tr> <td width="22%" bgcolor="#ECECD9"><b>Brand name</b></td> <td width="16%" bgcolor="#ECECD9"><b>Ordernumber</b></td> <td width="34%" bgcolor="#ECECD9"><b>Actions</b></td> </tr> <% Dim nVal nVal = 1 While Not oRSBrands.EOF Dim sName sName = "order" & oRSBrands("fldAuto").Value %> <tr> <td width="22%"><%=oRSBrands("name")%></td> <td width="16%"> <input type="text" name="<%=sName%>" size="7" value="<%=nVal%>"></td> <td width="34%"><a href="admin_chapter.asp?action=edit&amp;category_fldAuto=<%=Request.QueryString("category_fldAuto")%>&amp;fldAuto=<%=oRSBrands("fldAuto")%>">Modify</a> -<a href="admin_chapter.asp?save=yes&amp;action=del&amp;category_fldAuto=<%=Request.QueryString("category_fldAuto")%>&amp;fldAuto=<%=oRSBrands("fldAuto")%>"> Delete</a> - <a href="admin_questions.asp?brand_fldAuto=<%=oRSBrands("fldAuto")%>"> Products</a></td> </tr> <% nVal = nVal + 1 oRSBrands.MoveNext Wend oRSBrands.Close Set oRSBrands = Nothing oConn.Close Set oConn = Nothing %> </table> <p align="left">&nbsp; <p align="left"><input type="submit" value="Change category ordering" name="B1">&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin_chapter.asp?action=new&amp;category_fldAuto=<%=Request.QueryString("category_fldAuto")%>">Add new brand</a></p> </form> <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> <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