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


$type2 = $faqRow['type2'];
$type3 = $faqRow['type3'];
$faqRow['faqcontent'] = stripslashes($faqRow['faqcontent']);
$faqRow['faqreplycontent'] = stripslashes($faqRow['faqreplycontent']);
include_once template('faq_modify.html', $adminTemplateName);
?>