<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<br>
<table border="0" cellspacing="1" cellpadding="1"  align="center" class="tableborder">
  <tr>
    <td class="tit1" colspan="2"><?=$lang['tool.info1']?></td>
  </tr>
  <tr>
    <td class="forumrow" style="text-align:center;width:15%">
	<input type="submit" name="Submit" value="<? echo $lang['tool.info64']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
	</td>
    <td class="forumrow"><?=$lang['tool.info2']?></td>
  </tr>
</table>
<?if($action=="editinfo"){
	if(!empty($edit_list)){
		if(is_array($edit_list)){
			foreach($edit_list as $editarr){			
				$tools_setting = explode(",",$editarr['toolssetting']);
?>

<!--导航-->
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<tr align="center">
<td height="25" align="center" <?if($action=='list'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="10%"><a href="?action=list"><font color="<?if($action=='list'){echo 'red';}else{echo '#000000';}?>"><?=$lang['tool.info66']?></font></a></td>
<td height="25" align="center" <?if($action=='editinfo'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> width="10%"><a href="?action=editinfo"><font color="<?if($action=='editinfo'){echo 'red';}else{echo '#000000';}?>"><?=$lang['tool.info65']?></font></a></td>
</tr>
</table>
<!--导航结束-->
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<form method="post" name1="form_edit" name="PlusTools" action="?action=save_tools&editid=<?echo $editarr['id']?>" onsubmit="this.truetoolsgroupid.value=this.usergroupid.value;this.trueboardid.value=this.boardid.value;return true;" >
<tr><td colspan="2" class="tdtit"><?=$lang['tool.info65'].' --> '.$editarr['toolsname']?></td></tr>
<tr><td colspan="2" class="forumrow" height="25" style="text-align:center;">
<img src="../<?=htmlspecialchars(strtolower($editarr['toolsimg']))?>" border=0></td></tr>
<tr>
<td class="forumrow" height="25" width="20%" align="right"><?=$lang['tool.info24']?></td>
<td class="forumrow" height="25" width="80%">
<INPUT TYPE="text" name="toolsname" value="<?=htmlspecialchars($editarr['toolsname'])?>" size=35> <?=$lang['tool.info25']?></td>
</tr>

<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info26']?></td>
<td class="forumrow" height="25">
<INPUT  NAME="toolsinfo" TYPE="text" Style="width:80%" value="<?=htmlspecialchars($editarr['toolsinfo'])?>"> <?=$lang['tool.info27']?></td>
</tr>

<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info28']?></td>
<td class="forumrow" height="25">
<INPUT  NAME="toolsimg" TYPE="text" Style="width:80%" value="<?=htmlspecialchars(strtolower($editarr['toolsimg']))?>"> <?=$lang['tool.info29']?></td>
</tr>

<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info30']?></td>
<td class="forumrow" height="25">
<input type="radio" name="isstar" value="0" <? If (intval($editarr['isstar'])==0)echo "checked"?>><?=$lang['tool.info31']?>&nbsp;
<input type="radio" name="isstar" value="1" <? If (intval($editarr['isstar'])==1)echo "checked"?>><?=$lang['tool.info32']?>&nbsp;
</td>
</tr>
<tr><td colspan="2" height=23 class="tit1"><?=$lang['tool.info33']?></td></tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info34']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="usermoney" value="<?=$editarr['usermoney']?>" size=10></td>
</tr>

<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info35']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="userticket" value="<?=$editarr['userticket']?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info36']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="sysstock" value="<?=$editarr['sysstock']?>" size=10>&nbsp;<?=$lang['tool.info37']?></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info38']?></td>
<td class="forumrow" height="25">
<SELECT NAME="buytype">
	<option value="0" <?If(intval($editarr['buytype'])==0)echo "selected"?>><?=$lang['tool.info39']?>
	<option value="1" <?If(intval($editarr['buytype'])==1)echo "selected"?>><?=$lang['tool.info40']?>
	<option value="2" <?If(intval($editarr['buytype'])==2)echo "selected"?>><?=$lang['tool.info41']?>
	<option value="3" <?If(intval($editarr['buytype'])==3)echo "selected"?>><?=$lang['tool.info42']?>
</option>
</SELECT>
</td>
</tr>
<tr><td colspan="2" class="tit1" height=23><?=$lang['tool.info43']?></td></tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info44']?></td>
<td class="forumrow" height="25">
<INPUT TYPE="text" NAME="userpost" value="<?=$editarr['userpost']?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info45']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="userwealth" value="<?=$editarr['userwealth']?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info46']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="userep" value="<?=$editarr['userep']?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info47']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="usercp" value="<?=$editarr['usercp']?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info48']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="tools_setting[]" value="<?=$tools_setting[0]?>" size=10> <?=$lang['tool.info49']?></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info50']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="tools_setting[]" value="<?=$tools_setting[1]?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info51']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="tools_setting[]" value="<?=$tools_setting[2]?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info52']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="tools_setting[]" value="<?=$tools_setting[3]?>" size=10></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info53']?></td>
<td class="forumrow" height="25"><INPUT TYPE="text" NAME="tools_setting[]" value="<?=$tools_setting[4]?>" size=10><BR> <?=$lang['tool.info54']?><font color=blue><?=$lang['tool.info55']?></font><?=$lang['tool.info61']?><font color=red><?=$lang['tool.info56']?></font></td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info57']?></td>
<td class="forumrow" height="25">
	<INPUT type="text" name="usergroupid" value="<?=trim($editarr['usergroupid'])?>" size="110" readonly="readonly" />
	<INPUT type="hidden" name="truetoolsgroupid" value="<?=trim($editarr['usergroupid'])?>">
	<input type="button" class="button" value="<?=$lang['tool.info58']?>" onclick="NewWindow('../plus_tools_infosetting.php?orders=0&id=<?=$editarr['id']?>')">
</td>
</tr>
<tr>
<td class="forumrow" height="25" align="right"><?=$lang['tool.info59']?></td>
<td class="forumrow" height="25">
<INPUT type="text" name="boardid" value="<?=trim($editarr['boardid'])?>" size="110" readonly>
<INPUT type="hidden" name="trueboardid" value="<?=trim($editarr['boardid'])?>">
<input type="button"  class="button" value="<?=$lang['tool.info58']?>" onclick="NewWindow('../plus_tools_infosetting.php?orders=1&id=<?=$editarr['id']?>')"></td>
</tr>
<tr><td class="forumrow1" height="25" colspan="2" style="text-align:center;">
<INPUT TYPE="Submit" class="button" name="Submit" value="<?=$lang['tool.info60']?>"></td></tr>
</form>
</table>
<?
			}
		}
	}
}
else{?>

<!--导航-->
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<tr align="center">
<td height="25" align="center" <?if($action=='list'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="10%"><a href="?action=list"><font color="<?if($action=='list'){echo 'red';}else{echo '#000000';}?>"><?=$lang['tool.info66']?></font></a></td>
<td height="25" align="center" <?if($action=='editinfo'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> width="10%"><font color="<?if($action=='editinfo'){echo 'red';}else{echo '#000000';}?>"><?=$lang['tool.info65']?></font></td>
</tr>
</table>
<!--导航结束-->
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <tr>
    <td class="tdtit" colspan=6><?=$lang['tool.info3']?></td>
  </tr>
  <tr>
    <td class="forumrow" colspan=6><a href="?action=update_userstock"><font color="#0000ff"><?=$lang['tool.info4']?></font></a></td>
  </tr>
  <tr>
    <td align="left" class="forumrow" colspan=6><?=$lang['tool.info5']?></td>
  </tr>
  <form name="form1" method="post" action="?action=all_star">
  <tr class="forumrow1">
    <td style="text-align:center;"><?=$lang['tool.info6']?></td>
    <td style="text-align:left;"><?=$lang['tool.info7']?></td>
    <td style="text-align:center;"><?=$lang['tool.info8']?></td>
    <td style="text-align:center;"><?=$lang['tool.info9']?></td>
    <td style="text-align:center;"><?=$lang['tool.info10']?></td>
    <td style="text-align:center;"><?=$lang['tool.info11']?></td>
  </tr>
  <?
	if(!empty($set_list)){
		if(is_array($set_list)){
			foreach($set_list as $set_val){
				switch($set_val['buytype']){
					case 0:
						$type=$set_val['usermoney'];
					break;
					case 1:
						$type=$set_val['userticket'];
					break;
					case 2:
						$type=$set_val['usermoney']." and ".$set_val['userticket'];
					break;
					case 3:
						$type=$set_val['usermoney']." or ".$set_val['userticket'];
					break;
				}
  ?>
  <tr class="forumrow" style="padding:1px;">
    <td height="25" style="text-align:center;">
	<a href="?action=editinfo&editid=<?=$set_val['id']?>"><?=$set_val['toolsname']?></a>
	</td>
    <td height="25"  style="text-align:left;"><?=$set_val['toolsinfo']?></td>
    <td height="25" style="text-align:center;"><?=$type?></td>
    <td height="25" style="text-align:center;"><?if($set_val['sysstock']==-1) echo $lang['tool.info13'];else echo $set_val['sysstock']?></td>
    <td height="25" style="text-align:center;"><?=$set_val['userstock']?></td>
    <td height="25" style="text-align:center;">
	<input type="checkbox" name="star[]" <?if(intval($set_val['isstar'])==1) echo "checked"?> value="<? echo $set_val['id']?>">
	</td>
  </tr>
  <?
			}
		}
	}
  ?>
  <tr>
    <td colspan="6" align="right" height="30" class="forumrow1" style="text-align:center;"><input class="button" type="submit" name="Submit" value="<?=$lang['tool.info12']?>"></td>
  </tr>
 </form>
</table>
<?}?>
<script language="JavaScript"><!--
function NewWindow(str){
	  window.open(str,"","height=500,width=340,status=no,location=no,toolbar=no,directories=no,menubar=no,scrollbars=yes");
}
</script>
