EcShop充值卡功能插件(6)

後臺最後一部分模板

admin/

創建

kt_card_fee.htm

<!-- $Id: bonus_type_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->

<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />

{include file="pageheader.htm"}
<div class="main-div">
<form action="kt_card.php" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
<table width="100%">
    <tr>
    <td class="label">初始化儲值卡金額</td>
    <td>
      <input type='text' name='card_type' maxlength="30" value="{$card.card_type}" size='20' />    </td>
  </tr>
  <tr>
    <td class="label">&nbsp;</td>
    <td>
      <input type="submit" value="修改" class="button" />
      <input type="hidden" name="act" value="{$form_act}" />
      <input type="hidden" name="id" value="{$card.card_id}" />
    </td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="javascript">
<!--
document.forms['theForm'].elements['type_name'].focus();

function validate()
{
  validator = new Validator("theForm");
  validator.required("card_type",         "金額爲空");

  return validator.passed();
}
onload = function()
{
  {/literal}
  get_value = '{$bonus_arr.send_type}';
  {literal}

  showunit(get_value)
  // 開始檢查訂單
  startCheckOrder();
}

function gObj(obj)
{
  var theObj;
  if (document.getElementByIdx_x_x)
  {
    if (typeof obj=="string") {
      return document.getElementByIdx_x_x(obj);
    } else {
      return obj.style;
    }
  }
  return null;
}

function showunit(get_value)
{
  gObj("1").style.display =  (get_value == 2) ? "" : "none";
  document.forms['theForm'].elements['selbtn1'].disabled  = (get_value != 1 && get_value != 2);
  document.forms['theForm'].elements['selbtn2'].disabled  = (get_value != 1 && get_value != 2);

  return;
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}

創建

kt_card_list.htm


<!-- $Id: bonus_type.htm 14216 2008-03-10 02:27:21Z testyang $ -->

{if $full_page}
{include file="pageheader.htm"}
<h1>頁碼:  {$pages}</h1>
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- start bonus_type list -->
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}

  <table cellpadding="3" cellspacing="1">
    <tr>
      <th>編號</th>
      <th>儲值卡序號</th>
      <th>儲值卡密碼</th>
      <th>創建時間</th>
      <th>使用時間</th>
      <th>初始金額</th>
      <th>可用餘額</th>
      <th>操作</th>
    </tr>
    {foreach from=$type_list item=type}
    <tr>
      <td align="center" class="first-cell"><span>{$type.card_id}</span></td>
      <td align="center">{$type.card_sn}</td>
      <td align="center">{$type.card_pwd}</td>
      <td align="center">{$type.add_time}</td>
      <td align="center">{if $type.used_time eq '0'}未使用{else}{$type.used_time}{/if}</td>
      <td align="center">{$type.card_type}</td>
      <td align="center">{$type.card_bonus}</td>
      <td align="center">
          <a href="kt_card.php?act=excel">發放</a> |
          <a href="kt_card.php?act=edit_fee&id={$type.card_id}">編輯</a> |
        <a href="kt_card.php?act=delsn&amp;id={$type.card_id}">作廢</a></span></td>
    </tr>
      {foreachelse}
    <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
      {/foreach}

  </table>

{if $full_page}
</div>
</form>
<!-- end bonus_type list -->

<script type="text/javascript" language="JavaScript">
<!--
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}

  {literal}
  onload = function()
  {
     // 開始檢查訂單
     startCheckOrder();
  }
  {/literal}
//-->
</script>
{include file="pagefooter.htm"}
{/if}

創建

kt_edit_card.htm

<!-- $Id: bonus_type_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->

<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />

{include file="pageheader.htm"}
<div class="main-div">
<form action="kt_card.php" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
<table width="100%">
      <tr>
    <td class="label">前綴標識</td>
   
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章