Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?php
2
/*************************
3
  Coppermine Photo Gallery
4
  ************************
5
  Copyright (c) 2003-2005 Coppermine Dev Team
6
  v1.1 originaly written by Gregory DEMAR
7
 
8
  This program is free software; you can redistribute it and/or modify
9
  it under the terms of the GNU General Public License as published by
10
  the Free Software Foundation; either version 2 of the License, or
11
  (at your option) any later version.
12
  ********************************************
13
  Coppermine version: 1.3.3
14
  $Source: /cvsroot/coppermine/stable/themes/hardwired/theme.php,v $
15
  $Revision: 1.12 $
16
  $Author: gaugau $
17
  $Date: 2005/04/19 03:17:14 $
18
**********************************************/
19
 
20
define('THEME_HAS_RATING_GRAPHICS', 1);
21
// HTML template for main menu
22
$template_main_menu1 = <<<EOT
23
                <span class="topmenu">
24
                        <table border="0" cellpadding="0" cellspacing="0">
25
                                <tr>
26
<!-- BEGIN my_gallery -->
27
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
28
                                        <td><img name="buttonleftmy" src="themes/hardwired/images/buttonleftmy.gif" width="17" height="25" border="0" id="buttonleftmy" alt="" /></td>
29
                                        <td background="themes/hardwired/images/buttoncenter.gif">
30
                                                <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a>
31
                                        </td>
32
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
33
<!-- END my_gallery -->
34
<!-- BEGIN allow_memberlist -->
35
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
36
                                        <td><img name="buttonleft" src="themes/hardwired/images/buttonleftmemb.gif" width="17" height="25" border="0" id="buttonleft" alt="" /></td>
37
                                        <td background="themes/hardwired/images/buttoncenter.gif">
38
                                                <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a>
39
                                        </td>
40
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
41
<!-- END allow_memberlist -->
42
<!-- BEGIN my_profile -->
43
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
44
                                        <td><img name="buttonleft" src="themes/hardwired/images/buttonleft.gif" width="17" height="25" border="0" id="buttonleft" alt="" /></td>
45
                                        <td background="themes/hardwired/images/buttoncenter.gif">
46
                                                <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a>
47
                                        </td>
48
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
49
<!-- END my_profile -->
50
<!-- BEGIN faq -->
51
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
52
                                        <td><img name="buttonleft" src="themes/hardwired/images/buttonleft.gif" width="17" height="25" border="0" id="buttonleft" alt="" /></td>
53
                                        <td background="themes/hardwired/images/buttoncenter.gif">
54
                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a>
55
                                        </td>
56
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
57
<!-- END faq -->
58
<!-- BEGIN enter_admin_mode -->
59
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
60
                                        <td><img name="buttonleftad" src="themes/hardwired/images/buttonleftad.gif" width="17" height="25" border="0" id="buttonleftad" alt="" /></td>
61
                                        <td background="themes/hardwired/images/buttoncenter.gif">
62
                                                <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a>
63
                                        </td>
64
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
65
<!-- END enter_admin_mode -->
66
<!-- BEGIN leave_admin_mode -->
67
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
68
                                        <td><img name="buttonleftad" src="themes/hardwired/images/buttonleftad.gif" width="17" height="25" border="0" id="buttonleftad" alt="" /></td>
69
                                        <td background="themes/hardwired/images/buttoncenter.gif">
70
                                                <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a>
71
                                        </td>
72
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonleft" alt="" /></td>
73
<!-- END leave_admin_mode -->
74
<!-- BEGIN upload_pic -->
75
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
76
                                        <td><img name="buttonleftup" src="themes/hardwired/images/buttonleftup.gif" width="17" height="25" border="0" id="buttonleftup" alt="" /></td>
77
                                        <td background="themes/hardwired/images/buttoncenter.gif">
78
                                                <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a>
79
                                        </td>
80
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
81
<!-- END upload_pic -->
82
<!-- BEGIN register -->
83
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
84
                                        <td><img name="buttonleft" src="themes/hardwired/images/buttonleft.gif" width="17" height="25" border="0" id="buttonleft" alt="" /></td>
85
                                        <td background="themes/hardwired/images/buttoncenter.gif">
86
                                                <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a>
87
                                        </td>
88
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
89
<!-- END register -->
90
<!-- BEGIN login -->
91
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
92
                                        <td><img name="buttonleft" src="themes/hardwired/images/buttonleft.gif" width="17" height="25" border="0" id="buttonleft" alt="" /></td>
93
                                        <td background="themes/hardwired/images/buttoncenter.gif">
94
                                                <a href="{LOGIN_TGT}">{LOGIN_LNK}</a>
95
                                        </td>
96
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
97
<!-- END login -->
98
<!-- BEGIN logout -->
99
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
100
                                        <td><img name="buttonleftout" src="themes/hardwired/images/buttonleftout.gif" width="17" height="25" border="0" id="buttonleftout" alt="" /></td>
101
                                        <td background="themes/hardwired/images/buttoncenter.gif">
102
                                                <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
103
                                        </td>
104
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" id="buttonright" alt="" /></td>
105
<!-- END logout -->
106
                                </tr>
107
                        </table>
108
                </span>
109
EOT;
110
$template_main_menu2 = <<<EOT
111
                <span class="topmenu">
112
                        <table border="0" cellpadding="0" cellspacing="0">
113
                                <tr>
114
<!-- BEGIN album_list -->
115
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
116
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft" alt="" /></td>
117
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
118
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
119
                                        </td>
120
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
121
<!-- END album_list -->
122
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
123
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
124
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
125
                                                <a href="{LASTUP_TGT}">{LASTUP_LNK}</a>
126
                                        </td>
127
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
128
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
129
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
130
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
131
                                                <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a>
132
                                        </td>
133
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
134
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
135
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
136
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
137
                                                <a href="{TOPN_TGT}">{TOPN_LNK}</a>
138
                                        </td>
139
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
140
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
141
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
142
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
143
                                                <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a>
144
                                        </td>
145
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
146
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
147
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
148
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
149
                                                <a href="{FAV_TGT}">{FAV_LNK}</a>
150
                                        </td>
151
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
152
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
153
                                        <td><img name="buttonleft1" src="themes/hardwired/images/buttonleft1.gif" width="7" height="25" border="0" id="buttonleft1" alt="" /></td>
154
                                        <td background="themes/hardwired/images/buttoncenter1.gif">
155
                                                <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
156
                                        </td>
157
                                        <td><img name="buttonright1" src="themes/hardwired/images/buttonright1.gif" width="7" height="25" border="0" id="buttonright1" alt="" /></td>
158
                                </tr>
159
                        </table>
160
                </span>
161
EOT;
162
// HTML template for gallery admin menu
163
$template_gallery_admin_menu = <<<EOT
164
                <div align="center">
165
                <table cellpadding="0" cellspacing="1">
166
                        <tr>
167
                                <td class="admin_menu"><a href="editpics.php?mode=upload_approval" title="">{UPL_APP_LNK}</a></td>
168
                                <td class="admin_menu"><a href="config.php" title="">{CONFIG_LNK}</a></td>
169
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="">{ALBUMS_LNK}</a></td>
170
                                <td class="admin_menu"><a href="catmgr.php" title="">{CATEGORIES_LNK}</a></td>
171
                                <td class="admin_menu"><a href="usermgr.php" title="">{USERS_LNK}</a></td>
172
                                <td class="admin_menu"><a href="groupmgr.php" title="">{GROUPS_LNK}</a></td>
173
                                </tr><tr>
174
                                <td class="admin_menu"><a href="banning.php" title="">{BAN_LNK}</a></td>
175
                                <td class="admin_menu"><a href="db_ecard.php" title="">{DB_ECARD_LNK}</a></td>
176
                                <td class="admin_menu"><a href="reviewcom.php" title="">{COMMENTS_LNK}</a></td>
177
                                <td class="admin_menu"><a href="searchnew.php" title="">{SEARCHNEW_LNK}</a></td>
178
                                <td class="admin_menu"><a href="util.php" title="">{UTIL_LNK}</a></td>
