fout met includen in index
Ik gebruik de volgende script om paginas te includeren op de index
Code (php)
Ern dit werkt ook bij alles maar als ik een download centre in het midden zet dan verschuift het rechter menu helemaal naar beneden.
Dit is het script van die download centre.
<html>
<head>
<title>sc</title>
</head>
<body>
<img src="images/downloads.png" width="530" height="20">
<table style="border:1px solid #000000" width="532" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/dc.png" valign="top"><p align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
Code (php)
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
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
<?
include ("config.php");
if ($download != "") {
header("location:$download");
$update = "UPDATE downloads SET kliks = kliks + 1 WHERE url='$download'";
$query = mysql_query($update)or die(mysql_error());
exit;
}
// <==========Categorie Info Opvragen:==========>
else if ($cat != ""){
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" bordercolor=\"black\"><tr><td><b><a href=\"index.php?pagina=downloads\">Index</a> > ";
echo $cat;
echo "</b></td></tr>";
$query = mysql_query("SELECT * FROM downloads WHERE categorie='$cat' ORDER BY naam, download_id ASC") or die (mysql_error());
if ($row = mysql_fetch_array($query)){
do {
echo "<tr><td><a href=\"index.php?pagina=downloads&actie=info&download_id=";
echo $row['download_id'];
echo "\">";
echo $row['naam'];
echo "</a></td></tr>";
} while ($row = mysql_fetch_array($query));
} else {
echo "<tr><td align=\"center\">Kan geen downloads voor deze categorie vinden.</td></tr>";
}
echo "</table>";
}
// <==========Download Info Opvragen:==========>
else if ($actie == "info"){
$query = mysql_query("SELECT * FROM downloads WHERE download_id='$download_id'") or die (mysql_error());
while ($row = mysql_fetch_array($query)){
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" bordercolor=\"black\"><tr><td colspan=\"2\"><b><a href=\"index.php?pagina=downloads\">Index</a> > <a href=\"index.php?pagina=downloads&cat=";
echo $row['categorie'];
echo "\">";
echo $row['categorie'];
echo "</a> >";
echo $row['naam'];
echo "</b></td></tr><tr><td width=\"30%\">Toegevoegd door:</td><td width=\"70%\"><a href=\"mailto:";
echo $row['email'];
echo "\">";
echo $row['naamtoevoeger'];
echo "</a></td></tr><tr><td width=\"30%\">Grootte:</td><td width=\"70%\">";
echo $row['grootte'];
echo "</td></tr><tr><td width=\"30%\">Info:</td><td width=\"70%\">";
echo $row['info'];
echo "</td></tr><tr><td width=\"30%\">Aantal keer gedownload:</td><td width=\"70%\">";
echo $row['kliks'];
echo "</td></tr><tr><td align=\"center\" colspan=\"2\" width=\"30%\"><a href=\"" ;
echo $row['url'];
echo "\"><img src=\"images\download.png\" WIDTH=\"90\" HEIGHT=\"25\" border=\"0\"></a></td></tr></table>";
}
}
// <==========Categorieen Opvragen:==========>
else {
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" bordercolor=\"black\"><tr><td><b>Categorieen:</b></td></tr>";
$query = mysql_query("SELECT * FROM categorieen ORDER BY naam ASC") or die (mysql_error());
if ($row = mysql_fetch_array($query)){
do {
echo "<tr><td><a href=\"index.php?pagina=downloads&cat=";
echo $row['naam'];
echo "\">";
echo $row['naam'];
echo "</a></td></tr>";
} while ($row = mysql_fetch_array($query));
} else {
echo "<tr><td>Kan geen Categorieen vinden.</td></tr></table>";
}
echo "</table>";
}
?>
include ("config.php");
if ($download != "") {
header("location:$download");
$update = "UPDATE downloads SET kliks = kliks + 1 WHERE url='$download'";
$query = mysql_query($update)or die(mysql_error());
exit;
}
// <==========Categorie Info Opvragen:==========>
else if ($cat != ""){
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" bordercolor=\"black\"><tr><td><b><a href=\"index.php?pagina=downloads\">Index</a> > ";
echo $cat;
echo "</b></td></tr>";
$query = mysql_query("SELECT * FROM downloads WHERE categorie='$cat' ORDER BY naam, download_id ASC") or die (mysql_error());
if ($row = mysql_fetch_array($query)){
do {
echo "<tr><td><a href=\"index.php?pagina=downloads&actie=info&download_id=";
echo $row['download_id'];
echo "\">";
echo $row['naam'];
echo "</a></td></tr>";
} while ($row = mysql_fetch_array($query));
} else {
echo "<tr><td align=\"center\">Kan geen downloads voor deze categorie vinden.</td></tr>";
}
echo "</table>";
}
// <==========Download Info Opvragen:==========>
else if ($actie == "info"){
$query = mysql_query("SELECT * FROM downloads WHERE download_id='$download_id'") or die (mysql_error());
while ($row = mysql_fetch_array($query)){
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" bordercolor=\"black\"><tr><td colspan=\"2\"><b><a href=\"index.php?pagina=downloads\">Index</a> > <a href=\"index.php?pagina=downloads&cat=";
echo $row['categorie'];
echo "\">";
echo $row['categorie'];
echo "</a> >";
echo $row['naam'];
echo "</b></td></tr><tr><td width=\"30%\">Toegevoegd door:</td><td width=\"70%\"><a href=\"mailto:";
echo $row['email'];
echo "\">";
echo $row['naamtoevoeger'];
echo "</a></td></tr><tr><td width=\"30%\">Grootte:</td><td width=\"70%\">";
echo $row['grootte'];
echo "</td></tr><tr><td width=\"30%\">Info:</td><td width=\"70%\">";
echo $row['info'];
echo "</td></tr><tr><td width=\"30%\">Aantal keer gedownload:</td><td width=\"70%\">";
echo $row['kliks'];
echo "</td></tr><tr><td align=\"center\" colspan=\"2\" width=\"30%\"><a href=\"" ;
echo $row['url'];
echo "\"><img src=\"images\download.png\" WIDTH=\"90\" HEIGHT=\"25\" border=\"0\"></a></td></tr></table>";
}
}
// <==========Categorieen Opvragen:==========>
else {
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" bordercolor=\"black\"><tr><td><b>Categorieen:</b></td></tr>";
$query = mysql_query("SELECT * FROM categorieen ORDER BY naam ASC") or die (mysql_error());
if ($row = mysql_fetch_array($query)){
do {
echo "<tr><td><a href=\"index.php?pagina=downloads&cat=";
echo $row['naam'];
echo "\">";
echo $row['naam'];
echo "</a></td></tr>";
} while ($row = mysql_fetch_array($query));
} else {
echo "<tr><td>Kan geen Categorieen vinden.</td></tr></table>";
}
echo "</table>";
}
?>
</font></p></td>
</tr>
</table>
</body>
</html>
ik hoop dat iemand me ermee kan helpe.
maar het heeft waarschijnlijk niks met die include te maken maar met die download centre script omdat die include bij alle paginas goed werkt bij halve bij deze dus