This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/classes/Site.php

40 lines
1.1 KiB
PHP
Raw Normal View History

2014-08-25 04:41:07 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class is for Site Information
*
* @package OSB
* @category Helpers
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Site extends lnApp_Site {
/**
* Show a date using a site configured format
*/
2018-06-13 11:34:58 +00:00
public static function Date($date,$format='') {
return (is_null($date) OR ! $date) ? '' : date(($format ? $format : Company::instance()->date_format()),$date);
2014-08-25 04:41:07 +00:00
}
/**
* Work out our site ID for multihosting
*/
public static function ID($format=FALSE) {
return Company::instance()->site($format);
}
public static function Theme() {
// If we are using user admin pages (and login), we'll choose the admin theme.
return 'theme/'.(URL::admin_url() ? Kohana::$config->load('config')->theme_admin : Kohana::$config->load('config')->theme);
}
/**
* Show a date using a site configured format
*/
public static function Time($date) {
return date(Company::instance()->time_format(),($date ? $date : time()));
}
}
?>