<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?>
<br>
<table class="tableborder" cellSpacing="0" cellPadding="0" align="center" border="0">
<tr><td class="tit1" colspan="3"><?=$lang['honor.info14']?></td></tr>
<tr>
<td class="forumrow" style="text-align:center;width:15%;height:65px;">
	<input type="submit" name="Submit" value="<? echo $lang['honor.info88']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
</td>
<td class="forumrow2" colspan="2"><?=$lang['honor.info89']?></td>
</tr>
	<tr>
		<td height="23" style="text-align:center;" <?if($doaction=='honormanager' or $doaction==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?doaction=honormanager&action=<?=$honorobj->action?>"><font color="<?if($doaction=='honormanager' or $doaction==''){echo 'red';}else{echo '#000000';}?>"><?=$lang['honor.info14']?></font></a>
		</td>
		<td height="23" style="text-align:center;" <?if($doaction=='honorsearch'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?doaction=honorsearch&action=<?=$honorobj->action?>"><font color="<?if($doaction=='honorsearch'){echo 'red';}else{echo '#000000';}?>"><?=$lang['honor.info15']?></font></a>
		</td>
		<td height="23" style="text-align:center;" <?if($doaction=='honorlog'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="?doaction=honorlog&action=<?=$honorobj->action?>"><font color="<?if($doaction=='honorlog'){echo 'red';}else{echo '#000000';}?>"><?=$lang['honor.info16']?></font></a>
		</td>
	</tr>
</table>
<?
	if($doaction=='honormanager' or $doaction==''){
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="tableborder">
<form name="editform" method="post" action="?doaction=saveedit">
<tr>
<th colspan="6" align="center" class="tdtit"><?=$lang['honor.info14']?></th>
</tr>
<tr>
<td class="forumrow2" align="center"><b><?=$lang['honor.info17']?></b></td>
<td class="forumrow2" align="center"><b><?=$lang['honor.info18']?></b></td>
<td class="forumrow2" align="center"><b><?=$lang['honor.info19']?></b></td>
<td class="forumrow2" align="center"><b><?=$lang['honor.info20']?></b></td>
<td class="forumrow2" align="center"><b><?=$lang['honor.info21']?></b></td>
<td class="forumrow2" align="center"><b><?=$lang['honor.info22']?></b></td>
</tr>
<?
		foreach($hlist as $harr){?>
<tr>
<td class="forumrow" align="center"><input type="text" name="hid[]" size="2" value="<?=$harr['id']?>"></td>
<td class="forumrow" align="center"><input type="text" name="hname[]" size="40" value="<?=$harr['honorname']?>"></td>
<td class="forumrow"><textarea cols=
"50" rows="3" name="hread[]" style="width:100%"><?=$harr['honorread']?></textarea></td>
<td class="forumrow" align="center"><input type="text" name="hpic[]" size="40" value="<?=$harr['honorpic']?>"></td>
<td class="forumrow" align="center"><img src="<?=$lang['honor.info2'].$harr['honorpic']?>" border="0"></td>
<td class="forumrow" align="center"><a href="?doaction=del&id=<?=$harr['id']?>"><?=$lang['honor.info23']?></a></td>
</tr>
<?
		}
?>
<tr>
<td colspan="6" class="forumrow1" style="text-align:center;" height="30">
<input class="button" type="submit" name="Submit" value="<?=$lang['honor.info24']?>"> </td>
</tr>
</form>
</table>
<br>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" class="tableborder">
<form name="newform" method="post" action="?doaction=savenew">
	<tr> 
	<th colspan="2" height="12" align="center" class="tit1"><?=$lang['honor.info25']?></th>
	</tr>
	<tr> 
	<td width="40%" class="forumrow" height="20" style="text-align:left;line-height:30px;padding-left:160px;padding-top:0px;"><b><?=$lang['honor.info18']?></b></td>
	<td width="60%" class="forumrow" height="20" style="text-align:left;line-height:30px;padding-left:96px;padding-top:0px;">
	<input size="127" name="honor_name" type=text></td>
	</tr>
	<tr>
	<td width="40%" class="forumrow" height="19" style="text-align:left;line-height:30px;padding-left:160px;padding-top:0px;"><b><?=$lang['honor.info26']?></b></td>
	<td width="60%" class="forumrow" height="19" style="text-align:left;line-height:30px;padding-left:96px;padding-top:0px;">
	<textarea rows="5" cols="127" name="honor_read"></textarea></td>
	</tr>
	<tr>
	<td width="40%" class="forumrow" height="10" style="text-align:left;line-height:30px;padding-left:160px;padding-top:0px;"><b><?=$lang['honor.info27']?></b></td>
	<td width="60%" class="forumrow" style="text-align:left;line-height:30px;padding-left:96px;padding-top:5px;">
	<?foreach($piclist as $picarr){echo '<input type="radio" name="honor_pic" value="'.$picarr.'"><img src="'.$lang['honor.info2'].$picarr. '" border=0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';}?></td>
	</tr>
	<tr>
	<td width="100%" class="forumrow1" height="10" colspan="2" style="text-align:center;"> 
	<input type="submit" class="button" name="Submit" value="<?=$lang['honor.info24']?>"> </td>
	</tr>
</form>
</table>
<?
	}
	elseif($doaction=='honorlog'){//颁发情况
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="tableborder">
	<tr><th colspan="5" align="center" class="tdtit"><?=$lang['honor.info16']?></th></tr>
	<tr><td align="center" class="forumrow1"><?=$lang['honor.info28']?></td>
	<td align="center" class="forumrow1"><?=$lang['honor.info29']?></td>
	<td align="center" class="forumrow1"><?=$lang['honor.info30']?></td>
	<td align="center" class="forumrow1"><?=$lang['honor.info31']?></td>
	<td align="center" class="forumrow1"><?=$lang['honor.info32']?></td></tr>
	<?foreach ($allhonorlist as $allhonorarr){?>
	<tr><td align="center" class="forumrow"><?=gmdate('Y-m-d H:i',$allhonorarr['honortime']+getUserTimeZoneOffset());?></td><td align="center" class="forumrow"><?=$allhonorarr['issueuser']?></td><td align="center" class="forumrow"><?=$allhonorarr['username']?></td><td align="left" class="forumrow"><img src="<?=$lang['honor.info2'].$allhonorarr['honorpic']?>" border="0" title="<?=$allhonorarr['honorname']?>"></td><td align="center" class="forumrow"><?=$allhonorarr['reason']?></td></tr>
<?
		}
?>
</table>
<?
	}
	elseif($doaction=='honorsearch'){//颁发勋章查询
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="tableborder">
	<tr><th colspan="7" align="center" class="tdtit"><?=$lang['honor.info15']?></th></tr>
	<form name="searchform" action="?doaction=user_search&action=<?=$honorobj->action?>" method="post">
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info33']?></td>
			<td width="60%" class="forumrow" colspan="5"><?=$lang['honor.info34']?></td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info35']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="searchmax" type="text" value="100"></td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info36']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="username" type="text">&nbsp;&nbsp;<input type="checkbox" name="usernamepreg" value="1" checked><?=$lang['honor.info37']?></td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info38']?></td>
			<td width="60%" class="forumrow" colspan="5">
				<select size=1 name="usergroups">
				<option value=0><?=$lang['honor.info39']?></option>
<?
				$os1 = array(1,2,3,4,5,6,7);
				$os2 = array(8,26);
				foreach($usergrouplist as $usergrouparr){
					if(in_array($usergrouparr['usergroupid'],$os1)){
						echo '<option value='.$usergrouparr['usergroupid'].'>'.$lang['honor.info40'].' >>'.$usergrouparr['usertitle'].'</option>';
					}
					elseif(in_array($usergrouparr['usergroupid'],$os2)){
						echo '<option value='.$usergrouparr['usergroupid'].'>'.$lang['honor.info41'].' >>'.$usergrouparr['usertitle'].'</option>';
					}
					else{
						echo '<option value='.$usergrouparr['usergroupid'].'>'.$lang['honor.info42'].' >>'.$usergrouparr['usertitle'].'</option>';
					}
				}
?>
				</select>
			</td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;">Email</td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="useremail" type="text">&nbsp;</td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info43']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="userim" type="text">&nbsp;</td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info44']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="lastip" type="text">&nbsp;</td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info45']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="usertitle" type="text">&nbsp;</td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info46']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="sign" type="text">&nbsp;</td>
		</tr>
		<tr>
			<td width="40%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info47']?></td>
			<td width="60%" class="forumrow" colspan="5"><input size="45" name="userinfo" type="text">&nbsp;</td>
		</tr>
		<tr>
			<th align="left" colspan="7" height="23" class="tit1"><?=$lang['honor.info48']?></th>
		</tr>
		<tr>
			<td colspan="7">
				<table width="100%" border="0">
					<tr>
						<td width="50%" class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;">
						<?=$lang['honor.info49']?>
						<input type="radio" value="more" name="loginr" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="loginr">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="logint" type="text"> <?=$lang['honor.info52']?></td>
						<td width="50%" class="forumrow">
						<?=$lang['honor.info53']?>
						<input type="radio" value="more" name="vanishr" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="vanishr">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="vanisht" type="text"> <?=$lang['honor.info54']?></td>
					</tr>
					<tr>
						<td class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info55']?>
						<input type="radio" value="more" name="regr" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="regr">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size=5 name="regt" type="text"> <?=$lang['honor.info54']?></td>
						<td class="forumrow">
						<?=$lang['honor.info56']?>
						<input type="radio" value="more" name="artcler" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="artcler">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size=5 name="artclet" type="text"> <?=$lang['honor.info57']?></td>
					</tr>
					<tr>
						<td class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info58']?>
						<input type="radio" value="more" name="uwealth" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="uwealth">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size=5 name="uwealthvalue" type="text"></td>
						<td class="forumrow">
						<?=$lang['honor.info59']?>
						<input type="radio" value="more" name="uep" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="uep">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="uepvalue" type="text"></td>
					</tr>
					<tr>
						<td class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info60']?>
						<input type="radio" value="more" name="ucp" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="ucp">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="ucpvalue" type="text"></td>
						<td class="forumrow">
						<?=$lang['honor.info61']?>
						<input type="radio" value="more" name="upower" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="upower">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="upowervalue" type="text"></td>
					</tr>
					<tr>
						<td class="forumrow" style="text-align:left;line-height:30px;padding-left:40px;padding-top:0px;"><?=$lang['honor.info62']?>
						<input type="radio" value="more" name="umoney" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="umoney">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="umoneyvalue" type="text"></td>
						<td class="forumrow">
						<?=$lang['honor.info63']?>
						<input type="radio" value="more" name="uticket" checked>&nbsp;<?=$lang['honor.info50']?>&nbsp;
						<input type="radio" value="less" name="uticket">&nbsp;<?=$lang['honor.info51']?>&nbsp;&nbsp;
						<input size="5" name="uticketvalue" type="text"></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td width="100%" class="forumrow1" align="center" height="30" colspan="7" style="text-align:center;">
			<input name="submit" class="button" type="submit" value="<?=$lang['honor.info64']?>"></td>
		</tr>
		<input type="hidden" value="9" name="user_search">
	</form>
</table>
<?
	}
	elseif($doaction=='user_search'){
?>
<table class="tableborder" cellSpacing="1" cellPadding="3" align="center">
<tr><th colspan="7" align="center" class="tit1"><?=$lang['honor.info65']?></th></tr>
<tr>
	<td align="center" width="10%" class="forumrow1"><?=$lang['honor.info36']?></td>
	<td align="center" width="20%" class="forumrow1"><?=$lang['honor.info66']?></td>
	<td align="center" width="10%" class="forumrow1"><?=$lang['honor.info67']?></td>
	<td align="center" width="10%" class="forumrow1"><?=$lang['honor.info68']?></td>
	<td align="center" width="10%" class="forumrow1"><?=$lang['honor.info69']?></td>
	<td align="center" width="20%" class="forumrow1"><?=$lang['honor.info70']?></td>
	<td align="center" width="20%" class="forumrow1"><?=$lang['honor.info22']?></td>
</tr>
</table>
<?
		foreach($searchuserlist as $searchuserarr){
			if($searchuserarr['userhonor']!=''){
				if(strpos($searchuserarr['userhonor'],'|||')!==false){
					$tmpuserhonor=explode('|||',$searchuserarr['userhonor']);
					$tmpuserhonorpic="";
					foreach ($tmpuserhonor as $tmpuserhonorarr){
						$hn_title=$honorobj->honortitle($tmpuserhonorarr);
						$tmpuserhonorpic.='<img src='.$lang['honor.info2'].$tmpuserhonorarr.' border=0 title='.$hn_title.'>&nbsp;&nbsp;';
					}
				}
				else{
					$hn_title=$honorobj->honortitle($searchuserarr['userhonor']);
					$tmpuserhonorpic='<img src='.$lang['honor.info2'].$searchuserarr['userhonor'].' border=0 title='.$hn_title.'>';
				}
			}
			else{
				$tmpuserhonorpic='';
			}
?>
<table class="tableborder" cellSpacing="1" cellPadding="3" align="center">
<tr>
	<td align="center" width="10%" class="forumrow"><?=$searchuserarr['username']?></td>
	<td align="center" width="20%" class="forumrow"><?=$tmpuserhonorpic?></td>
	<td align="center" width="10%" class="forumrow"><?=$searchuserarr['userlogins']?></td>
	<td align="center" width="10%" class="forumrow"><?=$searchuserarr['userpost']?></td>
	<td align="center" width="10%" class="forumrow"><?=$searchuserarr['userisbest']?></td>
	<td align="center" width="20%" class="forumrow"><?=gmdate('Y-m-d H:i',$searchuserarr['lastlogin']+getUserTimeZoneOffset())?></td>
	<td align="center" width="20%" class="forumrow"><a href="?doaction=issue&username=<?=$searchuserarr['username']?>"><?=$lang['honor.info31']?></a></td>
</tr>
<tr>
	<td colspan="7" class="forumrow">
	<a href="../messanger.php?action=new&touser=<?=urlencode($searchuserarr['username'])?>" target="_blank"><img src="../templates/default/images/message.gif" border="0"></a>&nbsp;
	<a href="../friendlist.php?action=addF&myFriend=<?=$searchuserarr['username']?>" target="_blank"><img src="../templates/default/images/friend.gif" border="0"></a>&nbsp;
	<a href="../dispuser.php?id=<?=$searchuserarr['userid']?>" target="_blank"><img src="../templates/default/images/profile.gif" border="0"></a>&nbsp;
	<a href="../query.php?stype=1&nsearch=3&keyword=<?=$searchuserarr['username']?>&searchdate=ALL" target="_blank"><img src="../templates/default/images/find.gif" border="0"></a>
	</td>
</tr>
</table>
<br>
<?
		}
	}
	if($doaction=='issue'){
		$honorobj->honorlist();
?>
<table class="tableborder" cellSpacing="1" cellPadding="3" align="center">
<form name="issueform" action="?doaction=issueok&action=<?=$honorobj->action?>&gethonoruser=<?=$_GET['username']?>" method="post">
<tr><th align="center" class="tit1"><?=$lang['honor.info31']?></th></tr>
<tr><td align="left" class="forumrow1" height="30"><?=$lang['honor.info71']?></td></tr>
<tr>
	<td class="forumrow">
		<?=$lang['honor.info72']?>&nbsp;&nbsp;<b><?echo $_GET['username']?></b>&nbsp;&nbsp;<select size="1" name="pos">
		<option value="1"><?=$lang['honor.info73']?></option>
		<option value="0"><?=$lang['honor.info74']?></option>
		</select>&nbsp;&nbsp;<?=$lang['honor.info75']?>&nbsp;&nbsp;
		<select name="poshonor">
		<? foreach($hlist as $h_arr){?>
		<option value="<?=$h_arr['honorpic']?>"><?=$h_arr['honorname']?></option>
		<?}?>
		</select>&nbsp;&nbsp;<?=$lang['honor.info76']?><input type="text" name="cause" size="80">&nbsp;&nbsp;<input type="submit" value="<?=$lang['honor.info77']?>" name="submit">
	</td>
</tr>
</form>
</table>
<?
}
//管理员结束
?>