i recently changed my login script....so the tables have changed...but the latest database info i provided is up-to-date

    one more thing...wen i login it says 1 member online (good) but when i logout....it still stays at 1 members online....its not deleting the entry in the database when i logout

      You could make a new value called logged_in which is TRUE if you're logged in and false when you log out.

      Then you just check on each page if the timestamp is newer X minutes AND logged_in = true

      Then if you want to extend it you could implement so that each page checks all fields in the DB and if it finds a timestamp older then X minutes and have logged_in=true and changes it if it can find one.

        is there any way i can make it on 2 lines...like this

        1 user online
        1 member online

        instead of

        1 user online and 1 member online

        it doesnt fit...check it out....www.tab-db.com

          replace this:

          // If message is false, show the "N users and X members online" stuff
          if($message == false)
              $out = sprintf($online_display, $users_online.' user'.($users_online != 1 ? 's':'').' and '.$members_online.' member'.($members_online != 1 ? 's':'').' online.');

          with this:

          // If message is false, show the "N users and X members online" stuff
          if($message == false)
              $out = sprintf($online_display, $users_online.' user'.($users_online != 1 ? 's':'').' online<br /> '.$members_online.' member'.($members_online != 1 ? 's':'').' online.');

          Notice the "<br />" where "and" was?

            i recoment using "users" and "memebers" instead of "user" and "member" since there are only when 1 person is only that user and member fit

            EDIT: I checked your page out and found a major exploit, i could upload files without logging in but just typing "http://www.tab-db.com/content/media.php" into my browser (i guessed a pages), so make sure that each page that needs login has a check for it and does a header("Location:..."); if the user is not logged in

              onlinegamesnz wrote:

              is there any way i can make it on 2 lines...like this

              1 user online
              1 member online

              instead of

              1 user online and 1 member online

              it doesnt fit...check it out....www.tab-db.com

              Just reduce the font size using CSS.

              span.user-online {
                 color: rgb(255,255,255);
                 font-size: 10px;
                 font-weight: bold;
              }
              
                bpat1434 wrote:

                replace this:

                // If message is false, show the "N users and X members online" stuff
                if($message == false)
                    $out = sprintf($online_display, $users_online.' user'.($users_online != 1 ? 's':'').' and '.$members_online.' member'.($members_online != 1 ? 's':'').' online.');

                with this:

                // If message is false, show the "N users and X members online" stuff
                if($message == false)
                    $out = sprintf($online_display, $users_online.' user'.($users_online != 1 ? 's':'').' online<br /> '.$members_online.' member'.($members_online != 1 ? 's':'').' online.');

                Notice the "<br />" where "and" was?

                This moves the whole line down....after the text i have some text boxes....Everything has shifted down a line..not just the text.. Maybe put it in a table or something

                  Here is my code for my MEMBERS ONLY PAGE

                  What part of this code "RESTRICTS THE ACCESS TO USERS" and directs them to the LOGIN page?

                  <?
                  require_once("classes/legoFront.class.php");
                  $classOBJ = new LegoFront();
                  $classOBJ->checkSecurity(session_id());
                  
                  header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
                  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
                  $sid = session_id();
                  if ($_SESSION['ses_user_id']=="") {
                  	header("Location: index.php?PHPSESSID=$sid");
                  	exit;
                  }
                  ?>
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                  <title><?=$classOBJ->client_title?></title>
                  <link href="css/style.css" rel="stylesheet" type="text/css" />
                  <script language="javascript" src="js/prototype.js"></script>
                  <script language="javascript" src="js/ajax.js"></script>
                  
                  </head>
                  
                  <body>
                  <table id="maintable" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center" valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  		<tr>
                  			<td align="center"><div id="main_container"><? 
                  			if ($_SESSION['ses_cookies_status'] == 1) {
                  				if ($_COOKIE['ses_mode']=="editProfile") {
                  					$container = $classOBJ->editProfile($sid);
                  				} else if ($_COOKIE['ses_mode']=="changePassword") {
                  					$container = $classOBJ->changePassword($sid);
                  				} else {
                  					$container = $classOBJ->showDashBoard($sid);
                  				}
                  			} else {
                  				if ($_SESSION['ses_mode']=="editProfile") {
                  					$container = $classOBJ->editProfile($sid);
                  				} else if ($_SESSION['ses_mode']=="changePassword") {
                  					$container = $classOBJ->changePassword($sid);
                  				} else {
                  					$container = $classOBJ->showDashBoard($sid);
                  				}
                  			}
                  			?></div></td>
                  		</tr>
                  		<tr>
                  			<td><div align="center"><img src="images/trans.gif" width="2" height="20" /></div></td>
                  	    </tr>
                        </table>
                  	</td>
                    </tr>
                  </table>
                  </body>
                  </html>
                  

                  cheers

                    This moves the whole line down....after the text i have some text boxes....Everything has shifted down a line..not just the text.. Maybe put it in a table or something

                    That's a failure of design in my opinion. From looking at your HTML, you're reliant way too much on tables, and to that effect, you don't even use them to their full potential.

                    You could just as easily use <div> tags and floats and relative positioning to get what you want accomplished. Then you could define a top <div> with a width of like 100%, and inside it 3 other divs, one floated left with a width or like 40%, the other floated left with a width of 55%. The third you'd float left with a width of either 100% or 55% depending on how you wanted it to look. Then your text would be contained in a "box" and could be multiple lines while your form could be on one line and the register link would actually appear (either under all the text, or just under the login information).

                    What part of this code "RESTRICTS THE ACCESS TO USERS" and directs them to the LOGIN page?

                    I would say the 4th line:

                    $classOBJ->checkSecurity(session_id()); 

                    What is this class you're using? It could be in that checkSecurity method, it could be elsewhere.

                      Write a Reply...