<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
global $imgurl;
?>
<div id="nav_top" onload="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="user_right_td">
<!---##########################右边样式部分##########################--->

		<div id="tabtitle">
		<div id="topicbodyuser">
		<span>
		<div class="user_nav_topic">
				<table width="96%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="5" > </td>
				</tr>

				<tr>
					<td colspan="5" class="title"> -=> <?=$lang['tpl.myct.str29']?></td>
				</tr>
				  <tr id="user_nav">
					<td width="40" align="center"><?=$lang['tpl.myct.str30']?></td>
					<td class="tdcolor"><?=$lang['tpl.myct.str31']?></td>
					<td><?=$lang['tpl.myct.str32']?></td>
					<td class="tdcolor"><?=$lang['tpl.myct.str33']?></td>
					<td width="60"><?=$lang['tpl.myct.str34']?></td>
				  </tr>
				  <?php
					if( !empty($msglist) && is_array($msglist)){
						foreach( $msglist as $val ){
							$msgflag = $val['flag'];
							if( $msgflag == 0 ){
								$tablebody = 'tablebody2';
								$Msgsrc = "<img src=\"{$imgurl}{$lang['template.pic11']}\" >";
							} else{
								$tablebody = 'tablebody1';
								$Msgsrc = "<img src=\"{$imgurl}{$lang['template.pic12']}\" >";
							}
							$tablebody = $tablebody;
							$msg_pic = $Msgsrc;
							$msg_name = htmlspecialchars($val['sender']);
							$msg_id = $val['id'];
							$msg_topic = htmlspecialchars($val['title']);
							if( empty($val['sendtime']) ){
								$msg_time = gmdate('Y-m-d', time() + getUserTimeZoneOffset());
							} else{
								$msg_time = gmdate('Y-m-d', $val['sendtime'] + getUserTimeZoneOffset());
							}
							$msg_size = strlen($val['content']);
					?>
				  <tr>
					<td width="40" align="center"><?=$msg_pic?></td>
					<td class="tdcolor"><a href=dispuser.php?name=<?=$msg_name?> target=_blank><?=$msg_name?></a></td>
					<td><A HREF="#?"  id="userIfr5" onclick="clickUser(this.id,'usersms.php?action=read&id=<?=$msg_id?>&sender=<?=$msg_name?>');" ><?=$msg_topic?></a> </td>
					<td class="tdcolor"><?=$msg_time?></td>
					<td width="60"><?=$msg_size?>Byte</td>
				  </tr>
					<?php
						}
					}
					?>
				</table><br />
				<table width="96%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td colspan="5" class="title"> -=> <?=$lang['tpl.myct.str35']?></td>
				</tr>
				  <tr id="user_nav">
					<td width="40" align="center"><?=$lang['tpl.myct.str36']?></td>
					<td class="tdcolor"><?=$lang['tpl.myct.str34']?></td>
					<td><?=$lang['tpl.myct.str37']?></td>
					<td class="tdcolor"><?=$lang['tpl.myct.str33']?></td>
					<td width="60" align="center"><?=$lang['tpl.myct.str38']?></td>
				  </tr>
					<?php
						if( !empty($filelist) && is_array($filelist) ){
							foreach( $filelist as $val ){
								$f_filetype=str_replace('_','',$val['f_filetype']);
								$tablebody = ' class="tablebody1" ';
								$file_incept = "<img src=\"".$imgurl."icon/{$f_filetype}.gif\" border=\"0\">";
								$file_size = GetSize($val['f_filesize']);
								$file_time = gmdate('Y-m-d', $val['f_addtime'] + getUserTimeZoneOffset());
								$file_topic = htmlspecialchars($val['f_filename']);
								if($val['f_type'] == '1')
									$file_type= $lang['tpl.file.str5'];
								else if($val['f_type'] == '2')
									$file_type= $lang['tpl.file.str6'];
								else if($val['f_type'] == '3')
									$file_type= $lang['tpl.file.str7'];
								else if($val['f_type'] == '4')
									$file_type= $lang['tpl.file.str8'];
								else
									$file_type= $lang['tpl.file.str0'];
					?>
				  <tr>
					<td width="40" align="center"><?=$file_incept?></td>
					<td width="60" class="tdcolor"><?=$file_size?></td>
					<td><A HREF="#?"  id="userIfr8" onclick="clickUser(this.id,'myfile.php');" ><?=$file_topic?></a></td>
					<td class="tdcolor"><?=$file_time?></td>
					<td width="60" align="center"> <?=$file_type?></td>
				  </tr>
					<?php
							}
						}
					?>
				</table><br />
			</div>
		</span>
		</div>
		</div>
</div>
<!---########################## end 右边样式部分##########################--->
</td><tr>
</table>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--

function clickUser(o,url){	
	if (parent.document.getElementById(parent.__old)) parent.document.getElementById(parent.__old).className="user_tabgroup_on";	
	if (!parent.document.getElementById('userIfr')) return;
	parent.document.getElementById(o).className="user_tabgroup";
	parent.__old = o;
	window.location.href=url;
}
//-->
</SCRIPT>