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

if(empty($itemid)){echo "<script>window.location.href='$kuHttpPath';</script>";exit;}

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

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

$itemid = intval($itemid);
$strSql = "select * from {$configTableHead}product where lang='{$kuWebsiteCurrLanguage}'  and id='{$itemid}' and showsub=1;";
$result = $dbInstance->query($strSql);
$kuProductShow = $dbInstance->fetchArray($result);
$kuProductShow['productcontent'] = stripslashes($kuProductShow['productcontent']);

$kuBlockProductShowTitle = $kuProductShow['producttitle'];                                         
$kuWebsitePageTitle = $kuBlockProductShowTitle.' - '.$kuWebsiteTitleKeyWords.' - '.$kuWebsiteTitle.$kuPostfix;
$kuWebsiteKeyWords = $row['menukeywords'] ? $row['menukeywords'] : $kuWebsiteKeyWords;
$kuWebsiteDescription = $row['menudesc'] ? $row['menudesc'] : $kuWebsiteDescription;

$kuProductShowId = $kuProductShow['id']; 
$kuProductTopMenuId = $kuProductShow['type1'];
$kuProductShow['imgurlpre'] =  $kuUploadPath.$kuProductShow['imgurlpre'];
$kuProductShow['imgurl'] =  $kuUploadPath.$kuProductShow['imgurl'];
$kuProductShow['producturl'] = $kuHttpPath."product/product.php?lang={$kuWebsiteCurrLanguage}&itemid={$kuProductShow['id']}";
$kuProductShow['addtime10'] = substr($kuProductShow['addtime'], 0, 10);
$kuProductShow['addtime5'] = substr($kuProductShow['addtime'], 5, 5);
$kuProductShow['updatetime10'] = substr($kuProductShow['updatetime'], 0, 10);
$kuProductShow['updatetime5'] = substr($kuProductShow['updatetime'], 5, 5);

for($j=1; $j<=10; $j++)
{
  $kuProductShow['paratitle'.$j] = $arrProductPara[$j];
  $kuProductShowParaTitle[$j] = $arrProductPara[$j];
  $tempPara = 'para'.$j;
  $kuProductShowParaContent[$j] = $kuProductShow[$tempPara];
}                                                        


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

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


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



$topNavId = $kuProductShow['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('productshow');
?>