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