/asp/freeapps/prodmentor/admin_questions.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("brand_fldAuto")
sID = CInt( sID)
oRS.Open "select * from "&CATEGORY_GetTablePrefix()&"model where brand_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 oRSModels
Set oRSModels = oConn.Execute("select * from "&CATEGORY_GetTablePrefix()&"model where brand_fldAuto=" & Request.QueryString("brand_fldAuto") & " order by orderingfield" )
Dim oRSBrand, sCATEGORYName, nCategoryID
Set oRSBrand = oConn.Execute ("select * from "&CATEGORY_GetTablePrefix()&"brand where fldAuto = " & Request.QueryString("brand_fldAuto") )
sCATEGORYName = oRSBrand("name")
nCategoryID = oRSBrand("category_fldAuto")
oRSBrand.Close
Set oRSBrand = Nothing
'Get some info on current FAQ
%>
<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_questions.asp?brand_fldAuto=" & Request.QueryString("brand_fldAuto") & "&save=yes"
%>
<form method="POST" action="<%=sURL%>" name="FrontPage_Form1">
<table border="0" width="100%">
<tr>
<td width="11%" bgcolor="#ECECD9"><b>Model</b></td>
<td width="11%" bgcolor="#ECECD9"><b>Description</b></td>
<td width="11%" bgcolor="#ECECD9"><b>Image URL</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 oRSModels.EOF
Dim sName
sName = "order" & oRSModels("fldAuto").Value
%>
<tr>
<td width="11%"><%=oRSModels("model")%></td>
<td width="11%"><%=oRSModels("descr")%></td>
<td width="11%"><img src="<%=oRSModels("imgurl")%>"></td>
<td width="16%">
<input type="text" name="<%=sName%>" size="7" value="<%=nVal%>"></td>
<td width="34%"><a href="admin_question.asp?action=edit&fldAuto=<%=oRSModels("fldAuto")%>&brand_fldAuto=<%=Request.QueryString("brand_fldAuto")%>">Modify</a> -<a href="admin_question.asp?save=yes&action=del&fldAuto=<%=oRSModels("fldAuto")%>&brand_fldAuto=<%=Request.QueryString("brand_fldAuto")%>"> Delete</a></td>
</tr>
<%
nVal = nVal + 1
oRSModels.MoveNext
Wend
oRSModels.Close
Set oRSModels = Nothing
%>
</table>
<p align="left">
<p align="left"><input type="submit" value="Change product ordering" name="B1">
<a href="admin_question.asp?action=new&brand_fldAuto=<%=Request.QueryString("brand_fldAuto")%>">Add new
product</a></p>
</form>
<%
Set oRSCATEGORY = oConn.Execute ("select * from "&CATEGORY_GetTablePrefix()&"category where fldAuto = " & nCategoryID )
sCATEGORYName = oRSCATEGORY("name")
oRSCATEGORY.Close
%>
<p><a href="admin_chapters.asp?category_fldAuto=<%=nCategoryId%>">Back to current category ( <%=sCATEGORYName%> ) </a>
<%
Set oRSCATEGORY = oConn.Execute ("select * from "&CATEGORY_GetTablePrefix()&"category where fldAuto = " & nCategoryID )
sCATEGORYName = oRSCATEGORY("name")
oRSCATEGORY.Close
Set oRSCATEGORY = Nothing
oConn.Close
Set oConn = Nothing
%>
<p><a href="admin_default.asp">Back
to home </a></p><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>