FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
if ($_SESSION["filemanager"] != true) {
    echo 'You must be logged in to the admin to view the file manager';
    exit;
}
//Include your own script with authentication if you wish
//i.e. include($_SERVER['DOCUMENT_ROOT'].'/_files/application/PGRFileManagerConfig.php');
//real absolute path to root directory (directory you want to use with PGRFileManager) on your server
//i.e  PGRFileManagerConfig::$rootPath = '/home/user/htdocs/userfiles'
//you can check your absoulte path using
PGRFileManagerConfig::$rootPath = rtrim($_SESSION["media_dir"], '/') . '/products';
//url path to root directory
//this path is using to display images and will be returned to ckeditor with relative path to selected file
//i.e http://my-super-web-page/gallery
//i.e /gallery
PGRFileManagerConfig::$urlPath = rtrim($_SESSION["media_url"], '/') . '/products';
//    !!!How to determine rootPath and urlPath!!!
//    1. Copy mypath.php file to directory which you want to use with PGRFileManager
//    2. Run mypath.php script, i.e http://my-super-web-page/gallery/mypath.php
//    3. Insert correct values to myconfig.php
//    4. Delete mypath.php from your root directory
//Max file upload size in bytes
PGRFileManagerConfig::$fileMaxSize = 1024 * 1024 * 10;
//Allowed file extensions
//PGRFileManagerConfig::$allowedExtensions = '' means all files
PGRFileManagerConfig::$allowedExtensions = '';
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

