Location: PHPKode > projects > Cricetus log file search > cricetus-1.0/right.php
<?php
// cricetus, 2005/10/21, hide@address.com

  require_once('base.php');
  
  $time_start = get_microtime();

  set_title('welcome');
  require('web_header.php');
  
  if(create_results(get_username())!=TRUE)
  {
    // no action, just to make sure the results table exists
  }

  echo '<center><h1>Welcome, ' . get_username() . '!</h1>';
  echo '<h2>This is cricetus v' . CRICETUS_VERSION . ', running on ' . $_SERVER['SERVER_NAME'] . '.</h2>';
  
  $ar = db_fill_array(sprintf("SELECT date FROM auth_logins WHERE username='%s' ORDER BY date DESC LIMIT 2",
    get_username()),0);
  if(count($ar)<2)
  {
    $date = 'not available';
  }
  else
  {
    $date = date("r",$ar[1]);
  }
  echo '<h3>Last login: ' . $date . '</h3>';
  
  echo '<noscript>';
  display_message(4,'Javascript is disabled!','Javascript is disabled. ' .
    'Please enable Javascript, otherwise you are not able to use this application.','','');
  echo '<font size="-1"><i>';
  echo '(Click the logo in the upper left or <a href="index.php" target="_top"><b>here</b></a>' .
    ' to reload this page after you have activated Javascript.)';
  echo '</i></font>';
  echo '</noscript>';

  switch(check_options())
  {
    case 0:
      break;
      
    case 1:
      if(get_admin()!=1)
      {
        display_message(1,'Errors in system options!','The other system options are not set ' .
          'correctly. Please ask the administrator of this system to fix that.','Go back','history.back()');
      }
      else
      {
        display_message(1,'Errors in system options!','The other system options are not set ' .
          'correctly. Please set them correctly before continuing.','Set other system options',
          'load_href(\'options_other.php\')');
      }
      break;
      
    case 2:
      if(get_admin()!=1)
      {
        display_message(1,'Errors in system options!','The logging system options are not set ' .
          'correctly. Please ask the administrator of this system to fix that.','Go back','history.back()');
      }
      else
      {
        display_message(1,'Errors in system options!','The logging system options are not set ' .
          'correctly. Please set them correctly before continuing.','Set logging system options',
          'load_href(\'options_logging.php\')');
      }
      break;
      
    default:
      if(get_admin()!=1)
      {
        display_message(1,'Internal error #001','Please ask the administrator of this system ' .
          'to report this error to the developer.','Go back','history.back()');
      }
      else
      {
        display_message(1,'Internal error #001','Please report this error to the developer.',
          'Go back','history.back()');
      }
      break;
  }
  
  make_footer($time_start);
?>

</body>
</html>
Return current item: Cricetus log file search