* $Id: index.php,v 1.11 2005/05/11 14:43:40 fx2024 Exp $ * Module: SmartClient * 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 = smartclient_getUploadDir(true, $path); $res = smartclient_admin_mkdir($thePath); if ($res) { $source = SMARTCLIENT_ROOT_PATH . "images/blank.png"; $dest = $thePath . "blank.png"; smartclient_copyr($source, $dest); } $msg = $res ? _AM_SCLIENT_DIRCREATED : _AM_SCLIENT_DIRNOTCREATED; } else { $msg = _AM_SCLIENT_DIRNOTCREATED; } redirect_header('index.php', 2, $msg . ': ' . $thePath); exit; break; } $pick = isset($_GET['pick']) ? intval($_GET['pick']) : 0;
function smartclient_getImageDir($item = '', $local = true) { if ($item) { $item = "images/{$item}"; } else { $item = 'images'; } return smartclient_getUploadDir($local, $item); }