cookie header allraedy sent, terwijl er niets in (naar mijn weten)

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Jens V

Jens V

24/09/2006 14:32:00
Quote Anchor link
Ik heb dus in een agenda die ik eerder heb gemaakt, een stukje moeten bijvoegen zodat items met 'rank' = 1 enkel zichtbaar zijn voor mensen met een $_COOKIE['Rank'] == 1.

mijn code is zo:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
<?
$res
= mysql_query ($sqljan) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50">'.$row['day'].'/'.$row['month'].'</td><td width="350">'.$row['event'].'</td><td width="60">'.$row['place'].'</td><td width="40">'.$row['task'].'</td><td width="60">'.$row['met'].'</td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>


maar als ik nu ga kijken, laat ie niets zien, ook niet de items met rank = 0 (kheb zelfs met rank NULL geprobeerd) buiten als ik ingelogd ben.

wat doe ik fout?

ik heb al geprobeerd dit erboven te zetten:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
<?
if ((isset($_COOKIE['Rank']))){
  setcookie('Rank', 0, time()+60*60*24*30, '/', '', 0);}
?>


maar dan zegt die dus
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/fh2028/domains/tdkclan.com/public_html/sites/jelle/agenda.php:4) in /usr/home/fh2028/domains/tdkclan.com/public_html/sites/jelle/includes/agenda.php on line 5


wat nu?
 
PHP hulp

PHP hulp

18/11/2024 09:21:44
 
Winston Smith

Winston Smith

24/09/2006 14:34:00
Quote Anchor link
Quote:
wat nu?
Zoeken op het forum of Google. De vraag is afgelopen week al minstens 5 keer de revue gepasseerd.
 
Crispijn -

Crispijn -

24/09/2006 14:34:00
Quote Anchor link
Wanneer je een headers cannot be sent error krijgt, betekent dit dat je een session_start(), setcookie(), header() of een andere functie die een header naar je browser verstuurt op de verkeerde plaats hebt staan.

Even in de FAQ kijken...
 
Jens V

Jens V

24/09/2006 14:42:00
Quote Anchor link
ik heb dit nu voor mijn output gezet:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?
if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= 1)){} else {
  setcookie('Rank', $_COOKIE['Rank'], time()-60*60*24*30, '/', '', 0);
  setcookie('Rank', 0, time()+60*60*24*30, '/', '', 0);}
?>

maar nog geeft hij geen enkel item weer
 
Klaasjan Boven

Klaasjan Boven

24/09/2006 14:48:00
Quote Anchor link
Is het niet handigrt om dat in een sessie te doen?
COOKIES zijn namelijk te bewerken door de user. En zonder meer script is het niet mogelijk om jouw probleem op te lossen
 
Jens V

Jens V

24/09/2006 14:50:00
Quote Anchor link
ik zal je even het script pm'en, maar mijn hele site draait op cookie ipv sessions
 
Crispijn -

Crispijn -

24/09/2006 14:52:00
Quote Anchor link
Wat is het alemene forum-voordeel van PM tov een post hier?

Het is een forum waar iedereen komt om wat te leren... Gebruik dat dan ook zo... :)

We zien hier graag je script verschijnen!
 
Jens V

Jens V

24/09/2006 14:53:00
Quote Anchor link
allez dan:p
ik wou het al pm'en omdat het zo onordelijk was (ik gebruik font tags ipv css, en het is nogal simpel gemaakt...)
EDIT:

hier is het:

dit is de geinclude agenda.php:

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
193
194
195
<body bgcolor="#9C0303"><?
Connect();

//Kijken of er een jaar in de URL staat
if(Empty($_GET['year']))
{

$year = date("Y");
$sqljan = "SELECT * FROM agenda WHERE month = 1 AND year = '$year' ORDER BY day ASC";
$sqlfeb = "SELECT * FROM agenda WHERE month = 2 AND year = '$year' ORDER BY day ASC";
$sqlmar = "SELECT * FROM agenda WHERE month = 3 AND year = '$year' ORDER BY day ASC";
$sqlapr = "SELECT * FROM agenda WHERE month = 4 AND year = '$year' ORDER BY day ASC";
$sqlmay = "SELECT * FROM agenda WHERE month = 5 AND year = '$year' ORDER BY day ASC";
$sqljun = "SELECT * FROM agenda WHERE month = 6 AND year = '$year' ORDER BY day ASC";
$sqljul = "SELECT * FROM agenda WHERE month = 7 AND year = '$year' ORDER BY day ASC";
$sqlaug = "SELECT * FROM agenda WHERE month = 8 AND year = '$year' ORDER BY day ASC";
$sqlsep = "SELECT * FROM agenda WHERE month = 9 AND year = '$year' ORDER BY day ASC";
$sqloct = "SELECT * FROM agenda WHERE month = 10 AND year = '$year' ORDER BY day ASC";
$sqlnov = "SELECT * FROM agenda WHERE month = 11 AND year = '$year' ORDER BY day ASC";
$sqldec = "SELECT * FROM agenda WHERE month = 12 AND year = '$year' ORDER BY day ASC";
}

