{?set $jieqi_pagetitle = "我要赠送-{$jieqi_sitename}"?}
{?set $jieqi_contenttitle = "我要赠送"?}

<script type="text/javascript">
function frmgift_validate(){
  if(document.frmgift.num.value == ""){
    alert("请输入赠送数量");
    document.frmgift.num.focus();
    return false;
  }
  return true;
}
</script>
<form class="form" name="frmgift" id="frmgift" action="{?$jieqi_modules['article']['url']?}/gift.php?do=submit" method="post" onsubmit="return frmgift_validate();" enctype="mulgiftart/form-data">
<fieldset>
	<div class="frow">
		<label class="col4 flabel">目标小说：</label>
		<div class="col8 last">
			<a href="{?function jieqi_geturl:'article':'article':$articleid:'info':$articlecode?}">{?$articlename?}</a>
		</div>
	</div>
	<div class="frow">
		<label class="col4 flabel">赠送内容：</label>
		<div class="col8 last">
			{?$giftvals['caption']?} （现有：{?$jieqi_setting['gift'][$gift_type]|intval?}）
			{?if $giftvals['sprice'] > 0 || $giftvals['eprice'] > 0?}
			&nbsp; 
			<!--< a href="{?$jieqi_modules['article']['url']?}/giftbuy.php?type={?$gift_type?}">&gt;购买</a> -->
			<a class="btnlink" id="a_buy_{?$gift_type?}" href="javascript:;" onclick="openDialog('{?$jieqi_modules['article']['url']?}/giftbuy.php?type={?$gift_type?}&ajax_gets=jieqi_contents&jumpurl={?$jumpurl?}', false);">购买</a>
			{?/if?}
			<input type="hidden" name="type" value="{?$gift_type?}" />
		</div>
	</div>
	<div class="frow">
		<label class="col4 flabel">赠送数量：</label>
		<div class="col8 last">
			<input type="text" class="text" name="num" maxlength="10" value="1" />
		</div>
	</div>
	<div class="frow">
		<label class="col4 flabel">&nbsp;</label>
		<div class="col8 last">
			{?if $ajax_request > 0?}
  			<button type="button" name="Submit" class="button" style="cursor:pointer;" onclick="Form.disable('frmgift');Ajax.Request('frmgift',{onComplete:function(){alert(this.response.replace(/<br[^<>]*>/g,'\n'));closeDialog();
}});">提 交</button>
  			{?else?}
  			<button type="submit" class="button" name="submit">提 交</button>
  			{?/if?}
  			<input type="hidden" name="act" value="post" />{?$jieqi_token_input?}
			<input type="hidden" name="id" value="{?$articleid?}" />
		</div>
	</div>
</fieldset>
</form>