179
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
180
                        </tr>
181
                </table>
182
                </div>
183
EOT;
184
// HTML template for user admin menu
185
$template_user_admin_menu = <<<EOT
186
                <div align="center">
187
                <table cellpadding="0" cellspacing="1">
188
                        <tr>
189
                                <td class="admin_menu"><a href="albmgr.php" title="">{ALBMGR_LNK}</a></td>
190
                                <td class="admin_menu"><a href="modifyalb.php" title="">{MODIFYALB_LNK}</a></td>
191
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
192
                        </tr>
193
                </table>
194
                </div>
195
EOT;
196
// HTML template for the category list
197
$template_cat_list = <<<EOT
198
<!-- BEGIN header -->
199
        <tr>
200
                <td class="tableh1" width="80%"><b>{CATEGORY}</b></td>
201
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
202
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
203
        </tr>
204
<!-- END header -->
205
<!-- BEGIN catrow_noalb -->
206
        <tr>
207
                <td class="tableh2" colspan="3"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
208
        </tr>
209
<!-- END catrow_noalb -->
210
<!-- BEGIN catrow -->
211
        <tr>
212
                <td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
213
                <td class="tableb" align="center">{ALB_COUNT}</td>
214
                <td class="tableb" align="center">{PIC_COUNT}</td>
215
        </tr>
216
      <tr>
217
            <td class="tableb" colspan=3>{CAT_ALBUMS}</td>
218
      </tr>
219
<!-- END catrow -->
220
<!-- BEGIN footer -->
221
        <tr>
222
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
223
        </tr>
224
<!-- END footer -->
225
<!-- BEGIN spacer -->
226
        <img src="images/spacer.gif" width="1" height="17" alt="" /><br />
227
<!-- END spacer -->
228
EOT;
229
// HTML template for the breadcrumb
230
$template_breadcrumb = <<<EOT
231
<!-- BEGIN breadcrumb -->
232
        <tr>
233
                <td colspan="3" class="tableh1"><span class="statlink"><b>{BREADCRUMB}</b></span></td>
234
        </tr>
235
<!-- END breadcrumb -->
236
<!-- BEGIN breadcrumb_user_gal -->
237
        <tr>
238
                <td colspan="3" class="tableh1">
239
                <table width="100%" cellpadding="0" cellspacing="0" border="0">
240
                <tr>
241
                        <td><span class="statlink"><b>{BREADCRUMB}</b></span></td>
242
                        <td align="right"><span class="statlink"><b>{STATISTICS}</b></span></td>
243
                </tr>
244
                </table>
245
                </td>
246
        </tr>
247
<!-- END breadcrumb_user_gal -->
248
EOT;
249
// HTML template for the album list
250
$template_album_list = <<<EOT
251
<!-- BEGIN stat_row -->
252
        <tr>
253
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
254
        </tr>
255
<!-- END stat_row -->
256
<!-- BEGIN header -->
257
        <tr>
258
<!-- END header -->
259
<!-- BEGIN album_cell -->
260
        <td width="{COL_WIDTH}%" height="100%" valign="top">
261
        <table width="100%" height="100%" cellspacing="0" cellpadding="0">
262
        <tr>
263
                <td colspan="3" height="1" valign="top" class="tableh2">
264
                        <a href="{ALB_LINK_TGT}" class="alblink"><b>{ALBUM_TITLE}</b></a>
265
                </td>
266
        </tr>
267
        <tr>
268
                <td colspan="3">
269
                        <img src="images/spacer.gif" width="1" height="1" alt="" /><br />
270
                </td>
271
        </tr>
272
        <tr height="100%">
273
                <td align="center" height="100%" valign="middle" class="thumbnails">
274
                        <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
275
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
276
                </td>
277
                <td height="100%">
278
                        <img src="images/spacer.gif" width="1" height="1" alt="" />
279
                </td>
280
                <td width="100%" height="100%" valign="top" class="tableb_compact">
281
                        {ADMIN_MENU}
282
                        <p>{ALB_DESC}</p>
283
                        <p class="album_stat">{ALB_INFOS}</p>
284
                </td>
285
        </tr>
286
        </table>
287
        </td>
288
<!-- END album_cell -->
289
<!-- BEGIN empty_cell -->
290
        <td width="{COL_WIDTH}%" height="100%" valign="top">
291
        <table width="100%" height="100%" cellspacing="0" cellpadding="0">
292
        <tr>
293
                <td height="1" valign="top" class="tableh2">
294
                        <b>&nbsp;</b>
295
                </td>
296
        </tr>
297
        <tr>
298
                <td>
299
                        <img src="images/spacer.gif" width="1" height="1" alt="" /><br />
300
                </td>
301
        </tr>
302
        <tr height="100%">
303
                <td width="100%" height="100%" valign="top" class="tableb_compact">
304
                        &nbsp;
305
                </td>
306
        </tr>
307
        </table>
308
        </td>
309
<!-- END empty_cell -->
310
<!-- BEGIN row_separator -->
311
        </tr>
312
        <tr>
313
<!-- END row_separator -->
314
<!-- BEGIN footer -->
315
        </tr>
316
<!-- END footer -->
317
<!-- BEGIN tabs -->
318
        <tr>
319
                <td colspan="{COLUMNS}" style="padding: 0px;">
320
                        <table width="100%" cellspacing="0" cellpadding="0">
321
                                <tr>
322
                                        {TABS}
323
                                </tr>
324
                        </table>
325
                </td>
326
        </tr>
327
<!-- END tabs -->
328
<!-- BEGIN spacer -->
329
        <img src="images/spacer.gif" width="1" height="17" alt="" /><br />
330
<!-- END spacer -->
331
 
332
EOT;
333
// HTML template for filmstrip display
334
$template_film_strip = <<<EOT
335
 
336
        <tr>
337
         <td valign="top" background='themes/hardwired/images/tile.gif' align="center" height='30'>&nbsp;</td>
338
        </tr>
339
        <tr>
340
        <td valign="bottom" class="thumbnails" align="center">
341
          {THUMB_STRIP}
342
        </td>
343
        </tr>
344
        <tr>
345
         <td valign="top" background='themes/hardwired/images/tile.gif' align="center" height='30'>&nbsp;</td>
346
        </tr>
347
<!-- BEGIN thumb_cell -->
348
                                        <a href="{LINK_TGT}">{THUMB}</a>&nbsp;
349
                                        {CAPTION}
350
                                        {ADMIN_MENU}
351
<!-- END thumb_cell -->
352
<!-- BEGIN empty_cell -->
353
                <td valign="top" align="center" >1&nbsp;</td>
354
<!-- END empty_cell -->
355
 
356
EOT;
357
// HTML template for the album list
358
$template_album_list_cat = <<<EOT
359
 
360
<!-- BEGIN c_stat_row -->
361
        <tr>
362
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
363
        </tr>
364
<!-- END c_stat_row -->
365
<!-- BEGIN c_header -->
366
        <tr>
367
<!-- END c_header -->
368
<!-- BEGIN c_album_cell -->
369
        <td width="{COL_WIDTH}%" height="100%" valign="top">
370
        <table width="100%" height="100%" cellspacing="0" cellpadding="0">
371
        <tr>
372
                <td colspan="3" height="1" valign="top" class="tableh2">
373
                        <a href="{ALB_LINK_TGT}" class="alblink"><b>{ALBUM_TITLE}</b></a>
374
                </td>
375
        </tr>
376
        <tr>
377
                <td colspan="3">
378
                        <img src="images/spacer.gif" width="1" height="1" alt="" /><br />
379
                </td>
380
        </tr>
381
        <tr height="100%">
382
                <td align="center" height="100%" valign="middle" class="thumbnails">
383
                        <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
384
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
385
                </td>
386
                <td height="100%">
387
                        <img src="images/spacer.gif" width="1" height="1" alt="" />
388
                </td>
389
                <td width="100%" height="100%" valign="top" class="tableb_compact">
390
                        {ADMIN_MENU}
391
                        <p>{ALB_DESC}</p>
