<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/yoneticiler/yoneticiler.php
Version=102+ (110 - 120 - 121)
Updated=2007-jul-22
Type=Plugin
Author=Dvdbil
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=yoneticiler
Part=main
File=yoneticiler
Hooks=index.tags
Tags=index.tpl:{INDEX_YONETICILER}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]

==================== */

if ( !defined('SED_CODE') ) { die("Wrong URL."); }$yoneticiler = "<h4>Yöneticiler</h4>";


$grup1 = $cfg["plugin"]["yoneticiler"]["grup1"];
if ($grup1==0){}
else
{$sql = sed_sql_query("SELECT u.user_id, u.user_name FROM $db_users as u	LEFT JOIN $db_groups_users as g ON g.gru_userid=u.user_id WHERE g.gru_groupid='$grup1' ORDER BY user_name ASC");
$sql_grp = sed_sql_query("SELECT grp_id, grp_title FROM $db_groups WHERE grp_id='$grup1' LIMIT 1");
$grp_t = sed_sql_fetcharray($sql_grp);
$yoneticiler .= "<table class=\"cells\"><tr>";
$yoneticiler .= "<td width=\"5%\" class=\"coltop\">PM</td>";
$yoneticiler .= "<td width=\"65%\" class=\"coltop\">".$grp_t['grp_title']."</td>";
$yoneticiler .= "<td width=\"30%\" class=\"coltop\">Durum</td>";


while ($row = sed_sql_fetcharray($sql))	{
$online = (sed_userisonline($row['user_id'])) ? "1" : "0";

$yoneticiler .= "<tr><td>".sed_build_pm($row['user_id'])."</td><td style=\"padding-left:10px;\">".sed_build_user($row['user_id'], sed_cc($row['user_name']))."</td>
<td><img src=\"skins/{$skin}/img/online$online.gif\" alt=\"\" /></td></tr>";	
}
$yoneticiler .= "</table>";


}$grup2 = $cfg["plugin"]["yoneticiler"]["grup2"];if ($grup2==0){}else{$sql = sed_sql_query("SELECT u.user_id, u.user_name FROM $db_users as u	LEFT JOIN $db_groups_users as g ON g.gru_userid=u.user_id WHERE g.gru_groupid='$grup2' ORDER BY user_name ASC");
$sql_grp = sed_sql_query("SELECT grp_id, grp_title FROM $db_groups WHERE grp_id='$grup2' LIMIT 1");
$grp_t = sed_sql_fetcharray($sql_grp);	$yoneticiler .= "<table class=\"cells\"><tr>";$yoneticiler .= "<td width=\"5%\" class=\"coltop\">PM</td>";$yoneticiler .= "<td width=\"65%\" class=\"coltop\">".$grp_t['grp_title']."</td>";$yoneticiler .= "<td width=\"30%\" class=\"coltop\">Durum</td>";while ($row = sed_sql_fetcharray($sql))
{$online = (sed_userisonline($row['user_id'])) ? "1" : "0";
$yoneticiler .= "<tr><td>".sed_build_pm($row['user_id'])."</td><td style=\"padding-left:10px;\">".sed_build_user($row['user_id'], sed_cc($row['user_name']))."</td><td><img src=\"skins/{$skin}/img/online$online.gif\" alt=\"\" /></td></tr>";}$yoneticiler .= "</table>";

}$grup3 = $cfg["plugin"]["yoneticiler"]["grup3"];if ($grup3==0){}else{$sql = sed_sql_query("SELECT u.user_id, u.user_name FROM $db_users as u	LEFT JOIN $db_groups_users as g ON g.gru_userid=u.user_id WHERE g.gru_groupid='$grup3' ORDER BY user_name ASC");$sql_grp = sed_sql_query("SELECT grp_id, grp_title FROM $db_groups WHERE grp_id='$grup3' LIMIT 1");
$grp_t = sed_sql_fetcharray($sql_grp);$yoneticiler .= "<table class=\"cells\"><tr>";$yoneticiler .= "<td width=\"5%\" class=\"coltop\">PM</td>";$yoneticiler .= "<td width=\"65%\" class=\"coltop\">".$grp_t['grp_title']."</td>";$yoneticiler .= "<td width=\"30%\" class=\"coltop\">Durum</td>";while ($row = sed_sql_fetcharray($sql))
{$online = (sed_userisonline($row['user_id'])) ? "1" : "0";$yoneticiler .= "<tr><td>".sed_build_pm($row['user_id'])."</td><td style=\"padding-left:10px;\">".sed_build_user($row['user_id'], sed_cc($row['user_name']))."</td><td><img src=\"skins/{$skin}/img/online$online.gif\" alt=\"\" /></td></tr>";}$yoneticiler .= "</table>";
}

$grup4 = $cfg["plugin"]["yoneticiler"]["grup4"];if ($grup4==0){}else{	$sql = sed_sql_query("SELECT u.user_id, u.user_name FROM $db_users as u	LEFT JOIN $db_groups_users as g ON g.gru_userid=u.user_id WHERE g.gru_groupid='$grup4' ORDER BY user_name ASC");$sql_grp = sed_sql_query("SELECT grp_id, grp_title FROM $db_groups WHERE grp_id='$grup4' LIMIT 1");
$grp_t = sed_sql_fetcharray($sql_grp);$yoneticiler .= "<table class=\"cells\"><tr>";$yoneticiler .= "<td width=\"5%\" class=\"coltop\">PM</td>";$yoneticiler .= "<td width=\"65%\" class=\"coltop\">".$grp_t['grp_title']."</td>";$yoneticiler .= "<td width=\"30%\" class=\"coltop\">Durum</td>";while ($row = sed_sql_fetcharray($sql))
{$online = (sed_userisonline($row['user_id'])) ? "1" : "0";$yoneticiler .= "<tr><td>".sed_build_pm($row['user_id'])."</td><td style=\"padding-left:10px;\">".sed_build_user($row['user_id'], sed_cc($row['user_name']))."</td><td><img src=\"skins/{$skin}/img/online$online.gif\" alt=\"\" /></td></tr>";}$yoneticiler .= "</table>";
}

$grup5 = $cfg["plugin"]["yoneticiler"]["grup5"];if ($grup5==0){}else{$sql = sed_sql_query("SELECT u.user_id, u.user_name FROM $db_users as u	LEFT JOIN $db_groups_users as g ON g.gru_userid=u.user_id WHERE g.gru_groupid='$grup5' ORDER BY user_name ASC");$sql_grp = sed_sql_query("SELECT grp_id, grp_title FROM $db_groups WHERE grp_id='$grup5' LIMIT 1");
$grp_t = sed_sql_fetcharray($sql_grp);$yoneticiler .= "<table class=\"cells\"><tr>";$yoneticiler .= "<td width=\"5%\" class=\"coltop\">PM</td>";$yoneticiler .= "<td width=\"65%\" class=\"coltop\">".$grp_t['grp_title']."</td>";$yoneticiler .= "<td width=\"30%\" class=\"coltop\">Durum</td>";while ($row = sed_sql_fetcharray($sql))
{$online = (sed_userisonline($row['user_id'])) ? "1" : "0";$yoneticiler .= "<tr><td>".sed_build_pm($row['user_id'])."</td><td style=\"padding-left:10px;\">".sed_build_user($row['user_id'], sed_cc($row['user_name']))."</td><td><img src=\"skins/{$skin}/img/online$online.gif\" alt=\"\" /></td></tr>";}$yoneticiler .= "</table>";
}


$t->assign(array("INDEX_YONETICILER" => $yoneticiler,));
?>

