<!--{assign var='menuid' value=''}-->
<!--{assign var='usercpmod' value='yes'}-->
<!--{include file="<!--{$tplpath}-->cp/<!--{$tplpre}-->block_head_jdbox.tpl"}-->
<body style="background-color:#ffffff;">
<div style="margin:3px auto;width:98%;">
<!-- 提示 -->
<div class="cphtitle" style="margin-top:2px;margin-bottom:2px;">
礼物分类：
<!--{assign var='giftcat' value=vo_list("mod={giftcat}")}-->
<!--{foreach $giftcat as $volist}-->
<a href="<!--{$ucfile}-->?c=gift&a=send&touid=<!--{$touid}-->&catid=<!--{$volist.catid}-->&halttype=jdbox"><!--{if $catid==$volist.catid}--><b><!--{$volist.catname}--></b><!--{else}--><!--{$volist.catname}--><!--{/if}--></a> 
<!--{/foreach}-->
</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>
<div class='c'></div>
<!--{/if}-->
<!-- list end -->

<!-- 赠送区 -->

<form action='<!--{$ucfile}-->?c=gift&halttype=jdbox' 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 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>

</div>
</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>