Beispiel #1
0
function GetUrlFromPath( $resourceType, $folderPath )
{
    if ( $resourceType == '' )
        return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
    else
        return $GLOBALS["UserFilesPath"] . strtolower( $resourceType ) . $folderPath ;
}
Beispiel #2
0
Datei: io.php Projekt: LFSF/oras
function GetUrlFromPath($resourceType, $folderPath)
{
    if ($resourceType == '') {
        return RemoveFromEnd($GLOBALS["UserFilesPath"], '/') . $folderPath;
    } else {
        return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath;
    }
}
Beispiel #3
0
function GetUrlFromPath($resourceType, $folderPath, $sCommand)
{
    $rpath = GetResourceTypePath($resourceType, $sCommand);
    $rpath = RemoveFromEnd($rpath, "/");
    $path = CombinePaths($rpath, "");
    $path = RemoveFromEnd($path, "/");
    return $path;
}
Beispiel #4
0
/**
 * GetUrlFromPath
 * Modified by Tibcsi for iShark CMS
 * 
 * @param mixed $resourceType 
 * @param mixed $folderPath 
 * @access public
 * @return void
 */
function GetUrlFromPath($resourceType, $folderPath)
{
    global $libs_dir;
    $ldir = preg_quote($libs_dir, '!');
    $akt_dir = preg_replace("!/{$ldir}/.*!", '/' . trim($GLOBALS["UserFilesPath"], '/'), $_SERVER['PHP_SELF']);
    if ($resourceType == '') {
        //		$ret = $akt_dir . $folderPath;
        $ret = RemoveFromEnd($GLOBALS["UserFilesPath"], '/') . $folderPath;
    } else {
        //		$ret = $akt_dir . '/' . $resourceType . $folderPath;
        $ret = $GLOBALS["UserFilesPath"] . $resourceType . $folderPath;
    }
    //	$f = fopen('/home/tibor/public_html/www.medikemia.hu/files/teszt.log', 'a');
    //	fwrite($f, "Url: $ret\n");
    //	fclose($f);
    return $ret;
}
Beispiel #5
0
function CombinePaths($sBasePath, $sFolder)
{
    return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
}