<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	printFooter();
	exit;
}
?><!--<?php
print <<<EOT
-->
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="indextableborder1">
<tr> 
<td class="tdtit" colspan="6">¡ö ·ÖÀàÅÅÐò</td>
</tr>
<tr><td height="25"  class="forumrow">{$lang['list_str1']}</td><td height="25"  class="forumrow">{$lang['list_str2']}</td>
</tr>
</table>
<div class="tableborder" style="background:#C4D8ED;">
<form name="dv_board_order" id="dv_board_order" action="?action=saveorder&amp;parentid={$_GET['parentid']}" method="post" >
<!--
EOT;
$i=0;
$k=$db->num_rows($query);
while($forum = $db->fetch_array($query)) {
	if($forum['child']> 0 ){
	$img='images/t_plus.gif';
	$child='('.$forum['child'].')';
	}else{
		$img='images/t_minus.gif';
		$child='';
	}
$i++;
print <<<EOT
--><div class="forumrow2" style="border-top:#E4E4EF 1px solid;text-indent:12px;height:24px;">
<div style="float:right;width:140px;text-indent:0px;height:24px;">
<div style="float:left;width:20px;"><!--
EOT;
if($i!=1){
print <<<EOT
--><img src="images/t_u.gif" alt="{$lang['str_up']}" style="width:16px;margin-top:5px;margin-right:2px;cursor : pointer;" onclick="upboard({$i})"/><!--
EOT;
}else{
print <<<EOT
--><img src="images/t_u.gif" alt="" style="width:16px;margin-top:5px;margin-right:2px;"/><!--
EOT;
}
print <<<EOT
-->
</div>
<div style="float:left;width:20px;">
<!--
EOT;
if($i!=$k){
print <<<EOT
--><img src="images/t_d.gif" alt="{$lang['str_down']}" style="width:16px;margin-top:5px;margin-right:2px;cursor : pointer;" onclick="downboard({$i})"/>
<!--
EOT;
}else{
print <<<EOT
--><img src="images/t_d.gif" alt="" style="width:16px;margin-top:5px;margin-right:2px;" />
<!--
EOT;
}
print <<<EOT
--></div><!--
EOT;
if($forum['child']> 1 ){
print <<<EOT
--> | <a href="board.php?action=orders&amp;parentid={$forum['boardid']}">{$lang['list_str5_1']}</a><!--
EOT;
}else{
print <<<EOT
--> | <font style="color:#ccc">{$lang['list_str5']}</font><!--
EOT;
}
print <<<EOT
--></div>
<div style="float:left;">{$i}</div>
<div style="float:left;"><img src="{$img}" alt="" style="margin-top:8px;margin-right:5px;"/></div>
<div id="board_{$i}" style="float:left;text-indent:0px;">{$forum['boardtype']}{$child}<input type="hidden" name="order[]" value="{$forum['boardid']}" /></div>
</div>
<!--
EOT;
}
print <<<EOT
--><div class="forumrow1" style="text-align:center;">
<input type="submit" class="button" name="submit" id="submit" value="{$lang['submit_order']}" style="margin-top:4px;" />
</div>
</form>
</div>
<!--
EOT;
?>--><script language="javascript" type="text/javascript">
function upboard(n){
	var obj1=document.getElementById('board_' +n);
	var obj2=document.getElementById('board_' +(n-1));
	if(obj1!=null && obj2!=null){
		HTML1=obj1.innerHTML;
		HTML2=obj2.innerHTML;
		obj1.innerHTML=HTML2;
		obj2.innerHTML=HTML1
		}
	}
function downboard(n){
	var obj1=document.getElementById('board_' +n);
	var obj2=document.getElementById('board_' +(n+1));
	if(obj1!=null && obj2!=null){
		HTML1=obj1.innerHTML;
		HTML2=obj2.innerHTML;
		obj1.innerHTML=HTML2;
		obj2.innerHTML=HTML1
		}
	}
</script>
