Aisku dabar tokie laikai, kai turinio valdymo sistemas valdome one-click principu. Ne kaip seniau kode ieskodavom klaidu, norint moda pasileist.. :D paciam reikdavo susidiegt viska i ftp..
Sveiki galtumt pataisyt panel, kad rodyt tik nick' ir kas online? T 'Prisijung nariai' ir t.t. i?imt reik, man neisgauna, tad pra?au js pagalbos. ?tai kodas ir foto vaizd?iau:
Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: online_users_panel.php
| Author: ptown67
| Website: http://pennerprofi.bplaced.net
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }
add_to_head(\"
\");
$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()-600).\"\");
openside($locale['global_010']);
$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']));
}
}
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: online_users_panel.php
| Author: ptown67
| Website: http://pennerprof...
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
openside(\"name\");
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }
add_to_head(\"
\");
$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()-600).\"\");
openside($locale['global_010']);
$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\"
);
$result = dbquery(\"SELECT * FROM \".$db_prefix.\"users ORDER BY user_lastvisit DESC LIMIT 0,20\");
echo \"
\";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: online_users_panel.php
| Author: ptown67
| Website: http://pennerprof...
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }
add_to_head(\"
\");
$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()-600).\"\");
openside($locale['global_010']);
$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\"
);
$result = dbquery(\"SELECT * FROM \".$db_prefix.\"users ORDER BY user_lastvisit DESC LIMIT 0,20\");
echo \"
\";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
if (iADMIN && checkrights(\"M\") && $settings['admin_activation'] == \"1\") {
echo THEME_BULLET.\" \".$locale['global_015'].\"\";
echo \": \".dbcount(\"(user_id)\", DB_USERS, \"user_status='2'\").\" \n\";
}
$data = dbarray(dbquery(\"SELECT user_id,user_name FROM \".DB_USERS.\" WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,20\"));
closeside();
?>
Arba tiesiog panele dk ?ita kod ir bus viskas tvarkoj bent pas mane nei?kraipo dizaino Eik pridti panele i? ten visk i?trink ir dk tik ?ita kod ir turt veikti.
Code
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }
add_to_head(\"
\");
$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()-600).\"\");
openside($locale['global_010']);
$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\"
);
$result = dbquery(\"SELECT * FROM \".$db_prefix.\"users ORDER BY user_lastvisit DESC LIMIT 0,20\");
echo \"
\";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {