:::

5-8 /templates/phone_book_adm_main_b3.html

<div class="container-fluid">

  <!--顯示表單-->
  <{if $now_op=="phone_book_form"}>
    <script type="text/javascript" src="<{$xoops_url}>/modules/tadtools/My97DatePicker/WdatePicker.js"></script>
    <{$formValidator_code}>
    <{$formValidator_code2}>

    <script language="javascript" src="../class/jquery.twzipcode-1.7.1.js"></script>
    <script type="text/javascript">
      $(document).ready(function() {
        $("#AddrForm").twzipcode();
      });
    </script>

    <div class="container">

      <form action="<{$action}>" method="post" id="myForm" enctype="multipart/form-data" class="form-horizontal" role="form">

        <!--分類編號-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_CATE_SN}>
          </label>
          <div class="col-md-5">
            <select name="cate_sn" class="form-control " size=1>
              <option value=""></option>
              <{foreach from=$cate_sn_options item=opt}>
                <option value="<{$opt.cate_sn}>" <{if $cate_sn==$opt.cate_sn}>selected<{/if}>><{$opt.cate_title}></option>
              <{/foreach}>
            </select>
          </div>
        </div>

        <!--姓名-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_NAME}>
          </label>
          <div class="col-md-5">
            <input type="text" name="name" id="name" class="form-control validate[required, minSize[2] , maxSize[4]]" value="<{$name}>" placeholder="<{$smarty.const._MA_PHONEBOOK_NAME}>">
          </div>
        </div>

        <!--生日 date-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_BIRTHDAY}>
          </label>
          <div class="col-md-5">
            <input type="text" name="birthday" id="birthday" class="form-control validate[past[NOW], custom[date]]" value="<{$birthday}>" placeholder="<{$smarty.const._MA_PHONEBOOK_BIRTHDAY}>" onClick="WdatePicker()">
          </div>
        </div>

        <!--電話-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_PHONE}>
          </label>
          <div class="col-md-5">
            <input type="text" name="phone" id="phone" class="form-control validate[required, custom[phone]]" value="<{$phone}>" placeholder="<{$smarty.const._MA_PHONEBOOK_PHONE}>">
          </div>
        </div>

        <!--電子信箱-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_EMAIL}>
          </label>
          <div class="col-md-5">
            <input type="text" name="email" id="email" class="form-control validate[custom[email]]" value="<{$email}>" placeholder="<{$smarty.const._MA_PHONEBOOK_EMAIL}>">
          </div>
        </div>

        <!--地址-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_ADDR}>
          </label>
          <div class="col-md-10">
            <div id="AddrForm" class="row">
              <div data-role="zipcode"
                   data-name="zip"
                   data-value="<{$zip}>"
                   data-style="form-control"
                   class="col-md-2">
              </div>
              <div data-role="county"
                   data-name="county"
                   data-value="<{$county}>"
                   data-style="form-control"
                   class="col-md-2">
              </div>
              <div data-role="district"
                   data-name="city"
                   data-value="<{$city}>"
                   data-style="form-control"
                   class="col-md-2">
              </div>
              <div class="col-md-6">
                <input type="text" name="addr" id="addr" class="form-control " value="<{$addr}>" placeholder="<{$smarty.const._MA_PHONEBOOK_ADDR}>">
              </div>

            </div>
          </div>
        </div>

        <!--備註-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_NOTE}>
          </label>
          <div class="col-md-10">
            <textarea name="note" rows=8 id="note" class="form-control " placeholder="<{$smarty.const._MA_PHONEBOOK_NOTE}>"><{$note}></textarea>
          </div>
        </div>

        <div class="text-center">

          <!--編號-->
          <input type='hidden' name="sn" value="<{$sn}>">

          <input type="hidden" name="op" value="<{$next_op}>">
          <button type="submit" class="btn btn-primary"><{$smarty.const._TAD_SAVE}></button>
        </div>
      </form>
    </div>
  <{/if}>


  <!--顯示某一筆資料-->
  <{if $now_op=="show_one_phone_book"}>

    <h2 class="text-center"><{$name}></h2>

    <!--分類編號-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_CATE_SN}>
      </label>
      <div class="col-md-9">
        <{$cate_sn}>
      </div>
    </div>

    <!--生日-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_BIRTHDAY}>
      </label>
      <div class="col-md-9">
        <{$birthday}>
      </div>
    </div>

    <!--電話-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_PHONE}>
      </label>
      <div class="col-md-9">
        <{$phone}>
      </div>
    </div>

    <!--電子信箱-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_EMAIL}>
      </label>
      <div class="col-md-9">
        <{$email}>
      </div>
    </div>


    <!--地址-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_ADDR}>
      </label>
      <div class="col-md-9">
        <{$zip}> <{$county}><{$city}><{$addr}>
      </div>
    </div>

    <!--備註-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_NOTE}>
      </label>
      <div class="col-md-9">

        <div class="well">
          <{$note}>
        </div>
      </div>
    </div>

    <div class="text-right">
      <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=delete_phone_book&sn=<{$sn}>" class="btn btn-danger"><{$smarty.const._TAD_DEL}></a>
      <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form&sn=<{$sn}>" class="btn btn-warning"><{$smarty.const._TAD_EDIT}></a>
      <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form" class="btn btn-primary"><{$smarty.const._TAD_ADD}></a>
      <a href="<{$action}>" class="btn btn-success"><{$smarty.const._TAD_HOME}></a>
    </div>
  <{/if}>

  <!--列出所有資料-->

  <{if $now_op=="list_phone_book"}>
    <{if $all_content}>

      <table class="table table-striped table-hover">
        <thead>
          <tr>

            <th>
              <!--姓名-->
              <{$smarty.const._MA_PHONEBOOK_NAME}>
            </th>
            <th>
              <!--生日-->
              <{$smarty.const._MA_PHONEBOOK_BIRTHDAY}>
            </th>
            <th>
              <!--電話-->
              <{$smarty.const._MA_PHONEBOOK_PHONE}>
            </th>
            <th>
              <!--電子信箱-->
              <{$smarty.const._MA_PHONEBOOK_EMAIL}>
            </th>
            <th>
              <!--郵遞區號-->
              <{$smarty.const._MA_PHONEBOOK_ZIP}>
            </th>
            <th>
              <!--縣市-->
              <{$smarty.const._MA_PHONEBOOK_COUNTY}>
            </th>
            <th>
              <!--鄉鎮市區-->
              <{$smarty.const._MA_PHONEBOOK_CITY}>
            </th>
            <th>
              <!--地址-->
              <{$smarty.const._MA_PHONEBOOK_ADDR}>
            </th>
            <th>
              <{$smarty.const._TAD_FUNCTION}>
            </th>
          </tr>
        </thead>

        <tbody>
          <{foreach from=$all_content item=data}>
            <tr>

              <td>
                <!--姓名-->
                <a href="<{$action}>?sn=<{$data.sn}>"><{$data.name}></a>
              </td>

              <td>
                <!--生日-->
                <{$data.birthday}>
              </td>

              <td>
                <!--電話-->
                <{$data.phone}>
              </td>

              <td>
                <!--電子信箱-->
                <{$data.email}>
              </td>

              <td>
                <!--郵遞區號-->
                <{$data.zip}>
              </td>

              <td>
                <!--縣市-->
                <{$data.county}>
              </td>

              <td>
                <!--鄉鎮市區-->
                <{$data.city}>
              </td>

              <td>
                <!--地址-->
                <{$data.addr}>
              </td>

              <td>
                <a href="javascript:delete_sn_func(<{$data.sn}>)" class="btn btn-xs btn-danger"><{$smarty.const._TAD_DEL}></a>
                <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form&sn=<{$data.sn}>" class="btn btn-xs btn-warning"><{$smarty.const._TAD_EDIT}></a>
              </td>
            </tr>
          <{/foreach}>
        </tbody>
      </table>

      <div class="text-right">
        <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form" class="btn btn-info"><{$smarty.const._TAD_ADD}></a>
      </div>

      <{$bar}>
    <{else}>
      <div class="jumbotron text-center">
        <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form" class="btn btn-info"><{$smarty.const._TAD_ADD}></a>
      </div>
    <{/if}>
  <{/if}>

</div>

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1247%26tbsn%3D39

書籍目錄

展開 | 闔起

線上使用者

43人線上 (11人在瀏覽線上書籍)

會員: 0

訪客: 43

更多…