het script rapper.php geeft geen verbinding e omdat ik een beginnende phper ben ben ik ook nog niet zo goed in unbuggen
PHP
<script language="JavaScript">
<!--
function openVideo(url,breed,hoogte){
VideoWindow = window.open(url, 'popup', 'toolbar=0, location=0, directories=0, statusbar=0, menubar=0, scrollbars=1, resizable=1, width='+breed+',
height='+hoogte)}
//-->
</script>
<script>
function change1(picture) {
document.theimg1.src = picture
}
function change2(picture) {
document.theimg2.src = picture
}
function change3(picture) {
document.theimg3.src = picture
}
function change4(picture) {
document.theimg4.src = picture
}
function change5(picture) {
document.theimg5.src = picture
}
//-->
</script>
<?php
if($_GET['id']){
$hitquery = mysql_query("UPDATE rappers SET hits=hits+1 WHERE id=".intval($_GET['id']));
$hquery2 = mysql_query("select * from rappers where id = '" . intval($_GET['id']) . "'");
$hits2 = mysql_fetch_object($hquery2);
}
$db = mysql_query("SELECT * FROM rappers WHERE id=".intval($_GET['id']));
$rap = mysql_fetch_object($db);
$rap1 = mysql_query("SELECT videoclips FROM rappers WHERE id=".intval($_GET['id']));
$check = mysql_num_rows($db);
$rapper = $_GET['rapper'];
{
$titel = "$rapper";
}
?>
<table width="391" border="0">
<tr>
<th width="276" scope="row" bgColor="#221D09" align="center">
<font face="verdana" size="1" color="#9f9f9f"><?
if ($rap->naamvolledig != NULL)
{ // Als de rappersnaam een afkorting is en er een volledige naam bestaat
echo "".$rap->naamvolledig." ";
}
else
{ // Als de rapper geen afkorting heeft
echo"$titel";
}
?></font>
<table width="100%" border="0">
<tr>
<td width="79" bgColor="#484848"><font face="Verdana" size="1"><strong>Naam:</strong></font></td>
<td width="217" bgColor="#302e28"><font color="#9f9f9f" face="verdana" size="1"><?
if ($rap->naamvolledig != NULL)
{ // Als de rappersnaam een afkorting is en er een volledige naam bestaat
echo "".$titel." ";
}
else
{ // Als de rapper geen afkorting heeft
echo"$titel";
}
?></font></td>
</tr>
<tr>
<td width="79" bgColor="#484848"><font face="Verdana" size="1"><strong>Plaats:</strong></font></td>
<td bgColor="#302e28"><font color="#9f9f9f" face="verdana" size="1"><?=$rap->hometown;?></font></td>
</tr>
<tr>
<td width="79" bgColor="#484848"><strong><font face="Verdana" size="1" >
Artiesten:</font></strong></td>
<td bgColor="#302e28"><font color="#9f9f9f" face="verdana" size="1"><?
if ($rap->groeprappers != NULL)
{ // Als de rapper een groep is
echo $rap->groeprappers;
}
else
{ // Als de rapper alleen alleen is
echo 'Solo';
}
?></font></td>
</tr>
<?
if ($rap->tracks != 0)
{ // Als de tracks ingeschakeld zijn
$krijgtracksaantal = mysql_query("SELECT * FROM `raptracks` WHERE `categorie`='$rapper'");
$aantaltracks = mysql_num_rows($krijgtracksaantal);
echo "<tr>
<td width=\"207\" bgColor=\"#484848\"><strong><font face=\"Verdana\" size=\"1\">
Aantal Tracks:</font></strong></td>
<td bgColor=\"#302e28\"><font color=\"#9f9f9f\" face=\"verdana\" size=\"1\">
$aantaltracks</font></td>
</tr>";
}
else
{ // Als de tracks uitgeschakeld zijn
echo "";
}
if ($rap->videoclips!= 0)
{ // Als de videoclips ingeschakeld zijn
$krijgvideoaantal = mysql_query("SELECT * FROM `rapvideos` WHERE `categorie`='$rapper'");
$aantalvideoclips = mysql_num_rows($krijgvideoaantal);
echo "<tr>
<td width=\"207\" bgColor=\"#484848\"><strong><font face=\"Verdana\" size=\"1\">
Aantal Clips:</font></strong></td>
<td bgColor=\"#302e28\"><font color=\"#9f9f9f\" face=\"verdana\" size=\"1\">
$aantalvideoclips</font></td>
</tr>";
}
else
{ // Als de videoclips uitgeschakeld zijn
echo "";
}
if ($rap->lyrics != 0)
{ // Als de lyrics ingeschakeld zijn
$krijglyricaantal = mysql_query("SELECT * FROM `raplyrics` WHERE `categorie`='$rapper'");
$aantallyrics = mysql_num_rows($krijglyricaantal);
echo "<tr>
<td width=\"207\" bgColor=\"#484848\"><strong><font face=\"Verdana\" size=\"1\">
Aantal Lyrics:</font></strong></td>
<td bgColor=\"#302e28\"><font color=\"#9f9f9f\" face=\"verdana\" size=\"1\">
$aantallyrics</font></td>
</tr>";
}
else
{ // Als de lyrics uitgeschakeld zijn
echo "";
}
?>
</table>
</th>
<th width="105"> <?
echo "<a href=\"".$rap->img."\"><img src=\"".$rap->img."\" width=\"100\" height=\"100\" border=
\"0\"></a>";
?> </th>
</tr>
</table>
<br>
<?
if ($rap->tracks != 0)
{ // Als de rappersnaam een afkorting is en er een volledige naam bestaat
echo "<table border='0' width='100%'>
<tr>
<td bgcolor='#484848' height='2'><b><font size='1' face='Verdana'>
<img border='0' src='images/music.gif' width='23' height='23'>Tracks:</font></b></td>
</tr>
<tr>
<td bgcolor='#302e28'>
";
$muziek = "SELECT * FROM `raptracks` WHERE `categorie`='$rapper' ORDER BY nieuw DESC, naam ASC";
$tracks = mysql_query($muziek) or die (mysql_error());
while ($list = mysql_fetch_object($tracks)) {
$nieuw = $list->nieuw;
if($nieuw == 1){
$nieuwer = "<img src='images/nieuw.gif' border='0'>";
}
else{
$nieuwer = "";
}
echo "<table border='0' width='100%'>
<tr>
<td width='397' bgcolor='#302e28'><font color=\"black\" size=
\"1\" face=\"Verdana\"><strong>»</strong> <a href='?p=afspelen&id=$list->id'><font color=\"#9f9f9f\" size=\"1\" face=\"Verdana\"><span style=\"text-
decoration: none\">$list->naam</span></a></td>
<td width='40'> $nieuwer</td>
</tr>
</table>";
}
echo " </td>
</tr>
<tr height='4'>
<td bgcolor='#484848'></td>
</tr>
</table>
";
}
else
{ // Als de rapper geen afkorting heeft
echo "";
}
if ($rap->videoclips != 0)
{ // Als de rappersnaam een afkorting is en er een volledige naam bestaat
echo "<table border='0' width='100%'>
<tr>
<td bgcolor='#484848' height='2'><b><font size='1' face='Verdana'>
<img border='0' src='images/music.gif' width='23' height='23'>Clips:</font></b></td>
</tr>
<tr>
<td bgcolor='#302e28'>
";
$videoclips = "SELECT * FROM `rapvideos` WHERE `categorie`='$rapper' ORDER BY nieuw DESC";
$clips = mysql_query($videoclips) or die (mysql_error());
while ($list = mysql_fetch_object($clips)) {
$nieuw = $list->nieuw;
if($nieuw == 1){
$nieuwer = "<img src='images/nieuw.gif'>";
}
else{
$nieuwer = "";
}
echo "
<table border='0' width='100%'>
<tr>
<td bgcolor='#302e28'><font color=\"black\" size=\"1\" face=
\"Verdana\"><strong>»</strong> <a href='?p=video&id=$list->id'><font color=\"#9f9f9f\" size=\"1\" face=\"Verdana\"><span style=\"text-decoration: none
\">$list->naam</font></a></td>
</tr>
</table>
";
}
echo " </td>
</tr>
<tr height='4'>
<td bgcolor='#484848'></td>
</tr>
</table>
";
}
else
{ // Als de rapper geen afkorting heeft
echo "";
}
if ($rap->lyrics != 0)
{ // Als de rappersnaam een afkorting is en er een volledige naam bestaat
echo "<table border='0' width='100%'>
<tr>
<td bgcolor='#484848' height='2'><b><font size='1' face='Verdana'>
<img border='0' src='images/music.gif' width='23' height='23'>Lyrics:</font></b></td>
</tr>
<tr>
<td bgcolor='#302e28'>
";
$raplyrics = "SELECT * FROM `raplyrics` WHERE `categorie`='$rapper' ORDER BY nieuw DESC";
$lyrics = mysql_query($raplyrics) or die (mysql_error());
while ($list = mysql_fetch_object($lyrics)) {
$nieuw = $list->nieuw;
if($nieuw == 1){
$nieuwer = "<img src='images/nieuw.gif'>";
}
else{
$nieuwer = "";
}
echo "
<table border='0' width='100%'>
<tr>
<td width='397' bgcolor='#302e28'><font color=\"black\" size=
\"1\" face=\"Verdana\"><strong>»</strong> <a href='?p=lyrics&id=$list->id'><font color=\"#9f9f9f\" size=\"1\" face=\"Verdana\"><span style=\"text-
decoration: none\">$list->naam</span></a></td>
<td width='40'> $nieuwer</td>
</tr>
</table>";
}
echo " </td>
</tr>
<tr height='4'>
<td bgcolor='#484848'></td>
</tr>
</table>
";
}
else
{ // Als de rapper geen afkorting heeft
echo "";
}
?>
Toon Meer