Clarification of Question by
steven1981-ga
on
06 Jan 2005 17:11 PST
ok, i have two folders in root directory, database and webroot.
obviously i have my database in the database directory. within the
webroot folder i have a folder called connections. within this code
lies connshoes.asp;
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connshoes_STRING
MM_connshoes_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="
& Server.MapPath("\thehotspotuk\db\shoes.mdb")
%>
also in the webroot directory i have a folder called asp. this is
where i keep all my asp pages. the page that i am struggling with is
products.asp;
<% Response.Buffer=True %>
<%
Kind=Request("Kind")
if Kind="" or isempty(Kind) then
Kind="New Kinds"
end if
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
%>
<!--#include virtual="/connections/connshoes.asp"-->
<%
set rsKinds=server.createobject("adodb.recordset")
if Kind="New Kinds" then
sqlKinds="select * from shoes where Catalogt='New' order by name"
elseif Kind="Stocking" then
sqlKinds="select * from shoes where Catalogt='stocking' order by name"
elseif Kind="Popular" then
sqlKinds="select * from shoes where Catalogt='Popular' order by name"
else
sqlKinds="select * from shoes where Kind='"&Kind&"'"&" order by name"
end if
rsKinds.open sqlKinds,conn,1,1
if rsKinds.bof and rsKinds.eof then
response.write"<SCRIPT language=JavaScript>alert('No information in
database. Check here return. Thanks.');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.End
end if
if request("result_num")<>"" then
result_num=request("result_num")
rsKinds.pagesize=cint(result_num)
else
result_num=8
rsKinds.pagesize=8
end if
if pagecount>rsKinds.pagecount or pagecount<=0 then
pagecount=1
end if
rsKinds.AbsolutePage=pagecount
page_start=(pagecount-1)*rsKinds.pagesize+1
page_end=page_start+rsKinds.pagesize-1
if pagecount=1 then
page_start=1
qs_serialNum=page_start
page_end=rsKinds.pagesize*pagecount
end if
if pagecount*rsKinds.pagesize=>rsKinds.recordcount then
page_end=rsKinds.recordcount
end if
%>
<html>
<head>
<title>CALLV International Trading Inc.-------Wholesale all kinds of items.</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
function jumppage(pageno){
document.formJumpPage.Page.value=pageno;
document.formJumpPage.submit();
}
function jumppage2(result_num){
document.formJumpPage.Page.value=1;
document.formJumpPage.result_num.value=result_num;
document.formJumpPage.submit();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<link href="../style.css" rel="stylesheet" type="text/css">
<meta name="Author" content="Xiamen XuYing Technology;QiuQin
Design;xuying.net;qiuqin.com;chrysan@xuying.net;Chrysan Zhu">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0" background="../image/bg_01.gif" text="#666666"
link="#6666CC" vlink="#CC3366" alink="#FFCC00"
onLoad="MM_preloadImages('../image/bt_01_on.gif','../image/bt_02_on.gif','../image/bt_03_on.gif','../image/bt_04_on.gif','../image/bt_05_on.gif','../image/visited_on.gif')">
<table width="646" border="0" cellspacing="0" cellpadding="0"
align="center" height="100%">
<tr>
<td bgcolor="#99CC66" valign="top">
<table width="646" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="../image/obj_topimage_01.jpg"
align="right"><a href="http://www.ems.com.cn"><img
src="../image/obj_sitemap.jpg" width="74" height="18"></a><a
href="mailto:epifa_cn@hotmail.com"><img src="../image/obj_mail.jpg"
width="57" height="18"></a></td>
</tr>
<tr>
<td><img src="../image/obj_topimage_02.jpg" width="646"
height="120"></td>
</tr>
<tr>
<td background="../image/bg_02.gif">
<table width="646" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14"><img src="../image/spacer.gif"
width="14" height="1"></td>
<td width="130"><img src="../image/obj_sitetitle.gif"
width="200" height="18"></td>
<td align="right">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="../index.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu01','','../image/bt_01_on.gif',1)"><img
name="menu01" border="0" src="../image/bt_01_off.gif"
height="19"></a></td>
<td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
<td><a href="about.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu02','','../image/bt_02_on.gif',1)"><img
name="menu02" border="0" src="../image/bt_02_off.gif"
height="19"></a></td>
<td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu03','','../image/bt_03_on.gif',1)"><img
name="menu03" border="0" src="../image/bt_03_off.gif"
height="19"></a></td>
<td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
<td><a href="contact.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu04','','../image/bt_04_on.gif',1)"><img
name="menu04" border="0" src="../image/bt_04_off.gif"
height="19"></a></td>
<td><img src="../image/obj_menu.gif" width="17"
height="18"></td>
<td><a href="freight.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu05','','../image/bt_05_on.gif',1)"><img
name="menu05" border="0" src="../image/bt_05_off.gif"
height="19"></a></td>
<td width="10"><img src="../image/spacer.gif"
width="10" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="../image/obj_topimage_03.gif" width="646" height="16"></td>
</tr>
</table>
<table width="644" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="15"><img src="../image/spacer.gif"
width="15" height="1"></td>
<td width="194" valign="top"><img
src="../image/ba_profile.gif" width="174" height="29">
<br>
<table width="175" height="25" border="0">
<tr>
<td><a href="Order.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('menu_visit','','../image/visited_on.gif',1)"><img
name="menu_visit" border="0" src="../image/visited.gif" width="100%"
height="25"></a></td>
</tr>
</table>
<br>
<!--include virtual="/asp/ProList.asp" -->
<br>
<br>
</td>
<td valign="top"> <br>
<strong><font size="4" face="Verdana, Arial, Helvetica,
sans-serif, Times New Roman, ËÎÌå"><%=Kind%></font></strong><br>
<%
i=1
ii=page_start+1
do while not rsKinds.eof
%><br>
<table width=100% border=0 cellspacing=2 cellpadding=0 align=center>
<tr>
<td width="49%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90" align="center" valign="top"><a
href="#" onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"><img
src=".<%=rsKinds("File name")%>" width="80" height="60"
border="0"></a></td>
<td valign="top"><a href="#"
onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"
class=TopL><%=rsKinds("Brand")%> <%=rsKinds("Name")%></a><%if
rsKinds("Catalogt")="New" then%><img src="../image/isnew.gif"
border="0"><%elseif rsKinds("Catalogt")="Popular" then%><img
src="../image/ishot.gif" border="0"><%end if%><br>
Colorset:<%=rsKinds("Colorset")%><br>
Size:<%=rsKinds("Size")%><br></td>
</tr>
</table></td>
<%
if ii>rsKinds.recordcount then
else
rsKinds.movenext
i=i+1
ii=ii+1
%>
<td width="49%" valign="top"><table width="100%"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90" align="center" valign="top"><a
href="#" onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"><img
src=".<%=rsKinds("File name")%>" width="80" height="60"
border="0"></a></td>
<td valign="top"><a href="#"
onClick="MM_openBrWindow('photo_02.asp?psid=<%=rsKinds("id")%>','inquiryadd','scrollbars=yes,resizable=yes,width=600,height=450')"
class=TopL><%=rsKinds("Brand")%> <%=rsKinds("Name")%></a><%if
rsKinds("Catalogt")="New" then%><img src="../image/isnew.gif"
border="0"><%elseif rsKinds("Catalogt")="Popular" then%><img
src="../image/ishot.gif" border="0"><%end if%><br>
Colorset:<%=rsKinds("Colorset")%><br>
Size:<%=rsKinds("Size")%><br></td>
</tr>
</table></td>
<%end if%>
</tr>
</table>
<%
i=i+1
ii=ii+1
qs_serialNum=qs_serialNum+1
rsKinds.movenext
if i>=rsKinds.PageSize then exit do
loop
%>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">Total:<span
class="red"><%=rsKinds.recordcount%></span>Items. View:<span
class=red><%=page_start%>~<%=page_end%></span>Item. Page:<span
class=red><%=pagecount%></span>/<%=rsKinds.pagecount%>
<%if pagecount=1 and rsKinds.pagecount=pagecount
then%><% end if%>
<%if pagecount=1 and rsKinds.pagecount<>pagecount then%><a
href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount+1)%>&result_num=<%=result_num%>">[Next]</a><%
end if %>
<% if rsKinds.pagecount>1 and rsKinds.pagecount=pagecount then
%><a href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount-1)%>&result_num=<%=result_num%>">[Previous]</a><%end
if%>
<%if pagecount<>1 and rsKinds.pagecount<>pagecount then%><a
href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount-1)%>&result_num=<%=result_num%>">[Previous]</a> <a
href="products.asp?kind=<%=kind%>&page=<%=cstr(pagecount+1)%>&result_num=<%=result_num%>">[Next]</a><%end
if%>
<br><%if rsKinds.PageCount>1 then%> <select class="input"
name="gopage" onChange="javascript:jumppage(this.value);">
<option>Go to</option>
<%
soonhost=0
DO WHILE NOT soonhost = rsKinds.PageCount %>
<option value="<% =soonhost+1 %>">Page <%
=soonhost+1 %></option>
<% soonhost=soonhost+1
loop
%>
</select> <%end if%><%if rsKinds.recordcount>10
then%> <select class="input" name="gopage2"
onChange="javascript:jumppage2(this.value);">
<option>View ever page</option>
<option value="4">4 Items/Page</option>
<option value="8">8 Items/Page</option>
<option value="12">12 Items/Page</option>
<option value="16">16 Items/Page</option>
<option value="20">20 Items/Page</option>
<option value="30">30 Items/Page</option>
<option value="40">40 Items/Page</option>
<option value="50">50 Items/Page</option>
</select>
<%end if%></td>
</tr>
</table> </td>
<td width="15"><img src="../image/spacer.gif"
width="15" height="1"></td>
</tr><form name="formJumpPage" method="post" action="products.asp">
<input type=hidden name="Page" value="">
<input type=hidden name="Kind" value="<%=Kind%>">
<input type=hidden name="result_num" value="<%=result_num%>">
</form>
</table>
<table width="646" border="0" cellspacing="0" cellpadding="0" background="">
<tr>
<td bgcolor="#99CC66" width="1"><img
src="../image/spacer.gif" width="1" height="1"></td>
<td width="644" bgcolor="#FFFFFF"></td>
<td bgcolor="#99CC66" width="1"><img
src="../image/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<table width="644" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../image/obj_footer.gif" width="646" height="16"></td>
</tr>
<tr>
<td align="center" class="small_white">Copyright ©2004 CALLV
International Trading Inc.All rights reserved</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
</body>
</html>
i know that all the links to the images are missing, but this should
not be a problem should it?