Avatar billede matz Nybegynder
14. januar 2003 - 11:47 Der er 13 kommentarer og
2 løsninger

7641 ??

Hvorfor kommer der disse tal frem, når jeg kører min Default.asp --> "7641"

hvordan for man dem væk, selvom de ik er skrevet ind i koden.
Avatar billede dgivoni Nybegynder
14. januar 2003 - 11:50 #1
jeg har aldrig hoert om de tal???
hvordan ser din default.asp ud? og kommer der ikke andet paa skaermen end de tal?
Avatar billede matz Nybegynder
14. januar 2003 - 11:52 #2
tallene kommer frem oppe i toppen af min side... Men ellers bliver resten af siden vist som den skal.
Avatar billede whatever Nybegynder
14. januar 2003 - 11:57 #3
Hvordan ser siden du?
Avatar billede dgivoni Nybegynder
14. januar 2003 - 11:58 #4
proev at poste koden bag default.asp
Avatar billede matz Nybegynder
14. januar 2003 - 15:09 #5
default.asp er denne her:

<!--#include file="inc_system.asp" -->
<html>
<head>
    <title>????</title>
    <meta http-equiv="pragma" content="nocache">
    <%
      'objConn.Open "Driver={mySQL}; Server=localhost; Port=3306; Option=131072; Stmt=; uid=admin; pwd=??????;"
    %>
<link rel="stylesheet" type="text/css" href="????.css">
</head>
<body bgcolor="#ffffcc">
<center>

 
<table border="0" cellpadding="4" cellspacing="0" width="620">
        <tr><td>
            <!--#include file="inc_menu.asp" -->
<%
    If strMode = "" Then                %><!--#include file="inc_showprofile.asp" --><% End If
    If strMode = "list" Then            %><!--#include file="inc_list.asp" --><% End If
    If strMode = "send_comment" Then    %><!--#include file="inc_sendcomment.asp" --><% End If
    If strMode = "commentsent" Then        %><!--#include file="inc_commentsent.asp" --><% End If
    If strMode = "report_fake" Then        %><!--#include file="inc_reportfake.asp" --><% End If
    If strMode = "login" Then            %><!--#include file="inc_editprofile.asp" --><% End If
    If strMode = "edit_profile" Then    %><!--#include file="inc_edit_profile.asp" --><% End If
    If strMode = "confirm" Then            %><!--#include file="inc_signup_confirm.asp" --><% End If
    If strMode = "signup" Then            %><!--#include file="inc_signup.asp" --><% End If
    If strMode = "read_comments" Then    %><!--#include file="inc_readcomments.asp" --><% End If
    If strMode = "read_comment" Then    %><!--#include file="inc_readcomment.asp" --><% End If
    If strMode = "upload_new" Then        %><!--#include file="inc_uploadnew.asp" --><% End If
    If strMode = "pic_stat" Then        %><!--#include file="inc_edit_stats.asp" --><% End If
    If strMode = "np" Then                %><!--#include file="inc_np.asp" --><% End If
%>
            <hr>

        </td></tr>
    </table>

</div></center>
</body>
</html>
Avatar billede eagleeye Praktikant
14. januar 2003 - 15:18 #6
Det må komme fra en af dine include filer så..

Prøv at kigge alle de filer igennem som includes og se om der ikke står 7641 et sted.
Hvis du har dem på din egen computer i en folder kan du let med exploren (F3) søge efter 7641 i *.asp filerne.
Avatar billede matz Nybegynder
14. januar 2003 - 15:43 #7
Der står ikke 7641 noget sted i mine filer..
Avatar billede olf Nybegynder
14. januar 2003 - 20:06 #8
Okay... hvilken værdi har strMode? Er den blank? I så fald, prøv at post indholdet af filen "inc_showprofile.asp", så kan det være at vi kan gætte hvorfor du får fejlen!
Avatar billede matz Nybegynder
14. januar 2003 - 20:20 #9
inc.showprofile.asp ser sådan her ud:

