mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Add admin logging to public uploads
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
|
||||||
| $Revision: 1.6 $
|
| $Revision: 1.7 $
|
||||||
| $Date: 2008-12-06 15:48:16 $
|
| $Date: 2008-12-06 23:00:19 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -94,7 +94,6 @@ if (isset($_POST['avdelete']))
|
|||||||
if (isset($_POST['update_options']))
|
if (isset($_POST['update_options']))
|
||||||
{
|
{
|
||||||
unset($temp);
|
unset($temp);
|
||||||
$changes = array();
|
|
||||||
$temp['image_post'] = intval($_POST['image_post']);
|
$temp['image_post'] = intval($_POST['image_post']);
|
||||||
$temp['resize_method'] = $_POST['resize_method'];
|
$temp['resize_method'] = $_POST['resize_method'];
|
||||||
$temp['im_path'] = trim($tp->toDB($_POST['im_path']));
|
$temp['im_path'] = trim($tp->toDB($_POST['im_path']));
|
||||||
@@ -111,7 +110,6 @@ if (isset($_POST['update_options']))
|
|||||||
{
|
{
|
||||||
$message = IMALAN_20;
|
$message = IMALAN_20;
|
||||||
}
|
}
|
||||||
unset($changes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/upload.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/upload.php,v $
|
||||||
| $Revision: 1.7 $
|
| $Revision: 1.8 $
|
||||||
| $Date: 2008-11-29 15:27:55 $
|
| $Date: 2008-12-06 23:00:19 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -56,6 +56,7 @@ if ($action == "dis" && isset($_POST['updelete']['upload_'.$id]) )
|
|||||||
unlink(e_FILE."public/".$row['upload_ss']);
|
unlink(e_FILE."public/".$row['upload_ss']);
|
||||||
}
|
}
|
||||||
$message = ($sql->db_Delete("upload", "upload_id='".intval($id)."'")) ? UPLLAN_1 : LAN_DELETED_FAILED;
|
$message = ($sql->db_Delete("upload", "upload_id='".intval($id)."'")) ? UPLLAN_1 : LAN_DELETED_FAILED;
|
||||||
|
$admin_log->log_event('UPLOAD_01',$row['upload_file'],E_LOG_INFORMATIVE,'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "dlm")
|
if ($action == "dlm")
|
||||||
@@ -75,7 +76,8 @@ if ($action == "dl")
|
|||||||
{
|
{
|
||||||
$id = str_replace("%20", " ", $id);
|
$id = str_replace("%20", " ", $id);
|
||||||
|
|
||||||
if (preg_match("/Binary\s(.*?)\/.*/", $id, $result)) {
|
if (preg_match("/Binary\s(.*?)\/.*/", $id, $result))
|
||||||
|
{
|
||||||
$bid = $result[1];
|
$bid = $result[1];
|
||||||
$result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id='$bid' ");
|
$result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id='$bid' ");
|
||||||
$binary_data = @mysql_result($result, 0, "binary_data");
|
$binary_data = @mysql_result($result, 0, "binary_data");
|
||||||
@@ -87,7 +89,9 @@ if ($action == "dl")
|
|||||||
header("Content-Description: PHP Generated Data");
|
header("Content-Description: PHP Generated Data");
|
||||||
echo $binary_data;
|
echo $binary_data;
|
||||||
exit;
|
exit;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
header("location:".e_FILE."public/".str_replace("dl.", "", e_QUERY));
|
header("location:".e_FILE."public/".str_replace("dl.", "", e_QUERY));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -107,22 +111,30 @@ if (!is_object($e_userclass)) { $e_userclass = new user_class; }
|
|||||||
|
|
||||||
if (isset($_POST['optionsubmit']))
|
if (isset($_POST['optionsubmit']))
|
||||||
{
|
{
|
||||||
$pref['upload_storagetype'] = $_POST['upload_storagetype'];
|
$temp = array();
|
||||||
$pref['upload_maxfilesize'] = $_POST['upload_maxfilesize'];
|
$temp['upload_storagetype'] = $_POST['upload_storagetype'];
|
||||||
$pref['upload_class'] = $_POST['upload_class'];
|
$temp['upload_maxfilesize'] = $_POST['upload_maxfilesize'];
|
||||||
$pref['upload_enabled'] = (FILE_UPLOADS ? $_POST['upload_enabled'] : 0);
|
$temp['upload_class'] = $_POST['upload_class'];
|
||||||
if ($pref['upload_enabled'] && !$sql->db_Select("links", "*", "link_url='upload.php' "))
|
$temp['upload_enabled'] = (FILE_UPLOADS ? $_POST['upload_enabled'] : 0);
|
||||||
|
if ($temp['upload_enabled'] && !$sql->db_Select("links", "*", "link_url='upload.php' "))
|
||||||
{
|
{
|
||||||
$sql->db_Insert("links", "0, '".UPLLAN_44."', 'upload.php', '', '', 1,0,0,0,0");
|
$sql->db_Insert("links", "0, '".UPLLAN_44."', 'upload.php', '', '', 1,0,0,0,0");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$pref['upload_enabled'] && $sql->db_Select("links", "*", "link_url='upload.php' "))
|
if (!$temp['upload_enabled'] && $sql->db_Select("links", "*", "link_url='upload.php' "))
|
||||||
{
|
{
|
||||||
$sql->db_Delete("links", "link_url='upload.php' ");
|
$sql->db_Delete("links", "link_url='upload.php' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
save_prefs();
|
if ($admin_log->logArrayDiffs($temp, $pref, 'UPLOAD_02'))
|
||||||
$message = UPLLAN_2;
|
{
|
||||||
|
save_prefs(); // Only save if changes
|
||||||
|
$message = UPLLAN_2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = UPLLAN_4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($message))
|
if (isset($message))
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// e107 Language File.
|
// e107 Language File.
|
||||||
// $Id: lan_log_messages.php,v 1.29 2008-12-06 22:14:37 e107steved Exp $
|
// $Id: lan_log_messages.php,v 1.30 2008-12-06 23:00:25 e107steved Exp $
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The definitions in this file are for standard 'explanatory' messages which might be entered
|
The definitions in this file are for standard 'explanatory' messages which might be entered
|
||||||
@@ -285,5 +285,10 @@ define('LAN_AL_MENU_08', 'Menu - move down');
|
|||||||
define('LAN_AL_MENU_09', '');
|
define('LAN_AL_MENU_09', '');
|
||||||
define('LAN_AL_MENU_10', '');
|
define('LAN_AL_MENU_10', '');
|
||||||
|
|
||||||
|
// Public Uploads
|
||||||
|
//---------------
|
||||||
|
define('LAN_AL_UPLOAD_01','Uploaded file deleted');
|
||||||
|
define('LAN_AL_UPLOAD_02','Upload prefs changed');
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -4,15 +4,15 @@
|
|||||||
| e107 website system - Language File.
|
| e107 website system - Language File.
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_upload.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_upload.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2008-04-22 20:32:49 $
|
| $Date: 2008-12-06 23:00:25 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
define("UPLLAN_1", "Upload removed from list.");
|
define("UPLLAN_1", "Upload removed from list.");
|
||||||
define("UPLLAN_2", "Settings saved in database");
|
define("UPLLAN_2", "Settings saved in database");
|
||||||
define("UPLLAN_3", "Upload ID");
|
define("UPLLAN_3", "Upload ID");
|
||||||
|
define('UPLLAN_4', 'Nothing changed - not updated');
|
||||||
define("UPLLAN_5", "Poster");
|
define("UPLLAN_5", "Poster");
|
||||||
define("UPLLAN_6", "Email");
|
define("UPLLAN_6", "Email");
|
||||||
define("UPLLAN_7", "Website");
|
define("UPLLAN_7", "Website");
|
||||||
|
Reference in New Issue
Block a user