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

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 $helpAddDefaultScheme = new Default_View_Helper_AddDefaultScheme();
0024 $helpMemberUrl = new Default_View_Helper_BuildMemberUrl();
0025 $helpEncryptUrl = new Default_View_Helper_EncryptUrl();
0026 $helpImage = new Default_View_Helper_Image();
0027 $helpTruncate = new Default_View_Helper_Truncate();
0028 $helpProductUrl = new Default_View_Helper_BuildProductUrl();
0029 $helpBBCode = new Default_View_Helper_Bbcode2html();
0030 
0031 $helperUserRole = new Backend_View_Helper_UserRole();
0032 $userRoleName = $helperUserRole->userRole();
0033 $isAdmin = false;
0034 if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) {
0035     $isAdmin = true;
0036 }
0037 
0038 $identity = Zend_Auth::getInstance()->getStorage()->read();
0039 
0040 $loginUrl = '/login?redirect=' . $helpEncryptUrl->encryptUrl(Zend_Controller_Front::getInstance()->getRequest()
0041         ->getRequestUri(), true);
0042 $viewSidebar = 'product/partials/productAboutSidebar.phtml';
0043 $viewClaimBox = false;
0044 if ($this->product->claimable == 1) {
0045     $viewClaimBox = 'product/partials/productClaimTopHeader.phtml';
0046 }
0047 $helpProjectFiles = new Default_View_Helper_ProjectFiles();
0048 $productFileInfos = $helpProjectFiles->projectFiles($this->product->ppload_collection_id);
0049 
0050 $this->product->title = Default_Model_HtmlPurify::purify($this->product->title);
0051 $this->product->description = Default_Model_BBCode::renderHtml(Default_Model_HtmlPurify::purify($this->product->description));
0052 $this->product->version = Default_Model_HtmlPurify::purify($this->product->version);
0053 //$this->product->embed_code =Default_Model_HtmlPurify::purify($this->product->embed_code,Default_Model_HtmlPurify::ALLOW_EMBED);
0054 $this->product->link_1 = Default_Model_HtmlPurify::purify($helpAddDefaultScheme->addDefaultScheme($this->product->link_1),Default_Model_HtmlPurify::ALLOW_URL);
0055 $this->product->source_url = Default_Model_HtmlPurify::purify($this->product->source_url,Default_Model_HtmlPurify::ALLOW_URL);
0056 $this->product->facebook_code = Default_Model_HtmlPurify::purify($this->product->facebook_code,Default_Model_HtmlPurify::ALLOW_URL);
0057 $this->product->twitter_code = Default_Model_HtmlPurify::purify($this->product->twitter_code,Default_Model_HtmlPurify::ALLOW_URL);
0058 $this->product->google_code = Default_Model_HtmlPurify::purify($this->product->google_code,Default_Model_HtmlPurify::ALLOW_URL);
0059 
0060 
0061 $this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA);
0062 
0063 $this->headMeta()->setName('description',
0064     $helpTruncate->truncate($this->product->description, 200, '...', false, true));
0065 $this->headMeta()->setName('title',
0066     $helpTruncate->truncate($this->product->title, 200, '...', false, true));
0067 $this->headMeta()->appendProperty('og:url', $helpProductUrl->buildProductUrl($this->product->project_id, '', null, true));
0068 $this->headMeta()->appendProperty('og:type', 'website');
0069 $this->headMeta()->appendProperty('og:title', $this->product->title);
0070 $this->headMeta()->appendProperty('og:description',
0071     $helpTruncate->truncate($this->product->description, 200, '...', false, true));
0072 $this->headMeta()->appendProperty('og:image',
0073     $helpImage->Image($this->product->image_small, array('width' => 400, 'height' => 400)));
0074 $tableProject = new Default_Model_Project();
0075 $tableCollection = new Default_Model_Collection();
0076 
0077 $tableProjectUpdates = new Default_Model_ProjectUpdates();
0078 $this->updates = $tableProjectUpdates->fetchProjectUpdates($this->product->project_id);
0079 
0080 $tableProjectRatings = new Default_Model_DbTable_ProjectRating();
0081 $this->ratings = $tableProjectRatings->fetchRating($this->product->project_id);
0082 
0083 $commentModel = new Default_Model_ProjectComments();
0084 $cntModeration = $commentModel->fetchCommentsWithTypeProjectCount(30,$this->product->project_id);
0085 
0086 if (Zend_Auth::getInstance()->hasIdentity()){
0087     $this->ratingOfUser = $tableProjectRatings->getProjectRateForUser($this->product->project_id,$identity->member_id);
0088 }
0089 
0090 $tableProjectFollower = new Default_Model_DbTable_ProjectFollower();
0091 $this->likes = $tableProjectFollower->fetchLikesForProject($this->product->project_id);
0092 
0093 $projectplings = new Default_Model_ProjectPlings();
0094 $this->projectplings = $projectplings->fetchPlingsForProject($this->product->project_id);
0095 
0096 $projectsupport = new Default_Model_SectionSupport();
0097 $this->projectaffiliates = $projectsupport->fetchAffiliatesForProject($this->product->project_id);
0098 
0099 $tagmodel = new Default_Model_Tags();
0100 
0101 $helperUserRole = new Backend_View_Helper_UserRole();
0102 $userRoleName = $helperUserRole->userRole();
0103 
0104 $this->userRoleName = $userRoleName;
0105 
0106 $productTmp =$this->product->toArray();
0107 $productTmp['image_small_absolute']=$helpImage->Image($this->product->image_small, array('width' => 400, 'height' => 400));
0108  $productJson = Zend_Json::encode(Default_Model_Collection::cleanProductInfoForJson($productTmp));
0109  $filesJson = $this->filesJson;
0110 $helperCatXdgType = new Default_View_Helper_CatXdgType();
0111 $xdgTypeJson = Zend_Json::encode($helperCatXdgType->catXdgType($this->product->project_category_id));
0112 
0113 $isowner = false;
0114 if(Zend_Auth::getInstance()->hasIdentity() && $identity->member_id==$this->product->member_id){
0115     $isowner = true;
0116 }
0117 $this->isowner = $isowner;
0118 
0119 $filesTable = new Default_Model_DbTable_PploadFiles();
0120 $countFiles = $filesTable->fetchFilesCntForProject($this->product->ppload_collection_id);
0121 $pics= $tableProject->getGalleryPictureSources($this->product->project_id);
0122 
0123 if(sizeof($pics)==0)
0124 {
0125     array_push($pics,$this->product->image_small);
0126 }
0127 $this->galleryPictures=array();
0128 foreach ($pics as $p) {
0129      $this->galleryPictures[] = $this->Image($p, array('height' => '600'));
0130 }
0131 
0132 $galleryPicturesJson = Zend_Json::encode($this->galleryPictures);
0133 ?>
0134     <!--<link href="/theme/react/assets/css/get-it.css" type="text/css" rel="stylesheet"/>-->
0135 
0136     <!-- PRODUCT MEDIA SLIDER CSS -->
0137 
0138     <link href="/theme/react/lib/swiper/swiper.min.css" type="text/css" rel="stylesheet" >
0139     <link href="/theme/react/lib/bookblock/css/bookblock.css" type="text/css" rel="stylesheet" >
0140     <style>
0141         #media-slider .carousel-control {
0142             /* Firefox */
0143             height: -moz-calc(100% - 75px) !important ;
0144             /* WebKit */
0145             height: -webkit-calc(100% - 75px) !important ;
0146             /* Opera */
0147             height: -o-calc(100% - 75px) !important ;
0148             /* Standard */
0149             height: calc(100% - 75px) !important ;
0150         }
0151         .is-mobile .video-react-video  {
0152             height:100% !important;
0153         }
0154         
0155     </style>
0156 
0157     <!-- PRODUCT /MEDIA SLIDER CSS -->
0158 
0159     <!-- facebook -->
0160     <div id="fb-root"></div>
0161     <?php if (Zend_Auth::getInstance()->hasIdentity()) {
0162         ?>
0163     <div id="report-product-<?= $this->product->project_id ?>" class="modal report-product" tabindex="-1" role="dialog">
0164         <div class="modal-dialog modal-sm">
0165             <div class="modal-content">
0166                 <div class="modal-header">
0167                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
0168                                 aria-hidden="true">&times;</span></button>
0169                 </div>
0170                 <form id="product-report" class="full-width partialjson" action="/report/product/"
0171                       data-target="#report-product-<?= $this->product->project_id ?>-message">
0172                     <input type="hidden" name="p" value="<?= $this->product->project_id ?>">
0173                     <div id="report-product-<?= $this->product->project_id ?>-message">
0174                         <p>Do you really want to report this product?</p>
0175                         <div class="modal-footer">
0176                             <button type="submit" class="small">
0177                                 <span class="glyphicon glyphicon-share-alt"></span> Yes
0178                             </button>
0179                         </div>
0180                     </div>
0181                 </form>
0182             </div>
0183         </div>
0184     </div>
0185 
0186 
0187     <div id="report-product-fraud-<?= $this->product->project_id ?>" class="modal report-product-fraud" tabindex="-1" role="dialog">
0188         <div class="modal-dialog modal-sm">
0189             <div class="modal-content">
0190                 <div class="modal-header">
0191                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
0192                                 aria-hidden="true">&times;</span></button>
0193                 </div>
0194                 <form id="product-report-fraud" class="full-width partialjsonfraud" action="/report/productfraud/"
0195                       data-target="#report-product-fraud-<?= $this->product->project_id ?>-message" >
0196                     <input type="hidden" name="p" value="<?= $this->product->project_id ?>">
0197                     <div id="report-product-fraud-<?= $this->product->project_id ?>-message" class="message" style="padding: 20px">
0198                         <div>Please specify why this product is misused (min 5 chars):
0199                            <textarea class="" id="report-text" name="t" cols="50" rows="3"></textarea>
0200                         </div>
0201                         <div class="modal-footer">
0202                             <button type="submit" class="small">
0203                                 <span class="glyphicon glyphicon-share-alt"></span> Report
0204                             </button>
0205                         </div>
0206                     </div>
0207                 </form>
0208             </div>
0209         </div>
0210     </div>
0211 
0212 
0213      <div id="report-product-clone-<?= $this->product->project_id ?>" class="modal report-product-clone" tabindex="-1" role="dialog">
0214         <div class="modal-dialog modal-sm">
0215             <div class="modal-content">
0216                 <div class="modal-header">
0217                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
0218                                 aria-hidden="true">&times;</span></button>
0219                                 <span class="modal-title">If you know another product which is original of <b><?=$this->product->title?></b>, please fill in the ID:</span>
0220                 </div>
0221                 <form id="product-report-clone" class="full-width partialjsonclone" action="/report/productclone/"
0222                       data-projectid="<?= $this->product->project_id ?>" data-target="#report-product-clone-<?= $this->product->project_id ?>-message">
0223                     <input type="hidden" name="p" value="<?= $this->product->project_id ?>">
0224                     <div id="report-product-clone-<?= $this->product->project_id ?>-message" class="message" style="padding: 20px">
0225                         <div>
0226                             <label class="form-label">ID of the Original on opendesktop:  </label><br/>
0227                             <input name="pc" id="clonePId"/><br/><br/>
0228 
0229                             <label class="form-label">Additional message: </label>
0230                             <br/>
0231                            <textarea class="" id="report-text" name="t"  rows="3" style="width: 440px;"></textarea>
0232                         </div>
0233                         <div class="modal-footer">
0234                             <button type="button" class="small" data-dismiss="modal">cancel</button>
0235                             <button type="submit" class="small">
0236                                 <span class="glyphicon glyphicon-share-alt"></span> add credits
0237                             </button>
0238                         </div>
0239                     </div>
0240                 </form>
0241             </div>
0242         </div>
0243     </div>
0244 
0245     <?php } ?>
0246 
0247 
0248 
0249 
0250     <?php if (Zend_Auth::getInstance()->hasIdentity()) {
0251         ?>
0252     <div id="like-product-modal" class="modal" tabindex="-1" role="dialog">
0253         <div class="modal-dialog modal-sm" role="document">
0254             <div class="modal-content" style="padding-bottom: 20px">
0255                <div class="modal-header">
0256                  <label id="votelabel" class="modal-title"> </label>
0257                    <button type="button" class="close col-md-1" data-dismiss="modal" aria-label="Close"><span
0258                                aria-hidden="true">&times;</span></button>
0259                </div>
0260                <div class="modal-body">
0261                  <form class="full-width " action="/" method="post">
0262                             <input type="hidden" name="p" value="<?= $this->product->project_id ?>"/>
0263                             <input type="hidden" name="m" value="<?= $identity->member_id ?>" id="loginuser"/>
0264                             <input type="hidden" name="pm" value="<?=$this->product->member_id?>" id="productcreator"/>
0265                 </form>
0266                 </div>
0267             </div>
0268         </div>
0269     </div>
0270 
0271     <?php
0272     } else { ?>
0273 
0274     <div id="like-product-modal" class="modal fade noid" tabindex="-1" role="dialog">
0275         <div class="modal-dialog modal-sm" role="document">
0276            <div class="modal-content" style="min-height: 100px; ">
0277                <span style="text-align: center; display: block; padding-top: 30px">Please login. <br/><a href="<?=$loginUrl?>">Login</a></span>
0278            </div>
0279          </div>
0280     </div>
0281 
0282     <?php } ?>
0283 
0284     <?php if (Zend_Auth::getInstance()->hasIdentity()) { ?>
0285     <div id="review-product-modal" class="modal" tabindex="-1" role="dialog">
0286         <div class="modal-dialog modal-sm" role="document">
0287             <div class="modal-content" style="padding-bottom: 20px">
0288                <div class="modal-header">
0289                     <label id="votelabel"> </label>
0290                    <button type="button" class="close col-md-1" data-dismiss="modal" aria-label="Close"><span
0291                                aria-hidden="true">&times;</span></button>
0292                </div>
0293                <form class="full-width product-add-comment-review" action="/productcomment/addreplyreview/" method="post" >
0294                <div class="modal-body">
0295 
0296                             <input type="hidden" name="p" value="<?= $this->product->project_id ?>"/>
0297                             <input type="hidden" name="m" value="<?= $identity->member_id ?>" id="loginuser"/>
0298                             <input type="hidden" name="v" value="1" id="voteup"/>
0299                             <input type="hidden" name="pm" value="<?=$this->product->member_id?>" id="productcreator"/>
0300                             <input type="hidden" name="otxt" value="<?=$this->ratingOfUser!=null?$this->ratingOfUser['comment_text']:''?>" id="otxt"/>
0301                             <input type="hidden" name="userrate" value="<?=$this->ratingOfUser==null?-1:$this->ratingOfUser['user_like']?>" id="userrate"/>
0302                             <textarea name="msg" class="full-width" id="commenttext"><?=$this->ratingOfUser!=null?$this->ratingOfUser['comment_text']:''?></textarea>
0303 
0304 
0305                 </div>
0306                 <div class="modal-footer">
0307                             <button type="button" class="small" data-dismiss="modal">cancel</button>
0308                             <button type="submit" class="small pull-right">Rate Now</button>
0309                 </div>
0310                 </form>
0311             </div>
0312         </div>
0313     </div>
0314 
0315 
0316     <div id="score-product-modal" class="modal" tabindex="-1" role="dialog">
0317         <div class="modal-dialog modal-sm" role="document">
0318             <div class="modal-content" style="padding-bottom: 20px">
0319                <div class="modal-header">
0320                 <button type="button" class="close col-md-1" data-dismiss="modal" aria-label="Close"><span
0321                                aria-hidden="true">&times;</span></button>
0322                     <label id="votelabel" class="modal-title"> </label>
0323                </div>
0324                <form class="full-width product-add-comment-review-new" action="/productcomment/addreplyreviewnew/" method="post" id="reviewform">
0325                <div class="modal-body">
0326                     <input type="hidden" name="p" value="<?= $this->product->project_id ?>" id="form_p"/>
0327                     <input type="hidden" name="m" value="<?= $identity->member_id ?>" id="loginuser"/>
0328                     <input type="hidden" name="v" value="1" id="voteup"/>
0329                     <input type="hidden" name="pm" value="<?=$this->product->member_id?>" id="productcreator"/>
0330                     <input type="hidden" name="otxt" value="<?=$this->ratingOfUser!=null?$this->ratingOfUser['comment_text']:''?>" id="otxt"/>
0331                     <input type="hidden" name="userscore" value="<?=$this->ratingOfUser==null?-1:$this->ratingOfUser['score']?>" id="userscore"/>
0332                     <input type="hidden" name="s" value="<?=$this->ratingOfUser==null?-1:$this->ratingOfUser['score']?>" id="userscorevalue"/>
0333                     <textarea name="msg" class="full-width" id="commenttext"><?=$this->ratingOfUser!=null?$this->ratingOfUser['comment_text']:''?></textarea>
0334 
0335                 </div>
0336                 <div class="modal-footer">
0337                     <button type="button" class="small" id="modal-btn-cancel" style="float: left;">Cancel</button>
0338                     <button type="submit" class="small pull-right" id="modal-btn-onsubmit">Rate Now</button>
0339                 </div>
0340                 </form>
0341             </div>
0342         </div>
0343     </div>
0344     <?php } else {?>
0345         <div id="review-product-modal" class="modal fade noid" tabindex="-1" role="dialog">
0346             <div class="modal-dialog modal-sm" role="document">
0347                <div class="modal-content" style="min-height: 150px; ">
0348                    <span style="text-align: center; display: block; padding-top: 30px">
0349                     Please login.
0350                     <br/>
0351                     <a href="<?=$loginUrl?>" rel="nofollow"> Login </a>
0352                     </span>
0353                </div>
0354              </div>
0355         </div>
0356 
0357         <div id="score-product-modal" class="modal fade noid" tabindex="-1" role="dialog">
0358             <div class="modal-dialog modal-sm" role="document">
0359                <div class="modal-content" style="min-height: 150px; ">
0360                    <span style="text-align: center; display: block; padding-top: 30px">
0361                     Please login.
0362                     <br/>
0363                     <a href="<?=$loginUrl?>" rel="nofollow"> Login </a>
0364                     </span>
0365                </div>
0366              </div>
0367         </div>
0368 
0369     <?php } ?>
0370 
0371 
0372     <link href="/theme/flatui/css/product-page.css" type="text/css" rel="stylesheet"/>
0373 
0374     <main id="product-page-content">
0375         <div id="product-page-view" class="disply-flex">
0376             <div class="col-lg-2 col-md-2 col-sm-4 col-xs-12 sidebar-left" style="">
0377                 <?php  echo $this->render('explore/partials/filter.phtml'); ?>
0378             </div>
0379             <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12" id="product-main">
0380                 <div class="flex-row imgsmall" id="product-main-img-container">
0381                     <div class="product-main-img flex-item-24" id="product-main-img">
0382                         <div id="product-title-div" class="product-title-div">
0383                             <div  class="product-title">
0384                             <div class="product-logo-container">
0385                                   <img class="logo" src="<?= $helpImage->Image($this->product->image_small,
0386                                       array('width' => 85, 'height' => 85, 'crop' => 'crop')); ?>"/>
0387                                 </div>
0388                                 <div id="product-header-info-container">
0389 
0390                                     <div id="product-header-title">
0391                                     <?php if (false === empty($this->product->link_1)): ?><a
0392                                         href="<?php echo $this->product->link_1; ?>"
0393                                         target="_NEW"
0394                                         title="<?php echo $this->product->link_1; ?>"
0395                                         rel="nofollow"
0396                                         > <?= $this->product->title; ?> <span class="fa fa-external-link"></span></a>
0397                                     <?php else : ?>
0398                                         <?= $this->product->title; ?>
0399                                     <?php endif; ?>
0400                                     <?php
0401                                     if($this->product->amount_reports && $this->product->amount_reports>1)
0402                                     {
0403                                         echo '<span style="color:red; font-size:small">('.$this->product->amount_reports.' times reported. Product will be validated from our moderators.)</span>';
0404                                     }?>
0405                                     <?php
0406                                     if($isowner){
0407                                     ?>
0408                                     <span  style="font-size: 13px;padding: .2em .6em .3em;">
0409                                     <a href="/p/<?=$this->product->project_id?>/edit">
0410                                     <span class="glyphicon glyphicon-pencil"></span>
0411                                         <?= $this->translate('Edit Product') ?>
0412                                     </a>
0413                                     </span>
0414                                     <?php }?>
0415 
0416                                     <?php
0417                                                 if($this->product->featured=='1'){
0418                                         ?>
0419                                             <span class=" label label-info right" style="font-size: 13px;padding: .2em .6em .3em;"> Featured</span>
0420                                     <?php }?>
0421 
0422                                     <?php if($this->isProjectOriginal($this->product->project_id)){?>
0423                                     <span class=" label label-info right" style="font-size: 13px;padding: .2em .6em .3em;"> Original</span>
0424                                     <?php }?>
0425                                     <?php if($this->isProjectMod($this->product->project_id)){?>
0426                                     <span class=" label label-info right" style="font-size: 13px;padding: .2em .6em .3em;"> Mod</span>
0427                                     <?php }?>
0428 
0429                                     </div>
0430 
0431 
0432                                     <p class="product_category">
0433                                     <?php
0434                                     echo '<a href="/browse/cat/' . $this->product->project_category_id . '/order/latest">' . $this->product->cat_title . ' </a>';
0435                                     ?>
0436 
0437                                     <?php
0438                                     echo '<span class="topics">';
0439 
0440                                     $tagsuser = $tagmodel->getTagsUser($this->product->project_id, Default_Model_Tags::TAG_TYPE_PROJECT);
0441                                     echo '<span class="topicslink">';
0442                                     if(false === empty($tagsuser))
0443                                     {
0444                                         foreach (explode(',',$tagsuser) as $tag) {
0445                                     ?>
0446                                     <a rel="nofollow" href="<?=$this->buildSearchTagUrl($tag)?>" class="topic-tag topic-tag-link usertagslabel"><?=$tag?></a>
0447                                      <?php
0448                                         }
0449                                      }
0450                                      echo '</span><!--end of topicslink-->';
0451                                      if($isowner){
0452                                             $this->headLink()->appendStylesheet('/theme/flatui/css/select2.min.css');
0453                                             $this->headLink()->appendStylesheet('/theme/flatui/css/select2.custmized.css');
0454                                             $this->inlineScript()->appendFile('/theme/flatui/js/lib/select2.min.js');
0455                                         ?>
0456                                         <span class="tagsuserselectpanel" style="display: none; ">
0457                                             <select
0458                                                     id="tagsuserselect"
0459                                                     name="tagsuser"
0460                                                     multiple="true"
0461                                                     class="taggingSelect2"
0462                                                     data-pid="<?php echo $this->product->project_id?>"
0463                                                     >
0464                                                 <option value=""></option>
0465                                                 <?php
0466                                                 $element_value =$tagsuser;
0467                                                 $value = empty($element_value) ? array() : explode(',',$element_value);
0468                                                 foreach ($value as $v) {
0469                                                     echo '<option value="'.$v.'" selected="selected">'.$v.'</option>';
0470                                                 }
0471                                                 ?>
0472                                             </select>
0473                                         </span>
0474 
0475                                         <button class="btn-link topic-tags-btn"  type="button" >Manage tags</button>
0476                                         <span class="topic-tags-saved"><i class="fa fa-check"></i> Saved </span>
0477                                     <?php
0478                                             $this->inlineScript()->appendScript(
0479                                                 '    $(document).ready(function(){
0480                                                         TagingProductDetail.setup();
0481                                                     });
0482                                                 ');
0483                                          }
0484                                     echo '</span>';
0485                                      ?>
0486 
0487                                     <p class="light small">
0488                                     <span class="source">Source (link to git-repo or to original if based on someone elses unmodified work): </span>
0489                                     <?php if (false === empty($this->product->gitlab_project_id)) {
0490                                         $url = $this->gitlab_project['web_url'];
0491                                         $url = str_replace("http://", "https://", $url);
0492 
0493                                         echo '<img src="/images_sys/gitlab.png" width="15"> <a href="' . $url . '" rel="nofollow">' . $url
0494                                             . ' <span class="fa fa-external-link"></span></a>';
0495                                     } else if (false === empty($this->product->source_url)) {
0496                                         $target='_blank';
0497                                         if (strpos($this->product->source_url, 'opencode.net') !== false) {
0498                                             $target='_self';
0499                                         }
0500                                         echo '<a target="'.$target.'" href="' . $this->product->source_url . '" rel="nofollow">' . $this->product->source_url
0501                                             . ' <span class="fa fa-external-link"></span>
0502                                             </a>';
0503 
0504                                         if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName)
0505                                         {
0506                                             $cntSameSource = $tableProject->getCountSourceurl($this->product->source_url);
0507                                             if($cntSameSource>1){
0508                                                 $link = '/p/'.$this->product->project_id.'/listsamesourceurl';
0509                                                 echo '<span><a style="color:red" class="popuppanel" href="'.$link.'">
0510                                                 ['.$cntSameSource.']</a></span>';
0511                                             }
0512                                         }
0513 
0514 
0515                                     } else {
0516                                             echo '<span class="source" > Add the source-code for this project on </span><a href="https://opencode.net/'.$this->product->username.'">opencode.net</a>';
0517                                     }
0518                                     ?>
0519 
0520 
0521 
0522                                 </div>
0523                             </div>
0524 
0525                             <div class="product-title-right" >
0526 
0527 
0528                                 <div class="projectdtailHeart tooltipheart"  title="Become a fan" >
0529 
0530                                         <div id="container-follow<?=$this->product->project_id?>" class="container-pling">
0531                                         <?php
0532                                             echo $this->partial(
0533                                                 '/product/partials/projectlike.phtml',
0534                                                 array(
0535                                                     "authMember"  => $identity,
0536                                                     "project_id" => $this->product->project_id
0537                                                 )
0538                                             );
0539                                         ?>
0540                                         </div>
0541                                 </div>
0542                                  <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName ){  ?>
0543                                 <div class="projectdetailRating" style="clear: right; width: 135px;">
0544                                         <?php echo $this->render('partials/sidebarRating.phtml'); ?>
0545                                 </div>
0546                                 <?php } ?>
0547 
0548                                 <div class="projectdetailRating" style="clear: right">
0549                                         <?php echo $this->render('partials/sidebarScore.phtml'); ?>
0550                                 </div>
0551 
0552                             </div>
0553                         </div>
0554                         <div id="product-media-slider-container" class="imgsmall"></div>
0555                     </div>
0556                 </div>
0557 
0558                 <div class="flex-item-24" id="product-tabs-container">
0559                     <!-- TABS -->
0560                     <div id="product-tabs" class="pling-nav-tabs">
0561                         <ul class="nav nav-tabs ">
0562                             <li class="active"><a href="#about-panel" data-toggle="tab">Product</a></li>                         
0563                             <li><a href="#files-panel" data-toggle="tab">Files <span id="files-counter-db"><?= (!empty($countFiles)?'('.$countFiles.')':'') ?></span></a></li>
0564                         <?php if(count($this->updates)>0){ ?>
0565                             <li><a href="#updates-panel" data-toggle="tab">Changelogs <?php echo '('.count($this->updates).')';  ?></a></li>
0566                         <?php } ?>
0567 
0568                         <?php if($this->product->show_gitlab_project_issues){
0569                                 $cntGitIssues = $this->gitlab_project['open_issues_count'];
0570                             ?>
0571                             <li><a href="#gitlabissues-panel" data-toggle="tab">Issues <?php echo '('.$cntGitIssues.')';  ?></a></li>
0572                         <?php } ?>
0573 
0574                        <?php /*if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName ){  ?>
0575                         <li><a href="#ratings-panel" data-toggle="tab">Ratings & Reviews <?php echo '('.$cntRatingsActive.')';  ?></a></li>
0576                        <?php } */ ?>
0577 
0578                         <li><a href="#ratings-panel2" data-toggle="tab">Ratings & Reviews <?php echo '('.count($this->ratings).')';  ?></a></li>
0579 
0580 
0581                         <?php if(count($this->projectplings)>0){ ?>
0582                             <li><a href="#plings-panel" data-toggle="tab">Plings <?php echo '('.count($this->projectplings).')';  ?></a></li>
0583                         <?php } ?>
0584                             
0585                             <li><a href="#affiliates-panel" data-toggle="tab">Affiliates <?php if($this->projectaffiliates > 0) echo '('.count($this->projectaffiliates).')';  ?></a></li>
0586                             
0587                          <?php if(count($this->likes)>0){ ?>
0588                             <li><a href="#likes-panel" data-toggle="tab">Fans <?php echo '('.count($this->likes).')';  ?></a></li>
0589                         <?php } ?>
0590 
0591                        
0592                         <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName){  ?>
0593                         <li><a href="#related-panel" data-toggle="tab" style="font-style: italic;">Relationship<?=' ('.$this->cntRelatedProducts.')'?></a></li>                                                
0594                        <?php } ?>
0595 
0596 
0597                         <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName 
0598                             || $isowner
0599                             || Default_Model_DbTable_MemberRole::ROLE_NAME_MODERATOR == $userRoleName
0600                         ){  ?>                       
0601                         <li><a href="#tab-moderation" data-toggle="tab" style="font-style: italic;">Moderation<?=' ('.$cntModeration.')'?></a></li>
0602                         
0603                        <?php } ?>
0604 
0605                         </ul>
0606                     </div>
0607                     <!-- /TABS -->
0608 
0609                     <!-- PANELS -->
0610 
0611                     <div class="tab-content row" id="product-panels">
0612 
0613                         <!-- ABOUT -->
0614                         <div class="tab-pane active" id="about-panel">
0615 
0616 
0617                             <div id="product-about" class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
0618 
0619                                 <div>
0620                                     <?php
0621                                         if($this->product->is_gitlab_project && $this->product->use_gitlab_project_readme && null != $this->gitlab_project['readme_url']) {
0622                                     ?>
0623                                     <div class="gitlab-readme">
0624                                         <article>
0625                                         <b>Description:</b> <br/><br/>
0626                                         <?=$this->readme ?><br/><br/>
0627                                         </article>
0628                                     </div>
0629                                     <?php
0630                                         } else {
0631                                     ?>
0632                                     <article>
0633                                         <b>Description:</b> <br/><br/>
0634                                         <?=$this->product->description ?>
0635                                     </article>
0636 
0637                                     <?php
0638                                         }
0639                                     ?>
0640 
0641 
0642 
0643                                         <?php
0644                                         if (count($this->updates) > 0) {
0645                                             $this->productUpdate = $this->updates[0];
0646                                             ?>
0647                                             <article class="lastchangelog">
0648                                             <b>Last changelog:</b>
0649 
0650                                             <?= $this->render('product/partials/productUpdatesV1.phtml'); ?>
0651                                             </article>
0652                                         <?php } ?>
0653 
0654                                     <!--product category tag rating -->
0655                                     <div id="prodcut-category-tag-rating-container"></div>
0656 
0657                                     <!-- comments -->
0658                                     <div id="product-discussion" class="comment-containers">
0659                                         <?php
0660                                         $modelComments = new Default_Model_ProjectComments();
0661                                         $offset = $this->paramPageId;
0662                                         $testComments = $modelComments->getCommentTreeForProject($this->product->project_id);
0663                                         $testComments->setItemCountPerPage(25);
0664                                         $testComments->setCurrentPageNumber($offset);
0665                                         $this->comments = $testComments;
0666                                         echo $this->render('product/partials/productCommentsUX1.phtml');
0667                                         ?>
0668                                     </div>
0669                                     <!-- /comments -->
0670                                 </div>
0671 
0672                             </div>
0673 
0674                             <?php if ($viewClaimBox) {
0675                                 echo $this->partial(
0676                                     $viewClaimBox,
0677                                     array(
0678                                         "member"  => $this->member,
0679                                         "product" => $this->product
0680                                     )
0681                                 );
0682                             }
0683                             ?>
0684 
0685 
0686                         </div>
0687                         <!-- /ABOUT -->
0688 
0689                         <!-- MEDIA -->
0690                         <!--<div class="tab-pane" id="media-panel">
0691                             <?php /* if (null != ($this->product->embed_code)): ?>
0692                                 <?= $this->product->embed_code ?>
0693                             <?php endif; */ ?>
0694                         </div>-->
0695                         <!-- /MEDIA -->
0696 
0697                         <!-- updates panel -->
0698                         <?php  if (count($this->updates) > 0) { ?>
0699                         <div class="tab-pane" id="updates-panel">
0700                             <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
0701                             <article>
0702                                 <?php
0703                                     foreach ($this->updates as $this->productUpdate) {
0704                                        echo $this->render('product/partials/productUpdatesV1.phtml');
0705                                     }
0706                                   ?>
0707                             </article>
0708                             </div>
0709                         </div>
0710                         <?php } ?>
0711 
0712                         <?php  if ($this->product->show_gitlab_project_issues) {
0713                             ?>
0714                             <div class="tab-pane" id="gitlabissues-panel">
0715                                 <div id="gitlabissues-panel-wrapper" class="col-lg-9 col-md-9 col-sm-9 col-xs-12 ">
0716 
0717                                 <?php
0718                                     $issues = $this->gitlab_project_issues;
0719                                     $i = 0;
0720                                     foreach ($issues as $issue){
0721                                         $date = date('Y-m-d H:i:s', strtotime($issue['created_at']));
0722                                         echo '<div class="commentstore"><a href="'.$issue['web_url'].'"><span class="title">' . $issue['title'] . '</span></a><div class="newsrow"><span class="date">'.$this->printDate($date).'</span></div></div>';
0723                                         $i ++;
0724                                         if($i>5) {
0725                                             break;
0726                                         }
0727                                     }
0728                                 ?>
0729                                 <span class="center showmore"><a href="<?= $this->gitlab_project_issues_url ?>" target="_NEW">Show all <?= $this->gitlab_project['open_issues_count'] ?> Issues</a></span>
0730 
0731                                 </div>
0732                             </div>
0733                          <?php } ?>
0734 
0735                         <!-- ratings panel2 -->
0736 
0737                         <div class="tab-pane" id="ratings-panel2">
0738                             <div id="ratings-panel-wrapper2" class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
0739                             <article>
0740                                 <div id="productRatingContainer2">
0741                                 <?php
0742                                        echo $this->render('product/partials/productRating2.phtml');
0743                                   ?>
0744                                   </div>
0745                             </article>
0746                             </div>
0747                         </div>
0748 
0749                          <!-- related products -->
0750 
0751                          <div class="tab-pane" id="related-panel">
0752                             <div class="col-lg-12">                            
0753                             <article>
0754                                 <div id="productRatingContainer2">
0755                                 <?php
0756                                        echo $this->render('product/partials/productRelated.phtml');
0757                                   ?>
0758                                 </div>                                
0759                             </article>
0760                             </div>
0761                         </div>
0762 
0763                         <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName 
0764                             || $isowner
0765                             || Default_Model_DbTable_MemberRole::ROLE_NAME_MODERATOR == $userRoleName
0766                         ){  ?>    
0767                         <div class="tab-pane" id="tab-moderation">
0768                             <div class="col-lg-12">                            
0769                                 <?php 
0770                                     if(!$isowner)
0771                                     {
0772                                     $modelTags = new Default_Model_Tags();
0773                                     $isDeprecatedModerator = $modelTags->isProductDeprecatedModerator($this->product->project_id);
0774                                 ?>
0775                                 <div>
0776                                     <input type="checkbox" id="product-deprecated-checkbox" <?php echo $isDeprecatedModerator ? ' checked=\'checked\' ' : ''; ?> />  product-deprecated
0777                                 </div>
0778                                     <?php }?>
0779                              <!-- comments -->
0780                                 <div>
0781                                     
0782                                 </div>
0783                                 <div id="product-comment-moderation" class="comment-containers">
0784                                         <?php
0785                                         $modelComments = new Default_Model_ProjectComments();
0786                                         $offset = $this->paramPageId;
0787                                         $testComments = $modelComments->getCommentTreeForProject($this->product->project_id,30);
0788                                         $testComments->setItemCountPerPage(25);
0789                                         $testComments->setCurrentPageNumber($offset);
0790                                         $this->comments = $testComments;
0791                                         echo $this->render('product/partials/productCommentsUX2.phtml');
0792                                         ?>
0793                                     </div>
0794                                     <!-- /comments -->
0795                             </div>
0796                         </div>
0797                         <?php }?>
0798 
0799                         <!-- likes panel -->
0800                         <?php  if (count($this->likes) > 0) { ?>
0801                         <div class="tab-pane" id="likes-panel">
0802                             <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
0803                             <article>
0804                                 <div id="productLikesContainer">
0805                                 <?php
0806                                        echo $this->render('product/partials/productLikes.phtml');
0807                                   ?>
0808                                   </div>
0809                             </article>
0810                             </div>
0811                         </div>
0812                         <?php } ?>
0813 
0814                         <!-- plings panel -->
0815                         <?php  if (count($this->projectplings) > 0) { ?>
0816                         <div class="tab-pane" id="plings-panel">
0817                             <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
0818                             <article>
0819                                 <div id="productPlingsContainer">
0820                                 <?php
0821                                        echo $this->render('product/partials/productPlings.phtml');
0822                                   ?>
0823                                   </div>
0824                             </article>
0825                             </div>
0826                         </div>
0827                         <?php } ?>
0828 
0829                         <!-- affiliates panel -->
0830                         <div class="tab-pane" id="affiliates-panel">
0831                             <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
0832                             <article>
0833                                 <div id="productAffiliatesContainer">
0834                                 <?php
0835                                        echo $this->render('product/partials/productAffiliates.phtml');
0836                                   ?>
0837                                   </div>
0838                             </article>
0839                             </div>
0840                         </div>
0841 
0842                         <div class="tab-pane" id="files-panel">                              
0843                             <div class="col-lg-12">
0844                                 <?php
0845                                         echo $this->render('product/partials/ppload.phtml');
0846                                 ?>
0847                             </div>
0848                         </div>
0849 
0850 
0851                     </div>
0852 
0853                     <!-- /PANELS -->
0854 
0855 
0856                 </div>
0857 
0858 
0859             </div>
0860             <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 flex-right" id="product-maker">
0861                 <div>
0862                     <div class="project-share-new col-lg-12 col-md-12 col-sm-12 col-xs-12">
0863                         <!-- Download/Install-->
0864                         <div>
0865                             <div class="prod-widget-box right">
0866                                 <div  class="btn-group dropleft" style="width: 100%">
0867                                     <button style="width: 100%" id="project_btn_download" class="btn dropdown-toggle disabled" type="button" data-toggle="dropdown">Download
0868                                     <span class="caret"></span></button>
0869                                     <ul class="dropdown-menu hide" id="dropdown_downloads" style="min-width: 270px;">
0870                                     </ul>
0871                                 </div>
0872 
0873                                 <div id="project_btn_grp_install" class="btn-group dropleft hide" style="width: 100%; padding-top: 10px;">
0874                                     <button style="width: 100%" id="project_btn_install" class="btn btn-primary dropdown-toggle disabled hide" type="button" data-toggle="dropdown">Install
0875                                     <span class="caret"></span></button>
0876                                     <ul class="dropdown-menu hide" id="dropdown_installs" style="min-width: 270px; top:50px">
0877                                     </ul>
0878                                     <span style="display: absolute; bottom:0">
0879                                     *Needs <a href="https://www.opendesktop.org/p/1175480/" target="_NEW" style="color: #0088d7;text-decoration: underline;">pling-store</a> or <a href="https://www.opendesktop.org/p/1136805/" target="_NEW" style="color: #0088d7;text-decoration: underline;">ocs-url</a> to install things</span>
0880                                 </div>
0881 
0882 
0883                                 <?php if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) : ?>
0884                                     <div id="get-it-container" class="btn-group dropleft " style="width: 100%; padding-top: 10px;">
0885                                      </div>
0886                                <?php endif; ?>
0887                             </div>
0888                         </div>
0889                         
0890                         <!-- User -->
0891                         <?php if (empty($this->product->claimable)) { ?>
0892                             <div class="prod-widget-box prod-user right ">
0893                                 <div class="sidebar-content">
0894                                     <div class="product-maker-sidebar">
0895                                         <div class="product-maker-thumbnail relative">
0896                                             <a href="<?php echo $helpMemberUrl->buildMemberUrl($this->product->username); ?>"
0897                                                title="<?= $this->product->username ?>"  class="tooltipuserleft" data-tooltip-content="#tooltip_content" data-user="<?=$this->product->member_id?>">
0898                                                <?php
0899                                                   $isSupporter = $this->isSupporter($this->product->member_id);
0900                                                   $isSupporterActive = $this->isSupporterActive($this->product->member_id);
0901                                                     if($isSupporter) {
0902                                                 ?>
0903                                                     <span class="supporter-badge <?=($isSupporterActive?'':'inactive')?>" >S<?=$isSupporter?></span>
0904                                                 <?php } ?>
0905                                                 <img src="<?= $helpImage->Image($this->product->profile_image_url,
0906                                                     array('width' => 80, 'height' => 80)) ?>"
0907                                                      alt="product-maker" width="15" height="15"
0908                                                      class="sidebar-profile-image">
0909                                             </a>
0910                                         </div>
0911                                         <div class="product-maker-summary">
0912                                             <h5>
0913                                                 <a href="<?php echo $helpMemberUrl->buildMemberUrl($this->product->username); ?>" class="tooltipuserleft" data-tooltip-content="#tooltip_content" data-user="<?=$this->product->member_id?>">
0914                                                     <?= $this->product->username; ?>
0915                                                 </a>
0916                                             </h5>
0917 
0918                                         </div>
0919                                     </div>
0920                                 </div>
0921                             </div>
0922                         <?php } ?>
0923 
0924                         <!-- Plings -->
0925                         <div class="prod-widget-box right ">
0926 
0927                                 <div class="projectdtailHeart">
0928 
0929 
0930                                     <div id="container-pling<?=$this->product->project_id?>" class="container-pling" >
0931                                     <?php
0932                                         echo $this->partial(
0933                                             '/product/partials/projectplings.phtml',
0934                                             array(
0935                                                 "authMember"  => $identity,
0936                                                 "project_id" => $this->product->project_id,
0937                                                 "ppload_collection_id" => $this->product->ppload_collection_id,
0938                                                 "project_category_id" => $this->product->project_category_id
0939                                             )
0940                                         );
0941                                     ?>
0942                                     </div>
0943                                 </div>
0944                         </div>
0945                         
0946                         
0947                         <!-- Affiliates -->
0948                         <div class="prod-widget-box right "  style="height: 42px;">
0949                                 <div class="projectdtailHeart">
0950                                     <div id="container-affiliate<?=$this->product->project_id?>" class="container-pling"  style="float: right;">
0951                                         <div class="plingbartext"><span class="plingnum"> <?= count($this->projectaffiliates) ?> Affiliate<?= count($this->projectaffiliates) == 0?'s':'' ?><?= count($this->projectaffiliates) > 1?'s':'' ?></span> </div>
0952                                     </div>
0953                                 </div>
0954                         </div>
0955                         
0956                         <!-- Support Box -->
0957                         <?php
0958                             /* 20200102 ronald: show allways the support box, see ticket #1553
0959                             if($this->product->paypal_mail)
0960                             {
0961                              * 
0962                              */
0963                                 echo $this->partial(
0964                                     '/product/partials/support_box.phtml',
0965                                     array(
0966                                         "authMember"  => $identity,
0967                                         "project_id" => $this->product->project_id,
0968                                         "project_title" => $this->product->title,
0969                                         "ppload_collection_id" => $this->product->ppload_collection_id,
0970                                         "project_category_id" => $this->product->project_category_id,
0971                                         "project_category_title" => $this->product->cat_title,
0972                                         "isAdmin" => $isAdmin
0973                                     )
0974                                 );
0975                             /*}*/
0976                         ?>
0977 
0978                         <?php /* echo $this->render('partials/sidebarRating.phtml');  */ ?>
0979                           <?php /*
0980                         <div>
0981                             <div class="prod-widget-box right">
0982                                 <div  class="btn-group dropleft" style="width: 100%">
0983                                     <button style="width: 100%" id="project_btn_download" class="btn btn-primary active" type="button">
0984                                     Get it
0985                                     </button>
0986                                 </div>
0987                             </div>
0988                         </div>
0989                             */
0990                         ?>
0991 
0992                         <?php
0993                             $cntCollections = $tableCollection->countAllCollectionsForProject($this->product->project_id);
0994                             if($cntCollections>0) {
0995                        ?>
0996                        <!-- is part of collection -->
0997                         <div>
0998                             <?php
0999                             $this->moreProducts = $tableCollection->fetchAllCollectionsForProject($this->product->project_id, 6);
1000                             $this->moreProductsTitle = 'Is part of these Collections';
1001 
1002                             if (count($this->moreProducts) > 0) {
1003                             echo $this->render('product/partials/productMoreProductsWidgetV1.phtml');
1004                             } ?>
1005                         </div>
1006                         <!-- /is part of colelction -->
1007                         <?php
1008                             }
1009                         ?>
1010 
1011                         
1012 
1013 
1014                        <!-- origins-->
1015                        <div>
1016                            <div class="prod-widget-box right">
1017                                 <div >
1018                                 <?php if ($isAdmin) {      ?>
1019                                     <div id="add-project-relationship"></div>                   
1020                                 <?php }?>             
1021                                 <?php if (Zend_Auth::getInstance()->hasIdentity()) {      ?>
1022                                        <a data-toggle="modal" data-target="#report-product-clone-<?= $this->product->project_id ?>" role="button"
1023                                           href="#report-product-clone-<?= $this->product->project_id ?>">
1024                                             mark this product as clone
1025                                        </a>
1026                                    <?php }else{ ?>
1027                                             <a data-toggle="modal" data-target="#like-product-modal" role="button">
1028                                            mark this product as clone
1029                                             </a>
1030                                    <?php } ?>
1031 
1032                                </div>
1033 
1034                                 <?php
1035                                 $modelClone = new Default_Model_ProjectClone();
1036 
1037                                $origins =  $modelClone->fetchOrigins($this->product->project_id);
1038                                $this->moreProducts = $origins;
1039                                $this->moreProductsTitle = 'Based on';
1040                                if (count($this->moreProducts) > 0) {
1041                                        echo $this->render('product/partials/productCloneFrom.phtml');
1042 
1043                                } ?>
1044 
1045 
1046                                <?php
1047                               $relatednew=array();
1048                               $related =  $modelClone->fetchRelatedProducts($this->product->project_id);
1049                               $bflag = false;
1050                               foreach ($related as $r){
1051                                     $rid = $r->project_id;
1052                                     $bflag = false;
1053                                     foreach ($origins as $o){
1054                                           $oid = $o->project_id;
1055                                           if($rid == $oid){
1056                                                 $bflag = true;
1057                                                 break;
1058                                           }
1059                                     }
1060                                     if(!$bflag)
1061                                     {
1062                                         $relatednew[] = $r;
1063                                     }
1064                               }
1065 
1066                               $this->moreProducts = $relatednew;
1067 
1068                               $this->moreProductsTitle = 'Variants';
1069                               if (count($this->moreProducts) > 0) {
1070                                       echo $this->render('product/partials/productCloneFrom.phtml');
1071 
1072                               } ?>
1073 
1074                            </div>
1075                        </div>
1076 
1077 
1078 
1079 
1080 
1081                         <!-- MORE PRODUCTS -->
1082 
1083                         <div>
1084                             <?php
1085                             $this->moreProducts = $tableProject->fetchMoreProjects($this->product, 6);
1086                             $this->moreProductsTitle = 'More ' . $this->product->cat_title . ' from ' . $this->product->username;
1087 
1088                             if (count($this->moreProducts) > 0) {
1089                             echo $this->render('product/partials/productMoreProductsWidgetV1.phtml');
1090                             } ?>
1091                         </div>
1092 
1093                         <div>
1094                             <?php
1095                             $this->moreProducts = $tableProject->fetchMoreProjectsOfOtherUsr($this->product, 6);
1096                             $this->moreProductsTitle = 'Other ' . $this->product->cat_title;
1097 
1098                             if (count($this->moreProducts) > 0) {
1099                             echo $this->render('product/partials/productMoreProductsWidgetV1.phtml');
1100                             } ?>
1101                         </div>
1102                         <!-- /MORE PRODUCTS -->
1103 
1104 
1105                         <?php echo $this->render('partials/sidebarCcLicense.phtml'); ?>
1106 
1107                         <?php
1108                             $isEbookHelper = new Default_View_Helper_IsProjectEbook();
1109                             if($isEbookHelper->isProjectEbook($this->product->project_id)) {
1110                                 echo $this->render('product/partials/ebook_details.phtml');
1111                             }
1112                         ?>
1113 
1114                         <?php echo $this->render('product/partials/details.phtml'); ?>
1115 
1116                       <?php echo $this->render('product/partials/tags.phtml'); ?>
1117 
1118 
1119 
1120                     </div>
1121                 </div>
1122 
1123             </div>
1124         </div>
1125          <div class="tooltip_templates" style="display: none">
1126             <span id="tooltip_content">
1127                 <i class="fa fa-spinner"></i>
1128             </span>
1129         </div>
1130     </main>
1131    
1132 
1133 
1134 <script type="application/javascript">
1135     // tool tips
1136     $('body').on('mouseenter', '.product-thumbnail, .supporter-thumbnail', function () {
1137         $(this).popover('show');
1138     });
1139 
1140     $('body').on('mouseleave', '.product-thumbnail, .supporter-thumbnail', function () {
1141         $(this).popover('hide');
1142     });
1143 </script>
1144 
1145 <!-- PRODUCT MEDIA SLIDER JS -->
1146 
1147 <script type="text/javascript">
1148   var product = <?php echo $productJson ?>;
1149   var filesJson  = <?php echo $filesJson ?>;
1150   var xdgTypeJson = <?php echo $xdgTypeJson ?>;
1151   var galleryPicturesJson = <?php echo $galleryPicturesJson?>;
1152 </script>
1153 
1154 
1155 <script type="text/javascript" src="/theme/react/lib/jszip/jszip.min.js"></script>
1156 <script type="text/javascript" src="/theme/react/lib/epub/epub.min.js"></script>
1157 
1158 <script type="text/javascript" src="/theme/react/lib/swiper/swiper.min.js"></script>
1159 
1160 <script type="text/javascript" src="/theme/react/lib/bookblock/js/modernizr.custom.js"></script>
1161 <script type="text/javascript" src="/theme/react/lib/bookblock/js/jquerypp.custom.js"></script>
1162 <script type="text/javascript" src="/theme/react/lib/bookblock/js/jquery.bookblock.min.js"></script>
1163 
1164 <script type="text/javascript" src="/theme/react/bundle/product-media-slider-bundle.js?<?= APPLICATION_VERSION ?>"></script>
1165 
1166 <!-- /PRODUCT MEDIA SLIDER JS -->
1167 
1168 
1169 <script src="/theme/react/bundle/app-product-relationship-bundle.js?<?= APPLICATION_VERSION ?>"></script>
1170 <script src="/theme/react/bundle/tag-rating-bundle.js?<?= APPLICATION_VERSION ?>"></script>
1171 
1172 
1173 <?php $this->inlineScript()->appendScript(
1174     '    $(document).ready(function(){
1175             InitActiveHashTab.setup();
1176             PartialJson.setup();
1177             PartialJsonFraud.setup();
1178             PartialJsonClone.setup();
1179             ProductDetailCarousel.setup();
1180             PartialCommentReviewForm.setup();
1181             PartialCommentReviewFormNew.setup();
1182             PartialsButtonHeartDetail.setup();
1183             PartialsButtonPlingProject.setup();
1184             TooltipUser.setup("tooltipuserleft","left");
1185             AppimagequestionOnClick.setup();
1186             Opendownloadfile.setup();
1187             CreateScoreRatingPopup.setup();
1188             PagedetailModeratorDeprecated.setup('.$this->product->project_id.');
1189             $(\'.tooltipheart\').tooltipster({theme: [\'tooltipster-light\', \'tooltipster-light-customized\'],
1190                     contentCloning: true,
1191                     contentAsHTML: true,
1192                     interactive: true});
1193 
1194         });
1195     ');