01. oktober 2001 - 17:29Der er
46 kommentarer og 1 løsning
members system
Jeg bliver nød til at copy/paste hele min side ind før at det kan forklares ordenligt:
<% mode = Request.QueryString(\"mode\")
If mode = \"\" then %> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"435\"> <tr> <td align=\"center\" width=\"100%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\">This is the frontpage!</font></td> </tr> </table> </td> </tr> </table> <%
ElseIf mode = \"news\" then
intPage = Request(\"page\") If isNumeric(intPage) = False Or intPage < 1 Then intPage = 1 End If
strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"db/clan_dt_db.mdb\") Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"SELECT * FROM News ORDER by date desc\" rstemp.Open strSQL, strDSN, 1
Det er når jeg sætter members delen ind, at det går galt, jeg tror selv at fejlen ligger i at den connection ikke bliver lukket ordenligt, men jeg kan ikke finde fejlen, jeg ville blive meget glad hvis der var en der kunne hjælpe.
umiddelbart mangeler der et end if efter dette If Not (rstemp.BOF Or rstemp.EOF) Then rstemp.PageSize = 5 rstemp.AbsolutePage = intPage intRecCount = rstemp.PageSize intPageCount = rstemp.PageCount
If Not (rstemp.BOF Or rstemp.EOF) Then rstemp.PageSize = 5 rstemp.AbsolutePage = intPage intRecCount = rstemp.PageSize intPageCount = rstemp.PageCount end if %> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"446\">
Nu skriver den igen at den mangler et End If og når jeg sætter et ind forneden, så gør den bare det samme som før, altså hvor der ikke kommer noget på siden
If mode = \"\" then %> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"435\"> <tr> <td align=\"center\" width=\"100%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\">This is the frontpage!</font></td> </tr> </table> </td> </tr> </table> <%
ElseIf mode = \"news\" then intPage = Request(\"page\") If isNumeric(intPage) = False Or intPage < 1 Then intPage = 1 End If
strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"db/clan_dt_db.mdb\") Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"SELECT * FROM News ORDER by date desc\" rstemp.Open strSQL, strDSN, 1
If Not (rstemp.BOF Or rstemp.EOF) Then rstemp.PageSize = 5 rstemp.AbsolutePage = intPage intRecCount = rstemp.PageSize intPageCount = rstemp.PageCount %> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"435\"> <tr> <td width=\"25%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\"><b> <% If Clng(intPage) > 1 Then Response.Write \"<a href=index.asp?mode=news&page=\"& intPage - 1 &\"><< Previous</a>\" Else Response.Write \" \" End If %> </b></font></td> <td align=\"center\" width=\"50%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\">[ <b> <% Basenum = int(intPage/10) Basenum = Basenum * 10 If (Basenum+10) <= intPageCount then Vis_til = Basenum+10 Else Vis_til = intPageCount End if For intNum = (Basenum+1) To Vis_til Response.Write \"<a href=index.asp?mode=news&page=\" & intNum & \">\" & intNum & \"</a> \" Next If (Basenum+10) < intPageCount then Response.Write \"<a href=index.asp?mode=news&page=\" & Basenum+11 & \">...</a>\" End if %> </b> ]</font></td> <td align=\"right\" width=\"25%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\"><b> <% If Clng(intPage) < Clng(intPageCount) Then Response.Write \"<a href=index.asp?mode=news&page=\"& intPage + 1 &\">Next >></a> \" Else Response.Write \" \" End If %> </b></font></td> </tr> </table> </td> </tr> </table> <% Do While Not rstemp.EOF And intRecCount > 0 %> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"435\"> <tr> <td width=\"100%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\"> <b><%=rstemp(\"Subject\")%> - <%response.write \"\"&day(rstemp(\"Date\"))&\"/\"&month(rstemp(\"Date\"))&\"/\"&year(rstemp(\"Date\"))&\" - \"&hour(rstemp(\"Date\"))&\":\"&minute(rstemp(\"Date\"))&\"\"%> - <a href=\"mailto:<%=rstemp(\"Email\")%>\"> <%=rstemp(\"NickName\")%></b></a></font></td> </tr> </table> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"435\"> <tr> <td width=\"100%\"><img src=\"images/divider.gif\" border=\"0\" align=\"middle\"></td> </tr> </table> </td> </tr> </table> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"435\"> <tr> <td width=\"100%\"><span class=\"headb\"><font color=\"#000000\" face=\"tahoma\" size=\"2\"><%=LinkURLs(rstemp(\"News\"))%></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> <% intRecCount = intRecCount - 1 rstemp.movenext loop else %> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"446\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"435\"> <tr> <td align=\"center\" width=\"100%\"><font color=\"#000000\" face=\"tahoma\" size=\"2\">No news yet!</font></td> </tr> </table> </td> </tr> </table> <% end if elseif mode = \"members\" then if request(\"UserID\") <> \"\" then PID = request(\"UserID\") if PID = \"\" then response.redirect \"index.asp?mode=members\" else SQL = \"SELECT * from [Users] WHERE id=\"& PID Set rstemp = conntemp.execute(sql) %> <br> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"359\"> <tr> <td> <table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"325\"> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Real Name:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"RealName\")%></font></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Nickname:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"NickName\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Age:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=alder(rstemp(\"BirthDate\"))%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">E-mail:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"Email\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Homepage:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"HomePage\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Connection:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"connection\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Status:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"status\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Fav. Map:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"FavMap\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Fav. Weapon:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"FavWeapon\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">PC Spec:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"PcSpec\")%></font></td> </tr> <tr> <td width=\"30%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\">Biography:</font></td> <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"Bio\")%></font></td> </tr> </table> </td> </tr> </table> <% end if rstemp.close Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") SQL = \"SELECT * from [Users] ORDER BY id asc\" rstemp.Open SQL, conntemp, 1 if rstemp.EOF or rstemp.BOF then response.write \"</b><br><font color=\'#FFFFFF\' face=\'tahoma\' size=\'1\'><center>No members added to the database!</center></font>\" else %> <br> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"359\"> <% do while not (rstemp.eof or rstemp.bof) %> <tr> <td align=\"center\" width=\"25%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><a href=\"members.asp?mode=profile&id=<%=rstemp(\"UserID\")%>\"><%=rs(\"NickName\")%></a></font></td> <td align=\"center\" width=\"25%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"Age\")%></font></td> <td align=\"center\" width=\"50%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"Position\")%></font></td> </tr> <% rstemp.movenext loop rstemp.close response.write \"</table>\" rstemp.Close Set rstemp = Nothing End If End If End If %>
Ja hvis UserID er tom kommer du ikke ind i det kode som udskriver member data pga af if sætningen: if request(\"UserID\") <> \"\" then udskriv member del end if
Nej det jeg tænkte på var at hvis du udskriver noget på det sted kunne du se at den kommer ind i elseif mode = \"members\" then. Det løser ikke problemmet. Du skal enten i linket vælge user index.asp?mode=member&UserID=hans eller lave noget på siden som gør man kan vælge en user.
elseif mode = \"members\" then Response.write \"Først i member delen\" if request(\"UserID\") <> \"\" then
Hvis du kigger længere nede i dokumentet, så er der faktisk lavet del for sig selv, som skal vise en liste over alle members.
<% end if rstemp.close Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") SQL = \"SELECT * from [Users] ORDER BY id asc\" rstemp.Open SQL, conntemp, 1 if rstemp.EOF or rstemp.BOF then response.write \"</b><br><font color=\'#FFFFFF\' face=\'tahoma\' size=\'1\'><center>No members added to the database!</center></font>\" else %> <br> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"359\"> <% do while not (rstemp.eof or rstemp.bof) %> <tr> <td align=\"center\" width=\"25%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><a href=\"members.asp?mode=profile&id=<%=rstemp(\"UserID\")%>\"><%=rs(\"NickName\")%></a></font></td> <td align=\"center\" width=\"25%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"Age\")%></font></td> <td align=\"center\" width=\"50%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=rstemp(\"Position\")%></font></td>
Den del skulle jeg på en eller anden måde få til at vise en liste over alle members..
<% end if ELSE rstemp.close Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") SQL = \"SELECT * from [Users] ORDER BY id asc\" rstemp.Open SQL, conntemp, 1
<% end if rstemp.close ELSE Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") SQL = \"SELECT * from [Users] ORDER BY id asc\" rstemp.Open SQL, conntemp, 1
Fejltype: ADODB.Recordset (0x800A0BB9) Argumenterne har en forkert type eller er uden for det angivne område, eller der er opstået en konflikt mellem dem. /dreamteam/index.asp, line 258
conntemp = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"XXX.mdb\") Set rstemp = Server.CreateObject(\"ADODB.RecordSet\") SQL = \"SELECT * from [Users] ORDER BY id asc\" rstemp.Open SQL, conntemp, 1
Skal members vises på samme side index.asp ?? for den linker til en side members.asp og i index.asp koden ser det ud som om den er tænkt til at vise info omkring members...
Okay, ved hjælp fra dig, er jeg nu kommet så langt at den nu viser member\'ne, men når jeg så klikker på den viser den ikke noget info om dem, altså der kommer en blank side.
Det er noget som er forket i denne linie: <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=alder(rstemp(\"BirthDate\"))%></font></td>
Jeg tror alder skal væk: Det er noget som er forket i denne linie: <td align=\"left\" width=\"70%\"><span class=\"headb\"><font color=\"#FFFFFF\" face=\"tahoma\" size=\"1\"><%=(rstemp(\"BirthDate\"))%></font></td>
Hej Kære, Mit navn er Rosemary Buba, jeg så din profil i dag kl (www.eksperten.dk) og blev intrested i dig, vil jeg også gerne vide dig mere, og jeg vil have dig til at sende en mail til min e-mail adresse, så jeg kan give dig mit billede for dig at vide hvem jeg er. Her er min e-mail adresse (rosemary500@hotmail.fr) Jeg tror, vi kan gå herfra! Jeg venter på din mail til min e-mail adresse ovenfor. Rosemarybaby. (Husk afstanden eller farve betyder ikke noget, men elsker spørgsmål en masse i livet) prøv og svare med denne min e-mail-adresse, rosemary500@hotmail.fr
Hello Dear, My name is Rosemary Buba ,i saw your profile today at (www.eksperten.dk) and became intrested in you,i will also like to know you the more,and i want you to send an email to my email address so i can give you my picture for you to know whom i am. Here is my email address (rosemary500@hotmail.fr) I believe we can move from here! I am waiting for your mail to my email address above. Rosemarybaby. (Remeber the distance or colour does not matter but love matters alot in life) please try and reply with this my email address,
rosemary500@hotmail.fr
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.