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 $helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl(); 0024 $helperImage = new Default_View_Helper_Image(); 0025 $helpTruncate = new Default_View_Helper_Truncate(); 0026 0027 $this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA); 0028 0029 $desc= isset($this->mainProject->description) ? nl2br(strip_tags($this->mainProject->description)): $this->member->username; 0030 $this->headMeta()->setName('description', 0031 $helpTruncate->truncate($desc, 200, '...', false, true)); 0032 $this->headMeta()->setName('title', 0033 $this->member->username . ' - ' . $_SERVER['HTTP_HOST']); 0034 0035 $this->headMeta()->appendProperty('og:url', $helperBuildMemberUrl->buildMemberUrl($this->member->username)); 0036 $this->headMeta()->appendProperty('og:type', 'website'); 0037 $this->headMeta()->appendProperty('og:title', $this->member->username); 0038 $this->headMeta()->appendProperty('og:description', 0039 $helpTruncate->truncate($desc, 200, '...', false, true)); 0040 $this->headMeta()->appendProperty('og:image', 0041 $helperImage->Image($this->member->profile_image_url,array('width' => 110, 'height' => 110, 'crop' => 2))); 0042 0043 $helperLastLogin = new Default_View_Helper_FetchLastLoginData(); 0044 $lastLoginData = $helperLastLogin->fetchLastLoginData($this->member->member_id); 0045 0046 $helperFetchMainCategories = new Default_View_Helper_FetchMainCategories(); 0047 $helperRatingWidget = new Default_View_Helper_PrintRatingWidget(); 0048 $categories = $helperFetchMainCategories->fetchMainCategories(); 0049 $helperAddDefaultScheme = new Default_View_Helper_AddDefaultScheme(); 0050 $helperBuildProductUrl = new Default_View_Helper_BuildProductUrl(); 0051 $helperTruncate = new Default_View_Helper_Truncate(); 0052 $helperImage = new Default_View_Helper_Image(); 0053 $helperPrintDate = new Default_View_Helper_PrintDate(); 0054 $textCountryCity = $this->member->city; 0055 $textCountryCity .= $this->member->country ? ', ' . $this->member->country : ''; 0056 $helperMemberScore = new Default_View_Helper_FetchMemberScore(); 0057 $isSupporter = $this->stat['donationIssupporter']; 0058 $isSubscriber = $this->stat['subscriptionIssupporter']; 0059 0060 $url_gitlab = Zend_Registry::get('config')->settings->client->default->url_gitlab; 0061 $url_forum = Zend_Registry::get('config')->settings->client->default->url_forum; 0062 0063 $memberProfile = $helperImage->Image($this->member->profile_image_url,array('width' => 110, 'height' => 110, 'crop' => 2)); 0064 0065 $isSupporterHelper = new Default_View_Helper_IsSupporter(); 0066 $isSupporterSection = $isSupporterHelper->isSupporter($this->member->member_id); 0067 0068 $modelSectionSupport = new Default_Model_SectionSupport(); 0069 $affiliates = $modelSectionSupport->fetchAffiliatesForMember($this->member->member_id); 0070 $isSupporterActive = false; 0071 $this->affiliates = $affiliates; 0072 0073 ?> 0074 <style type="text/css"> 0075 /* ADD THIS TO CSS */ 0076 div#preloaded-images { 0077 position: absolute; 0078 overflow: hidden; 0079 left: -9999px; 0080 top: -9999px; 0081 height: 1px; 0082 width: 1px; 0083 } 0084 </style> 0085 <!-- ADD THIS TO XHTML --> 0086 <div id="preloaded-images"> 0087 <img src="<?php echo $memberProfile?>" width="1" height="1" alt="Image 01" /> 0088 </div> 0089 0090 <main class="about-me-page"> 0091 0092 <section class="head-wrap"> 0093 0094 <!-- HEADER --> 0095 0096 <section class="wrapper"> 0097 0098 0099 <!-- banner --> 0100 0101 <section class="header"> 0102 0103 <!-- about me summary --> 0104 <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 summary" style=" padding-top:65px" > 0105 <article class="well" style="width: 100%;"> 0106 <div class="about-title"> 0107 <figure class="relative inline profile-image-container"> 0108 <?php if( $isSupporterSection || $isSubscriber ) { 0109 $isSupporterActive = $this->isSupporterActive($this->member->member_id); 0110 ?> 0111 0112 <span class="supporter-badge <?=($isSupporterActive?'':'inactive')?>">S<?=$isSupporterSection?></span> 0113 <?php }?> 0114 <img src="<?php echo $memberProfile ; ?>" 0115 alt="profile-image" 0116 width="110" 0117 height="110"> 0118 0119 <?php if( $this->member->roleId==Default_Model_DbTable_Member::ROLE_ID_MODERATOR) { ?> 0120 <div class="mod-badge">MODERATOR</div> 0121 <?php }?> 0122 </figure> 0123 0124 <h1><span class="lightblue"><?php echo $this->member->username; ?></span> 0125 </h1> 0126 <?php if($this->member->firstname ) :?> 0127 <span class="glyphicon glyphicon-user"></span> 0128 <span class="text"><?php echo $this->member->firstname; ?> <?php echo $this->member->lastname; ?> </span> 0129 <?php endif; ?> 0130 0131 <?php if($textCountryCity):?> 0132 <span class="glyphicon glyphicon-map-marker"></span> 0133 <span class="text"><?php echo $textCountryCity ?></span> 0134 <?php endif; ?> 0135 0136 <?php if($this->member->paypal_mail){?> 0137 <div class="btnSupportMe"> 0138 <a class="btn btn-primary active" role="button" href="/support?creator_id=<?= $this->member->member_id ?>"> Support me </a> 0139 </div> 0140 <?php }?> 0141 </div> 0142 <div class="about-footer"> 0143 0144 0145 0146 <div class="col-container" > 0147 <div class="details info" > 0148 0149 <?php 0150 echo $this->aboutmeUserInfo. ' '. $this->earnInfo; 0151 if($isSupporterSection) 0152 { 0153 $info = new Default_Model_Info(); 0154 $activemonths = $info->getSupporterActiveMonths($this->member->member_id); 0155 if($isSupporterActive) 0156 { 0157 echo " I'm an active supporter for ".$activemonths['active_months'].' months.'; 0158 }else{ 0159 echo " I have been a supporter for ".$activemonths['active_months'].' months.'; 0160 } 0161 } 0162 ?> 0163 0164 </div> 0165 <div class="details stat" > 0166 0167 <h3>Statistics</h3> 0168 <div class="statContent" > 0169 <div class="row "> 0170 <span class="cnt"><?=$this->stat['cntProducts']?> </span> Products 0171 </div> 0172 <div class="row"> 0173 <span class="cnt"><?=$this->stat['cntComments']?> </span> Comments 0174 </div> 0175 0176 0177 <div class="row"> 0178 Plinged <span class="cnt"> <?=$this->stat['cntPlingsHeGave']?> </span>Products 0179 </div> 0180 <div class="row"> 0181 Got <span class="cnt"> <?=$this->stat['cntPlingsHeGot']?> </span><img src="/images/system/pling-btn-active.png" style="width:20px; height:20px" /> 0182 </div> 0183 0184 0185 <div class="row"> 0186 Has <span class="cnt"><?= count($this->affiliates) ?></span> Affiliates 0187 </div> 0188 0189 <div class="row"> 0190 Fan of <span class="cnt"> <?=$this->stat['cntLikesHeGave']?> </span>Products 0191 </div> 0192 <div class="row"> 0193 Got <span class="cnt"> <?=$this->stat['cntLikesHeGot']?> </span>Fan-Likes <i class="fa fa-heart" style="color:#8e44ad" aria-hidden="true"></i> 0194 0195 </div> 0196 0197 <?php 0198 if($this->stat['donationMax'] !=null && !$isSupporter){ // inactive supporter 0199 ?> 0200 <div class="row"> 0201 <span class="cnt">Supporter since: <?=$helperPrintDate->printDate(date('Y-m-d H:i:s', strtotime($this->stat['donationMin'] )))?> (Inactive)</span> 0202 </div> 0203 <?php } ?> 0204 0205 <?php 0206 if($isSupporter){ 0207 ?> 0208 <div class="row"> 0209 <span>Supporter since: <?=$helperPrintDate->printDate($this->stat['donationMin'])?> </span> 0210 </div> 0211 <div class="row"> 0212 <span>Supporter until: <?=$helperPrintDate->printDate(date('Y-m-d H:i:s', strtotime($this->stat['donationMax'] )))?> </span> 0213 </div> 0214 <?php } ?> 0215 0216 <?php 0217 if($isSubscriber && 1 == 2){ 0218 ?> 0219 <div class="row"> 0220 <span>Supporter since: <?=$helperPrintDate->printDate($this->stat['subscriptionStart'])?> </span> 0221 </div> 0222 <div class="row"> 0223 <span>Supporter with: $<?= $this->stat['subscriptionAmount'] ?> <?= $this->stat['subscriptionPeriodText'] ?> </span> 0224 </div> 0225 <?php } ?> 0226 0227 <div class="row"> 0228 <span class="">Last time active : <?=$helperPrintDate->printDate($this->stat['userLastActiveTime'])?> </span> 0229 </div> 0230 <div class="row"> 0231 <span class="text">Joined : <?=$helperPrintDate->printDate($this->member->created_at);?></span> 0232 </div> 0233 0234 0235 </div> 0236 </div> 0237 </div> 0238 0239 0240 </div> 0241 <?php 0242 $helperUserRole = new Backend_View_Helper_UserRole(); 0243 $userRoleName = $helperUserRole->userRole(); 0244 ?> 0245 0246 <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) : ?> 0247 <div class="pull-right"> 0248 <span class="page-views"> 0249 <a id="linktohive" target="_blank" href="http://cp1.hive01.com/usermanager/search.php?username=<?= $this->member->username ?>"><i>link to hive</i></a> 0250 <a id="delete-this" href="/backend/user/delete?member_id=<?= $this->member->member_id ?>"><i>delete user</i></a> 0251 </span> 0252 <br> 0253 <span class="page-views" style="color: red;"> 0254 <input type="checkbox" id="pling-excluded-checkbox" <?php echo $this->member->pling_excluded == 1 ? ' checked=\'checked\' ' : ''; ?> /> user-pling-excluded 0255 </span> 0256 <script> 0257 $('#delete-this').on('click', function (event) { 0258 0259 event.stopPropagation(); 0260 var target = $(this).attr('href'); 0261 0262 $.ajax({ 0263 url: target, 0264 success: function (results) { 0265 alert('User deleted successfully'); 0266 }, 0267 error: function() { 0268 alert('Service is temporarily unavailable.'); 0269 } 0270 }); 0271 0272 return false; 0273 }); 0274 0275 0276 $('#pling-excluded-checkbox').on('click', function (event) { 0277 event.stopPropagation(); 0278 var status = 0; 0279 if (this.checked) { 0280 status = 1; 0281 } else { 0282 status = 0; 0283 } 0284 0285 var target = "/backend/member/doexclude?member_id=<?= $this->member->member_id ?>&pling_excluded=" + status; 0286 $.ajax({ 0287 url: target, 0288 success: function (results) { 0289 if (status == 0) { 0290 alert('Member was successfully included for plinging'); 0291 $('#pling-excluded-checkbox').prop("checked", false); 0292 0293 } else { 0294 alert('Member was successfully excluded for plinging'); 0295 $('#pling-excluded-checkbox').prop("checked", true); 0296 0297 } 0298 0299 }, 0300 error: function () { 0301 alert('Service is temporarily unavailable.'); 0302 } 0303 }); 0304 0305 return false; 0306 }); 0307 </script> 0308 </div> 0309 <?php endif; ?> 0310 </article> 0311 </div> 0312 <!-- /about me summary --> 0313 0314 </section> 0315 0316 <!-- /banner --> 0317 0318 </section> 0319 0320 <!-- /HEADER --> 0321 0322 </section> 0323 0324 <section class="body-wrap"> 0325 0326 <section class="wrapper"> 0327 0328 0329 <!-- PAGE BODY --> 0330 0331 <section class="product-page about-me full-width"> 0332 0333 <!-- page content --> 0334 0335 <div class="col-md-8 col-lg-8 col-sm-8 col-xs-12 about-me-details"> 0336 0337 <!-- tabs nav --> 0338 <div class="pling-nav-tabs"> 0339 <ul class="nav nav-tabs" role="tablist"> 0340 <li role="presentation" class="active"> 0341 <a href="#user-aboutme" data-toggle="tab" role="tab" aria-controls="user-aboutme" > 0342 Products<?=($this->stat['cntProducts']>0?' ('.$this->stat['cntProducts'].') ':'')?> 0343 </a> 0344 </li> 0345 <li role="presentation"> 0346 <a class="aboutmetab" href="#user-original-products" data-toggle="tab" role="tab" data-href="/u/<?php echo $this->member->username;?>/showoriginal" aria-controls="user-original-products" > 0347 Originals<?=($this->stat['cntOrinalProducts']>0?' ('.$this->stat['cntOrinalProducts'].') ':'')?> 0348 </a> 0349 </li> 0350 <?php if($this->stat['cntFProducts']>0){ ?> 0351 <li role="presentation"> 0352 <a href="#user-featuredproducts" data-toggle="tab" role="tab" aria-controls="user-featuredproducts" > 0353 Featured<?=' ('.$this->stat['cntFProducts'].') '?> 0354 </a> 0355 </li> 0356 <?php }?> 0357 0358 <?php if($this->stat['cntCollections']>0){ ?> 0359 <li role="presentation"> 0360 <a href="#user-collections" data-toggle="tab" role="tab" aria-controls="user-collections" > 0361 Collections<?=' ('.$this->stat['cntCollections'].') '?> 0362 </a> 0363 </li> 0364 <?php }?> 0365 0366 <li> 0367 <a href="#user-comments" data-toggle="tab" role="tab" aria-controls="user-comments"> 0368 Comments (<?=$this->comments->getTotalItemCount()?>) 0369 </a> 0370 </li> 0371 <?php if(count($this->rated)>0){ ?> 0372 <li> 0373 <a href="#user-rated" data-toggle="tab" role="tab" aria-controls="user-rated"> 0374 Rated (<?=count($this->rated)?>) 0375 </a> 0376 </li> 0377 <?php } ?> 0378 <?php if( $this->plings->getTotalItemCount()>0){ ?> 0379 <li> 0380 <a href="#user-plings" data-toggle="tab" role="tab" aria-controls="user-plings"> 0381 Plinged (<?=$this->plings->getTotalItemCount()?>) 0382 </a> 0383 </li> 0384 <?php } ?> 0385 <?php if($this->likes->getTotalItemCount()>0){ ?> 0386 <li> 0387 <a href="#user-favs" data-toggle="tab" role="tab" aria-controls="user-favs"> 0388 Fan of (<?=$this->likes->getTotalItemCount()?>) 0389 </a> 0390 </li> 0391 <?php } ?> 0392 0393 0394 0395 <?php if( $this->supportersplings->getTotalItemCount()>0){ ?> 0396 <li> 0397 <a href="#supporters-plings" data-toggle="tab" role="tab" aria-controls="supporters-plings"> 0398 Plinged by (<?=$this->supportersplings->getTotalItemCount()?>) 0399 </a> 0400 </li> 0401 <?php } ?> 0402 0403 <li> 0404 <a href="#user-affiliates" data-toggle="tab" role="tab" aria-controls="user-affiliates"> 0405 Affiliates (<?=count($affiliates)?>) 0406 </a> 0407 </li> 0408 0409 <?php if(Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin' && $this->stat['cntDuplicateSourceurl']>0) { ?> 0410 <li> 0411 <a class="aboutmetab" data-href="/u/<?php echo $this->member->username;?>/duplicates" href="#user-duplicates" data-toggle="tab" role="tab" aria-controls="user-duplicates"> 0412 <i>Duplicates (<?=$this->stat['cntDuplicateSourceurl']?>)</i> 0413 </a> 0414 </li> 0415 <?php } ?> 0416 0417 <?php if(Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin') { ?> 0418 <li> 0419 <a class="aboutmetab" data-href="/u/<?php echo $this->member->username;?>/unpublished" href="#user-unpublished" data-toggle="tab" role="tab" aria-controls="user-unpublished"> 0420 <i>Unpublished (A:<?=$this->stat['cntUnpublished']?>)</i> 0421 </a> 0422 </li> 0423 <?php } ?> 0424 0425 <?php if(Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin') { ?> 0426 <li> 0427 <a class="aboutmetab" data-href="/u/<?php echo $this->member->username;?>/deleted" href="#user-deleted" data-toggle="tab" role="tab" aria-controls="user-deleted"> 0428 <i>Deleted (A:<?=$this->stat['cntDeleted']?>)</i> 0429 </a> 0430 </li> 0431 <?php } ?> 0432 </ul> 0433 </div> 0434 <!-- /tabs nav --> 0435 0436 <!-- tab panels --> 0437 0438 <div class="tab-content"> 0439 0440 <div role="tabpanel" class="tab-pane active" id="user-aboutme"> 0441 <?php if ($this->userProducts) { ?> 0442 <div class="my-products-list" id="my-products-list"> 0443 <?php echo $this->render('user/partials/aboutme-products.phtml'); ?> 0444 </div> 0445 <?php } ?> 0446 </div> 0447 0448 <div role="tabpanel" class="tab-pane " id="user-original-products"> 0449 test 0450 </div> 0451 0452 0453 <?php if($this->stat['cntFProducts']>0){ ?> 0454 <div role="tabpanel" class="tab-pane " id="user-featuredproducts"> 0455 <?php 0456 $this->userProducts = $this->userFeaturedProducts; 0457 $this->projectpage = 1; 0458 $this->total_records=0; 0459 if ($this->userProducts) { ?> 0460 <div class="my-products-list" id="my-products-list"> 0461 <?php echo $this->render('user/partials/aboutme-featured.phtml'); ?> 0462 </div> 0463 <?php } ?> 0464 </div> 0465 <?php } ?> 0466 0467 <?php if($this->stat['cntCollections']>0){ ?> 0468 <div role="tabpanel" class="tab-pane " id="user-collections"> 0469 <?php 0470 $this->userProducts = $this->userCollections; 0471 $this->projectpage = 1; 0472 $this->total_records=0; 0473 if ($this->userCollections) { ?> 0474 <div class="my-products-list" id="my-products-list"> 0475 <?php echo $this->render('user/partials/aboutme-collections.phtml'); ?> 0476 </div> 0477 <?php } ?> 0478 </div> 0479 <?php } ?> 0480 0481 <div role="tabpanel" class="tab-pane " id="user-comments"> 0482 <?php echo $this->render('user/partials/loopMyComments.phtml'); ?> 0483 </div> 0484 0485 <?php if($this->likes->getTotalItemCount()>0){ ?> 0486 <div role="tabpanel" class="tab-pane " id="user-favs"> 0487 <div class="my-fav-list"> 0488 <?php echo $this->render('user/partials/aboutme-likes.phtml'); ?> 0489 </div> 0490 </div> 0491 <?php } ?> 0492 0493 <?php if( $this->plings->getTotalItemCount()>0){ ?> 0494 <div role="tabpanel" class="tab-pane " id="user-plings"> 0495 <div class="my-fav-list"> 0496 <?php echo $this->render('user/partials/aboutme-plings.phtml'); ?> 0497 </div> 0498 </div> 0499 <?php } ?> 0500 0501 <?php if($this->supportersplings->getTotalItemCount()>0){ ?> 0502 <div role="tabpanel" class="tab-pane " id="supporters-plings"> 0503 <div class="my-fav-list"> 0504 <?php echo $this->render('user/partials/aboutme-supporters.phtml'); ?> 0505 </div> 0506 </div> 0507 <?php } ?> 0508 0509 0510 <div role="tabpanel" class="tab-pane " id="user-affiliates"> 0511 <div class="my-fav-list"> 0512 <?php echo $this->render('user/partials/aboutme-affiliates.phtml'); ?> 0513 </div> 0514 </div> 0515 0516 <?php if( Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin' && $this->stat['cntDuplicateSourceurl']>0) { ?> 0517 <div role="tabpanel" class="tab-pane " id="user-duplicates"> 0518 0519 </div> 0520 <?php } ?> 0521 <?php if( Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin' ) { ?> 0522 <div role="tabpanel" class="tab-pane " id="user-unpublished"> 0523 </div> 0524 <?php } ?> 0525 <?php if( Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin' ) { ?> 0526 <div role="tabpanel" class="tab-pane " id="user-deleted"> 0527 </div> 0528 <?php } ?> 0529 0530 <?php if(count($this->rated)>0){ ?> 0531 <div role="tabpanel" class="tab-pane " id="user-rated"> 0532 <div class="my-fav-list"> 0533 <?php echo $this->render('user/partials/loopRated.phtml'); ?> 0534 </div> 0535 </div> 0536 <?php } ?> 0537 0538 </div> 0539 0540 <!-- /tab panels --> 0541 0542 </div> 0543 0544 <!-- /page content --> 0545 0546 <!-- side bar --> 0547 0548 0549 <aside class="col-md-4 col-lg-4 col-sm-4 col-xs-12"> 0550 <?php if(Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin') { ?> 0551 <?php 0552 $scoreArray= $helperMemberScore->fetchScore($this->member->member_id); 0553 ?> 0554 <div class="col-container"> 0555 <div class="well details about"> 0556 <div> 0557 <span><i>Score: <?php echo $scoreArray['score']; ?> <div class="inline" style="margin-left:.2em;" data-placement="top" data-toggle="popover" title="Member Score" data-trigger="hover" data-html="true" data-content="The score is calculated from the following values:<br> <ul><li>Products: <?php echo $scoreArray['count_product'];?> * <?php echo $scoreArray['factor_prod'];?></li><li>Plings: <?php echo $scoreArray['count_pling'];?> * <?php echo $scoreArray['factor_pling'];?></li><li>Likes: <?php echo $scoreArray['count_like'];?> * <?php echo $scoreArray['factor_like'];?></li><li>Comments: <?php echo $scoreArray['count_comment'];?> * <?php echo $scoreArray['factor_comment'];?></li><li>Years of membership: <?php echo $scoreArray['count_years_membership'];?> * <?php echo $scoreArray['factor_year'];?></li><li>Spam-Reports: <?php echo $scoreArray['count_report_product_spam'];?> * <?php echo $scoreArray['factor_report_prod_spam'];?></li><li>Misuse-Reports: <?php echo $scoreArray['count_report_product_fraud'];?> * <?php echo $scoreArray['factor_report_prod_fraud'];?></li></ul>"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span></div> </i></span> 0558 </div> 0559 0560 <?php 0561 0562 if($this->stat['cntDuplicateSourceurl']>0) 0563 { 0564 echo '<span><i>Duplicates: '.$this->stat['cntDuplicateSourceurl'].'</i></span>'; 0565 } 0566 echo '<br/><span><i>Member id: '.$this->member->member_id.' </i></span>'; 0567 echo '<br/><span><i>Email address: '.$this->member->mail.' </i></span>'; 0568 echo '<br/><span><i>Paypal address: '.$this->member->paypal_mail.' </i></span>'; 0569 echo '<br/><span><i>Last IP: '; 0570 if(null != $lastLoginData[0]['ip']) { 0571 echo $lastLoginData[0]['ip']; 0572 } 0573 echo '</i></span>'; 0574 0575 echo '<br/><span><i>Last IPv4: '; 0576 if(null != $lastLoginData[0]['ipv4']) { 0577 echo $lastLoginData[0]['ipv4']; 0578 } 0579 echo '</i></span>'; 0580 0581 echo '<br/><span><i>Last IPv6: '; 0582 if(null != $lastLoginData[0]['ipv6']) { 0583 echo $lastLoginData[0]['ipv6']; 0584 } 0585 echo '</i></span>'; 0586 ?> 0587 </div> 0588 </div> 0589 <?php } ?> 0590 <div class="col-container"> 0591 <div class="well details about"> 0592 <h3>About me</h3> 0593 0594 <div> 0595 <?php echo isset($this->mainProject->description) ? $this->Bbcode2html($this->mainProject->description): ''; ?> 0596 </div> 0597 </div> 0598 </div> 0599 <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) : ?> 0600 <div class="col-container" style="font-style: italic"> 0601 <div class="well details"> 0602 <h3><i>Computer Info</i></h3> 0603 0604 <div class="box-content" style="font-style: italic"> 0605 <?php 0606 $tagmodel = new Default_Model_Tags(); 0607 $gidsstring = Zend_Registry::get('config')->settings->client->default->tag_group_osuser; 0608 $gids = explode(",", $gidsstring); 0609 $data = $tagmodel->getTagGroupsOSUser(); 0610 $data2 = $tagmodel->getTagsOSUser($this->member->member_id); 0611 $usertags = array(); 0612 foreach ($data2 as $t) { 0613 $usertags[$t['tag_id']][] = $t; 0614 } 0615 $groups = array(); 0616 foreach ($data as $g) { 0617 $groups[$g['group_id']][] = $g; 0618 } 0619 function custom_sort($a, $b) { 0620 return $a['tag_name'] > $b['tag_name'] ; 0621 } 0622 0623 foreach ($gids as $g) { 0624 $options = $groups[$g]; 0625 usort($options,"custom_sort"); 0626 ?> 0627 <div class="row"> 0628 <div class="col-lg-6"> 0629 <?=$options[0]['group_display_name']?$options[0]['group_display_name']:$options[0]['group_name']?>: 0630 </div> 0631 <div class="col-lg-6"> 0632 <?php 0633 $selected = ''; 0634 foreach ($options as $o) { 0635 $tag_id = $o['tag_id']; 0636 if(isset($usertags[$tag_id])){ 0637 $selected= $selected.', '.($o['tag_fullname']?$o['tag_fullname']:$o['tag_name']); 0638 } 0639 } 0640 echo strlen($selected)>0 ? substr($selected,1):''; 0641 ?> 0642 </div> 0643 </div> 0644 0645 <?php 0646 } 0647 ?> 0648 </div> 0649 </div> 0650 </div> 0651 <?php endif; ?> 0652 0653 <div class="col-container"> 0654 <div class="well details"> 0655 <h3>Connected Accounts</h3> 0656 0657 <div class="box-content"> 0658 0659 <div class="info-div"> 0660 <div class="label"> 0661 <img src="/images_sys/gitlab.png" class="accounts_icon"> 0662 </div> 0663 <div class="text"> 0664 0665 <a href="<?= $url_gitlab ?>/<?php echo $this->member->username;?>"> 0666 <span style="font-size: 16px; font-weight: normal;"> 0667 <?php 0668 $cntGitp = 0; 0669 if(!empty($this->member->gitlab_user_id)) { 0670 0671 try { 0672 $gitlab = new Default_Model_Ocs_Gitlab(); 0673 $gitProjects = $gitlab->getUserProjects($this->member->gitlab_user_id); 0674 $cntGitp = count($gitProjects); 0675 } catch (Exception $exc) { 0676 $cntGitp = 0; 0677 } 0678 } 0679 $gittext = 'opencode.net/'.$this->member->username; 0680 if($cntGitp>0){ 0681 $gittext = $gittext.' ('.$cntGitp.')'; 0682 } 0683 echo $gittext; 0684 ?> 0685 </span> 0686 </a> 0687 </div> 0688 </div> 0689 0690 <?php if (isset($this->member->link_github) && $this->member->link_github != ''): ?> 0691 <div class="github"> 0692 <div class="label"> 0693 <img src="/theme/flatui/img/email5.png" class="accounts_icon"> 0694 </div> 0695 <div class="text"> 0696 <a href="<?php echo 'https://github.com/'.$this->member->link_github; ?>" target="_blank"><?php echo $this->member->link_github; ?></a> 0697 </diV> 0698 </div> 0699 <?php endif; ?> 0700 0701 <?php if (false === empty($this->member->link_website)): ?> 0702 <div class="info-div"> 0703 <div class="label"> 0704 <span class="glyphicon glyphicon-globe" style="color:#000"></span> 0705 </div> 0706 <div class="text"> 0707 <a 0708 href="<?php echo $helperAddDefaultScheme->addDefaultScheme($this->member->link_website); ?>" 0709 target="_NEW" 0710 title="<?php echo $helperAddDefaultScheme->addDefaultScheme($this->member->link_website); ?>" 0711 ><?php echo $this->member->link_website; ?></a> 0712 </div> 0713 </div> 0714 <?php endif; ?> 0715 0716 <?php if (isset($this->member->link_facebook) && $this->member->link_facebook != ''): 0717 $helpFaceBookUrl = new Default_View_Helper_FacebookLink(); 0718 $facebookLink = $helpFaceBookUrl->facebookLink($this->member->link_facebook); 0719 ?> 0720 <div class="facebook"> 0721 <div class="label"> 0722 0723 <img src="/theme/flatui/img/email2.png" class="accounts_icon"> 0724 </div> 0725 <div class="text"> 0726 <a href="<?php echo $facebookLink; ?>"><?php echo $helperTruncate->truncate($this->member->link_facebook, 0727 50); ?></a> 0728 </div> 0729 </div> 0730 <?php endif; ?> 0731 <?php if (isset($this->member->link_twitter) && $this->member->link_twitter != ''): 0732 $helpTwitterLink = new Default_View_Helper_TwitterLink(); 0733 $twitterLink = $helpTwitterLink->twitterLink($this->member->link_twitter); 0734 ?> 0735 <div class="twitter"> 0736 <div class="label"> 0737 0738 <img src="/theme/flatui/img/email3.png" class="accounts_icon"> 0739 </div> 0740 <div class="text"> 0741 <a href="<?php echo $twitterLink; ?>" 0742 target="_NEW"><?php echo $helperTruncate->truncate($this->member->link_twitter, 50); ?></a> 0743 </div> 0744 </div> 0745 <?php endif; ?> 0746 0747 <div class="email"> 0748 <div class="label"> 0749 0750 <img src="/theme/flatui/img/email.png" class="accounts_icon"> 0751 </div> 0752 <div class="text"> 0753 <a href="<?= $url_forum ?>/u/<?=$this->member->username?>/">Send DM</a> 0754 </diV> 0755 </div> 0756 0757 0758 </div> 0759 </div> 0760 </div> 0761 0762 0763 </aside> 0764 0765 <!-- side bar --> 0766 0767 </section> 0768 0769 <!-- /PAGE BODY --> 0770 0771 </section> 0772 0773 </section> 0774 0775 <div class="tooltip_templates" style="display: none"> 0776 <span id="tooltip_content"> 0777 <i class="fa fa-spinner"></i> 0778 </span> 0779 </div> 0780 </main> 0781 <?php $this->inlineScript()->appendScript( 0782 ' $(document).ready(function(){ 0783 AboutmeTab.setup(); 0784 InitActiveHashTab.setup(); 0785 AboutMeMyProjectsPaging.setup(); 0786 AboutMeMyProjectsPagingButton.setup(); 0787 TooltipUser.setup("tooltipuser","right"); 0788 $(\'[data-toggle="popover"]\').popover(); 0789 }); 0790 ');