* Copyright: See COPYING files that comes with this distribution
********************************************************************************/
-require_once 'smarty/libs/Smarty.class.php';
+if (!include_once('Smarty.class.php')) {
+ require_once 'smarty/libs/Smarty.class.php';
+}
class BananaPage extends Smarty
{
return $res;
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
- $host = $_SERVER['HTTP_HOST'];
+ $host = Banana::$baseurl ? Banana::$baseurl : $_SERVER['SERVER_NAME'];
$file = $_SERVER['PHP_SELF'];
if (count($params) != 0) {
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
- $host = $_SERVER['HTTP_HOST'];
+ $host = Banana::$baseurl ? Banana::$baseurl : $_SERVER['SERVER_NAME'];
$file = dirname($_SERVER['PHP_SELF']) . '/img/' . $img;
$url = $proto . $host . $file;
}
$proto = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
- $host = $_SERVER['HTTP_HOST'];
+ $host = Banana::$baseurl ? Banana::$baseurl : $_SERVER['SERVER_NAME'];
$file = dirname($_SERVER['PHP_SELF']) . '/javascript/' . $src . '.js';
$url = $proto . $host . $file;