this is a site in progress (http://www.sundanceclub.be/v07/)
home, deejays, about sdc, musicplayer should be working, (parties, pix 'n tunes, guestbook don’t work yet)
my question is: when i uploaded it yesterday to test it on the server, it seemed all be working fine. Now when I surfed to the url, the homepage wasn’t loading in it’s box, and ‘deejays’ also.
and when i clicked again, it showed, and then again it didn’t, etc. etc…
how does the site work:
1 major swf where external swf’s are loaded in a empty mc, al those external swf’s call a php-file which reads out the db…
is there something i should pay better attention to ?
some source-files:
http://www.sundanceclub.be/v07/sdc_try03.fla (main)
http://www.sundanceclub.be/v07/sdc_about.fla (one of the imported swf’s)
code from the read_db.php:
<?php error_reporting(E_ALL); // zet op 0 als de site live is, E_ALL tijdens ontwikkeling ?>
<style type="text/css">
</style>
<?php
if(! include("databaseserver.inc.php")) { // preferrably outside the root..
echo '&r=&b='.urlencode('De file met de database connectie parameters kon niet geinclude worden door '.$_SERVER['PHP_SELF']).'&';
exit;
}
?>
<?php
function connecttodatabase() {
if (!$databaseLink = mysql_connect(MYSQL_SERVER, MYSQL_USER, MYSQL_PASSWORD)) { // connectie parameters uit de include files
return false;
}
if (!mysql_select_db(MYSQL_DATABASE, $databaseLink)) {
return false;
}
return $databaseLink; // we arrive at this point if connection is made, and database is selected !
} // end databaseconnection function
?>
<?php
if(!$link = connecttodatabase() ) {
echo '&r=0&b='.urlencode('Er kon geen verbinding met de database gemaakt worden, pas de database connectie parameters aan in '.$_SERVER['PHP_SELF']). '&';
exit;
}
?>
<?php
// als we hier komen, is er een actieve databaseverbinding en gaan we door met het script.
// nu "m"-parameter uit flash opvangen in php, bewaren in variabele $mode
// wel eerst controleren of parameter bestaat, anders op NULL zetten
$mode = isset($_REQUEST['m']) ? $_REQUEST['m'] : NULL;
?>
<?php
////////////////////////////////////////////////////////////////////////////////////////////////
/////// de waarden van de "m"-parameter die we opvangen wordt uit de $_REQUEST-array gehaald /////////
////////////////////////////////////////////////////////////////////////////////////////////////
// haalABOUT
case "haalAbout":
$sql = "SELECT about_titel, about_kop, about_text, DATE_FORMAT(about_datum, '%d-%m-%Y') as datum
FROM sdc_about
WHERE
about_zichtbaar = 1
ORDER BY about_datum DESC, about_id DESC LIMIT 0,10";
if(!$r = mysql_query($sql, $link)) {
echo '&r=0&b='.urlencode('about info kon niet opgehaald worden: ').mysql_error().'&';
exit;
}
$output=NULL;
$output .= '<font size="18" color="#F9CB11" face="georgia"><b>*about sundanceclub</b></font><br />';
while($w = mysql_fetch_object($r)) {
$output .= '<font color="#FFFFFF"><b>' . htmlentities(stripslashes($w->about_titel)). '</b></font><br/>';
//$output .= '<font color="#FDEACE">'. htmlentities(stripslashes($w->about_kop)) . '</font><br />';
$output .= '<font color="#FDEACE">'. nl2br(stripslashes(ereg_replace("\r",'',$w->about_text))). '</font><br>';
$output .= '<font color="#BD7406">'. $w->datum . '</font><br><br>';
}
$output = urlencode($output); // zorg voor veilig netwerk transfer naar flash
echo '&r=1&b='.urlencode('about-info succesvol opgehaald').'&n='.$output.'&';
exit;
break;
case "andereParam":
break;
default:
break;
}
?>
<?php
echo'&r=0&b='.urlencode('Geen of onjuiste parameters meegestuurd').'&';
sleep(1);
exit;
?>