<?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 * from {$configTableHead}news where id={$id} and lang='{$kuWebsiteEditVersionLanguage}'";
$result = $dbInstance->query($strSql);
$newsRow = $dbInstance->fetchArray($result);
if(1 == $newsRow['isrecommend']){$isRecommendFlag = "checked='checked'";}
$statusFlagArr[$newsRow['status']] = "checked='checked'";
if(1 == $newsRow['showindex']){$showSettingFlagArr['showindex'] = "checked='checked'";}
if(1 == $newsRow['showsub']){$showSettingFlagArr['showsub'] = "checked='checked'";}
$langFlagArr[$newsRow['lang']] = "checked='checked'";


$type2 = $newsRow['type2'];
$type3 = $newsRow['type3'];
$newsRow['newscontent'] = stripslashes($newsRow['newscontent']);

include_once template('news_modify.html', $adminTemplateName);
?>