<?
      $logentries = array();
      if (isset($from))
      {
          $_SESSION['from'] = $from;
      }
      $from = isset($_SESSION['from'])?$_SESSION['from']:false;
      if (!$from) { $from = 0;}
      $admin = new admin($adminlogin);

      $query = "SELECT * FROM userlogs 
      WHERE userId = '" . $admin->userId .  "' 
      AND type = 'admin' 
      order by timestamp DESC
      LIMIT 0, 100000";
      $result = dbQuery($query) or
          error("Kann User " . $admin->login . " nicht aus dem Log holen: " .
          dbError());

      while ($row = dbFetchRow($result))
      {
          $logentry = new logentry();

          $logentry->userId = $admin->userId;
          $logentry->aktion = $row['aktion'];
          $logentry->date = date('d.m.Y H:i', $row['timestamp']);
          $logentry->object = $row['object'];
          array_push($logentries, $logentry);
      }
      $to = $from + $maxLinesPerTable;
      if (count($logentries) < $to) { $to = count($logentries); }
      include("views/$module/log.php");
?>