<html>
<%
    Set Rs = Conn.Execute("SELECT persons.*,((hits.vote1+hits.vote2+hits.vote3+hits.vote4+hits.vote5+hits.vote6+hits.vote7+hits.vote8+hits.vote9+hits.vote10) / hits.raters) AS score,hits.raters FROM persons INNER JOIN hits ON hits.pid=persons.id WHERE persons.id=" & strPID)
    If Rs.BOF Then Response.Redirect "default.asp"

    Set CRs = Conn.Execute("SELECT id FROM shown WHERE sessionid='" & SessionID & "' AND pid=" & strPID)
    If CRs.BOF Then
        Conn.Execute "UPDATE persons SET shown=shown+1 WHERE id=" & strPID
        Conn.Execute "INSERT INTO shown (sessionid,pid,ip,datetime) VALUES ('" & SessionID & "'," & strPID & ",'" & RemoteAddress & "',now())"
    End If

    Set CRs = Conn.Execute("SELECT id FROM votes WHERE sessionid='" & SessionID & "' AND pid=" & strPID)
    bolHasVoted = (Not CRs.BOF)

    strName = Rs("name")
    strCity = Rs("city")
    strCountry = Rs("country")
    strText = Rs("text")
    strGender = Rs("gender")
    strPictureFile = Rs("picturefile")
    strRaters = Rs("raters"): If CLng("0" & strRaters) = 1 Then strRaters = strRaters & " stemme" Else strRaters = strRaters & " stemmer"
    strScore = FormatNumber("0" & Rs("score"), 2, True)

    If strName > "" Then
        strProfileHead = strName
        If strCity > "" Then strProfileHead = strProfileHead & ", " & strCity
        If strCountry > "" Then strProfileHead = strProfileHead & " (" & strCountry & ")"
    End If

    If strText > "" Then strProfileContent = strText

    Select Case Session("onlyvote")
        Case "0","": strOV_DontCare = " checked"
        Case "1": strOV_Women = " checked"
        Case "2": strOV_Men = " checked"
        Case "3": strOV_Children = " checked"
    End Select

    If strLastPID > "" And IsNumeric(strLastPID) Then
        Set LastRs = Conn.Execute("SELECT persons.*,((hits.vote1+hits.vote2+hits.vote3+hits.vote4+hits.vote5+hits.vote6+hits.vote7+hits.vote8+hits.vote9+hits.vote10) / hits.raters) AS score,hits.raters FROM persons INNER JOIN hits ON hits.pid=persons.id WHERE persons.id=" & strLastPID)
        If Not Rs.BOF Then
            If LastRs("name") > "" Then
                strLastProfileHead = LastRs("name")
                If LastRs("city") > "" Then strLastProfileHead = strLastProfileHead & ", " & LastRs("city")
                If LastRs("country") > "" Then strLastProfileHead = strLastProfileHead & " (" & LastRs("country") & ")"
            End If
            strLastRaters = LastRs("raters"): If CLng("0" & strLastRaters) = 1 Then strLastRaters = strLastRaters & " stemme" Else strLastRaters = strLastRaters & " stemmer"
%>
<center>
    <table border="0" cellpadding="4" cellspacing="2" bgcolor="#7B8CA5" width="75%">
        <tr><td bgcolor="#FFE78C"><b>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td align="center">
                        <font color="#a85400"><b>
                            Resultatet af afstemningen (<%=strLastRaters%>):<br>
                            <font size="5"><%=FormatNumber(LastRs("score"), 2, True)%></font>
                            <p>
                            <%=strLastProfileHead%>
                        </b></font>
                    </td>
                    <td align="center">
                        <table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" align="center">
                            <tr><td><img src="out_img.asp?pid=<%=strLastPID%>" alt="<%=LastRs("name")%>"><br></td></tr>
                        </table>
                    </td>
                </tr>
            </table>
        </b></td></tr>
    </table>
</center>
<hr class="gray_hr">
<%
        End If
    End If
