File indexing completed on 2024-12-29 05:24:43

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 $this->headTitle($_SERVER['HTTP_HOST'], 'SET');
0024 $this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA);
0025 $this->headMeta()->appendProperty('og:url', 'www.appimagehub.com');
0026 $this->headMeta()->appendProperty('og:type', 'website');
0027 $this->headMeta()->appendProperty('og:title', 'appimagehub.com');
0028 $this->headMeta()->appendProperty('og:site_name','www.appimagehub.com');
0029 $this->headMeta()->appendProperty('og:description','A community where developers and artists share applications, themes and other content');
0030 $this->headMeta()->appendProperty('og:image','https://www.appimagehub.com/images_sys/superstore/appimagehub-logo-4.png');
0031 
0032 
0033 $modelInfo = new Default_Model_Info();
0034 $helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl();
0035 $helperImage = new Default_View_Helper_Image();
0036 $helpPrintDate = new Default_View_Helper_PrintDate();
0037 
0038 $host = $_SERVER['SERVER_NAME'];
0039 
0040 $modelProject = new Default_Model_Project();
0041 $totalProjects = $modelProject->fetchTotalProjectsCount(true);
0042 
0043 if(strpos ( $host , ".cc" ) > 0 || strpos ( $host , ".local" ) > 0) {
0044     $products1 = $modelInfo->getJsonLastProductsForHostStores(15,"104");
0045     $products2 = $modelInfo->getJsonLastProductsForHostStores(15,"105");
0046     $products3 = $modelInfo->getJsonLastProductsForHostStores(15,"98");
0047     $products4= $modelInfo->getJsonLastProductsForHostStores(15,"57");
0048     $products5= $modelInfo->getJsonLastProductsForHostStores(15,"53");
0049     $products6 = $modelInfo->getJsonLastProductsForHostStores(15,"52");
0050     $products7 = $modelInfo->getJsonLastProductsForHostStores(15,"48");
0051     $products8 = $modelInfo->getJsonLastProductsForHostStores(15,"295,158");
0052     $products9 = $modelInfo->getJsonLastProductsForHostStores(15,"295,158");
0053     $products10 = $modelInfo->getJsonLastProductsForHostStores(15,"295,158");
0054 
0055     $response = array(
0056         'products1' => array('title' =>'Audio','catIds' =>'104','products' => $products1),
0057         'products2' => array('title' =>'Education','catIds' =>'105','products' => $products2),
0058         'products3' => array('title' =>'Games','catIds' =>'98','products' => $products3),
0059         'products4' => array('title' =>'Graphics','catIds' =>'57','products' => $products4),
0060         'products5' => array('title' =>'Internet','catIds' =>'53','products' => $products5),
0061         'products6' => array('title' =>'IoT','catIds' =>'52','products' => $products6),
0062         'products7' => array('title' =>'Office','catIds' =>'48','products' => $products7),
0063         'products8' => array('title' =>'Programming','catIds' =>'104','products' => $products8),
0064         'products9' => array('title' =>'System & Tools','catIds' =>'104','products' => $products9),
0065         'products10' => array('title' =>'Video','catIds' =>'104','products' => $products10),
0066     );
0067 
0068   } else {
0069     $products1 = $modelInfo->getJsonLastProductsForHostStores(15,"392");
0070     $products2 = $modelInfo->getJsonLastProductsForHostStores(15,"544");
0071     $products3 = $modelInfo->getJsonLastProductsForHostStores(15,"6");
0072     $products4= $modelInfo->getJsonLastProductsForHostStores(15,"526");
0073     $products5= $modelInfo->getJsonLastProductsForHostStores(15,"492");
0074     $products6 = $modelInfo->getJsonLastProductsForHostStores(15,"542");
0075     $products7 = $modelInfo->getJsonLastProductsForHostStores(15,"450");
0076     $products8 = $modelInfo->getJsonLastProductsForHostStores(15,"388");
0077     $products9 = $modelInfo->getJsonLastProductsForHostStores(15,"391");
0078     $products10 = $modelInfo->getJsonLastProductsForHostStores(15,"481");
0079 
0080     $response = array(
0081         'products1' => array('title' =>'Audio','catIds' =>'392','products' => $products1),
0082         'products2' => array('title' =>'Education','catIds' =>'544','products' => $products2),
0083         'products3' => array('title' =>'Games','catIds' =>'6','products' => $products3),
0084         'products4' => array('title' =>'Graphics','catIds' =>'526','products' => $products4),
0085         'products5' => array('title' =>'Internet','catIds' =>'492','products' => $products5),
0086         'products6' => array('title' =>'IoT','catIds' =>'542','products' => $products6),
0087         'products7' => array('title' =>'Office','catIds' =>'450','products' => $products7),
0088         'products8' => array('title' =>'Programming','catIds' =>'388','products' => $products8),
0089         'products9' => array('title' =>'System & Tools','catIds' =>'391','products' => $products9),
0090         'products10' => array('title' =>'Video','catIds' =>'481','products' => $products10),
0091     );
0092   }
0093   $helperBuildBaseUrl = new Default_View_Helper_BuildBaseUrl();
0094   $basrUrl = $helperBuildBaseUrl->buildBaseUrl();
0095 ?>
0096 
0097 <main id="explore-content"></main>
0098 <script type="text/javascript">
0099   var filters = {};
0100   var view = "home";
0101   var hpVersion = 2;
0102   var page = "appimages";
0103   var data = <?php echo Zend_Json::encode($response)?>;
0104   var totalProjects = <?php echo $totalProjects ?>;
0105   var baseUrl = <?php echo Zend_Json::encode($basrUrl)?>;
0106   console.log(data);
0107 </script>
0108 <link type="text/css" rel="stylesheet" href="/theme/react/assets/css/carousel.css"/>
0109 <div id="carousel-module-container" class="app-images-hub">
0110 </div>