else
{
$year = $_GET['year'];
$sqljan = "SELECT * FROM agenda WHERE month = 1 AND year = '$year' ORDER BY day ASC";
$sqlfeb = "SELECT * FROM agenda WHERE month = 2 AND year = '$year' ORDER BY day ASC";
$sqlmar = "SELECT * FROM agenda WHERE month = 3 AND year = '$year' ORDER BY day ASC";
$sqlapr = "SELECT * FROM agenda WHERE month = 4 AND year = '$year' ORDER BY day ASC";
$sqlmay = "SELECT * FROM agenda WHERE month = 5 AND year = '$year' ORDER BY day ASC";
$sqljun = "SELECT * FROM agenda WHERE month = 6 AND year = '$year' ORDER BY day ASC";
$sqljul = "SELECT * FROM agenda WHERE month = 7 AND year = '$year' ORDER BY day ASC";
$sqlaug = "SELECT * FROM agenda WHERE month = 8 AND year = '$year' ORDER BY day ASC";
$sqlsep = "SELECT * FROM agenda WHERE month = 9 AND year = '$year' ORDER BY day ASC";
$sqloct = "SELECT * FROM agenda WHERE month = 10 AND year = '$year' ORDER BY day ASC";
$sqlnov = "SELECT * FROM agenda WHERE month = 11 AND year = '$year' ORDER BY day ASC";
$sqldec = "SELECT * FROM agenda WHERE month = 12 AND year = '$year' ORDER BY day ASC";
}

?>


<table width="570" cellpadding="2" cellspacing="0" border="0">
<tr><td valign="top" width:"500"></td><td valign="top" width="70"></td></tr>
<tr><td colspan="2" valign="top">
<font face="Verdana" size="2" color="#FFFFFF">Het is <? echo $datum ?>.</font>
<table width="570" cellpadding="2" cellspacing="0" border="1" bordercolor="#000000">
<tr><td width="50" bgcolor="#EDEDED"><font face="Verdana" size="2" color="#9C0303"><b>Datum</b></font></td><td width="350" bgcolor="#EDEDED"><font face="Verdana" size="2" color="#9C0303"><b>Event</b></font></td><td width="60" bgcolor="#EDEDED"><font face="Verdana" size="2" color="#9C0303"><b>Locatie</b></font></td><td width="60" bgcolor="#EDEDED"><font face="Verdana" size="2" color="#9C0303"><b>Job</b></font></td><td width="60" bgcolor="#EDEDED"><font face="Verdana" size="2" color="#9C0303"><b>Met</b></font></td><td width="10" bgcolor="#EDEDED"><font face="Verdana" size="2" color="#9C0303"><b>URL</b></font></td></tr>
<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month1"><font face="Verdana" size="2" color="#FFFFFF"><b>Januari</b></font></a></td>
<?
$res
= mysql_query ($sqljan) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>
<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month2"><font face="Verdana" size="2" color="#FFFFFF"><b>Februari</b></font></a></td>
<?
$res
= mysql_query ($sqlfeb) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" background="images/breaked.bmp"></td></tr>
<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month3"><font face="Verdana" size="2" color="#FFFFFF"><b>Maart</b></font></a></td>
<?
$res
= mysql_query ($sqlmar) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month4"><font face="Verdana" size="2" color="#FFFFFF"><b>April</b></font></a></td>
<?
$res
= mysql_query ($sqlapr) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month5"><font face="Verdana" size="2" color="#FFFFFF"><b>Mei</b></font></a></td>
<?
$res
= mysql_query ($sqlmay) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month6"><font face="Verdana" size="2" color="#FFFFFF"><b>Juni</b></font></a></td>
<?
$res
= mysql_query ($sqljun) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month7"><font face="Verdana" size="2" color="#FFFFFF"><b>Juli</b></font></a></td>
<?
$res
= mysql_query ($sqljul) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month8"><font face="Verdana" size="2" color="#FFFFFF"><b>Augustus</b></font></a></td>
<?
$res
= mysql_query ($sqlaug) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month9"><font face="Verdana" size="2" color="#FFFFFF"><b>September</b></font></a></td>
<?
$res
= mysql_query ($sqlsep) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month10"><font face="Verdana" size="2" color="#FFFFFF"><b>Oktober</b></font></a></td>
<?
$res
= mysql_query ($sqloct) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr><td width="570" colspan="6" bgcolor="#EDEDED"></td></tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month11"><font face="Verdana" size="2" color="#FFFFFF"><b>November</b></font></a></td>
<?
$res
= mysql_query ($sqlnov) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

<tr>
<td width="570" height="2" colspan="6" bgcolor="#EDEDED"></td>
</tr>

