1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

e_FILE.'public/' replaced with e_UPLOAD

This commit is contained in:
CaMer0n
2009-11-07 02:10:52 +00:00
parent c1d99b4052
commit b2986c3960
13 changed files with 84 additions and 83 deletions

View File

@@ -9,9 +9,9 @@
* Ban List Management * Ban List Management
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/banlist.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/banlist.php,v $
* $Revision: 1.19 $ * $Revision: 1.20 $
* $Date: 2009-10-29 12:39:21 $ * $Date: 2009-11-07 02:10:34 $
* $Author: marj_nl_fr $ * $Author: e107coders $
* *
*/ */
@@ -539,7 +539,7 @@ switch($action)
if(isset($_POST['ban_import'])) if(isset($_POST['ban_import']))
{ // Got a file to import { // Got a file to import
require_once (e_HANDLER.'upload_handler.php'); require_once (e_HANDLER.'upload_handler.php');
if(($files = process_uploaded_files(e_FILE."public/", FALSE, array('overwrite' => TRUE, 'max_file_count' => 1, 'file_mask' => 'csv'))) === FALSE) if(($files = process_uploaded_files(e_UPLOAD, FALSE, array('overwrite' => TRUE, 'max_file_count' => 1, 'file_mask' => 'csv'))) === FALSE)
{ // Invalid file { // Invalid file
$error = true; $error = true;
$message = BANLAN_47; $message = BANLAN_47;
@@ -553,8 +553,8 @@ switch($action)
} }
if(!$error) if(!$error)
{ // Got a file of some sort { // Got a file of some sort
$message = process_csv(e_FILE."public/".$files[0]['name'], intval(varset($_POST['ban_over_import'], 0)), intval(varset($_POST['ban_over_expiry'], 0)), $separator_char[intval(varset($_POST['ban_separator'], 1))], $quote_char[intval(varset($_POST['ban_quote'], 3))]); $message = process_csv(e_UPLOAD.$files[0]['name'], intval(varset($_POST['ban_over_import'], 0)), intval(varset($_POST['ban_over_expiry'], 0)), $separator_char[intval(varset($_POST['ban_separator'], 1))], $quote_char[intval(varset($_POST['ban_quote'], 3))]);
banlist_adminlog("07", 'File: '.e_FILE."public/".$files[0]['name'].'<br />'.$message); banlist_adminlog("07", 'File: '.e_UPLOAD.$files[0]['name'].'<br />'.$message);
} }
} }

View File

