File: D:/web/homefly/inc/incprodopts.asp
<%
'This code is copyright (c) Internet Business Solutions SL, all rights reserved.
'The contents of this file are protect under law as the intellectual property
'of Internet Business Solutions SL. Any use, reproduction, disclosure or copying
'of any kind without the express and written permission of Internet Business
'Solutions SL is forbidden.
'Author: Vince Reid, vince@virtualred.net
if Session("loggedon") <> "virtualstore" then response.end
Dim sSQL,rs,alldata,success,cnn,rowcounter,netnav,errmsg,aOption,index,iID,bOption,fieldDims,shipType
netnav = true
if instr(Request.ServerVariables("HTTP_USER_AGENT"), "compatible") > 0 OR instr(Request.ServerVariables("HTTP_USER_AGENT"), "Gecko") > 0 then netnav = false
function atb(size)
if netnav then
atb = CInt(size / 2 + 1)
else
atb = size
end if
end function
success=true
Set rs = Server.CreateObject("ADODB.RecordSet")
Set cnn=Server.CreateObject("ADODB.Connection")
cnn.open sDSN
sSQL = "SELECT adminShipping FROM admin"
rs.Open sSQL,cnn,0,1
shipType = Int(rs("adminShipping"))
rs.Close
sSQL = ""
alldata=""
if request.form("posted")="1" then
if request.form("act")="delete" then
sSQL = "SELECT poID FROM prodOptions WHERE poOptionGroup=" & request.form("id")
rs.Open sSQL,cnn,0,1
index=0
if NOT rs.EOF then
success=false
errmsg = "There was an error updating your product options.<br>"
errmsg = errmsg & "There are products still using this product option. Please change or delete these first."
end if
rs.Close
if success then
' on error resume next
sSQL = "DELETE FROM options WHERE optGroup=" & request.form("id")
cnn.Execute(sSQL)
sSQL = "DELETE FROM optionGroup WHERE optGrpID=" & request.form("id")
cnn.Execute(sSQL)
if err.number<>0 then
success=false
errmsg = "There was an error writing to the database.<br>"
if err.number = -2147467259 then
errmsg = errmsg & "Your database does not have write permissions."
else
errmsg = errmsg & err.description
end if
else
response.write "<meta http-equiv=""refresh"" content=""3; url=adminprodopts.asp"">"
end if
on error goto 0
end if
elseif request.form("act")="domodify" OR request.form("act")="doaddnew" then
sSQL = ""
Redim aOption(3,maxprodopts)
bOption=false
for rowcounter=0 to maxprodopts-1
if Trim(request.form("opt"&rowcounter))<>"" then
bOption=true
aOption(0,rowcounter)=Replace(Trim(request.form("opt"&rowcounter)),"'","''")
if IsNumeric(Trim(request.form("pri"&rowcounter))) then
aOption(1,rowcounter)=Trim(request.form("pri"&rowcounter))
else
aOption(1,rowcounter)=0
end if
if shipType = 3 then
if IsNumeric(Trim(request.form("wei"&rowcounter))) then
aOption(2,rowcounter)=Trim(request.form("wei"&rowcounter))
else
aOption(2,rowcounter)="0"
end if
if Int(Trim(request.form("weo"&rowcounter))) < 10 then
aOption(2,rowcounter)= aOption(2,rowcounter) & ".0" & Trim(request.form("weo"&rowcounter))
else
aOption(2,rowcounter)= aOption(2,rowcounter) & "." & Trim(request.form("weo"&rowcounter))
end if
else
if IsNumeric(Trim(request.form("wei"&rowcounter))) then
aOption(2,rowcounter)=Trim(request.form("wei"&rowcounter))
else
aOption(2,rowcounter)=0
end if
end if
else
aOption(0,rowcounter)=""
end if
next
' on error resume next
if (trim(request.form("secname"))="" OR NOT bOption) AND Request.Form("optType")<>"3" then
success=false
errmsg = "There was an error updating your product options.<br>"
errmsg = errmsg & "You must specify at least one option."
else
if Request.Form("optType")="3" then
fieldDims = Trim(request.form("pri0"))&"."
if Int(request.form("fieldheight")) < 10 then fieldDims = fieldDims & "0"
fieldDims = fieldDims & Trim(request.form("fieldheight"))
if request.form("act")="doaddnew" then
rs.Open "optionGroup",cnn,1,3,&H0002
rs.AddNew
rs.Fields("optGrpName") = trim(request.form("secname"))
if Request.Form("forceselec")="ON" then
rs.Fields("optType") = Request.Form("optType")
else
rs.Fields("optType") = 0 - Int(Request.Form("optType"))
end if
if trim(request.form("workingname"))="" then
rs.Fields("optGrpWorkingName") = trim(request.form("secname"))
else
rs.Fields("optGrpWorkingName") = trim(request.form("workingname"))
end if
rs.Update
iID = rs.Fields("optGrpID")
rs.Close
sSQL = "INSERT INTO options (optGroup,optName,optPriceDiff,optWeightDiff) VALUES ("&iID&",'"&Replace(Trim(request.form("opt0")),"'","''")&"',"&fieldDims&",0)"
cnn.Execute(sSQL)
else
iID = request.form("id")
sSQL = "UPDATE optionGroup SET optGrpName='"&Replace(trim(request.form("secname")),"'","''")&"'"
if Request.Form("forceselec")="ON" then
sSQL = sSQL & ",optType=" & Request.Form("optType")
else
sSQL = sSQL & ",optType=" & (0 - Int(Request.Form("optType")))
end if
if trim(request.form("workingname"))="" then
sSQL = sSQL & ",optGrpWorkingName='"& Replace(trim(request.form("secname")),"'","''")&"' "
else
sSQL = sSQL & ",optGrpWorkingName='"& Replace(trim(request.form("workingname")),"'","''")&"' "
end if
sSQL = sSQL & "WHERE optGrpID="&iID
cnn.Execute(sSQL)
sSQL = "UPDATE options SET optName='"&Replace(Trim(request.form("opt0")),"'","''")&"',optPriceDiff="&fieldDims&" WHERE optGroup="&iID
cnn.Execute(sSQL)
end if
else
if request.form("act")="doaddnew" then
rs.Open "optionGroup",cnn,1,3,&H0002
rs.AddNew
rs.Fields("optGrpName") = trim(request.form("secname"))
if Request.Form("forceselec")="ON" then
rs.Fields("optType") = Request.Form("optType")
else
rs.Fields("optType") = 0 - Int(Request.Form("optType"))
end if
if trim(request.form("workingname"))="" then
rs.Fields("optGrpWorkingName") = trim(request.form("secname"))
else
rs.Fields("optGrpWorkingName") = trim(request.form("workingname"))
end if
rs.Update
iID = rs.Fields("optGrpID")
rs.Close
else
iID = request.form("id")
sSQL = "UPDATE optionGroup SET optGrpName='"& Replace(trim(request.form("secname")),"'","''")&"'"
if Request.Form("forceselec")="ON" then
sSQL = sSQL & ",optType=" & Request.Form("optType")
else
sSQL = sSQL & ",optType=" & (0 - Int(Request.Form("optType")))
end if
if trim(request.form("workingname"))="" then
sSQL = sSQL & ",optGrpWorkingName='"& Replace(trim(request.form("secname")),"'","''")&"' "
else
sSQL = sSQL & ",optGrpWorkingName='"& Replace(trim(request.form("workingname")),"'","''")&"' "
end if
sSQL = sSQL & "WHERE optGrpID="&iID
cnn.Execute(sSQL)
end if
sSQL = "SELECT optID FROM options WHERE optGroup="&iID&" ORDER BY optID"
rs.Open sSQL,cnn,0,1
alldata=""
index=0
if NOT rs.EOF then alldata = rs.getrows
rs.Close
for rowcounter=0 to UBOUND(aOption,2)
if Trim(aOption(0,rowcounter)) <> "" then
if IsArray(alldata) then
sSQL = "UPDATE options SET optName='"&aOption(0,rowcounter)&"',optPriceDiff="&aOption(1,rowcounter)&",optWeightDiff="&aOption(2,rowcounter)&" WHERE optID="&alldata(0,index)
cnn.Execute(sSQL)
if UBOUND(alldata,2)=index then alldata=""
index = index + 1
else
sSQL = "INSERT INTO options (optGroup,optName,optPriceDiff,optWeightDiff) VALUES ("&iID&",'"&aOption(0,rowcounter)&"',"&aOption(1,rowcounter)&","&aOption(2,rowcounter)&")"
cnn.Execute(sSQL)
end if
end if
next
do while IsArray(alldata)
sSQL = "DELETE FROM options WHERE optID="&alldata(0,index)
cnn.Execute(sSQL)
if UBOUND(alldata,2)=index then alldata=""
index = index + 1
loop
end if
end if
if err.number<>0 then
success=false
errmsg = "There was an error writing to the database.<br>"
if err.number = -2147467259 then
errmsg = errmsg & "Your database does not have write permissions."
else
errmsg = errmsg & err.description
end if
else
response.write "<meta http-equiv=""refresh"" content=""3; url=adminprodopts.asp"">"
end if
on error goto 0
end if
end if
%>
<script Language="JavaScript">
<!--
function formvalidator(theForm)
{
if (theForm.secname.value == "")
{
alert("Please enter a value in the field \"Option Name\".");
theForm.secname.focus();
return (false);
}
return (true);
}
//-->
</script>
<table border="0" cellspacing="<%=maintablespacing%>" cellpadding="<%=maintablepadding%>" width="<%=maintablewidth%>" bgcolor="<%=maintablebg%>" align="center">
<% if request.form("posted")="1" AND request.form("act")="modify" then
sSQL = "SELECT optID,optName,optGrpName,optGrpWorkingName,optPriceDiff,optType,optWeightDiff FROM options INNER JOIN optionGroup ON optionGroup.optGrpID=options.optGroup WHERE optGroup="&Request.Form("id")&" ORDER BY optID"
rs.Open sSQL,cnn,0,1
alldata=rs.getrows
rs.Close
%>
<tr>
<form name="mainform" method="POST" action="adminprodopts.asp" onSubmit="return formvalidator(this)">
<td width="100%" align="center">
<input type="hidden" name="posted" value="1">
<input type="hidden" name="act" value="domodify">
<input type="hidden" name="id" value="<%=Request.Form("id")%>">
<input type="hidden" name="optType" value="<%=Abs(alldata(5,0))%>">
<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<% if Abs(Int(alldata(5,0)))=3 then %>
<tr>
<td width="100%" colspan="3" align="center"><br><b>Use this page to update your product options.</b><br> </td>
</tr>
<tr>
<td width="30%" align="center" valign="top"><p><b>Option Name</b><br>
<input type="text" name="secname" size="30" value="<%=Replace(alldata(2,0),"""",""")%>"></p>
<p><b>Working Name</b><br>
<input type="text" name="workingname" size="30" value="<%=Replace(alldata(3,0),"""",""")%>"></p>
</td>
<td width="30%" align="center" valign="top"><p><b>Default Text if any</b><br>
<input type="text" name="opt0" size="25" value="<%=Replace(alldata(1,0),"""",""")%>"></p>
<p> <br><input type="checkbox" name="forceselec" value="ON" <% if alldata(5,0)>0 then response.write "checked"%>> <b>Force Selection.</b></p>
</td>
<td width="40%" align="center" valign="top"><p><b>Field Width</b><br>
<select name="pri0" size="1">
<%
for rowcounter=1 to 35
response.write "<option value='"&rowcounter&"'"
if rowcounter=Int(alldata(4,0)) then response.write " selected"
response.write "> "&rowcounter&" </option>"&vbCrLf
next
%>
</select></p>
<p><b>Field Height</b><br>
<select name="fieldheight" size="1">
<%
Dim fieldHeight
fieldHeight = cInt((cDbl(alldata(4,0))-Int(alldata(4,0)))*100.0)
for rowcounter=1 to 15
response.write "<option value='"&rowcounter&"'"
if rowcounter=fieldHeight then response.write " selected"
response.write "> "&rowcounter&" </option>"&vbCrLf
next
%>
</select></p>
</td>
</tr>
<tr>
<td colspan="3">
<ul>
<li><font size="1">The option name is that which will be displayed with your products. The working name is for internal use
only and is so you can distinguish between similarly named options.</li>
<li><font size="1">The default text field is the text which will initially be shown in the text box. Just leave blank if you
do not wish to show a default value. The field width is the width of the text box.</li>
<li><font size="1">Setting the Field Height to greater than 1 will create a multiline text input, or "textarea" input box.</li>
</ul>
</td>
</tr>
<% else %>
<tr>
<td width="30%" align="center" valign="top"><p><b>Option Name</b><br>
<input type="text" name="secname" size="30" value="<%=Replace(alldata(2,0),"""",""")%>"></p>
<p><b>Working Name</b><br>
<input type="text" name="workingname" size="30" value="<%=Replace(alldata(3,0),"""",""")%>"></p>
<p><input type="checkbox" name="forceselec" value="ON" <% if alldata(5,0)>0 then response.write "checked"%>> <b>Force Selection.</b></p>
</td>
<td valign="top" colspan="2">
<p align="center"><b>Use this page to update your product options.</b></p>
<ul>
<li><font size="1">The option name is that which will be displayed with your products. The working name is for internal use
only and is so you can distinguish between similarly named options.</li>
<li>The price diff setting will allow an amount to be added to the product base price. If
you do not want to use this feature, just leave blank or at 0. If you want a cost to be subtracted then enter a
negative number.</li>
</ul>
</td>
</tr>
</table>
<table width="500" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<tr>
<td width="30%" align="center" valign="top"><b>Options</b></td>
<td width="5%" align="center"> </td>
<td width="10%" align="center" valign="top"><b>Price Diff</b></td>
<td width="5%" align="center"> </td>
<td width="20%" align="center" valign="top"><b>Weight Diff</b></td>
</tr>
<% for rowcounter=0 to maxprodopts-1 %>
<tr>
<td align="center" valign="top"><%
response.write "<input type=""text"" name=""opt"&rowcounter&""" size=""20"" value="""
if rowcounter <= UBOUND(alldata,2) then response.write Replace(alldata(1,rowcounter),"""", """)
response.write """><br>"&vbCrLf
%>
</td>
<td align="center"><b>»</b></td>
<td align="center" valign="top"><%
response.write "<input type='text' name='pri"&rowcounter&"' size='5' value='"
if rowcounter <= UBOUND(alldata,2) then response.write alldata(4,rowcounter)
response.write "'><br>"&vbCrLf
%>
</td>
<td align="center"><b>»</b></td>
<td align="center" valign="top"><%
if shipType=3 then
iOunces = 0
response.write "<input type='text' name='wei"&rowcounter&"' size='3' value='"
if rowcounter <= UBOUND(alldata,2) then
iPounds=Int(alldata(6,rowcounter))
iOunces=cInt((cDbl(alldata(6,rowcounter))-cDbl(iPounds))*100)
response.write iPounds
end if
response.write "'> lbs <select name='weo"&rowcounter&"' size='1'>"
for index=0 to 15
response.write "<option value='"&index&"'"
if iOunces = index then response.write " selected"
response.write ">"&index&"</option>"&vbCrLf
next
response.write "</select> Oz<br>"&vbCrLf
else
response.write "<input type='text' name='wei"&rowcounter&"' size='5' value='"
if rowcounter <= UBOUND(alldata,2) then response.write alldata(6,rowcounter)
response.write "'><br>"&vbCrLf
end if
%>
</td>
</tr>
<% next %>
</table>
<table width="100%" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<% end if %>
<tr>
<td width="100%" colspan="3" align="center"><br><input type="submit" value="Submit"><br> </td>
</tr>
<tr>
<td width="100%" colspan="3" align="center"><br>
<a href="admin.asp"><b>Admin Home</b></a><br>
</td>
</tr>
</table></td>
</form>
</tr>
<% elseif request.form("posted")="1" AND request.form("act")="addnew" then %>
<tr>
<form name="mainform" method="POST" action="adminprodopts.asp" onSubmit="return formvalidator(this)">
<td width="100%" align="center">
<input type="hidden" name="posted" value="1">
<input type="hidden" name="act" value="doaddnew">
<input type="hidden" name="optType" value="<%=Request.Form("optType")%>">
<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<% if Request.Form("optType")="3" then %>
<tr>
<td width="100%" colspan="4" align="center"><br><b>Enter your new product option details here.</b><br> </td>
</tr>
<tr>
<td width="40%" align="center" valign="top"><p><b>Option Name</b><br>
<input type="text" name="secname" size="30" value=""></p>
<p><b>Working Name</b><br>
<input type="text" name="workingname" size="30" value=""></p>
</td>
<td width="30%" align="center" valign="top"><p><b>Default Text if any</b><br>
<input type="text" name="opt0" size="25"></p>
<p> <br><input type="checkbox" name="forceselec" value="ON" checked> <b>Force Selection.</b></p>
</td>
<td width="30%" align="center" valign="top" colspan="2"><p><b>Field Width</b><br>
<select name="pri0" size="1">
<%
for rowcounter=1 to 35
response.write "<option value='"&rowcounter&"'"
if rowcounter=15 then response.write " selected"
response.write "> "&rowcounter&" </option>"&vbCrLf
next
%>
</select></p>
<p><b>Field Height</b><br>
<select name="fieldheight" size="1">
<%
for rowcounter=1 to 15
response.write "<option value='"&rowcounter&"'> "&rowcounter&" </option>"&vbCrLf
next
%>
</select></p>
</td>
</tr>
<tr>
<td colspan="3">
<ul>
<li><font size="1">The option name is that which will be displayed with your products. The working name is for internal use
only and is so you can distinguish between similarly named options.</li>
<li><font size="1">The default text field is the text which will initially be shown in the text box. Just leave blank if you
do not wish to show a default value. The field width is the width of the text box.</li>
<li><font size="1">Setting the Field Height to greater than 1 will create a multiline text input, or "textarea" input box.</li>
</ul>
</td>
</tr>
<% else %>
<tr>
<td width="30%" align="center" valign="top"><p><b>Option Name</b><br>
<input type="text" name="secname" size="30" value=""></p>
<p><b>Working Name</b><br>
<input type="text" name="workingname" size="30" value=""></p>
<p><input type="checkbox" name="forceselec" value="ON" checked> <b>Force Selection.</b></p>
</td>
<td valign="top" colspan="2">
<p align="center"><b>Use this page to update your product options.</b></p>
<ul>
<li><font size="1">The option name is that which will be displayed with your products. The working name is for internal use
only and is so you can distinguish between similarly named options.</li>
<li>The price diff setting will allow an amount to be added to the product base price. If
you do not want to use this feature, just leave blank or at 0. If you want a cost to be subtracted then enter a
negative number.</li>
</ul>
</td>
</tr>
</table>
<table width="500" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<tr>
<td width="30%" align="center" valign="top"><b>Options</b></td>
<td width="5%" align="center"> </td>
<td width="10%" align="center" valign="top"><b>Price Diff</b></td>
<td width="5%" align="center"> </td>
<td width="20%" align="center" valign="top"><b>Weight Diff</b></td>
</tr>
<% for rowcounter=0 to maxprodopts-1 %>
<tr>
<td align="center" valign="top"><%
response.write "<input type=""text"" name=""opt"&rowcounter&""" size=""20""><br>"&vbCrLf
%>
</td>
<td align="center"><b>»</b></td>
<td align="center" valign="top"><%
response.write "<input type='text' name='pri"&rowcounter&"' size='5'><br>"&vbCrLf
%>
</td>
<td align="center"><b>»</b></td>
<td align="center" valign="top"><%
if shipType=3 then
response.write "<input type='text' name='wei"&rowcounter&"' size='3'> lbs <select name='weo"&rowcounter&"' size='1'>"
for index=0 to 15
response.write "<option value='"&index&"'>"&index&"</option>"&vbCrLf
next
response.write "</select> Oz<br>"&vbCrLf
else
response.write "<input type='text' name='wei"&rowcounter&"' size='5'><br>"&vbCrLf
end if
%>
</td>
</tr>
<% next %>
</table>
<table width="100%" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<% end if %>
<tr>
<td width="100%" colspan="3" align="center"><br><input type="submit" value="Submit"><br> </td>
</tr>
<tr>
<td width="100%" colspan="3" align="center"><br>
<a href="admin.asp"><b>Admin Home</b></a><br>
</td>
</tr>
</table></td>
</form>
</tr>
<% elseif request.form("posted")="1" AND success then %>
<tr>
<td width="100%">
<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<tr>
<td width="100%" colspan="2" align="center"><br><b>Update Successful !</b><br><br>You will now be forwarded
to the top product options admin page.<br><br>
If that does not happen automatically then please <A href="adminprodopts.asp"><b>click
here</b></a>.<br>
<br>
<img src="../images/clearpixel.gif" width="350" height="3">
</td>
</tr>
</table></td>
</tr>
<% elseif request.form("posted")="1" then %>
<tr>
<td width="100%">
<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<tr>
<td width="100%" colspan="2" align="center"><br><font color="#FF0000"><b>Operation Failed ! !</b></font><br><br><%=errmsg%><br><br>
<a href="javascript:history.go(-1)"><b>Click here to go back.</b></a></td>
</tr>
</table></td>
</tr>
<% else
sSQL = "SELECT optGrpID,optGrpName,optGrpWorkingName FROM optionGroup"
rs.Open sSQL,cnn,0,1
if NOT rs.EOF then alldata=rs.getrows
rs.Close
%>
<script language="JavaScript">
<!--
function modrec(id) {
document.mainform.id.value = id;
document.mainform.act.value = "modify";
document.mainform.submit();
}
function newtextrec(id) {
document.mainform.id.value = id;
document.mainform.act.value = "addnew";
document.mainform.optType.value = "3";
document.mainform.submit();
}
function newrec(id) {
document.mainform.id.value = id;
document.mainform.act.value = "addnew";
document.mainform.optType.value = "2";
document.mainform.submit();
}
function delrec(id) {
cmsg = "Sure you want to delete this record?\n"
if (confirm(cmsg)) {
document.mainform.id.value = id;
document.mainform.act.value = "delete";
document.mainform.submit();
}
}
// -->
</script>
<tr>
<form name="mainform" method="POST" action="adminprodopts.asp">
<td width="100%">
<input type="hidden" name="posted" value="1">
<input type="hidden" name="act" value="xxxxx">
<input type="hidden" name="id" value="xxxxx">
<input type="hidden" name="optType" value="xxxxx">
<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
<tr>
<td width="100%" colspan="4" align="center"><br><b>Use this page to update your product options.</b><br> </td>
</tr>
<tr>
<td width="35%" align="center" valign="top"><b>Option Name</b>
</td>
<td width="35%" align="center" valign="top"><b>Working Name</b>
</td>
<td width="15%" align="center" valign="top"><b>Modify</b>
</td>
<td width="15%" align="center" valign="top"><b>Delete</b>
</td>
</tr>
<% if IsArray(alldata) then
for rowcounter=0 to UBOUND(alldata,2) %>
<tr>
<td width="35%" align="center" valign="top"><%=alldata(1,rowcounter)%>
</td>
<td width="35%" align="center" valign="top"><%=alldata(2,rowcounter)%>
</td>
<td width="15%" align="center" valign="top"><input type=button name=modify value="Modify" onClick="modrec('<%=alldata(0,rowcounter)%>')">
</td>
<td width="15%" align="center" valign="top"><input type=button name=delete value="Delete" onClick="delrec('<%=alldata(0,rowcounter)%>')">
</td>
</tr>
<% next
else
%>
<tr>
<td width="100%" colspan="4" align="center"><br>No product options defined.<br> </td>
</tr>
<%
end if
%>
<tr>
<td width="100%" colspan="4" align="center"><br><b>Click here to add a new </b> <input type="button" value="New Option" onClick="newrec()"> <b>Or</b> <input type="button" value="New Text Input Option" onClick="newtextrec()"><br> </td>
</tr>
<tr>
<td width="100%" colspan="4" align="center"><br>
<a href="admin.asp"><b>Admin Home</b></a><br>
<img src="../images/clearpixel.gif" width="350" height="3"></td>
</tr>
</table></td>
</form>
</tr>
<% end if
cnn.Close
%>
</table>