Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admindiscounts.php 876B

1234567891011121314151617181920212223242526272829
  1. <?PHP
  2. if (!defined('LIB_DATABASE')) { require_once('lib/database.php'); }
  3. if (!defined('LIB_COMMON')) { require_once('lib/common.php'); }
  4. if (!defined('ADMIN') || !ADMIN) { die('Admins only'); }
  5. ?>
  6. <div class="block" id="log">
  7. <h2>ADMIN: Control panel log</h2>
  8. <table class="innerblock">
  9. <tr>
  10. <th>Time</th>
  11. <th>User</th>
  12. <th>Message</th>
  13. </tr>
  14. <?PHP
  15. $i = 0;
  16. $sql = 'SELECT u.user_name, l.* FROM log AS l, users AS u WHERE u.user_id = l.user_id ORDER BY l.log_time DESC LIMIT 0,20';
  17. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  18. while ($row = mysql_fetch_array($res)) {
  19. echo '<tr class="'.(($i != 0) ? 'odd':'even').'"><td>'.gmdate('r',$row['log_time']).'</td><td><a href="'.CP_PATH.'checkuser/'.$row['user_id'].'">';
  20. echo $row['user_name'].'</a></td><td>'. $row['log_message'].'</td></tr>';
  21. $i = 1 - $i;
  22. }
  23. ?>
  24. </table>
  25. </div>