Web Analytics Made Easy -
StatCounter PHPNUKE Block Editing? - CodingForum

Announcement

Collapse
No announcement yet.

PHPNUKE Block Editing?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHPNUKE Block Editing?

    Hey guys, i'm useing PHPNUKE and the 'USER INFO' block, what i would like to do is take away the "Online Now" part but i don't know what code to take out or leave in.. to look what i mean go here; www.visionstudios.be and the code for the block is this;

    <?php

    /************************************************************/
    /* */
    /* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
    /* website http://www.nukescripts.com */
    /* */
    /* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
    /* website http://newsportal.homip.net */
    /* */
    /* (C) 2002 */
    /* All rights beyond the GPL are reserved */
    /* */
    /* Please give a link back to my site somewhere in your own */
    /* */
    /************************************************************/

    if (eregi("block-User_Info.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    }

    $content = "";

    global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $sitekey;
    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 10);
    cookiedecode($user);
    $uname = $cookie[1];

    $lasturow = $db->sql_fetchrow($db->sql_query("SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1"));
    $lastuser = $lasturow['username'];
    $numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));

    $result = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'");
    $member_online_num = $db->sql_numrows($result);
    $who_online_now = "";
    $i = 1;
    while ($session = $db->sql_fetchrow($result)) {
    if (isset($session["guest"]) and $session["guest"] == 0) {
    if ($i < 10) {
    $who_online_now .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
    } else {
    $who_online_now .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
    }
    $who_online_now .= ($i != $member_online_num ? " " : "");
    $i++;
    }
    }
    $Today = getdate();
    //Formatting Current Date
    $month = $Today['month'];
    $mday = $Today['mday'];
    $year = $Today['year'];
    //Formatting Previous Date
    $pmonth = $Today['month'];
    $pmday = $Today['mday'];
    $pmday = $mday-1;
    $pyear = $Today['year'];
    //Month conversion into numeric mode
    if ($pmonth=="January") { $pmonth=1; } else
    if ($pmonth=="February") { $pmonth=2; } else
    if ($pmonth=="March") { $pmonth=3; } else
    if ($pmonth=="April") { $pmonth=4; } else
    if ($pmonth=="May") { $pmonth=5; } else
    if ($pmonth=="June") { $pmonth=6; } else
    if ($pmonth=="July") { $pmonth=7; } else
    if ($pmonth=="August") { $pmonth=8; } else
    if ($pmonth=="September") { $pmonth=9; } else
    if ($pmonth=="October") { $pmonth=10; } else
    if ($pmonth=="November") { $pmonth=11; } else
    if ($pmonth=="December") { $pmonth=12; };
    $test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);

    //Creating SQL parameter
    $curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
    $preday = strftime ("%d",$test);
    $premonth = strftime ("%B",$test);
    $preyear = strftime ("%Y",$test);
    $curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

    //Executing SQL Today
    $row = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
    $userCount = $row['userCount'];
    //end

    //Executing SQL Today
    $row2 = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
    $userCount2 = $row2['userCount'];
    //end

    $guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
    $member_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));

    $who_online_num = $guest_online_num + $member_online_num;
    $content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

    if (is_user($user)) {
    $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
    $row3 = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'"));
    $uid = intval($row3[user_id]);
    $newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
    $oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
    $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
    $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
    $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";
    } else {
    $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
    $content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
    $content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
    $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
    $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
    $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
    $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)<hr>";
    }
    $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
    $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
    $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
    $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
    $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n<hr>\n";
    $content .= "<img src=\"images/blocks/group-3.gif\" height=\"14\" width=\"17\"> <b><u>"._BVISIT.":</u></b>\n<br>\n";
    $content .= "<img src=\"images/blocks/ur-anony.gif\" height=\"14\" width=\"17\"> "._BVIS.": <b>$guest_online_num</b><br>\n";
    $content .= "<img src=\"images/blocks/ur-member.gif\" height=\"14\" width=\"17\"> "._BMEM.": <b>$member_online_num</b><br>\n";
    $content .= "<img src=\"images/blocks/ur-registered.gif\" height=\"14\" width=\"17\"> "._BTT.": <b>$who_online_num</b><br>\n";
    if ($member_online_num > 0) {
    $content .= "<hr>\n<img src=\"images/blocks/group-1.gif\" height=\"14\" width=\"17\"> <b><u>"._BON.":</u></b><br>$who_online_now";
    }
    $content .= "</form>";

    ?>

    thanks for any help. -cnelson.

  • #2
    Remove this part
    PHP Code:
    <hr>\n";
    $content .= "<img src=\"images/blocks/group-3.gif\" height=\"14\" width=\"17\"> <b><u>"._BVISIT.":</u></b>\n<br>\n";
    $content .= "<img src=\"images/blocks/ur-anony.gif\" height=\"14\" width=\"17\"> "._BVIS.": <b>$guest_online_num</b><br>\n";
    $content .= "<img src=\"images/blocks/ur-member.gif\" height=\"14\" width=\"17\"> "._BMEM.": <b>$member_online_num</b><br>\n";
    $content .= "<img src=\"images/blocks/ur-registered.gif\" height=\"14\" width=\"17\"> "._BTT.": <b>$who_online_num</b><br>\n";
    if (
    $member_online_num 0) {
    $content .= "<hr>\n<img src=\"images/blocks/group-1.gif\" height=\"14\" width=\"17\"> <b><u>"._BON.":</u></b><br>$who_online_now";

    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      That doesn't seem to work, it doesn't even show up on my page now, and i know from experince when this happens its because of a coding error, and it just not load the PHP, so you don't get errors all over the page, if i can't take it away, can i just make it so the users names scroll? like add a marquee somewhere? This way it will scroll all the users names?

      Comment


      • #4
        After you remove that code post what you have. You may have removed something you shouldn't have.
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment


        • #5
          My host is down at the moment as soon as its up i'll post what i have, also i'd like to eidt another block but i believe it is much easier. thanks -cnelson.

          Comment


          • #6
            Ok here it is;

            <?php

            /************************************************************/
            /* */
            /* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
            /* website http://www.nukescripts.com */
            /* */
            /* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
            /* website http://newsportal.homip.net */
            /* */
            /* (C) 2002 */
            /* All rights beyond the GPL are reserved */
            /* */
            /* Please give a link back to my site somewhere in your own */
            /* */
            /************************************************************/

            if (eregi("block-User_Info.php",$_SERVER['PHP_SELF'])) {
            Header("Location: index.php");
            }

            $content = "";

            global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $sitekey;
            mt_srand ((double)microtime()*1000000);
            $maxran = 1000000;
            492649_num = mt_rand(0, $maxran);
            $datekey = date("F j");
            $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
            $code = substr($rcode, 2, 10);
            cookiedecode($user);
            $uname = $cookie[1];

            $lasturow = $db->sql_fetchrow($db->sql_query("SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1"));
            $lastuser = $lasturow['username'];
            $numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));

            $result = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'");
            $member_online_num = $db->sql_numrows($result);
            $who_online_now = "";
            $i = 1;
            while ($session = $db->sql_fetchrow($result)) {
            if (isset($session["guest"]) and $session["guest"] == 0) {
            if ($i < 10) {
            $who_online_now .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
            } else {
            $who_online_now .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
            }
            $who_online_now .= ($i != $member_online_num ? " " : "");
            $i++;
            }
            }
            $Today = getdate();
            //Formatting Current Date
            $month = $Today['month'];
            $mday = $Today['mday'];
            $year = $Today['year'];
            //Formatting Previous Date
            $pmonth = $Today['month'];
            $pmday = $Today['mday'];
            $pmday = $mday-1;
            $pyear = $Today['year'];
            //Month conversion into numeric mode
            if ($pmonth=="January") { $pmonth=1; } else
            if ($pmonth=="February") { $pmonth=2; } else
            if ($pmonth=="March") { $pmonth=3; } else
            if ($pmonth=="April") { $pmonth=4; } else
            if ($pmonth=="May") { $pmonth=5; } else
            if ($pmonth=="June") { $pmonth=6; } else
            if ($pmonth=="July") { $pmonth=7; } else
            if ($pmonth=="August") { $pmonth=8; } else
            if ($pmonth=="September") { $pmonth=9; } else
            if ($pmonth=="October") { $pmonth=10; } else
            if ($pmonth=="November") { $pmonth=11; } else
            if ($pmonth=="December") { $pmonth=12; };
            $test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);

            //Creating SQL parameter
            $curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
            $preday = strftime ("%d",$test);
            $premonth = strftime ("%B",$test);
            $preyear = strftime ("%Y",$test);
            $curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

            //Executing SQL Today
            $row = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
            $userCount = $row['userCount'];
            //end

            //Executing SQL Today
            $row2 = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
            $userCount2 = $row2['userCount'];
            //end

            $guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
            $member_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));

            $who_online_num = $guest_online_num + $member_online_num;
            $content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

            if (is_user($user)) {
            $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
            $row3 = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'"));
            $uid = intval($row3[user_id]);
            $newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
            $oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
            $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
            $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
            $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";
            } else {
            $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
            $content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
            $content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
            $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
            $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
            $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
            $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)<hr>";
            }
            $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
            $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
            $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
            $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
            $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n
            $content .= "</form>";

            ?>

            Now as you can tell.. if you look on www.visionstudios.be the box doesn't show up on the page at all.. and the only way to fix it is to upload a backup of the block file.

            Comment


            • #7
              Okay my fault. I told you to remove the correct stuff just forgot to tell you what to add. In the 2nd to the last line at the end.
              Code:
              $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
              $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
              $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
              $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
              $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n";
              $content .= "</form>";
              so your full block should look like this
              PHP Code:
              <?php

              /************************************************************/
              /* */
              /* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
              /* website http://www.nukescripts.com */
              /* */
              /* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
              /* website http://newsportal.homip.net */
              /* */
              /* (C) 2002 */
              /* All rights beyond the GPL are reserved */
              /* */
              /* Please give a link back to my site somewhere in your own */
              /* */
              /************************************************************/

              if (eregi("block-User_Info.php",$_SERVER['PHP_SELF'])) {
              Header("Location: index.php");
              }

              $content "";

              global 
              $user$cookie$prefix$user_prefix$db$anonymous$sitekey;
              mt_srand ((double)microtime()*1000000);
              $maxran 1000000;
              492649_num mt_rand(0$maxran);
              $datekey date("F j");
              $rcode hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey $random_num $datekey));
              $code substr($rcode210);
              cookiedecode($user);
              $uname $cookie[1];

              $lasturow $db->sql_fetchrow($db->sql_query("SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1"));
              $lastuser $lasturow['username'];
              $numrows $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));

              $result $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'");
              $member_online_num $db->sql_numrows($result);
              $who_online_now "";
              $i 1;
              while (
              $session $db->sql_fetchrow($result)) {
              if (isset(
              $session["guest"]) and $session["guest"] == 0) {
              if (
              $i 10) {
              $who_online_now .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
              } else {
              $who_online_now .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
              }
              $who_online_now .= ($i != $member_online_num " " "");
              $i++;
              }
              }
              $Today getdate();
              //Formatting Current Date
              $month $Today['month'];
              $mday $Today['mday'];
              $year $Today['year'];
              //Formatting Previous Date
              $pmonth $Today['month'];
              $pmday $Today['mday'];
              $pmday $mday-1;
              $pyear $Today['year'];
              //Month conversion into numeric mode
              if ($pmonth=="January") { $pmonth=1; } else
              if (
              $pmonth=="February") { $pmonth=2; } else
              if (
              $pmonth=="March") { $pmonth=3; } else
              if (
              $pmonth=="April") { $pmonth=4; } else
              if (
              $pmonth=="May") { $pmonth=5; } else
              if (
              $pmonth=="June") { $pmonth=6; } else
              if (
              $pmonth=="July") { $pmonth=7; } else
              if (
              $pmonth=="August") { $pmonth=8; } else
              if (
              $pmonth=="September") { $pmonth=9; } else
              if (
              $pmonth=="October") { $pmonth=10; } else
              if (
              $pmonth=="November") { $pmonth=11; } else
              if (
              $pmonth=="December") { $pmonth=12; };
              $test mktime (0,0,0,$pmonth,$pmday,$pyear,1);

              //Creating SQL parameter
              $curDate2 "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
              $preday strftime ("%d",$test);
              $premonth strftime ("%B",$test);
              $preyear strftime ("%Y",$test);
              $curDateP "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

              //Executing SQL Today
              $row $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
              $userCount $row['userCount'];
              //end

              //Executing SQL Today
              $row2 $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
              $userCount2 $row2['userCount'];
              //end

              $guest_online_num $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
              $member_online_num $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));

              $who_online_num $guest_online_num $member_online_num;
              $content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

              if (
              is_user($user)) {
              $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
              $row3 $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'"));
              $uid intval($row3[user_id]);
              $newpms $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
              $oldpms $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
              $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
              $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
              $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";
              } else {
              $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
              $content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
              $content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
              $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
              $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
              $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
              $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)<hr>";
              }
              $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
              $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
              $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
              $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
              $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n";
              $content .= "</form>";

              ?>
              Last edited by _Aerospace_Eng_; Oct 1, 2006, 08:13 PM.
              ||||If you are getting paid to do a job, don't ask for help on it!||||

              Comment


              • #8
                Yeah i thought thats what i had to do, so now here is my full block, but its still not showing up..

                <?php

                /************************************************************/
                /* */
                /* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
                /* website http://www.nukescripts.com */
                /* */
                /* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
                /* website http://newsportal.homip.net */
                /* */
                /* (C) 2002 */
                /* All rights beyond the GPL are reserved */
                /* */
                /* Please give a link back to my site somewhere in your own */
                /* */
                /************************************************************/

                if (eregi("block-User_Info.php",$_SERVER['PHP_SELF'])) {
                Header("Location: index.php");
                }

                $content = "";

                global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $sitekey;
                mt_srand ((double)microtime()*1000000);
                $maxran = 1000000;
                492649_num = mt_rand(0, $maxran);
                $datekey = date("F j");
                $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . 171374_num . $datekey));
                $code = substr($rcode, 2, 10);
                cookiedecode($user);
                $uname = $cookie[1];

                $lasturow = $db->sql_fetchrow($db->sql_query("SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1"));
                $lastuser = $lasturow['username'];
                $numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));

                $result = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'");
                $member_online_num = $db->sql_numrows($result);
                $who_online_now = "";
                $i = 1;
                while ($session = $db->sql_fetchrow($result)) {
                if (isset($session["guest"]) and $session["guest"] == 0) {
                if ($i < 10) {
                $who_online_now .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
                } else {
                $who_online_now .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
                }
                $who_online_now .= ($i != $member_online_num ? " " : "");
                $i++;
                }
                }
                $Today = getdate();
                //Formatting Current Date
                $month = $Today['month'];
                $mday = $Today['mday'];
                $year = $Today['year'];
                //Formatting Previous Date
                $pmonth = $Today['month'];
                $pmday = $Today['mday'];
                $pmday = $mday-1;
                $pyear = $Today['year'];
                //Month conversion into numeric mode
                if ($pmonth=="January") { $pmonth=1; } else
                if ($pmonth=="February") { $pmonth=2; } else
                if ($pmonth=="March") { $pmonth=3; } else
                if ($pmonth=="April") { $pmonth=4; } else
                if ($pmonth=="May") { $pmonth=5; } else
                if ($pmonth=="June") { $pmonth=6; } else
                if ($pmonth=="July") { $pmonth=7; } else
                if ($pmonth=="August") { $pmonth=8; } else
                if ($pmonth=="September") { $pmonth=9; } else
                if ($pmonth=="October") { $pmonth=10; } else
                if ($pmonth=="November") { $pmonth=11; } else
                if ($pmonth=="December") { $pmonth=12; };
                $test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);

                //Creating SQL parameter
                $curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
                $preday = strftime ("%d",$test);
                $premonth = strftime ("%B",$test);
                $preyear = strftime ("%Y",$test);
                $curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

                //Executing SQL Today
                $row = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
                $userCount = $row['userCount'];
                //end

                //Executing SQL Today
                $row2 = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
                $userCount2 = $row2['userCount'];
                //end

                $guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
                $member_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));

                $who_online_num = $guest_online_num + $member_online_num;
                $content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

                if (is_user($user)) {
                $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
                $row3 = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'"));
                $uid = intval($row3[user_id]);
                $newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
                $oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
                $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
                $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
                $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";
                } else {
                $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
                $content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
                $content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
                $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
                $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
                $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
                $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)<hr>";
                }
                $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
                $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
                $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
                $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
                $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n";
                $content .= "</form>";

                ?>

                Comment


                • #9
                  Please use tags to post your php. Try this
                  PHP Code:
                  <?php

                  /************************************************************/
                  /* */
                  /* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
                  /* website http://www.nukescripts.com */
                  /* */
                  /* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
                  /* website http://newsportal.homip.net */
                  /* */
                  /* (C) 2002 */
                  /* All rights beyond the GPL are reserved */
                  /* */
                  /* Please give a link back to my site somewhere in your own */
                  /* */
                  /************************************************************/

                  if (eregi("block-User_Info.php",$_SERVER['PHP_SELF'])) {
                  Header("Location: index.php");
                  }

                  $content "";

                  global 
                  $user$cookie$prefix$user_prefix$db$anonymous$sitekey;
                  mt_srand ((double)microtime()*1000000);
                  $maxran 1000000;
                  $random_num mt_rand(0$maxran);
                  $datekey date("F j");
                  $rcode hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey $random_num $datekey));
                  $code substr($rcode210);
                  cookiedecode($user);
                  $uname $cookie[1];

                  $lasturow $db->sql_fetchrow($db->sql_query("SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1"));
                  $lastuser $lasturow['username'];
                  $numrows $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));

                  $result $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'");
                  $member_online_num $db->sql_numrows($result);
                  $who_online_now "";
                  $i 1;
                  while (
                  $session $db->sql_fetchrow($result)) {
                  if (isset(
                  $session["guest"]) and $session["guest"] == 0) {
                  if (
                  $i 10) {
                  $who_online_now .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
                  } else {
                  $who_online_now .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
                  }
                  $who_online_now .= ($i != $member_online_num " " "");
                  $i++;
                  }
                  }
                  $Today getdate();
                  //Formatting Current Date
                  $month $Today['month'];
                  $mday $Today['mday'];
                  $year $Today['year'];
                  //Formatting Previous Date
                  $pmonth $Today['month'];
                  $pmday $Today['mday'];
                  $pmday $mday-1;
                  $pyear $Today['year'];
                  //Month conversion into numeric mode
                  if ($pmonth=="January") { $pmonth=1; } else
                  if (
                  $pmonth=="February") { $pmonth=2; } else
                  if (
                  $pmonth=="March") { $pmonth=3; } else
                  if (
                  $pmonth=="April") { $pmonth=4; } else
                  if (
                  $pmonth=="May") { $pmonth=5; } else
                  if (
                  $pmonth=="June") { $pmonth=6; } else
                  if (
                  $pmonth=="July") { $pmonth=7; } else
                  if (
                  $pmonth=="August") { $pmonth=8; } else
                  if (
                  $pmonth=="September") { $pmonth=9; } else
                  if (
                  $pmonth=="October") { $pmonth=10; } else
                  if (
                  $pmonth=="November") { $pmonth=11; } else
                  if (
                  $pmonth=="December") { $pmonth=12; };
                  $test mktime (0,0,0,$pmonth,$pmday,$pyear,1);

                  //Creating SQL parameter
                  $curDate2 "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
                  $preday strftime ("%d",$test);
                  $premonth strftime ("%B",$test);
                  $preyear strftime ("%Y",$test);
                  $curDateP "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

                  //Executing SQL Today
                  $row $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
                  $userCount $row['userCount'];
                  //end

                  //Executing SQL Today
                  $row2 $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
                  $userCount2 $row2['userCount'];
                  //end

                  $guest_online_num $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
                  $member_online_num $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));

                  $who_online_num $guest_online_num $member_online_num;
                  $content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

                  if (
                  is_user($user)) {
                  $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
                  $row3 $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'"));
                  $uid intval($row3[user_id]);
                  $newpms $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
                  $oldpms $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
                  $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
                  $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
                  $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";
                  } else {
                  $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
                  $content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
                  $content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
                  $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
                  $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
                  $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
                  $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)<hr>";
                  }
                  $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
                  $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
                  $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
                  $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
                  $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n";
                  $content .= "</form>";

                  ?>
                  The above really should work. If it doesn't then remove the module meaning delete it from your control panel and reupload it.
                  ||||If you are getting paid to do a job, don't ask for help on it!||||

                  Comment


                  • #10
                    Ok, well i made a new block pasted this code exactly in it;

                    Code:
                    <?php
                    
                    /************************************************************/
                    /* */
                    /* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
                    /* website http://www.nukescripts.com */
                    /* */
                    /* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
                    /* website http://newsportal.homip.net */
                    /* */
                    /* (C) 2002 */
                    /* All rights beyond the GPL are reserved */
                    /* */
                    /* Please give a link back to my site somewhere in your own */
                    /* */
                    /************************************************************/
                    
                    if (eregi("block-User_Info.php",$_SERVER['PHP_SELF'])) {
                    Header("Location: index.php");
                    }
                    
                    $content = "";
                    
                    global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $sitekey;
                    mt_srand ((double)microtime()*1000000);
                    $maxran = 1000000;
                    906620_num = mt_rand(0, $maxran);
                    $datekey = date("F j");
                    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
                    $code = substr($rcode, 2, 10);
                    cookiedecode($user);
                    $uname = $cookie[1];
                    
                    $lasturow = $db->sql_fetchrow($db->sql_query("SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1"));
                    $lastuser = $lasturow['username'];
                    $numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));
                    
                    $result = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'");
                    $member_online_num = $db->sql_numrows($result);
                    $who_online_now = "";
                    $i = 1;
                    while ($session = $db->sql_fetchrow($result)) {
                    if (isset($session["guest"]) and $session["guest"] == 0) {
                    if ($i < 10) {
                    $who_online_now .= "0$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
                    } else {
                    $who_online_now .= "$i:&nbsp;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a><br>\n";
                    }
                    $who_online_now .= ($i != $member_online_num ? " " : "");
                    $i++;
                    }
                    }
                    $Today = getdate();
                    //Formatting Current Date
                    $month = $Today['month'];
                    $mday = $Today['mday'];
                    $year = $Today['year'];
                    //Formatting Previous Date
                    $pmonth = $Today['month'];
                    $pmday = $Today['mday'];
                    $pmday = $mday-1;
                    $pyear = $Today['year'];
                    //Month conversion into numeric mode
                    if ($pmonth=="January") { $pmonth=1; } else
                    if ($pmonth=="February") { $pmonth=2; } else
                    if ($pmonth=="March") { $pmonth=3; } else
                    if ($pmonth=="April") { $pmonth=4; } else
                    if ($pmonth=="May") { $pmonth=5; } else
                    if ($pmonth=="June") { $pmonth=6; } else
                    if ($pmonth=="July") { $pmonth=7; } else
                    if ($pmonth=="August") { $pmonth=8; } else
                    if ($pmonth=="September") { $pmonth=9; } else
                    if ($pmonth=="October") { $pmonth=10; } else
                    if ($pmonth=="November") { $pmonth=11; } else
                    if ($pmonth=="December") { $pmonth=12; };
                    $test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);
                    
                    //Creating SQL parameter
                    $curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
                    $preday = strftime ("%d",$test);
                    $premonth = strftime ("%B",$test);
                    $preyear = strftime ("%Y",$test);
                    $curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";
                    
                    //Executing SQL Today
                    $row = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
                    $userCount = $row['userCount'];
                    //end
                    
                    //Executing SQL Today
                    $row2 = $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
                    $userCount2 = $row2['userCount'];
                    //end
                    
                    $guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1'"));
                    $member_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='0'"));
                    
                    $who_online_num = $guest_online_num + $member_online_num;
                    $content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";
                    
                    if (is_user($user)) {
                    $content .= "<br><img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$uname</b>.<br>\n<hr>\n";
                    $row3 = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'"));
                    $uid = intval($row3[user_id]);
                    $newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
                    $oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
                    $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b>"._BPM."</b></a><br>\n";
                    $content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
                    $content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n<hr>\n";
                    } else {
                    $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n<hr>";
                    $content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>";
                    $content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>";
                    $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
                    $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
                    $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
                    $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>)<hr>";
                    }
                    $content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._BMEMP.":</u></b><br>\n";
                    $content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$lastuser\"><b>$lastuser</b></a><br>\n";
                    $content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": <b>$userCount</b><br>\n";
                    $content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": <b>$userCount2</b><br>\n";
                    $content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": <b>$numrows</b><br>\n";
                    $content .= "</form>";
                    
                    ?>
                    And it doesn't work.. I have no idea why. Could it be impossible to do..?
                    Last edited by cnelson; Oct 1, 2006, 09:49 PM.

                    Comment


                    • #11
                      No idea why its not working?

                      Comment


                      • #12
                        Nope no idea. Why don't you just leave it on there?
                        ||||If you are getting paid to do a job, don't ask for help on it!||||

                        Comment


                        • #13
                          Well i can but is there anyway to make the usernames scroll? this way it doesn't expand when theres a lot of people online? -cnelson.

                          Comment


                          • #14
                            Well the changes we are making now don't seem to make any effect or make it not show up at all so don't you think that adding the scrolling effect might not work either?
                            ||||If you are getting paid to do a job, don't ask for help on it!||||

                            Comment


                            • #15
                              yes your probably right. oh well. thanks for the help anyway.

                              Comment

                              Working...
                              X