-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodule_preview.php
More file actions
67 lines (59 loc) · 1.93 KB
/
module_preview.php
File metadata and controls
67 lines (59 loc) · 1.93 KB
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
<?php
##################################################
#
# Copyright (c) 2004-2006 OIC Group, Inc.
# Written and Designed by James Hunt
#
# This file is part of Exponent
#
# Exponent 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.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined('EXPONENT')) exit('');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo SITE_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?PHP echo LANG_CHARSET; ?>" />
<meta name="Generator" value="Exponent Content Management System" />
<link rel="stylesheet" title="default" href="<?php echo THEME_RELATIVE; ?>style.css" />
<script type="text/javascript" src="<?php echo PATH_RELATIVE; ?>exponent.js.php"></script>
</head>
<body>
<?php
/* exdoc
* Define the Preview Readonly file, so that stuff works still.
* @node General
*/
define('PREVIEW_READONLY',1);
$module = $_GET['module'];
$view = $_GET['view'];
$mod = new $module();
$title = $_GET['title'];
$source = (isset($_GET['source']) ? $_GET['source'] : '@example');
$loc = exponent_core_makeLocation($module, $source,'');
$mod->show($view, $loc, $title);
?>
<script type="text/javascript">
var elems = document.getElementsByTagName("a");
for (var i = 0; i < elems.length; i++) {
elems[i].setAttribute("onclick","return false;");
}
elems = document.getElementsByTagName("input");
for (var i = 0; i < elems.length; i++) {
if (elems[i].type == "submit") elems[i].setAttribute("disabled","disabled");
}
elems = document.getElementsByTagName("button");
for (var i = 0; i < elems.length; i++) {
elems[i].setAttribute("disabled","disabled");
}
</script>
</body>
</html>