t['p']->get( 'pageclass_sfx' ).'" >'; //if ( $this->t['p']->get( 'show_page_heading' ) ) { // echo '

'. $this->escape($this->t['p']->get('page_heading')) . '

'; //} echo PhocaDownloadRenderFront::renderHeader(array()); if (!empty($this->category[0])) { echo '
'; if ($this->t['display_up_icon'] == 1 && $this->t['tmplr'] == 0) { if (isset($this->category[0]->id)) { if ($this->category[0]->id > 0) { $linkUp = Route::_(PhocaDownloadRoute::getCategoryRoute($this->category[0]->id, $this->category[0]->alias)); $linkUpText = $this->category[0]->title; } else { $linkUp = '#'; $linkUpText = ''; } echo '
' .' ' . $linkUpText .'
'; } } } else { echo '
'; } if (!empty($this->file[0])) { $v = $this->file[0]; // USER RIGHT - Access of categories (if file is included in some not accessed category) - - - - - // ACCESS is handled in SQL query, ACCESS USER ID is handled here (specific users) $rightDisplay = 0; if (!empty($this->category[0])) { $rightDisplay = PhocaDownloadAccess::getUserRight('accessuserid', $v->cataccessuserid, $v->cataccess, $this->t['user']->getAuthorisedViewLevels(), $this->t['user']->get('id', 0), 0); } // - - - - - - - - - - - - - - - - - - - - - - if ($rightDisplay == 1) { $l = new PhocaDownloadLayout(); //echo '

'.$l->getName($v->title, $v->filename, 1). '

