-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
535 lines (451 loc) · 17.9 KB
/
index.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
<?php
/* iamrobert.com | TAIWAN -------------------------------------------------
_ __ __
(_)__ ___ _ _______ / / ___ ____/ /_
/ / _ `/ ' \/ __/ _ \/ _ \/ -_) __/ __/
/_/\_,_/_/_/_/_/ \___/_.__/\__/_/ \__/
===================================================== DIGITAL DESIGN STUDIO
# author Robert Stark
# copyright Copyright (C) 2019 iamrobert.com All rights reserved.
# @license GNU General Public License version 2 or later;
# Website https://www.iamrobert.com
-------------------------------------------------------------------------*/
/**
* @package Joomla.Administrator
* @subpackage Templates.isis
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @since 3.0
*/
defined('_JEXEC') or die;
/** @var JDocumentHtml $this */
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
$input = $app->input;
$user = JFactory::getUser();
// Output as HTML5
$this->setHtml5(true);
// Gets the FrontEnd Main page Uri
$frontEndUri = JUri::getInstance(JUri::root());
$frontEndUri->setScheme(((int) $app->get('force_ssl', 0) === 2) ? 'https' : 'http');
$mainPageUri = $frontEndUri->toString();
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Add filter polyfill for IE8
JHtml::_('behavior.polyfill', array('filter'), 'lte IE 9');
// Add template js
JHtml::_('script', 'template.js', array('version' => 'auto', 'relative' => true));
// Add html5 shiv
JHtml::_('script', 'jui/html5.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
// Add app.js
JHtml::_('script', 'app.js', array('version' => 'auto', 'relative' => true));
// Add Stylesheets
JHtml::_('stylesheet', 'template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.css', array('version' => 'auto', 'relative' => true));
// Load specific language related CSS
JHtml::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));
// Load custom.css
JHtml::_('stylesheet', 'custom.css', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'responsive.css', array('version' => 'auto', 'relative' => true));
/* + UNSET FLEXICONTENT STYLE
======================================================================*/
unset($this->_styleSheets[JURI::root( true ).'/administrator/modules/mod_adminmenumanager/css/isis2.css']);
unset($this->_styleSheets[JURI::root( true ).'/components/com_flexicontent/assets/css/tabber.css']);
unset($this->_styleSheets[JURI::root( true ).'/administrator/components/com_flexicontent/assets/css/flexicontentbackend.css']);
unset($this->_styleSheets[JURI::root( true ).'/administrator/components/com_flexicontent/assets/css/j3x.css']);
unset($this->_styleSheets[JURI::root( true ).'/components/com_flexicontent/assets/css/flexi_form_fields.css']);
unset($this->_styleSheets[JURI::root( true ).'/components/com_flexicontent/librairies/jquery/css/ui-lightness/jquery-ui-1.9.2.css']);
unset($this->_styleSheets[JURI::root( true ).'/components/com_flexicontent/librairies/prettyCheckable/dist/prettyCheckable.css']);
unset($this->_styleSheets[JURI::root( true ).'/components/com_flexicontent/librairies/select2/select2.css']);
//ADMIN MENU - doesn't work
unset($this->_styleSheets[JURI::root( true ).'/modules/mod_adminmenumanager/css/isis2.css']);
//QUICK ICONS - doesn't work
unset($this->_styleSheets[JURI::root( true ).'administrator/modules/mod_akquickicons/css/akquickicons.css']);
// Detecting Active Variables
$option = $input->get('option', '');
$view = $input->get('view', '');
$layout = $input->get('layout', '');
$task = $input->get('task', '');
$itemid = $input->get('Itemid', 0, 'int');
$sitename = htmlspecialchars($app->get('sitename', ''), ENT_QUOTES, 'UTF-8');
$cpanel = $option === 'com_cpanel';
$hidden = $app->input->get('hidemainmenu');
$showSubmenu = false;
$this->submenumodules = JModuleHelper::getModules('submenu');
foreach ($this->submenumodules as $submenumodule)
{
$output = JModuleHelper::renderModule($submenumodule);
if ($output !== '')
{
$showSubmenu = true;
break;
}
}
// Template Parameters
$displayHeader = $this->params->get('displayHeader', '1');
$statusFixed = $this->params->get('statusFixed', '1');
$stickyToolbar = $this->params->get('stickyToolbar', '1');
// Header classes
$navbar_color = $this->params->get('templateColor') ?: '';
$header_color = $displayHeader && $this->params->get('headerColor') ? $this->params->get('headerColor') : '';
$navbar_is_light = $navbar_color && colorIsLight($navbar_color);
$header_is_light = $header_color && colorIsLight($header_color);
if ($displayHeader)
{
// Logo file
if ($this->params->get('logoFile'))
{
$logo = JUri::root() . $this->params->get('logoFile');
}
else
{
$logo = $this->baseurl . '/templates/' . $this->template . '/images/logo' . ($header_is_light ? '-inverse' : '') . '.png';
}
}
function colorIsLight($color)
{
$r = hexdec(substr($color, 1, 2));
$g = hexdec(substr($color, 3, 2));
$b = hexdec(substr($color, 5, 2));
$yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
return $yiq >= 200;
}
// Pass some values to javascript
$offset = 20;
if ($displayHeader || !$statusFixed)
{
$offset = 30;
}
$stickyBar = 0;
if ($stickyToolbar)
{
$stickyBar = 'true';
}
// Template color
if ($navbar_color)
{
$this->addStyleDeclaration('
.navbar-inner,
.navbar-inverse .navbar-inner,
.dropdown-menu li > a:hover,
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover,
.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle,
#status.status-top {
background: ' . $navbar_color . ';
}');
}
// Template header color
if ($header_color)
{
$this->addStyleDeclaration('
.header {
background: ' . $header_color . ';
}');
}
// Sidebar background color
if ($this->params->get('sidebarColor'))
{
$this->addStyleDeclaration('
.nav-list > .active > a,
.nav-list > .active > a:hover {
background: ' . $this->params->get('sidebarColor') . ';
}');
}
// Link color
if ($this->params->get('linkColor'))
{
$this->addStyleDeclaration('
a,
.j-toggle-sidebar-button,
.cpanel a:hover, .cpanel a:focus,
.nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus,
.accordion-heading a, #flexicontent ul.tabbernav li.tabberactive a, #flexicontent ul.tabbernav li.tabberactive a:hover,
.nav-tabs > li > a:hover, .nav-tabs > li > a:focus, #flexicontent ul.tabbernav li:hover a, .contentpane.component #flexicontent .nav-tabs.nav-stacked > li > a {
color: ' . $this->params->get('linkColor') . ';
}');
$this->addStyleDeclaration('
.tabberactive *:not(:hover) > .fc-icon-gray:before {
color: ' . $this->params->get('linkColor') . '!important;
}');
$this->addStyleDeclaration('
.select2-drop-active, .select2-drop.select2-drop-above.select2-drop-active, .select2-container-active .select2-choice,
.select2-container-active .select2-choices, .select2-dropdown-open.select2-drop-above .select2-choice,
.select2-dropdown-open.select2-drop-above .select2-choices, .select2-container-multi.select2-container-active .select2-choices {
border-color: ' . $this->params->get('linkColor') . ';
}');
$this->addStyleDeclaration('
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus,
#flexicontent ul.tabbernav li.tabberactive a, #flexicontent ul.tabbernav li.tabberactive a:hover {
border-top-color: ' . $this->params->get('linkColor') . ';
}');
$this->addStyleDeclaration('
.btn-primary, .accordion-toggle:not(.collapsed), .contentpane.component #flexicontent .nav-tabs.nav-stacked > li > a:hover, .contentpane.component #flexicontent .nav-tabs.nav-stacked > li > a:focus {
background-color: ' . $this->params->get('linkColor') . ';
}');
}
if ($this->params->get('hoverColor'))
{
$this->addStyleDeclaration('
a:hover, a:focus, .j-toggle-sidebar-button:hover {
color: ' . $this->params->get('hoverColor') . ';
}');
$this->addStyleDeclaration('
.btn-primary:hover, .btn-primary:focus {
background-color: ' . $this->params->get('hoverColor') . ';
}');
}
//
if ($this->params->get('flexiColor'))
{
$this->addStyleDeclaration('
.aniColorBkg {
background: ' . $this->params->get('flexiColor') . ' !important;
}');
$this->addStyleDeclaration('
.ruler, .fcsep_level_h, .fcsep_level0, .fcsep_level2, .fcsep_level3, .com_cpanel div.well.well-small.span3 > h3.module-title.nav-header {
color: ' . $this->params->get('flexiColor') . ';
}');
}
//REMOVED FEATURED ITEMS
if ($this->params->get('featuredItems') == 0) {
$this->addStyleDeclaration('
.h_feat, .featured.btn {
display: none !important;
}');
}
//REMOVE TAGS
if ($this->params->get('flexiTags') == 0) {
$this->addStyleDeclaration('
.h_tags, .col_tag, #fc-toggle-tags_btn, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_12_label, #submenu li.flexi8 {
display: none !important;
}');
}
//HIDE AUTHOR FROM TABLE
if ($this->params->get('flexiAuthor') == 0) {
$this->addStyleDeclaration('
.h_author, #columnchoose_adminListTableFCitems_5_label, .col_authors {
display: none !important;
}');
}
//HIDE TEMPLATE EDITING
if ($this->params->get('flexiGlobalEdit') == 0) {
$this->addStyleDeclaration('
.adminlist td.col_edit_layout .fc-edit-layout-btn {
display: none !important;
}
th.col_edit_layout, td.col_edit_layout {
padding: 0;
}
');
}
//HIDE LANGUAGE
if ($this->params->get('flexiLang') == 0) {
$this->addStyleDeclaration('
.col_lang, .h_lang, .col_assoc, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_6_label, .com_flexicontent.view-category #tabset_cat_props_desc_tab > div > div.span4.col-4.full_width_980.off-white > div > div:nth-child(4) {
display: none !important;
}
');
}
//Hide Ratings
if ($this->params->get('flexiRatings') == 0) {
$this->addStyleDeclaration('
.col_ratings, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_17_label, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_17 {
display: none !important;
}
');
}
if ($this->params->get('flexiVotes') == 0) {
$this->addStyleDeclaration('
.col_votes, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_16_label, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_16 {
display: none !important;
}
');
}
//Hide Hits
if ($this->params->get('flexiHits') == 0) {
$this->addStyleDeclaration('
.col_hits, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_15_label, .com_flexicontent.view-items #columnchoose_adminListTableFCitems_18,
.com_flexicontent.view-item #fc_versions > tbody > tr:nth-child(3) {
display: none !important;
}
');
}
//Hide more button in item View
//if ($this->params->get('flexiMoreButton') == 0) {
// $this->addStyleDeclaration('
//.view-item #toolbar-action_btns_group, #toolbar-action_btns_group {
// display: none !important;
//}
//');
//}
//Hide keywords
if ($this->params->get('keywords') == 0) {
$this->addStyleDeclaration('
.hkey, #h-208, #jform_metakey-lbl, #jform_metakey {
display: none !important;
}
');
}
?>
<?php if ($this->params->get('loadCss')) : ?>
<style type="text/css">
<?php echo $this->params->get('loadCss');?>
</style>
<?php endif; ?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<jdoc:include type="head" />
</head>
<body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ' task-' . $task . ' itemid-' . $itemid; ?> <?php if ($this->params->get('amm_used') != '0') : ?><?php echo ' amm';?><?php endif; ?>" data-basepath="<?php echo JURI::root(true); ?>">
<!-- Top Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" id="top-menu">
<div class="navbar-inner">
<div class="container-fluid">
<?php if ($this->params->get('admin_menus') != '0') : ?>
<a href="#" class="btn btn-navbar collapsed vc-button" data-toggle="collapse" data-target=".nav-collapse">
<span class="element-invisible"><?php echo JTEXT::_('TPL_IAMR_TOGGLE_MENU'); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<?php endif; ?>
<!-- skip to content -->
<a class="element-invisible" href="#skiptarget"><?php echo JText::_('TPL_IAMR_SKIP_TO_MAIN_CONTENT'); ?></a>
<div class="row flex align-stretch">
<!--LOGO-->
<div class="span2 flex shrink align-self-stretch aniColorBkg">
<a class="admin-logo logo-box flex align-self-middle <?php echo ($hidden ? 'disabled' : ''); ?>" <?php echo ($hidden ? '' : 'href="' . $this->baseurl . '/index.php"'); ?>>
<img src="<?php echo $logo; ?>" alt="<?php echo $sitename;?>" class="logox" />
<div class="element-invisible">
<?php echo JText::_('TPL_IAMR_CONTROL_PANEL'); ?>
</div>
</a>
</div>
<!--LOGO-->
<!--MAIN NAV-->
<div class="span9 auto align-self-middle">
<div<?php echo ($this->params->get('admin_menus') != '0') ? ' class="nav-collapse collapse"' : ''; ?>>
<jdoc:include type="modules" name="menu" style="none" />
</div>
</div>
<div class="span1 shrink align-self-middle hidden-phone hidden-table" id="js-user-col">
<ul class="nav nav-user<?php echo ($this->direction == 'rtl') ? ' pull-left' : ' pull-right'; ?>">
<li class="dropdown">
<a class="<?php echo ($hidden ? ' disabled' : 'dropdown-toggle'); ?>" data-toggle="<?php echo ($hidden ? '' : 'dropdown'); ?>" <?php echo ($hidden ? '' : 'href="#"'); ?>><span class="icon-user"></span>
<span class="caret"></span>
<div class="element-invisible">
<?php echo JText::_('TPL_IAMR_USERMENU'); ?>
</div>
</a>
<ul class="dropdown-menu">
<?php if (!$hidden) : ?>
<li>
<span>
<span class="icon-user"></span>
<strong><?php echo $user->name; ?></strong>
</span>
</li>
<li class="divider"></li>
<li>
<a href="index.php?option=com_admin&task=profile.edit&id=<?php echo $user->id; ?>"><?php echo JText::_('TPL_IAMR_EDIT_ACCOUNT'); ?></a>
</li>
<li class="divider"></li>
<li class="">
<a href="<?php echo JRoute::_('index.php?option=com_login&task=logout&' . JSession::getFormToken() . '=1'); ?>"><?php echo JText::_('TPL_IAMR_LOGOUT'); ?></a>
</li>
<?php endif; ?>
</ul>
</li>
</ul>
<a class="brand visible-desktop visible-tablet" href="<?php echo $mainPageUri; ?>" title="<?php echo JText::sprintf('TPL_IAMR_PREVIEW', $sitename); ?>" target="_blank"><span class="icon-out-2 small"></span></a>
</div>
</div>
<!-- /Main Nav-->
</div>
</div>
</nav>
<?php if ($displayHeader) : ?>
<header class="header<?php echo $header_is_light ? ' header-inverse' : ''; ?>">
<div class="container-title">
<jdoc:include type="modules" name="title" />
</div>
</header>
<?php endif; ?>
<?php if (!$cpanel) : ?>
<!-- Subheader -->
<a class="btn btn-subhead" data-toggle="collapse" data-target=".subhead-collapse"><?php echo JText::_('TPL_IAMR_TOOLBAR'); ?>
<span class="icon-wrench"></span></a>
<div class="subhead-collapse collapse" id="isisJsData" data-tmpl-sticky="<?php echo $stickyBar; ?>" data-tmpl-offset="<?php echo $offset; ?>">
<div class="subhead">
<div class="container-fluid">
<div id="container-collapse" class="container-collapse"></div>
<div class="row-fluid">
<div class="span12">
<!-- target for skip to content link -->
<a id="skiptarget" class="element-invisible"><?php echo JText::_('TPL_IAMR_SKIP_TO_MAIN_CONTENT_HERE'); ?></a>
<jdoc:include type="modules" name="toolbar" style="no" />
</div>
</div>
</div>
</div>
</div>
<?php else : ?>
<div style="margin-bottom: 20px">
<!-- target for skip to content link -->
<a id="skiptarget" class="element-invisible"><?php echo JText::_('TPL_IAMR_SKIP_TO_MAIN_CONTENT_HERE'); ?></a>
</div>
<?php endif; ?>
<!-- container-fluid -->
<div class="container-fluid container-main">
<section id="content">
<!-- Begin Content -->
<jdoc:include type="modules" name="top" style="xhtml" />
<div class="row-fluid">
<?php if ($showSubmenu) : ?>
<div class="span2">
<jdoc:include type="modules" name="submenu" style="none" />
</div>
<div class="span10">
<?php else : ?>
<div class="span12">
<?php endif; ?>
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
</div>
<?php if ($this->countModules('bottom')) : ?>
<jdoc:include type="modules" name="bottom" style="xhtml" />
<?php endif; ?>
<!-- End Content -->
</section>
<?php if (!$this->countModules('status') || (!$statusFixed && $this->countModules('status'))) : ?>
<footer class="footer">
<p class="text-center">
<jdoc:include type="modules" name="footer" style="no" />
© <?php echo $sitename; ?> <?php echo date('Y'); ?></p>
</footer>
<?php endif; ?>
</div>
<?php if ($statusFixed && $this->countModules('status')) : ?>
<!-- Begin Status Module -->
<div id="status" class="navbar navbar-fixed-bottom hidden-phone">
<div class="btn-toolbar">
<div class="btn-group pull-right">
<p>
<jdoc:include type="modules" name="footer" style="no" />
© <?php echo date('Y'); ?> <?php echo $sitename; ?>
</p>
</div>
<jdoc:include type="modules" name="status" style="no" />
</div>
</div>
<!-- End Status Module -->
<?php endif; ?>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>