1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: /**
13: * XOOPS file uploader
14: *
15: * @copyright XOOPS Project (http://xoops.org)
16: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17: * @package class
18: * @since 2.0.0
19: * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/)
20: * @author Taiwen Jiang <phppp@users.sourceforge.net>
21: * @version $Id$
22: */
23:
24: /**
25: * !
26: * Example
27: *
28: * include_once 'uploader.php';
29: * $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
30: * $maxfilesize = 50000;
31: * $maxfilewidth = 120;
32: * $maxfileheight = 120;
33: * $uploader = new XoopsMediaUploader(
34: * '/home/xoops/uploads',
35: * $allowed_mimetypes,
36: * $maxfilesize,
37: * $maxfilewidth,
38: * $maxfileheight
39: * );
40: * if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
41: * if (!$uploader->upload()) {
42: * echo $uploader->getErrors();
43: * } else {
44: * echo '<h4>File uploaded successfully!</h4>'
45: * echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
46: * echo 'Full path: ' . $uploader->getSavedDestination();
47: * }
48: * } else {
49: * echo $uploader->getErrors();
50: * }
51: */
52:
53: /**
54: * XOOPS file uploader
55: *
56: * @category Xoops\Core\XoopsMediaUploader
57: * @package XoopsMediaUploader
58: * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/)
59: * @author Taiwen Jiang <phppp@users.sourceforge.net>
60: * @copyright 2003-2014 XOOPS Project (http://xoops.org)
61: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
62: * @link http://xoops.org
63: */
64: class XoopsMediaUploader extends \Xoops\Core\MediaUploader
65: {
66: }
67: