| [ PHPXref.com ] | [ Generated: Sun Jul 20 17:05:41 2008 ] | [ Coppermine 1.4.5 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /************************* 3 Coppermine Photo Gallery 4 ************************ 5 Copyright (c) 2003-2006 Coppermine Dev Team 6 v1.1 originally written by Gregory DEMAR 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2 of the License, or 11 (at your option) any later version. 12 ******************************************** 13 Coppermine version: 1.4.5 14 $Source: /cvsroot/coppermine/stable/viewlog.php,v $ 15 $Revision: 1.6 $ 16 $Author: gaugau $ 17 $Date: 2006/03/02 08:17:45 $ 18 **********************************************/ 19 20 define('IN_COPPERMINE',1); 21 define('VIEWLOG_PHP',1); 22 23 require ('include/init.inc.php'); 24 25 function display_log_list() 26 { 27 global $lang_viewlog_php; 28 29 $log_list = getloglist('logs/'); 30 if (count($log_list)>0) { 31 foreach ($log_list as $log) { 32 echo <<<EOT 33 <tr> 34 <td class="tableb"> 35 <img src="images/folder.gif" alt="" /> <a href= "{$_SERVER['PHP_SELF']}?log={$log['logname']}">{$log['logname']}</a> 36 ( <i>{$log['filesize']} KB</i> ) 37 </td> 38 </tr> 39 EOT; 40 } 41 echo <<<EOT 42 <tr> 43 <td class="tableb" align="center"> 44 <input class="button" type="button" value="{$lang_viewlog_php['delete_all']}" name="dall" id="dall" onclick="window.location='viewlog.php?action=dall';" /> 45 </td> 46 </tr> 47 EOT; 48 } else { 49 cpg_die(INFORMATION,$lang_viewlog_php['no_logs'], __FILE__,1); 50 } 51 } 52 53 function display_log($logname) 54 { 55 global $lang_viewlog_php; 56 57 echo <<<EOT 58 <tr> 59 <td class="tableb" align="center"> 60 <input class="button" type="button" value="{$lang_viewlog_php['delete_all']}" name="dall1" id="dall1" onclick="window.location='viewlog.php?action=dall';" /> 61 <input class="button" type="button" value="{$lang_viewlog_php['view_logs']}" name="back1" id="back1" onclick="window.location='viewlog.php';" /> 62 <input class="button" type="button" value="{$lang_viewlog_php['delete_this']}" name="dthis1" id="dthis1" onclick="window.location='viewlog.php?action=dthis&log=$logname';" /> 63 </td> 64 </tr> 65 <tr> 66 <td class="tableb"> 67 <pre> 68 EOT; 69 log_read($logname); 70 echo <<<EOT 71 </pre> 72 </td> 73 </tr> 74 <tr> 75 <td class="tableb" align="center"> 76 <input class="button" type="button" value="{$lang_viewlog_php['delete_all']}" name="dall2" id="dall2" onclick="window.location='viewlog.php?action=dall';" /> 77 <input class="button" type="button" value="{$lang_viewlog_php['view_logs']}" name="back2" id="back2" onclick="window.location='viewlog.php';" /> 78 <input class="button" type="button" value="{$lang_viewlog_php['delete_this']}" name="dthis2" id="dthis2" onclick="window.location='viewlog.php?action=dthis&log=$logname';" /> 79 </td> 80 </tr> 81 82 EOT; 83 } 84 85 $log = @$_GET['log']; 86 $action = @$_GET['action']; 87 88 pageheader('Logs :: '.$log); 89 90 if (!$USER_DATA['has_admin_access']) { 91 // Write access attempt to 'security' log file 92 if ($CONFIG['log_mode']) { 93 log_write('Denied privileged access to viewlog.php from user '.$USER_DATA['user_name'].' at '.$_SERVER['REMOTE_HOST'].' on '.date("F j, Y, g:i a"),CPG_SECURITY_LOG); 94 } 95 cpg_die(CRITICAL_ERROR,$lang_errors['access_denied'], __FILE__,1); 96 } 97 98 starttable("100%", "Logs :: ".$log); 99 100 101 if (isset($action)) { 102 if ($action=='dthis' && isset($log)) { 103 log_delete($log); 104 unset($log); 105 } elseif ($action=='dall') { 106 unset($log); 107 log_delete(); 108 } 109 } 110 111 if (!isset($log)) { 112 display_log_list(); 113 } else { 114 display_log($log); 115 } 116 117 118 endtable(); 119 pagefooter(); 120 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |