forked from tschmidtbhv/ISC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.php
More file actions
executable file
·146 lines (121 loc) · 4.97 KB
/
error.php
File metadata and controls
executable file
·146 lines (121 loc) · 4.97 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
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
135
136
137
138
139
140
141
142
143
144
145
146
<?php
/**
* H5BP4J
*
* HTML5 Boilerplate 3.0 by http://html5boilerplate.com, The Unlicense (aka: public domain)
* Adapted for Joomla! by Konrad Gretkiewicz, http://www.kgretk.com
*
* Used in: <enter your website name/url/your template name, version>
* Error page
*/
// No direct access
defined('_JEXEC') or die;
if (!isset($this->error)) {
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
// get template name and parameters
$tpn = $this->template;
$params = JFactory::getApplication()->getTemplate(true)->params;
//$app = JFactory::getApplication();
$logo = $params->get('logo');
$sitename = $params->get('sitename');
$tagline= $params->get('tagline');
$analytics = $params->get('analytics');
$iskip = $params->get('iskip');
$viewport = $params->get('viewport');
if ($iskip) {
$doc = JFactory::getDocument();
$doc->addScriptDeclaration('/mobile/i.test(navigator.userAgent) && !window.location.hash && setTimeout(function () { if (!pageYOffset) window.scrollTo(0, 0); }, 500);');
}
// send correct HTTP status code
if ($this->error->getCode() == 404 ) {
header("HTTP/1.0 404 Not Found");
}
?>
<!doctype html>
<!--
* H5BP4J
*
* HTML5 Boilerplate 3.0 by http://html5boilerplate.com, The Unlicense (aka: public domain)
* Adapted for Joomla! by KG, http://www.kgretk.com
* ERROR PAGE
-->
<head>
<title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
<meta name="viewport" content="<?php echo htmlspecialchars($viewport); ?>">
<!-- CSS: implied media=all -->
<!-- CSS concatenated and minified via ant build script (or via Joomla plugin) -->
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $tpn ?>/css/style.css">
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $tpn ?>/css/template.css">
<!-- end CSS-->
</head>
<body>
<div id="header" class="hbg-1">
<div id="logo">
<a href="<?php echo $this->baseurl; ?>" >
<?php
if (strlen($logo)>4)
echo '<img src="'.$this->baseurl.'/'.htmlspecialchars($logo).'" alt="'.htmlspecialchars($sitename).'" />';
else
echo htmlspecialchars($sitename);
?>
</a>
</div>
<div id="tagline">
<?php echo htmlspecialchars($tagline); ?>
</div>
</div>
<div id="content">
<div class="error">
<div id="outline">
<div id="errorboxoutline">
<div id="errorboxheader"><?php echo $this->error->getCode(); ?> - <?php echo $this->error->getMessage(); ?></div>
<div id="errorboxbody">
<p><strong><?php echo JText::_('JERROR_LAYOUT_NOT_ABLE_TO_VISIT'); ?></strong></p>
<ol>
<li><?php echo JText::_('JERROR_LAYOUT_AN_OUT_OF_DATE_BOOKMARK_FAVOURITE'); ?></li>
<li><?php echo JText::_('JERROR_LAYOUT_SEARCH_ENGINE_OUT_OF_DATE_LISTING'); ?></li>
<li><?php echo JText::_('JERROR_LAYOUT_MIS_TYPED_ADDRESS'); ?></li>
<li><?php echo JText::_('JERROR_LAYOUT_YOU_HAVE_NO_ACCESS_TO_THIS_PAGE'); ?></li>
<li><?php echo JText::_('JERROR_LAYOUT_REQUESTED_RESOURCE_WAS_NOT_FOUND'); ?></li>
<li><?php echo JText::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></li>
</ol>
<p><strong><?php echo JText::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?></strong></p>
<ul>
<li><a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></li>
<li><a href="<?php echo $this->baseurl; ?>/index.php?option=com_search" title="<?php echo JText::_('JERROR_LAYOUT_SEARCH_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_SEARCH_PAGE'); ?></a></li>
</ul>
<p><?php echo JText::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?>.</p>
<div id="techinfo">
<p><?php echo $this->error->getMessage(); ?></p>
<p>
<?php if ($this->debug) :
echo $this->renderBacktrace();
endif; ?>
</p>
</div>
</div>
</div>
</div>
</div>
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
</script>
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
</div>
<div id="footer">
<jdoc:include type="modules" name="footer" />
</div>
<?php if (strlen($analytics)>4) { ?>
<!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
mathiasbynens.be/notes/async-analytics-snippet -->
<script>
var _gaq=[['_setAccount','<?php echo htmlspecialchars($analytics); ?>'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
<?php } ?>
</body>
</html>