[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_admin/admin_log.php,v $ 14 | $Revision: 1.9 $ 15 | $Date: 2006/12/01 03:56:09 $ 16 | $Author: e107coders $ 17 +----------------------------------------------------------------------------+ 18 */ 19 require_once ("../class2.php"); 20 if (!getperms('0')) 21 { 22 header('location:'.e_BASE.'index.php'); 23 exit; 24 } 25 require_once ("auth.php"); 26 $text = ""; 27 $amount = 30; 28 $from = ($_GET['fm']) ? intval($_GET['fm']) : 0; 29 30 if(e_QUERY == 'purge') 31 { 32 $sql->db_Delete('dblog'); 33 } 34 35 $total = $sql -> db_Select("dblog", "*", "ORDER BY `dblog_datestamp` DESC", "no_where"); 36 $query = "SELECT l.*, u.user_name FROM #dblog AS l LEFT JOIN #user AS u ON l.dblog_user_id = u.user_id ORDER BY l.dblog_datestamp DESC LIMIT $from,$amount"; 37 $sql -> db_Select_gen($query); 38 39 if(!is_object($gen)) { 40 $gen = new convert; 41 } 42 $parms = $total.",".$amount.",".$from.",".e_SELF.'?fm=[FROM]'; 43 $text .= "<div style='text-align:center'><br />".$tp->parseTemplate("{NEXTPREV={$parms}}")."<br /><br /></div>"; 44 $text .= "<div id='admin_log'><table>\n"; 45 46 $text .= " 47 <tr> 48 <td class='fcaption'> </td> 49 <td class='fcaption' style='font-weight: bold;'>".LAN_ADMINLOG_1."</td> 50 <td class='fcaption' style='font-weight: bold;'>".LAN_ADMINLOG_2."</td> 51 <td class='fcaption' style='font-weight: bold;'>".LAN_ADMINLOG_3."</td> 52 <td class='fcaption' style='font-weight: bold;'>".LAN_ADMINLOG_4."</td> 53 <td class='fcaption' style='font-weight: bold;'>".LAN_ADMINLOG_5."</td> 54 </tr>\n"; 55 56 while ($row = $sql -> db_Fetch()) { 57 $datestamp = $gen->convert_date($row['dblog_datestamp'], 'short'); 58 $image = get_log_img($row['dblog_type']); 59 $text .= " <tr>\n"; 60 $text .= " <td style='width: 16px;'>{$image}</td>\n"; 61 $text .= " <td>{$datestamp}</td>\n"; 62 $text .= " <td>".$tp->toHtml($row['dblog_title'],FALSE,"defs")."</td>\n"; 63 $text .= " <td>".$tp->toHtml($row['dblog_remarks'],FALSE,"defs")."</td>\n"; 64 $text .= " <td>{$row['dblog_ip']}</td>\n"; 65 $text .= ($row['user_name']) ? " <td><a href='".e_BASE."user.php?id.{$row['dblog_user_id']}'>{$row['user_name']}</a></td>\n" : " <td>{$row['dblog_user_id']}</td>\n"; 66 $text .= " </tr>\n"; 67 } 68 69 $text .= "</table></div>\n"; 70 71 $text .= "<div style='text-align:center'><br />".$tp->parseTemplate("{NEXTPREV={$parms}}")."</div>"; 72 73 $ns->tablerender(LAN_ADMINLOG_0, $text); 74 require_once ("footer.php"); 75 76 function get_log_img($log_type) { 77 switch ($log_type) { 78 case E_LOG_INFORMATIVE: 79 return "<img src='".e_IMAGE_ABS."admin_images/docs_16.png' alt='".LAN_ADMINLOG_6."' title='".LAN_ADMINLOG_7."' />"; 80 break; 81 case E_LOG_NOTICE: 82 return "<img src='".e_IMAGE_ABS."admin_images/notice_16.png' alt='".LAN_ADMINLOG_8."' title='".LAN_ADMINLOG_9."' />"; 83 break; 84 case E_LOG_WARNING: 85 return "<img src='".e_IMAGE_ABS."admin_images/blocked.png' alt='".LAN_ADMINLOG_10."' title='".LAN_ADMINLOG_11."' style='width:16p;height:16px' />"; 86 break; 87 case E_LOG_FATAL: 88 return "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' alt='".LAN_ADMINLOG_12."' title='".LAN_ADMINLOG_13."' />"; 89 break; 90 case E_LOG_PLUGIN; 91 return "<img src='".e_IMAGE_ABS."admin_images/plugins_16.png' alt='".LAN_ADMINLOG_6."' title='".LAN_ADMINLOG_6."' />"; 92 break; 93 } 94 return $log_type; 95 } 96 97 function headerjs() { 98 ?> 99 <style type="text/css"> 100 #admin_log td { 101 border: 1px solid #000000; 102 margin: 0px; 103 padding: 2px; 104 } 105 #admin_log table { 106 width: 99%; 107 /*border-spacing: 0px; 108 border-collapse: collapse;*/ 109 } 110 </style> 111 <?php 112 } 113 114 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |