Example #1
0
* $Id: index.php,v 1.15 2005/05/11 14:43:32 fx2024 Exp $
* Module: SmartPartner
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
*/
include_once "admin_header.php";
$myts =& MyTextSanitizer::getInstance();
$op = isset($_GET['op']) ? $_GET['op'] : '';
switch ($op) {
    case "createdir":
        $path = isset($_GET['path']) ? $_GET['path'] : false;
        if ($path) {
            if ($path == 'root') {
                $path = '';
            }
            $thePath = smartpartner_getUploadDir(true, $path);
            $res = smartpartner_admin_mkdir($thePath);
            if ($res) {
                $source = SMARTPARTNER_ROOT_PATH . "images/blank.png";
                $dest = $thePath . "blank.png";
                smartpartner_copyr($source, $dest);
            }
            $msg = $res ? _AM_SPARTNER_DIRCREATED : _AM_SPARTNER_DIRNOTCREATED;
        } else {
            $msg = _AM_SPARTNER_DIRNOTCREATED;
        }
        redirect_header('index.php', 2, $msg . ': ' . $thePath);
        exit;
        break;
}
$pick = isset($_GET['pick']) ? intval($_GET['pick']) : 0;
Example #2
0
function smartpartner_getImageDir($item = '', $local = true)
{
    if ($item) {
        $item = "images/{$item}";
    } else {
        $item = 'images';
    }
    return smartpartner_getUploadDir($local, $item);
}
Example #3
0
 function getFilePath()
 {
     $hModule =& xoops_gethandler('module');
     $hModConfig =& xoops_gethandler('config');
     $smartpartner_module =& $hModule->getByDirname('smartpartner');
     $smartpartner_config =& $hModConfig->getConfigsByCat(0, $smartpartner_module->getVar('mid'));
     return smartpartner_getUploadDir() . $this->filename();
 }