392
                        <p class="album_stat">{ALB_INFOS}</p>
393
                </td>
394
        </tr>
395
        </table>
396
        </td>
397
<!-- END c_album_cell -->
398
<!-- BEGIN c_empty_cell -->
399
        <td width="{COL_WIDTH}%" height="100%" valign="top">
400
        <table width="100%" height="100%" cellspacing="0" cellpadding="0">
401
        <tr>
402
                <td height="1" valign="top" class="tableh2">
403
                        <b>&nbsp;</b>
404
                </td>
405
        </tr>
406
        <tr>
407
                <td>
408
                        <img src="images/spacer.gif" width="1" height="1" alt="" /><br />
409
                </td>
410
        </tr>
411
        <tr height="100%">
412
                <td width="100%" height="100%" valign="top" class="tableb_compact">
413
                        &nbsp;
414
                </td>
415
        </tr>
416
        </table>
417
        </td>
418
<!-- END c_empty_cell -->
419
<!-- BEGIN c_row_separator -->
420
        </tr>
421
        <tr>
422
<!-- END c_row_separator -->
423
<!-- BEGIN c_footer -->
424
        </tr>
425
<!-- END c_footer -->
426
<!-- BEGIN c_tabs -->
427
        <tr>
428
                <td colspan="{COLUMNS}" style="padding: 0px;">
429
                        <table width="100%" cellspacing="0" cellpadding="0">
430
                                <tr>
431
                                        {TABS}
432
                                </tr>
433
                        </table>
434
                </td>
435
        </tr>
436
<!-- END c_tabs -->
437
<!-- BEGIN c_spacer -->
438
        <img src="images/spacer.gif" width="1" height="17" alt="" /><br />
439
<!-- END c_spacer -->
440
 
441
EOT;
442
// HTML template for the ALBUM admin menu displayed in the album list
443
$template_album_admin_menu = <<<EOT
444
        <table border="0" cellpadding="0" cellspacing="1">
445
                <tr>
446
                        <td align="center" valign="middle" class="admin_menu">
447
                                <a href="delete.php?id={ALBUM_ID}&what=album"  class="adm_menu" onclick="return confirm('{CONFIRM_DELETE}');">{DELETE}</a>
448
                        </td>
449
                        <td align="center" valign="middle" class="admin_menu">
450
                                <a href="modifyalb.php?album={ALBUM_ID}"  class="adm_menu">{MODIFY}</a>
451
                        </td>
452
                        <td align="center" valign="middle" class="admin_menu">
453
                                <a href="editpics.php?album={ALBUM_ID}"  class="adm_menu">{EDIT_PICS}</a>
454
                        </td>
455
                </tr>
456
        </table>
457
 
458
EOT;
459
// HTML template for title row of the thumbnail view (album title + sort options)
460
$template_thumb_view_title_row = <<<EOT
461
 
462
                        <table width="98%" cellpadding="0" cellspacing="0">
463
                        <tr>
464
                                <td width="100%" class="statlink"><h2 style="background-image : none; padding-left : 0px;">{ALBUM_NAME}</h2></td>
465
                                <td><img src="images/spacer.gif" width="1" height="1" alt="" /></td>
466
                                <td class="sortorder_cell">
467
                                        <table height="100%" cellpadding="0" cellspacing="0">
468
                                        <tr>
469
                                <td class="sortorder_options">{TITLE}</td>
470
                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=ta" title="{SORT_TA}">&nbsp;+&nbsp;</a></span></td>
471
                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>
472
                                        </tr>
473
                                        <tr>
474
                                                <td class="sortorder_options">{NAME}</td>
475
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=na" title="{SORT_NA}">&nbsp;+&nbsp;</a></span></td>
476
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>
477
                                        </tr>
478
                                        <tr>
479
                                                <td class="sortorder_options">{DATE}</td>
480
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=da" title="{SORT_DA}">&nbsp;+&nbsp;</a></span></td>
481
                                                <td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>
482
                                        </tr>
483
                                        </table>
484
                                </td>
485
                        </tr>
486
                        </table>
487
 
488
EOT;
489
 
490
 
491
// HTML template for title row of the fav thumbnail view (album title + download)
492
$template_fav_thumb_view_title_row = <<<EOT
493
 
494
                        <table width="100%" cellpadding="0" cellspacing="0">
495
                        <tr>
496
                                <td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
497
                                <td><img src="images/spacer.gif" width="1" height="1" alt="" /></td>
498
                                <td class="sortorder_cell">
499
                                        <table height="100%" cellpadding="0" cellspacing="0">
500
                                                <tr>
501
                                                        <td class="sortorder_options"><span class="statlink"><a href="zipdownload.php">{DOWNLOAD_ZIP}</a></span>&nbsp;&nbsp;</td>
502
                                                </tr>
503
                                                </table>
504
                                </td>
505
                        </tr>
506
                        </table>
507
 
508
EOT;
509
 
510
 
511
// HTML template for thumbnails display
512
$template_thumbnail_view = <<<EOT
513
 
514
<!-- BEGIN header -->
515
        <tr>
516
<!-- END header -->
517
<!-- BEGIN thumb_cell -->
518
        <td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
519
                <table width="100%" cellpadding="0" cellspacing="0">
520
                        <tr>
521
                                <td align="center">
522
                                        <a href="{LINK_TGT}">{THUMB}<br /></a>
523
                                        {CAPTION}
524
                                        {ADMIN_MENU}
525
                                </td>
526
                        </tr>
527
                </table>
528
        </td>
529
<!-- END thumb_cell -->
530
<!-- BEGIN empty_cell -->
531
                <td valign="top" class="thumbnails" align="center">&nbsp;</td>
532
<!-- END empty_cell -->
533
<!-- BEGIN row_separator -->
534
        </tr>
535
        <tr>
536
<!-- END row_separator -->
537
<!-- BEGIN footer -->
538
        </tr>
539
<!-- END footer -->
540
<!-- BEGIN tabs -->
541
        <tr>
542
                <td colspan="{THUMB_COLS}" style="padding: 0px;">
543
                        <table width="100%" cellspacing="0" cellpadding="0">
544
                                <tr>
545
                                        {TABS}
546
                                </tr>
547
                        </table>
548
                </td>
549
        </tr>
550
<!-- END tabs -->
551
<!-- BEGIN spacer -->
552
        <img src="images/spacer.gif" width="1" height="17" alt="" /><br />
553
<!-- END spacer -->
554
 
555
EOT;
556
// HTML template for the thumbnail view when there is no picture to show
557
$template_no_img_to_display = <<<EOT
558
        <tr>
559
                <td class="tableb" height="200" align="center">
560
                        <font size="2"><b>{TEXT}</b></font>
561
                </td>
562
        </tr>
563
<!-- BEGIN spacer -->
564
        <img src="images/spacer.gif" width="1" height="17" alt="" /><br />
565
<!-- END spacer -->
566
 
567
EOT;
568
// HTML template for the USER info box in the user list view
569
$template_user_list_info_box = <<<EOT
570
 
571
        <table cellspacing="1" cellpadding="0" border="0" width="100%" class="user_thumb_infobox">
572
                <tr>
573
                        <th><a href="profile.php?uid={USER_ID}">{USER_NAME}</a></th>
574
                </tr>
575
                <tr>
576
                        <td>{ALBUMS}</td>
577
                </tr>
578
                <tr>
579
                        <td>{PICTURES}</td>
580
                </tr>
581
        </table>
582
 
583
EOT;
584
// HTML template for the image navigation bar
585
$template_img_navbar = <<<EOT
586
 
587
        <tr>
588
                <td align="center" valign="middle" class="navmenu" width="48">
589
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="themes/hardwired/images/back.gif" width="21" height="15" align="absmiddle" border="0" alt="{THUMB_TITLE}" /></a>
590
                </td>
591
                <td align="center" valign="middle" class="navmenu" width="48">
592
                        <a href="javascript:;" onClick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="themes/hardwired/images/info.gif" width="18" height="15" border="0" align="absmiddle" alt="{PIC_INFO_TITLE}" /></a>
