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