File indexing completed on 2024-12-29 05:24:40

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 <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
0041 
0042 <!-- Loading Flat UI -->
0043 <link href="<?= $helperServerUrl->serverUrl(); ?>/theme/flatui/css/flat-ui.css" rel="stylesheet">
0044 
0045 <!-- custom styles -->
0046 <!-- <link href="<?= $helperServerUrl->serverUrl(); ?>/theme/flatui/css/style.css" rel="stylesheet"> -->
0047 
0048 <!-- less css -->
0049 <link href="<?= $helperServerUrl->serverUrl(); ?>/theme/flatui/css/stylesheet.css" rel="stylesheet" type="text/css">
0050 
0051 <style type="text/css">
0052     body {
0053         background-color: transparent !important;
0054         padding: 0;
0055         text-align: center;
0056     }
0057 </style>
0058 
0059 <section id="product-payment-message">
0060     <button id="btn-close" class="btn-close"><span class="glyphicon glyphicon-remove"></span></button>
0061     <figure>
0062         <img
0063                 src="<?= $helperImage->Image($this->product->image_small, array('width' => 240, 'height' => 240)); ?>" style="max-width: 240px; max-height:240px"/>
0064     </figure>
0065     <h1><?= $this->product->title; ?></h1>
0066 
0067     <div class="info">
0068         <div class="category"><?= $this->product->cat_title; ?></div>
0069         <?php /*<div class="page-views"><?= $this->product_views ?> page views</div> */ ?>
0070     </div>
0071     <div class="payment-message">
0072         <?php if (isset($this->paymentMessage)) {
0073             $cssClass = 'text-' . $this->paymentStatus;
0074             ?>
0075             <span class="<?= $cssClass ?>"><?= $this->paymentMessage ?></span>
0076         <?php } ?>
0077     </div>
0078     <div style="padding-top: 20px; float:left">
0079         Thank you for supporting <?= $this->product->title; ?> , show your support to your friends on 
0080     </div>
0081     <div class="social-share">
0082         <div class="row">
0083             <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
0084                 <div class="facebook social left">
0085                     <a class="partial-popup"
0086                        rel="nofollow"
0087                        target="_blank"
0088                        href="http://www.facebook.com/sharer.php?u=<?= urlencode($this->permaLink) ?>&t=<?php echo urlencode('ocs - open content store'); ?>"
0089                        title="Share this post on Facebook"><em class="icon icon-facebook"></em>
0090                     </a>
0091                 </div>
0092                 <div class="twitter social left">
0093                     <a class="partial-popup"
0094                        rel="nofollow"
0095                        target="_blank"
0096                        href="http://twitter.com/home?status=i support <?php echo urlencode($this->product->title); ?> made by <?php echo urlencode($this->product->username); ?> : <?= $this->permaLink; ?>"
0097                        title="Share this article with your Twitter followers"><em class="icon icon-twitter"></em>
0098                     </a>
0099                 </div>
0100             </div>
0101             <?php if (false === empty($this->product->link_1) OR $this->product->facebook_code OR $this->product->twitter_code OR $this->product->google_code) : ?>
0102                 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
0103                     <div class="pull-left">
0104                         <span>Links:</span>
0105                     </div>
0106                     <div class="product-link">
0107                         <?php if (false === empty($this->product->link_1)) : ?>
0108                             <a href="<?= $helperCheckHTTPProtocol->checkHttpProtocol($this->product->link_1) ?>"
0109                                target="_blank"
0110                                class="web-link white" title="<?= $this->product->link_1 ?>">
0111                                 <span class="glyphicon glyphicon-globe"></span>
0112                             </a>
0113                         <?php endif;
0114                         if ($this->product->facebook_code) : ?>
0115                             <a href="<?= $this->product->facebook_code ?>" class="fb-link lightblue" target="_blank"
0116                                title="<?= $this->product->facebook_code ?>"><em></em></a>
0117                         <?php endif;
0118                         if ($this->product->twitter_code) : ?>
0119                             <a href="<?= $this->product->twitter_code ?>" class="tw-link lightblue" target="_blank"
0120                                title="<?= $this->product->twitter_code ?>"><em></em></a>
0121                         <?php endif;
0122                         if ($this->product->google_code) : ?>
0123                             <a href="<?= $this->product->google_code ?>" class="gp-link lightblue" target="_blank"
0124                                title="<?= $this->product->google_code ?>"><em></em></a>
0125                         <?php endif; ?>
0126                     </div>
0127                 </div>
0128             <?php endif; ?>
0129         </div>
0130     </div>
0131     <!--
0132     <div class="close-modal margin-top-10">
0133         <button class="btn btn-primary btn-close">Close</button>
0134     </div>
0135     -->
0136 </section>
0137 
0138 <script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
0139 <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
0140 
0141 <script>
0142     $(document).ready(function () {
0143         $('.btn-close').on('click', function () {
0144             window.top.location.href = "<?php echo $this->permaLink ?>";
0145             //window.top.location.reload();
0146             if (top && top.opener && top.opener.top) {
0147                 try {
0148                     dgFlow = top.opener.top.dgFlow;
0149                     dgFlow.closeFlow();
0150                 } finally {
0151                     top.close();
0152                 }
0153             } else if (top.dgFlow) {
0154                 dgFlow = top.dgFlow;
0155                 dgFlow.closeFlow();
0156             } else {
0157                 alert('Please close the window and reload to continue');
0158             }
0159 
0160         });
0161     });
0162 </script>
0163