593
                </td>
594
                <td align="center" valign="middle" class="navmenu" width="48">
595
                        <a href="{SLIDESHOW_TGT}" title="{SLIDESHOW_TITLE}"><img src="themes/hardwired/images/slideshow.gif" width="21" height="15" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
596
                </td>
597
                <td align="center" valign="middle" class="navmenu" witdh="100%">
598
                        {PIC_POS}
599
                </td>
600
                <td align="center" valign="middle" class="navmenu" width="48">
601
                        <a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="themes/hardwired/images/ecard.gif" width="21" height="15" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
602
                </td>
603
                <td align="center" valign="middle" class="navmenu" width="48">
604
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="themes/hardwired/images/previmg.gif" width="18" height="15" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
605
                </td>
606
                <td align="center" valign="middle" class="navmenu" width="48">
607
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="themes/hardwired/images/nextimg.gif" width="18" height="15" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
608
                </td>
609
        </tr>
610
 
611
EOT;
612
// HTML template for intermediate image display
613
$template_display_picture = <<<EOT
614
        <tr>
615
                <td align="center" class="tableb" height="{CELL_HEIGHT}" style="white-space: nowrap; padding: 0px;">
616
                        <table cellspacing="2" cellpadding="0" class="imageborder">
617
                                <tr>
618
                                        <td align="center">
619
                                                {IMAGE}
620
                                                {ADMIN_MENU}
621
                                        </td>
622
                                </tr>
623
                        </table>
624
<!-- BEGIN img_desc -->
625
                        <table cellpadding="0" cellspacing="0" class="img_caption_table">
626
<!-- BEGIN title -->
627
                                <tr>
628
                                        <th>
629
                                                {TITLE}
630
                                        </th>
631
                                </tr>
632
<!-- END title -->
633
<!-- BEGIN caption -->
634
                                <tr>
635
                                        <td>
636
                                                {CAPTION}
637
                                        </td>
638
                                </tr>
639
<!-- END caption -->
640
                        </table>
641
<!-- END img_desc -->
642
                </td>
643
        </tr>
644
 
645
EOT;
646
// HTML template for the image rating box
647
$template_image_rating = <<<EOT
648
 
649
        <tr>
650
                <td colspan="6" class="tableh2_compact"><b>{TITLE}</b> {VOTES}</td>
651
        </tr>
652
        <tr>
653
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE0}" title="{RUBBISH}"><img src="themes/hardwired/images/rating0.gif" alt="{RUBBISH}" border="0" /><br /></a></td>
654
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE1}" title="{POOR}"><img src="themes/hardwired/images/rating1.gif" alt="{POOR}" border="0" /><br /></a></td>
655
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE2}" title="{FAIR}"><img src="themes/hardwired/images/rating2.gif" alt="{FAIR}" border="0" /><br /></a></td>
656
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE3}" title="{GOOD}"><img src="themes/hardwired/images/rating3.gif" alt="{GOOD}" border="0" /><br /></a></td>
657
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE4}" title="{EXCELLENT}"><img src="themes/hardwired/images/rating4.gif" alt="{EXCELLENT}" border="0" /><br /></a></td>
658
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE5}" title="{GREAT}"><img src="themes/hardwired/images/rating5.gif" alt="{GREAT}" border="0" /><br /></a></td>
659
        </tr>
660
 
661
EOT;
662
// HTML template for the display of comments
663
$template_image_comments = <<<EOT
664
 
665
        <tr>
666
                <td>
667
                        <table width="100%" cellpadding="0" cellspacing="0">
668
                                <td class="tableh2_compact" nowrap>
669
                                        <b>{MSG_AUTHOR}</b>
670
<!-- BEGIN ipinfo -->
671
                                                                                 ({HDR_IP} [{RAW_IP}])
672
<!-- END ipinfo -->
673
                                </td>
674
                                <td class="tableh2_compact" align="right" width="100%">
675
<!-- BEGIN buttons -->
676
                                        <a href="javascript:;" onClick="blocking('cbody{MSG_ID}','', 'block'); blocking('cedit{MSG_ID}','', 'block'); return false;" title="{EDIT_TITLE}"><img src="themes/hardwired/images/edit.gif" border="0" align="absmiddle" ></a>
677
                                        <a href="delete.php?msg_id={MSG_ID}&what=comment"  onclick="return confirm('{CONFIRM_DELETE}');"><img src="themes/hardwired/images/delete.gif" border="0" align="absmiddle" ></a>
678
<!-- END buttons -->
679
                                </td>
680
                                <td class="tableh2_compact" align="right" nowrap>
681
                                        <span class="comment_date">[{MSG_DATE}]</span>
682
                                </td>
683
                        </table>
684
                </td>
685
        </tr>
686
        <tr>
687
                <td class="tableb_compact">
688
                        <div id="cbody{MSG_ID}" style="display:block">
689
                                {MSG_BODY}
690
                        </div>
691
                        <div id="cedit{MSG_ID}" style="display:none">
692
<!-- BEGIN edit_box_smilies -->
693
                                <table width="100%" cellpadding="0" cellspacing="0">
694
 
695
                                                <form name="f{MSG_ID}" method="POST" action="db_input.php">
696
                                                <input type="hidden" name="event" value="comment_update" />
697
                                                <input type="hidden" name="msg_id" value="{MSG_ID}" />
698
                                                <tr>
699
                                                <td>
700
                                                   <input type="text" name="msg_author" value="{MSG_AUTHOR}" class="textinput" size="25" />
701
                                                </td>
702
                                                </tr>
703
                                                <tr>
704
                                                <td width="80%">
705
                                                        <textarea cols="40" rows="2" class="textinput" name="msg_body" onselect="storeCaret_f{MSG_ID}(this);" onclick="storeCaret_f{MSG_ID}(this);" onkeyup="storeCaret_f{MSG_ID}(this);" style="width: 100%;">{MSG_BODY_RAW}</textarea>
706
                                                </td>
707
                                                <td class="tableb_compact">
708
                                                </td>
709
                                                <td>
710
                                                        <input type="submit" class="comment_button" name="submit" value="{OK}" />
711
                                                </td>
712
                                                </form>
713
                                        </tr>
714
                                        <tr>
715
                                                <td colspan="3"><img src="images/spacer.gif" width="1" height="2" alt="" /><br /></td>
716
                                        </tr>
717
                                </table>
718
                                {SMILIES}
719
<!-- END edit_box_smilies -->
720
<!-- BEGIN edit_box_no_smilies -->
721
                                <table width="100%" cellpadding="0" cellspacing="0">
722
                                        <tr>
723
                                                <form name="f{MSG_ID}" method="POST" action="db_input.php">
724
                                                <input type="hidden" name="event" value="comment_update" />
725
                                                <input type="hidden" name="msg_id" value="{MSG_ID}" />
726
                                                                                                                                                                                                <td>
727
                                                <input type="text" name="msg_author" value="{MSG_AUTHOR}" class="textinput" size="25" />
728
                                                </td>
729
                                        </tr>
730
                                        <tr>
731
                                                <td width="100%">
732
                                                        <textarea cols="40" rows="2" class="textinput" name="msg_body" style="width: 100%;">{MSG_BODY_RAW}</textarea>
733
                                                </td>
734
                                                <td class="tableb_compact">
735
                                                </td>
736
                                                <td>
737
                                                        <input type="submit" class="comment_button" name="submit" value="{OK}" />
738
                                                </td>
739
                                                </form>
740
                                        </tr>
741
                                        <tr>
742
                                                <td colspan="3"><img src="images/spacer.gif" width="1" height="2" alt="" /><br /></td>
743
                                        </tr>
744
                                </table>
745
<!-- END edit_box_no_smilies -->
746
                        </div>
747
                </td>
748
        </tr>
749
 
750
EOT;
751
$template_add_your_comment = <<<EOT
752
 
753
        <tr>
754
                <td class="tableh2_compact"><b>{ADD_YOUR_COMMENT}</b></td>
755
        </tr>
756
        <tr>
