CZUser Info Block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   
sabastina
CZ Active Member
sabastina has been a member for over 20 year's 20 Year Member
Occupation: College Student
Website:
Status: Offline
Joined: Nov 03, 2003
0.03 posts per day
Posts: 212
Points: 120,520
AIM Address Yahoo Messenger MSN Messenger ICQ Number
I think that this happens due to the way admins have to set up user accounts to use the email and journals and stuff.
If you go to my account it seems to become confused and log you in as a user until you go back to the admin panel...
this is just what i noticed on my site.
I had to go with a different user info block though cause it was too hard to see the admin for most of my members, I do plan to switch back as soon as they are used to the site, but this seeems to be an issue regardless of which user info block one is using.
Hope this helps.

sabastina



Back to top Reply with quote
#2   ty
LG-Nemesis
CZ Newbie
LG-Nemesis has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Nov 21, 2003
0.00 posts per day
Posts: 5
Points: 815
   
ty m8 but its a danm good block i used it coz my other messed up icon_cry.gif ty anyway icon_biggrin.gif



Back to top Reply with quote
#3   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Im available now if you have a few minutes to set it up.

Telli




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   
BlndSyd
CZ Super Newbie
BlndSyd has been a member for over 20 year's 20 Year Member
Age: 54
Status: Offline
Joined: Oct 29, 2003
0.01 posts per day
Posts: 57
Points: 2,312
   
hey telli , great site you guys have here!
I'm using this block works great with one exception. It works fine when a staff guy signs on, when i sign on it shows me there twice once with the admin gif and one without.... any suggestions?


thanks in advance



Back to top Reply with quote
#5   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Post the contents of the block here for me to see.


Telli




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   
BlndSyd
CZ Super Newbie
BlndSyd has been a member for over 20 year's 20 Year Member
Age: 54
Status: Offline
Joined: Oct 29, 2003
0.01 posts per day
Posts: 57
Points: 2,312
   
I hope you ment like this icon_redface.gif


<?php

/********************************************************/
/* CZ User Info Info Block for PHP-Nuke                 */
/* By: Telli (telli@codezwiz.com)                       */
/* http://codezwiz.com/                                 */
/* Copyright © 2000-2003 by Codezwiz                    */
/********************************************************/

if ( eregi( "block-CZUser_Info.php", $PHP_SELF ) )
{
   Header(" Location: index.php" );
   die();
}

// Some definitions
global $user, $cookie, $prefix, $dbi, $user_prefix, $username, $stop, $module_name, $redirect, $mode, $t, $f, $gfx_chk;
$content = "";

cookiedecode( $user );
$ip = getenv( "REMOTE_ADDR" );
$username = $cookie[1];
if ( !isset( $username ) )
{
   $username = "$ip";
   $guest = 1;
}


