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

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 $this->tab = 'plings';
0024 $this->countDownloadsOverall = 0;
0025 
0026 $modelDownload = new Default_Model_StatDownload();
0027 $this->downloads = $modelDownload->getUserDownloads($this->member->member_id);
0028 $this->countDownloadsOverall = count($this->downloads);
0029 ?>
0030 <main class="user-admin-page">
0031     <?php echo $this->render('user/partials/userHeader_top.phtml'); ?>
0032     <section class="body-wrap">
0033         <section class="wrapper product-page">
0034             <!-- PAGE BODY -->
0035             <section class="my-products-page">
0036                 <!-- NAVIGATION -->
0037                 <?php echo $this->render('user/partials/userHeader.phtml'); ?>
0038                 <!-- /NAVIGATION -->
0039                 <div class="my-products-heading">
0040                     <h1 class="page-title left"><?= $this->translate('Payout') ?></h1>
0041                 <?php
0042                     $member = $this->view_member;
0043                     if($member->pling_excluded == 1) {
0044                         echo "<br><br><br><h1 style='color: red; '>This account has been excluded from receiving plings, due to various misuses.</h1>";
0045                     }
0046                 ?>
0047                 </div>
0048                 <section>
0049                 <?php
0050                     $member = $this->view_member;
0051                     if($member->paypal_valid_status > 100) {
0052                         $status = $this->paypal_valid_status;
0053                         if($status->color == 'red') {
0054                             echo '<div class="alert alert-danger" role="alert">'.$status->description.'</div>';
0055                         }
0056                         if($status->color == 'yellow') {
0057                             echo '<div class="alert alert-warning" role="alert">'.$status->description.'</div>';
0058                         }
0059                         if($status->color == 'blue') {
0060                             echo '<div class="alert alert-info" role="alert">'.$status->description.'</div>';
0061                         }
0062                         if($status->color == 'green') {
0063                             echo '<div class="alert alert-success" role="alert">'.$status->description.'</div>';
0064                         }
0065                     }
0066                 ?>
0067                 </section>
0068                 
0069                 <?php
0070                     if($member->pling_excluded == 0 || (Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin')) {        
0071                 ?>  
0072                 <div class="my-products-list" id="my-payout-list">
0073                     <?php
0074                     //if ($this->countDownloadsOverall > 0) {
0075                     echo $this->render('user/partials/loopPlingsOld.phtml');
0076                     //} else {
0077                     //    echo '<div class="well well-sm" role="alert">You have no downloads and no plings.</div>';
0078                     //}
0079                     ?>
0080                 </div>
0081                 <?php
0082                     }
0083                 ?>
0084             </section>
0085             <!-- /PAGE BODY -->
0086         </section>
0087     </section>
0088 </main>