757
                <form method="post" name="post" action="db_input.php">
758
                <td colspan="3">
759
                        <table width="100%" cellpadding="0" cellspacing="0">
760
                                <input type="hidden" name="event" value="comment" />
761
                                <input type="hidden" name="pid" value="{PIC_ID}" />
762
<!-- BEGIN user_name_input -->
763
                                <td class="tableb_compact">
764
                                        {NAME}
765
                                </td>
766
                                <td class="tableb_compact">
767
                                        <input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}">
768
                                </td>
769
<!-- END user_name_input -->
770
<!-- BEGIN input_box_smilies -->
771
                                <td class="tableb_compact">
772
                                {COMMENT} </td>
773
                                <td width="100%" class="tableb_compact">
774
                                <input type="text" class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />                                        <!-- END input_box_smilies -->
775
<!-- BEGIN input_box_no_smilies -->
776
                                <input type="text" class="textinput" id="message" name="msg_body"  maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />
777
<!-- END input_box_no_smilies -->
778
                                </td>
779
                                <td class="tableb_compact">
780
                                <input type="submit" class="comment_button" name="submit" value="{OK}" />
781
                                </td>
782
                        </table>
783
                </td>
784
                </form>
785
        </tr>
786
<!-- BEGIN smilies -->
787
        <tr>
788
                <td width="100%" class="tableb_compact">
789
                        {SMILIES}
790
                </td>
791
        </tr>
792
<!-- END smilies -->
793
 
794
EOT;
795
// HTML template used by the cpg_die function
796
$template_cpg_die = <<<EOT
797
 
798
        <tr>
799
                <td class="tableb" height="300" align="center">
800
                        <font size="2"><b>{MESSAGE}</b></font>
801
<!-- BEGIN file_line -->
802
                        <br />
803
                        <br />
804
                        {FILE_TXT}{FILE} - {LINE_TXT}{LINE}
805
<!-- END file_line -->
806
<!-- BEGIN output_buffer -->
807
                        <br />
808
                        <br />
809
                        <div align="left">
810
                                {OUTPUT_BUFFER}
811
                        </div>
812
<!-- END output_buffer -->
813
                        <br /><br />
814
                </td>
815
        </tr>
816
 
817
 
818
EOT;
819
// HTML template used by the msg_box function
820
$template_msg_box = <<<EOT
821
 
822
        <tr>
823
                <td class="tableb" height="150" align="center">
824
                        <font size="2"><b>{MESSAGE}</b></font>
825
                </td>
826
        </tr>
827
<!-- BEGIN button -->
828
                <tr>
829
                        <td align="center" class="tablef">
830
                                <table cellpadding="0" cellspacing="0">
831
                                        <tr>
832
                                                <td class="admin_menu">
833
                                                        <a href="{LINK}">{TEXT}</a>
834
                                                </td>
835
                                        </tr>
836
                                </table>
837
                        </td>
838
                </tr>
839
<!-- END button -->
840
 
841
EOT;
842
// HTML template for e-cards
843
$template_ecard = <<<EOT
844
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
845
<html dir="{LANG_DIR}">
846
<head>
847
<title>{TITLE}</title>
848
<meta http-equiv="content-type" content="text/html; charset={CHARSET}" />
849
</head>
850
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
851
<br />
852
<p align="center"><a href="{VIEW_ECARD_TGT}"><b>{VIEW_ECARD_LNK}</b></a></p>
853
<table border="0" cellspacing="0" cellpadding="1" align="center">
854
  <tr>
855
    <td bgcolor="#000000">
856
      <table border="0" cellspacing="0" cellpadding="10" bgcolor="#ffffff">
857
        <tr>
858
          <td valign="top">
859
           <img src="{PIC_URL}" border="1" alt="" /><br />
860
          </td>
861
          <td valign="top" width="200" height="250">
862
            <div align="right"><img src="{URL_PREFIX}images/stamp.gif" alt="" border="0" /></div>
863
            <br />
864
            <b><font face="arial" color="#000000" size="4">{GREETINGS}</font></b>
865
            <br />
866
            <br />
867
            <font face="arial" color="#000000" size="2">{MESSAGE}</font>
868
            <br />
869
            <br />
870
            <font face="arial" color="#000000" size="2">{SENDER_NAME}</font>
871
            (<a href="mailto:{SENDER_EMAIL}"><font face="arial" color="#000000" size="2">{SENDER_EMAIL}</font></a>)
872
          </td>
873
        </tr>
874
      </table>
875
    </td>
876
  </tr>
877
</table>
878
<p align="center"><a href="{VIEW_MORE_TGT}"><b>{VIEW_MORE_LNK}</b></a></p>
879
</body>
880
</html>
881
EOT;
882
// Template used for tabbed display
883
$template_tab_display = array('left_text' => '<td width="100%%" align="left" valign="middle" class="tableh1_compact" style="white-space: nowrap"><b>{LEFT_TEXT}</b></td>' . "\n",
884
    'tab_header' => '',
885
    'tab_trailer' => '',
886
    'active_tab' => '<td><img src="images/spacer.gif" width="1" height="1" alt="" /></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%d</b></td>',
887
    'inactive_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="{LINK}"><b>%d</b></a></td>' . "\n"
888
    );
889
function pageheader($section, $meta = '')
890
{
891
    global $CONFIG, $THEME_DIR;
892
    global $template_header, $lang_charset, $lang_text_dir;
893
 
894
    $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];
895
 
896
    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
897
    header("Content-Type: text/html; charset=$charset");
898
    user_save_profile();
899
 
900
    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
901
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section,
902
        '{CHARSET}' => $charset,
903
        '{META}' => $meta,
904
        '{GAL_NAME}' => $CONFIG['gallery_name'],
905
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
906
        '{MAIN_MENU1}' => theme_main_menu1(),
907
        '{MAIN_MENU2}' => theme_main_menu2(),
908
        '{ADMIN_MENU}' => theme_admin_mode_menu()
909
        );
910
    echo template_eval($template_header, $template_vars);
911
}
912
// Function for writing a pagefooter
913
function pagefooter()
914
{
915
    global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
916
    global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats;
917
    global $template_footer;
918
    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
919
    cpg_debug_output();
920
    }
921
    echo $template_footer;
922
}
923
// Function to start a 'standard' table
924
function starttable($width = '-1', $title = '', $title_colspan = '1')
925
{
926
    global $CONFIG;
927
    if ($width == '-1') $width = $CONFIG['picture_table_width'];
928
    if ($width == '100%') $width = $CONFIG['main_table_width'];
929
    echo <<<EOT
930
 
931
<!-- Start standard table -->
932
<table align="center" width="$width" cellspacing="1" cellpadding="0" class="maintable">
933
 
934
EOT;
935
    if ($title) {
936
        echo <<<EOT
937
        <tr>
938
                <td class="tableh1" colspan="$title_colspan"><h2>$title</h2></td>
939
        </tr>
940
 
941
EOT;
942
    }
943
}
944
function endtable()
945
{
946
    echo <<<EOT
947
</table>
948
<!-- End standard table -->
949
 
950
EOT;
951
}
952
function theme_main_menu1()
953
{
954
    global $CONFIG, $album, $actual_cat, $cat, $REFERER, $HTTP_SERVER_VARS;
955
    global $lang_main_menu, $template_main_menu1;
956
    static $main_menu = '';
957
    if ($main_menu != '') return $main_menu;
958
    $album_l = isset($album) ? "?album=$album" : '';
959
    $cat_l = (isset($actual_cat))? "?cat=$actual_cat" : (isset($cat) ? "?cat=$cat" : '');
960
    $my_gallery_id = FIRST_USER_CAT + USER_ID;
961
    $template_main_menu = &$template_main_menu1;
962
    if (USER_ID) {
963
        template_extract_block($template_main_menu, 'login');
964
    } else {
965
        template_extract_block($template_main_menu, 'logout');
966
        template_extract_block($template_main_menu, 'my_profile');
967
    }
968
    if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
969
        template_extract_block($template_main_menu, 'enter_admin_mode');
970
    } elseif (USER_CAN_CREATE_ALBUMS || USER_IS_ADMIN) {
971
        template_extract_block($template_main_menu, 'leave_admin_mode');
972
    }
