phpHgAdmin / admin / application / helpers / hg_template_helper.php

The default branch has multiple heads

<?php 

function phphg_header()
{
	echo '<link rel="stylesheet" href="' . base_url(). 'static/css/smoothness/jquery-ui-1.8.1.custom.css" type="text/css" />' 
			.'<script type="text/javascript" src="' . base_url(). 'static/js/jquery-1.4.2.min.js"></script>'
			.'<script type="text/javascript" src="' . base_url(). 'static/js/jquery-ui-1.8.1.custom.min.js"></script>'
			.'<link rel="icon" href="'. base_url(). 'static/hgicon.png" type="image/png" /> '
			.'<meta name="robots" content="index, nofollow" /> ';
}

function hgserve_url($uri='')
{
	$ci =& get_instance();
	$profiles = $ci->config->item('profile');
	return $profiles[current_profile()]['hgserve_url'] . $uri;
}

function theme_name()
{
	return get_phphginfo('theme_name');
}

function get_theme_resource($rel_path)
{
	// FIXME do not allow reverse directory traversal
	include(FCPATH . 'themes/'.theme_name().'/'.$rel_path);
}

function get_header()
{
	get_theme_resource('header.php');
}

function get_sidebar()
{
	get_theme_resource('sidebar.php');
}

function get_footer()
{
	get_theme_resource('footer.php');
}

function is_directory()
{
	return get_phphginfo('pagetype') === 'directory';
}

function is_repo_config()
{
	return get_phphginfo('pagetype') === 'config';
}

function is_repo_browser()
{
	return get_phphginfo('pagetype') == 'browser';
}

function has_messages()
{
	return get_phphginfo('user_msg') !== FALSE;
}

function user_messages()
{
	phphginfo('user_msg');
}

function has_errors()
{
	return get_phphginfo('user_err') !== FALSE;
}

function user_errors()
{
	phphginfo('user_err');
}

function the_title()
{
	phphginfo('title');
}

function user_profiles()
{
	$ci =& get_instance();
	$profiles = $ci->config->item('profile');
	$profile_arr = array();
	foreach($profiles as $p_name => $profile)
	{
		$profiles_arr[$p_name] = $p_name;
	}
	return $profiles_arr;
}

function current_profile()
{
	return get_phphginfo('profile');
}

function phphginfo($item)
{
	echo get_phphginfo($item);
}

function get_phphginfo($item)
{
	$ci =& get_instance();
	if(isset($ci->load->_ci_cached_vars[$item]))
	{
		return $ci->load->_ci_cached_vars[$item];
	}
	return FALSE;
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.