Zitat geschrieben von
Rockwulf
uff ehh erst nochmal alles lesen bissl lang her wieder
@syro
Bitte die Orginaldatei ohne änderungen und die mit änderungen psoten.
Dazu bitte die jeweilig zugehörige htm datei
Zuletzt modifiziert von Rock@wulf am 04.04.2013 - 13:04:21
Gemoddete teams.php ohne Änderung
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
function show_members ($gid,$tpl) {
global $allgAr, $lang;
$qry = db_query('SELECT `id`, `name` FROM `prefix_groupfuncs` ORDER BY `id` ASC');
$tpl->out(1);
while ($gr = db_fetch_assoc($qry)) {
$q = 'Select user.id, user.name, user.avatar, user.status, user.email, user.homepage, user.llogin, user.regist
FROM prefix_groupusers AS gusers
LEFT JOIN prefix_user AS user ON user.id = gusers.uid
LEFT JOIN prefix_groupfuncs funk ON gusers.fid = funk.id
WHERE gusers.gid = '.$gid.' AND funk.pos = '.$gr['id'].'
ORDER BY funk.pos ASC, user.name ASC';
$erg = db_query($q);
if(db_num_rows($erg)==0) continue;
$tpl->set('rang_id', $gr['id']);
$tpl->set('rang_name', $gr['name']);
$tpl->out(2);
while ($row = db_fetch_assoc($erg)) {
if($row['homepage'] == ""){
$homepage="<img src=\"include/images/forum/nowww.png\" border=\"0\">";
}else{
$homepage="<a href=\"".$row['homepage']."\" target=\"_blank\"><img src=\"include/images/forum/owww.png\" border=\"0\"></a>";
}
if ($class == 'Cmite')
$class = 'Cnorm';
else
$class = 'Cmite';
if($row['avatar'] != ''){
$ai = getimagesize($row['avatar']);
$avatar = '<img src="'.$row['avatar'].'" onmouseover="resizeImage(this,\''.$ai[0].'px\', \''.$ai[1].'px\');" onmouseout="smalImage(this, \''.round(($ai[0])/(($ai[1])/50),0).'px\', \'50px\');" style="width:'.round(($ai[0])/(($ai[1])/50),0).'px; height:50px;"/>';
}else
$avatar = '';
$ar = array (
'AVATAR' => $avatar,
'NAME' => $row['name'],
'UID' => $row['id'],
'ACTIVITY' => ($row['status'] == 1? $lang['active'] : $lang['inactive']),
'RANG' => $gr['name'],
'CLASS' => $class,
'PM' => ('<a href=index.php?forum-privmsg-new=0&empfid='.$row['id'].'" target="_blank"><img src="include/images/forum/opm.png" border="0"></a>'),
'EMAIL' => $row['email'],
'WWW' => $homepage,
'LLOGIN' => date('d.m.Y <b\r> H:i',$row['llogin'].' Uhr'),
'DATE' => date('d.m.Y',$row['regist'])
);
$tpl->set_ar_out($ar,3);
}
}
$tpl->out(4);
}
if ($menu->get(1) == 'show') {
$gid = escape($menu->get(2), 'integer');
$name = @db_result (db_query("SELECT name FROM prefix_groups WHERE id =".$gid));
$bild = @db_result (db_query("SELECT img FROM prefix_groups WHERE id =".$gid));
$title = $allgAr['title'].' :: Teams :: '.$name;
$hmenu = '<a class="smalfont" href="?teams">Teams</a> » '.$name;
$design = new design ( $title , $hmenu );
$design->header();
$tpl = new tpl ('teams');
if (!empty($bild) ) {
$show = '<img src="'.$bild.'" title="'.$name.'" alt="'.$name.'" border="0"></a>';
} else {
$show = '<b>'.$name.'</b>';
}
$tpl->set_out('show', $show,0);
show_members ($gid,$tpl);
} else {
$title = $allgAr['title'].' :: Teams';
$hmenu = 'Teams';
$design = new design ( $title , $hmenu );
$design->header();
$tpl = new tpl ('teams');
$erg1 = db_query("SELECT name,img,id as gid FROM prefix_groups WHERE zeigen = 1 ORDER BY pos");
while ($row = db_fetch_assoc($erg1) ) {
if (!empty($row['img']) ) {
$row['show'] = '<a href="index.php?teams-show-'.$row['gid'].'"><img src="'.$row['img'].'" title="'.$row['name'].'" alt="'.$row['name'].'" border="0"></a>';
} else {
$row['show'] = '<a href="index.php?teams-show-'.$row['gid'].'"><b>'.$row['name'].'</b></a>';
}
$tpl->set_ar_out($row,0);
if ($allgAr['teams_show_cat'] == 0) {
show_members ($row['gid'],$tpl);
}
}
}
$design->footer(0);
?>
Gemoddete teams.htm ohne Änderung
<table width="100%" cellpadding="3" border="0" cellspacing="1" class="border">
<tr class="Cdark">
<td colspan="6" valign="bottom" align="center">{show}</td>
</tr>
</table>
{EXPLODE}
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="border">
<colgroup>
<col width= "10%" />
<col width= "*" />
<col width= "75px" />
<col width= "75px" />
<col width= "40px" />
<col width= "40px" />
<col width= "40px" />
<col width= "80px" />
<col width= "100px" />
</colgroup>
<script type="text/Javascript">
function resizeImage(bild, width, height){
bild.style.width = width;
bild.style.height = height;
}
function smalImage(bild, width, height){
bild.style.width = width;
bild.style.height = height;
}
</script>
{EXPLODE}
<tr>
<!-- hier das Rangbild! (bspw. rang-1.jpg für alle Leader)-->
</tr>
<tr class="Chead" height="30">
<th align="center">{_lang_avatar}</th>
<th align="center" >{_lang_name}</th>
<th align="center">{_lang_rank}</th>
<th align="center">{_lang_activity}</th>
<th colspan="3" align="center">{_lang_Kontakt}</th>
<th align="center">{_lang_lasttimeonline}</th>
<th align="center">{_lang_regtime}</th>
</tr>{EXPLODE}<tr class="{CLASS}" style="height:56px;">
<th align="center">{AVATAR}</th>
<td align="center" ><a href="index.php?user-details-{UID}">{NAME}</a></td>
<td align="center"><font style="font-size: 10px">{RANG}</font></td>
<td align="center">{ACTIVITY}</td>
<td align="center">{PM}</td>
<td align="center" ><a href="mailto:{EMAIL}"><img src="include/images/forum/oemail.png" border="0"></a></td>
<td align="center" >{WWW}</td>
<td align="center">{LLOGIN}</td>
<td align="center" >{DATE}</td>
</tr>{EXPLODE}
</table>
----------------------
Geänderte teams.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
function show_members ($gid,$tpl) {
global $allgAr, $lang;
$qry = db_query('SELECT `id`, `name` FROM `prefix_groupfuncs` ORDER BY `id` ASC');
$tpl->out(1);
while ($gr = db_fetch_assoc($qry)) {
$q = 'Select user.id, user.name, user.avatar, user.status, user.email, user.homepage, user.llogin, user.regist
FROM prefix_groupusers AS gusers
LEFT JOIN prefix_user AS user ON user.id = gusers.uid
LEFT JOIN ic1_userfields uf1 ON ic1_user.id = uf1.uid AND uf1.fid = 18
LEFT JOIN ic1_userfields uf2 ON ic1_user.id = uf2.uid AND uf2.fid = 24
LEFT JOIN prefix_groupfuncs funk ON gusers.fid = funk.id
WHERE gusers.gid = '.$gid.' AND funk.pos = '.$gr['id'].'
ORDER BY funk.pos ASC, user.name ASC';
$erg = db_query($q);
if(db_num_rows($erg)==0) continue;
$tpl->set('rang_id', $gr['id']);
$tpl->set('rang_name', $gr['name']);
$tpl->out(2);
while ($row = db_fetch_assoc($erg)) {
if($row['homepage'] == ""){
$homepage="<img src=\"include/images/forum/nowww.png\" border=\"0\">";
}else{
$homepage="<a href=\"".$row['homepage']."\" target=\"_blank\"><img src=\"include/images/forum/owww.png\" border=\"0\"></a>";
}
if ($class == 'Cmite')
$class = 'Cnorm';
else
$class = 'Cmite';
if($row['avatar'] != ''){
$ai = getimagesize($row['avatar']);
$avatar = '<img src="'.$row['avatar'].'" onmouseover="resizeImage(this,\''.$ai[0].'px\', \''.$ai[1].'px\');" onmouseout="smalImage(this, \''.round(($ai[0])/(($ai[1])/50),0).'px\', \'50px\');" style="width:'.round(($ai[0])/(($ai[1])/50),0).'px; height:50px;"/>';
}else
$avatar = '';
$ar = array (
'AVATAR' => $avatar,
'NAME' => $row['name'],
'UID' => $row['id'],
'ACTIVITY' => ($row['status'] == 1? $lang['active'] : $lang['inactive']),
'RANG' => $gr['name'],
'CLASS' => $class,
'PM' => ('<a href=index.php?forum-privmsg-new=0&empfid='.$row['id'].'" target="_blank"><img src="include/images/forum/opm.png" border="0"></a>'),
'EMAIL' => $row['email'],
'WWW' => $homepage,
'LLOGIN' => date('d.m.Y <b\r> H:i',$row['llogin'].' Uhr'),
'DATE' => date('d.m.Y',$row['regist'])
'FELD1' => $row->18,
'FELD2' => $row->24
);
$tpl->set_ar_out($ar,3);
}
}
$tpl->out(4);
}
if ($menu->get(1) == 'show') {
$gid = escape($menu->get(2), 'integer');
$name = @db_result (db_query("SELECT name FROM prefix_groups WHERE id =".$gid));
$bild = @db_result (db_query("SELECT img FROM prefix_groups WHERE id =".$gid));
$title = $allgAr['title'].' :: Teams :: '.$name;
$hmenu = '<a class="smalfont" href="?teams">Teams</a> » '.$name;
$design = new design ( $title , $hmenu );
$design->header();
$tpl = new tpl ('teams');
if (!empty($bild) ) {
$show = '<img src="'.$bild.'" title="'.$name.'" alt="'.$name.'" border="0"></a>';
} else {
$show = '<b>'.$name.'</b>';
}
$tpl->set_out('show', $show,0);
show_members ($gid,$tpl);
} else {
$title = $allgAr['title'].' :: Teams';
$hmenu = 'Teams';
$design = new design ( $title , $hmenu );
$design->header();
$tpl = new tpl ('teams');
$erg1 = db_query("SELECT name,img,id as gid FROM prefix_groups WHERE zeigen = 1 ORDER BY pos");
while ($row = db_fetch_assoc($erg1) ) {
if (!empty($row['img']) ) {
$row['show'] = '<a href="index.php?teams-show-'.$row['gid'].'"><img src="'.$row['img'].'" title="'.$row['name'].'" alt="'.$row['name'].'" border="0"></a>';
} else {
$row['show'] = '<a href="index.php?teams-show-'.$row['gid'].'"><b>'.$row['name'].'</b></a>';
}
$tpl->set_ar_out($row,0);
if ($allgAr['teams_show_cat'] == 0) {
show_members ($row['gid'],$tpl);
}
}
}
$design->footer(0);
?>
bekomme aber wenn die geänderte datei hochgeladen ist nur ein weißes Bild.
Ich hab keine ahnung wieso bzw wie
'FELD1' => $row->feld1,
'FELD2' => $row->feld2
die befehle abfragen sollten da diese ja nicht auf
LEFT JOIN ic1_userfields uf1 ON ic1_user.id = uf1.uid AND uf1.fid = 18
LEFT JOIN ic1_userfields uf2 ON ic1_user.id = uf2.uid AND uf2.fid = 24
zugreifen oder?