973
    if (!USER_CAN_CREATE_ALBUMS && !USER_IS_ADMIN) {
974
        template_extract_block($template_main_menu, 'enter_admin_mode');
975
        template_extract_block($template_main_menu, 'leave_admin_mode');
976
    }
977
    if (!USER_CAN_CREATE_ALBUMS) {
978
        template_extract_block($template_main_menu, 'my_gallery');
979
    }
980
    if (USER_CAN_CREATE_ALBUMS) {
981
        template_extract_block($template_main_menu, 'my_profile');
982
    }
983
    if (!USER_CAN_UPLOAD_PICTURES) {
984
        template_extract_block($template_main_menu, 'upload_pic');
985
    }
986
    if (USER_ID || !$CONFIG['allow_user_registration']) {
987
        template_extract_block($template_main_menu, 'register');
988
    }
989
 
990
    if (!USER_ID || !$CONFIG['allow_memberlist']) {
991
        template_extract_block($template_main_menu, 'allow_memberlist');
992
    }
993
 
994
    if (!$CONFIG['display_faq']) {
995
        template_extract_block($template_main_menu, 'faq');
996
    }
997
 
998
    $param = array('{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
999
        '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
1000
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
1001
        '{MEMBERLIST_TGT}' => "usermgr.php",
1002
        '{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'],
1003
        '{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_lnk'],
1004
        '{MY_PROF_TGT}' => "profile.php?op=edit_profile",
1005
        '{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
1006
        '{FAQ_TGT}' => "faq.php",
1007
        '{FAQ_TITLE}' => $lang_main_menu['faq_title'],
1008
        '{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
1009
        '{ADM_MODE_TGT}' => "admin.php?admin_mode=1&referer=$REFERER",
1010
        '{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'],
1011
        '{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'],
1012
        '{USR_MODE_TGT}' => "admin.php?admin_mode=0&referer=$REFERER",
1013
        '{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'],
1014
        '{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'],
1015
        '{UPL_PIC_TGT}' => "upload.php",
1016
        '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
1017
        '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],
1018
        '{REGISTER_TGT}' => "register.php",
1019
        '{REGISTER_TITLE}' => $lang_main_menu['register_title'],
1020
        '{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
1021
        '{LOGIN_TGT}' => "login.php?referer=$REFERER",
1022
        '{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
1023
        '{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
1024
        '{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]",
1025
        );
1026
    $main_menu = template_eval($template_main_menu, $param);
1027
    return $main_menu;
1028
}
1029
function theme_main_menu2()
1030
{
1031
    global $CONFIG, $album, $actual_cat, $cat, $REFERER, $HTTP_SERVER_VARS;
1032
    global $lang_main_menu, $template_main_menu2;
1033
    static $main_menu = '';
1034
    if ($main_menu != '') return $main_menu;
1035
    $cat_l = isset($actual_cat) ? "?cat=$actual_cat" : (isset($cat) ? "?cat=$cat" : '');
1036
    $cat_l2 = isset($cat) ? "&cat=$cat" : '';
1037
    $template_main_menu = &$template_main_menu2;
1038
    $param = array('{ALB_LIST_TGT}' => "index.php$cat_l",
1039
        '{ALB_LIST_TITLE}' => $lang_main_menu['alb_list_title'],
1040
        '{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'],
1041
        '{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
1042
        '{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
1043
        '{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
1044
        '{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
1045
        '{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
1046
        '{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
1047
        '{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
1048
        '{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
1049
        '{FAV_TGT}' => "thumbnails.php?album=favpics",
1050
        '{FAV_LNK}' => $lang_main_menu['fav_lnk'],
1051
        '{SEARCH_TGT}' => "search.php",
1052
        '{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
1053
        );
1054
    $main_menu = template_eval($template_main_menu, $param);
1055
    return $main_menu;
1056
}
1057
function theme_admin_mode_menu()
1058
{
1059
    global $cat;
1060
    global $lang_gallery_admin_menu, $lang_user_admin_menu;
1061
    global $template_gallery_admin_menu, $template_user_admin_menu;
1062
    $cat_l = isset($cat) ? "?cat=$cat" : '';
1063
    if (GALLERY_ADMIN_MODE) {
1064
        $param = array('{CATL}' => $cat_l,
1065
            '{UPL_APP_LNK}' => $lang_gallery_admin_menu['upl_app_lnk'],
1066
            '{CONFIG_LNK}' => $lang_gallery_admin_menu['config_lnk'],
1067
            '{ALBUMS_LNK}' => $lang_gallery_admin_menu['albums_lnk'],
1068
            '{CATEGORIES_LNK}' => $lang_gallery_admin_menu['categories_lnk'],
1069
            '{USERS_LNK}' => $lang_gallery_admin_menu['users_lnk'],
1070
            '{GROUPS_LNK}' => $lang_gallery_admin_menu['groups_lnk'],
1071
            '{COMMENTS_LNK}' => $lang_gallery_admin_menu['comments_lnk'],
1072
            '{SEARCHNEW_LNK}' => $lang_gallery_admin_menu['searchnew_lnk'],
1073
            '{UTIL_LNK}' => $lang_gallery_admin_menu['util_lnk'],
1074
            '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'],
1075
            '{BAN_LNK}' => $lang_gallery_admin_menu['ban_lnk'],
1076
            '{DB_ECARD_LNK}' => $lang_gallery_admin_menu['db_ecard_lnk'],
1077
            );
1078
        $html = template_eval($template_gallery_admin_menu, $param);
1079
    } elseif (USER_ADMIN_MODE) {
1080
        $param = array('{ALBMGR_LNK}' => $lang_user_admin_menu['albmgr_lnk'],
1081
            '{MODIFYALB_LNK}' => $lang_user_admin_menu['modifyalb_lnk'],
1082
            '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk']
1083
            );
1084
        $html = template_eval($template_user_admin_menu, $param);
1085
    } else {
1086
        $html = '';
1087
    }
1088
    return $html;
1089
}
1090
function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
1091
{
1092
    global $template_cat_list, $lang_cat_list;
1093
    starttable('100%');
1094
    if (count($cat_data) > 0) {
1095
        $template = template_extract_block($template_cat_list, 'header');
1096
        $params = array('{CATEGORY}' => $lang_cat_list['category'],
1097
            '{ALBUMS}' => $lang_cat_list['albums'],
1098
            '{PICTURES}' => $lang_cat_list['pictures'],
1099
            );
1100
        echo template_eval($template, $params);
1101
    }
1102
    $template_noabl = template_extract_block($template_cat_list, 'catrow_noalb');
1103
    $template = template_extract_block($template_cat_list, 'catrow');
1104
    foreach($cat_data as $category) {
1105
        if (count($category) == 3) {
1106
            $params = array('{CAT_TITLE}' => $category[0],
1107
                '{CAT_THUMB}' => $category['cat_thumb'],
1108
                '{CAT_DESC}' => $category[1]
1109
                );
1110
            echo template_eval($template_noabl, $params);
1111
        } else {
1112
            $params = array('{CAT_TITLE}' => $category[0],
1113
                '{CAT_THUMB}' => $category['cat_thumb'],
1114
                '{CAT_DESC}' => $category[1],
1115
                '{CAT_ALBUMS}' => $category['cat_albums'],
1116
                '{ALB_COUNT}' => $category[2],
1117
                '{PIC_COUNT}' => $category[3],
1118
                );
1119
            echo template_eval($template, $params);
1120
        }
1121
    }
1122
    if ($statistics && count($cat_data) > 0) {
1123
        $template = template_extract_block($template_cat_list, 'footer');
1124
        $params = array('{STATISTICS}' => $statistics);
1125
        echo template_eval($template, $params);
1126
    }
1127
    endtable();
1128
    if (count($cat_data) > 0)
1129
        echo template_extract_block($template_cat_list, 'spacer');
1130
}
1131
function theme_display_breadcrumb($breadcrumb, &$cat_data)
1132
{
1133
    /**
1134
     * ** added breadcrumb as a seperate element
1135
     */
1136
    global $template_breadcrumb, $lang_breadcrumb;
1137
    starttable('100%');
1138
    if ($breadcrumb) {
1139
        $template = template_extract_block($template_breadcrumb, 'breadcrumb');
1140
        $params = array('{BREADCRUMB}' => $breadcrumb
1141
            );
1142
        echo template_eval($template, $params);
1143
    }
1144
    endtable();
1145
}
1146
function theme_display_album_list(&$alb_list, $nbAlb, $cat, $page, $total_pages)
1147
{
1148
    global $CONFIG, $STATS_IN_ALB_LIST, $statistics, $template_tab_display, $template_album_list, $lang_album_list;
1149
    $theme_alb_list_tab_tmpl = $template_tab_display;
1150
    $theme_alb_list_tab_tmpl['left_text'] = strtr($theme_alb_list_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_album_list['album_on_page']));
