<?php
require_once('inc/common.inc.php');
CommTool::checkIncludeByAdminPhp();



$strSql = "select id, menutitle from {$configTableHead}menu where fatherid={$menuid} and lang='{$kuWebsiteEditVersionLanguage}';";
$result = $dbInstance->query($strSql);
while($row = $dbInstance->fetchArray($result))
{
  $secondMenuNav[] = $row;
}


if(is_array($secondMenuNav))
{
  foreach ($secondMenuNav as $key=>$value)
  {
    $fatherId .= $value['id'].',';
  }
  if('' != $fatherId)
  {
      $fatherId = substr($fatherId, 0, strlen($fatherId)-1);
      $strSql = "select id, menutitle, lang from {$configTableHead}menu where fatherid in ($fatherId) and lang='{$kuWebsiteEditVersionLanguage}';";
      $result = $dbInstance->query($strSql);
      while($row = $dbInstance->fetchArray($result))
      {
          $thirdMenuNav[] = $row;
      }
  }
}

 
$strSql = "select id, paraname from {$configTableHead}para where id between 30 and 39 and paraname!='' and enable=1 and lang='{$kuWebsiteEditVersionLanguage}' order by id;";
$result = $dbInstance->query($strSql);
while($row = $dbInstance->fetchArray($result))
{
  $arrPara[] = $row;
}


$strSql = "select * from {$configTableHead}product where id={$id} and lang='{$kuWebsiteEditVersionLanguage}'";
$result = $dbInstance->query($strSql);
$productRow = $dbInstance->fetchArray($result);
if(1 == $productRow['isnew']){$isNewFlag = "checked='checked'";}
if(1 == $productRow['isrecommend']){$isRecommendFlag = "checked='checked'";}
$statusFlagArr[$productRow['status']] = "checked='checked'";
if(1 == $productRow['showindex']){$showSettingFlagArr['showindex'] = "checked='checked'";}
if(1 == $productRow['showsub']){$showSettingFlagArr['showsub'] = "checked='checked'";}
$langFlagArr[$productRow['lang']] = "checked='checked'";


$type2 = $productRow['type2'];
$type3 = $productRow['type3'];
$productRow['productcontent'] = stripslashes($productRow['productcontent']);
include_once template('product_modify.html', $adminTemplateName);
?>