This repository has been archived by the owner on Apr 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmicro.php
134 lines (108 loc) · 3.75 KB
/
micro.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
/*
This file is part of Camdram.
Camdram is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Camdram is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Camdram; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (c) 2006-2012. See the AUTHORS file for a list of authors.
*/
require_once("config.php");
require_once("library/adcdb.php");
require_once("library/lib.php");
if(!isset($_SESSION)){
session_start();
}
ob_start();
$mode = 2;
$currentid = $_GET['id'];
if (!is_numeric($currentid))
die();
$query = "SELECT * FROM acts_pages WHERE acts_pages.id = $currentid";
$page = sqlquery($query, $adcdb) or die(mysql_error());
$items= mysql_num_rows($page);
if($items==1)
{
$pagedetails = mysql_fetch_assoc($page);
$tt=$pagedetails['title'];
?>
<!-- camdram.net v2.01 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>camdram.net - Association of Cambridge Theatre Societies</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php if(isset($_GET['noindextag'])) echo '<meta name="robots" content="noindex" />';
if(is_file("content/".$pagedetails['id']."_header.php")) {
echo "<!-- Custom headers follow -->";
require_once("content/".$pagedetails['id']."_header.php");
echo "<!-- End custom headers -->";
}
?>
<link href="furniture/common/camdram.css" rel="stylesheet" type="text/css">
<link href="furniture/<?=$theme?>/camdram.css" rel="stylesheet" type="text/css">
<?=js_header();?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37770738-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<?php
?>
<body class="micro">
<?php
global $currentid;
global $this_stack_ref,$next_stack_ref,$prev_stack_ref;
$next_stack_ref = md5(rand());
if(isset($_GET['stackref'])) {
$this_stack_ref = $_GET['stackref'];
} else {
$this_stack_ref = md5(rand());
}
$currenturl = reconstructUrl();
echo "<div id=\"micronav\">";
backStack();
if(isset($_SESSION['nextstackref'][$this_stack_ref])) {
echo "<small> | ";
echo '<a href="'.$_SESSION[stackurl][$_SESSION['nextstackref'][$this_stack_ref]].'">Forward</a>';
echo "</small>";
} else echo " ";
echo "</div>";
$_SESSION['prevstackref'][$next_stack_ref]=$this_stack_ref;
$_SESSION['stackurl'][$this_stack_ref] = reconstructUrl();
$_GET['stackref'] =$next_stack_ref;
// echo $next_stack_ref;
if($pagedetails['micro']==0 && false)
{
echo("<p>This page is designed for full frame viewing and cannot be displayed here.</p>");
} else {
loadPage($pagedetails['id'],true);
}
?>
<div id="copyright">© Association of Cambridge Theatre Societies
and contributing groups 2004 — 2012</span>
<?php
} else {
echo("<p>Could not find the requested page.</p>");
}
mysql_free_result($page);
?>
</body>
</html>
<?php
microlog("micro.php");
ob_end_flush();
?>