1151
    $theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
1152
    $tabs = create_tabs($nbAlb, $page, $total_pages, $theme_alb_list_tab_tmpl);
1153
    $album_cell = template_extract_block($template_album_list, 'album_cell');
1154
    $empty_cell = template_extract_block($template_album_list, 'empty_cell');
1155
    $tabs_row = template_extract_block($template_album_list, 'tabs');
1156
    $stat_row = template_extract_block($template_album_list, 'stat_row');
1157
    $spacer = template_extract_block($template_album_list, 'spacer');
1158
    $header = template_extract_block($template_album_list, 'header');
1159
    $footer = template_extract_block($template_album_list, 'footer');
1160
    $rows_separator = template_extract_block($template_album_list, 'row_separator');
1161
    $count = 0;
1162
    $columns = $CONFIG['album_list_cols'];
1163
    $column_width = ceil(100 / $columns);
1164
    $thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
1165
    starttable('100%');
1166
    if ($STATS_IN_ALB_LIST) {
1167
        $params = array('{STATISTICS}' => $statistics,
1168
            '{COLUMNS}' => $columns,
1169
            );
1170
        echo template_eval($stat_row, $params);
1171
    }
1172
    echo $header;
1173
    if (is_array($alb_list)) {
1174
        foreach($alb_list as $album) {
1175
                $count ++;
1176
                $params = array('{COL_WIDTH}' => $column_width,
1177
                '{ALBUM_TITLE}' => $album['album_title'],
1178
                '{THUMB_CELL_WIDTH}' => $thumb_cell_width,
1179
                '{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
1180
                '{ALB_LINK_PIC}' => $album['thumb_pic'],
1181
                '{ADMIN_MENU}' => $album['album_adm_menu'],
1182
                '{ALB_DESC}' => $album['album_desc'],
1183
                '{ALB_INFOS}' => $album['album_info'],
1184
                );
1185
                echo template_eval($album_cell, $params);
1186
                if ($count % $columns == 0 && $count < count($alb_list)) {
1187
                echo $rows_separator;
1188
                }
1189
        }
1190
    }
1191
 
1192
    $params = array('{COL_WIDTH}' => $column_width);
1193
    $empty_cell = template_eval($empty_cell, $params);
1194
    while ($count++ % $columns != 0) {
1195
        echo $empty_cell;
1196
    }
1197
    echo $footer;
1198
    // Tab display
1199
    $params = array('{COLUMNS}' => $columns,
1200
        '{TABS}' => $tabs,
1201
        );
1202
    echo template_eval($tabs_row, $params);
1203
    endtable();
1204
    echo $spacer;
1205
}
1206
// Function to display first level Albums of a category
1207
function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pages)
1208
{
1209
    global $CONFIG, $STATS_IN_ALB_LIST, $statistics, $template_tab_display, $template_album_list_cat, $lang_album_list;
1210
    if (!$CONFIG['first_level']) {
1211
        return;
1212
    }
1213
    // $theme_alb_list_tab_tmpl = $template_tab_display;
1214
    // $theme_alb_list_tab_tmpl['left_text'] = strtr($theme_alb_list_tab_tmpl['left_text'],array('{LEFT_TEXT}' => $lang_album_list['album_on_page']));
1215
    // $theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'],array('{LINK}' => 'index.php?cat='.$cat.'&page=%d'));
1216
    // $tabs = create_tabs($nbAlb, $page, $total_pages, $theme_alb_list_tab_tmpl);
1217
    // echo $template_album_list_cat;
1218
    $template_album_list_cat1 = $template_album_list_cat;
1219
    $album_cell = template_extract_block($template_album_list_cat1, 'c_album_cell');
1220
    $empty_cell = template_extract_block($template_album_list_cat1, 'c_empty_cell');
1221
    $tabs_row = template_extract_block($template_album_list_cat1, 'c_tabs');
1222
    $stat_row = template_extract_block($template_album_list_cat1, 'c_stat_row');
1223
    $spacer = template_extract_block($template_album_list_cat1, 'c_spacer');
1224
    $header = template_extract_block($template_album_list_cat1, 'c_header');
1225
    $footer = template_extract_block($template_album_list_cat1, 'c_footer');
1226
    $rows_separator = template_extract_block($template_album_list_cat1, 'c_row_separator');
1227
    $count = 0;
1228
    $columns = $CONFIG['album_list_cols'];
1229
    $column_width = ceil(100 / $columns);
1230
    $thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
1231
    starttable('100%');
1232
    if ($STATS_IN_ALB_LIST) {
1233
        $params = array('{STATISTICS}' => $statistics,
1234
            '{COLUMNS}' => $columns,
1235
            );
1236
        echo template_eval($stat_row, $params);
1237
    }
1238
    echo $header;
1239
    if (is_array($alb_list)) {
1240
        foreach($alb_list as $album) {
1241
                $count ++;
1242
                $params = array('{COL_WIDTH}' => $column_width,
1243
                '{ALBUM_TITLE}' => $album['album_title'],
1244
                '{THUMB_CELL_WIDTH}' => $thumb_cell_width,
1245
                '{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
1246
                '{ALB_LINK_PIC}' => $album['thumb_pic'],
1247
                '{ADMIN_MENU}' => $album['album_adm_menu'],
1248
                '{ALB_DESC}' => $album['album_desc'],
1249
                '{ALB_INFOS}' => $album['album_info'],
1250
                );
1251
                echo template_eval($album_cell, $params);
1252
                if ($count % $columns == 0 && $count < count($alb_list)) {
1253
                echo $rows_separator;
1254
                }
1255
        }
1256
    }
1257
 
1258
    $params = array('{COL_WIDTH}' => $column_width);
1259
    $empty_cell = template_eval($empty_cell, $params);
1260
    while ($count++ % $columns != 0) {
1261
        echo $empty_cell;
1262
    }
1263
    echo $footer;
1264
    // Tab display
1265
    $params = array('{COLUMNS}' => $columns,
1266
        '{TABS}' => $tabs,
1267
        );
1268
    echo template_eval($tabs_row, $params);
1269
    endtable();
1270
    echo $spacer;
1271
}
1272
function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb')
1273
{
1274
    global $CONFIG;
1275
    global $template_thumb_view_title_row, $template_fav_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view;
1276
    static $header = '';
1277
    static $thumb_cell = '';
1278
    static $empty_cell = '';
1279
    static $row_separator = '';
1280
    static $footer = '';
1281
    static $tabs = '';
1282
    static $spacer = '';
1283
    if ($header == '') {
1284
        $thumb_cell = template_extract_block($template_thumbnail_view, 'thumb_cell');
1285
        $tabs = template_extract_block($template_thumbnail_view, 'tabs');
1286
        $header = template_extract_block($template_thumbnail_view, 'header');
1287
        $empty_cell = template_extract_block($template_thumbnail_view, 'empty_cell');
1288
        $row_separator = template_extract_block($template_thumbnail_view, 'row_separator');
1289
        $footer = template_extract_block($template_thumbnail_view, 'footer');
1290
        $spacer = template_extract_block($template_thumbnail_view, 'spacer');
1291
    }
1292
    $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
1293
    $theme_thumb_tab_tmpl = $template_tab_display;
1294
    if ($mode == 'thumb') {
1295
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page']));
1296
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
1297
    } else {
1298
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
1299
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
1300
    }
1301
    $thumbcols = $CONFIG['thumbcols'];
1302
    $cell_width = ceil(100 / $CONFIG['thumbcols']) . '%';
1303
    $tabs_html = $display_tabs ? create_tabs($nbThumb, $page, $total_pages, $theme_thumb_tab_tmpl) : '';
1304
    // The sort order options are not available for meta albums
1305
    if ($sort_options) {
1306
        $param = array('{ALBUM_NAME}' => $album_name,
1307
            '{AID}' => $aid,
1308
            '{PAGE}' => $page,
1309
            '{NAME}' => $lang_thumb_view['name'],
1310
            '{TITLE}' => $lang_thumb_view['title'],
1311
            '{DATE}' => $lang_thumb_view['date'],
1312
            '{SORT_TA}' => $lang_thumb_view['sort_ta'],
1313
            '{SORT_TD}' => $lang_thumb_view['sort_td'],
1314
            '{SORT_NA}' => $lang_thumb_view['sort_na'],
1315
            '{SORT_ND}' => $lang_thumb_view['sort_nd'],
1316
            '{SORT_DA}' => $lang_thumb_view['sort_da'],
1317
            '{SORT_DD}' => $lang_thumb_view['sort_dd'],
1318
            );
1319
        $title = template_eval($template_thumb_view_title_row, $param);
1320
    } else if ($aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later
1321
       $param = array('{ALBUM_NAME}' => $album_name,
1322
                             '{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip']
1323
                               );
1324
       $title = template_eval($template_fav_thumb_view_title_row, $param);
1325
    } else {
1326
        $title = $album_name;
1327
    }
