forked from tomslominski/infinity-squared
/
header.php
150 lines (137 loc) · 5.06 KB
/
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
<!DOCTYPE html>
<?php
// Start YOURLS engine
require_once( dirname(__FILE__).'/includes/load-yourls.php' );
// Ask for Infinity Squared settings
include( dirname(__FILE__).'/public/config.php' );
class ISQ { public static $general = array(), $links = array(), $social = array(), $recaptcha = array(); }
// Load translations
function isq_load_textdomain() {
yourls_load_custom_textdomain( 'isq_translation', $site . '/public/languages' );
$site = YOURLS_SITE;
}
isq_load_textdomain();
// Load reCAPTCHA
require_once( dirname(__FILE__).'/public/recaptchalib.php');
?>
<html>
<head>
<title><?php echo ISQ::$general['name']; ?></title> <!-- Site title defined in theme settings -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link rel="shortcut icon" href="<?php echo YOURLS_SITE; ?>/images/favicon.gif" /> <!-- Default favicon -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic"><!-- Ubuntu from Google Web Fonts -->
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/style.css" /><!-- Theme CSS -->
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/bootstrap.min.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<?php if (!empty(ISQ::$social['plus'])) { ?>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang: "en-GB"}
</script>
<?php } ?>
<script type="text/javascript"><!-- reCAPTCHA -->
var RecaptchaOptions = {
theme : 'white'
};
</script>
<?php if (!empty(ISQ::$general['clipboard'])) { ?>
<script type="text/javascript" src="js/jquery.zclip.min.js"></script>
<script>
$(document).ready(function(){
$('button#long-copy').zclip({
path:'js/ZeroClipboard.swf',
copy:function(){return $('input#long-copy').val();},
afterCopy: function() {
$("button#long-copy").html('<?php yourls_e( 'Copied!', 'isq_translation'); ?>');
}
});
$('button#short-copy').zclip({
path:'js/ZeroClipboard.swf',
copy:function(){return $('input#short-copy').val();},
afterCopy: function() {
$("button#short-copy").html('<?php yourls_e( 'Copied!', 'isq_translation'); ?>');
}
});
$('button#stats-copy').zclip({
path:'js/ZeroClipboard.swf',
copy:function(){return $('input#stats-copy').val();},
afterCopy: function() {
$("button#stats-copy").html('<?php yourls_e( 'Copied!', 'isq_translation'); ?>');
}
});
});
</script>
<?php } ?>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?php echo YOURLS_SITE; ?>"><?php echo ISQ::$general['name']; ?></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<?php
if (ISQ::$links['url_1']) {
?>
<li><a href="<?php echo ISQ::$links['url_1']; ?>"><?php echo ISQ::$links['name_1']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_2']) {
?>
<li><a href="<?php echo ISQ::$links['url_2']; ?>"><?php echo ISQ::$links['name_2']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_3']) {
?>
<li><a href="<?php echo ISQ::$links['url_3']; ?>"><?php echo ISQ::$links['name_3']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_4']) {
?>
<li><a href="<?php echo ISQ::$links['url_4']; ?>"><?php echo ISQ::$links['name_4']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_5']) {
?>
<li><a href="<?php echo ISQ::$links['url_5']; ?>"><?php echo ISQ::$links['name_5']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_6']) {
?>
<li><a href="<?php echo ISQ::$links['url_6']; ?>"><?php echo ISQ::$links['name_6']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_7']) {
?>
<li><a href="<?php echo ISQ::$links['url_7']; ?>"><?php echo ISQ::$links['name_7']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_8']) {
?>
<li><a href="<?php echo ISQ::$links['url_8']; ?>"><?php echo ISQ::$links['name_8']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_9']) {
?>
<li><a href="<?php echo ISQ::$links['url_9']; ?>"><?php echo ISQ::$links['name_9']; ?></a></li>
<?php } ?>
<?php
if (ISQ::$links['url_10']) {
?>
<li><a href="<?php echo ISQ::$links['url_10']; ?>"><?php echo ISQ::$links['name_10']; ?></a></li>
<?php } ?>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="paragraph">