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


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

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

$itemid = intval($itemid);
$strSql = "select * from {$configTableHead}img where lang='{$kuWebsiteCurrLanguage}'  and id='{$itemid}';";
$result = $dbInstance->query($strSql);
$kuImgShow = $dbInstance->fetchArray($result);
$kuImgShow['imgcontent'] = stripslashes($kuImgShow['imgcontent']);

$kuBlockImgShowTitle = $kuImgShow['imgtitle'];               
$kuWebsitePageTitle = $kuBlockImgShowTitle.' - '.$kuWebsiteTitleKeyWords.' - '.$kuWebsiteTitle.$kuPostfix;
$kuWebsiteKeyWords = $row['menukeywords'] ? $row['menukeywords'] : $kuWebsiteKeyWords;
$kuWebsiteDescription = $row['menudesc'] ? $row['menudesc'] : $kuWebsiteDescription;

$kuProductShowId = $kuImgShow['id']; 
$kuProductTopMenuId = $kuImgShow['type1'];
$kuImgShow['imgurlpre'] =  $kuUploadPath.$kuImgShow['imgurlpre'];
$kuImgShow['imgurl'] =  $kuUploadPath.$kuImgShow['imgurl'];
$kuImgShow['addtime10'] = substr($kuImgShow['addtime'], 0, 10);
$kuImgShow['addtime5'] = substr($kuImgShow['addtime'], 5, 5);
$kuImgShow['updatetime10'] = substr($kuImgShow['updatetime'], 0, 10);
$kuImgShow['updatetime5'] = substr($kuImgShow['updatetime'], 5, 5);

$kuImgShow['imgurllink'] = $kuHttpPath."img/img.php?lang={$kuWebsiteCurrLanguage}&item={$imgRow['id']}";
for($j=1; $j<=10; $j++)
{
  $kuImgShow['paratitle'.$j] = $arrImgPara[$j];
  $kuImgShowParaTitle[$j] = $arrImgPara[$j];
  $tempPara = 'para'.$j;
  $kuImgShowParaContent[$j] = $kuImgShow[$tempPara];
}


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


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


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



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