<?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 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 40 and 49 and enable=1 and paraname!='' and lang='{$kuWebsiteEditVersionLanguage}' order by id;";
$result = $dbInstance->query($strSql);
while($row = $dbInstance->fetchArray($result))
{
  $arrPara[] = $row;
}


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



$type2 = $imgRow['type2'];
$type3 = $imgRow['type3'];
$imgRow['imgcontent'] = stripslashes($imgRow['imgcontent']);
include_once template('img_modify.html', $adminTemplateName);

?>