:::

2-2 /templates/phone_book_adm_main_b3.html

<div class="container-fluid">

  <!--顯示表單-->
  <{if $now_op=="phone_book_form"}>

    <{$formValidator_code}>

    <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}>">
          </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_ZIP}>
          </label>
          <div class="col-md-5">
            <input type="text" name="zip" id="zip" class="form-control " value="<{$zip}>" placeholder="<{$smarty.const._MA_PHONEBOOK_ZIP}>">
          </div>
        </div>

        <!--縣市-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_COUNTY}>
          </label>
          <div class="col-md-5">
            <input type="text" name="county" id="county" class="form-control " value="<{$county}>" placeholder="<{$smarty.const._MA_PHONEBOOK_COUNTY}>">
          </div>
        </div>

        <!--鄉鎮市區-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_CITY}>
          </label>
          <div class="col-md-5">
            <input type="text" name="city" id="city" class="form-control " value="<{$city}>" placeholder="<{$smarty.const._MA_PHONEBOOK_CITY}>">
          </div>
        </div>

        <!--地址-->
        <div class="form-group">
          <label class="col-md-2 control-label">
            <{$smarty.const._MA_PHONEBOOK_ADDR}>
          </label>
          <div class="col-md-10">
            <input type="text" name="addr" id="addr" class="form-control " value="<{$addr}>" placeholder="<{$smarty.const._MA_PHONEBOOK_ADDR}>">
          </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_ZIP}>
      </label>
      <div class="col-md-9">
        <{$zip}>
      </div>
    </div>

    <!--縣市-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_COUNTY}>
      </label>
      <div class="col-md-9">
        <{$county}>
      </div>
    </div>

    <!--鄉鎮市區-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_CITY}>
      </label>
      <div class="col-md-9">
        <{$city}>
      </div>
    </div>

    <!--地址-->
    <div class="row">
      <label class="col-md-3 text-right">
        <{$smarty.const._MA_PHONEBOOK_ADDR}>
      </label>
      <div class="col-md-9">
        <{$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="<{$xoops_url}>/modules/phone_book/admin/main.php?op=delete_phone_book&sn=<{$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%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D39%26tbdsn%3D1216

書籍目錄

展開 | 闔起

線上使用者

44人線上 (6人在瀏覽線上書籍)

會員: 0

訪客: 44

更多…