Source

linux.org.il-site / site / inc / header.php

<?
$css_files = Array();
$css_files[] = "/layout_style";
$css_files[] = "/main_style";

// Ensure page charset
header("Content-Type: text/html; charset=UTF-8");

// Unless this is a dynamic request, produce a valid Last-Modified date 
// by getting the modification times of all of the page's dependencies
// (relying on the page to declare them with AddDepend()) and finding
// out the latest one.
if ((!isset($_SERVER["QUERY_STRING"]) || empty($_SERVER["QUERY_STRING"])) && !IsDynamic())
{
	$last_mod = getlastmod(); // script file's last modification date
	foreach(GetDependencies() as $dependency_file)
	{
		$file_last_mod = filemtime($dependency_file);
		if ($file_last_mod && $file_last_mod > $last_mod)
			$last_mod = $file_last_mod;
	}

	if ($last_mod)
	{
		header("Last-Modified: " . gmdate('D, d M Y H:i:s T', $last_mod));
	}
}

// Strip the extension
if (ereg("^(.*)\..*$", $_SERVER["SCRIPT_FILENAME"], $matches))
{
	$noext = $matches[1];
	$css_inline_filename = $noext . "_style.css";
	if (!is_file($css_inline_filename) || !is_readable($css_inline_filename))
		unset($css_inline_filename);
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title><?= $title ? "$title - " : "" ?>לינוקס בישראל</title>
		<link rel="icon" href="/favicon.ico" type="image/x-icon">
		<link rel="top" href="/" title="העמוד הראשי">
		<? foreach($css_files as $css_file): ?>
		<link rel="stylesheet" href="<?= htmlspecialchars($css_file) ?>">
		<? endforeach ?>
		<!--[if lt IE 8]>
		<link rel="stylesheet" href="/layout_style_ie.css">
		<![endif]-->
		<script language="JavaScript" type="text/javascript" src="/layout.js">
		</script>
		<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
		</script>
		<script type="text/javascript">
		_uacct = "UA-106047-3";
		urchinTracker();
		</script>
		<?if (isset($css_inline_filename)): ?>
		<style type="text/css">
<? readfile($css_inline_filename) ?>
		</style>
		<? endif ?>
	</head>
	<body dir="RTL">

		<!-- Defines a right-hand "sidebar" block -->

		<div id="sidebar">

			<!-- side menu -->

			<div id="menu">
				<div class="item"><a href="/" title="העמוד הראשי של האתר">עמוד ראשי</a>&#160;<img src="/menu_bullet.png" alt="&#x2022;"></div>
				<div class="item"><a href="/whatis" title="אודות לינוקס ושימושיה.">מהי לינוקס</a>&#160;<img src="/menu_bullet.png" alt="&#x2022;"></div>
				<div class="item"><a href="/get" title="אתרים מהם ניתן להוריד לינוקס וארגונים מהם ניתן לרכוש.">הורדה / רכישה</a>&#160;<img src="/menu_bullet.png" alt="&#x2022;"></div>
				<?= get_xslt("data/sites.xml", "xsl/sites_menu.xsl") ?>
			</div>

		</div>

		<!-- Defines a content block, spanning the remaining rest of the document -->

		<div id="content">
			<!-- content -->