:::

3-2 /templates/phone_book_index_b3.html

001<{$toolbar}>
002 
003<!--顯示某一筆資料-->
004<{if $now_op=="show_one_phone_book"}>
005 
006  <{$jeditable_set}>
007 
008  <h2 class="text-center" id="name"><{$name}></h2>
009 
010  <!--分類編號-->
011  <div class="row">
012    <label class="col-md-3 text-right">
013      <{$smarty.const._MD_PHONEBOOK_CATE_SN}>
014    </label>
015    <div class="col-md-9" id="cate_sn">
016      <{$cate_sn_title}>
017    </div>
018  </div>
019 
020  <!--生日-->
021  <div class="row">
022    <label class="col-md-3 text-right">
023      <{$smarty.const._MD_PHONEBOOK_BIRTHDAY}>
024    </label>
025    <div class="col-md-9">
026      <{$birthday}>
027    </div>
028  </div>
029 
030  <!--電話-->
031  <div class="row">
032    <label class="col-md-3 text-right">
033      <{$smarty.const._MD_PHONEBOOK_PHONE}>
034    </label>
035    <div class="col-md-9">
036      <{$phone}>
037    </div>
038  </div>
039 
040  <!--電子信箱-->
041  <div class="row">
042    <label class="col-md-3 text-right">
043      <{$smarty.const._MD_PHONEBOOK_EMAIL}>
044    </label>
045    <div class="col-md-9">
046      <{$email}>
047    </div>
048  </div>
049 
050 
051  <!--地址-->
052  <div class="row">
053    <label class="col-md-3 text-right">
054      <{$smarty.const._MD_PHONEBOOK_ADDR}>
055    </label>
056    <div class="col-md-9">
057      <{$zip}><{$county}><{$city}><{$addr}>
058    </div>
059  </div>
060 
061  <!--備註-->
062  <div class="row">
063    <label class="col-md-3 text-right">
064      <{$smarty.const._MD_PHONEBOOK_NOTE}>
065    </label>
066    <div class="col-md-9">
067      <pre class="well" id="note"><{$note}></pre>
068    </div>
069  </div>
070 
071  <div class="text-right">
072    <{if $isAdmin}>
073      <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>
074      <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>
075      <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form" class="btn btn-primary"><{$smarty.const._TAD_ADD}></a>
076    <{/if}>
077    <a href="<{$action}>" class="btn btn-success"><{$smarty.const._TAD_HOME}></a>
078  </div>
079<{/if}>
080 
081<!--列出所有資料-->
082<{if $now_op=="list_phone_book"}>
083 
084  <script type="text/javascript">
085 
086    $(document).ready(function(){
087 
088      $( "#keyword" ).autocomplete({
089        source: "get_name.php"
090      });
091 
092      $("#search_bar").hide();
093 
094      // $("#open_bar").click(function(){
095      //   $("#search_bar").toggle('slow');
096      //   $("#open_bar").toggleClass("btn-danger");
097      // });
098 
099      $("#open_bar").toggle(function() {
100        $("#open_bar").html("關閉搜尋").removeClass('btn-info').addClass('btn-danger');
101        $("#search_bar").fadeIn("slow");
102      }, function() {
103        $("#open_bar").html("開啟搜尋").removeClass('btn-danger').addClass('btn-info');
104        $("#search_bar").fadeOut("slow");
105      });
106 
107      $("#cate_sn").change(function(){
108        location.href = "index.php?cate_sn=" + $("#cate_sn").val() + "&city=" + $("#city").val();
109      });
110 
111      $("#county").change(function(){
112        var county_val = $("#county").val();
113        $.post("ajax.php", { "county": county_val} ,
114          function(data) {
115            $("#city").html(data);
116          });
117      });
118 
119 
120      $("#city").change(function(){
121        location.href = "index.php?cate_sn=" + $("#cate_sn").val() + "&city=" + $("#city").val();
122      });
123 
124    });
125  </script>
126 
127  <form action="index.php">
128    <div class="row">
129 
130      <div class="col-md-2">
131        <button type="button" id="open_bar" class="btn btn-info">開啟搜尋</button>
132      </div>
133 
134      <div class="col-md-10">
135        <div class="row" id="search_bar">
136          <{if $cate_arr}>
137            <div class="col-md-3">
138              <!-- 分類選單 -->
139              <select name="cate_sn" id="cate_sn" class="form-control">
140                <option value=""></option>
141                <{foreach from=$cate_arr item=cate}>
142                  <option value="<{$cate.cate_sn}>" <{if $cate_sn==$cate.cate_sn}>selected<{/if}>><{$cate.cate_title}></option>
143                <{/foreach}>
144              </select>
145            </div>
146          <{/if}>
147 
148          <div class="col-md-3">
149            <!-- 縣市選單 -->
150            <select name="county" id="county" class="form-control">
151              <option value="">請選擇縣市</option>
152              <{foreach from=$county_arr item=county}>
153                <option value="<{$county}>"><{$county}></option>
154              <{/foreach}>
155            </select>
156 
157          </div>
158          <div class="col-md-3">
159            <!-- 鄉鎮市區選單 -->
160            <select name="city" id="city" class="form-control">
161              <option value="">選擇鄉鎮市區</option>
162 
163            </select>
164 
165          </div>
166          <div class="col-md-3">
167            <input type="text" name="keyword" id="keyword" class="form-control" placeholder="請輸入關鍵字">
168          </div>
169        </div>
170      </div>
171 
172    </div>
173  </form>
174 
175  <{if $all_content}>
176    <table id="phone_table" class="table table-striped table-hover" data-sorting="true" data-filtering="true">
177      <thead>
178        <tr>
179          <!--姓名-->
180          <th>
181            <{$smarty.const._MD_PHONEBOOK_NAME}>
182          </th>
183          <!--生日-->
184          <th data-breakpoints="xs">
185            <{$smarty.const._MD_PHONEBOOK_BIRTHDAY}>
186          </th>
187          <!--電話-->
188          <th>
189            <{$smarty.const._MD_PHONEBOOK_PHONE}>
190          </th>
191          <!--電子信箱-->
192          <th data-breakpoints="xs">
193            <{$smarty.const._MD_PHONEBOOK_EMAIL}>
194          </th>
195          <!--地址-->
196          <th data-breakpoints="xs sm md">
197            <{$smarty.const._MD_PHONEBOOK_ADDR}>
198          </th>
199          <!--分類-->
200          <th data-breakpoints="xs sm">
201            <{$smarty.const._MD_PHONEBOOK_CATE_SN}>
202          </th>
203          <{if $isAdmin}>
204            <th data-breakpoints="xs sm"><{$smarty.const._TAD_FUNCTION}></th>
205          <{/if}>
206        </tr>
207      </thead>
208 
209      <tbody>
210        <{foreach from=$all_content item=data}>
211          <tr>
212 
213            <td>
214              <!--姓名-->
215              <a href="<{$action}>?sn=<{$data.sn}>"><{$data.name}></a>
216            </td>
217 
218            <td>
219              <!--生日-->
220              <{$data.birthday}>
221            </td>
222 
223            <td>
224              <!--電話-->
225              <{$data.phone}>
226            </td>
227 
228            <td>
229              <!--電子信箱-->
230              <{$data.email}>
231            </td>
232 
233            <td>
234              <!--郵遞區號-->
235              <{$data.zip}>
236              <!--縣市-->
237              <{$data.county}>
238              <!--鄉鎮市區-->
239              <{$data.city}>
240              <!--地址-->
241              <{$data.addr}>
242            </td>
243 
244            <td>
245              <!--分類-->
246              <{$data.cate_title}>
247            </td>
248 
249            <{if $isAdmin}>
250              <td>
251                <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>
252                <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>
253              </td>
254            <{/if}>
255          </tr>
256        <{/foreach}>
257      </tbody>
258    </table>
259 
260 
261    <{if $isAdmin}>
262      <div class="text-right">
263        <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form" class="btn btn-info"><{$smarty.const._TAD_ADD}></a>
264      </div>
265    <{/if}>
266 
267    <{$bar}>
268  <{else}>
269    <{if $isAdmin}>
270      <div class="jumbotron text-center">
271        <a href="<{$xoops_url}>/modules/phone_book/admin/main.php?op=phone_book_form" class="btn btn-info"><{$smarty.const._TAD_ADD}></a>
272      </div>
273    <{/if}>
274  <{/if}>
275<{/if}>

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp27.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1222%26tbsn%3D39

書籍目錄

展開 | 闔起

線上使用者

72人線上 (14人在瀏覽線上書籍)

會員: 0

訪客: 72

更多…