'; echo PhocaDownloadRenderFront::renderSubHeader(array($l->getName($v->title, $v->filename, 1)), '', 'pd-ctitle pdfv-name'); // ===================================================================================== // BEGIN LAYOUT AREA // ===================================================================================== // Is this direct menu link to File View $directFv = 0; $app = Factory::getApplication(); $itemId = $app->input->get('Itemid', 0, 'int'); $menu = $app->getMenu(); $item = $menu->getItem($itemId); if (isset($item->query['view']) && $item->query['view'] == 'file') { $directFv = 1; } // End direct menu link to File View if ((int)$this->t['display_file_view'] == 1 || (int)$this->t['display_file_view'] == 2 || (int)$v->confirm_license > 0 || (int)$this->t['display_detail'] == 2 || (int)$this->t['display_detail'] == 3 || (int)$directFv == 1) { $pdTitle = ''; if ($v->title != '' && $this->t['filename_or_name'] != 'filenametitle') { $pdTitle .= '
'.$v->title.'
'; } $pdImage = ''; if ($v->image_download != '') { $pdImage .= '
'.$l->getImageDownload($v->image_download).'
'; } $pdVideo = ''; $pdVideo = $l->displayVideo($v->video_filename, 1); if ($v->filename != '') { $imageFileName = $l->getImageFileName($v->image_filename, $v->filename); $pdFile = '
'; if ($this->t['filename_or_name'] == 'filenametitle') { $pdFile .= '
'. $v->title . '
'; } $pdFile .= '
'. $imageFileName['filenamethumb'] . '
'; $pdFile .= '
'; $pdFile .= $l->getName($v->title, $v->filename); $pdFile .= '
'; $pdFile .= PhocaDownloadRenderFront::displayNewIcon($v->date, $this->t['displaynew']); $pdFile .= PhocaDownloadRenderFront::displayHotIcon($v->hits, $this->t['displayhot']); // String Tags - title suffix $tagsS = $l->displayTagsString($v->tags_string); if ($tagsS != '') { $pdFile .= '
'.$tagsS.'
'; } // Tags - title suffix if ($this->t['display_tags_links'] == 5 || $this->t['display_tags_links'] == 6) { $tags = $l->displayTags($v->id, 1); if ($tags != '') { $pdFile .= '
'.$tags.'
'; } } //Specific icons if (isset($v->image_filename_spec1) && $v->image_filename_spec1 != '') { $pdFile .= '
'.$l->getImageDownload($v->image_filename_spec1).'
'; } if (isset($v->image_filename_spec2) && $v->image_filename_spec2 != '') { $pdFile .= '
'.$l->getImageDownload($v->image_filename_spec2).'
'; } $pdFile .= '
' . "\n"; } $pdFileSize = ''; $fileSize = $l->getFilesize($v->filename); if ($fileSize != '') { $pdFileSize .= '
'.Text::_('COM_PHOCADOWNLOAD_FILESIZE').':
'; $pdFileSize .= '
'.$fileSize.'
'; } $pdVersion = ''; if ($v->version != '') { $pdVersion .= '
'.Text::_('COM_PHOCADOWNLOAD_VERSION').':
'; $pdVersion .= '
'.$v->version.'
'; } $pdLicense = ''; if ($v->license != '') { if ($v->license_url != '') { $pdLicense .= '
'.Text::_('COM_PHOCADOWNLOAD_LICENSE').':
'; $pdLicense .= ''; } else { $pdLicense .= '
'.Text::_('COM_PHOCADOWNLOAD_LICENSE').':
'; $pdLicense .= '
'.$v->license.'
'; } } $pdAuthor = ''; if ($v->author != '') { if ($v->author_url != '') { $pdAuthor .= '
'.Text::_('COM_PHOCADOWNLOAD_AUTHOR').':
'; $pdAuthor .= ''; } else { $pdAuthor .= '
'.Text::_('COM_PHOCADOWNLOAD_AUTHOR').':
'; $pdAuthor .= '
'.$v->author.'
'; } } $pdAuthorEmail = ''; if ($v->author_email != '') { $pdAuthorEmail .= '
'.Text::_('COM_PHOCADOWNLOAD_EMAIL').':
'; $pdAuthorEmail .= '
'. $l->getProtectEmail($v->author_email).'
'; } $pdFileDate = ''; $fileDate = $l->getFileDate($v->filename, $v->date); if ($fileDate != '') { $pdFileDate .= '
'.Text::_('COM_PHOCADOWNLOAD_DATE').':
'; $pdFileDate .= '
'.$fileDate.'
'; } $pdDownloads = ''; if ($this->t['display_downloads'] == 1) { $pdDownloads .= '
'.Text::_('COM_PHOCADOWNLOAD_DOWNLOADS').':
'; $pdDownloads .= '
'.$v->hits.' x
'; /*for ($i = 2; $i < 1001; $i++) { if (($v->hits > 1 && $v->hits < 5) || ($v->hits > $i * 10 + 1 && $v->hits < $i * 10 + 5)) { $numD = 'COM_PHOCADOWNLOAD_NUMBER_OF_DOWNLOADS_3'; break; } elseif (($v->hits == 0) || ($v->hits > 4 && $v->hits < 22) || ($v->hits > $i * 10 + 4 && $v->hits < $i * 10 + 12)) { $numD = 'COM_PHOCADOWNLOAD_NUMBER_OF_DOWNLOADS_2'; break; } elseif ($v->hits == 1) { $numD = 'COM_PHOCADOWNLOAD_NUMBER_OF_DOWNLOADS_1'; break; } } $pdDownloads .= '
'.$v->hits.' '.Text::_($numD).'
'; */ } $pdDescription = ''; if ($l->isValueEditor($v->description)) { //$pdDescription .= '
'.$v->description.'
'; $pdDescription .= '
'. HTMLHelper::_('content.prepare', $v->description) . '
'; } $pdFeatures = ''; if ($l->isValueEditor($v->features)) { $pdFeatures .= '
'.Text::_('COM_PHOCADOWNLOAD_FEATURES').'
'; $pdFeatures .= '
'.$v->features.'
'; } $pdChangelog = ''; if ($l->isValueEditor($v->changelog)) { $pdChangelog .= '
'.Text::_('COM_PHOCADOWNLOAD_CHANGELOG').'
'; $pdChangelog .= '
'.$v->changelog.'
'; } $pdNotes = ''; if ($l->isValueEditor($v->notes)) { $pdNotes .= '
'.Text::_('COM_PHOCADOWNLOAD_NOTES').'
'; $pdNotes .= '
'.$v->notes.'
'; } /// pdmirrorlink1 $pdMirrorLink1 = ''; $mirrorOutput1 = PhocaDownloadRenderFront::displayMirrorLinks(1, $v->mirror1link, $v->mirror1title, $v->mirror1target); if ($mirrorOutput1 != '') { if ($this->t['display_mirror_links'] == 4 || $this->t['display_mirror_links'] == 6) { $classMirror = 'pd-button-mirror1'; $mirrorOutput1 = str_replace('class=""', 'class="btn btn-primary "', $mirrorOutput1); } else { $classMirror = 'pd-mirror-bp'; } $pdMirrorLink1 = '
'.$mirrorOutput1.'
'; } /// pdmirrorlink2 $pdMirrorLink2 = ''; $mirrorOutput2 = PhocaDownloadRenderFront::displayMirrorLinks(1, $v->mirror2link, $v->mirror2title, $v->mirror2target); if ($mirrorOutput2 != '') { if ($this->t['display_mirror_links'] == 4 || $this->t['display_mirror_links'] == 6) { $classMirror = 'pd-button-mirror2'; $mirrorOutput2 = str_replace('class=""', 'class="btn btn-primary "', $mirrorOutput2); } else { $classMirror = 'pd-mirror-bp'; } $pdMirrorLink2 = '
'.$mirrorOutput2.'
'; } // pdreportlink $pdReportLink = PhocaDownloadRenderFront::displayReportLink(1, $v->title); // pdrating $pdRating = PhocaDownloadRate::renderRateFile($v->id, $this->t['display_rating_file']); // pdtags $pdTags = ''; if ($this->t['display_tags_links'] == 2 || $this->t['display_tags_links'] == 3) { $tags2 = $l->displayTags($v->id); if ($tags2 != '') { $pdTags .= '
'.$tags2.'
'; } } // RENDER echo '
'; echo '
'; echo '
'; echo $pdTitle; echo $pdImage; echo $pdFile; echo $pdFileSize; echo $pdVersion; echo $pdLicense; echo $pdAuthor; echo $pdAuthorEmail; echo $pdFileDate; echo $pdDownloads; echo $pdDescription; echo $pdFeatures; echo $pdChangelog; echo $pdNotes; if ($pdVideo != '') { echo '
' . $pdVideo . '
'; } if ($pdRating != '') { echo '
' . $pdRating . '
'; } echo '
'; // end col, end row echo '
'; echo '
'; if ($this->t['display_mirror_links'] == 5 || $this->t['display_mirror_links'] == 6) { echo '
'.$pdMirrorLink2.'
'; echo '
'.$pdMirrorLink1.'
'; } else if ($this->t['display_mirror_links'] == 2 || $this->t['display_mirror_links'] == 3) { echo '
'.$pdMirrorLink2.$pdMirrorLink1.'
'; } if ($pdReportLink != '') { echo '
' . $pdReportLink . '
'; } if ($pdReportLink != '') { echo '
'.$pdTags.'
'; } echo '
'; echo '
'; echo '
'; // end col, end row /// $o = '
 