@@ -3,7 +3,7 @@
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
| |
| <20>Steve Dunstan 2001-2002 | <20>Steve Dunstan 2001-2002
| http://e107.org | http://e107.org
| jalist@e107.org | jalist@e107.org
| |
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/download.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/download.php,v $
| $Revision: 1.18 $ | $Revision: 1.19 $
| $Date: 2009-08-28 16:10:56 $ | $Date: 2009-11-07 02:10:34 $
| $Author: marj_nl_fr $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -100,11 +100,11 @@ if($file_array = $fl->get_files(e_DOWNLOAD, "","standard",5))
} }
if($public_array = $fl->get_files(e_FILE."public/")) if($public_array = $fl->get_files(e_UPLOAD))
{ {
foreach($public_array as $key=>$val) foreach($public_array as $key=>$val)
{ {
$file_array[] = str_replace(e_FILE."public/","",$val); $file_array[] = str_replace(e_UPLOAD,"",$val);
} }
} }
@@ -900,7 +900,7 @@ class download
} }
$etext = " - (".DOWLAN_68.")"; $etext = " - (".DOWLAN_68.")";
if (file_exists(e_FILE."public/".$download_url)) if (file_exists(e_UPLOAD.$download_url))
{ {
$etext = ""; $etext = "";
} }
@@ -1258,7 +1258,7 @@ class download
{ {
if($_POST['download_thumb']) if($_POST['download_thumb'])
{ {
$oldname = e_FILE."public/".$_POST['download_thumb']; $oldname = e_UPLOAD.$_POST['download_thumb'];
$newname = e_FILE."downloadthumbs/".$_POST['download_thumb']; $newname = e_FILE."downloadthumbs/".$_POST['download_thumb'];
if(!$this -> move_file($oldname,$newname)) if(!$this -> move_file($oldname,$newname))
{ {
@@ -1267,7 +1267,7 @@ class download
} }
if($_POST['download_image']) if($_POST['download_image'])
{ {
$oldname = e_FILE."public/".$_POST['download_image']; $oldname = e_UPLOAD.$_POST['download_image'];
$newname = e_FILE."downloadimages/".$_POST['download_image']; $newname = e_FILE."downloadimages/".$_POST['download_image'];
if(!$this -> move_file($oldname,$newname)) if(!$this -> move_file($oldname,$newname))
{ {
@@ -1278,7 +1278,7 @@ class download
if($_POST['move_file'] && $_POST['download_url']) if($_POST['move_file'] && $_POST['download_url'])
{ {
$oldname = e_FILE."public/".$_POST['download_url']; $oldname = e_UPLOAD.$_POST['download_url'];
$newname = $_POST['move_file'].$_POST['download_url']; $newname = $_POST['move_file'].$_POST['download_url'];
if(!$this -> move_file($oldname,$newname)) if(!$this -> move_file($oldname,$newname))
{ {

View File

@@ -3,7 +3,7 @@
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
| |
| <20>Steve Dunstan 2001-2002 | <20>Steve Dunstan 2001-2002
| http://e107.org | http://e107.org
| jalist@e107.org | jalist@e107.org
| |
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/filemanager.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/filemanager.php,v $
| $Revision: 1.10 $ | $Revision: 1.11 $
| $Date: 2009-08-28 16:10:54 $ | $Date: 2009-11-07 02:10:34 $
| $Author: marj_nl_fr $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
require_once("../class2.php"); require_once("../class2.php");
@@ -35,7 +35,7 @@ require_once (e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance(); $emessage = &eMessage::getInstance();
//FIXME - messages //FIXME - messages
$pubfolder = (str_replace("../","",e_QUERY) == str_replace("../","",e_FILE."public/")) ? TRUE : FALSE; $pubfolder = (str_replace("../","",e_QUERY) == str_replace("../","",e_UPLOAD)) ? TRUE : FALSE;
$imagedir = e_IMAGE."filemanager/"; $imagedir = e_IMAGE."filemanager/";
@@ -45,7 +45,7 @@ $imagedir = e_IMAGE."filemanager/";
$dir_options[2] = FMLAN_40; $dir_options[2] = FMLAN_40;
$adchoice[0] = e_FILE."public/"; $adchoice[0] = e_UPLOAD;
$adchoice[1] = e_FILE; $adchoice[1] = e_FILE;
$adchoice[2] = e_IMAGE."newspost_images/"; $adchoice[2] = e_IMAGE."newspost_images/";
@@ -365,8 +365,8 @@ while ($files[$c]) {
} }
sort($movechoice); sort($movechoice);
$movechoice[] = e_FILE."downloadimages/"; $movechoice[] = e_FILE."downloadimages/";
if(e_QUERY != str_replace("../","",e_FILE."public/")){ if(e_QUERY != str_replace("../","",e_UPLOAD)){
$movechoice[] = e_FILE."public/"; $movechoice[] = e_UPLOAD;
} }
if(e_QUERY != str_replace("../","",e_FILE."downloadthumbs/")){ if(e_QUERY != str_replace("../","",e_FILE."downloadthumbs/")){
$movechoice[] = e_FILE."downloadthumbs/"; $movechoice[] = e_FILE."downloadthumbs/";

View File

@@ -9,9 +9,9 @@
* Image Administration Area * Image Administration Area
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
* $Revision: 1.24 $ * $Revision: 1.25 $
* $Date: 2009-10-29 12:39:20 $ * $Date: 2009-11-07 02:10:34 $
* $Author: marj_nl_fr $ * $Author: e107coders $
* *
*/ */
require_once("../class2.php"); require_once("../class2.php");
@@ -88,7 +88,7 @@ if (isset($_POST['submit_show_delete_multi']))
} }
//delete it from server //delete it from server
@unlink(e_FILE."public/avatars/".$todel[1]); @unlink(e_UPLOAD."avatars/".$todel[1]);
//admin log & sysmessage //admin log & sysmessage
$message[] = $todel[1]; $message[] = $todel[1];
@@ -135,10 +135,10 @@ if (isset($_POST['submit_show_delete_multi']))
*/ */
if (isset($_POST['submit_show_deleteall'])) if (isset($_POST['submit_show_deleteall']))
{ {
$handle = opendir(e_FILE."public/avatars/"); $handle = opendir(e_UPLOAD."avatars/");
$dirlist = array(); $dirlist = array();
while ($file = readdir($handle)) { while ($file = readdir($handle)) {
if (!is_dir(e_FILE."public/avatars/{$file}") && $file != '.' && $file != '..' && $file != "index.html" && $file != "null.txt" && $file != '/' && $file != 'CVS' && $file != 'Thumbs.db') { if (!is_dir(e_UPLOAD."avatars/{$file}") && $file != '.' && $file != '..' && $file != "index.html" && $file != "null.txt" && $file != '/' && $file != 'CVS' && $file != 'Thumbs.db') {
$dirlist[] = $file; $dirlist[] = $file;
} }
} }
@@ -153,7 +153,7 @@ if (isset($_POST['submit_show_deleteall']))
$image_name = basename($image_name); $image_name = basename($image_name);
$image_todb = $tp->toDB($image_name); $image_todb = $tp->toDB($image_name);
if (!$sql->db_Count('user', '(*)', "WHERE user_image='-upload-{$image_todb}' OR user_sess='{$image_todb}'")) { if (!$sql->db_Count('user', '(*)', "WHERE user_image='-upload-{$image_todb}' OR user_sess='{$image_todb}'")) {
unlink(e_FILE."public/avatars/".$image_name); unlink(e_UPLOAD."avatars/".$image_name);
$imgList .= '[!br!]'.$image_name; $imgList .= '[!br!]'.$image_name;
$count++; $count++;
} }
@@ -245,7 +245,7 @@ function show_avatars()
{ {
global $ns, $sql, $frm, $tp, $emessage, $e107, $pref; global $ns, $sql, $frm, $tp, $emessage, $e107, $pref;
$handle = opendir(e_FILE."public/avatars/"); $handle = opendir(e_UPLOAD."avatars/");
$dirlist = array(); $dirlist = array();
while ($file = readdir($handle)) while ($file = readdir($handle))
{ {
@@ -288,7 +288,7 @@ function show_avatars()
} }
//directory? //directory?
if(is_dir(e_FILE."public/avatars/".$image_name)) if(is_dir(e_UPLOADE."avatars/".$image_name))
{ {
//File info //File info
$users = "<a class='e-tooltip' href='#' title='".IMALAN_69.": {$image_name}'><img class='icon S16' src='".e_IMAGE_ABS."admin_images/info_16.png' alt='".IMALAN_66.": {$image_name}' /></a> <span class='error'>".IMALAN_69."</span>"; $users = "<a class='e-tooltip' href='#' title='".IMALAN_69.": {$image_name}'><img class='icon S16' src='".e_IMAGE_ABS."admin_images/info_16.png' alt='".IMALAN_66.": {$image_name}' /></a> <span class='error'>".IMALAN_69."</span>";
@@ -303,7 +303,7 @@ function show_avatars()
$users = "<a class='e-tooltip' href='#' title='".IMALAN_66.": {$image_name}'><img src='".e_IMAGE_ABS."admin_images/info_16.png' alt='".IMALAN_66.": {$image_name}' /></a> ".$users; $users = "<a class='e-tooltip' href='#' title='".IMALAN_66.": {$image_name}'><img src='".e_IMAGE_ABS."admin_images/info_16.png' alt='".IMALAN_66.": {$image_name}' /></a> ".$users;
// Control over the image size (design) // Control over the image size (design)
$image_size = getimagesize(e_FILE."public/avatars/".$image_name); $image_size = getimagesize(e_UPLOAD."avatars/".$image_name);
//Friendly UI - click text to select a form element //Friendly UI - click text to select a form element
$img_src = "<label for='image-action-{$count}' title='".IMALAN_56."'><img src='".e_FILE_ABS."public/avatars/{$image_name}' alt='{$image_name}' /></label>"; $img_src = "<label for='image-action-{$count}' title='".IMALAN_56."'><img src='".e_FILE_ABS."public/avatars/{$image_name}' alt='{$image_name}' /></label>";

View File

@@ -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.10 $ | $Revision: 1.11 $
| $Date: 2009-11-05 09:15:12 $ | $Date: 2009-11-07 02:10:34 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -46,9 +46,9 @@ if ($action == "dis" && isset($_POST['updelete']['upload_'.$id]) )
{ {
$sql -> db_Delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'"); $sql -> db_Delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'");
} }
else if ($row['upload_file'] && file_exists(e_FILE."public/".$row['upload_file'])) else if ($row['upload_file'] && file_exists(e_UPLOAD.$row['upload_file']))
{ {
unlink(e_FILE."public/".$row['upload_file']); unlink(e_UPLOAD.$row['upload_file']);
} }
if (preg_match("#Binary (.*?)/#", $row['upload_ss'], $match)) if (preg_match("#Binary (.*?)/#", $row['upload_ss'], $match))
{ {
@@ -56,7 +56,7 @@ if ($action == "dis" && isset($_POST['updelete']['upload_'.$id]) )
} }
else if ($row['upload_ss'] && file_exists(e_FILE."public/".$row['upload_ss'])) else if ($row['upload_ss'] && file_exists(e_FILE."public/".$row['upload_ss']))
{ {
unlink(e_FILE."public/".$row['upload_ss']); unlink(e_UPLOAD.$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,''); $admin_log->log_event('UPLOAD_01',$row['upload_file'],E_LOG_INFORMATIVE,'');
@@ -95,7 +95,7 @@ if ($action == "dl")
} }
else else
{ {
header("location:".e_FILE."public/".str_replace("dl.", "", e_QUERY)); header("location:".e_UPLOAD.str_replace("dl.", "", e_QUERY));
exit; exit;
} }
} }

View File

@@ -9,9 +9,9 @@
* User information - shortcodes * User information - shortcodes
* *
* $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/user_shortcodes.php,v $ * $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/user_shortcodes.php,v $
* $Revision: 1.17 $ * $Revision: 1.18 $
* $Date: 2009-07-25 07:54:34 $ * $Date: 2009-11-07 02:10:40 $
* $Author: marj_nl_fr $ * $Author: e107coders $
* *
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
@@ -366,9 +366,9 @@ SC_END
SC_BEGIN USER_PICTURE SC_BEGIN USER_PICTURE
global $user; global $user;
if ($user['user_sess'] && file_exists(e_FILE."public/avatars/".$user['user_sess'])) if ($user['user_sess'] && file_exists(e_UPLOAD."avatars/".$user['user_sess']))
{ {
return "<img src='".e_FILE_ABS."public/avatars/".$user['user_sess']."' alt='' />"; return "<img src='".e_UPLOAD_ABS."public/avatars/".$user['user_sess']."' alt='' />";
} }
else else
{ {

View File

@@ -9,8 +9,8 @@
* e107 Main * e107 Main
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/e107_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/e107_class.php,v $
* $Revision: 1.63 $ * $Revision: 1.64 $
* $Date: 2009-11-04 03:07:39 $ * $Date: 2009-11-07 02:10:34 $
* $Author: e107coders $ * $Author: e107coders $
*/ */
@@ -1241,6 +1241,7 @@ class e107
else else
{ {
define("e_UPLOAD", e_BASE.$UPLOADS_DIRECTORY); define("e_UPLOAD", e_BASE.$UPLOADS_DIRECTORY);
define("e_UPLOAD_ABS", e_HTTP.$UPLOADS_DIRECTORY);
} }
} }
} }

View File

@@ -9,8 +9,8 @@
* File Upload Handler * File Upload Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/upload_handler.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/upload_handler.php,v $
* $Revision: 1.22 $ * $Revision: 1.23 $
* $Date: 2009-11-05 09:15:12 $ * $Date: 2009-11-07 02:10:34 $
* $Author: e107coders $ * $Author: e107coders $
*/ */
@@ -447,7 +447,7 @@ function file_upload($uploaddir, $avatar = FALSE, $fileinfo = "", $overwrite = "
if (!$uploaddir) if (!$uploaddir)
{ {
$uploaddir = e_FILE."public/"; $uploaddir = e_UPLOAD;
} }
// Compute storage type - 1 is file, 2 is DB // Compute storage type - 1 is file, 2 is DB

View File

@@ -10,8 +10,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/adminDownload_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/adminDownload_class.php,v $
| $Revision: 1.21 $ | $Revision: 1.22 $
| $Date: 2009-09-21 21:56:09 $ | $Date: 2009-11-07 02:10:46 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -530,11 +530,11 @@ class adminDownload extends download
{ {
sort($file_array); sort($file_array);
} }
if ($public_array = $fl->get_files(e_FILE."public/")) if ($public_array = $fl->get_files(e_UPLOAD))
{ {
foreach($public_array as $key=>$val) foreach($public_array as $key=>$val)
{ {
$file_array[] = str_replace(e_FILE."public/","",$val); $file_array[] = str_replace(e_UPLOAD,"",$val);
} }
} }
/* if ($sql->db_Select("rbinary")) //TODO Remove me. /* if ($sql->db_Select("rbinary")) //TODO Remove me.
@@ -643,7 +643,7 @@ class adminDownload extends download
} }
$etext = " - (".DOWLAN_68.")"; $etext = " - (".DOWLAN_68.")";
if (file_exists(e_FILE."public/".$download_url)) if (file_exists(e_UPLOAD.$download_url))
{ {
$etext = ""; $etext = "";
} }
@@ -1011,7 +1011,7 @@ class adminDownload extends download
{ {
if ($_POST['download_thumb']) if ($_POST['download_thumb'])
{ {
$oldname = e_FILE."public/".$_POST['download_thumb']; $oldname = e_UPLOAD.$_POST['download_thumb'];
$newname = e_FILE."downloadthumbs/".$_POST['download_thumb']; $newname = e_FILE."downloadthumbs/".$_POST['download_thumb'];
if (!$this -> move_file($oldname,$newname)) if (!$this -> move_file($oldname,$newname))
{ {
@@ -1020,7 +1020,7 @@ class adminDownload extends download
} }
if ($_POST['download_image']) if ($_POST['download_image'])
{ {
$oldname = e_FILE."public/".$_POST['download_image']; $oldname = e_UPLOAD.$_POST['download_image'];
$newname = e_FILE."downloadimages/".$_POST['download_image']; $newname = e_FILE."downloadimages/".$_POST['download_image'];
if (!$this -> move_file($oldname,$newname)) if (!$this -> move_file($oldname,$newname))
{ {
@@ -1031,7 +1031,7 @@ class adminDownload extends download
if ($_POST['move_file'] && $_POST['download_url']) if ($_POST['move_file'] && $_POST['download_url'])
{ {
$oldname = e_FILE."public/".$_POST['download_url']; $oldname = e_UPLOAD.$_POST['download_url'];
$newname = $_POST['move_file'].$_POST['download_url']; $newname = $_POST['move_file'].$_POST['download_url'];
if (!$this -> move_file($oldname,$newname)) if (!$this -> move_file($oldname,$newname))
{ {

View File

@@ -3,7 +3,7 @@
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
| |
| <20>Steve Dunstan 2001-2002 | <20>Steve Dunstan 2001-2002
| http://e107.org | http://e107.org
| jalist@e107.org | jalist@e107.org
| |
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_uploads.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_uploads.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2007-01-17 20:47:35 $ | $Date: 2009-11-07 02:10:52 $
| $Author: e107steved $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
require_once("../../class2.php"); require_once("../../class2.php");
@@ -33,7 +33,7 @@ if(is_array($_POST['delete']))
$f = explode("_", $fname); $f = explode("_", $fname);
if($f[1] == USERID) if($f[1] == USERID)
{ {
$path = e_FILE."public/".$fname; $path = e_UPLOAD.$fname;
if(unlink($path) == TRUE) if(unlink($path) == TRUE)
{ {
$msg = FRMUP_2.": $path"; $msg = FRMUP_2.": $path";
@@ -55,7 +55,7 @@ if($msg)
$fi = new e_file; $fi = new e_file;
$mask = ".*_".USERID."_FT.*"; $mask = ".*_".USERID."_FT.*";
$fileList = $fi->get_files(e_FILE."public", $mask); $fileList = $fi->get_files(e_UPLOAD, $mask);
if($sql->db_Select('forum_t','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'")) if($sql->db_Select('forum_t','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'"))
{ {
$threadList = $sql->db_getList(); $threadList = $sql->db_getList();
@@ -76,7 +76,7 @@ if(is_array($fileList))
if($finfo['fname']) if($finfo['fname'])
{ {
$filecount++; $filecount++;
$txt .= "<tr><td class='forumheader3'><a href='".e_FILE."public/{$finfo['fname']}'>{$finfo['fname']}</a></td>"; $txt .= "<tr><td class='forumheader3'><a href='".e_UPLOAD.$finfo['fname']."'>{$finfo['fname']}</a></td>";
$found = FALSE; $found = FALSE;
if(is_array($threadList)) if(is_array($threadList))
{ {

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/request.php,v $ | $Source: /cvs_backup/e107_0.8/request.php,v $
| $Revision: 1.8 $ | $Revision: 1.9 $
| $Date: 2009-07-14 05:31:57 $ | $Date: 2009-11-07 02:10:34 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -114,9 +114,9 @@ if (preg_match("#.*\.[a-z,A-Z]{3,4}#", e_QUERY))
if(strstr(e_QUERY, "pub_")) if(strstr(e_QUERY, "pub_"))
{ {
$bid = str_replace("pub_", "", e_QUERY); $bid = str_replace("pub_", "", e_QUERY);
if (file_exists(e_FILE."public/".$bid)) if (file_exists(e_UPLOAD.$bid))
{ {
send_file(e_FILE."public/".$bid); send_file(e_UPLOAD.$bid);
exit(); exit();
} }
} }
@@ -221,9 +221,9 @@ if ($type == "file")
send_file($DOWNLOADS_DIRECTORY.$download_url); send_file($DOWNLOADS_DIRECTORY.$download_url);
exit(); exit();
} }
elseif(file_exists(e_FILE."public/{$download_url}")) elseif(file_exists(ee_UPLOAD.$download_url))
{ {
send_file(e_FILE."public/{$download_url}"); send_file(e_UPLOAD.$download_url);
exit(); exit();
} }
} }
@@ -311,7 +311,7 @@ else
} }
else else
{ {
$disp = "<div style='text-align:center'><img src='".e_FILE."public/{$image}' alt='' /></div>"; $disp = "<div style='text-align:center'><img src='".e_UPLOAD.$image."' alt='' /></div>";
} }
$disp .= "<br /><div style='text-align:center'><a href='javascript:history.back(1)'>".LAN_dl_64."</a></div>"; $disp .= "<br /><div style='text-align:center'><a href='javascript:history.back(1)'>".LAN_dl_64."</a></div>";
$ns->tablerender($image, $disp); $ns->tablerender($image, $disp);
@@ -319,9 +319,9 @@ else
require_once(FOOTERF); require_once(FOOTERF);
} else } else
{ {
if (is_file(e_FILE."public/{$image}")) if (is_file(e_UPLOAD.$image))
{ {
echo "<img src='".e_FILE."public/{$image}' alt='' />"; echo "<img src='".e_UPLOAD.$image."' alt='' />";
} }
elseif(is_file(e_FILE."downloadimages/{$image}")) elseif(is_file(e_FILE."downloadimages/{$image}"))
{ {

View File

@@ -9,9 +9,9 @@
* User information * User information
* *
* $Source: /cvs_backup/e107_0.8/user.php,v $ * $Source: /cvs_backup/e107_0.8/user.php,v $
* $Revision: 1.9 $ * $Revision: 1.10 $
* $Date: 2009-08-28 15:30:24 $ * $Date: 2009-11-07 02:10:34 $
* $Author: marj_nl_fr $ * $Author: e107coders $
* *
*/ */
//HCL define('PAGE_NAME', 'Members'); //HCL define('PAGE_NAME', 'Members');
@@ -37,7 +37,7 @@ if (isset($_POST['delp']))
{ {
$sql->db_Select("user", "user_sess", "user_id='". USERID."'"); $sql->db_Select("user", "user_sess", "user_id='". USERID."'");
$row = $sql->db_Fetch(); $row = $sql->db_Fetch();
@unlink(e_FILE."public/avatars/".$row['user_sess']); @unlink(e_UPLOAD."avatars/".$row['user_sess']);
$sql->db_Update("user", "user_sess='' WHERE user_id=".intval($tmp[1])); $sql->db_Update("user", "user_sess='' WHERE user_id=".intval($tmp[1]));
header("location:".e_SELF."?id.".$tmp[1]); header("location:".e_SELF."?id.".$tmp[1]);
exit; exit;

View File

@@ -9,9 +9,9 @@
* User settings modify * User settings modify
* *
* $Source: /cvs_backup/e107_0.8/usersettings.php,v $ * $Source: /cvs_backup/e107_0.8/usersettings.php,v $
* $Revision: 1.40 $ * $Revision: 1.41 $
* $Date: 2009-10-29 11:32:58 $ * $Date: 2009-11-07 02:10:34 $
* $Author: marj_nl_fr $ * $Author: e107coders $
* *
*/ */
/* /*
@@ -721,9 +721,9 @@ function delete_file($fname, $dir = 'avatars/')
{ {
return $sql -> db_Delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'"); return $sql -> db_Delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'");
} }
elseif (file_exists(e_FILE."public/".$dir.$fname)) elseif (file_exists(e_UPLOAD.$dir.$fname))
{ {
unlink(e_FILE."public/".$dir.$fname); unlink(e_UPLOAD.$dir.$fname);
return true; return true;
} }
return false; return false;