<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<br>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <tr>
    <td class="tit1" colspan="7"><?echo $lang['brow.info1']?></td>
  </tr>
  <tr>
    <td class="forumrow2" style="text-align:center;" width="15%">
	<input type="submit" name="Submit" value="<? echo $lang['brow.info44']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
	</td>
    <td class="forumrow" colspan="6"><?echo $lang['brow.info2'].$lang['brow.info3']?></td>
  </tr>
  <tr>
    <td <?if($stype==5){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> height="25"><a href="?stype=5"><font color="<?if($stype==5){echo 'red';}else{echo '#000000';}?>"><?=$lang['brow.info5']?></font></a></td>
    <td <?if($stype===0){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> height="25"><a href="?stype=0"><font color="<?if($stype===0){echo 'red';}else{echo '#000000';}?>"><?=$lang['brow.info6']?></font></a></td>
    <td <?if($stype==1){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> height="25"><a href="?stype=1"><font color="<?if($stype==1){echo 'red';}else{echo '#000000';}?>"><?=$lang['brow.info7']?></font></a></td>
    <td <?if($stype==2){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> height="25"><a href="?stype=2"><font color="<?if($stype==2){echo 'red';}else{echo '#000000';}?>"><?=$lang['brow.info8']?></font></a></td>
    <td <?if($stype==3){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> height="25"><a href="?stype=3"><font color="<?if($stype==3){echo 'red';}else{echo '#000000';}?>"><?=$lang['brow.info9']?></font></a></td>
    <td <?if($stype==4){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> height="25"><a href="?stype=4"><font color="<?if($stype==4){echo 'red';}else{echo '#000000';}?>"><?=$lang['brow.info10']?></font></a></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<tr><td class="tdtit" colspan="15" style="text-align:center;">
<?
switch($stype){
	case 5:
		echo $lang['brow.info45'].$lang['brow.info5'];
	break;
	case 0:
		echo $lang['brow.info45'].$lang['brow.info6'];
	break;
	case 1:
		echo $lang['brow.info45'].$lang['brow.info7'];
	break;
	case 2:
		echo $lang['brow.info45'].$lang['brow.info8'];
	break;
	case 3:
		echo $lang['brow.info45'].$lang['brow.info9'];
	break;
	case 4:
		echo $lang['brow.info45'].$lang['brow.info10'];
	break;
}
?>
</td></tr>
  <tr class="forumrow2">
    <td align=center><?echo $lang['brow.info12']?></td>
    <td align=center><?echo $lang['brow.info13']?></td>
    <td align=center><?echo $lang['brow.info14']?></td>
    <td align=center><?echo $lang['brow.info15']?></td>
    <td align=center><?echo $lang['brow.info16']?></td>
    <td align=center><?echo $lang['brow.info17']?></td>
    <td align=center><?echo $lang['brow.info18']?></td>
    <td align=center><?echo $lang['brow.info19']?></td>
    <td align=center><?echo $lang['brow.info20']?></td>
    <td align=center><?echo $lang['brow.info21']?></td>
    <td align=center><?echo $lang['brow.info22']?></td>
    <td align=center><?echo $lang['brow.info23']?></td>
    <td align=center><?echo $lang['brow.info24']?></td>
    <td align=center><?echo $lang['brow.info25']?></td>
    <td align=center><?echo $lang['brow.info26']?></td>
  </tr>
  <form name="form1" method="post" action="">
  <input name="doaction" type="hidden" value="">
  <tr>
    <td class="forumrow" height="25"><?=$lang['brow.info27']?></td>
    <td class="forumrow" height="25"></td>
    <td class="forumrow" height="25">
		<input name="explain" type="text" id="explain" size="15"></td>
    <td class="forumrow" height="25">
		<select name="type">
		<?
			$brow_type=explode("|",$lang['brow.info29']);
			$num=count($brow_type);
			for($i=0;$i<$num;$i++){
		?>
			<option value="<?echo $i?>"><?echo $brow_type[$i]?></option>
		<?
			}
		?>
		</select>
	</td>
    <td class="forumrow" height="25"><input name="pic" type="text" id="pic" size="8" value="0"></td>
    <td class="forumrow" height="25"><input name="money1" type="text" id="money1" size="3" value="1000"></td>
    <td class="forumrow" height="25"><input name="ticket1" type="text" id="ticket1" size="3" value="100"></td>
    <td class="forumrow" height="25"><input name="money2" type="text" id="money2" size="3" value="100"></td>
    <td class="forumrow" height="25"><input name="ticket2" type="text" id="ticket2" size="3" value="10"></td>
    <td class="forumrow" height="25"><input name="forum" type="text" id="forum" size="3" value="10"></td>
    <td class="forumrow" height="25"><input name="money" type="text" id="money" size="3" value="100"></td>
    <td class="forumrow" height="25"><input name="experience" type="text" id="experience" size="3" value="20"></td>
    <td class="forumrow" height="25"><input name="charm" type="text" id="charm" size="3" value="10"></td>
    <td class="forumrow" height="25"><input name="cachet" type="text" id="cachet" size="3" value="0"></td>
    <td class="forumrow" height="25"><input type="submit" class="button" name="Submit" onclick="this.form.doaction.value='add'" value="<?=$lang['brow.info28']?>"></td>
  </tr>
  </form>
  <tr><td height="1" colspan="15" bgcolor="#0000ff"></td></tr>
    <form name="form2" method="post" action="">
	<input name="doaction" type="hidden" value="">
	<?
		if(!empty($brow_set)){
			if(is_array($brow_set)){
				foreach($brow_set as $brow_arr){
					$magic_setting=explode("|",$brow_arr['magicsetting']);			
	?>
  <tr>
    <td class="forumrow" height="25"><?=$brow_arr['id']?></td>
    <td class="forumrow" height="25">
	<a href="<?=$lang['swf.url']?><?=$brow_arr['magicface_l']?>.swf" target=_blank><img src="<?=$lang['pic.url']?><?=$brow_arr['magicface_s']?>.gif" border=0></a>
	</td>
    <td class="forumrow" height="25">
		<input name="explain_<?=$brow_arr['id']?>" type="text" id="explain" size="15" value="<?=$brow_arr['title']?>">
	</td>
    <td class="forumrow" height="25">
		<select name="f_type_<?=$brow_arr['id']?>">
			<?
				$f_type=explode("|",$lang['brow.info29']);
				$num=count($f_type);
				for($i=0;$i<$num;$i++){
			?>
				<option value="<?echo $i?>"<?if($brow_arr['magictype']==$i)echo "selected"?>><?echo $f_type[$i]?></option>
			<?
				}
			?>
		</select>
	</td>
    <td class="forumrow" height="25"><input name="pic_<?=$brow_arr['id']?>" type="text" id="pic" size="8" value="<?=$brow_arr['magicface_s']?>"></td>
    <td class="forumrow" height="25"><input name="money1_<?=$brow_arr['id']?>" type="text" id="money1" size="3" value="<?=$brow_arr['imoney']?>"></td>
    <td class="forumrow" height="25"><input name="ticket1_<?=$brow_arr['id']?>" type="text" id="ticket1" size="3" value="<?=$brow_arr['iticket']?>"></td>
    <td class="forumrow" height="25"><input name="money2_<?=$brow_arr['id']?>" type="text" id="money2" size="3" value="<?=$brow_arr['tmoney']?>"></td>
    <td class="forumrow" height="25"><input name="ticket2_<?=$brow_arr['id']?>" type="text" id="ticket2" size="3" value="<?=$brow_arr['tticket']?>"></td>
	<td class="forumrow"><input type="text" size="3" id="forum" name="forum_<?=$brow_arr['id']?>" value="<?=$magic_setting[0]?>"></td>
	<td class="forumrow"><input type="text" size="3" name="money_<?=$brow_arr['id']?>" id="money" value="<?=$magic_setting[1]?>"></td>
	<td class="forumrow"><input type="text" size="3" name="experience_<?=$brow_arr['id']?>" id="experience" value="<?=$magic_setting[2]?>"></td>
	<td class="forumrow"><input type="text" size="3" name="charm_<?=$brow_arr['id']?>" id="charm" value="<?=$magic_setting[3]?>"></td>
	<td class="forumrow"><input type="text" size="3" name="cachet_<?=$brow_arr['id']?>" id="cachet" value="<?=$magic_setting[4]?>"></td>
    <td class="forumrow" height="25"><input type="checkbox" name="id[]" value="<?=$brow_arr['id']?>"></td>
  </tr>
  <tr><td height="1" colspan="15" bgcolor="#ffffff"></td></tr>
  <?
				}
			}
		}
  ?>
  <tr><td colspan="15" class="forumrow1" style="text-align:right;">
  <?echo $lang['brow.info31']?>
  <input type="checkbox" name="selid" value="Y" onclick="un(this)">
  <input type="Submit" class="button" name="Submit" onclick="this.form.doaction.value='edit'" value="<?=$lang['brow.info32']?>">&nbsp;&nbsp;
  <input type="Submit" class="button" name="Submit" onclick="this.form.doaction.value='del'" value="<?=$lang['brow.info33']?>">
  </td></tr>
  </form>
  <tr><td colspan="15" class="forumrow">
	<?
		if($total!=0){
			$p = new page;
			$p->setall($page,$total,$page_size,$lang['brow.info42'],$lang['brow.info43'],'100%','center','biz');
			print $p->printpage(null,1);		
		}
	?>
  </td></tr>
</table>