'; $o = ''; if ((int)$v->confirm_license > 0) { $o .= '

'.Text::_('COM_PHOCADOWNLOAD_LICENSE_AGREEMENT').'

'; $o .= '
'.$v->licensetext.'
'; // External link if ($v->link_external != '' && $v->directlink == 1) { $o .= '
'; $o .= ' '.Text::_('COM_PHOCADOWNLOAD_I_AGREE_TO_TERMS_LISTED_ABOVE').' '; $o .= ''; } else { $o .= ''; $o .= ' '.Text::_('COM_PHOCADOWNLOAD_I_AGREE_TO_TERMS_LISTED_ABOVE').' '; $o .= ''; $o .= ''; $o .= ''; } $o .= '
'; // For users who have disabled Javascript $o .= ''; } else { // External link if ($v->link_external != '') { if ($v->directlink == 1){ $finalLink = $v->link_external; } else { $finalLink = Route::_(PhocaDownloadRoute::getFileRoute($v->id, $v->categoryid,$v->alias, $v->categoryalias, 0, 'download')); } $o .= '
'; $o .= ''; } else { $o .= ''; $o .= ''; $o .= ''; $o .= ''; $o .= ''; } $o .= '
'; } /* if ($this->t['display_file_comments'] == 1) { if (ComponentHelper::isEnabled('com_jcomments', true)) { include_once(JPATH_BASE.'/components/com_jcomments/jcomments.php'); $o .= JComments::showComments($v->id, 'com_phocadownload_files', Text::_('COM_PHOCADOWNLOAD_FILE') .' '. $v->title); } } if ($this->t['display_file_comments'] == 2) { $o .= '
'.$this->loadTemplate('comments-fb').'
'; }*/ echo '
'; echo '
'; echo $o; echo '
'; // end col, end row } else { echo '
'; echo '
'; echo '

'.Text::_('COM_PHOCADOWNLOAD_FILE') .'

'; echo '
'.Text::_('COM_PHOCADOWNLOAD_NO_RIGHTS_ACCESS_CATEGORY').'
'; echo '
'; // end col, end row } } echo '
 
';// end of box } else { echo '
 
'; } echo '
'; echo '
 
'; echo PhocaDownloadUtils::getInfo(); ?>