1 |
<!-- requires action=select_c_customer --> |
2 |
|
3 |
[% DEFAULT |
4 |
show_c_customer_id = 1 |
5 |
show_c_customer_name = 1 |
6 |
show_c_customer_c_news = 1 |
7 |
show_filter_c_customer = 1 |
8 |
show_detail_c_customer = 0 |
9 |
show_update_c_customer = 0 |
10 |
show_insert_c_customer = 1 |
11 |
show_download_c_customer = 1 |
12 |
show_limit_c_customer = 1 |
13 |
|
14 |
limit = 20 |
15 |
offset = 0 |
16 |
%] |
17 |
|
18 |
<table> |
19 |
<tr> |
20 |
|
21 |
<!-- header --> |
22 |
|
23 |
[% IF (show_c_customer_id == 1) %] |
24 |
<th><a href="[% script_name %]?template=pg_sel_c_customer&limit=[% limit %]&offset=0&order_by=c_customer_id">id</a></th> |
25 |
[% END %] |
26 |
|
27 |
|
28 |
[% IF (show_c_customer_name == 1) %] |
29 |
<th><a href="[% script_name %]?template=pg_sel_c_customer&limit=[% limit %]&offset=0&order_by=c_customer_name">name</a></th> |
30 |
[% END %] |
31 |
|
32 |
[% IF (show_c_customer_phone == 1) %] |
33 |
<th><a href="[% script_name %]?template=pg_sel_c_customer&limit=[% limit %]&offset=0&order_by=c_customer_phone">phone</a></th> |
34 |
[% END %] |
35 |
|
36 |
[% IF (show_c_customer_email == 1) %] |
37 |
<th><a href="[% script_name %]?template=pg_sel_c_customer&limit=[% limit %]&offset=0&order_by=c_customer_email">email</a></th> |
38 |
[% END %] |
39 |
|
40 |
[% IF (show_c_customer_notes == 1) %] |
41 |
<th><a href="[% script_name %]?template=pg_sel_c_customer&limit=[% limit %]&offset=0&order_by=c_customer_notes">notes</a></th> |
42 |
[% END %] |
43 |
|
44 |
|
45 |
|
46 |
</tr> |
47 |
|
48 |
<!-- filter --> |
49 |
|
50 |
[% IF (show_filter_c_customer == 1) %] |
51 |
|
52 |
<form method="get" action="[% script_name %]"> |
53 |
<input type="hidden" name="template" value="pg_sel_c_customer"> |
54 |
|
55 |
<tr> |
56 |
[% IF (show_c_customer_id == 1) %] |
57 |
<td> |
58 |
<input name="c_customer_id" size="4" value="[% c_customer_id %]"> |
59 |
</td> |
60 |
[% END %] |
61 |
|
62 |
|
63 |
[% IF (show_c_customer_name == 1) %] |
64 |
<td> |
65 |
<input name="c_customer_name" size="12" value="[% c_customer_name %]"> |
66 |
</td> |
67 |
[% END %] |
68 |
|
69 |
[% IF (show_c_customer_phone == 1) %] |
70 |
<td> |
71 |
<input name="c_customer_phone" size="12" value="[% c_customer_phone %]"> |
72 |
</td> |
73 |
[% END %] |
74 |
|
75 |
[% IF (show_c_customer_email == 1) %] |
76 |
<td> |
77 |
<input name="c_customer_email" size="12" value="[% c_customer_email %]"> |
78 |
</td> |
79 |
[% END %] |
80 |
|
81 |
[% IF (show_c_customer_notes == 1) %] |
82 |
<td> |
83 |
<input name="c_customer_notes" size="12" value="[% c_customer_notes %]"> |
84 |
</td> |
85 |
[% END %] |
86 |
|
87 |
|
88 |
|
89 |
<td> |
90 |
<input type="submit" value="filter"> |
91 |
</td> |
92 |
</tr> |
93 |
|
94 |
</form> |
95 |
[% END %] |
96 |
|
97 |
<!-- table --> |
98 |
|
99 |
[% FOREACH row = view_c_customer %] |
100 |
<tr> |
101 |
|
102 |
[% IF (show_c_customer_id == 1) %] |
103 |
<th> |
104 |
<a href="[% script_name %]?template=pg_detail_c_customer&c_customer_id=[% row.c_customer_id %]">[% row.c_customer_id %]</a> |
105 |
</th> |
106 |
[% END %] |
107 |
|
108 |
|
109 |
[% IF (show_c_customer_name == 1) %] |
110 |
<td class="td[% loop.count mod 2 %]"> |
111 |
<a href="[% script_name %]?template=pg_detail_c_customer&c_customer_id=[% row.c_customer_id %]">[% row.c_customer_name %]</a> |
112 |
</td> |
113 |
[% END %] |
114 |
|
115 |
[% IF (show_c_customer_phone == 1) %] |
116 |
<td class="td[% loop.count mod 2 %]"> |
117 |
<a href="[% script_name %]?template=pg_detail_c_customer&c_customer_id=[% row.c_customer_id %]">[% row.c_customer_phone %]</a> |
118 |
</td> |
119 |
[% END %] |
120 |
|
121 |
[% IF (show_c_customer_email == 1) %] |
122 |
<td class="td[% loop.count mod 2 %]"> |
123 |
<a href="[% script_name %]?template=pg_detail_c_customer&c_customer_id=[% row.c_customer_id %]">[% row.c_customer_email %]</a> |
124 |
</td> |
125 |
[% END %] |
126 |
|
127 |
[% IF (show_c_customer_notes == 1) %] |
128 |
<td class="td[% loop.count mod 2 %]"> |
129 |
<a href="[% script_name %]?template=pg_detail_c_customer&c_customer_id=[% row.c_customer_id %]">[% row.c_customer_notes %]</a> |
130 |
</td> |
131 |
[% END %] |
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
<td class="td[% loop.count mod 2 %]"> |
138 |
<a href="[% script_name %]?template=pg_sel_c_news&c_customer_id=[% row.c_customer_id %]">news</a> |
139 |
</td> |
140 |
|
141 |
|
142 |
[% IF (show_detail_c_customer == 1) %] |
143 |
<td class="td[% loop.count mod 2 %]"> |
144 |
<a href="[% script_name %]?template=pg_detail_c_customer&c_customer_id=[% row.c_customer_id %]">detail</a> |
145 |
</td> |
146 |
[% END %] |
147 |
|
148 |
[% IF (show_update_c_customer == 1) %] |
149 |
<td class="td[% loop.count mod 2 %]"> |
150 |
<a href="[% script_name %]?template=pg_upd_c_customer&c_customer_id=[% row.c_customer_id %]">update</a> |
151 |
</td> |
152 |
[% END %] |
153 |
|
154 |
</tr> |
155 |
[% END %] |
156 |
|
157 |
[% IF (view_c_customer.size == limit) %] |
158 |
<tr> |
159 |
<th colspan="2"> |
160 |
<a accesskey="m" href="[% script_name %]?template=pg_sel_c_customer&limit=[% limit %]&offset=[% offset+limit %]&order_by=[% order_by %]">more</a> |
161 |
</th> |
162 |
</tr> |
163 |
[% END %] |
164 |
|
165 |
</table> |
166 |
|
167 |
<UL> |
168 |
[% IF (view_c_customer.size == limit && show_limit_c_customer == 1) %] |
169 |
<LI> show |
170 |
<a href="[% script_name %]?template=pg_sel_c_customer&limit=20&offset=[% offset %]&order_by=[% order_by %]">20</a>, |
171 |
<a href="[% script_name %]?template=pg_sel_c_customer&limit=50&offset=[% offset %]&order_by=[% order_by %]">50</a>, |
172 |
<a href="[% script_name %]?template=pg_sel_c_customer&limit=100&offset=[% offset %]&order_by=[% order_by %]">100</a>, |
173 |
<a href="[% script_name %]?template=pg_sel_c_customer&limit=65536&offset=0&order_by=[% order_by %]">all</a><BR> |
174 |
[% END %] |
175 |
</UL> |