PHP:
if ($isAdmin) {
$query = "SELECT template"
. "\n FROM #__templates_menu"
. "\n WHERE client_id = 1"
. "\n AND menuid = 0"
;
$this->_db->setQuery( $query );
$cur_template = $this->_db->loadResult();
$path = "$mosConfig_absolute_path/administrator/templates/$cur_template/index.php";
if (!file_exists( $path )) {
$cur_template = 'joomla_admin';
font>