// Determine last registered user
$result = sql_query( "select username from $prefix"._users." order by user_id DESC limit 0,1", $dbi );
list( $lastuser ) = sql_fetch_row( $result, $dbi );
// Amount of registered users
$numrows = sql_num_rows( sql_query( "select user_id from $prefix"._users."", $dbi ) );
// Amount of registered users online
$result2 = sql_query( "SELECT uname, guest FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result2 );

// Assemble the online registered users
$who_online_now = "";
$i = 1;
while ( $session = sql_fetch_array( $result2, $dbi ) )
{
   if ( isset($session["guest"]) and $session["guest"] == 0 )
   {
if ($i < 10) $zi = "0$i";
    else $zi = $i;
// Get user ID's of online registered users
      $resultuser_id = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$session[uname]'", $dbi );
      list( $user_id ) = sql_fetch_row( $resultuser_id, $dbi );
   
//Filtering Administrator add more admin names if needed
   if (($session[uname] == BLNDSYD) or ($session[uname] == blndsyd))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Administrator add more admin names if needed
   if (($session[uname] == PAPSI) or ($session[uname] == papsi))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Administrator add more admin names if needed
   if (($session[uname] == PHUNKMAN) or ($session[uname] == phunkman))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Staff 1 add more admin names if needed
   elseif (($session[uname] == NEONDRUID) or ($session[uname] == neondruid)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/staff.gif\">\n";         
            }
//Filtering Staff 2
   elseif (($session[uname] == GRAYFOX81) or ($session[uname] == grayfox81)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/staff.gif\">\n";         
            }
//Filtering Staff 3
   elseif (($session[uname] == XXXXX) or ($session[uname] == xxxxx)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/staff.gif\">\n";         
            }
      else {
         $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>\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
$sql2 = "SELECT COUNT(user_id) AS userCount from nuke_users WHERE user_regdate LIKE '$curDate2'";
$result2 = sql_query( $sql2, $dbi );
list( $userCount ) = sql_fetch_row( $result2, $dbi );
// end

// Executing SQL Yesterday
$sql3 = "SELECT COUNT(user_id) AS userCount from nuke_users WHERE user_regdate LIKE '$curDateP'";
$result3 = sql_query( $sql3, $dbi );
list( $userCount2 ) = sql_fetch_row( $result3, $dbi );
// end

$result = sql_query( "SELECT uname FROM $prefix"._session." where guest=1", $dbi );
$guest_online_num = sql_num_rows( $result );

$result = sql_query( "SELECT uname FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result );

$who_online_num = $guest_online_num + $member_online_num;

// Display all information
if ( is_user( $user ) )
{
   // Determine how many READ Messages and how many UNREAD Messages
   $result = sql_query( "select user_id from $prefix"._users." where username='$username'", $dbi );
   list( $user_id ) = sql_fetch_row( $result, $dbi );
   $result2 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='1' or privmsgs_type='5')", $dbi );
   $MesUnread = sql_num_rows( $result2 );
   $result3 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='0')", $dbi );
   $MesRead = sql_num_rows( $result3 );


   // Info for users which is logged in
   $content .= "<br><img src=\"images/CZUser/group-4.gif\" height=\"14\" width=\"17\">"._CZ_WELCOME."<b> ;".$username."</b><br>\n<hr>\n";
   $content .= "\n";
   $content .= "<img src=\"images/CZUser/email-y.gif\" height=\"10\" width=\"14\"> <b><a href=\"modules.php?name=Private_Messages\">"._CZ_PRIVMSG."</b></a><br>\n";
   $content .= "<img src=\"images/CZUser/email-r.gif\" height=\"10\" width=\"14\">"._CZ_UNREAD."<b>".$MesUnread."</b><br>\n";
   $content .= "<img src=\"images/CZUser/email-g.gif\" height=\"10\" width=\"14\">"._CZ_READ."<b>".$MesRead."</b><br>\n<hr>\n";
   $content .= "<BR>\n";
}
else
{
// Info for guests (users who didn't log in)
   if (!is_user($user)) {
       mt_srand ((double)microtime()*1000000);
       $maxran = 1000000;
       $random_num = mt_rand(0, $maxran);
}
$content .= "<img src=\"images/CZUser/group-4.gif\" height=\"14\" width=\"17\"> "._CZ_GUEST." <b>$uname</b>\n<hr>";

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

$content .="<table border=\"0\"><tr><td>\n";
$content .=""._CZ_NICKNAME."</td></tr>\n";
$content .="<tr><td><input type=\"text\" name=\"username\" size=\"15\" maxlength=\"25\"><CENTER></td></tr>\n";
$content .="<tr><td>"._CZ_PASSWORD."</td></tr>\n";
$content .="<tr><td><input type=\"password\" name=\"user_password\" size=\"15\" maxlength=\"20\"></td></tr>\n";
       if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
$content .="<tr><td colspan='2'>"._CZ_SECURITYCODE." <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._CZ_SECURITYCODE."' title='"._CZ_SECURITYCODE."'></td></tr>\n";
$content .="<tr><td colspan='2'>"._CZ_TYPESECCODE." <input type=\"text\" NAME=\"gfx_check\" SIZE=\"12\" MAXLENGTH=\"10\"></td></tr>\n";
$content .="<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
       }
$content .="</table><input type=\"hidden\" name=\"redirect\" value=$redirect>\n";
$content .="<input type=\"hidden\" name=\"mode\" value=$mode>\n";
$content .="<input type=\"hidden\" name=\"f\" value=$f>\n";
$content .="<input type=\"hidden\" name=\"t\" value=$t>\n";
$content .="<input type=\"hidden\" name=\"op\" value=\"login\">\n";
$content .=" ;<input type=\"submit\" value=\""._LOGIN."\"></form>\n";
}
// Info for users who logged in AND Guests
$content .= "<img src=\"images/CZUser/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._CZ_MEM.":</u></b><br>\n";
// Hyperlink last registered user to phpBB viewing profile
$resultName = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$lastuser'", $dbi );
list( $Lastuser_id ) = sql_fetch_row( $resultName, $dbi );
$content .= "<img src=\"images/CZUser/ur-moderator.gif\" height=\"14\" width=\"17\"> "._CZ_OVERALL."<b>$numrows</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-author.gif\" height=\"14\" width=\"17\"> "._CZ_TODAY."<b>$userCount</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-admin.gif\" height=\"14\" width=\"17\"> "._CZ_YESTERDAY."<b>$userCount2</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-guest.gif\" height=\"14\" width=\"17\"> "._CZ_LATEST."<A HREF=\"forum-userprofile-.html$Lastuser_id\"><b>$lastuser</b></a><br>\n<hr>\n";
$content .= "<img src=\"images/CZUser/group-3.gif\" height=\"14\" width=\"17\"><u><b>"._CZ_ON."</b></u><br>\n";
$content .= "<img src=\"images/CZUser/ur-anony.gif\" height=\"14\" width=\"17\">"._CZ_TOTAL."<b>$who_online_num</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-member.gif\" height=\"14\" width=\"17\">"._CZ_VISITORS2."<b>$guest_online_num</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-registered.gif\" height=\"14\" width=\"17\">"._CZ_VMEMBERS."<b>$member_online_num</b><br>\n";
$vtotal = $guest_online_num+$member_online_num;


if ( is_user( $user ) )
{
   
   $content .= "<hr>\n<img src=\"images/CZUser/group-1.gif\" height=\"14\" width=\"17\"><b><u>"._CZ_ONLINE."</b></u>$who_online $who_online_now";
}
else
{
   $content .= "<hr>\n<img src=\"images/CZUser/group-1.gif\" height=\"14\" width=\"17\"><b><u>"._CZ_ONLINE."</u></b>$who_online $who_online_now";
   $content .= "<CENTER><br><br><a href=\"modules.php?name=Your_Account&op=new_user\">"._CZ_UMBREG."</a><BR>\n";
   $content .= "<a href=\"modules.php?name=Your_Account&amp;op=pass_lost\">"._CZ_UMBLOST."</a><BR>\n";

}

?>



Back to top Reply with quote
#7   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Here ya go save this over the old one.

<?php

/********************************************************/
/* CZ User Info Info Block for PHP-Nuke                 */
/* By: Telli (telli@codezwiz.com)                       */
/* http://codezwiz.com/                                 */
/* Copyright © 2000-2003 by Codezwiz                    */
/********************************************************/

if ( eregi( "block-CZUser_Info.php", $PHP_SELF ) )
{
   Header(" Location: index.php" );
   die();
}

// Some definitions
global $user, $cookie, $prefix, $dbi, $user_prefix, $username, $stop, $module_name, $redirect, $mode, $t, $f, $gfx_chk;
$content = "";

cookiedecode( $user );
$ip = getenv( "REMOTE_ADDR" );
$username = $cookie[1];
if ( !isset( $username ) )
{
   $username = "$ip";
   $guest = 1;
}


// Determine last registered user
$result = sql_query( "select username from $prefix"._users." order by user_id DESC limit 0,1", $dbi );
list( $lastuser ) = sql_fetch_row( $result, $dbi );
// Amount of registered users
$numrows = sql_num_rows( sql_query( "select user_id from $prefix"._users."", $dbi ) );
// Amount of registered users online
$result2 = sql_query( "SELECT uname, guest FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result2 );

// Assemble the online registered users
$who_online_now = "";
$i = 1;
while ( $session = sql_fetch_array( $result2, $dbi ) )
{
   if ( isset($session["guest"]) and $session["guest"] == 0 )
   {
if ($i < 10) $zi = "0$i";
    else $zi = $i;
// Get user ID's of online registered users
      $resultuser_id = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$session[uname]'", $dbi );
      list( $user_id ) = sql_fetch_row( $resultuser_id, $dbi );
   
//Filtering Administrator add more admin names if needed
   if (($session[uname] == BLNDSYD) or ($session[uname] == blndsyd))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Administrator add more admin names if needed
   elseif (($session[uname] == PAPSI) or ($session[uname] == papsi))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Administrator add more admin names if needed
   elseif (($session[uname] == PHUNKMAN) or ($session[uname] == phunkman))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Staff 1 add more admin names if needed
   elseif (($session[uname] == NEONDRUID) or ($session[uname] == neondruid)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/staff.gif\">\n";         
            }
//Filtering Staff 2
   elseif (($session[uname] == GRAYFOX81) or ($session[uname] == grayfox81)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/staff.gif\">\n";         
            }
//Filtering Staff 3
   elseif (($session[uname] == XXXXX) or ($session[uname] == xxxxx)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a> ;<img src=\"images/CZUser/staff.gif\">\n";         
            }
      else {
         $who_online_now .= "<br>$zi.<a href=\"messages-post-.html$user_id\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a> ;<A HREF=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\">$session[uname]</a>\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
$sql2 = "SELECT COUNT(user_id) AS userCount from nuke_users WHERE user_regdate LIKE '$curDate2'";
$result2 = sql_query( $sql2, $dbi );
list( $userCount ) = sql_fetch_row( $result2, $dbi );
// end

// Executing SQL Yesterday
$sql3 = "SELECT COUNT(user_id) AS userCount from nuke_users WHERE user_regdate LIKE '$curDateP'";
$result3 = sql_query( $sql3, $dbi );
list( $userCount2 ) = sql_fetch_row( $result3, $dbi );
// end

$result = sql_query( "SELECT uname FROM $prefix"._session." where guest=1", $dbi );
$guest_online_num = sql_num_rows( $result );

$result = sql_query( "SELECT uname FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result );

$who_online_num = $guest_online_num + $member_online_num;

// Display all information
if ( is_user( $user ) )
{
   // Determine how many READ Messages and how many UNREAD Messages
   $result = sql_query( "select user_id from $prefix"._users." where username='$username'", $dbi );
   list( $user_id ) = sql_fetch_row( $result, $dbi );
   $result2 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='1' or privmsgs_type='5')", $dbi );
   $MesUnread = sql_num_rows( $result2 );
   $result3 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='0')", $dbi );
   $MesRead = sql_num_rows( $result3 );


   // Info for users which is logged in
   $content .= "<br><img src=\"images/CZUser/group-4.gif\" height=\"14\" width=\"17\">"._CZ_WELCOME."<b> ;".$username."</b><br>\n<hr>\n";
   $content .= "\n";
   $content .= "<img src=\"images/CZUser/email-y.gif\" height=\"10\" width=\"14\"> <b><a href=\"modules.php?name=Private_Messages\">"._CZ_PRIVMSG."</b></a><br>\n";
   $content .= "<img src=\"images/CZUser/email-r.gif\" height=\"10\" width=\"14\">"._CZ_UNREAD."<b>".$MesUnread."</b><br>\n";
   $content .= "<img src=\"images/CZUser/email-g.gif\" height=\"10\" width=\"14\">"._CZ_READ."<b>".$MesRead."</b><br>\n<hr>\n";
   $content .= "<BR>\n";
}
else
{
// Info for guests (users who didn't log in)
   if (!is_user($user)) {
       mt_srand ((double)microtime()*1000000);
       $maxran = 1000000;
       $random_num = mt_rand(0, $maxran);
}
$content .= "<img src=\"images/CZUser/group-4.gif\" height=\"14\" width=\"17\"> "._CZ_GUEST." <b>$uname</b>\n<hr>";

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

$content .="<table border=\"0\"><tr><td>\n";
$content .=""._CZ_NICKNAME."</td></tr>\n";
$content .="<tr><td><input type=\"text\" name=\"username\" size=\"15\" maxlength=\"25\"><CENTER></td></tr>\n";
$content .="<tr><td>"._CZ_PASSWORD."</td></tr>\n";
$content .="<tr><td><input type=\"password\" name=\"user_password\" size=\"15\" maxlength=\"20\"></td></tr>\n";
       if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
$content .="<tr><td colspan='2'>"._CZ_SECURITYCODE." <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._CZ_SECURITYCODE."' title='"._CZ_SECURITYCODE."'></td></tr>\n";
$content .="<tr><td colspan='2'>"._CZ_TYPESECCODE." <input type=\"text\" NAME=\"gfx_check\" SIZE=\"12\" MAXLENGTH=\"10\"></td></tr>\n";
$content .="<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
       }
$content .="</table><input type=\"hidden\" name=\"redirect\" value=$redirect>\n";
$content .="<input type=\"hidden\" name=\"mode\" value=$mode>\n";
$content .="<input type=\"hidden\" name=\"f\" value=$f>\n";
$content .="<input type=\"hidden\" name=\"t\" value=$t>\n";
$content .="<input type=\"hidden\" name=\"op\" value=\"login\">\n";
$content .=" ;<input type=\"submit\" value=\""._LOGIN."\"></form>\n";
}
// Info for users who logged in AND Guests
$content .= "<img src=\"images/CZUser/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._CZ_MEM.":</u></b><br>\n";
// Hyperlink last registered user to phpBB viewing profile
$resultName = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$lastuser'", $dbi );
list( $Lastuser_id ) = sql_fetch_row( $resultName, $dbi );
$content .= "<img src=\"images/CZUser/ur-moderator.gif\" height=\"14\" width=\"17\"> "._CZ_OVERALL."<b>$numrows</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-author.gif\" height=\"14\" width=\"17\"> "._CZ_TODAY."<b>$userCount</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-admin.gif\" height=\"14\" width=\"17\"> "._CZ_YESTERDAY."<b>$userCount2</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-guest.gif\" height=\"14\" width=\"17\"> "._CZ_LATEST."<A HREF=\"forum-userprofile-.html$Lastuser_id\"><b>$lastuser</b></a><br>\n<hr>\n";
$content .= "<img src=\"images/CZUser/group-3.gif\" height=\"14\" width=\"17\"><u><b>"._CZ_ON."</b></u><br>\n";
$content .= "<img src=\"images/CZUser/ur-anony.gif\" height=\"14\" width=\"17\">"._CZ_TOTAL."<b>$who_online_num</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-member.gif\" height=\"14\" width=\"17\">"._CZ_VISITORS2."<b>$guest_online_num</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-registered.gif\" height=\"14\" width=\"17\">"._CZ_VMEMBERS."<b>$member_online_num</b><br>\n";
$vtotal = $guest_online_num+$member_online_num;


if ( is_user( $user ) )
{
   
   $content .= "<hr>\n<img src=\"images/CZUser/group-1.gif\" height=\"14\" width=\"17\"><b><u>"._CZ_ONLINE."</b></u>$who_online $who_online_now";
}
else
{
   $content .= "<hr>\n<img src=\"images/CZUser/group-1.gif\" height=\"14\" width=\"17\"><b><u>"._CZ_ONLINE."</u></b>$who_online $who_online_now";
   $content .= "<CENTER><br><br><a href=\"modules.php?name=Your_Account&op=new_user\">"._CZ_UMBREG."</a><BR>\n";
   $content .= "<a href=\"modules.php?name=Your_Account&amp;op=pass_lost\">"._CZ_UMBLOST."</a><BR>\n";

}

?>


Telli



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   
BlndSyd
CZ Super Newbie
BlndSyd has been a member for over 20 year's 20 Year Member
Age: 54
Status: Offline
Joined: Oct 29, 2003
0.01 posts per day
Posts: 57
Points: 2,312
   
thanks wow that was quick


and if you dont mind me askin how did you put the scroll into the post?


<<<<noob



Back to top Reply with quote
#9   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
If your referring to the marquee above the textarea when you post that is a mod i got from [ Register or login to view links on this board. ] called the bb code box.

Telli




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#10   
BlndSyd
CZ Super Newbie
BlndSyd has been a member for over 20 year's 20 Year Member
Age: 54
Status: Offline
Joined: Oct 29, 2003
0.01 posts per day
Posts: 57
Points: 2,312
   
ya thats it thanks..

hey can you tell me what you changed that didnt quite work for me...
i'm sure its something I did



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum