<!--{assign var='menuid' value=''}-->
<!--{assign var='usercpmod' value='yes'}-->
<!--{include file="<!--{$tplpath}-->cp/<!--{$tplpre}-->block_head.tpl"}-->
<body>
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_menu.tpl"}-->
<div id="page-index" class="page">
  <div class="zx">
    <!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_search.tpl"}-->
	<!--{include file="<!--{$tplpath}-->cp/<!--{$tplpre}-->block_menu.tpl"}-->
	
	<div class="zright">

	  <!-- 列表记录 -->
	  <!--{if $a eq 'run'}-->
      <div class="topmenu"> 
	  	<a href="<!--{$ucfile}-->?c=gift" class='now'>收到的礼物</a>
		<a href="<!--{$ucfile}-->?c=gift&a=sendlog">送出的礼物</a>
		<a>赠送礼物</a>
	  </div>

      <div class="tb1 hy">
        <div class="htitle"> 
		共收到礼物 <span class="f_red"><!--{$total}--> </span>个
		</div>
		<!-- list start -->
		<table cellpadding='0' cellspacing='0' border='0' class='tb' width='100%'>
		  <tr>
			<th width='15%' align='center'>礼物</th>
			<th width='20%' align='center'>赠送时间</th>
			<th width='40%' align='center'>赠送人</th>
			<th width='10%' align='center'>状态</th>
			<th align='center'>操作</th>
		  </tr>

		  <!--{foreach $gift as $volist}-->
		  <tr onMouseOver='overColor(this)' onMouseOut='outColor(this)'>
		    <!-- 礼物 -->
			<td align='center' class='hback'><img src="<!--{$volist.imgurl}-->" width="75" height="75" border="0" /></td>
			<!-- 赠送时间 -->
			<td align='left' class='hback'><b><!--{$volist.giftname}--></b><br /><!--{$volist.sendtimeline|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
			<!-- 赠送人信息 -->
			<td align='left' class='hback'><!--{$volist.levelimg}--> <a href="<!--{$volist.homeurl}-->" target="_blank"><!--{$volist.username}--></a><br />( <!--{if $volist.gender==1}-->男<!--{else}-->女<!--{/if}-->&nbsp;<!--{$volist.age}-->岁&nbsp;<!--{hook mod='var' item='marrystatus' type='text' value=$volist.marrystatus}-->&nbsp;<!--{area type='text' value=$volist.proviceid}--> <!--{area type='text' value=$volist.cityid}-->&nbsp;<!--{hook mod='var' item='education' type='text' value=$volist.education}-->)</td>
			<!-- 查看状态 -->
			<td align='center' class='hback'>
			<!--{if $volist.viewstatus==1}-->
			<img src="<!--{$tplpath}-->cp/images/ok.gif" /> <font color="green">已看</font>
			<!--{else}-->
			<font color="#999999">未看</font>
			<!--{/if}-->
			</td>
			<!-- 操作 -->
			<td align='center' class='hback'><a href="<!--{$ucfile}-->?c=gift&a=send&touid=<!--{$volist.fromuserid}-->">赠送礼物</a>&nbsp;&nbsp;<a href='<!--{$ucfile}-->?c=gift&a=viewreceive&id=<!--{$volist.recordid}-->&page=<!--{$page}-->'>查看</a></td>
		  </tr>
		  <!--{foreachelse}-->
		  <tr>
			<td colspan="5" align="center" class='hback'>对不起，你还没有收到任何礼物。</td>
		  </tr>
		  <!--{/foreach}-->
		</table>
        
		<!-- 删除选项 -->
		<div class="blank5"></div>
		<!-- 分页 -->
		<!--{if $showpage!=""}-->
		<div class="page_digg" style="margin-top:15px"><!--{$showpage}--></div>
		<!--{/if}-->
		<!-- list end -->
      </div>
	  <!--{/if}-->

	  <!-- 查看收到的礼物 -->
	  <!--{if $a eq 'viewreceive'}-->
      <div class="topmenu"> 
	  	<a href="<!--{$ucfile}-->?c=gift" class='now'>收到的礼物</a>
		<a href="<!--{$ucfile}-->?c=gift&a=sendlog">送出的礼物</a>
		<a>赠送礼物</a>
	  </div>

      <div class="tb1 hy">
        <div class="htitle"> 
		<span><b>查看收到的礼物</b></span>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<!--{$ucfile}-->?c=gift&<!--{$comeurl}-->">返回列表</a>
		</div>
	    <table border="0" cellspacing="6" cellpadding="6" width="100%">
		  <tr>
		    <!-- 礼物图 -->
		    <td width="30%" class="hback_1" style="text-align:center;">
			  <br /><img src="<!--{$gift.imgurl}-->" />
			  <br /><b><!--{$gift.giftname}--></b><br />
			</td>
		    <td  valign="top">
			  <table border="0" cellspacing="3" cellpadding="3" class="tab">
			    <!-- 赠送人 -->
			    <tr>
				  <td width="15%" class="hback_b">赠送人</td>
				  <td class="hback">
				  <!--{$gift.levelimg}--> <a href="<!--{$gift.homeurl}-->" target="_blank"><!--{$gift.username}--></a><br />(<!--{if $gift.gender==1}-->男<!--{else}-->女<!--{/if}-->&nbsp;&nbsp;
				  <!--{hook mod='var' item='marrystatus' type='text' value=$gift.marrystatus}-->&nbsp;<!--{$gift.age}-->岁&nbsp;
				  <!--{area type='text' value=$gift.provinceid}--> <!--{area type='text' value=$gift.cityid}-->&nbsp;
				  <!--{hook mod='var' item='education' type='text' value=$gift.education}-->)
				  </td>
				</tr>
				<!-- 查看状态 -->
			    <tr>
				  <td class="hback_b">状态</td>
				  <td class="hback">
				  <!--{if $gift.viewstatus==1}-->
				    <img src="<!--{$tplpath}-->cp/images/ok.gif" /> <font color="green">已查看</font>  <!--{$gift.viewtimeline|date_format:"%Y-%m-%d %H:%M:%S"}-->
				  <!--{else}-->
				    <font color="#999999">未看</font>
				  <!--{/if}-->
				  &nbsp;
				  </td>
				</tr>
				<!-- 祝福语 -->
			    <tr>
				  <td class="hback_b">赠 言</td>
				  <td class="hback"><!--{$gift.message|nl2br}--></td>
				</tr>
			    <tr>
				  <td class="hback"></td>
				  <td height="20" class="hback">
				  <input type="button" name="btn_jixu" id="btn_jixu" class="button_1" value="赠送礼物给TA" onclick="javascript:window.location.href='<!--{$ucfile}-->?c=gift&a=send&touid=<!--{$gift.fromuserid}-->'" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="btn_return" id="btn_return" value="返回列表" class="button_1" onclick="javascript:window.location.href='<!--{$ucfile}-->?c=gift&<!--{$comeurl}-->'" /></td>
				</tr>
			  </table>
			</td>
		  </tr>
		</table>
	  </div>
	  <!--{/if}-->

	  <!-- 送出礼物列表 -->
	  <!--{if $a eq 'sendlog'}-->
      <div class="topmenu"> 
	  	<a href="<!--{$ucfile}-->?c=gift">收到的礼物</a>
		<a href="<!--{$ucfile}-->?c=gift&a=sendlog" class='now'>送出的礼物</a>
		<a>赠送礼物</a>
	  </div>

      <div class="tb1 hy">
        <div class="htitle"> 
		共送出礼物 <span class="f_red"><!--{$total}--> </span>个
		</div>
		<!-- list start -->
		<table cellpadding='0' cellspacing='0' border='0' class='tb' width='100%'>
		  <tr>
			<th width='15%' align='center'>礼物</th>
			<th width='20%' align='center'>赠送时间</th>
			<th width='40%' align='center'>接收人</th>
			<th width='10%' align='center'>状态</th>
			<th align='center'>操作</th>
		  </tr>

		  <!--{foreach $gift as $volist}-->
		  <tr onMouseOver='overColor(this)' onMouseOut='outColor(this)'>
		    <!-- 礼物 -->
			<td align='center' class='hback'><img src="<!--{$volist.imgurl}-->" width="75" height="75" border="0" /></td>
			<!-- 赠送时间 -->
			<td align='left' class='hback'><b><!--{$volist.giftname}--></b><br /><!--{$volist.sendtimeline|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
			<!-- 赠送人信息 -->
			<td align='left' class='hback'><!--{$volist.levelimg}--> <a href="<!--{$volist.homeurl}-->" target="_blank"><!--{$volist.username}--></a><br />( <!--{if $volist.gender==1}-->男<!--{else}-->女<!--{/if}-->&nbsp;<!--{$volist.age}-->岁&nbsp;<!--{hook mod='var' item='marrystatus' type='text' value=$volist.marrystatus}-->&nbsp;<!--{area type='text' value=$volist.proviceid}--> <!--{area type='text' value=$volist.cityid}-->&nbsp;<!--{hook mod='var' item='education' type='text' value=$volist.education}-->)</td>
			<!-- 查看状态 -->
			<td align='center' class='hback'>
			<!--{if $volist.viewstatus==1}-->
			<img src="<!--{$tplpath}-->cp/images/ok.gif" /> <font color="green">已看</font>
			<!--{else}-->
			<font color="#999999">未看</font>
			<!--{/if}-->
			</td>
			<!-- 操作 -->
			<td align='center' class='hback'><a href="<!--{$ucfile}-->?c=gift&a=send&touid=<!--{$volist.touserid}-->">继续赠送</a>&nbsp;&nbsp;<a href='<!--{$ucfile}-->?c=gift&a=viewsend&id=<!--{$volist.recordid}-->&page=<!--{$page}-->'>查看</a></td>
		  </tr>
		  <!--{foreachelse}-->
		  <tr>
			<td colspan="5" align="center" class='hback'>对不起，你还没有赠送任何礼物。</td>
		  </tr>
		  <!--{/foreach}-->
		</table>
        
		<!-- 分页 -->
		<!--{if $showpage!=""}-->
		<div class="page_digg" style="margin-top:15px"><!--{$showpage}--></div>
		<!--{/if}-->
		<!-- list end -->
	  </div>
	  <!--{/if}-->

	  <!-- 送出礼物列表 -->
	  <!--{if $a eq 'viewsend'}-->
      <div class="topmenu"> 
	  	<a href="<!--{$ucfile}-->?c=gift">收到的礼物</a>
		<a href="<!--{$ucfile}-->?c=gift&a=sendlog" class='now'>送出的礼物</a>
		<a>赠送礼物</a>
	  </div>

      <div class="tb1 hy">
        <div class="htitle"> 
		<span><b>查看送出的礼物</b></span>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<!--{$ucfile}-->?c=gift&a=sendlog&<!--{$comeurl}-->">返回列表</a>
		</div>
	    <table border="0" cellspacing="6" cellpadding="6" width="100%">
		  <tr>
		    <!-- 礼物图 -->
		    <td width="30%" class="hback_1" style="text-align:center;">
			  <br /><img src="<!--{$gift.imgurl}-->" />
			  <br /><b><!--{$gift.giftname}--></b><br />
			</td>
		    <td  valign="top">
			  <table border="0" cellspacing="3" cellpadding="3" class="tab">
			    <!-- 赠送人 -->
			    <tr>
				  <td width="15%" class="hback_b">接收人</td>
				  <td class="hback">
				  <!--{$gift.levelimg}--> <a href="<!--{$gift.homeurl}-->" target="_blank"><!--{$gift.username}--></a><br />(<!--{if $gift.gender==1}-->男<!--{else}-->女<!--{/if}-->&nbsp;&nbsp;
				  <!--{hook mod='var' item='marrystatus' type='text' value=$gift.marrystatus}-->&nbsp;<!--{$gift.age}-->岁&nbsp;
				  <!--{area type='text' value=$gift.provinceid}--> <!--{area type='text' value=$gift.cityid}-->&nbsp;
				  <!--{hook mod='var' item='education' type='text' value=$gift.education}-->)
				  </td>
				</tr>
				<!-- 查看状态 -->
			    <tr>
				  <td class="hback_b">状态</td>
				  <td class="hback">
				  <!--{if $gift.viewstatus==1}-->
				    <img src="<!--{$tplpath}-->cp/images/ok.gif" /> <font color="green">已查看</font>  <!--{$gift.viewtimeline|date_format:"%Y-%m-%d %H:%M:%S"}-->
				  <!--{else}-->
				    <font color="#999999">未看</font>
				  <!--{/if}-->
				  &nbsp;
				  </td>
				</tr>
				<!-- 祝福语 -->
			    <tr>
				  <td class="hback_b">赠 言</td>
				  <td class="hback"><!--{$gift.message|nl2br}--></td>
				</tr>
			    <tr>
				  <td class="hback"></td>
				  <td height="20" class="hback">
				  <input type="button" name="btn_jixu" id="btn_jixu" class="button_1" value="继续赠送" onclick="javascript:window.location.href='<!--{$ucfile}-->?c=gift&a=send&touid=<!--{$gift.touserid}-->'" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="btn_return" id="btn_return" value="返回列表" class="button_1" onclick="javascript:window.location.href='<!--{$ucfile}-->?c=gift&a=sendlog&<!--{$comeurl}-->'" /></td>
				</tr>
			  </table>
			</td>
		  </tr>
		</table>
	  </div>
	  <!--{/if}-->

	  <!-- 赠送礼物 -->
	  <!--{if $a eq 'send'}-->
      <div class="topmenu"> 
	  	<a href="<!--{$ucfile}-->?c=gift">收到的礼物</a>
		<a href="<!--{$ucfile}-->?c=gift&a=sendlog">送出的礼物</a>
		<a class='now'>赠送礼物</a>
	  </div>

      <div class="tb1 hy">
        <div class="htitle"> 

		  礼物分类：<!--{assign var='giftcat' value=vo_list("mod={giftcat}")}-->
		  <!--{foreach $giftcat as $volist}-->
		  <a href="<!--{$ucfile}-->?c=gift&a=send&touid=<!--{$touid}-->&catid=<!--{$volist.catid}-->"><!--{if $catid==$volist.catid}--><b><!--{$volist.catname}--></b><!--{else}--><!--{$volist.catname}--><!--{/if}--></a> 
		  <!--{/foreach}-->

		</div>
	  </div>

		<!-- 礼物列表 -->
		<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'>
		  <tr>
		   <!--{foreach $gift as $volist}-->
		    <td width='16%' align='center'>
			  <div class="giftimg"><a href="javascript:void(0);" onclick="selectgift(<!--{$volist.giftid}-->, <!--{$volist.points}-->, '<!--{$volist.giftname}-->', '<!--{$volist.imgurl}-->', '<!--{$volist.intro}-->');"><img src="<!--{$volist.imgurl}-->" width="75" height="75" border="0" /></a></div>
			  <p><b><!--{$volist.giftname}--></b> <span id="select_<!--{$volist.giftid}-->"></span></p>
			  <p><!--{$lang.points}-->：<!--{$volist.points}--></p>
			</td>
			<!--{if $volist.i%6 ==0}-->
			</tr>
			<tr>
			<!--{/if}-->
			<!--{foreachelse}-->
			<td align="center">没有信息</td>
			<!--{/foreach}-->
		  </tr>
		</table>        
		<!-- 分页 -->
		<!--{if $showpage!=""}-->
		<div class="page_digg" style="margin-top:15px"><!--{$showpage}--></div>
		<!--{/if}-->
		<!-- list end -->

		<!-- 赠送区 -->

		  <form action='<!--{$ucfile}-->?c=gift' method='post' name='myform' id='myform' style='margin:0'>
		  <input type='hidden' name='a' id='a' value='savesend' />
		  <input type='hidden' name='giftid' id='giftid' value='' />
		  <input type='hidden' name='touid' id='touid' value='<!--{$touid}-->' />
		  <table border="0" cellspacing="6" cellpadding="6" width="100%" style="background:#f5f5f5;">
		    <!-- 选择的礼物信息 -->
			<tr>
			  <td width="30%" valign="top" style="line-height:25px;text-align:center;">
			  <b>您选择的礼物</b><br />
			  <span id="tip_gift"></span><br />
			  <span id="tip_giftname"></span><br />
			  <span id="tip_points"></span><br />

			  </td>
			  <td class="right" valign="top">
				<table border="0" cellspacing="6" cellpadding="6" class="tab">
				  <!-- 接收人 -->
				  <tr>
					<td class="hback_b"><b>接 收 人</b> <span class="f_red">*</span></td>
				  </tr>
				  <tr>
					<td class="hback"><!--{$touserinfo.levelimg}--> <a href="<!--{$touserinfo.homeurl}-->" target="_blank"><!--{$touserinfo.username}--></a>&nbsp;&nbsp;(<!--{if $touserinfo.gender==1}-->男<!--{else}-->女<!--{/if}-->&nbsp;&nbsp;<!--{$touser.marry_t}-->&nbsp;&nbsp;<!--{$touserinfo.age}-->岁&nbsp;&nbsp;
					<!--{area type='text' value=$touserinfo.provinceid}--> <!--{area type='text' value=$touserinfo.cityid}-->
					&nbsp;&nbsp;<!--{hook mod='var' item='education' type='text' value=$touserinfo.education}-->)</td>
				  </tr>
				  <!-- 祝福语 -->
				  <tr>
					<td class="hback_b"><b>祝 福 语</b> <span class="f_red">*</span></td>
				  </tr>
				  <tr>
					<td class="hback" id='message'></td>
				  </tr>
				  <tr>
					<td class="hback">
					<a href="###" class="btn_b2 btn" onclick="return checkform();"><span>赠送礼物</span></a>
					</td>
				  </tr>
				</table>
			  </td>
			</tr>
		  </table>
		  </form>


	  <!--{/if}-->


    </div>

    <div style="clear:both;"></div>
  </div>
  <div style="clear:both;"></div>
</div>
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_footer.tpl"}-->
</body>
</html>
<script language="javascript">
//选择礼物
function selectgift(id, points, giftname, giftimg, msg){
    $("#select_"+id).html("<img src='<!--{$skinpath}-->cp/images/ok.gif' border='0' />");
	$("#giftid").val(id);
	$("#tip_gift").html("<img src="+giftimg+" border='0' />");
	$("#tip_giftname").html("<b><font color=orange>"+giftname+"</font></b>");
	$("#tip_points").html("<!--{$lang.points}-->：<b><font color=green>"+points+"</font></b>");
	$("#message").html(msg);
}

//
function checkform() {
	if ($('#giftid').val() == '') {
		alert('请选择要赠送的礼物');
		return false;
	}
	$('#myform').submit();
	return true;

}
</script>