Danke ersteinmal für die schnelle antwort
ich glaube zu meinen das ich das schonmal so hatte und es als richtig empfand, das prob wenn ich nun die ausgabe mache
$row['inzen'] = db_query($sql1);
und im html einbinde mit
{inzen}
bekomme ich keine ausgabe
habe das row auch schon auf echo gesetzt
antwort
Resource id #54 Resource id #56 Resource id #58 Resource id #60
hier mal meine html und mein php script
{EXPLODE}
{EXPLODE}
{EXPLODE}
<fieldset>
<legend>Instanz & Raid Verwaltung</legend>
<form action="{PFAD}" method="post" enctype="application/x-www-form-urlencoded" name="form">
<center>
{inzen}</br></br>
•{ENDE}=[ <a href="admin.php?raid">Zurück zur Raid übersicht</a> ]•</center><br />
</fieldset>
<fieldset id="userdkp" style="padding: 5px;">
<legend>Teilnehmerverwaltung</legend>
<form name="form1" method="post" action="{PFAD}">
{addchar}
<select name="stat" id="stat">
{msg}
</select>
<input name="admsg" type="text" id="admsg" value="Vom Raidleiter Angmeldet" size="40" />
<input type="submit" name="Submit2" value="Hinzufügen">
</form>
<hr>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
<form name="FormRang" method="post" action="{PFADA}">
<tr class="Chead">
<td colspan="2"><span style="padding-left:25px"><font color="FFFFF"><strong>Nr.<span style="padding-left:25px">Name</font></strong></span></td>
<td align="right" nowrap="nowrap"><font color="FFFFFF"><strong>Alle: </font></strong><input name="ALL" type="checkbox" value="CHECK ALL" onclick="CheckAll();" /></td>
</tr>
{EXPLODE}
<tr class="{CLASS}">
<td align="center" class="Chead"><strong><font color="FFFFF">{nr}</strong></font></td>
<td align="left"><div style="float:left;">{name} - ({klassen})</div><div style="float:right;">{del}</div><br /><div style="font-size:9px;">{sb}<br />{datum}</div></td>
<td align="right" nowrap="nowrap" bgcolor="{color}">{statusmsg}<input name="cid[]" type="checkbox" id="cid[]" value="{cid}" /></td>
</tr>
{EXPLODE}
<tr class="Cdark">
<td colspan="4" class="Chead" align="right">
<select name="all" id="all" onchange="submit();">
<option value="">Keine Auswahl</option>
{msg}
</select>
<span style="text-align: right;"><img src="include/images/icons/pfeil_nach_rechts_unten.jpg" alt="" /></span>
</td>
</tr>
</form>
</table>
</fieldset>
<?php
defined ('main') or die ( 'no direct access' );
defined ('admin') or die ( 'only admin access' );
$design = new design ( 'Admins Area', 'Admins Area', 2 );
require_once("include/includes/func/raid_func.php");
$design->addheader($raidHeader);
$design->header();
$tpl = new tpl ( 'raid/raidverwaltung.htm',1 );
if( !RaidPermission( $menu->get(1) ) )
{
echo 'don\'t Permission'; $design->footer(); exit();
}
$authid = $_SESSION['authid'];
function statmsg($ssid){
$abf = db_query("SELECT * FROM prefix_raidstatusmsg WHERE sid='2' or sid='3';");
$opt = "";
while( $r = db_fetch_assoc( $abf ))
{
if( $r['id'] != $ssid )
{
$opt .= "<option value='".$r['id']."'>".$r['statusmsg']."</option>\n";
}
else
{
$opt .= "<option value='".$r['id']."' selected>".$r['statusmsg']."</option>\n";
}
}
return $opt;
}
switch( $menu->get(3) )
{
case "status":
if( isset($_POST['all']) ){
foreach( $_POST['cid'] as $cid ){
db_query("UPDATE prefix_raidanmeldung SET stat='".$_POST['all']."' WHERE rid='".$menu->get(1)."' AND `char`='".$cid."'");
}
}
break;
case "addchar":
$id = db_result(db_query("SELECT user FROM prefix_characters WHERE id='".$_POST['chars']."'"), 0);
db_query("INSERT INTO `prefix_raidanmeldung` (`id` ,`rid` ,`grp` ,`char` ,`user` ,`kom` ,`stat`,`timestamp`)
VALUES ( NULL ,
'".$menu->get(1)."',
'".$menu->get(2)."',
'".$_POST['chars']."',
'".$id."',
'".$_POST['admsg']."',
'".$_POST['stat']."',
'".time()."');");
wd("admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2),'Char wurde in die Liste eingetragen');
break;
case "beenden":
db_query("UPDATE prefix_raid SET statusmsg='2' WHERE id='".$menu->get(1)."'");
wd("admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2),'Raid wurde beendet!');
break;
case "offen":
db_query("UPDATE prefix_raid SET statusmsg='1' WHERE id='".$menu->get(1)."'");
wd("admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2),'Raid wurde geöffnet!');
break;
case "ADel":
db_query("DELETE FROM prefix_raidanmeldung WHERE id=".$menu->get(4) );
echo "<b>Löschen war erfolgreich!</b>";
break;
}
$page = "admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2);
$InzenID = db_result(db_query("SELECT inzen FROM prefix_raid WHERE id='".$menu->get(1)."'"), 0);
### Links zum Raid Schließen und Öffnen
$dkps['PFAD'] = "admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-raidverwaltung";
$stat_msg = db_result(db_query("SELECT statusmsg FROM prefix_raid WHERE id='".$menu->get(1)."'"), 0);
if( $stat_msg != 2 ){
$dkps['ENDE'] = "[ <a href='admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-beenden'>Raid beenden</a> ]";
}
else
{
$dkps['ENDE'] = "[ <a href='admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-offen'>Raid öffnen</a> ]";
}
$tpl->set_ar_out( $dkps, 0);
###VERLAUF
$sort = array("1"=>"b.name","2"=>"a.info","3"=>"a.pm","4"=>"a.dkp","5"=>"a.date");
$row['PFAD'] = "admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-versort";
$tpl->set_ar_out( $row , 1);
if( isset($_SESSION['dkpsort'] ))
{
$versort = $_SESSION['dkpsort'];
}
{
$versort = 5;
}
if( isset($_SESSION['updown'] ))
{
$usort = $_SESSION['updown'];
}
else
{
$usort = "DESC";
}
$tpl->set_ar_out( array("addchar" => drop_down_menu("SELECT id, name FROM prefix_characters ORDER BY name ASC" , "chars", "", "", true),
"PFAD" => "admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-addchar",
"PFADA" => "admin.php?raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-status",
"msg" => statmsg("")), 3);
$sql = "SELECT
a.id as aid, a.user, a.stat as status, a.rid, a.kom, a.timestamp,
b.id as cid, b.name,
c.statusmsg, c.color,
b.s1, b.s2, b.s3,
d.id as klassenid, d.klassen
FROM prefix_raidanmeldung AS a
LEFT JOIN prefix_characters AS b ON a.char = b.id
LEFT JOIN prefix_raidstatusmsg AS c ON a.stat = c.id
LEFT JOIN prefix_klassen AS d ON b.klassen = d.id
WHERE
a.rid = '".$menu->get(1)."'
ORDER BY a.stat ASC";
$res = db_query($sql);
$i = 1;
$sql1 = "SELECT r.id, r.inzen, i.name FROM prefix_raid AS r LEFT JOIN prefix_instanzen AS i ON r.inzen = i.id WHERE r.id = '" . $menu->get(1) . "'";
while( $row = db_fetch_assoc( $res ))
{
$row['CLASS'] = cssClass($row['CLASS']);
$row['nr'] = $i;
echo $row['inzen'] = db_query($sql1);
$row['name'] = ( $row['kom'] != '' ? "<b><a href='#' title='Kommentar: ". $row['kom'] ."'>".$row['name'] . "</a></b>" : "<b>".$row['name']."</b>" );
$row['sb'] = char_skill($row['s1'],$row['s2'],$row['s3'],$row['klassenid']);
$row['datum'] = DateFormat("D d.m.Y H:i", $row['timestamp'] );
$row['del'] = aLink("<img src='include/images/icons/del.gif'>", "raidverwaltung-".$menu->get(1)."-".$menu->get(2)."-ADel-".$row['aid'], 1);
$row['stat'] = $row['aid'];
$tpl->set_ar_out( $row, 4);
$i++;
}
$tpl->set_ar_out( array(), 5);
$design->footer();
?>
Zuletzt modifiziert von Arikarion am 10.10.2011 - 10:59:09