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


$type2 = $downloadRow['type2'];
$type3 = $downloadRow['type3'];
$downloadRow['downloadcontent'] = stripslashes($downloadRow['downloadcontent']);
include_once template('download_modify.html', $adminTemplateName);
?>