Members   Search      Help    Register    Login    Home
Home » Support Forums for PMBT 2.X » General Help for 2.X » offline users(hidden users)
offline users [message #4678] Fri, 06 August 2010 13:31 Go to next message
Daffy is currently offline Daffy  France
Messages: 359
Registered: October 2009
Location: uk
Releaser

iv noticed if a user or myself hides there online status, no staff can see neither. it wuold be niece if the hidden users would show to staff only with a little symbol to show that the particular online user is appearing hidden like on some forum boards (phpbb) for eg. shows a H next to user name which states hi/her online status is hidden or not.

also i stil cannot set a specific lottery bet. only works via ticket amount and not set amount.


Re: offline users [message #4679 is a reply to message #4678] Fri, 06 August 2010 14:08 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
for lottery
open include/cleanup.php and fine
if ($arr_config["use_prize_fund"])
{
$pot = $prize_fund / $arr_config['total_winners'];
$res = $db->sql_query("SELECT user FROM ".$db_prefix."_tickets ORDER BY RAND() LIMIT $arr_config[total_winners]") ;
$who_won = array();
$msg = "Congratulations, You have won: <b>".mksize($pot)."</b>.<br /><br />This has been added to your upload amount<br /><br />Thanks for playing Lottery.";
while ($arr = $db->sql_fetchrow($res))
{
$res2 = $db->sql_query("SELECT modcomment FROM ".$db_prefix."_users WHERE id = $arr[user]") ;
$arr2 = $db->sql_fetchrow($res2);
$modcomment = $arr2['modcomment'];
$modcom = "User won the lottery: " . mksize($pot) . " at " . gmdate("Y-m-d H:i:s", time()) . "\n" . $modcomment;
$db->sql_query("UPDATE ".$db_prefix."_users SET uploaded = uploaded + $pot, modcomment = '".$modcom."' WHERE id = $arr[user]") ;
$db->sql_query("INSERT INTO ".$db_prefix."_private_messages (sender, recipient, subject, text, sent) VALUES('1', '".$arr['user']."', 'LOTTERY', '".$msg."', NOW())") ;
$who_won[] = $arr['user'];
}

make it
if ($arr_config["use_prize_fund"] == 1)
{
$pot = $prize_fund / $arr_config['total_winners'];
$res = $db->sql_query("SELECT user FROM ".$db_prefix."_tickets ORDER BY RAND() LIMIT $arr_config[total_winners]") ;
$who_won = array();
$msg = "Congratulations, You have won: <b>".mksize($prize_fund)."</b>.<br /><br />This has been added to your upload amount<br /><br />Thanks for playing Lottery.";
while ($arr = $db->sql_fetchrow($res))
{
$res2 = $db->sql_query("SELECT modcomment FROM ".$db_prefix."_users WHERE id = $arr[user]") ;
$arr2 = $db->sql_fetchrow($res2);
$modcomment = $arr2['modcomment'];
$modcom = "User won the lottery: " . mksize($pot) . " at " . gmdate("Y-m-d H:i:s", time()) . "\n" . $modcomment;
$db->sql_query("UPDATE ".$db_prefix."_users SET uploaded = uploaded + $prize_fund, modcomment = '".$modcom."' WHERE id = $arr[user]") ;
$db->sql_query("INSERT INTO ".$db_prefix."_private_messages (sender, recipient, subject, text, sent) VALUES('1', '".$arr['user']."', 'LOTTERY', '".$msg."', NOW())") ;
$who_won[] = $arr['user'];
}

now in games.php find
$pot = $total * $size;
$pott = mksize($pot);

and add after
if ($arr_config["use_prize_fund"] == 1)$pott = mksize($arr_config['prize_fund']);

now in tickets.php find
$arr_config["use_prize_fund"] = 0


and make it

$arr_config["use_prize_fund"] == 1

I well need to look at on/off line peaces


http://a.imageshack.us/img831/5562/mybikes.png
Re: offline users [message #4680 is a reply to message #4679] Fri, 06 August 2010 14:15 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
for on/off on index.php find
$sql = "SELECT O.id AS id, O.page AS page, UNIX_TIMESTAMP(O.logged_in) AS logged_in, IF(U.name IS NULL, U.username, U.name) as name, U.donator AS donator, U.warned AS warned, U.can_do as can_do, U.level AS level, U.Show_online AS Show_online, U.uploaded as uploaded, U.downloaded AS downloaded FROM ".$db_prefix."_online_users O LEFT JOIN ".$db_prefix."_users U ON O.id = U.id WHERE UNIX_TIMESTAMP(NOW()-U.lastlogin) < 1800 AND U.Show_online = true;";
and make it
$sql = "SELECT O.id AS id, O.page AS page, UNIX_TIMESTAMP(O.logged_in) AS logged_in, IF(U.name IS NULL, U.username, U.name) as name, U.lastpage as lastpage, U.donator AS donator, U.warned AS warned, U.can_do as can_do, U.level AS level, U.Show_online AS Show_online, U.uploaded as uploaded, U.downloaded AS downloaded FROM ".$db_prefix."_online_users O LEFT JOIN ".$db_prefix."_users U ON O.id = U.id WHERE UNIX_TIMESTAMP(NOW()-U.lastlogin) < 1800 ;";

now find
$user_now = $db->sql_numrows($res);
if ($user_now == 0) $simple .= _btnouseronline;
else {
        while ($row = $db->sql_fetchrow($res)) {
		//if($row[id] == $user->id)break;
		if($row["donator"] == 'true')$donator = true;
		else
		$donator = false;
                $simple .= "<a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">";
                $simple .= htmlspecialchars($row["name"])."</font></a>";
                if ($row["level"] == "premium") $simple .= pic("icon_premium.gif",'','premium');
                elseif ($row["level"] == "moderator") $simple .= pic("icon_moderator.gif",'','moderator');
                elseif ($row["level"] == "admin") $simple .= pic("icon_admin.gif",'','admin');
				if($donator) $simple .= '<img src="images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
		        if($row["warned"] == "1") $simple .= '<img src="images/warning.gif" title="warned" alt="warned" />';
                if ($i < $tot) $simple .= ", ";
                $i++;

                $advanced .= "<tr>";
                $advanced .= "<td><p><a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">";
                $advanced .= htmlspecialchars($row["name"])."</font></a>";
                if ($row["level"] == "premium") $advanced .= pic("icon_premium.gif",'','premium');
                elseif ($row["level"] == "moderator") $advanced .= pic("icon_moderator.gif",'','moderator');
                elseif ($row["level"] == "admin") $advanced .= pic("icon_admin.gif",'','admin');
				if($donator) $advanced .= '<img src="images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
		        if($row["warned"] == "1") $advanced .= '<img src="images/warning.gif" title="warned" alt="warned" />';
                $advanced .= "</p></td>";

                if ($row["uploaded"] == 0 AND $row["downloaded"] == 0) $ratio = "---";
                elseif ($row["downloaded"] == 0) $ratio = "&infin;";
                else {
                        $ratio = $row["uploaded"]/$row["downloaded"];

                        if ($ratio < 0.1) $ratio = "<font color=\"#ff0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.2) $ratio = "<font color=\"#ee0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.3) $ratio = "<font color=\"#dd0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.4) $ratio = "<font color=\"#cc0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.5) $ratio = "<font color=\"#bb0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.6) $ratio = "<font color=\"#aa0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.7) $ratio = "<font color=\"#990000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.8) $ratio = "<font color=\"#880000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.9) $ratio = "<font color=\"#770000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 1)   $ratio = "<font color=\"#660000\">" . number_format($ratio, 2) . "</font>";
                        else $ratio = "<font color=\"#00FF00\">".  number_format($ratio, 2) . "</font>";
                }
                $advanced .= "<td><p>".$ratio."</p></td>";
                $advanced .= "<td><p>";
                if (defined("_btpage_".$row["page"])) $advanced .= constant("_btpage_".$row["page"]);
				else
				$advanced .= str_replace('.php','',$row['page']);
                $advanced .= "</p></td>";
                $advanced .= "<td><p>".mkprettytime(time()-$row["logged_in"])."</p></td>";
                $advanced .= "</tr>\n";	
        }
	$simple .="<br><br><p>Legend: ".$legend."</p><div style='font-size: 8pt;' align=\"center\"><a href=\"javascript:advanced();\">"._btadvancedmode."</a></div>";
        $simple .= "";
}
$advanced .= "</tbody></table>\n";

and replace it with
$user_now = $db->sql_numrows($res);
if ($user_now == 0) $simple .= _btnouseronline;
else {
        while ($row = $db->sql_fetchrow($res)) {
		if(!$user->admin){
		if($row['Show_online'] != 'true' )continue;
		}
		//if($row['id'] == $user->id)continue;
		if($row["donator"] == 'true')$donator = true;
		else
		$donator = false;
                $simple .= "<a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">";
				if($row['Show_online'] != 'true' )$simple .= "*";
                $simple .= htmlspecialchars($row["name"])."</font></a>";
                if ($row["level"] == "premium") $simple .= pic("icon_premium.gif",'','premium');
                elseif ($row["level"] == "moderator") $simple .= pic("icon_moderator.gif",'','moderator');
                elseif ($row["level"] == "admin") $simple .= pic("icon_admin.gif",'','admin');
				if($donator) $simple .= '<img src="images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
		        if($row["warned"] == "1") $simple .= '<img src="images/warning.gif" title="warned" alt="warned" />';
                if ($i < $tot) $simple .= ", ";
                $i++;

                $advanced .= "<tr>";
                $advanced .= "<td><p><a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">";
				if($row['Show_online'] != 'true' )$advanced .= "*";
                $advanced .= htmlspecialchars($row["name"])."</font></a>";
                if ($row["level"] == "premium") $advanced .= pic("icon_premium.gif",'','premium');
                elseif ($row["level"] == "moderator") $advanced .= pic("icon_moderator.gif",'','moderator');
                elseif ($row["level"] == "admin") $advanced .= pic("icon_admin.gif",'','admin');
				if($donator) $advanced .= '<img src="images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
		        if($row["warned"] == "1") $advanced .= '<img src="images/warning.gif" title="warned" alt="warned" />';
                $advanced .= "</p></td>";

                if ($row["uploaded"] == 0 AND $row["downloaded"] == 0) $ratio = "---";
                elseif ($row["downloaded"] == 0) $ratio = "&infin;";
                else {
                        $ratio = $row["uploaded"]/$row["downloaded"];

                        if ($ratio < 0.1) $ratio = "<font color=\"#ff0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.2) $ratio = "<font color=\"#ee0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.3) $ratio = "<font color=\"#dd0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.4) $ratio = "<font color=\"#cc0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.5) $ratio = "<font color=\"#bb0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.6) $ratio = "<font color=\"#aa0000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.7) $ratio = "<font color=\"#990000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.8) $ratio = "<font color=\"#880000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 0.9) $ratio = "<font color=\"#770000\">" . number_format($ratio, 2) . "</font>";
                        elseif ($ratio < 1)   $ratio = "<font color=\"#660000\">" . number_format($ratio, 2) . "</font>";
                        else $ratio = "<font color=\"#00FF00\">".  number_format($ratio, 2) . "</font>";
                }
                $advanced .= "<td><p>".$ratio."</p></td>";
                $advanced .= "<td><p>";
				$advanced .= getlastaction($row['lastpage']);
                $advanced .= "</p></td>";
                $advanced .= "<td><p>".mkprettytime(time()-$row["logged_in"])."</p></td>";
                $advanced .= "</tr>\n";	
        }
	$simple .="<br><br><p>Legend: ".$legend." ".($user->admin? " * Hidden" : "")."</p><div style='font-size: 8pt;' align=\"center\"><a href=\"javascript:advanced();\">"._btadvancedmode."</a></div>";
        $simple .= "";
}
$advanced .= "</tbody></table>\n";
now find
echo "<br><p>Legend: ".$legend."</p><div style='font-size: 8pt;' align=\"center\"><a href=\"javascript:simple();\">"._btsimplemode."</a></div>";

and replace with
echo "<br><p>Legend: ".$legend." ".($user->admin? " * Hidden" : "")."</p><div style='font-size: 8pt;' align=\"center\"><a href=\"javascript:simple();\">"._btsimplemode."</a></div>";


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Fri, 06 August 2010 14:17]

Report message to a moderator

Re: offline users [message #4681 is a reply to message #4679] Fri, 06 August 2010 19:05 Go to previous messageGo to next message
Daffy is currently offline Daffy  France
Messages: 359
Registered: October 2009
Location: uk
Releaser

after adding this, i could not buy a ticket, said, sorry you cannot purchase a ticket. now the lotto has ended im unable to config it.. also is it possible to have a drop down selection to selct if pot is going to be in kb/mb or gb

userhidden online. show 0 registered users online today, past 24hours or past7 days lol


[Updated on: Fri, 06 August 2010 19:14]

Report message to a moderator

Re: offline users [message #4682 is a reply to message #4681] Fri, 06 August 2010 20:33 Go to previous message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
then you have a error in you cleanup.php

http://a.imageshack.us/img831/5562/mybikes.png
Previous Topic:Help on how to change top banner/logo
Next Topic:Modifying the Editor/Formatter for Private Messages
Goto Forum:
  


Current Time: Wed Feb 08 11:22:43 GMT 2012

Total time taken to generate the page: 0.00724 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software