<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<br>
<table border="0" cellspacing="1" cellpadding="1"  align="center" class="tableborder">
  <? if($action=="edit"){
	$sql="select id,groupname from {$dv}groupname where id=".intval($id);
	$sql_result=$db->query($sql);
	$edit_arr=$db->fetch_array($sql_result);
	$str=$lang['pai.info4'];
	$link1="<a href='menpai.php'>";
	$link2="</a>";
  ?>
  <form name="form1" method="post" action="?action=editok&id=<? echo $id?>">
  <?}else{ $str="";$link1="";$link2="";?>
  <form name="form1" method="post" action="?action=add">
  <?}?>
  <tr>
    <td colspan="2" class="tit1"><? echo $lang['pai.info1']?></td>
  </tr>
  <tr>
	<td class="forumrow" style="text-align:center;">
	<input type="submit" name="Submit" value="<? echo $lang['edit.info3']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
	</td>
	<td align="left" height="25" class="forumrow2"><b><? echo $lang['pai.info3']?></b><? echo $lang['pai.info2']?></td>
  </tr>
  <tr>
    <td colspan="2" class="tit1"><? echo $str?><? echo $link1.$lang['pai.info5'].$link2?></td>
  </tr>
  <tr>
  <td align="left" width="15%" class="forumrow"><b><? echo $lang['pai.info6']?><? echo $lang['pai.info10']?></b></td>
    <td align="left" width="85%" class="forumrow">
      <input name="pai_name" type="text" id="pai_name" size="40" value="<? echo $edit_arr['groupname']?>">
      <input type="submit" class="button" name="Submit" value=" <? echo $lang['pai.info11']?> ">
    </td>
  </tr>
  <tr>
    <td colspan="2" class="tit1"><? echo $lang['pai.info7']?></td>
  </tr>
  <?

		if(!empty($info_list)){
			if(is_array($info_list)){
				foreach($info_list as $info_val){
  ?>

	<tr>
    <td class="forumrow" colspan="2" height="25">&nbsp;&nbsp;<a href="menpai.php?action=edit&id=<? echo $info_val['id']?>"><? echo $lang['pai.info8']?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="menpai.php?action=del&id=<? echo $info_val['id']?>"><? echo $lang['pai.info9']?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<? echo $info_val['groupname']?></td>
  </tr>
   <?
				}
			}
		}
  ?>
  </form>
</table>