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

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 $helperBuildProductUrl = new Default_View_Helper_BuildProductUrl();
0024 $helperImage = new Default_View_Helper_Image();
0025 $helperServerUrl = new Zend_View_Helper_ServerUrl();
0026 $helperCheckHTTPProtocol = new Default_View_Helper_CheckHttpProtocol();
0027 
0028 $plingUrl = $helperBuildProductUrl->buildProductUrl($this->product->project_id, 'pling');
0029 $titleImage = $helperImage->Image($this->product->image_big, array('width' => 1170, 'height' => 300));
0030 $styleAttr = ' style="background-image: url(' . $titleImage . ');"';
0031 if (strpos($titleImage, 'default.png') !== false) {
0032     $styleAttr = '';
0033 }
0034 $cssClassAuthCodeTested = $this->product->project_validated ? 'checked' : 'unchecked';
0035 $txtUserFollows = $this->txtUserFollows;
0036 $urlUserFollows = $this->urlUserFollows;
0037 $imgFile = $this->imgFile;
0038 $loginUrl = $this->loginUrl;
0039 ?>
0040 
0041 <div id="fb-root"></div>
0042 <script>(function (d, s, id) {
0043         var js, fjs = d.getElementsByTagName(s)[0];
0044         if (d.getElementById(id)) return;
0045         js = d.createElement(s);
0046         js.id = id;
0047         js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=330711210429982&version=v2.0";
0048         fjs.parentNode.insertBefore(js, fjs);
0049     }(document, 'script', 'facebook-jssdk'));</script>
0050 
0051 <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
0052 
0053 <!-- Loading Flat UI -->
0054 <link href="<?= $helperServerUrl->serverUrl(); ?>/theme/flatui/css/flat-ui.css" rel="stylesheet">
0055 
0056 <!-- custom styles -->
0057 <!-- <link href="<?= $helperServerUrl->serverUrl(); ?>/theme/flatui/css/style.css" rel="stylesheet"> -->
0058 
0059 <!-- less css -->
0060 <link href="<?= $helperServerUrl->serverUrl(); ?>/theme/flatui/css/stylesheet.css" rel="stylesheet" type="text/css">
0061 
0062 <style type="text/css">
0063     body {
0064         background-color: transparent !important;
0065         padding: 0;
0066         text-align: center;
0067     }
0068 </style>
0069 
0070 <section id="product-payment-message">
0071     <button id="btn-close" class="btn-close"><span class="glyphicon glyphicon-remove"></span></button>
0072     <figure>
0073         <img
0074                 src="<?= $helperImage->Image($this->product->image_small, array('width' => 240, 'height' => 240)); ?>" style="max-width: 240px; max-height:240px"/>
0075    
0076     </figure>
0077     <h1><?= $this->product->title; ?></h1>
0078  
0079     <div class="info">
0080         <div class="category"><?= $this->product->cat_title; ?></div>
0081      <?php /* <div class="page-views"><?= $this->product_views ?> page views</div> */ ?>
0082     </div>
0083     <div class="payment-message">
0084         <?php if (isset($this->paymentMessage)) {
0085             $cssClass = 'text-' . $this->paymentStatus;
0086             ?>
0087             <span class="<?= $cssClass ?>"><?= $this->paymentMessage ?></span>
0088         <?php } ?>
0089     </div>
0090     <div style="padding-top: 20px; float:left">
0091         Thank you for supporting <?= $this->product->title; ?> , show your support to your friends on 
0092     </div>
0093     <div class="social-share">
0094 
0095         <div class="facebook social left">
0096             <a class="partial-popup"
0097                rel="nofollow"
0098                target="_blank"
0099                href="http://www.facebook.com/sharer.php?p[title]=test&u=<?= urlencode($this->permaLink) ?>&t=<?php echo urlencode('ocs - open content store'); ?>"
0100                title="Share this post on Facebook"><em class="icon icon-facebook"></em>
0101             </a>
0102         </div>
0103         <div class="twitter social left">
0104             <a class="partial-popup"
0105                rel="nofollow"
0106                target="_blank"
0107                href="http://twitter.com/home?status=i support <?php echo $this->product->title; ?> made by <?php echo $this->product->username; ?>: <?= $this->permaLink; ?>"
0108                title="Share this article with your Twitter followers"><em class="icon icon-twitter"></em>
0109             </a>
0110         </div>
0111 
0112         <?php if (false === empty($this->product->link_1) OR $this->product->facebook_code OR $this->product->twitter_code OR $this->product->google_code) : ?>
0113             <div class="pull-left">
0114                 <span>Links:</span>
0115             </div>
0116             <div class="product-link">
0117                 <?php if (false === empty($this->product->link_1)) : ?>
0118                     <a href="<?= $helperCheckHTTPProtocol->checkHttpProtocol($this->product->link_1) ?>" target="_blank"
0119                        class="web-link white" title="<?= $this->product->link_1 ?>">
0120                         <span class="glyphicon glyphicon-globe"></span>
0121                     </a>
0122                 <?php endif;
0123                 if ($this->product->facebook_code) : ?>
0124                     <a href="<?= $this->product->facebook_code ?>" class="fb-link lightblue" target="_blank"
0125                        title="<?= $this->product->facebook_code ?>"><em></em></a>
0126                 <?php endif;
0127                 if ($this->product->twitter_code) : ?>
0128                     <a href="<?= $this->product->twitter_code ?>" class="tw-link lightblue" target="_blank"
0129                        title="<?= $this->product->twitter_code ?>"><em></em></a>
0130                 <?php endif;
0131                 if ($this->product->google_code) : ?>
0132                     <a href="<?= $this->product->google_code ?>" class="gp-link lightblue" target="_blank"
0133                        title="<?= $this->product->google_code ?>"><em></em></a>
0134                 <?php endif; ?>
0135             </div>
0136         <?php endif; ?>
0137     </div>
0138     <!--
0139     <div class="close-modal margin-top-10">
0140         <button class="btn btn-primary btn-close">Close</button>
0141     </div>
0142     -->
0143 </section>
0144 
0145 <script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
0146 <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
0147 
0148 <script>
0149     $(document).ready(function () {
0150         $('.btn-close').on('click', function () {
0151             window.top.location.href = "<?php echo $this->permaLink ?>";
0152             //window.top.location.reload();
0153             if (top && top.opener && top.opener.top) {
0154                 try {
0155                     dgFlow = top.opener.top.dgFlow;
0156                     dgFlow.closeFlow();
0157                 } finally {
0158                     top.close();
0159                 }
0160             } else if (top.dgFlow) {
0161                 dgFlow = top.dgFlow;
0162                 dgFlow.closeFlow();
0163             } else {
0164                 alert('Please close the window and reload to continue');
0165             }
0166 
0167         });
0168     });
0169 </script>