<script language="javascript">

function Reply(id,name,types,content){
	jPrompt("",content,"&nbsp;回复网友："+name+"<span style='margin-left:105px;' onclick='RemoveRe()'>[关&nbsp;闭]</span>",function(R){																																															
			window.location='<?php echo S_SiteDomain?>/user/do.php?ac=gbook&op=hf&id='+id+'&content='+R+'&types='+types;															  
			})
	}
	
function RemoveRe(){
	$.alerts._hide();
	}	
</script>
		<div class="userMain">
			<div class="uMain_title"><span class="iconWall">留言板</span></div>
			<div class="uMain_content">
				<div class="stageBox">
					<div class="stageBoxTop"><span></span></div>
					<div class="stageBoxCenter">
						<div class="stageBoxCenterContent">
							<div class="main_nav">
								<ul>
								<li class="nava_4"><a href="?ac=gbook">我的留言</a></li>
								</ul>
							</div>
							<div id="wall_content" class="minHeight500">
											<div class="wallLine">
<?php
$a=0;
	global $db;
	$sqlup1="update s_xiaoxi set S_Did=1 where S_Namea='".$chsh_username."'";
	$db->query($sqlup1);
	$sql="select * from s_gbook where S_Namea='".$chsh_username."' order by s_id desc";
		$Arr=getuserpage($sql,"30");//sql,每页显示条数
		$result=$db->query($Arr[2]);
		$numdate="a";
		if($result){
			while ($row = $db ->fetch_array($result)){
		$numdate="b";
	$sqlu="select s_logo,S_RealName from s_users where S_name='".$row["S_Nameb"]."' order by s_id desc";
	$rsu=$db->query($sqlu);
	$rowu=$db->fetch_array($rsu);
?>
			<div class="wallItem">
				<div class="arrow"><s></s></div>
				<div class="wI_avatar">
					<a href="<?php echo userlink("index",$row["S_Nameb"])?>"><img class="avatar-58" src="<?php echo piclink("logo",$rowu["s_logo"],"big")?>" onerror="this.onerror=null;this.src='<?php echo S_SiteDomain?>/user/images/avatar/noface_small.gif'" width="48" height="48"/></a>
				</div>
				<div class="wI_content">
					<div class="wI_top">
						<span class="nickname"><a href="<?php echo userlink("index",$row["S_Nameb"])?>"><?php echo $row["S_Nameb"]?></a></span>
						<span class="info">留言：</span>
												<span id="del-w825" class="del" onClick="window.open('do.php?ac=gbook&op=del&id=<?php echo $row["S_ID"]?>')" title="删除"></span>
												<span class="others">
							<span class="createTime"><?php echo datetime($row["S_AddTime"])?></span>
							<span><a href="javascript:;"  onclick="Reply(<?php echo $row["S_ID"]?>,'<?php echo $row["S_Nameb"]?>','<?php echo $row["S_Nameb"]?>','<?php echo $row["S_ReContent"]?>')" >回复</a></span>
						</span>
					</div>
					<div class="wI_text">
						<?php echo str_decode(facehtml($row["S_Content"]))?>					</div>
				</div>
			</div>
<?php
if(trim($row['S_ReContent'])!=""){
	$sqlq="select s_logo,S_RealName from s_users where S_name='".$row["S_Namea"]."' order by s_id desc";
	$rsq=$db->query($sqlq);
	$rowq=$db->fetch_array($rsq);
?>
			<div class="wallComment">
							<div class="wallCommentItem">
			<div class="wC_avatar">
				<a href="<?php echo userlink("index",$row["S_Namea"])?>"><img class="avatar-38" src="../Upload/userlogo/big<?php echo $rowq["s_logo"]?>" onerror="this.onerror=null;this.src='<?php echo S_SiteDomain?>/user/images/avatar/noface_small.gif'"/></a>
			</div>
			<div class="wC_top">
				<span class="nickname"><a href="<?php echo userlink("index",$row["S_Namea"])?>"><?php echo $row["S_Namea"]?></a></span>
								<span id="del-c259" class="del" onClick="window.open('do.php?ac=gbook&op=del&id=<?php echo $row["S_ID"]?>')" title="删除"></span>
								<span class="others">
					<span class="createTime"><?php echo datetime($row["S_ReTime"])?></span>
									</span>
			</div>
			<div class="wC_text">
				回复<a href="<?php echo userlink("index",$row["S_Nameb"])?>" target="_blank"><?php echo $row["S_Nameb"]?></a>:<?php echo str_decode(facehtml($row["S_ReContent"]))?>			</div>
		</div>
				</div>
<?php
}
?>
<?php
	}
}
if($numdate=="a"){
		echo("<div class='nothing'>还木有留言。</div>");
}
?>
		</div>
	<div class="page"><div class="pages"><?php echo $Arr[0];?></div></div>
 
							</div>
							<div id="currPageNum">1</div>
						</div>
					</div>
					<div class="stageBoxBottom"><span></span></div>
				</div>
			</div>
