-
Notifications
You must be signed in to change notification settings - Fork 36
/
index.php
66 lines (58 loc) · 2 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
include_once('functions.php');
?>
<html>
<head>
<title>Tehran Linux Users Group</title>
<meta http-equiv="content-type" content="text-html; charset=UTF-8" />
<link rel="stylesheet" href="style.css" />
<link rel="alternate" type="application/rss+xml" href="rss.php" />
<link rel="icon" href="images/favicon.png" />
</head>
<body>
<div id="container">
<div id="header">
<div id="menu_container">
<?php
include('menu.php');
?>
<div id="search_box">
<form action="index.php?page=search" method="POST">
<input type="text" name="keywords" value="<?php if(isset($_POST['keywords'])) { echo $_POST['keywords']; } ?>" />
<input type="submit" name="submit" value="جستجو" />
</form>
</div>
</div>
</div>
<div id="content">
<?php
$page = (isset($_GET['page'])) ? $_GET['page'] : "front";
$page = 'contents/'.$page.'.php';
//Make sure page is a subdir of contents
$realpath = realpath($page);
$contentsPath = realpath('./contents');
if(substr($realpath, 0, strlen($contentsPath)) === $contentsPath)
include($page);
?>
</div>
<div class="clear"></div>
<div id="footer">
<?php
$time = filemtime($page);
echo 'Updated: $Date: '.date('Y/m/d H:i:s', $time).' $';
?>
</div>
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://tehlug.org/stats/" : "http://tehlug.org/stats/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://tehlug.org/stats/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>