File indexing completed on 2024-06-23 05:51:20

0001 <?php
0002 
0003 /**
0004  *  ocs-webserver
0005  *
0006  *  Copyright 2016 by pling GmbH.
0007  *
0008  *    This file is part of ocs-webserver.
0009  *
0010  *    This program is free software: you can redistribute it and/or modify
0011  *    it under the terms of the GNU Affero General Public License as
0012  *    published by the Free Software Foundation, either version 3 of the
0013  *    License, or (at your option) any later version.
0014  *
0015  *    This program is distributed in the hope that it will be useful,
0016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018  *    GNU Affero General Public License for more details.
0019  *
0020  *    You should have received a copy of the GNU Affero General Public License
0021  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0022  **/
0023 
0024 $this->tab = 'payout-member';
0025 echo $this->render('statistics/headerTabs.phtml');
0026 
0027 $m = new Default_Model_DbTable_ProjectPlings();
0028 $plings = $m->getAllPlingListReceived();
0029 $plingsGiven = $m->getAllPlingListGiveout();
0030 
0031 foreach ($plings as &$x) {
0032         $x['plingsGive'] = '';
0033         foreach ($plingsGiven as $t) {
0034                 if($t['member_id'] ===$x['member_id'])
0035                 {
0036                         $x['plingsGive'] = $t['plings'];
0037                         break;
0038                 }
0039         }
0040 }
0041 
0042 
0043 ?>
0044 <style>
0045         .rowContainer
0046         {
0047                 display: flex;
0048                 clear: both;
0049         }
0050         .memberPlingList
0051         {
0052                 width: 450px;
0053                 margin-left:20px;
0054                 max-height: 300px;
0055                 overflow: auto;
0056         }
0057         .memberPlingList ul{
0058                 list-style: none;                
0059         }
0060         .memberPlingList ul li {
0061                 border-bottom: 1px solid #ccc;
0062         }
0063         .memberPlingList ul li span.header{
0064                 font-weight: bold;
0065         }
0066         .memberPlingList ul li span.title{
0067                 width: 150px;
0068                 display: inline-block;
0069         }
0070         .memberPlingList ul li span.value{
0071                 width: 100px;
0072                 display: inline-block;
0073                 text-align: right;
0074         }
0075 </style>
0076 <h3>Statistics: Payout Member</h3>
0077 <div id="payoutTab" class="tab-pane">
0078         <div style="width: 1500px; display: block;float: left">
0079                 <div id="payoutyear" style="display: block; float: left; padding-right: 20px" class="d3linepath"></div>
0080                 <div class="rowContainer">
0081                 <div id="pie" style="clear:left;padding:50px; display:block;  "></div>
0082                 <div class="memberPlingList">
0083                         <?php                                
0084                                 echo "<ul><li><span class='title header'>Username</span><span class='value header'>Plings Received</span><span class='value header'>Plings Give out</span></li>";
0085                                 $cnt = 0;
0086                                                                                              
0087                                 foreach ($plings as $p) {
0088                                         echo '<li><span class="title">'.$p['username'].'_'.$p['member_id']
0089                                                 .'</span><span class="value">'.$p['plings']
0090                                                 .'</span><span class="value">'.$p['plingsGive'].'</span></li>';
0091                                 }
0092                                 echo "</ul>";
0093                         ?>
0094                 </div>
0095                 </div>
0096         </div>
0097         <div>
0098                 <div style="display: block; float: left; clear:left" id="detailContainer"></div>
0099         </div>
0100 </div>
0101 <script type="text/javascript">
0102         $(document).ready(function() {
0103                 $.getScript("/theme/flatui/js/stati/payoutyear.js");
0104                 $.getScript("/theme/flatui/js/stati/memberPayout.js");
0105         });
0106 </script>