%>
<br>
<form name="frmVote" action="default.asp" method="post">
<input type="hidden" name="mode" value="vote">
<input type="hidden" name="pid" value="<%=strPID%>">
<input type="hidden" name="gender" value="<%=strGender%>">
<center>
    <b>Jeg ønsker kun at stemme på :</b><br>
    <input type="radio" name="onlyvote" value="2"<%=strOV_Men%>>Mænd<input type="radio" name="onlyvote" value="1"<%=strOV_Women%>>Kvinder<input type="radio" name="onlyvote" value="3"<%=strOV_Children%>>Børn<input type="radio" name="onlyvote" value="0"<%=strOV_DontCare%>>Ligemeget<br>
    <table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
        <tr><td><img src="pictures/<%=strPID%>_<%=strPictureFile%>?<%=Rnd*10%>" alt="<%=strName%>"><br></td></tr>
    </table>
    <b><%=strProfileHead%></b>
    <p>
    <table border="0" width="75%">
        <tr><td><%=strProfileContent%></td></tr>
    </table>
    <p>
<%     If Not bolHasVoted Then %>
    <table border="0" cellpadding="4" cellspacing="2" bgcolor="#7B8CA5" width="75%">
        <tr><td bgcolor="#FFE78C"><b>
            <center>
                Er personen HOT or not ?<br>
                <font size="4" color="#000000">NOT</font>
<%        For Index = 1 To 10 %>
                <input type="radio" name="vote" value="<%=Index%>" onclick="document.frmVote.submit();"><%=Index%>
<%        Next %>
                &nbsp;<font size="4" color="#ff0000">HOT</font>
            </center>
        </b></td></tr>
    </table>
<%    Else %>
    <table border="0" cellpadding="4" cellspacing="2" bgcolor="#7B8CA5" width="75%">
        <tr><td bgcolor="#FFE78C"><b>
            <center>
            <font color="#a85400"><b>Resultatet af afstemningen (<%=strRaters%>):</b></font><br>
            <font color="#a85400" size="4"><%=FormatNumber(strScore, 2, True)%></font>
            <br>
            </center>
        </b></td></tr>
    </table>
<%    End If %>
    <br>
    <input type="submit" name="next_pic" value="Vis næste billede" class="btn">
    <hr class="gray_hr">
    <b>
        <a href="default.asp?mode=send_comment&pid=<%=strPID%>">Send en kommentar til personen</a>
        <p>
        Mener du dette er et <font color="#ff0000">fake</font> billede? Så fortæl os om det <a href="default.asp?mode=report_fake&pid=<%=strPID%>">her</a>.
        <p>
        Er du modig ? Tør du få sandheden om dig selv frem ?<br>
        <a href="default.asp?mode=confirm">Så deltag selv i afstemningen</a>
        <p>
        Eller deltager du allerede - så klik <a href="default.asp?mode=login&out=yes">her for at rette din profil</a>.
    </b>
</center>
</form>
<html>
Avatar billede whatever Nybegynder
14. januar 2003 - 20:22 #10
Hvor i forhold til html-koden står 7641?

Ligger sitet online?
Avatar billede matz Nybegynder
14. januar 2003 - 20:28 #11
Jo den ligger som beta model her: http://mats1122.frip.dk/index.htm
Avatar billede whatever Nybegynder
14. januar 2003 - 20:32 #12
Ok. Det ligger altså inden al html-koden.

Hvordan ser indholdet af inc_system.asp ud?
Avatar billede matz Nybegynder
14. januar 2003 - 20:36 #13
inc.system.asp ser sådan her ud:

<%
    Response.Buffer = True
    Session.LCID = 1030
    Randomize

