test yardim için teşkurler hemde cok ama olmadi kodları buraya ekliyom
<?php
/*
SMF Staff Page
Version 1.2
by:vbgamer45
http://www.smfhacks.com
*/
function template_main()
{
global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings;
//Filter groups
if (!empty($modSettings['staff_filter']))
{
$groupfilter = explode(',', $modSettings['staff_filter']);
$groupcount = count($groupfilter);
}
else
$groupcount = 0;
echo '<div class="tborder" >';
$groups = '';
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, minPosts, onlineColor
FROM {$db_prefix}membergroups WHERE minPosts = -1
ORDER BY groupName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
$groups[$row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
);
}
mysql_free_result($query);
foreach ($groups as $id => $data)
{
$good = 0;
//Check filters
for($i = 0;$i < $groupcount;$i++)
{
if($groupfilter[$i] == $data['name'])
{
$good = 1;
break;
}
}
//Skip to next group
if($good == 1)
continue;
//Now get all the user's
$query2 = db_query("SELECT ID_GROUP, ID_MEMBER, realName, emailAddress, hideEmail, lastLogin, dateRegistered, ICQ, AIM, YIM, MSN, hideEmail, emailAddress
FROM {$db_prefix}members WHERE ID_GROUP = " . $data['id'] . " ", __FILE__, __LINE__);
if(db_affected_rows() != 0)
{
echo '<table border="0" cellspacing="0" cellpadding="2" width="100%">';
echo '<tr>';
echo '<td class="catbg2" width="30%">' . $data['name'] . '</td>';
echo '<td class="catbg2" width="30%">' . $txt['smfstaff_lastlogin'] . '</td>';
echo '<td class="catbg2" width="30%">' . $txt['smfstaff_contact'] . '</td>';
echo '</tr>';
while ($row2 = mysql_fetch_assoc($query2))
{
echo '<tr>';
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '"><font color="' . $data['color'] . '">' . $row2['realName'] . '</font></a></td>';
echo '<td class="windowbg">' . timeformat($row2['lastLogin']) . '</td>';
//echo '<td class="windowbg">' . timeformat($row2['dateRegistered']) . '</td>';
echo '<td class="windowbg">';
// Show avatars, images, etc.? avatar koyma
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']))
if (empty($message['member']['avatar']['image']))
echo '<div style="overflow: auto; width: 100%;"><img src="' . $settings['images_url'] . '/autoavatar.jpg" alt="Avatar Yok" title="Avatar Yok" border="0" /></div><br />';
else
echo '<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'],'</div><br />';
//Send email row
if($row2['hideEmail'] == 0)
echo '<a href="mailto:', $row2['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';
if($row2['ICQ'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['ICQ'] . '" alt="' . $row2['ICQ'] . '" width="18" height="18" border="0" /></a> ';
if($row2['AIM'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['AIM'] . '" border="0" /></a> ';
if($row2['YIM'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['YIM']) . '&m=g&t=0" alt="' . $row2['YIM'] . '" border="0" /></a> ';
if($row2['MSN'] != '')
echo '<a href="http://members.msn.com/' . $row2['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['MSN'] . '" border="0" /></a> ';
//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '">' . $txt['smfstaff_sendpm'] . '</a>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
}
}
//Seperate the groups from the local mods.
echo '<br />';
//Show local mod's
$localmods = array();
//Stores the boards that member is a moderateor of
$bmods = array();
$query3 = db_query("SELECT m.ID_GROUP, m.ID_MEMBER, m.realName, m.lastLogin, m.dateRegistered, m.ICQ, m.AIM, m.YIM, m.MSN, m.hideEmail, m.emailAddress, b.name, b.ID_BOARD
FROM {$db_prefix}members AS m, {$db_prefix}moderators AS o, {$db_prefix}boards AS b WHERE o.ID_MEMBER = m.ID_MEMBER AND b.ID_BOARD = o.ID_BOARD AND $user_info[query_see_board]", __FILE__, __LINE__);
if(db_affected_rows() != 0)
{
echo '<table border="0" cellspacing="0" cellpadding="2" width="100%">';
echo '<tr>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_local'] . '</td>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_lastlogin'] . '</td>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_forums'] . '</td>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_contact'] . '</td>';
echo '</tr>';
while ($row3 = mysql_fetch_assoc($query3))
{
@$bmods[$row3['ID_MEMBER']] .= '<a href="' . $scripturl . '?board=' . $row3['ID_BOARD'] . '">' . $row3['name'] . '</a><br />';
$localmods[$row3['ID_MEMBER']] = array(
'id' => $row3['ID_MEMBER'],
'realName' => $row3['realName'],
'lastLogin' => $row3['lastLogin'],
'dateRegistered' => $row3['dateRegistered'],
'hideEmail' => $row3['hideEmail'],
'emailAddress' => $row3['emailAddress'],
'ICQ' => $row3['ICQ'],
'YIM' => $row3['YIM'],
'AIM' => $row3['AIM'],
'MSN' => $row3['MSN'],
'forums' => $bmods[$row3['ID_MEMBER']],
);
}
foreach ($localmods as $id => $data)
{
echo '<tr>';
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $data['id'] . '">' . $data['realName'] . '</a></td>';
echo '<td class="windowbg">' . timeformat($data['lastLogin']) . '</td>';
echo '<td class="windowbg">' . $data['forums'] . '</td>';
//echo '<td class="windowbg">' . timeformat($data['dateRegistered']) . '</td>';
echo '<td class="windowbg" align="center">';
//Send email row
if($data['hideEmail'] == 0)
echo '<a href="mailto:', $data['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';
if($data['ICQ'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $data['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $data['ICQ'] . '" alt="' . $data['ICQ'] . '" width="18" height="18" border="0" /></a> ';
if($data['AIM'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($data['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $data['AIM'] . '" border="0" /></a> ';
if($data['YIM'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($data['YIM']) . '&m=g&t=0" alt="' . $data['YIM'] . '" border="0" /></a> ';
if($data['MSN'] != '')
echo '<a href="http://members.msn.com/' . $data['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $data['MSN'] . '" border="0" /></a> ';
//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $data['id'] . '">' . $txt['smfstaff_sendpm'] . '</a>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
}
mysql_free_result($query3);
//Copryright keep it please. Helps support the mod making for SMF
echo '<br /><div align="center"><a href="http://www.tatliforum.net" target="blank">TatliForum</a></div>
</div>';
}
?>