I have been searching for the error for quite a while, but it seems like I can not find out, what is wrong. I am working as a working student at the Chair for Marketing and we do have our own homepage, whose maintenance is my job. Someone has written the code years ago and so far there was never a problem. But today, I have noticed that suddenly the database content is not shown on our homepage. Here is the code and I hope, you can help me to identify the problem.
<div id="gContent">
<?php include("inc/navmain.inc"); ?>
<?php include ("v2/db/db.php"); ?>
<?php
$sql_ueber = "SELECT ".
"ws.*, p.*".
"FROM ".
"workshop ws, coeContacts p ".
"WHERE ".
"(ws.Umkreis = 'ueber' AND ws.KontaktPerson = p.id)ORDER BY -ws.Anfang DESC";
$sql_muenster = "SELECT ".
"ws.*, p.*".
"FROM ".
"workshop ws, coeContacts p ".
"WHERE ".
"(ws.Umkreis = 'reg_muenster' AND ws.KontaktPerson = p.id) ORDER BY -ws.Anfang DESC";
$sql_berlin = "SELECT ".
"ws.*, p.*".
"FROM ".
"workshop ws, coeContacts p ".
"WHERE ".
"(ws.Umkreis = 'reg_berlin' AND ws.KontaktPerson = p.id) ORDER BY -ws.Anfang DESC";
$sql_koeln = "SELECT ".
"ws.*, p.*".
"FROM ".
"workshop ws, coeContacts p ".
"WHERE ".
"(ws.Umkreis = 'reg_koeln' AND ws.KontaktPerson = p.id) ORDER BY -ws.Anfang DESC";
$result_ueber = mysql_query ($sql_ueber);
$result_muenster = mysql_query ($sql_muenster);
$result_berlin = mysql_query ($sql_berlin);
$result_koeln = mysql_query ($sql_koeln);
?>
<script src="js/jquery-1.7.1.min.js"></script>
<!--Script zum Anzeigen der Infos pro Uni und zum aktualisieren des Submen¸s -->
<script>
function toggleMe(info, link){
var ids = ["table_Ueberregional", "table_Muenster", "table_Berlin","table_Koeln"];
var infLink = ["termineUberregional", "termineMuenster", "termineBerlin","termineKoeln"];
var length = ids.length;
for(var i=0; i < length; i++){
document.getElementById(ids[i]).style.display="none";
$("#" + infLink[i]).removeClass("active");
}
document.getElementById(info).style.display="block";
$("#" + link).addClass("active");
return true;
}
$(document).ready(function(){
$("#termineUberregional").click(function(event){
toggleMe('table_Ueberregional','termineUberregional');
});
$("#termineMuenster").click(function(event){
toggleMe('table_Muenster','termineMuenster');
});
$("#termineBerlin").click(function(event){
toggleMe('table_Berlin','termineBerlin');
});
$("#termineBerlin").click(function(event){
toggleMe('table_Berlin','termineBerlin');
});
$("#termineKoeln").click(function(event){
toggleMe('table_Koeln','termineKoeln');
});
});
</script>
<div id="table_Berlin" style="display:none">
<h1>Termine für Berlin</h1>
<table id="table_termine">
<th>Kooperationspartner</th><th>Zeitraum</th><th>Ansprechpartner</th><th>Anhang</th>
<?php
while($data = mysql_fetch_array($result_berlin) ) {
if($data["Umkreis"] != "reg_berlin"){
continue 1;
}
else{
echo '<tr>';
echo '<td>';
echo $data["Partner"];
echo '</td>';
echo '<td>';
if($data["Anfang"]){
echo date('d/m/Y',strtotime($data["Anfang"])). ' - ';
if($data["Ende"]){
echo date('d/m/Y',strtotime($data["Ende"])) ;
}
}
else {
echo 'Ankündigung folgt';
}
echo '</td>';
echo '<td>';
echo '<a href="mailto:'.$data["email"]. '">'. $data["First_Name"]. " " . $data["Last_Name"];
echo '</td>';
echo '<td>';
if($data["Anhang"] == "N/A"){
echo "";
}
else {
echo '<a href="upload/'.$data["Anhang"].'" target="_blank"><img src="images/pdf_icon.gif" height="18px" width="18px"/></a>';
}
echo '</td>';
echo '</tr>';
}
};
?>
</table>
<p class="information">Nur CoEM-Studierende der Hochschule Berlin können sich für diese Workshops anmelden. Die Workshops werden bestmöglich nach Präferenz zugewiesen.</p>
</div>