<?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="4"><?=$lang['user.info1']?></td>
  </tr>
  <tr>
    <td class="forumrow" style="text-align:center;">
	<input type="submit" name="Submit" value="<? echo $lang['tpl.str3']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
	</td>
    <td class="forumrow" colspan="3"><?=$lang['user.info2']?></td>
  </tr>
    <tr>
    <td  align="center" height="25" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?> >&nbsp;
	<a href="?action="><font color="<?if($action==''){echo 'red';}else{echo '#428EFF';}?>"><?=$lang['user.info4']?></font></a></td>
    <td  align="center" height="25" <?if($action=='paylist' or $action=='tools_manage'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>>&nbsp;
	<a href="?action=paylist"><font color="<?if($action=='paylist' or $action=='tools_manage'){echo 'red';}else{echo '#428EFF';}?>"><?=$lang['user.info5']?></font></a></td>
    <td  align="center" height="25" <?if($action=='sendtools'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>>&nbsp;
	<a href="?action=sendtools"><font color="<?if($action=='sendtools'){echo 'red';}else{echo '#428EFF';}?>"><?=$lang['user.info6']?></font></a></td>
	 <?if($action=='editinfo'){?>
	 <td  align="center" height="25" bgcolor="#C9DEFA"><font color="red"><?=$lang['tpl.str2']?></font></td>
	<?}?>
  </tr>
</table>
<?if($action=="sendtools"){?>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<form name="form1" method="post" action="?action=giveok">
  <tr>
    <td colspan="2" class="tdtit"><?=$lang['user.info43']?></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="forumrow"><?=$lang['user.info44']?></td>
  </tr>
  
  <tr>
    <td width="30%" height="25" class="forumrow" style="text-align:right;"><?=$lang['user.info45']?></td>
    <td width="70%" height="25" class="forumrow">
	<select name="toolid">
		<Option value="0" Selected><?=$lang['user.info46']?></Option>
	<?
		if(!empty($tool_list)){
			if(is_array($tool_list)){
				foreach($tool_list as $toolset){
	?>
		<option value="<?=$toolset['id']?>"><?echo $toolset['toolsname']?></option>
	<?
				}
			}
		}
	?>
    </select></td>
  </tr>
  
  <tr>
    <td width="30%" height="25" class="forumrow" style="text-align:right;"><?=$lang['user.info47']?></td>
    <td width="70%" height="25" class="forumrow">
	<input name="target_user" type="text" id="target_user" size="20"></td>
  </tr>
  
  <tr>
    <td width="30%" height="25" class="forumrow" style="text-align:right;"><?=$lang['user.info48']?></td>
    <td width="70%" height="25" class="forumrow"><input name="give_num" type="text" id="give_num" value="0" size="10"></td>
  </tr>
  
  <tr>
    <td width="30%" height="25" class="forumrow" style="text-align:right;"><?=$lang['user.info49']?></td>
    <td width="70%" height="25" class="forumrow"><input name="give_money" type="text" id="give_money" value="0" size="10"></td>
  </tr>
  
  <tr class="forumrow1">
    <td height="30" colspan="2" align="center"><input type="submit" class="button" name="Submit" value="<?=$lang['user.info50']?>"></td>
  </tr>
</form>
</table>
<?}if($action=="paylist" or $action=="tools_manage"){?>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<form name="form1" method="post" action="?action=tools_manage">
  <tr>
    <td colspan="8" class="tdtit"><?=$lang['user.info51']?></td>
  </tr>
  <tr>
    <td colspan="2" class="forumrow" height="25"><?=$lang['user.info19']?>
	<input type="text" name="keyword">
    <input type="submit" class="button"  name="Submit" value="<?=$lang['user.info52']?>"></td>
    <td class="forumrow" height="25">&nbsp;</td>
    <td colspan="2" class="forumrow" height="25">
	<select name="list_num" onchange='javascript:submit()'>
		<Option value="0" Selected><?=$lang['user.info53']?></Option>
		<Option value="1" <? If($list_num==1)echo "Selected"?>><?=$lang['user.info54']?></Option>
		<Option value="2" <? If($list_num==2)echo "Selected"?>><?=$lang['user.info55']?></Option>
		<Option value="3" <? If($list_num==3)echo "Selected"?>><?=$lang['user.info56']?></Option>
		<Option value="4" <? If($list_num==4)echo "Selected"?>><?=$lang['user.info57']?></Option>
    </select>
    <select name="taxisid" onchange='javascript:submit()'>
		<Option value="0" <?If($taxisid==0) echo "Selected"?>><?=$lang['user.info58']?></Option>
		<Option value="1" <?If($taxisid==1) echo "Selected"?>><?=$lang['user.info59']?></Option>
    </select></td>
    <td colspan="3" class="forumrow" height="25" style="text-align:right;">
	<select name="toolname" onchange='javascript:submit()'>
		<Option value="0" Selected><?=$lang['user.info60']?></Option>
	<?
		if(!empty($tool_list)){
			if(is_array($tool_list)){
				foreach($tool_list as $toolset){
	?>
		<option value="<?=$toolset['id']?>"><?echo $toolset['toolsname']?></option>
	<?
				}
			}
		}
	?>
    </select></td>
    </tr>
  <tr class="forumrow1">
    <td style="text-align:center;"><?=$lang['user.info19']?></td>
    <td style="text-align:center;"><?=$lang['user.info28']?></td>
    <td style="text-align:center;"><?=$lang['user.info29']?></td>
    <td style="text-align:center;"><?=$lang['user.info22']?></td>
    <td style="text-align:center;"><?=$lang['user.info23']?></td>
    <td style="text-align:center;"><?=$lang['user.info24']?></td>
    <td style="text-align:center;"><?=$lang['user.info25']?></td>
    <td style="text-align:center;"><?=$lang['user.info26']?></td>
  </tr>
  <?
	if(!empty($user_arr)){
		if(is_array($user_arr)){
			foreach($user_arr as $user_set){
 ?>
  <tr class="forumrow" style="padding:1px;">
    <td height="25" style="text-align:center;"><a href="?action=editinfo&id=<?=$user_set['id']?>"><?echo $user_set['username']?></a></td>
    <td height="25" style="text-align:center;"><?echo $user_set['salemoney']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['saleticket']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['id']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['toolscount']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['salecount']?></td>
    <td height="25" style="text-align:center;"><?echo gmdate('Y-m-d H:i:s', $user_set['updatetime']+getUserTimeZoneOffset())?></td>
    <td height="25" style="text-align:center;"><?echo gmdate('Y-m-d H:i:s', $user_set['updatetime']+getUserTimeZoneOffset())?></td>
  </tr>
  <?
			}
		}
	}
 ?>
 </form>
 <tr><td colspan="8" class="forumrow1">
<?
	if($total!=0){
		$p = new page;
		$p->setall($page,$total,$page_size,$lang['user.info80'],$lang['user.info81'],'100%','center','biz');
		print $p->printpage(null,1);		
	}
?>
 </td></tr>
</table>
<?}if($action=="" or $action=="tool_sale"){?>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
<form name="form1" method="post" action="?action=tool_sale">
  <tr>
    <td colspan="8" class="tdtit"><?=$lang['user.info51']?></td>
  </tr>
  <tr>
    <td colspan="2" class="forumrow" height="25"><?=$lang['user.info19']?>
	<input type="text" name="keyword">
    <input type="submit"  class="button"  name="Submit" value="<?=$lang['user.info52']?>"></td>
    <td class="forumrow" height="25">&nbsp;</td>
    <td colspan="2" class="forumrow" height="25">
	<select name="list_num" onchange='javascript:submit()'>
		<Option value="0" Selected><?=$lang['user.info53']?></Option>
		<Option value="1" <? If($list_num==1)echo "Selected"?>><?=$lang['user.info54']?></Option>
		<Option value="2" <? If($list_num==2)echo "Selected"?>><?=$lang['user.info55']?></Option>
		<Option value="3" <? If($list_num==3)echo "Selected"?>><?=$lang['user.info56']?></Option>
		<Option value="4" <? If($list_num==4)echo "Selected"?>><?=$lang['user.info57']?></Option>
    </select>
    <select name="taxisid" onchange='javascript:submit()'>
		<Option value="0" <?If($taxisid==0) echo "Selected"?>><?=$lang['user.info58']?></Option>
		<Option value="1" <?If($taxisid==1) echo "Selected"?>><?=$lang['user.info59']?></Option>
    </select></td>
    <td colspan="3" class="forumrow" height="25" style="text-align:right;">
	<select name="toolname" onchange='javascript:submit()'>
		<Option value="0" Selected><?=$lang['user.info60']?></Option>
	<?
		if(!empty($tool_list)){
			if(is_array($tool_list)){
				foreach($tool_list as $toolset){
	?>
		<option value="<?=$toolset['id']?>"><?echo $toolset['toolsname']?></option>
	<?
				}
			}
		}
	?>
    </select></td>
    </tr>
  <tr class="forumrow1">
    <td style="text-align:center;"><?=$lang['user.info19']?></td>
    <td style="text-align:center;"><?=$lang['user.info20']?></td>
    <td style="text-align:center;"><?=$lang['user.info21']?></td>
    <td style="text-align:center;"><?=$lang['user.info22']?></td>
    <td style="text-align:center;"><?=$lang['user.info23']?></td>
    <td style="text-align:center;"><?=$lang['user.info24']?></td>
    <td style="text-align:center;"><?=$lang['user.info25']?></td>
    <td style="text-align:center;"><?=$lang['user.info26']?></td>
  </tr>
  <?
	if(!empty($user_arr)){
		if(is_array($user_arr)){
			foreach($user_arr as $user_set){
 ?>
  <tr class="forumrow" style="padding:1px;">
    <td height="25" style="text-align:center;"><a href="?action=editinfo&id=<?=$user_set['id']?>"><?echo $user_set['username']?></a></td>
    <td height="25" style="text-align:center;"><?echo $user_set['salemoney']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['saleticket']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['id']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['toolscount']?></td>
    <td height="25" style="text-align:center;"><?echo $user_set['salecount']?></td>
    <td height="25" style="text-align:center;"><?echo gmdate('Y-m-d H:i:s', $user_set['updatetime']+getUserTimeZoneOffset())?></td>
    <td height="25" style="text-align:center;"><?echo gmdate('Y-m-d H:i:s', $user_set['updatetime']+getUserTimeZoneOffset())?></td>
  </tr>
  <?
			}
		}
	}
 ?>
 </form>
 <tr><td colspan="8" class="forumrow1">
<?
	if($total!=0){
		$p = new page;
		$p->setall($page,$total,$page_size,$lang['user.info80'],$lang['user.info81'],'100%','center','biz');
		print $p->printpage(null,1);		
	}
?>
 </td></tr>
</table>
<?}
if($action=="editinfo"){
	if(!empty($edit_list)){
		if(is_array($edit_list)){
			foreach($edit_list as $edit_set){
?>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
	<FORM method="POST" name="editform" action="?action=saveedit&id=<?echo $edit_set['id']?>">
	<tr>
		<td height="25" colspan=2 class="tdtit"><?=$lang['tpl.str1']?> <?echo $edit_set['username']?> <?=$lang['user.info62']?> <?echo $edit_set['toolsname']?> <?=$lang['user.info63']?></td>
	</tr>
	<tr>
		<td class="forumrow2" height="25" colspan=2><b><?=$lang['user.info64']?></b>
		<a href="plus_tools_info.php?action=editinfo&editid=<?=$edit_set['toolsid']?>"><?=$lang['user.info65']?></a> | <a href="?action=cancel_state&sale_num=<?=$edit_set['salecount']?>&id=<?=$edit_set['id']?>"><?=$lang['user.info66']?></a> | <a href="?action=del_usertools&id=<?=$edit_set['id']?>" onclick="{if(confirm('<?=$lang['user.info67']?>?')){return true;}return false;}"><?=$lang['user.info68']?></a>
		</td>
	</tr>
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info69']?></td>
		<td class="forumrow" height="25" width="80%"><?echo $edit_set['toolsname']?></td>
	</tr>
 
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info70']?></td>
		<td class="forumrow" height="25" width="80%"><?echo $edit_set['username']?></td>
	</tr>
 
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info71']?></td>
		<td class="forumrow" height="25" width="80%"><?echo gmdate('Y-m-d H:i:s', $edit_set['updatetime']+getUserTimeZoneOffset())?></td>
	</tr>
 
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info72']?></td>
		<td class="forumrow" height="25" width="80%">
			<input type=text size=10 value="<?echo $edit_set['toolscount']?>" name="toolscount"> <?=$lang['user.info79']?>
		</td>
	</tr>
 
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info73']?></td>
		<td class="forumrow" height="25" width="80%">
			<input type=text size=10 value="<?echo $edit_set['salecount']?>" name="salecount"> <?=$lang['user.info79']?>
		</td>
	</tr>
 
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info74']?></td>
		<td class="forumrow" height="25" width="80%">
			<input type=text size=10 value="<?echo $edit_set['salemoney']?>" name="salemoney"> <?=$lang['user.info79']?>
		</td>
	</tr>
 
	<tr>
		<td class="forumrow" height="25" width="20%" align=right><?=$lang['user.info75']?></td>
		<td class="forumrow" height="25" width="80%">
			<input type=text size="10" value="<?echo $edit_set['saleticket']?>" name="saleticket"> <?=$lang['user.info76']?>
		</td>
	</tr>
	<tr>
		<td class="forumrow1" colspan=2 style="text-align:center">
			<input type="submit" class="button"  value="<?=$lang['user.info77']?>" name="submit">&nbsp;&nbsp;<?=$lang['user.info78']?>
		</td>
	</tr>
</FORM>
</table>
<?
			}
		}
	}
}
?>
