<?php
// $Id: config.inc.php, v 1.3 2004/11/23 17:35:27 bpfeifer Exp $
/**
* TMEdit addon - ImageManager
* @ Package TMedit
* @ Copyright © 2004, 2005 Bernhard Pfeifer - www.thinkmambo.com
* @ All rights reserved
* @ Released under ThinkMambo Free Software License: http://www.thinkmambo.com/license/TMEdit_license.txt
* @version $Revision: 1.0 $
**/

$BASE_DIR = $_SERVER['DOCUMENT_ROOT'];
$BASE_URL = "/";
$BASE_ROOT = "mambo/images/stories"; 
$SAFE_MODE = false;
$IMG_ROOT = $BASE_ROOT;

if(strrpos($BASE_DIR, '/')!= strlen($BASE_DIR)-1) 
	$BASE_DIR .= '/';

if(strrpos($BASE_URL, '/')!= strlen($BASE_URL)-1) 
	$BASE_URL .= '/';

function dir_name($dir) 
{
	$lastSlash = intval(strrpos($dir, '/'));
	if($lastSlash == strlen($dir)-1){
		return substr($dir, 0, $lastSlash);
	}
	else
		return dirname($dir);
}