Revision 1726
Added by Luisehahne about 13 years ago
| upload.php | ||
|---|---|---|
| 3 | 3 |
* |
| 4 | 4 |
* @category admin |
| 5 | 5 |
* @package media |
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 6 |
* @author Ryan Djurovich,WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| 11 | 10 |
* @platform WebsiteBaker 2.8.x |
| 12 | 11 |
* @requirements PHP 5.2.2 and higher |
| 13 | 12 |
* @version $Id$ |
| 14 |
* @filesource $HeadURL: $
|
|
| 15 |
* @lastmodified $Date: $
|
|
| 13 |
* @filesource $HeadURL$ |
|
| 14 |
* @lastmodified $Date$ |
|
| 16 | 15 |
* |
| 17 | 16 |
*/ |
| 18 | 17 |
|
| ... | ... | |
| 48 | 47 |
// Check to see if target contains ../ |
| 49 | 48 |
if (!check_media_path($target, false)) |
| 50 | 49 |
{
|
| 51 |
$admin->print_error($MESSAGE['MEDIA']['TARGET_DOT_DOT_SLASH'] );
|
|
| 50 |
$admin->print_error($MESSAGE['MEDIA_TARGET_DOT_DOT_SLASH'] );
|
|
| 52 | 51 |
} |
| 53 | 52 |
|
| 54 | 53 |
// Create relative path of the target location for the file |
| ... | ... | |
| 170 | 169 |
unset($list); |
| 171 | 170 |
|
| 172 | 171 |
if($sum_files == 1) {
|
| 173 |
$admin->print_success($sum_files.' '.$MESSAGE['MEDIA']['SINGLE_UPLOADED'] );
|
|
| 172 |
$admin->print_success($sum_files.' '.$MESSAGE['MEDIA_SINGLE_UPLOADED'] );
|
|
| 174 | 173 |
} elseif($sum_files > 1) {
|
| 175 |
$admin->print_success($sum_files.' '.$MESSAGE['MEDIA']['UPLOADED'] );
|
|
| 174 |
$admin->print_success($sum_files.' '.$MESSAGE['MEDIA_UPLOADED'] );
|
|
| 176 | 175 |
} else {
|
| 177 |
$admin->print_error($MESSAGE['MEDIA_NO_FILE_UPLOADED'] ); |
|
| 176 |
|
|
| 177 |
if(file_exists($relative.$filename)) {
|
|
| 178 |
$admin->print_error($MESSAGE['MEDIA_FILE_EXISTS'] ); |
|
| 179 |
} else {
|
|
| 180 |
$admin->print_error($MESSAGE['MEDIA_NO_FILE_UPLOADED'] ); |
|
| 181 |
} |
|
| 178 | 182 |
} |
| 179 | 183 |
|
| 180 | 184 |
// Print admin |
| 181 | 185 | |
Also available in: Unified diff
! change multi-dimensional arrays (variables) to similar arrays
! change message if uploaded file exists