<?php
require_once '../inc/common.inc.php';


$moduleId = 5;
$moduleName = $arrAllModule[$moduleId];

$i = 1;
$strSql = "select paraname from {$configTableHead}para where lang='{$kuWebsiteCurrLanguage}' and id between 50 and 59;";
$result = $dbInstance->query($strSql);
while($downloadPara = $dbInstance->fetchArray($result))
{
  $arrDownloadPara[$i] = $downloadPara['paraname'];
  $i++;
}

$itemid = intval($itemid);
$strSql = "select * from {$configTableHead}download where lang='{$kuWebsiteCurrLanguage}' and id='{$itemid}' and showsub=1;";
$result = $dbInstance->query($strSql);
$kuDownloadShow = $dbInstance->fetchArray($result);
$kuDownloadShow['downloadcontent'] = stripcslashes($kuDownloadShow['downloadcontent']);

$kuBlockDownloadShowTitle = $kuDownloadShow['downloadtitle'];                         
$kuWebsitePageTitle = $kuBlockDownloadShowTitle.' - '.$kuWebsiteTitleKeyWords.' - '.$kuWebsiteTitle.$kuPostfix;
$kuWebsiteKeyWords = $row['menukeywords'] ? $row['menukeywords'] : $kuWebsiteKeyWords;
$kuWebsiteDescription = $row['menudesc'] ? $row['menudesc'] : $kuWebsiteDescription;


$kuDownloadShow['downloadurl'] = $kuHttpPath."download/download.php?lang={$kuWebsiteCurrLanguage}&itemid={$downloadRow['id']}";
for($j=1; $j<=10; $j++)
{
  $kuDownloadShow['paratitle'.$j] = $arrDownloadPara[$j];
  $kuDownloadShowParaTitle[$j] = $arrDownloadPara[$j];
  $tempPara = 'para'.$j;
  $kuDownloadShowParaContent[$j] = $kuDownloadShow[$tempPara];
}                                                        

$kuDownloadShow['addtime10'] = substr($kuDownloadShow['addtime'], 0, 10);
$kuDownloadShow['addtime5'] = substr($kuDownloadShow['addtime'], 5, 5);
$kuDownloadShow['updatetime10'] = substr($kuDownloadShow['updatetime'], 0, 10);
$kuDownloadShow['updatetime5'] = substr($kuDownloadShow['updatetime'], 5, 5);


$kuDownloadShowPreNext = getPreNext($moduleName, $itemid, $kuWebsiteCurrLanguage);


$topMenuId = '';
if(count($kuMenuList[$kuDownloadShow['type3']]))$topMenuId = $kuDownloadShow['type3'];
else if(count($kuMenuList[$kuDownloadShow['type2']]))$topMenuId = $kuDownloadShow['type2'];
else if(count($kuMenuList[$kuDownloadShow['type1']]))$topMenuId = $kuDownloadShow['type1'];


$kuPositionId = $kuDownloadShow['type3'] ? $kuDownloadShow['type3'] : ($kuDownloadShow['type2'] ? $kuDownloadShow['type2'] : $kuDownloadShow['type1']);



$topNavId = $kuDownloadShow['type1'];
$kuStrBlockSideNav = $kuSideNav[$topNavId];


$kuStrBlockContact = $kuBlock[2];


include_once KUWEBS_ABSOLUTE_PATH."inc/headermenu.php"; 
include_once KUWEBS_ABSOLUTE_PATH."inc/footer.php";
include_once template('downloadshow');
?>