1328
    if ($mode == 'thumb') {
1329
        starttable('100%', $title, $thumbcols);
1330
    } else {
1331
        starttable('100%');
1332
    }
1333
    echo $header;
1334
    $i = 0;
1335
    foreach($thumb_list as $thumb) {
1336
        $i++;
1337
        if ($mode == 'thumb') {
1338
            if ($aid == 'lastalb') {
1339
                $params = array('{CELL_WIDTH}' => $cell_width,
1340
                    '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
1341
                    '{THUMB}' => $thumb['image'],
1342
                    '{CAPTION}' => $thumb['caption'],
1343
                    '{ADMIN_MENU}' => $thumb['admin_menu']
1344
                    );
1345
            } else {
1346
                $params = array('{CELL_WIDTH}' => $cell_width,
1347
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
1348
                    '{THUMB}' => $thumb['image'],
1349
                    '{CAPTION}' => $thumb['caption'],
1350
                    '{ADMIN_MENU}' => $thumb['admin_menu']
1351
                    );
1352
            }
1353
        } else {
1354
            $params = array('{CELL_WIDTH}' => $cell_width,
1355
                '{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
1356
                '{THUMB}' => $thumb['image'],
1357
                '{CAPTION}' => $thumb['caption'],
1358
                '{ADMIN_MENU}' => ''
1359
                );
1360
        }
1361
        echo template_eval($thumb_cell, $params);
1362
        if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) {
1363
            echo $row_separator;
1364
        }
1365
    }
1366
    for (;($i % $thumbcols); $i++) {
1367
        echo $empty_cell;
1368
    }
1369
    echo $footer;
1370
    if ($display_tabs) {
1371
        $params = array('{THUMB_COLS}' => $thumbcols,
1372
            '{TABS}' => $tabs_html
1373
            );
1374
        echo template_eval($tabs, $params);
1375
    }
1376
    endtable();
1377
    echo $spacer;
1378
}
1379
// Added to display flim_strip
1380
function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb')
1381
{
1382
    global $CONFIG;
1383
    global $template_film_strip, $lang_film_strip;
1384
    static $template = '';
1385
    static $thumb_cell = '';
1386
    static $empty_cell = '';
1387
    static $spacer = '';
1388
    if ((!$template)) {
1389
        $template = $template_film_strip;
1390
        $thumb_cell = template_extract_block($template, 'thumb_cell');
1391
        $empty_cell = template_extract_block($template, 'empty_cell');
1392
        // $spacer = template_extract_block($template, 'spacer');
1393
    }
1394
    if ($header == '') {
1395
    }
1396
    $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
1397
    $theme_thumb_tab_tmpl = $template_tab_display;
1398
    if ($mode == 'thumb') {
1399
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page']));
1400
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
1401
    } else {
1402
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
1403
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
1404
    }
1405
    $thumbcols = $CONFIG['thumbcols'];
1406
    $cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%';
1407
    $i = 0;
1408
    $thumb_strip = '';
1409
    foreach($thumb_list as $thumb) {
1410
        $i++;
1411
        if ($mode == 'thumb') {
1412
            $params = array('{CELL_WIDTH}' => $cell_width,
1413
                '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
1414
                '{THUMB}' => $thumb['image'],
1415
                '{CAPTION}' => '',
1416
                '{ADMIN_MENU}' => ''
1417
                );
1418
        } else {
1419
            $params = array('{CELL_WIDTH}' => $cell_width,
1420
                '{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
1421
                '{THUMB}' => $thumb['image'],
1422
                '{CAPTION}' => '',
1423
                '{ADMIN_MENU}' => ''
1424
                );
1425
        }
1426
        $thumb_strip .= template_eval($thumb_cell, $params);
1427
        // if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) {
1428
        // echo $row_separator;
1429
        // }
1430
    }
1431
    // for (;($i % $thumbcols); $i++){
1432
    // echo $empty_cell;
1433
    // }
1434
    $params = array('{THUMB_STRIP}' => $thumb_strip,
1435
        '{COLS}' => $i);
1436
    ob_start();
1437
    starttable('');
1438
    echo template_eval($template, $params);
1439
    endtable();
1440
    $film_strip = ob_get_contents();
1441
    ob_end_clean();
1442
    return $film_strip;
1443
}
1444
function theme_no_img_to_display($album_name)
1445
{
1446
    global $lang_errors, $template_no_img_to_display;
1447
    static $template = '';
1448
    static $spacer;
1449
    if ((!$template)) {
1450
        $template = $template_no_img_to_display;
1451
        $spacer = template_extract_block($template, 'spacer');
1452
    }
1453
    $params = array('{TEXT}' => $lang_errors['no_img_to_display']);
1454
    starttable('100%', $album_name);
1455
    echo template_eval($template, $params);
1456
    endtable();
1457
}
1458
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
1459
{
1460
    global $HTTP_COOKIE_VARS, $CONFIG;
1461
    starttable();
1462
    echo $nav_menu;
1463
    endtable();
1464
    starttable();
1465
    echo $picture;
1466
    endtable();
1467
    if ($CONFIG['display_film_strip'] == 1) {
1468
        echo $film_strip;
1469
    }
1470
    starttable();
1471
    echo $votes;
1472
    endtable();
1473
    $picinfo = isset($HTTP_COOKIE_VARS['picinfo']) ? $HTTP_COOKIE_VARS['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none');
1474
    echo "<div id=\"picinfo\" style=\"display: $picinfo;\">\n";
1475
    starttable();
1476
    echo $pic_info;
1477
    endtable();
1478
    echo "</div>\n";
1479
    starttable();
1480
    echo $comments;
1481
    endtable();
1482
}
1483
function theme_html_picinfo(&$info)
1484
{
1485
    global $lang_picinfo;
1486
    $html = '';
1487
    $html .= "        <tr><td colspan=\"2\" class=\"tableh2_compact\"><b>{$lang_picinfo['title']}</b></td></tr>\n";
1488
    $template = "        <tr><td class=\"tableb_compact\" valign=\"top\" nowrap>%s:</td><td class=\"tableb_compact\">%s</td></tr>\n";
1489
    foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);
1490
    return $html;
1491
}
1492
?>