adde ID i acces-db
Hej eksperter.Jeg har hentet et clanwar-script til min clan's hjemmeside. Det kører for så vidt fint nok, men selv om der i acces-db'en er et felt der hedder "WarID", kommer der intet i dem.
Dvs, at når jeg i højre side af siden vil trække de 5 seneste kampe ud, skriver den alle kampe ud, da der ikke er nogen "top 5", da der ikke ER nogen ID's.
Koden er som følger:
<!--#include file="protect.inc"-->
<!--#include file="dataconn.asp"-->
<%
strGame = Session("ID")
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM users WHERE clanid LIKE '%" & StrGame & "%'"
rs.Open strSQL, myConn, 1, 3
Set rs2 = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM cw_league order by name"
rs2.Open strSQL, myConn, 1, 3
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<!--#include file="JavaScript.asp"-->
<HEAD>
<TITLE>Control Panel -> Add a New Played War</TITLE>
<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<LINK href="style.css" type=text/css rel=StyleSheet></HEAD>
<BODY bgColor=#B4B7CA leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#b4b7ca border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width="65%" bgColor=#b4b7ca></TD>
<FONT class=content>
<TD vAlign=top align=right
bgColor=></SELECT></FONT></TD></FORM></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center bgColor=#f3f4f7
border=0>
<TBODY>
<TR>
<TD bgColor=#ffffff colSpan=4><IMG height=1 alt="" hspace=0
src="images/pixel.gif" width=1 border=0></TD></TR>
<TR vAlign=center bgColor=#e0e2eb>
<TD vAlign=top align=left width=8 height=22><IMG
src="images/topnav-left.gif"></TD>
<TD noWrap width="15%"
background="images/topnav-bg.gif"><FONT
class=content color=#363636> </FONT></TD>
<TD align=middle width="73%"
background="images/topnav-bg.gif" height=20> </TD>
<TD vAlign=top align=left width=8 height=22><IMG
src="images/topnav-left.gif"></TD>
<TD align=right width=140
background="images/topnav-bg.gif"><FONT
class=content>
<SCRIPT type=text/javascript>
<!-- // Array ofmonth Names
var monthNames = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
var now = new Date();
thisYear = now.getYear();
if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
document.write(monthNames[now.getMonth()] + " " + now.getDate() + ", " + thisYear);
// -->
</SCRIPT>
</FONT> </TD></TR>
<TR>
<TD bgColor=#e0e2eb colSpan=5><IMG height=3 alt="" hspace=0
src="images/pixel.gif" width=1 border=0></TD></TR>
<TR>
<TD bgColor=#aca899 colSpan=5><IMG height=1 alt="" hspace=0
src="images/pixel.gif" width=1 border=0></TD></TR>
<TR>
<TD bgColor=#716f64 colSpan=5><IMG height=1 alt="" hspace=0
src="images/pixel.gif" width=1
border=0></TD>
</TR>
</TBODY>
</TABLE>
<!----- Begin Main Content Table ----->
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center bgColor=#b4b7ca
border=0>
<TBODY>
<TR vAlign=top>
<TD bgColor=#b4b7ca><IMG height=1 alt=""
src="images/pixel.gif" width=10 border=0></TD>
<TD vAlign=top width=175 bgColor=#b4b7ca><BR>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=26 height=30><IMG
src="images/sidebox-title-left.gif"></TD>
<TD vAlign=center align=left width=143
background="images/sidebox-title-bg.gif"
height=30><FONT class=option color=#ffffff> <B>Main
Navigation</B></FONT></TD>
<TD vAlign=top align=left width=6 height=30><IMG
src="images/sidebox-title-right.gif"></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<!----- Side Box Content ----->
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR vAlign=top>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-left.gif"><IMG
src="images/sidebox-bar-px.gif"></TD>
<TD vAlign=top align=left width=166 bgColor=#f0f1f5>
<TABLE cellSpacing=0 cellPadding=3 width=166 border=0>
<TBODY>
<TR>
<TD><BIG><STRONG>·</STRONG></BIG><a title="Back Home" href="home.asp">Home</a></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-right.gif"><IMG
src="images/sidebox-bar-px.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=175 height=29><IMG
src="images/sidebox-bottom.gif">
</TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=26 height=30><IMG
src="images/sidebox-title-left.gif"></TD>
<TD vAlign=center align=left width=143
background="images/sidebox-title-bg.gif"
height=30><FONT class=option
color=#ffffff> Login as</FONT></TD>
<TD vAlign=top align=left width=6 height=30><IMG
src="images/sidebox-title-right.gif"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!----- Side Box Content ----->
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR vAlign=top>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-left.gif"><IMG
src="images/sidebox-bar-px.gif"></TD>
<TD vAlign=top align=left width=166 bgColor=#f0f1f5>
<TABLE cellSpacing=0 cellPadding=3 width=166 border=0>
<TBODY>
<TR>
<TD>Level: <%=RS("level")%>
<br>
Username: <%=Session("Username")%> </TD></TR></TBODY></TABLE></TD>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-right.gif"><IMG
src="images/sidebox-bar-px.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=175 height=29><IMG
src="images/sidebox-bottom.gif">
</TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=26 height=30><IMG
src="images/sidebox-title-left.gif"></TD>
<TD vAlign=center align=left width=143
background="images/sidebox-title-bg.gif"
height=30><FONT class=option
color=#ffffff> ClanWars</FONT></TD>
<TD vAlign=top align=left width=6 height=30><IMG
src="images/sidebox-title-right.gif"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!----- Side Box Content ----->
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR vAlign=top>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-left.gif"><IMG
src="images/sidebox-bar-px.gif"></TD>
<TD vAlign=top align=left width=166 bgColor=#f0f1f5>
<TABLE cellSpacing=0 cellPadding=3 width=166 border=0>
<TBODY>
<TR>
<TD>
<p align="left"> <% If RS("clanwarscript") = "1" Then
Response.Write "<STRONG><BIG>·</BIG></STRONG> <a href=""show_wars.asp"">Show Wars</a>"
Response.Write "<br>"
Response.Write "<STRONG><BIG>·</BIG></STRONG> <a href=""add_war.asp"">Add ClanWar</a>"
Response.Write "<br>"
Response.Write "<STRONG><BIG>·</BIG></STRONG> <a href=""Scheduled_War.asp"">Add Scheduled War</a>"
Else
Response.Write "<STRONG><BIG>·</BIG></STRONG> <strike>Show Wars</strike>"
Response.Write "<br>"
Response.Write "<STRONG><BIG>·</BIG></STRONG> <strike>Add ClanWar</strike>"
Response.Write "<br>"
Response.Write "<STRONG><BIG>·</BIG></STRONG> <strike>Add Scheduled War</strike>"
End If
%></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-right.gif"><IMG
src="images/sidebox-bar-px.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=175 height=29><IMG
src="images/sidebox-bottom.gif">
</TD></TR></TBODY></TABLE><BR>
</TD>
<TD bgColor=#b4b7ca><IMG height=1 alt=""
src="images/pixel.gif" width=15 border=0></TD>
<TD bgColor=#b4b7ca><IMG height=1 alt=""
src="images/pixel.gif" width=15 border=0></TD>
<TD width="100%">
<TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#b4b7ca
border=0><TBODY>
<TR>
<TD>
<TABLE cellSpacing=1 cellPadding=8 width="100%" bgColor=#f0f1f5
border=0>
<TBODY>
<TR>
<TD>
<CENTER>
<span style="font-weight: 700; background-position: 0% 0%">
Clan Control Panel For <%=RS("clanname")%></span></CENTER></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR>
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff
border=0><TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=26 height=30><IMG
src="images/sidebox-title-left.gif"></TD>
<TD vAlign=center align=left width="100%"
background="images/sidebox-title-bg.gif"
height=30><FONT class=option
color=#363636> Add a New Played War</FONT></TD>
<TD vAlign=top align=left width=6 height=30><IMG
src="images/sidebox-title-right.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-left.gif"><IMG
src="images/sidebox-bar-px.gif"></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR vAlign=top>
<TD>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.opponent.value == "")
{
alert("Skriv en værdi for feltet \"opponent\".");
theForm.opponent.focus();
return (false);
}
if (theForm.homepage.value == "")
{
alert("Skriv en værdi for feltet \"homepage\".");
theForm.homepage.focus();
return (false);
}
if (theForm.Maps.value == "")
{
alert("Skriv en værdi for feltet \"Maps\".");
theForm.Maps.focus();
return (false);
}
if (theForm.uspoints.value == "")
{
alert("Skriv en værdi for feltet \"uspoints\".");
theForm.uspoints.focus();
return (false);
}
if (theForm.thempoints.value == "")
{
alert("Skriv en værdi for feltet \"thempoints\".");
theForm.thempoints.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="ClanWar-exe.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="33%">Result:</td>
<td width="67%" colspan="3">
<b><font size="2">
<select size="1" name="result" style="border-style: dotted; border-width: 1; background-color: #B4B7CA">
<option value="Draw" selected>Draw</option>
<option value="Won">Won</option>
<option value="Lost">Lost</option>
</select></font></b></td>
</tr>
<tr>
<td width="33%">Played on date:</td>
<td width="16%">
<font><b><select size="1" name="mday" style="border-style: dotted; border-width: 1; background-color: #B4B7CA">
<option value="01" selected>01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select> DD</b></font></td>
<td width="16%">
<small><b><select size="1" name="mmonth" style="border-style: dotted; border-width: 1; background-color: #B4B7CA">
<option value="01" selected>01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select> MM </b></td>
<td width="36%">
<small><b><select size="1" name="myear" style="border-style: dotted; border-width: 1; background-color: #B4B7CA">
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
</select> YYYY</b></td>
</tr>
<tr>
<td width="33%">Opponent Clan name:</td>
<td width="67%" colspan="3">
<!--webbot bot="Validation" b-value-required="TRUE" --><input name="opponent" size="29" style="border-style: dotted; border-width: 1; background-color: #B4B7CA"></td>
</tr>
<tr>
<td width="33%">Opponent Clan homepage:</td>
<td width="67%" colspan="3">
<!--webbot bot="Validation" b-value-required="TRUE" --><input name="homepage" size="29" style="border-style: dotted; border-width: 1; background-color: #B4B7CA" value="http://"></b></font></td>
</tr>
<tr>
<td width="33%">Played Maps:</td>
<td width="67%" colspan="3">
<!--webbot bot="Validation" b-value-required="TRUE" --><input name="Maps" size="29" style="border-style: dotted; border-width: 1; background-color: #B4B7CA">
<FONT class=content>
etc. map1, map2</FONT></td>
</tr>
<tr>
<td width="33%">League/Friendly:</td>
<td width="67%" colspan="3">
<font face="Tahoma"><b><select size="1" name="league" style="border-style: dotted; border-width: 1; background-color: #B4B7CA">
<% Do While Not rs2.EOF %>
<option value="<%=RS2("name")%>"><%=RS2("name")%></option>
<%rs2.Movenext
Loop
%>
</select> </b><a href="java script:add('Add-League.asp')">Add new League</a></font></td>
</tr>
<tr>
<td width="33%">The End Score:</td>
<td width="67%" colspan="3">
Us: <b><!--webbot bot="Validation" b-value-required="TRUE" --><input size="3" name="uspoints" style="border-style: dotted; border-width: 1; background-color: #B4B7CA"> </b>
Them: <b><!--webbot bot="Validation" b-value-required="TRUE" --><input size="3" name="thempoints" style="border-style: dotted; border-width: 1; background-color: #B4B7CA"></b></td>
</tr>
<tr>
<td width="33%">Report URL:</td>
<td width="67%" colspan="3">
<font face="Tahoma"><b>
<input name="report" size="29" style="border-style: dotted; border-width: 1; background-color: #B4B7CA" value="Nope"></b></font></td>
</tr>
</table>
<p align="center">
<input type="submit" value="Save War" name="B1" style="border-style: dotted; border-width: 1; background-color: #B4B7CA"></p>
<input type="hidden" name="ClanID" value="<%=Session("ID")%>">
<input type="hidden" name="Clanname" value="<%=RS("clanname")%>">
</form>
</TD></TR></TBODY></TABLE>
</TD>
<TD vAlign=top align=left width=13
background="images/storybox-content-right.gif"><IMG
src="images/storybox-content-right-px.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD vAlign=top align=left width=9 height=29><IMG
src="images/storybox-bottom-left.gif"></TD>
<TD width="100%"
background="images/storybox-bottom-bg.gif"
height=29> </TD>
<TD vAlign=top align=left width=18 height=29><IMG
src="images/storybox-bottom-right.gif"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff
border=0><TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff
border=0><TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD><IMG height=1 alt="" src="images/pixel.gif"
width=15 border=0></TD>
<TD vAlign=top width=150><BR>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=175 height=29> </TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=26 height=30><IMG
src="images/sidebox-title-left.gif"></TD>
<TD vAlign=center align=left width=143
background="images/sidebox-title-bg.gif"
height=30><FONT class=option color=#ffffff> Status</FONT></TD>
<TD vAlign=top align=left width=6 height=30><IMG
src="images/sidebox-title-right.gif"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!----- Side Box Content ----->
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR vAlign=top>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-left.gif"><IMG
src="images/sidebox-bar-px.gif"></TD>
<TD vAlign=top align=left width=166 bgColor=#f0f1f5>
<TABLE cellSpacing=0 cellPadding=3 width=166 border=0>
<TBODY>
<TR>
<TD>
<FONT class=content>
ClanWar Script is:
<% If RS("clanwarscript") = "1" Then
Response.Write "<font color=""#00FF00""><b>On</b></font>"
Else
Response.Write "<font color=""#FF0000""><b>Off</b></font>"
End If
%>
</FONT></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top align=left width=4
background="images/sidebox-bar-right.gif"><IMG
src="images/sidebox-bar-px.gif"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=175 height=29><IMG
src="images/sidebox-bottom.gif">
</TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=175 height=29> </TD></TR></TBODY></TABLE><BR>
</TD>
<TD bgColor=#b4b7ca><IMG height=1 alt=""
src="images/pixel.gif" width=10 border=0>
</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center bgColor=#f0f1f5
border=0>
<TBODY>
<TR align=middle>
<TD width="100%" colSpan=3 bgcolor="#B4B7CA">
<CENTER><FONT class=tiny><BR>
<DIV align=center></A></DIV></FONT></CENTER></TD></TR></TBODY></TABLE></FONT>
<!--#include file="bund.asp"-->
</BODY>
</HTML>
<%
myConn.Close
Set myConn = Nothing
%>
------------------------------------------------------------
er der ikke en flink sjæl der vil hjælpe mig med en rettelse i koden så jeg får ID med?
På forhånd tak :)
</RealOne>
