navigatie werkt niet

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

The Hosh

The Hosh

06/01/2006 23:33:00
Quote Anchor link
hallo
ik heb deze site: http://huissenpoll.to.md/reacties.php maar de navigatie werkt hier niet.. alleen pagina 1 werkt. als k volgende of een pagina klik doet die het niet.. dit is de script:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?php
function replys()
{

    global $HTTP_GET_VARS,$admin,$mod;
    
    include "config.php";
    
    $bestanden = array();
    $map = opendir($berichten_dir);
    while ($bestand = readdir($map))
    {

        if ($bestand != "." && $bestand != ".." && $bestand != "index.php" && $bestand != ".htaccess")
        {

            $bestanden[] = $bestand;
        }
    }

    closedir($map);
    rsort($bestanden);
    reset($bestanden);
    
    $lengte1 = count($bestanden);

    if($lengte1 == 0)
    {

        echo
        "<br><table width=\"100%\" border=\"1\" bordercolor=\"black\" cellpadding=\"2\" cellspacing=\"0\"><tr>".
        "<td width=\"48%\" class=\"header\" align=\"center\"><font size=\"2\"><b>Er zijn geen reacties</b>".
        "</font></td></tr></table>";
    }

    else
    {
        if(!$page){$page = 0;}
        else{$page = intval($page);}
        
        // -------------------------------------------------------------------
        // Begin volgende vorige pagina nummering

    
        $volgende = 10 + $page;
        $vorige = $page - 10;
        $bgcolor="#F8F6F6";
        $nav="";

        if($vorige >= 0){$nav1="<a href='$PHP_SELF?n=$vorige'>";$nav2="</a>";}
        $nav.="$nav1<b>Vorige</b>$nav2";

        for($i = 0; $i < $lengte1; $i+=10)
        {

            if($lengte1 > $i)
            {

                $nav.="&nbsp;[<a href='$PHP_SELF?n=$i'>".($i/10+1)."</a>]";
            }
        }

        $nav.="&nbsp;";
        
        if($lengte1 > $volgende){$nav1="<a href='$PHP_SELF?n=$volgende'>";$nav2="</a>";}
        $nav.="$nav1<b>Volgende</b>$nav2";

        include $poll_file;
        $total_votes=$pieces0+$pieces1+$pieces2+$pieces3+$pieces4;

        echo
        "<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr>".
        "<td width=\"48%\"><font size=\"2\"><b>Er zijn $lengte1 reacties en zijn $total_votes stemmen.</b></font></td>".
        "<td width=\"52%\" align=\"right\"><a href=\"voegtoe.php\">".
        "<img src=\"images/newthread.gif\" border=\"0\" alt=\"New Post\" title=\"New Post\"></a>".
        "</td></tr></table><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">".
        "<tr bgcolor=\"\"><td height=\"2\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">".
        "<tr bgcolor=\"#8295B3\"><td height=\"2\"><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">".
        "<tr><td class=\"header\"><a href=\"index.php\">$SiteName</a> :: Berichten</td>".
        "<td class=\"header\" colspan=\"2\" align=\"right\">$nav</td></tr>";

        for($i=$page;$i<$volgende;$i++)
        {

            if($bestanden[$i])
            {

                unset($ReactieNaam);
                unset($ReactieDatum);
                unset($ReactieTijd);
                unset($ReactieBericht);
                include("$berichten_dir/$bestanden[$i]");
                $bericht = bbcode($bericht);
                if($naam!='' && $onderwerp!='' && $bericht!='' && $email!='')
                {

                    if($bgcolor=="#F8F6F6")
                        {
$bgcolor="#DCE0E6";}
                    else{$bgcolor="#F8F6F6";}

                    echo
                    "<a name=\"top\"><tr bgcolor=\"$bgcolor\"><td align=\"center\" bgcolor=\"$bgcolor\" ".
                    "rowspan=\"2\" valign=\"top\"><font color=\"#344457\">$naam</font><br>";

                    if(stristr(file_get_contents($ban_file), strval('|'.$ip.'|')) || $ip=='')
                    {

                        $PostBanned=1;
                    }


                    if($admin==1 or $mod==1)
                    {

                        if($PostBanned==0)
                        {

                            echo
                            "<a href=\"ban.php?id=$bestanden[$i]&stap=0\">".
                            "<img src=\"images/ban.gif\" border=\"0\" ".
                            "alt=\"Ban IP\" title=\"Ban IP\"></a>&nbsp;";
                        }

                        else
                        {
                            echo
                            "<a href=\"unban.php?id=$bestanden[$i]&stap=0\">".
                            "<img src=\"images/unban.gif\" border=\"0\" ".
                            "alt=\"Unban IP\" title=\"Unban IP\"></a>&nbsp;";
                        }
                    }

                    $width = "1%";
                    if($admin==1 or $mod==1)
                    {

                        $width = "18%";
                    }

                    echo
                    "</td><td height=\"2\" bgcolor=\"$bgcolor\" width=\"50%\"><font color=\"#344457\"><b><a ".
                    "href=\"reactie.php?id=$bestanden[$i]\">$onderwerp</a></b></font><font color=\"#344457\">&nbsp;".
                    "($datum @ $tijd)</font></td><td height=\"2\" bgcolor=\"$bgcolor\" width=\"$width\" align=\"right\" ".
                    "cellpadding=\"0\"><font color=\"#344457\"><a href=\"voegtoe.php?q=$bestanden[$i]\">".
                    "<img src=\"images/quote.gif\" border=\"0\" alt=\"Quote\" title=\"Quote\"></a>&nbsp;";
                    
                    if($admin==1 or $mod==1)
                    {

                        echo
                        "<a href=\"edit.php?id=$bestanden[$i]\"><img src=\"images/".
                        "bewerk.gif\" border=\"0\" alt=\"Edit Post\" title=\"Edit Post\"></a>&nbsp;".
                        "<a href=\"del.php?id=$bestanden[$i]&stap=0\"><img src=\"images/delete.gif\" ".
                        "border=\"0\" alt=\"Delete Post\" title=\"Delete Post\"></a>&nbsp;".
                        "<a href=\"ip.php?id=$bestanden[$i]\">".
                        "<img src=\"images/ip.gif\" border=\"0\" alt=\"Check ip\" ".
                        "title=\"Check ip\"></a>";
                    }

                    
                    echo
                    "</font></td></tr><tr bgcolor=\"$bgcolor\">".
                    "<td bgcolor=\"$bgcolor\" width=\"75%\"valign=\"top\" colspan=\"2\">".
                    "<font color=\"#344457\">$bericht</font></td></tr><tr bgcolor=\"$bgcolor\">".
                    "<td height=\"2\" align=\"left\" bgcolor=\"$bgcolor\" width=\"20%\" valign=\"middle\">&nbsp;</td>".
                    "<td height=\"2\" bgcolor=\"$bgcolor\" width=\"75%\" colspan=\"2\">";
                    if($emailLatenZien==1)
                    {

                        echo
                        "<a href=\"mailto:$email\"><img src=\"images/email.gif\" ".
                        "border=\"0\" alt=\"Send email\" title=\"Send email\"></a>&nbsp;";
                    }

                    $site1 = $site;
                    if(eregi(" ",$site1))
                    {

                        $site1 = "";
                    }


                    if($site1!='' && $site1!='http://')
                    {

                        if(!eregi("http://",$site1))
                        {

                            $site1 = "http://".$site1."/";
                        }


                        echo
                        "<a href=\"$site1\" target=\"_blank\"><img src=\"images/site.gif\" ".
                        "border=\"0\" alt=\"Check Site\" title=\"Check Site\"></a>&nbsp;";
                    }

                    if($PostBanned==1)
                    {

                        echo"<img src=\"images/banned.gif\">&nbsp;";
                    }

                    echo
                    "</td></tr><tr bgcolor=\"silver\"><td colspan=\"3\">".
                    "<img src=\"images/spacer.gif\" width=\"100%\" height=\"0\"></td></tr>";
                }

                else
                {
                    @
unlink("$berichten_dir/$bestanden[$i]");
                }
            }
        }

        echo
        "<tr><td class=\"header\"><a href=\"index.php\">$SiteName</a> :: Berichten</td>".
        "<td class=\"header\" colspan=\"2\" align=\"right\">$nav";
    }

    echo
    "</td></tr></table></table></td></tr></table></td></tr></table><table width=\"100%\" ".
    "border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr><td width=\"48%\">&nbsp;".
    "</td><td width=\"52%\" align=\"right\"><a href=\"voegtoe.php\"><img src=\"images/".
    "newthread.gif\" border=0 alt=\"New Post\" title=\"New Post\"></a></td></tr></table>";

}

?>
Gewijzigd op 08/01/2006 08:02:00 door The Hosh
 
PHP hulp

PHP hulp

24/01/2021 20:05:43
 
The Hosh

The Hosh

07/01/2006 23:17:00
Quote Anchor link
niemand???
 
Willem Jan Z

Willem Jan Z

07/01/2006 23:21:00
Quote Anchor link
Ik zie nergens een query, in je query moet iets staan van:
LIMIT $start,$aantal...

$aantal zal vast staan, en $start moet die ?n= worden uit je link van vorige...
 
The Hosh

The Hosh

08/01/2006 07:47:00
Quote Anchor link
njah er zit geen query in omdat het met bestanden werkt.. en wat bedoel je met $start en $aantal.. keb geen een variable met $start en/of $aantal :s
 
The Hosh

The Hosh

08/01/2006 08:01:00
Quote Anchor link
Willem Jan bedankt maarlaat maar.. k heb hem al.. ut was de ik niet liet zien wat $page was.. dit moest er dus nog bij: $page = $HTTP_GET_VARS['page'];
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.