PGRFileManager IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
include_once dirname(__FILE__) . '/config.php';
$arr = (require dirname(__FILE__) . '/../../../../../../../../../config/ckedit.php');
PGRFileManagerConfig::$rootPath = $arr['rootPath'];
PGRFileManagerConfig::$urlPath = $arr['urlPath'];
PGRFileManagerConfig::$fileMaxSize = $arr['fileMaxSize'];
PGRFileManagerConfig::$allowedExtensions = $arr['allowedExtensions'];
PGRFileManagerConfig::$imagesExtensions = $arr['imagesExtensions'];
PGRFileManagerConfig::$imageMaxHeight = $arr['imageMaxHeight'];
PGRFileManagerConfig::$imageMaxWidth = $arr['imageMaxWidth'];
PGRFileManagerConfig::$allowEdit = $arr['allowEdit'];
PGRFileManagerConfig::$authorize = $arr['authorize'];
PGRFileManagerConfig::$authorizeUser = $arr['authorizeUser'];
PGRFileManagerConfig::$authorizePass = $arr['authorizePass'];
PGRFileManagerConfig::$rootDir = PGRFileManagerConfig::$rootPath;
//Lang
if (isset($_GET['langCode'])) {
    $PGRLang = $_GET['langCode'];
} else {
Example #3
0
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

PGRFileManager IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
include_once dirname(__FILE__) . '/config.php';
include_once dirname(__FILE__) . '/../myconfig.php';
require dirname(__FILE__) . '/../../../../../model/Ini.php';
$ini = new Ini();
PGRFileManagerConfig::$rootPath = substr(Ini::$internal_media_path, 0, strlen(Ini::$internal_media_path) - 1);
PGRFileManagerConfig::$urlPath = substr(Ini::$external_media_path, 0, strlen(Ini::$external_media_path) - 1);
PGRFileManagerConfig::$rootDir = PGRFileManagerConfig::$rootPath;
//Lang
if (isset($_GET['langCode'])) {
    $PGRLang = $_GET['langCode'];
} else {
    $PGRLang = 'en';
}
include_once dirname(__FILE__) . '/auth.php';
$PGRUploaderDescription = 'all files';
//For fckeditor
if (isset($_GET['type'])) {
    $type = $_GET['type'];
    if ($type === 'Image') {
        PGRFileManagerConfig::$allowedExtensions = PGRFileManagerConfig::$imagesExtensions;
Example #4
0
all copies or substantial portions of the Software.

PGRFileManager IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
//Include your own script with authentication if you wish
//i.e. include($_SERVER['DOCUMENT_ROOT'].'/_files/application/PGRFileManagerConfig.php');
//real absolute path to root directory (directory you want to use with PGRFileManager) on your server
//i.e  PGRFileManagerConfig::$rootPath = '/home/user/htdocs/userfiles'
//you can check your absoulte path using
PGRFileManagerConfig::$rootPath = $_SERVER['DOCUMENT_ROOT'] . '/site-assets';
//url path to root directory
//this path is using to display images and will be returned to ckeditor with relative path to selected file
//i.e http://my-super-web-page/gallery
//i.e /gallery
PGRFileManagerConfig::$urlPath = '/site-assets';
//    !!!How to determine rootPath and urlPath!!!
//    1. Copy mypath.php file to directory which you want to use with PGRFileManager
//    2. Run mypath.php script, i.e http://my-super-web-page/gallery/mypath.php
//    3. Insert correct values to myconfig.php
//    4. Delete mypath.php from your root directory
//Max file upload size in bytes
PGRFileManagerConfig::$fileMaxSize = 1024 * 1024 * 10;
//Allowed file extensions
//PGRFileManagerConfig::$allowedExtensions = '' means all files
PGRFileManagerConfig::$allowedExtensions = '';
Example #5
0
THE SOFTWARE.
*/
include_once dirname(__FILE__) . '/config.php';
include_once dirname(__FILE__) . '/../myconfig.php';
require dirname(__FILE__) . '/../../../../../../Ini.php';
$ini = new Ini();
$logged_user = User::get_logged_user();
$internal_path = Ini::$path_internal_media . $logged_user->id;
$external_path = Ini::$path_external_media . $logged_user->id;
if (!is_dir($internal_path)) {
    mkdir($internal_path, 0777);
}
if (!is_dir($external_path)) {
    mkdir($external_path, 0777);
}
PGRFileManagerConfig::$rootPath = $internal_path;
PGRFileManagerConfig::$urlPath = $external_path;
PGRFileManagerConfig::$rootDir = PGRFileManagerConfig::$rootPath;
//Lang
if (isset($_GET['langCode'])) {
    $PGRLang = $_GET['langCode'];
} else {
    $PGRLang = 'en';
}
include_once dirname(__FILE__) . '/auth.php';
$PGRUploaderDescription = 'all files';
//For fckeditor
if (isset($_GET['type'])) {
    $type = $_GET['type'];
    if ($type === 'Image') {
        PGRFileManagerConfig::$allowedExtensions = PGRFileManagerConfig::$imagesExtensions;
Example #6
0
all copies or substantial portions of the Software.

PGRFileManager IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
//Include your own script with authentication if you wish
//i.e. include($_SERVER['DOCUMENT_ROOT'].'/_files/application/PGRFileManagerConfig.php');
//real absolute path to root directory (directory you want to use with PGRFileManager) on your server
//i.e  PGRFileManagerConfig::$rootPath = '/home/user/htdocs/userfiles'
//you can check your absoulte path using
PGRFileManagerConfig::$rootPath = $_SERVER['DOCUMENT_ROOT'] . '/uploads';
//url path to root directory
//this path is using to display images and will be returned to ckeditor with relative path to selected file
//i.e http://my-super-web-page/gallery
//i.e /gallery
PGRFileManagerConfig::$urlPath = '/uploads';
//    !!!How to determine rootPath and urlPath!!!
//    1. Copy mypath.php file to directory which you want to use with PGRFileManager
//    2. Run mypath.php script, i.e http://my-super-web-page/gallery/mypath.php
//    3. Insert correct values to myconfig.php
//    4. Delete mypath.php from your root directory
//Max file upload size in bytes
PGRFileManagerConfig::$fileMaxSize = 1024 * 1024 * 10;
//Allowed file extensions
//PGRFileManagerConfig::$allowedExtensions = '' means all files
PGRFileManagerConfig::$allowedExtensions = '';
Example #7
0
PGRFileManager IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
//Include your own script with authentication if you wish
//i.e. include($_SERVER['DOCUMENT_ROOT'].'/_files/application/PGRFileManagerConfig.php');
include $_SERVER['DOCUMENT_ROOT'] . '/../../config.php';
//real absolute path to root directory (directory you want to use with PGRFileManager) on your server
//i.e  PGRFileManagerConfig::$rootPath = '/home/user/htdocs/userfiles'
//you can check your absoulte path using
PGRFileManagerConfig::$rootPath = $config['user_path'][$config['env']] . 'uploads';
//url path to root directory
//this path is using to display images and will be returned to ckeditor with relative path to selected file
//i.e http://my-super-web-page/gallery
//i.e /gallery
PGRFileManagerConfig::$urlPath = $config['static_url'][$config['env']] . '/var/uploads';
//    !!!How to determine rootPath and urlPath!!!
//    1. Copy mypath.php file to directory which you want to use with PGRFileManager
//    2. Run mypath.php script, i.e http://my-super-web-page/gallery/mypath.php
//    3. Insert correct values to myconfig.php
//    4. Delete mypath.php from your root directory
//Max file upload size in bytes
PGRFileManagerConfig::$fileMaxSize = 1024 * 1024 * 10;
//Allowed file extensions
//PGRFileManagerConfig::$allowedExtensions = '' means all files
PGRFileManagerConfig::$allowedExtensions = 'pdf|doc|docx|xls|xlsx|ppt|pps|pptx|ppsx|pub';