File indexing completed on 2025-05-04 05:29:15

0001 <?php
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 ?>
0023 <!DOCTYPE html>
0024 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
0025 <head>
0026     <?= $this->render('partials/htmlheader.phtml'); ?>
0027 </head>
0028 <body id="od-body">
0029 <?php echo $this->render('partials/header/template.phtml'); ?>
0030 
0031 <div id="main">
0032     <?= $this->layout()->content; ?>
0033 </div>
0034 
0035 <?php echo $this->render('partials/footer/template.phtml'); ?>
0036 
0037 <?php if (APPLICATION_ENV != 'development') { ?>
0038     <?php
0039     $googleid ='UA-78422931-1';
0040     $domainconfig = Zend_Registry::isRegistered('store_config') ? Zend_Registry::get('store_config') : null;
0041     if($domainconfig)
0042     {
0043         $googleid = $domainconfig->google_id;
0044     }
0045     ?>
0046     <script>
0047         (function (i, s, o, g, r, a, m) {
0048             i['GoogleAnalyticsObject'] = r;
0049             i[r] = i[r] || function () {
0050                     (i[r].q = i[r].q || []).push(arguments)
0051                 }, i[r].l = 1 * new Date();
0052             a = s.createElement(o),
0053                 m = s.getElementsByTagName(o)[0];
0054             a.async = 1;
0055             a.src = g;
0056             m.parentNode.insertBefore(a, m)
0057         })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
0058 
0059         ga('create', '<?php echo $googleid ?>', 'auto');
0060         ga('send', 'pageview');
0061 
0062     </script>
0063 
0064     <!-- Piwik -->
0065     <?php
0066     $piwikid ='1';
0067     if($domainconfig)
0068     {
0069         $piwikid = $domainconfig->piwik_id;
0070     }
0071     ?>
0072     <script type="text/javascript">
0073       var _paq = _paq || [];
0074       /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
0075       _paq.push(['trackPageView']);
0076       _paq.push(['enableLinkTracking']);
0077       (function() {
0078         var u="//piwik.opendesktop.org/";
0079         _paq.push(['setTrackerUrl', u+'piwik.php']);
0080         _paq.push(['setSiteId', '<?= $piwikid ?>']);
0081         var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
0082         g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
0083       })();
0084     </script>
0085     <!-- End Piwik Code -->
0086 <?php } ?>
0087 
0088 <?php
0089 $session = new Zend_Session_Namespace();
0090 $apiv4 = Zend_Registry::get("config")->settings->server->ip->api->v4;
0091 $apiv6 = Zend_Registry::get("config")->settings->server->ip->api->v6;
0092 if (false == $session->stat_valid) : ?>
0093     <script src="/theme/flatui/js/script.js?<?= APPLICATION_VERSION ?>"></script>
0094     <script src="/tools/fpjs2/fp2.compressed.js" ></script>
0095     <script type="text/javascript">OcsStats.readStats('<?php echo $apiv4; ?>','<?php echo $apiv6; ?>');</script>
0096 <?php endif; ?>
0097 </body>
0098 </html>