forked from vincent3569/i-feel-dirty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinc_header.php
executable file
·190 lines (170 loc) · 6.39 KB
/
inc_header.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
// force UTF-8 Ø
if (!defined('WEBPATH')) die();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="<?php echo getOption('charset'); ?>">
<?php zp_apply_filter('theme_head'); ?>
<title>
<?php
echo getParentSiteTitle() . ' | ';
switch ($_zp_gallery_page) {
case 'index.php':
if (isset($isHomePage) && $isHomePage) { echo gettext('Home'); } else { echo gettext('Gallery'); }; break;
case '404.php':
echo gettext('Object not found'); break;
case 'album.php':
echo getBareAlbumTitle(); if ($_zp_page > 1) { echo ' [' . $_zp_page . ']'; }; break;
case 'archive.php':
echo gettext('Archive View'); break;
case 'contact.php':
echo gettext('Contact'); break;
case 'favorites.php':
echo gettext('My favorites'); if ($_zp_page > 1) { echo ' [' . $_zp_page . ']'; }; break;
case 'gallery.php':
echo gettext('Gallery'); if ($_zp_page > 1) { echo ' [' . $_zp_page . ']'; }; break;
case 'image.php':
echo getBareAlbumTitle() . ' | ' . getBareImageTitle(); break;
case 'news.php':
if (is_NewsArticle()) { echo getBareNewsTitle(); } else { echo gettext('News'); if ($_zp_page > 1) { echo ' [' . $_zp_page . ']'; }; }; break;
case 'pages.php':
echo getBarePageTitle(); break;
case 'password.php':
echo gettext('Password Required...'); break;
case 'register.php':
echo gettext('Register'); break;
case 'search.php':
echo gettext('Search'); if ($_zp_page > 1) { echo ' [' . $_zp_page . ']'; }; break;
}
?>
</title>
<?php
if (class_exists('RSS')) {
if (getOption('RSS_album_image')) {
printRSSHeaderLink('Gallery', gettext('Latest images RSS'));
}
if ($_zenpage_and_news_enabled && getOption('RSS_articles')) {
printRSSHeaderLink('News', gettext('News and Gallery RSS'));
}
}
?>
<link rel="stylesheet" href="<?php echo $_zp_themeroot; ?>/css/style.css" type="text/css" media="screen"/>
<link rel="shortcut icon" href="<?php echo $_zp_themeroot; ?>/images/faviconst.ico" />
<script type="text/javascript" src="<?php echo $_zp_themeroot; ?>/js/fadeSliderToggle.js"></script>
<script type="text/javascript" src="<?php echo $_zp_themeroot; ?>/js/i-feel-dirty.js"></script>
<?php if (($_zp_gallery_page == 'image.php') || (($_zenpage_and_news_enabled) && (is_NewsArticle()))) { ?>
<script type="text/javascript">
//<![CDATA[
<?php $NextURL = $PrevURL = false; ?>
<?php if ($_zp_gallery_page == 'image.php') { ?>
<?php if (hasNextImage()) { ?>var nextURL = "<? echo html_encode(getNextImageURL()); $NextURL = true; ?>";<?php } ?>
<?php if (hasPrevImage()) { ?>var prevURL = "<? echo html_encode(getPrevImageURL()); $PrevURL = true; ?>";<?php } ?>
<?php } else { ?>
<?php if (($_zenpage_and_news_enabled) && (is_NewsArticle())) { ?>
<?php if (getNextNewsURL()) { $article_url = getNextNewsURL(); ?>var nextURL = "<?php echo html_decode($article_url['link']); $NextURL = true; ?>";<?php } ?>
<?php if (getPrevNewsURL()) { $article_url = getPrevNewsURL(); ?>var prevURL = "<?php echo html_decode($article_url['link']); $PrevURL = true; ?>";<?php } ?>
<?php } ?>
<?php } ?>
var ColorboxActive = false; // cohabitation entre script de navigation et colorbox
function keyboardNavigation(e) {
if (ColorboxActive) return true; // cohabitation entre script de navigation et colorbox
if (!e) e = window.event;
if (e.altKey) return true;
var target = e.target || e.srcElement;
if (target && target.type) return true; //an input editable element
var keyCode = e.keyCode || e.which;
var docElem = document.documentElement;
switch(keyCode) {
case 63235: case 39:
if (e.ctrlKey || (docElem.scrollLeft == docElem.scrollWidth-docElem.clientWidth)) {
<?php if ($NextURL) { ?>window.location.href = nextURL; <?php } ?>return false; }
break;
case 63234: case 37:
if (e.ctrlKey || (docElem.scrollLeft == 0)) {
<?php if ($PrevURL) { ?>window.location.href = prevURL; <?php } ?>return false; }
break;
}
return true;
}
document.onkeydown = keyboardNavigation;
// cohabitation entre script de navigation et colorbox
$(document).bind('cbox_open', function() {ColorboxActive = true; })
$(document).bind('cbox_closed', function() {ColorboxActive = false; });
//]]>
</script>
<?php } ?>
<?php if (getOption('use_colorbox_image')) { ?>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("a[rel='zoom']").colorbox({
slideshow: true,
slideshowSpeed: 3000,
slideshowStart: '<?php echo gettext("start slideshow"); ?>',
slideshowStop: '<?php echo gettext("stop slideshow"); ?>',
previous: '<?php echo gettext("prev"); ?>',
next: '<?php echo gettext("next"); ?>',
close: '<?php echo gettext("close"); ?>',
current : "image {current} / {total}",
maxWidth: "98%",
maxHeight: "98%",
photo: true
});
});
//]]>
</script>
<?php } ?>
<?php if ($_zp_gallery_page == 'image.php') { ?>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$(".colorbox").colorbox({
inline:true,
href:"#imagemetadata",
close: '<?php echo gettext('close'); ?>'
});
});
//]]>
</script>
<?php } ?>
</head>
<body>
<?php zp_apply_filter('theme_body_open'); ?>
<div class="container">
<div class="header">
<div class="head1">
<h1><?php echo getParentSiteTitle(); ?></h1>
<div class="description"><?php printGalleryDesc(); ?></div>
</div> <!-- head1 -->
<div class="head2">
<?php if (class_exists('RSS')) { ?>
<?php $rss_feed = false; ?>
<?php if (getOption('RSS_album_image')) { ?>
<div class="rsslink">
<?php printRSSLink('Gallery', '', '', '', false, 'rssimg'); $rss_feed = true; ?>
<?php printRSSLink('Gallery', '', gettext('Gallery'), '', false, 'rsstext'); ?>
</div>
<?php } ?>
<?php if ($_zenpage_and_news_enabled && getOption('RSS_articles')) { ?>
<div class="rsslink">
<?php printRSSLink('News', '', '', '', false, 'rssimg'); $rss_feed = true; ?>
<?php printRSSLink('News', '', gettext('News'), '', false, 'rsstext'); ?>
</div>
<?php } ?>
<?php if ($rss_feed) { ?>
<script type="text/javascript">
//<![CDATA[
$('.rssimg').prepend('<img alt="RSS Feed" src="<?php echo $_zp_themeroot; ?>/images/feedicon.gif">');
//]]>
</script>
<?php } ?>
<?php } ?>
<?php if (extensionEnabled('dynamic-locale')) { ?>
<div class="flag-selector">
<?php printLanguageSelector(); ?>
</div>
<?php } ?>
</div> <!-- head2 -->
</div> <!-- header -->