\d+)/i', @$_SERVER['HTTP_USER_AGENT'], $B)) {
return $B['v'];
} else {
return PHP_INT_MAX;
}
}
/**
* Gets the full url including the http scheme and host part
* Needed for IE 6 & 7 need.
*/
public function get_url_full($path): string {
$host = $_SERVER['HTTP_HOST'];
$base = lang('base_path');
$url = "http://{$host}{$base}{$path}";
return $url;
}
/**
* Gets a full path url from a relative path
*/
public function get_url($path): string {
if ($this->get_ie_version() <= 7) {
return $this->get_url_full($path);
}
$base = lang('base_path');
$url = "{$base}{$path}";
return $url;
}
/**
* Loads a css html link
* @param string $path - the path to the css file
*/
public function link_css($path): string {
$stamp = $this->asset_stamp($path);
$href = $this->get_url("public/{$path}?stamp={$stamp}");
return '';
}
/**
* Loads a css html link
* @param string $path - the path to the css file
*/
public function embed_css($path): string {
$file = $GLOBALS['publicroot'] . '/' . $path;
if (file_exists($file)) {
$text = file_get_contents($file);
return "";
} else {
return "";
}
}
/**
* Formats a ISO date
* @param $iso_date the ISO date
*/
public function format_date($iso_date): string {
return date("Y-m-d D H:m", strtotime($iso_date));
}
}
?>