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

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  * Created: 31.05.2017
0023  */
0024 $modelInfo = new Default_Model_Info();
0025 $countActiveMembers = $modelInfo->countTotalActiveMembers();
0026 $modelInfo= new Default_Model_Info();
0027 $filter = new Local_Filter_Url_Encrypt();
0028 $thisurl = "/";
0029 if(isset($_GET['url'])) {
0030     $thisurl = $_GET['url'];
0031 }else
0032 {
0033    $thisurl= Zend_Controller_Front::getInstance()->getRequest()->getScheme() . '://' . Zend_Controller_Front::getInstance()->getRequest()->getHttpHost().$_SERVER["REQUEST_URI"];
0034 }
0035 
0036 
0037 $url_login = "/login/redirect/".$filter->filter($thisurl);
0038 
0039 ?>
0040 <link href="/theme/flatui/css/support.css" rel="stylesheet">
0041 
0042 <main>
0043     <section class="wrapper" id="products-wrapper">
0044         <form class="donation-form" id="new_donation" action="<?= $this->urlPay ?>" accept-charset="UTF-8" data-remote="true" method="post">  
0045                 <input type="hidden" id="currency-symbol" value="$">
0046                 <input type="hidden" name="provider" value="paypal" id="provider">
0047         <div class="container-fluid">
0048             <div class="row">
0049                 <div class="sidebar-left col-md-2"></div>
0050                 
0051    
0052                 <div class="content col-md-8">
0053                     <h2>Become a Supporter</h2>
0054                     <p>Your donation helps support the <b> <?=$countActiveMembers?></b> creators of the platform (see <a href="/faq-pling">pling FAQ</a>).
0055                     </p>
0056                     <div class="x-donation-widget">
0057                          <div class="row disply-flex">
0058                             <div class="col-lg-2" style="padding-left: 15px;">        
0059                                <div class="x-tabs-header " style="padding: 0 40px;text-align:right;">
0060                                   <div class="header-content">                                                                                     
0061                                      Select Tier
0062                                  
0063                                   </div>
0064                                 </div>                                          
0065                             </div>    
0066                             <div class="col-lg-4 col-md-4" >        
0067                                 <div class="x-tabs-header " style="padding: 0 40px;text-align:right;">
0068                                   <div class="header-content">                                                                                     
0069                                      Amount Monthly
0070                                  
0071                                   </div>
0072                                 </div>                                                  
0073                             </div>                        
0074 
0075                            
0076                             <div class="col-lg-4 col-md-4" style="">
0077                             <div class="x-tabs-header ">
0078                               <div class="header-content">                                                
0079                                   Payment 
0080                                  <br><span style="font-size: small;" class="extrasmall">(can be cancelled at any time before next year)</span>
0081                               </div>
0082                             </div>                                                                                     
0083                             </div>
0084                              
0085                             <div class="col-lg-2 col-md-2 " style="padding-right: 15px;">
0086                             <div class="x-tabs-header ">
0087                               <div class="header-content" style="text-align:right;padding-right:15px;">                                                
0088                                  <?php /*Supporters*/?>
0089                               </div>
0090                             </div>                                                                                     
0091                             </div>
0092                             
0093                         </div> <!--end of row-->
0094                         <div class="row disply-flex" style="border-bottom: dotted thin #E7E7E7 !important;">
0095 
0096                             <div class="col-lg-2" style="padding-left: 15px;">        
0097                                                                             
0098                                       <div class="radiocontainer">
0099                                       <input class="suggested-amount mdl-radio__button" <?=$this->payment_options['Option5']['checked']?> id="sam-15" type="radio" value="<?=$this->payment_options['Option5']['name']?>" name="amount_predefined"/>
0100                                     </div>
0101                                                                         
0102                             </div>    
0103 
0104                             <div class="col-lg-4 col-md-4">  
0105                             <?php
0106                                 echo $this->partial('/subscription/partials/tier.phtml',
0107                                         array('tier' => '0.99'));
0108                             ?>
0109                             </div>
0110                           
0111                             <div class="col-lg-4 col-md-4">  
0112                                 <?php
0113                                 echo $this->partial('/subscription/partials/option.phtml',
0114                                         $this->payment_options['Option5']
0115                                 );
0116                             ?>                                    
0117                             </div>
0118                             <div class="col-lg-2 text-right" >
0119                                 <ul class="x-suggested-amounts">
0120                                 <li class="amount-item">       
0121                                       <div class="item-text">          
0122                                         <span class="amount" > 
0123                                             <?php /*<?php echo $modelInfo->getCountTierSupporters(0.99);?></span> */?>
0124                                       </div>    
0125                                 </li>
0126                                 </ul>
0127                                
0128                             </div>
0129                         </div> <!--end of row-->
0130 
0131                         <div class="row disply-flex" style="border-bottom: dotted thin #E7E7E7 !important;">
0132 
0133                             <div class="col-lg-2" style="padding-left: 15px;">        
0134                                                                                              
0135                                     <div class="radiocontainer">
0136                                       <input class="suggested-amount mdl-radio__button" <?=$this->payment_options['Option6']['checked']?> id="sam-15" type="radio" value="<?=$this->payment_options['Option6']['name']?>" name="amount_predefined"/>
0137                                     </div>
0138                                                                        
0139                             </div>  
0140 
0141                             <div class="col-lg-4 col-md-4">  
0142                                 <?php
0143                                 echo $this->partial('/subscription/partials/tier.phtml',
0144                                         array('tier' => '2'));
0145                                 ?>
0146                             </div>
0147                            
0148                             <div class="col-lg-4 col-md-4">  
0149                                 <?php
0150                                 echo $this->partial('/subscription/partials/option.phtml',
0151                                         $this->payment_options['Option6']
0152                                 );
0153                             ?>                                    
0154                             </div>
0155                             
0156                             <div class="col-lg-2 text-right">
0157                                 <ul class="x-suggested-amounts">
0158                                 <li class="amount-item">       
0159                                       <div class="item-text">          
0160                                         <span class="amount"> 
0161                                             <?php /*<?php echo $modelInfo->getCountTierSupporters(2);?></span>  */?>     
0162                                       </div>    
0163                                 </li>
0164                                 </ul>
0165                                
0166                             </div>
0167                             
0168                         </div> <!--end of row-->
0169                             
0170                         <div class="row disply-flex" style="border-bottom: dotted thin #E7E7E7 !important;">
0171 
0172 
0173                             <div class="col-lg-2" style="padding-left: 15px;">        
0174                                                                                                                    
0175                                       <div class="radiocontainer">
0176                                       <input class="suggested-amount mdl-radio__button" <?=$this->payment_options['Option8']['checked']?> id="sam-15" type="radio" value="<?=$this->payment_options['Option8']['name']?>" name="amount_predefined"/>
0177                                     </div>
0178                                  
0179                                                                      
0180                             </div>  
0181 
0182                             <div class="col-lg-4 col-md-4">  
0183                             <?php
0184                                 echo $this->partial('/subscription/partials/tier.phtml',
0185                                         array('tier' => '5'));
0186                             ?>
0187                             </div>
0188                             
0189                             <div class="col-lg-4 col-md-4">  
0190                                
0191                                  <?php
0192                                 echo $this->partial('/subscription/partials/option.phtml',
0193                                         $this->payment_options['Option8']
0194                                 );
0195                                  ?>                                                                    
0196                                                                
0197                             </div>
0198                             <div class="col-lg-2 text-right">
0199                                 <ul class="x-suggested-amounts">
0200                                 <li class="amount-item">       
0201                                       <div class="item-text">          
0202                                         <span class="amount"> 
0203                                             <?php /*<?php echo $modelInfo->getCountTierSupporters(5);?></span> */?>      
0204                                       </div>    
0205                                 </li>
0206                                 </ul>
0207                             </div>
0208                         </div> <!--end of row-->
0209 
0210                         <div class="row disply-flex" style="border-bottom: dotted thin #E7E7E7 !important;">
0211 
0212                             <div class="col-lg-2" style="padding-left: 15px;">        
0213                                                                                                                    
0214                                       <div class="radiocontainer">
0215                                       <input class="suggested-amount mdl-radio__button" <?=$this->payment_options['Option9']['checked']?> id="sam-15" type="radio" value="<?=$this->payment_options['Option9']['name']?>" name="amount_predefined"/>
0216                                     </div>
0217                                                                       
0218                             </div>  
0219 
0220                             <div class="col-lg-4 col-md-4">  
0221                                 <?php
0222                                 echo $this->partial('/subscription/partials/tier.phtml',
0223                                         array('tier' => '10'));
0224                             ?>
0225                             </div>
0226                            
0227 
0228                             <div class="col-lg-4 col-md-4">  
0229                                
0230                                  <?php
0231                                 echo $this->partial('/subscription/partials/option.phtml',
0232                                         $this->payment_options['Option9']
0233                                 );
0234                                  ?>                                                                    
0235                                                                
0236                             </div>
0237 
0238                            
0239                              <div class="col-lg-2 text-right">
0240                                 <ul class="x-suggested-amounts">
0241                                 <li class="amount-item">       
0242                                       <div class="item-text">          
0243                                         <span class="amount"> 
0244                                             <?php /*<?php echo $modelInfo->getCountTierSupporters(10);?></span>*/?>       
0245                                       </div>    
0246                                 </li>
0247                                 </ul>
0248                                
0249                             </div>
0250                         </div> <!--end of row-->
0251 
0252                         
0253 
0254                         <div class="row disply-flex" style="border-bottom: dotted thin #E7E7E7 !important;">
0255 
0256                             <div class="col-lg-2" style="padding-left: 15px;">      
0257 
0258                                     <div class="radiocontainer">
0259                                       <input class="suggested-amount custom_amount_item" <?=$this->checked?> id="custom_amount_item" type="radio" value="Option7" name="amount_predefined">
0260                                     </div>                        
0261                             </div>  
0262                             <div class="col-lg-4 col-md-4">  
0263                                 
0264                             </div>
0265                                                    
0266 
0267                             <div class="col-lg-4 col-md-4">  
0268 
0269                                  <ul class="x-suggested-amounts">
0270                                 <li class="amount-item <?=(isset($this->islast) ? 'last':'')?>">  
0271                                     
0272                                       <div class="item-text">
0273                                         <span class="unit-wrapper">
0274                                           <span class="unit">$</span>
0275                                         </span>
0276                                         <span class="amount"><input id="custom_amount" min="15.01" step="any" inputmode="numeric" type="number" name="amount_handish"> </span>
0277                                         <span class="desc">Enter a free amount > $15</span>
0278                                       </div>
0279                                     
0280                                 </li>
0281                                 </ul>
0282                                                                
0283                             </div>
0284                             
0285                         </div> <!--end of row-->
0286             
0287                         <div class="row disply-flex" style="border-bottom: dotted thin #E7E7E7 !important;">
0288                               <div class="col-lg-12 col-md-12">  
0289                                 <div class="tabs-footer">
0290                                     <?php if (Zend_Auth::getInstance()->hasIdentity()) {?>
0291                                   <button type="submit" class="dw-btn mdl-button mdl-js-button mdl-js-ripple-effect step-3 basic-color-background" data-upgraded=",MaterialButton,MaterialRipple">
0292                                     <span class="donate" id="linkButton">
0293                                       <span class="amount">
0294                                         <span isolate="">Donate via PayPal</span>
0295                                       </span>
0296                                     </span>
0297                                     </button>
0298                                      <?php }else{
0299                                         echo "<a href='".$url_login."'>Please login to donate</a>";
0300                                     }?>
0301                                 </div>
0302                                     </div>
0303                         </div> <!--end of row-->
0304                     </div> <!--end of tabs-->
0305                     
0306                     
0307                 </div> <!--end of content-->
0308                 <div class="sidebar-right col-md-2"></div>
0309                 
0310             </div>
0311             
0312         </div>
0313          </form>
0314     </section>
0315 </main>
0316 
0317 <script>
0318     $(document).ready(function(){
0319         $("#custom_amount").click(function(){
0320             $('.mdl-radio__button').removeAttr('checked');
0321             $('#custom_amount_item').prop("checked", true);            
0322         });      
0323 
0324     });
0325 </script>