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

if("sort" == $action)                                              
{
  foreach($sortnum as $id=>$sortNum)
  {
    $sortNum = intval($sortNum);
    $dbInstance->query("update {$configTableHead}server set sortnum={$sortNum} where id={$id}");    
  }
  promptMessage("index.php?lang={$kuWebsiteEditVersionLanguage}&path=system&menu=server", $promptSortRefreshSuccess, $configJumpTime);
}
$sql = "select * from {$configTableHead}server order by sortnum";
$result = $dbInstance->query($sql);
while($row = $dbInstance->fetchArray($result))
{
  if(1 == $row[enable])$row[labelEnable] = $labelCommonYes;
  else $row[labelEnable] = $labelCommonNo;
  $serverList[] = $row;
}
include_once template('server.html', $adminTemplateName);
?>