Czesc do wstawienia zaraz pod render_page:
global $theme_width,$settings,$locale,$db_prefix,$userdata,$aidlink;
Wspomniane panele:
<table cellpadding='2' cellspacing='0' width='$theme_width' class='bottom'>
<tr>
<td width='10%'></td>
<td width='80%'>
<table cellspacing='0' cellpadding='2' width='100%' border='0'>
<tr>
<td width='28%' align='left'>
<table width='100%'>
<tr>
<td class='bottom-header' width='100%'>";
if (iMEMBER)
{
echo "".$locale['global_035']." ".$userdata['user_name']."</td></tr><tr valign='top'><td class='bottom2'><br />";
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
}
echo THEME_BULLET." <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
if ($msg_count)
{
echo "<br /><br /><div style='text-align:center'><strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong></div>\n";
}
} else {
echo "".$locale['global_100']."</td></tr><tr valign='top'><td class='bottom2'><br />";
echo "<div style='text-align:center'>\n";
echo "<form name='loginform' method='post' action='".FUSION_SELF."'>\n";
echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='textbox' style='width:100px' /><br />\n";
echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='textbox' style='width:100px' /><br />\n";
echo "<input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' />\n";
echo "<input type='submit' name='login' value='".$locale['global_104']."' class='button' /><br />\n";
echo "</form>\n<br />\n";
if ($settings['enable_registration']) {
echo "".$locale['global_105']."<br /><br />\n";
}
echo $locale['global_106']."\n</div>\n";
}
echo " </td>
</tr>
</table>
</td>
<td width='3%'></td>
<td width='28%' align='center'>
<table width='100%'>
<tr>
<td class='bottom-header' width='100%'>";
echo "".$locale['global_010']."</td></tr><tr valign='top'><td class='bottom2'><br /><center>";
$result = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'"));
if (dbrows($result)) {
$result = dbquery("UPDATE ".DB_ONLINE." SET online_lastactive='".time()."' WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'")."");
} else {
$result = dbquery("INSERT INTO ".DB_ONLINE." (online_user, online_ip, online_lastactive) VALUES ('".($userdata['user_level'] != 0 ? $userdata['user_id'] : "0")."', '".USER_IP."', '".time()."')");
}
$result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive<".(time()-60)."");
$result = dbquery(
"SELECT ton.*, tu.user_id,user_name FROM ".DB_ONLINE." ton
LEFT JOIN ".DB_USERS." tu ON ton.online_user=tu.user_id"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
if ($data['online_user'] == "0") {
$guests++;
} else {
array_push($members, array($data['user_id'], $data['user_name']));
}
}
echo "<font size='4px'>".$locale['global_011'].$guests."</font><br />\n";
echo $locale['global_012'];
if (count($members)) {
$i = 1;
while (list($key, $member) = each($members)) {
echo "<a href='".BASEDIR."profile.php?lookup=".$member[0]."' class='side'>".$member[1]."</a>";
if ($i != count($members)) { echo ",\n"; } else { echo "<br />\n"; }
$i++;
}
}
echo "<br /><font size='4px'>\n".$locale['global_014'].number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'"))."</font><br />\n";
if (iADMIN && checkrights("M") && $settings['admin_activation'] == "1") {
echo "<a href='".ADMIN."members.php".$aidlink."&status=2' class='side'>".$locale['global_015']."</a>";
echo dbcount("(user_id)", DB_USERS, "user_status='2'")."<br />\n";
}
$data = dbarray(dbquery("SELECT user_id,user_name FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
echo $locale['global_016'].": <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a>\n";
echo "</center>";
echo" </td>
</tr>
</table>
</td>
<td width='3%'></td>
<td width='28%' align='left'>
<table width='100%'>
<tr>
<td class='bottom-header' width='100%'>";
echo "".$locale['global_020']."</td></tr><tr valign='top'><td class='bottom2'><br />";
echo "<font size='4px'>".$locale['global_021']."</font><br />\n";
$result = dbquery("
SELECT tt.forum_id, tt.thread_id, tt.thread_subject, tt.thread_lastpost FROM ".DB_THREADS." tt
INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id
WHERE ".groupaccess('forum_access')." ORDER BY thread_lastpost DESC LIMIT 5
");
if (dbrows($result)) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['thread_subject'], 23);
echo "· <a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>$itemsubject</a><br />\n";
}
} else {
echo "<div style='text-align:center'>".$locale['global_023']."</div>\n";
}
echo "<font size='4px'>".$locale['global_022']."</font>\n";
list($min_posts) = dbarraynum(dbquery("SELECT thread_postcount FROM ".DB_THREADS." ORDER BY thread_postcount DESC LIMIT 4,5"));
$result = dbquery("
SELECT tf.forum_id, tt.thread_id, tt.thread_subject, tt.thread_postcount
FROM ".DB_FORUMS." tf
INNER JOIN ".DB_THREADS." tt USING(forum_id)
WHERE ".groupaccess('forum_access')." AND tt.thread_postcount >= '$min_posts'
ORDER BY thread_postcount DESC, thread_lastpost DESC LIMIT 5
");
if (dbrows($result) != 0) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['thread_subject'], 20);
echo "<tr>\n<td class='side-small'>·<a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>$itemsubject</a></td>\n";
echo "<td align='right' class='side-small'>[".($data['thread_postcount'] - 1)."]</td>\n</tr>\n";
}
echo "</table>\n";
} else {
echo "<div style='text-align:center'>".$locale['global_023']."</div>\n";
}
echo " </td>
</tr>
</table>
</td>
<td width='10%'></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
Teraz wystarczy zgrabnie wstawic do wlasnej skorki.
Jestem jaki jestem
|