%><!--#include file="inc_settings.asp" --><%

    ' ------------------------------------------------------------------------------------------
    '/ ADVARSEL: Hvis koden under denne linie ændres er det ikke sikkert at systemet            \
    '\          fortsat vil virke korrekt, med mindre det er angivet!                            /
    ' ------------------------------------------------------------------------------------------

    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open "Driver={mySQL}; Server=localhost; DATABASE=mdz;Port=3306; Option=131072; Stmt=; uid=mdz; pwd=rel99se;"


    strMode = LCase(Request("mode"))
    strPID = Request("pid"):          If Not IsNumeric(strPID) Then strPID = ""
    strLastPID = Request("last_pid"): If Not IsNumeric(strLastPID) Then strLastPID = ""
    Page_ShowMenu = True

    bolWasPosted = (Request.ServerVariables("HTTP_METHOD") = "POST")
    SessionID = Request.Cookies("sessionid")
    If SessionID = "" Then
        Response.Cookies("sessionid") = Session.SessionID
        Response.Cookies("sessionid").Expires = DateAdd("yyyy", 1, Now)
        SessionID = Session.SessionID
    End If
    RemoteAddress = Request.ServerVariables("REMOTE_ADDR")

    If strMode = "list" Then
        strGender = Request("gender"): If strGender = "" Then strGender = "1"
        strType = Request("type"):      If strType = "" Then strType = "0"

        Select Case strType
            Case "0": Page_Caption = "Seneste " & ListSize
            Case "1": Page_Caption = "Top " & ListSize
        End Select

        Select Case strGender
            Case "1": Page_Caption = Page_Caption & " kvinder"
            Case "2": Page_Caption = Page_Caption & " mænd"
            Case "3": Page_Caption = Page_Caption & " børn"
        End Select
    ElseIf strMode = "savefakereport" And bolWasPosted Then
        strReason = Request("reason")

        strMail = Replace(strEMOF, "#pid", strPID) & strReason

        bolIsOK = SendMail(OwnerEmail, "Anmeldelse af fake billede!", strMail)
        strMode = "report_fake"

        Page_Caption = "Anmeld fake billede"
        Page_ShowMenu = False
    ElseIf strMode = "savecomment" And bolWasPosted Then
        strName = DeMessSQL(Server.HTMLEncode(Request("name")))
        strEmail = DeMessSQL(Request("email"))
        strSubject = DeMessSQL(Server.HTMLEncode(Request("subject")))
        strComment = DeMessSQL(Server.HTMLEncode(Request("comment")))

        Conn.Execute "INSERT INTO comments (pid,fromname,email,subject,comment,datetime) VALUES (" & strPID & ",'" & strName & "','" & strEmail & "','" & strSubject & "','" & strComment & "',now())"
        Set Rs = Conn.Execute("SELECT name,email FROM persons WHERE id=" & strPID)

        strText = Replace(strEMOC, "#navn", Rs(0))
        bolSuccess = SendMail(CStr(Rs(1)), "Besked til dig på Hot Or Not...", strText)

        Page_Caption = "Kommentar sendt!"
        Response.Redirect "default.asp?mode=commentsent&pid=" & strPID
    ElseIf strMode = "delete_comment" Then
        strID = Request("id"): If strID = "" Or Not IsNumeric(strID) Then Response.Redirect "default.asp?mode=read_comments"

        Conn.Execute "DELETE FROM comments WHERE id=" & strID & " AND pid=" & Session("id")

        Response.Redirect "default.asp?mode=read_comments"
    ElseIf strMode = "vote" And bolWasPosted Then
        Session("onlyvote") = Request("onlyvote")
        strVote = Request("vote")

        strLastGender = Request("gender")
        If strLastGender = "1" Then strLastGender = "2" Else strLastGender = "1"

        bolVoteIsOK = False

        Set Rs = Conn.Execute("SELECT id FROM votes WHERE sessionid='" & SessionID & "' AND pid=" & strPID)
        If Rs.BOF And strVote > "" And IsNumeric(strVote) Then
            If CInt(strVote) > 0 And CInt(strVote) < 11 Then
                Conn.Execute "UPDATE hits SET raters=raters+1,vote" & strVote & "=vote" & strVote & "+" & strVote & " WHERE pid=" & strPID
                Conn.Execute "INSERT INTO votes (sessionid,pid,ip,vote,datetime) VALUES ('" & SessionID & "'," & strPID & ",'" & RemoteAddress & "'," & strVote & ",now())"

                bolVoteIsOK = True
            End If
        End If

        strWhere = " WHERE id<>" & strPID
        If Session("onlyvote") > "" And Not Session("onlyvote") = "0" Then strWhere = strWhere & " AND gender=" & Session("onlyvote")

        Set Rs = Conn.Execute("SELECT id,rand() AS rnd FROM persons" & strWhere & " ORDER BY rnd LIMIT 0,1")
        If Not Rs.BOF Then
            strNewPID = Rs(0)

            Select Case bolVoteIsOK
                Case True:  Response.Redirect "default.asp?last_pid=" & strPID & "&gender=" & strLastGender & "&pid=" & strNewPID
                Case False: Response.Redirect "default.asp?gender=" & strLastGender & "&pid=" & strNewPID
            End Select
        Else
            Response.Redirect "default.asp?mode=np"
        End If
    ElseIf strMode = "logout" Then
        Session.Abandon
        Response.Redirect "default.asp"
    ElseIf strMode = "login" Then
        strEmail = DeMessSQL(Request("email"))
        strPass = DeMessSQL(Request("pass"))

        Page_Caption = "Redigér profil"
        Page_ShowMenu = False

        bolLoginSuccessfull = True
        If strEmail > "" And strPass > "" And bolWasPosted Then
            Set Rs = Conn.Execute("SELECT id,email,password FROM persons WHERE email='" & strEmail & "' AND password='" & strPass & "'")
            If Not Rs.BOF Then
                Session("id") = Rs(0)
                Session("email") = Rs(1)
                Session("pass") = Rs(2)

                Response.Redirect "default.asp?mode=login"
            Else
                bolLoginSuccessfull = False
            End If
        End If

        bolIsValid = (Session("email") > "" And Session("pass") > "" And Session("id") > "")
    ElseIf strMode = "delete_pic" And Session("id") > "" Then
        Set Rs = Conn.Execute("SELECT picturefile FROM persons WHERE id=" & Session("id"))
        strPicture = Rs(0)

        Set fso = Server.CreateObject("Scripting.FileSystemObject")
        fso.DeleteFile Server.MapPath("pictures/" & Session("id") & "_" & strPicture), True
        Set fso = Nothing

        Conn.Execute "DELETE FROM persons WHERE id=" & Session("id")
        Conn.Execute "DELETE FROM hits WHERE pid=" & Session("id")
        Conn.Execute "DELETE FROM comments WHERE pid=" & Session("id")

        Response.Redirect "default.asp"
    ElseIf strMode = "commentsent" Then
        Page_Caption = "Kommentar sendt :-)"
        Page_ShowMenu = False
    ElseIf strMode = "send_comment" Then
        Page_Caption = "Send kommentar"
        Page_ShowMenu = False
    ElseIf strMode = "signup" Or strMode = "confirm" Then
        Page_Caption = "Tilmelding"
        Page_ShowMenu = False
    ElseIf strMode = "report_fake" Then
        Page_Caption = "Anmeld fake billede"
        Page_ShowMenu = False
    ElseIf strMode = "read_comments" Then
        Page_Caption = "Kommentarer"
        Page_ShowMenu = False
    ElseIf strMode = "read_comment" Then
        Page_Caption = "Læs kommentar"
        Page_ShowMenu = False
    ElseIf strMode = "np" Then
        Page_Caption = "Ingen profiler"
        Page_ShowMenu = False
    ElseIf strMode = "edit_profile" And Session("id") > "" Then
        Page_Caption = "Ret dine informationer"
        Page_ShowMenu = False
    ElseIf strMode = "pic_stat" And Session("id") > "" Then
        Page_Caption = "Din statistik"
        Page_ShowMenu = False
    ElseIf strMode = "upload_new" And Session("id") > "" Then
        Page_Caption = "Upload nyt billede"
        Page_ShowMenu = False
    ElseIf strMode = "" Then
        Page_Caption = "Vis profil"

        If strPID = "" Then
            If Session("onlyvote") > "" And Not Session("onlyvote") = "0" Then strWhere = " WHERE gender=" & Session("onlyvote")
            Set Rs = Conn.Execute("SELECT id,rand() AS rnd FROM persons" & strWhere & " ORDER BY rnd LIMIT 0,1")
            If Not Rs.BOF Then
                strPID = Rs(0)
                Response.Redirect "default.asp?pid=" & strPID
            Else
                Response.Redirect "default.asp?mode=np"
            End If
        End If
    End If

    If Page_Caption > "" Then
        Page_Header = Page_Caption
        Page_Caption = " - " & Page_Caption
    End If
%>7641
Avatar billede matz Nybegynder
14. januar 2003 - 20:41 #14
har fundet det ;)
Avatar billede matz Nybegynder
16. januar 2003 - 19:25 #15
lukker
Avatar billede Ny bruger Nybegynder

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.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester