diff --git a/application/modules/default/views/scripts/product/partials/details.phtml b/application/modules/default/views/scripts/product/partials/details.phtml index 51e956e9c..41c5b68d6 100644 --- a/application/modules/default/views/scripts/product/partials/details.phtml +++ b/application/modules/default/views/scripts/product/partials/details.phtml @@ -1,423 +1,427 @@ . **/ $tableProject = new Default_Model_Project(); $this->product_views = $tableProject->fetchProjectViews($this->product->project_id); $helperUserRole = new Backend_View_Helper_UserRole(); $userRoleName = $helperUserRole->userRole(); $tableTags = new Default_Model_Tags(); $tagsArray = $tableTags->getTagsArray($this->product->project_id, $tableTags::TAG_TYPE_PROJECT, $tableTags::TAG_GHNS_EXCLUDED_GROUPID); $isGhnsExcluded = false; if(isset($tagsArray) && (count($tagsArray) == 1)) { $isGhnsExcluded = true; } $filesTable = new Default_Model_DbTable_PploadFiles(); -$countDownloadsToday = $filesTable->fetchCountDownloadsTodayForProject($this->product->ppload_collection_id); -$countDownloadsTodayUk = $filesTable->fetchCountDownloadsTodayForProjectNew($this->product->ppload_collection_id); - $mediaViewsTable = new Default_Model_DbTable_MediaViews(); + +$countDownloadsToday = 0; +$countMediaViewsAlltime = 0; +if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) { + $countDownloadsToday = $filesTable->fetchCountDownloadsTodayForProject($this->product->ppload_collection_id); + $countMediaViewsAlltime = $mediaViewsTable->fetchCountViewsForProjectAllTime($this->product->project_id); +} +$countDownloadsTodayUk = $filesTable->fetchCountDownloadsTodayForProjectNew($this->product->ppload_collection_id); $countMediaViewsToday = $mediaViewsTable->fetchCountViewsTodayForProject($this->product->project_id); -$countMediaViewsAlltime = $mediaViewsTable->fetchCountViewsForProjectAllTime($this->product->project_id); $countPageviews = $this->projectDetailCounts($this->product->project_id); $countPageviewsTotal = 0; $countPageviewsToday = $countPageviews[0]['count_views']; if(sizeof($countPageviews)==2) $countPageviewsTotal = $countPageviews[1]['count_views']; // $heute = date("Y-m-d H:i:s"); $today = (new DateTime())->modify('-1 day'); $filterDownloadToday = $today->format("Y-m-d H:i:s"); ?>
Details
license
product->project_license_title; ?>
version
product->project_version); ?>
product->project_changed_at) { ?>
updated printDate($this->product->project_changed_at) ?>
major updated printDate($this->product->project_major_updated_at) ?>
added printDate($this->product->project_created_at) ?>
downloads 24h old
downloads 24h
mediaviews 24h
mediaviews total
pageviews 24h
pageviews total
spam reports fetchReportsSpamCnt($this->product->project_id) ?>
misuse reports fetchReportsMisuseCnt($this->product->project_id)?>
link to hive delete product
(remember the cache) after you change some value below and refresh the page you may encounter some differences to your changes
product->spam_checked == 1 ? ' checked=\'checked\' ' : ''; ?> /> spam checked (product->spam_checked == 1 ? '1' : '0'; ?>) product->featured == 1 ? ' checked=\'checked\' ' : ''; ?> /> featured (product->featured == 1 ? '1':'0'; ?>) /> ghns-excluded () product->pling_excluded == 1 ? ' checked=\'checked\' ' : ''; ?> /> pling-excluded (product->pling_excluded == 1 ? '1' : '0'; ?>) /> ghns-excluded
inlineScript()->appendScript( ' $(document).ready(function(){ GhnsExcludedClick.setup('.$this->product->project_id.'); }); '); }