<tr>
<td width="570" height="25" colspan="6" bgcolor="#000000"><a name="month12"><font face="Verdana" size="2" color="#FFFFFF"><b>December</b></font></a></td>
<?
$res
= mysql_query ($sqldec) or die (mysql_error ());
if (mysql_num_rows ($res) >= 1)
{
while ($row = mysql_fetch_array ($res))
{

if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= $row['rank'])){
  echo '<tr><td width="50"><font face="Verdana" size="2" color="#FFFFFF">'.$row['day'].'/'.$row['month'].'</font></td><td width="350"><font face="Verdana" size="2" color="#FFFFFF">'.$row['event'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['place'].'</font></td><td width="40"><font face="Verdana" size="2" color="#FFFFFF">'.$row['task'].'</font></td><td width="60"><font face="Verdana" size="2" color="#FFFFFF">'.$row['met'].'</font></td><td width="10"><div align="center"><a href="http://'.$row['url'].'" border="0" style="text-decoration: none" target="_blank"><img src="images/bully.png" border="0"></a></div></td></tr>';}}}
?>

</table>
<br>
<?
$lastyear
= $year -1;
$nextyear = $year +1;

echo '<a href="agenda.php?year='.$lastyear.'" style="text-decoration: none"><font face="Verdana" size="2" color="#FFFFFF">Vorig Jaar</font></a><img src="images/break.jpg" border="0"><a href="agenda.php?year='.$nextyear.'" style="text-decoration: none"><font face="Verdana" size="2" color="#FFFFFF">Volgend Jaar</font></a>';
Disconnect();
?>


en dit is de agenda.php die de includes/agenda.php (bovenstaand) include:

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
<?
if ((isset($_COOKIE['Username'])) && ($_COOKIE['Rank'] >= 1)){} else {
  setcookie('Rank', $_COOKIE['Rank'], time()-60*60*24*30, '/', '', 0);
  setcookie('Rank', 0, time()+60*60*24*30, '/', '', 0);}
?>

<html>
<head>
<title>Dj BliX!</title>
<style type="text/css">
font
{
font: 12px Verdana
}
</style>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="#EDEDED" vlink="#FFFFFF" alink="#FFFFFF">
<? include('includes/connect.php'); ?>
<div align="center">
<? include ('includes/admin.php'); ?>
<table width="790" cellpadding="0" Cellspacing="0" id="buiten" bgcolor="#9C0303">
<tr>
<td widht="790" height="150" colspan="2"id="headers"><font>dit zijn de headers</font></td>
</tr>
<tr>
<td colspan="2" width="790" height="20" id="tussenheader">

<table cellpading="5" cellspacing="0" width="790" height="23" id="menu" border="0" bordercolor="#FFFFFF" bgcolor="#6C0000">
<tr>
<? include('includes/menu.php'); ?>
</tr>
</table>

</td>
</tr>
<tr>
<td width="195" id="beam" background="images/downbeam.jpg" valign="top">
<table cellpading="0" cellspacing="0" width="195" height="295">
<tr>
<td width="195" height="295" valign="top"background="images/beam.jpg" border="0"></td>
</tr>
</table>
</td><td width="595" id="main">
<div align="center">
<table cellpading="0" cellspacing="0" width="570" height="100%" id="main">
<tr>
<td width="570" height="100%" border="0"><? include ('includes/agenda.php'); ?>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>

</body>
Gewijzigd op 01/01/1970 01:00:00 door Jens V
 
Klaasjan Boven

Klaasjan Boven

24/09/2006 15:08:00
Quote Anchor link
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
<?php if((isset($_COOKIE['Username']))&&($_COOKIE['Rank'] >= 1)){} else {setcookie('Rank', $_COOKIE['Rank'], time()-60*60*24*30, '/', '', 0);setcookie('Rank', 0, time()+60*60*24*30, '/', '', 0);}
?>

enzo?
 
Jens V

Jens V

24/09/2006 15:09:00
Quote Anchor link
huh?
 
Klaasjan Boven

Klaasjan Boven

24/09/2006 15:15:00
Quote Anchor link
ipv regel 1tm4 op agenda.php
 
Jens V

Jens V

24/09/2006 15:17:00
Quote Anchor link
wat daarvan?
dat heb ik erin gezet om ervoor te zorgen dat mensen die NIET ingelogd zijn, (iedereen dus, want er zijn maar 2 users(admin)) de "hidden" items niet kunnen zien, maar de rest wel, want in de db staan de items die ze wel mogen zien op rank = 0
(en die niet op 1)
 
Klaasjan Boven

Klaasjan Boven

24/09/2006 15:18:00
Quote Anchor link
Ja maar ik weet alleen niet of die spatie voor setcookie het probleem is.
 
Jens V

Jens V

24/09/2006 15:22:00
Quote Anchor link
blijft hetzelfde...
 



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.