??? ???????? ????? ????????? ??????, ? ??????? ????????? ????????????.
??? ????? ?????? ?????????? ?? ?????:
$result = $db->query('SELECT user_id, ident, group_id FROM '.$db->prefix.'online, '.$db->prefix.'users WHERE idle=0 && user_id = id ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
?? ? ??? ???????? ????????? ??????, ? ??????? ???????????? ?????????. ???? 1 - ?????. ???? 2 - ?????????...
???
if ($pun_user_online['user_id'] > 1)
$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
else
...
???????? ??:
if ($pun_user_online['user_id'] > 1) {
if ($pun_user_online['group_id'] == 1)
$pun_user_online['ident'] = "<B><I>".pun_htmlspecialchars($pun_user_online['ident'])."</I></B>";
elseif ($pun_user_online['group_id'] == 2)
$pun_user_online['ident'] = "<B>".pun_htmlspecialchars($pun_user_online['ident'])."</I>";
else
$pun_user_online['ident'] = pun_htmlspecialchars($pun_user_online['ident']);
$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.$pun_user_online['ident'].'</a>';
} else
...
????? - ?????? ???????, ????? - ???????? ? ?????? ???????...
????????? ??????????? ? ???? ?????????? ? ??????? ?????? ???? "color" ???????? ????????... ? ?????, ????????????? ??????...
????? ???? "g_color" ? ??????? prefix_groups... varchar[30], ?? ????????? ???????? "default"
??????:
$result = $db->query('SELECT user_id, ident, group_id, g_color FROM '.$db->prefix.'online, '.$db->prefix.'users, '.$db->prefix.'groups WHERE idle=0 && user_id = id && group_id = g_id ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
? ?????? ??????:
?????
$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
else
...
????????? ???:
if ($pun_user_online['g_color'] != "default")
$pun_user_online['ident'] = "<Font color=\"".$pun_user_online['g_color']."\">".$pun_user_online['ident']."</font>";
?? ??? ???-?? ? ???? ????...
[img]http://swelfs.jino-net.ru/wnd/punbbfan.gif[/img]