folgender fehler tritt auf:
Parse error: syntax error, unexpected '}' in /xxx/xxx/xxx/htdocs/include/contents/raid.php on line 425
meine raid.php sieht wie folgt aus:
<?php
# Copyright by: Benjamin Brauns
# Support: www.Manticors-Thorn.de
defined ('main') or die ( 'no direct access' );
$akttime = date('Y-m-d');
$akttime1 = date('d.m.Y');
$gastRight = "-1";
// was kommt als nächstes nach Datum / OFFEN
if ( $menu->get(2) == '' OR $menu->getA(2) == 'p' ) {
$title = $allgAr['title'].' :: Raids';
$hmenu = 'Raids';
$design = new design ( $title , $hmenu);
$design->header();
$ergOffen = db_query('SELECT COUNT(id) FROM `prefix_Raid` WHERE status = "1"');
$anzOffen = db_result($ergOffen,0);
$ergBeendet = db_query('SELECT COUNT(id) FROM `prefix_Raid` WHERE status = "2"');
$anzBeendet = db_result($ergBeendet,0);
$ergAbgesagt = db_query('SELECT COUNT(id) FROM `prefix_Raid` WHERE status = "3"');
$anzAbgesagt = db_result($ergAbgesagt,0);
$tpl = new tpl ( '/raid/raid.htm' );
$tpl->set_ar_out ( array('OFFEN' => $anzOffen, 'BEENDET' => $anzBeendet, 'ABGESAGT' => $anzAbgesagt) , 0 );
$class = '';
$erg = db_query("SELECT DATE_FORMAT(datime,'%d.%m.%Y - %H:%i') as time,
instanz,
leader,
groese,
datime,
status,
prefix_Raid.id as Rid,
prefix_Raid.uid,
prefix_RaidInstanz.RIID as Iid,
prefix_RaidInstanz.name as Iname,
prefix_RaidInstanz.pix
FROM prefix_Raid
LEFT JOIN prefix_RaidInstanz ON prefix_RaidInstanz.RIID = prefix_Raid.instanz
ORDER BY datime DESC,status");
if ( db_num_rows ( $erg ) == 0 ) {
echo '<tr class="Cmite"><td colspan="4"><strong><font color="#FF4242">kein Raid vorhanden</font></strong></td></tr>';
} else {
while ($row = db_fetch_assoc($erg) ) {
if ( $class == 'Cmite' ) { $class = 'Cnorm'; } else { $class = 'Cmite'; }
$row['pix'];
$row['instanz'];
$row['groese'];
$row['Iname'];
#--------Anmeldungen Pro Raid Auf der Übersichts seite
$ergANM = db_query('SELECT COUNT(RMID) FROM `prefix_RaidMember` WHERE zusage = "1" AND rid = "'.$row['Rid'].'" ');
$anzANM = db_result($ergANM,0); //print_r ($anzANM);
#$row['Evon'] = $anzANM['0']." / ";
$row['Evon'] = $anzANM." / ";
#Print_r ($anzANM); // DEBUG
#--------
switch ( $row['status']) {
case '1' : $row['status'] = '<font color="#009900">OFFEN</font>'; break;
case '2' : $row['status'] = '<font color="#FF0000">BEENDET</font>'; break;
case '3' : $row['status'] = '<font color="#FFEE00">ABGESAGT</font>'; break;
}
$row['class'] = $class;
$tpl->set_ar_out($row,1);
}
}
$tpl->out(2);
// Raid Details //
//--------------//
$design->footer();
} elseif ( is_numeric($menu->get(2)) ) {
$_GET['mehr'] = escape($menu->get(2),'integer');
$abf = "SELECT
DATE_FORMAT(datime,'%d.%m.%Y') as datum,
DATE_FORMAT(datime,'%H:%i') as zeit,
DATE_FORMAT(start,'%H:%i') as start,
DATE_FORMAT(end,'%H:%i') as end,
instanz,
leader,
groese,
datime,
status,
loottyp,
groese,
treff,
bosse,
level,
text,
uid,
prefix_RaidInstanz.pix,
prefix_Raid.id as Rid,
prefix_RaidInstanz.RIID as Iid,
prefix_RaidInstanz.name as Iname,
prefix_RaidInstanz.pix
FROM prefix_Raid LEFT
JOIN prefix_RaidInstanz ON prefix_RaidInstanz.RIID = prefix_Raid.instanz
WHERE prefix_Raid.id = '".$_GET['mehr']."'";
$erg = @db_query($abf);
#db_check_erg ($erg);
$row = db_fetch_assoc($erg);
// Filtern von html code
$row['text'] = bbcode($row['text']);
//
$title = $allgAr['title'].' :: Raids';
$hmenu = '<a href="?raid" class="smalfont">Raids</a><b> » </b>Deteils';
$design = new design ( $title , $hmenu ); // SOLL
$design->header();
$tpl = new tpl ('/raid/raid_next');
#-------
switch ( $row['loottyp'] ) {
case '0' : $row['loottyp'] = ''; break;
case '1' : $row['loottyp'] = 'Plündern als Gruppe'; break;
case '2' : $row['loottyp'] = 'Plündermeister'; break;
case '3' : $row['loottyp'] = 'Bedarf vor Gier'; break;
case '4' : $row['loottyp'] = 'DKP'; break;
case '5' : $row['loottyp'] = 'DKP/Würfeln'; break;}
#-------
// rechte check Locked Anzeige für Gäste!
#if ( $_SESSION['authright'] <= $allgAr['raid_anz_gast'] ) { FÜR DB CONFIG WERT
if ( $_SESSION['authright'] <= $gastRight ) { // ab user level fixer wert
$row['treff']=$row['treff'];
$row['bosse']=$row['bosse'];
$row['loottyp']=$row['loottyp'];
$row['leader']=$row['leader'];
$row['text']=$row['text'];
} else{
$row['treff']='locked';
$row['bosse']='locked';
$row['loottyp']='locked';
$row['text']='locked';
$row['leader']='locked';
}
// editrecht
$reditL = $allgAr['raid-edit-L'];
if ( $_SESSION['authid'] == $row['uid'] OR $_SESSION['authright'] <= $allgAr['raid-edit-L'] ) {
$row['rechtD'] = "";
$row['rechtE'] = '<a href="admin.php?raid-show-'.$row['Rid'].'"><img src="include/images/icons/edit.gif" alt="Edit" border="0" title="Edit" /></a> ';
} else {
$row['rechtD'] = "";
$row['rechtE'] = "";
}
$klasseSQL = $charklasse = @mysql_result(db_query("SELECT klasse FROM prefix_wowchars WHERE UID = '".$raout1['uid']."' AND CID = '".$raout1['WoWc']."'"),0);
// Auswertung wieviele Chars aus welchen Klassen spielen werden
switch ($charklasse) {
case 'Krieger':
$krieger = $krieger + 1;
break;
case 'Magier':
$Magier = $Magier + 1;
break;
case 'Hexenmeister':
$Hexenmeister = $Hexenmeister + 1;
break;
case 'Schurke':
$Schurke = $Schurke + 1;
break;
case 'Druide':
$Druide = $Druide + 1;
break;
case 'Priester':
$Priester = $Priester + 1;
break;
case 'Paladin':
$Paladin = $Paladin + 1;
break;
case 'Schamane':
$Schamane = $Schamane + 1;
break;
case 'Jaeger':
$Jaeger = $Jaeger + 1;
break;
}
}
If ($krieger <= 0) { $krieger = 0; }
If ($Magier <= 0) { $Magier = 0; }
If ($Hexenmeister <= 0) { $Hexenmeister = 0; }
If ($Schurke <= 0) { $Schurke = 0; }
If ($Druide <= 0) { $Druide = 0; }
If ($Priester <= 0) { $Priester = 0; }
If ($Paladin <= 0) { $Paladin = 0; }
If ($Schamane <= 0) { $Schamane = 0; }
If ($Jaeger <= 0) { $Jaeger = 0; }
$row['ZUGEORDNETE_ZUSAGEN'] = "<td>".$krieger."</td>\n<td>".$Magier."</td>\n<td>".$Hexenmeister."</td>\n<td>".$Schurke."</td>\n<td>".$Druide."</td>\n<td>".$Priester."</td>\n<td>".$Paladin;
$row['ZUGEORDNETE_ZUSAGEN'] .= "</td>\n<td>".$Schamane."</td>\n<td>".$Jaeger."</td>";
$tpl->set_ar_out($row,0); // Raid Info Anzeige!
// END
// checke zusagen / absagen / ersatz
$zusagen = db_count_query("SELECT COUNT(zusage) FROM prefix_RaidMember WHERE (zusage = '1' AND (eingeteilt = '0' OR eingeteilt = '1' OR eingeteilt = '4')) AND rid = ".$_GET['mehr']);
$ersatz = db_count_query("SELECT COUNT(zusage) FROM prefix_RaidMember WHERE (zusage = '2' AND (eingeteilt = '0' OR eingeteilt = '2')) AND rid = ".$_GET['mehr']);
$absagen = db_count_query("SELECT COUNT(zusage) FROM prefix_RaidMember WHERE (zusage = '3' AND (eingeteilt = '0' OR eingeteilt = '3')) AND rid = ".$_GET['mehr']);
$aout1 = array (
'zusagen' => $zusagen,
'ersatz' => $ersatz,
'absagen' => $absagen,
'id' => $_GET['mehr']
);
$tpl->set_ar_out($aout1,1);
// END
$ergU = db_query("SELECT * FROM prefix_RaidMember WHERE rid = '".$_GET['mehr']."' AND uid = '".$_SESSION['authid']."'"); // Check ob an gemeldet
if ( db_num_rows ( $ergU ) != 0 ) {
echo '<tr class="Cmite"><td colspan="4"><font color="#009900">Du bist angemeldet</font></td></tr>'; // Anmelde Anzeige
#------ Update -------------
if ( isset($_POST['sub']) AND $row['status'] == 1 ) {
db_query("UPDATE prefix_RaidMember
SET zusage = '".$_POST['zusageNEW']."'
,kom = '".$_POST['komNEW']."'
,WoWc = '".$_POST['WoWcNEW']."'
,zsdate = '". date("d.m.Y / H:i") ."'
WHERE RMID = '".$_POST['RMID']."'
");
echo mysql_error();
}
} else {
#---- Anmeldung ------------------------------------------------
if ( isset ($_POST['sub']) AND $ergU != 2 AND $row['status'] == 1 ) {
#if ( $_POST['Sub'] == "Anmelden" ) {
$kom = escape($_POST['Ckom'],'string');
#---- Check --
$ergCH = db_query("SELECT uid, rid, zusage FROM prefix_RaidMember WHERE uid = '".$_SESSION['authid']."' AND rid = '".$_GET['mehr']."' "); //CH
if ( db_num_rows ( $ergCH ) == 0 ) {
#echo mysql_error(); // für DEBUG
#-------
db_query("INSERT INTO prefix_RaidMember (uid,rid,zusage,kom,WoWc) VALUES ('".$_SESSION['authid']."','".$_POST['ID']."','".$_POST['zusage']."','".$_POST['Ckom']."','".$_POST['WoWc']."')");
echo '<tr class="Cmite"><td colspan="4"><font color="">DU HAST DICH SOEBEN ANGEMELDET!</font></td></tr>';
} // Check
#echo "<br>ID '".$_POST['ID']."', Char '".$_POST['WoWc']."', authid '".$_SESSION['authid']."', kom '".$_POST['Ckom']."'<br>"; // für DEBUG
#echo mysql_error(); // für DEBUG
}
#---------------------------------------------------------------
#-------------Chars pro User Auslesen, --------- scheiß code, muß verbessert werden!!!
$ergUC = db_query("SELECT CID FROM prefix_wowchars WHERE UID = '".$_SESSION['authid']."' LIMIT 0,1");
#echo '<form name="form1" method="post" action="?raid-deteil-'.$_GET['mehr'].'">';
while ($rowUC = db_fetch_assoc($ergUC) ) {
$rowUC['WoWC'] = dblistee ( $rowUC['WoWC'], "SELECT CID,name FROM prefix_wowchars WHERE UID = '".$_SESSION['authid']."' AND onoff = 0");
$rowUC['ID'] = $_GET['mehr'];
$rowUC['class'] = "cdark";
$tpl->set_ar_out($rowUC,2);
}
#------------Anmelde Anzeige----------------
#if ( $_SESSION['authright'] == "-1"){ // Check Rechte ( gast?)
//BUG
if ( db_num_rows ( $ergUC ) == 0 ) {
echo '<tr class="Cmite"><td colspan="4"><b><font color="#CC6600" size="2">
Du mußt erst einen Char erstellt haben um dich anmelden zu können!
<b></font></td></tr>'; // Char Anlegen Anzeige
} else {
echo '<br><br>
<input type="submit" name="sub" value="Anmelden">
<br><br>
<font color="#FF0000">Du bist noch NICHT angemeldet!</font>
<form>
'; // Anmelde Anzeige
}
/* } //BUG
else {
echo '<tr class="Cmite"><td colspan="4"><b><font color="#CC6600" size="2">
Du mußt <a href="?user-regist">Registriert</a> und freigeschaltet sein um dich anmelden zu können!
<b></font></td></tr>';
}
*/
#$tpl->out(2);
}
$SORT = "eingeteilt";
#--- User Listen Anzeige ----
$ergC = db_query("SELECT
prefix_RaidMember.zusage,
prefix_RaidMember.eingeteilt,
prefix_RaidMember.kom as Ukom,
prefix_RaidMember.WoWc,
prefix_RaidMember.zsdate as zsdate,
prefix_RaidMember.RMID,
prefix_RaidMember.uid as Ruid,
prefix_RaidMember.rid as Rid,
prefix_wowchars.UID as Cuid,
prefix_wowchars.CID as Cid,
prefix_wowchars.name as charname
FROM prefix_RaidMember
LEFT JOIN prefix_wowchars
ON prefix_wowchars.CID = prefix_RaidMember.WoWc
WHERE prefix_RaidMember.rid = '".$_GET['mehr']." ORDER BY $SORT'
");
$a = 0; // Für die Anzeige wenn die Raidanmeldung abgelaufen ist.
while ($row2 = db_fetch_assoc($ergC) ) {
#--- Anzeige angemeldeter Char mit änderungs funktion!
if ( $_SESSION['authid'] == $row2['Ruid'] AND $row['status'] == 1 ) {
$row2['Kicon'] ="";
$row2['charname'] =
'<form name="form1" method="post" action="?raid-deteil-'.$_GET['mehr'].'">
<input name="RMID" value="'.$row2['RMID'].'" size="5" type="hidden">
<select name="WoWcNEW">'.
$row2['charname'] = dblistee ( $row2['charname'], "SELECT CID,name FROM prefix_wowchars WHERE UID = '".$_SESSION['authid']."' AND onoff = 0 ORDER BY name != '".$row2['charname']."'")
.'</select> ';
$row2['Ukom'] =
'<input name="komNEW" type="text" value="'
.$row2['Ukom'].
'">
<input type="submit" name="sub" value="Update"></form>
';
$row2['zusage'] =
'<select name="zusageNEW">'.
$row2['zusage'] = arlistee ( $row2['zusage'] , get_zusage_array() )
.'</select>';
#$row2['Kicon'] = '<img src="include/images/icons/charpix/'.$row['klasse'].'.jpg" alt="" border="0" height="18" width="19"></a>';
#$row2['Kicon'] = dbwert ( $row2['Kicon'], "SELECT CID,klasse FROM prefix_wowchars WHERE CID = '".$row2['Cid']."' AND onoff = 0");
}else {
$row2['Kicon'] = dbwert ( $row2['Kicon'], "SELECT CID,klasse FROM prefix_wowchars WHERE CID = '".$row2['Cid']."' AND onoff = 0");
$row2['Kicon'] = '<img src="include/images/icons/charpix/'.$row2['Kicon'].'.jpg" alt="" border="0" height="18" width="19"></a>';
/* */ // ROLLOVER
$rowR['name'] = dbwert ( $rowR['name'], "SELECT CID,name FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$rowR['level'] = dbwert ( $rowR['level'], "SELECT CID,level FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$rowR['klasse'] = dbwert ( $rowR['klasse'], "SELECT CID,klasse FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$rowR['sex'] = dbwert ( $rowR['sex'], "SELECT CID,sex FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$rowR['skill'] = dbwert ( $rowR['skill'], "SELECT CID,skill FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$rowR['rasse'] = dbwert ( $rowR['rasse'], "SELECT CID,rasse FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$rowR['gilde'] = dbwert ( $rowR['gilde'], "SELECT CID,gilde FROM prefix_wowchars WHERE CID = '".$row2['WoWc']."'");
$ro = "'Level : ".$rowR['level']." - ".$rowR['klasse']."<br />Skill : ".$rowR['skill']."<br />Rasse : ".$rowR['rasse']."<br />Geschlecht : ".$rowR['sex']."<br />',CAPTION,'".$rowR['name']." : ".$rowR['gilde']."',WRAP";
$row2['charname'] = '<a href="index.php?user-wowchars-detail-'.$row2['Cid'].'" onmouseover="return overlib('.$ro.');" onmouseout="return nd();">'.$rowR['name'].'</a>';
// ROLLOVER ENDE
}
#----------------------------------------------------
$row2['charname'];
$row2['Cid'];
$row2['UPD'] = "";
#$row2['Ukom'];
switch ( $row2['zusage'] ) {
case '0' : $row2['zusage'] = '<font color="#FFFFFF">noch keine Angabe</font>'; break;
case '1' : $row2['zusage'] = '<font color="#009900">zugesagt</font>'; break;
case '2' : $row2['zusage'] = '<font color="#CC6600">ersatz</font> angemeldet'; break;
case '3' : $row2['zusage'] = '<font color="#FF0000">abgesagt</font>'; break;}
switch ( $row2['eingeteilt'] ) {
case '0' : $row2['eingeteilt'] = '<font color="#FFFFFF">noch keine Einteilung</font>'; break; // weiß
case '1' : $row2['eingeteilt'] = '<font color="#009900">ZUSAGE</font>'; break; // grün
case '2' : $row2['eingeteilt'] = '<font color="#CC6600">ERSATZ</font> angemeldet'; break; // orage
case '3' : $row2['eingeteilt'] = '<font color="#FF0000">ABSAGE</font>'; break; // rot
case '4' : $row2['eingeteilt'] = '<font color="#66FFFF">LEADER</font>'; break; } // türkies
#$ergdkp = db_query("SELECT COUNT(dkp) FROM prefix_RaidMember WHERE UID = '".$_SESSION['authid']."' AND rid = '".$_GET['mehr']."'");
#$anzdkp = db_result($ergdkp,0);
#array('dkp' => $anzdkp) , 0 );
// Zwei Stunden vorher keine zusage mehr.
$RAID_CLOSE = db_result(db_query("SELECT start FROM prefix_Raid WHERE id = '".$menu->get(2)."'"), 0);
$RAID_CLOSE = explode(" ", $RAID_CLOSE);
$jetztDatum = date("Ymd");
$jetztZEIT = date("Gis");
$RAID_CLOSE[1] = explode(":",$RAID_CLOSE[1]);
$RAID_CLOSE[1][0] = $RAID_CLOSE[1][0] - $allgAr['raid-anmeldeschluss'];
if (strlen($RAID_CLOSE[1][0]) == 1) {
$RAID_CLOSE[1][0] = "0".$RAID_CLOSE[1][0];
}
$RAID_CLOSE[1] = implode("", $RAID_CLOSE[1]);
$RAID_CLOSE[0] = str_replace("-", "", $RAID_CLOSE[0]);
$RAID_CLOSE[1] = str_replace(":", "", $RAID_CLOSE[1]);
$jetzt = $jetztDatum. $jetztZEIT;
$jetzt = str_replace("-", "0",$jetzt);
$dbTime = $RAID_CLOSE[0].$RAID_CLOSE[1];
$dbTime = str_replace("-", "0", $dbTime);
//echo $jetzt."<- Zeit DB Time minus abzug aus Config-> ".$dbTime;
if ($dbTime >= $jetzt) {
#if ( $_SESSION['authright'] <= $allgAr['raid_anz_gast'] ) { FÜR DB CONFIG WERT
if ( $_SESSION['authright'] <= $gastRight ) { // ab user level fixer wert
$tpl->set_ar_out($row2,3); // User (Char) Anzeige
}
} else {
if ($a == 0){
echo '<tr class="Cmite"><td colspan="4" align="center"><font color="#009900">Die Anmeldezeit ist Abgelaufen!</font></td></tr>';
$a = $a + 1;
}
}
}
#--------------------------------------------------------------------------------------------------------------------------------
$tpl->out(4);
$design->footer();
if($_POST['sub']) {
echo('<meta http-equiv="refresh" content="0;URL=index.php?raid-deteil-'.$row['Rid'].'">');
}
}
/*
TODO
-Char rollover efekte mit info´s! ?!?
-Instanzen Informationen ?!?
-Item Datenbank ?!?
*/
?>