4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 24, 2016, 11:22:18 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
  Show Posts
Pages: «« « 1 2 3 4 [5] 6 7 8 9 ... 31 » »»
61  4images Modifications / Modifikationen / Mods & Plugins (Releases & Support) / Re: [MOD] Multi-Lightboxes v1.03.1 on: January 20, 2008, 11:30:07 PM
Hi,

when I click on a lightbox (link is shown in user profile), all images of this lightbox are shown.
Also shown is the link "Delete Lightbox".
This link should only be shown, if I'm the owner of the Lightbox.
Now everybody can click on the link "Delete Lightbox" and the message, that the lightbox is delete, is displayed.
Of corse the lightbox is not deleted, because I'm not the owner, the creater, of the lightbox.
So, this link should not be displayed. How can I get rid of it?

I also have installed the following MOD:
Lightbox for GUESTs v1.2: http://www.4homepages.de/forum/index.php?topic=4826.0
62  4images Modifications / Modifikationen / Mods & Plugins (Requests & Discussions) / Re: Seite mit Lightboxes / Page with Lightboxes on: January 20, 2008, 10:58:30 PM
www.photofront.ch - das ist meine Test Website.
Links siehst du den Menupunkt "Serien".

Das ist jetzt alles "hardcoded".
Das heisst, jede Serie ist zwar eine Lightbox, den Link und der Name habe ich vercoded.

Es wäre schön, wenn hier ganz einfach alle öffentlichen Lightboxes von Admin oder eines anderen definierten Users gezeigt würden.
Ohne, dass ich bei einer neuen Serie immer den Code anpassen muss.
63  4images Modifications / Modifikationen / Mods & Plugins (Requests & Discussions) / Seite mit Lightboxes / Page with Lightboxes on: January 20, 2008, 09:32:18 PM
Hallo,

ich möchte auf einer neuen Seite die Namen der Lightboxes zeigen, die ich als Admin zusammengestellt habe. Das heisst, ähnlich wie die Lightboxes im Profil gezeigt werden, einfach auf einer neuen Seite.
So kann ich zusätzlich zu den Kategorien Fotoserien zu verschiedenen Themen zusammenstellen.
Beispiel: ich habe eine Kategorie Landschaften und Städte. Nun erstelle ich eine Lightbox "Winter" und zeige Landschaften und Städte im Winter.

Ich habe folgende MOD's installiert:
Lightbox for GUESTs v1.2: http://www.4homepages.de/forum/index.php?topic=4826.0
Multi-Lightboxes v1.03 http://www.4homepages.de/forum/index.php?topic=10625.0



Hi,

I'd like to show the names of lightbox, createt by admin, on a new additional page (simular as it is show in the user profil).
I have a category landscape and city. Now I create a lightbox "winter" and can so show images of landscapes and cities, taken in winter.

I have installed the following MOD's:
Lightbox for GUESTs v1.2: http://www.4homepages.de/forum/index.php?topic=4826.0
Multi-Lightboxes v1.03 http://www.4homepages.de/forum/index.php?topic=10625.0
64  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Sortierung bei neuen Bildern on: January 01, 2008, 07:38:47 PM
Das war dieser MOD hier:
[Mod] Create Sort Order for each category from Admin Panel
http://www.4homepages.de/forum/index.php?topic=5026.msg21254#msg21254
65  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Sortierung bei neuen Bildern on: January 01, 2008, 04:44:05 PM
Hi nobby

Egal ob in den Kategorien, bei Suchresultaten, neuen Bildern oder bei Lightboxes , die Sortierung sollte doch gleich sein.
Ich habe einen Mod eingebaut, mit dem eine Sortierung pro Kategorie möglich ist. In den Einstellungen gibt es auch eine Sortierung - eine generelle Sortierung.
Ich habe in den generellen Einstellung und auch bei den Kategorien nach Rating absteigend definiert.

Bei den neuen Bildern, bei Lightbox und bei Suchresultaten... auf welche Definition wird zugegriffen? Suchkriterium Kategorie oder allgemeine Einstellung?
Die Sortierung nach Rating funktioniert überall, nur eben die Sortierung innerhalb des ersten Sortkriterum ist unterschiedlich.

gruss
TIMT
66  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Sortierung bei neuen Bildern on: January 01, 2008, 04:26:43 PM
Hi,

Scheint ein nicht einfaches Thema zu sein.
Jemand hier, der mir helfen kann?

Vielen Dank!
TIMT
67  4images Modifications / Modifikationen / Mods & Plugins (Releases & Support) / Re: [MOD] List group members and Enhanced administrator Email on: January 01, 2008, 04:25:04 PM
Hi

I have three groups:
photographer
customer
exhibitor

When I click on member-list (e.g. photographer) some users are shown several times.
As i mentioned in a previouse post, the problem ist the file 4images_groupmatch.

Quote  [Expand]
the problem was the tabel " 4images_groupmatch".
I had to save all usergroup definitions in the ACP for all users again.
Then the table "4images_groupmatch" was fine and the list group members were displayed correctly.

It is not possible to do this task again and again (klick on Member List, Klick on Usergroup, Klick Save --> now the user is only shown once in the list)
Why are the Users shown several times in the list (up to 20 times)?

Thanks for helping me.

TIMT
68  4images Issues / Ausgaben / Discussion & Troubleshooting / Sortierung bei neuen Bildern on: December 15, 2007, 09:21:44 PM
Hallo

In den Kategorien als auch in der Anzeige der neuen Bildern wird nach dem Rating sortiert.
Innerhalb des Ratings (z.B. die Bilder mit Rating 5) wird in den Kategorien das neuste Bild zuerst gezeigt.
Bei den neuen Bildern wird innerhalb des Ratings das älteste Bild zuerst gezeigt. Hier möchte ich auch das neuste Bild zuerst zeigen.
Wie kann ich das machen?

Vielen Dank für die Hilfe.
TIMT
69  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Falsches Bild nach Klick auf Link Vorheriges / nächstes Bild in detail.php on: December 07, 2007, 06:00:17 PM
Leider stimmt die Bilder "vorher" / "nachher" in der Lightbox auch mit dem Originalcode nicht. Muss wohl was mit dem Mode Multi Lightbox zu tun haben  Sad
70  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Falsches Bild nach Klick auf Link Vorheriges / nächstes Bild in detail.php on: December 07, 2007, 04:07:03 PM
ich habs versucht. nun stimmt es in den kategorien, aber nicht in der Lightbox.
http://www.photofront.ch/details.php?image_id=733&sessionid=9eebed0b07107d899dad2a8c1cec7794
hier stimmt Bild vorher und nachher
Auf der rechten Seite gibt es einen Link "San Francisco"
Mit Klick auf diesen Link wird man in die Lightbox "San Francisco" geführt.
http://www.photofront.ch/lightbox.php?action=show&lightbox_id=545b22454ac16273c246a260117cc396
Klickt man nun hier auf ein Bild, stimmt Bild vorher und nachher nicht.

hier ist mein details.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: details.php                                          *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.1                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

if (isset($HTTP_GET_VARS['big']) || isset($HTTP_POST_VARS['big'])) {
$templates_used 'big,header';
$main_template 'big';
}else{
$templates_used 'details,header';
$main_template 'details';
}

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

if (!
$image_id) {
  
header("Location: ".$site_sess->url($url"&"));
  exit;
}

$additional_sql "";
if (!empty(
$additional_image_fields)) {
  foreach (
$additional_image_fields as $key => $val) {
    
$additional_sql .= ", i.".$key;
  }
}

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_email").", d.user_id AS image_single_download
        FROM "
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        LEFT JOIN "
.IMAGES_DOWNLOAD_TABLE." d ON (d.image_id = i.image_id AND d.user_id = ".$user_info['user_id'].")
        WHERE i.image_id = 
$image_id AND c.cat_id = i.cat_id";
$image_row $site_db->query_firstrow($sql);
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
$is_image_owner = ($image_row['user_id'] > USER_AWAITING && $user_info['user_id'] == $image_row['user_id']) ? 0;

if (!
check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id) || !$image_row) {
  
header("Location: ".$site_sess->url($url"&"));
  exit;
}

$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" get_random_image($cat_id);
$site_template->register_vars("random_cat_image"$random_cat_image);
unset(
$random_cat_image);

//################################ Start MOD Ajax Slideshow/Diashow ##############################
$max_length_image_name 65;
$max_length_image_description 55;
$ajax_slideshow_view 0;

  
$ajax_slideshow "<script type=\"text/javascript\" src=\"http://slideshow.triptracker.net/slide.js\"></script>\n";
  
$ajax_slideshow .= "<script type=\"text/javascript\">\n<!-- \n";
  
$ajax_slideshow .= "var viewer = new PhotoViewer();\n";
  
$ajax_slideshow .= "viewer.setSlideDuration(".$config['ajax_slideshowviewer_setSlideDuration'].");\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Panning']."Panning();\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_AutoPlay']."AutoPlay();\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Fading']."Fading();\n";
  
$ajax_slideshow .= "viewer.setBackgroundColor('".$config['ajax_slideshowviewer_setBackgroundColor']."');\n";
  
$ajax_slideshow .= "viewer.setBorderWidth(".$config['ajax_slideshowviewer_setBorderWidth'].");\n";
  
$ajax_slideshow .= "viewer.setFontSize(".$config['ajax_slideshowviewer_setFontSize'].");\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Shade']."Shade();\n";
  
$ajax_slideshow .= "viewer.setShadeColor('".$config['ajax_slideshowviewer_setShadeColor']."');\n";
  
$ajax_slideshow .= "viewer.setShadeOpacity('".$config['ajax_slideshowviewer_setShadeOpacity']."');\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Loop']."Loop();\n";
  
$ajax_slideshow .= "viewer.setOnClickEvent(viewer.close);\n";
  
$ajax_slideshow .= "viewer.disableToolbar();\n";
  if (
$config['ajax_slideshowviewer_EmailLink'] == "disable") {
  
$ajax_slideshow .= "viewer.disableEmailLink();\n"; }
  if (
$config['ajax_slideshowviewer_PhotoLink'] == "disable") {
  
$ajax_slideshow .= "viewer.disablePhotoLink();\n"; }
  
$count 0;
  
$bgcounter 0;

   
$ext get_file_extension($image_row['image_media_file']);
   
$config['ajax_slideshowviewer_Types_array'] = explode(","$config['ajax_slideshowviewer_Types']);
   if (
in_array($ext$config['ajax_slideshowviewer_Types_array'])) {
   
$ajax_slideshow_view 1;
   
show_image($image_row);
   
$image_name_short = (isset($image_row['image_name']) && strlen($image_row['image_name']) > $max_length_image_name) ? substr(format_text(stripslashes($image_row['image_name']), 2), 0$max_length_image_name)."..." format_text(stripslashes($image_row['image_name']), 2);
   
$image_name_short str_replace("\r","",$image_name_short);
   
$image_name_short str_replace("\n","",$image_name_short);
   
$image_name_short str_replace("<br>","",$image_name_short);
   
$image_name_short str_replace("<br />","",$image_name_short);
   
$image_name_short str_replace("'","",$image_name_short);
   
$image_name_short str_replace("&lt;","<",$image_name_short);
   
$image_name_short str_replace("&gt;",">",$image_name_short);
   
$image_name_short stripslashes($image_name_short);
   
$image_name_short "".$lang['image_name'].$image_name_short";

   if (
$config['ajax_slideshowviewer_description'] == "enable") {
   
$image_description_short = (isset($image_row['image_description']) && strlen($image_row['image_description']) > $max_length_image_description) ? substr(format_text(stripslashes($image_row['image_description']), 101), 0$max_length_image_description)."..." format_text(stripslashes($image_row['image_description']), 101);
   
$image_description_short str_replace("\r","",$image_description_short);
   
$image_description_short str_replace("\n","",$image_description_short);
   
$image_description_short str_replace("<br>","",$image_description_short);
   
$image_description_short str_replace("<br />","",$image_description_short);
   
$image_description_short str_replace("'","",$image_description_short);
   
$image_description_short str_replace("&lt;","<",$image_description_short);
   
$image_description_short str_replace("&gt;",">",$image_description_short);
   
$image_description_short stripslashes($image_description_short);

   if (
$image_description_short == "")  {
   
$image_description_short "&nbsp;";
   } else {
    
$image_description_short "<br>".$lang['description'].$image_description_short";
   }
   }
   else {
   
$image_description_short "&nbsp;";
   }
   
$ajax_slideshow .= "viewer.add('".MEDIA_DIR."/".$image_row['cat_id']."/".$image_row['image_media_file']."', '".$image_description_short."', '".$image_name_short."');\n";
   }

  if (
$count 0)  {
    
$leftover = ($config['image_cells'] - $count);
  }
  
$ajax_slideshow .= "//-->\n</script>\n";

if (
$user_info['user_level'] == GUEST && $config['ajax_slideshowviewer_Show'] == "1" && $ajax_slideshow_view == "1") {
  
$ajax_slideshow_button "<img src=\"".get_gallery_image("diashow_off.gif")."\" border=\"0\" alt=\"\" />";
  
$site_template->register_vars(array(
  
"ajax_slideshow_button" => $ajax_slideshow_button
  
));
}
elseif (
$user_info['user_level'] != GUEST && $config['ajax_slideshowviewer_Show'] == "1" && $ajax_slideshow_view == "1" || $config['ajax_slideshowviewer_Show'] == "2" && $ajax_slideshow_view == "1") {
  
$ajax_slideshow_button "<a href=\"javascript:void(viewer.show(0))\"><img src=\"".get_gallery_image("diashow.gif")."\" border=\"0\" alt=\"\" /></a>";
  
$site_template->register_vars(array(
  
"ajax_slideshow" => $ajax_slideshow,
  
"ajax_slideshow_button" => $ajax_slideshow_button
  
));
}
else {
  
$site_template->register_vars(array(
  
"ajax_slideshow" => "",
  
"ajax_slideshow_button" => "",
));
}
unset(
$ajax_slideshow);
//################################ End MOD Ajax Slideshow/Diashow ##############################

//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------
$image_allow_comments = (check_permission("auth_readcomment"$cat_id)) ? $image_row['image_allow_comments'] : 0;
$image_name format_text($image_row['image_name'], 2);
/*
  MOD MULTI-LIGHTBOXES
  START REPLACE
*/
$lightbox_id = (isset($HTTP_POST_VARS['lightbox_id']) && $HTTP_POST_VARS['lightbox_id']) ? $HTTP_POST_VARS['lightbox_id'] : ((isset($HTTP_GET_VARS['lightbox_id']) && $HTTP_GET_VARS['lightbox_id']) ? $HTTP_GET_VARS['lightbox_id'] : 0);
show_image($image_row$mode.(($lightbox_id) ? "&lightbox_id=".$lightbox_id ""), 01);
/*
  MOD MULTI-LIGHTBOXES
  END REPLACE
*/

$in_mode 0;

$sql "";
if (
$mode == "lightbox") {
 
/*
  MOD MULTI-LIGHTBOXES
  START REPLACE
*/
  
$ids $user_info['lightbox_image_ids'];
  if (
$lightbox_id)
  {
    
$sql "SELECT l.lightbox_id, l.lightbox_name, l.lightbox_private, l.lightbox_image_ids, l.user_id, u.user_name, u.user_lightbox_private
            FROM "
.LIGHTBOXES_TABLE." l
            LEFT JOIN "
.USERS_TABLE." u ON u.user_id = l.user_id
            WHERE l.lightbox_id = '"
.$lightbox_id."'";
    if (
$row $site_db->query_firstrow($sql))
    {
      
$ids = (!$row['lightbox_private'] && $row['user_lightbox_private'] && $config['lightbox_share'] || $user_info['user_level'] == ADMIN ) ? $row['lightbox_image_ids'] : "";//$user_info['lightbox_image_ids'];
      
$lightbox_name $row['lightbox_name']." (".$row['user_name'].")";
    }
    else
    {
      
$lightbox_name "";
    }
  }
  else
  {
    
$lightbox_name $user_info['lightboxes'][$user_info['user_lightbox']]['name'];
  }
  
$txt_clickstream $lang['lightbox'].(($lightbox_name) ? " - ".$lightbox_name "");
  if (!empty(
$ids)) {
    
$image_id_sql str_replace(" "", "trim($ids));
/*
  MOD MULTI-LIGHTBOXES
  END REPLACE
*/
    
$sql "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM "
.IMAGES_TABLE."
            WHERE image_active = 1 AND image_id IN (
$image_id_sql) AND (cat_id NOT IN (".get_auth_cat_sql("auth_viewimage""NOTIN").", ".get_auth_cat_sql("auth_viewcat""NOTIN")."))
            ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
    
$in_mode 1;
  }
}
elseif (
$mode == "search") {
  if (!isset(
$session_info['searchid']) || empty($session_info['searchid'])) {
    
$session_info['search_id'] = $site_sess->get_session_var("search_id");
  }

  if (!empty(
$session_info['search_id'])) {
    
$search_id unserialize($session_info['search_id']);
  }

  
$sql_where_query "";

  if (!empty(
$search_id['image_ids'])) {
    
$sql_where_query .= "AND image_id IN (".$search_id['image_ids'].") ";
  }

  if (!empty(
$search_id['user_ids'])) {
    
$sql_where_query .= "AND user_id IN (".$search_id['user_ids'].") ";
  }

  if (!empty(
$search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    
$new_cutoff time() - 60 60 24 $config['new_cutoff'];
    
$sql_where_query .= "AND image_date >= $new_cutoff ";
  }

  if (!empty(
$search_id['search_cat']) && $search_id['search_cat'] != 0) {
    
$cat_id_sql 0;
    if (
check_permission("auth_viewcat"$search_id['search_cat'])) {
      
$sub_cat_ids get_subcat_ids($search_id['search_cat'], $search_id['search_cat'], $cat_parent_cache);
      
$cat_id_sql .= ", ".$search_id['search_cat'];
      if (!empty(
$sub_cat_ids[$search_id['search_cat']])) {
        foreach (
$sub_cat_ids[$search_id['search_cat']] as $val) {
          if (
check_permission("auth_viewcat"$val)) {
            
$cat_id_sql .= ", ".$val;
          }
        }
      }
    }
    
$cat_id_sql $cat_id_sql !== "AND cat_id IN ($cat_id_sql)" "";
  }
  else {
    
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN");
    
$cat_id_sql $cat_id_sql !== "AND cat_id NOT IN (".$cat_id_sql.")" "";
  }

  if (!empty(
$sql_where_query)) {
    
$sql "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM "
.IMAGES_TABLE."
            WHERE image_active = 1
            
$sql_where_query
            
$cat_id_sql
            ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
    
$in_mode 1;
  }
}
if (!
$in_mode || empty($sql)) {
  
$sql "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
          FROM "
.IMAGES_TABLE."
          WHERE image_active = 1 AND cat_id = 
$cat_id
          ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
}
$result $site_db->query($sql);

$image_id_cache = array();
$next_prev_cache = array();
$break 0;
$prev_id 0;
while(
$row $site_db->fetch_array($result)) {
  
$image_id_cache[] = $row['image_id'];
  
$next_prev_cache[$row['image_id']] = $row;
  if (
$break) {
    break;
  }
  if (
$prev_id == $image_id) {
    
$break 1;
  }
  
$prev_id $row['image_id'];
}
$site_db->free_result();

if (!
function_exists("array_search")) {
  function 
array_search($needle$haystack) {
    
$match false;
    foreach (
$haystack as $key => $value) {
      if (
$value == $needle) {
        
$match $key;
      }
    }
    return 
$match;
  }
}

$act_key array_search($image_id$image_id_cache);
$next_image_id = (isset($image_id_cache[$act_key 1])) ? $image_id_cache[$act_key 1] : 0;
$prev_image_id = (isset($image_id_cache[$act_key 1])) ? $image_id_cache[$act_key 1] : 0;
unset(
$image_id_cache);

// Get next and previous image
if (!empty($next_prev_cache[$next_image_id])) {
  
$next_image_name htmlspecialchars($next_prev_cache[$next_image_id]['image_name']);
/*
  MOD MULTI-LIGHTBOXES
  START REPLACE
*/
  
$next_image_url $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$next_image_id.((!empty($mode)) ? "&amp;mode=".$mode.(($lightbox_id) ? "&lightbox_id=".$lightbox_id "") : ""));
/*
  MOD MULTI-LIGHTBOXES
  END REPLACE
*/
  
if (!get_file_path($next_prev_cache[$next_image_id]['image_media_file'], "media"$next_prev_cache[$next_image_id]['cat_id'], 00)) {
    
$next_image_file ICON_PATH."/404.gif";
  }
  else {
    
$next_image_file get_file_path($next_prev_cache[$next_image_id]['image_media_file'], "media"$next_prev_cache[$next_image_id]['cat_id'], 01);
  }
  if (!
get_file_path($next_prev_cache[$next_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$next_image_id]['cat_id'], 00)) {
    
$next_thumb_file ICON_PATH."/".get_file_extension($next_prev_cache[$next_image_id]['image_media_file']).".gif";
  }
  else {
    
$next_thumb_file get_file_path($next_prev_cache[$next_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$next_image_id]['cat_id'], 01);
  }
}
else {
  
$next_image_name REPLACE_EMPTY;
  
$next_image_url REPLACE_EMPTY;
  
$next_image_file REPLACE_EMPTY;
  
$next_thumb_file REPLACE_EMPTY;
}

if (!empty(
$next_prev_cache[$prev_image_id])) {
  
$prev_image_name htmlspecialchars($next_prev_cache[$prev_image_id]['image_name']);
/*
  MOD MULTI-LIGHTBOXES
  START REPLACE
*/
  
$prev_image_url $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$prev_image_id.((!empty($mode)) ? "&amp;mode=".$mode.(($lightbox_id) ? "&lightbox_id=".$lightbox_id "") : ""));
/*
  MOD MULTI-LIGHTBOXES
  END REPLACE
*/
    
if (!get_file_path($next_prev_cache[$prev_image_id]['image_media_file'], "media"$next_prev_cache[$prev_image_id]['cat_id'], 00)) {
    
$prev_image_file ICON_PATH."/404.gif";
  }
  else {
    
$prev_image_file get_file_path($next_prev_cache[$prev_image_id]['image_media_file'], "media"$next_prev_cache[$prev_image_id]['cat_id'], 01);
  }
  if (!
get_file_path($next_prev_cache[$prev_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$prev_image_id]['cat_id'], 00)) {
    
$prev_thumb_file ICON_PATH."/".get_file_extension($next_prev_cache[$prev_image_id]['image_media_file']).".gif";
  }
  else {
    
$prev_thumb_file get_file_path($next_prev_cache[$prev_image_id]['image_thumb_file'], "thumb"$next_prev_cache[$prev_image_id]['cat_id'], 01);
  }
}
else {
  
$prev_image_name REPLACE_EMPTY;
  
$prev_image_url REPLACE_EMPTY;
  
$prev_image_file REPLACE_EMPTY;
  
$prev_thumb_file REPLACE_EMPTY;
}

$site_template->register_vars(array(
  
"next_image_id" => $next_image_id,
  
"next_image_name" => $next_image_name,
  
"next_image_url" => $next_image_url,
  
"next_image_file" => $next_image_file,
  
"next_thumb_file" => $next_thumb_file,
  
"prev_image_id" => $prev_image_id,
  
"prev_image_name" => $prev_image_name,
  
"prev_image_url" => $prev_image_url,
  
"prev_image_file" => $prev_image_file,
  
"prev_thumb_file" => $prev_thumb_file
));
unset(
$next_prev_cache);

/*

//-----------------------------------------------------
//--- Show Count Users Lightbox -----------------------------
//-----------------------------------------------------

$sql = "SELECT lightbox_id, lightbox_name, id
        FROM ".LIGHTBOXES_TABLE."
        WHERE lightbox_image_ids REGEXP '([^0-9]|^)".$image_row['image_id']."([^0-9]|$)' AND user_id = ".$user_info['user_id'];
$result = $site_db->query($sql);

$url_users_lightbox = '';
    while ($row = $site_db->fetch_array($result)) {
       //$url_users_lightbox .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?action=show&amp;lightbox_id=".$row['lightbox_id'])."\" class=\"keywordstyle\">".$row['lightbox_name']."</a><br />";
       $url_users_lightbox .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?action=show&amp;user_lightbox=".$row['id'])."\" class=\"keywordstyle\">".$row['lightbox_name']."</a><br />";

    }
    $site_template->register_vars(array(
       "url_users_lightbox" => $url_users_lightbox
    ));

unset($url_users_lightbox);

*/

//-----------------------------------------------------
//--- Show Image Owners Lightbox PUBLIC ---------------
//-----------------------------------------------------

$sql "SELECT lightbox_id, lightbox_name, id, lightbox_private
        FROM "
.LIGHTBOXES_TABLE."
        WHERE lightbox_image_ids REGEXP '([^0-9]|^)"
.$image_row['image_id']."([^0-9]|$)' AND user_id = ".$image_row['user_id']." AND lightbox_private = 0";
$result $site_db->query($sql);

$url_users_lightbox '';
    while (
$row $site_db->fetch_array($result)) {
       
$url_users_lightbox .= "&nbsp;&nbsp;<img border=\"0\" src=\"./picture_library/pfeil_orange.gif\">&nbsp;&nbsp; <a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?action=show&amp;lightbox_id=".$row['lightbox_id'])."\" class=\"keywordstyle\">".$row['lightbox_name']."</a><br />";
       
//$url_users_lightbox .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?action=show&amp;user_lightbox=".$row['id'])."\" class=\"keywordstyle\">".$row['lightbox_name']."</a><br />";
    
}
    
$site_template->register_vars(array(
       
"url_users_lightbox" => $url_users_lightbox
    
));
unset(
$url_users_lightbox);


//-----------------------------------------------------
//--- Save Comment ------------------------------------
//-----------------------------------------------------
$error 0;
if (
$action == "postcomment" && isset($HTTP_POST_VARS[URL_ID])) {
  
$id intval($HTTP_POST_VARS[URL_ID]);
  
$sql "SELECT cat_id, image_allow_comments
          FROM "
.IMAGES_TABLE."
          WHERE image_id = 
$id";
  
$row $site_db->query_firstrow($sql);

  if (
$row['image_allow_comments'] == || !check_permission("auth_postcomment"$row['cat_id']) || !$row) {
    
$msg $lang['comments_deactivated'];
  }
  else {
    
$user_name un_htmlspecialchars(trim($HTTP_POST_VARS['user_name']));
    
$comment_headline un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
    
$comment_text un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

    
// Flood Check
    
$sql "SELECT comment_ip, comment_date
            FROM "
.COMMENTS_TABLE."
            WHERE image_id = 
$id
            ORDER BY comment_date DESC
            LIMIT 1"
;
    
$spam_row $site_db->query_firstrow($sql);
    
$spamtime $spam_row['comment_date'] + 180;

    if (
$session_info['session_ip'] == $spam_row['comment_ip'] && time() <= $spamtime && $user_info['user_level'] != ADMIN)  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['spamming'];
      
$error 1;
    }

    
$user_name_field get_user_table_field("""user_name");
    if (!empty(
$user_name_field)) {
      if (
$site_db->not_empty("SELECT $user_name_field FROM ".USERS_TABLE." WHERE $user_name_field = '".strtolower($user_name)."' AND ".get_user_table_field("""user_id")." <> '".$user_info['user_id']."'")) {
        
$msg .= (($msg != "") ? "<br />" "").$lang['username_exists'];
        
$error 1;
      }
    }
//    if ($user_name == "")  {
//      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
 //     $error = 1;
 //   }
//    if ($comment_headline == "")  {
//      $msg .= (($msg != "") ? "<br />" : "").$lang['headline_required'];
//      $error = 1;
//    }
    
if ($comment_text == "")  {
      
$msg .= (($msg != "") ? "<br />" "").$lang['comment_required'];
      
$error 1;
    }

    if (!
$error)  {
      
$sql "INSERT INTO ".COMMENTS_TABLE."
              (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date)
              VALUES
              (
$id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")";
      
$site_db->query($sql);
      
$commentid $site_db->get_insert_id();
      
update_comment_count($id$user_info['user_id']);
    }
  }
  unset(
$row);
  unset(
$spam_row);
}

//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {
  
$sql "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_email").get_user_table_field(", u.""user_showemail").get_user_table_field(", u.""user_invisible").get_user_table_field(", u.""user_joindate").get_user_table_field(", u.""user_lastaction").get_user_table_field(", u.""user_comments").get_user_table_field(", u.""user_homepage").get_user_table_field(", u.""user_icq")."
          FROM "
.COMMENTS_TABLE." c
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          WHERE c.image_id = 
$image_id
          ORDER BY c.comment_date ASC"
;
  
$result $site_db->query($sql);

  
$comment_row = array();
  while (
$row $site_db->fetch_array($result)) {
    
$comment_row[] = $row;
  }
  
$site_db->free_result($result);
  
$num_comments sizeof($comment_row);

  if (!
$num_comments) {
    
$comments "<tr><td width=\"100%\" class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    
$comments "";
    
$bgcounter 0;
    for (
$i 0$i $num_comments$i++) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;

      
$comment_user_email "";
      
$comment_user_email_save "";
      
$comment_user_mailform_link "";
      
$comment_user_email_button "";
      
$comment_user_homepage_button "";
      
$comment_user_icq_button "";
      
$comment_user_profile_button "";
      
$comment_user_status_img REPLACE_EMPTY;
      
$comment_user_name htmlspecialchars($comment_row[$i]['comment_user_name']);
      
$comment_user_info $lang['userlevel_guest'];

      
$comment_user_id $comment_row[$i]['user_id'];

      if (isset(
$comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        
$comment_user_name htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]);

        
$comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/"$comment_user_id$url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        
$comment_user_profile_button "<a class=\"menu\" href=  \"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("pfeil_orange.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" />&nbsp;Profil</a>";

        
$comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        
$comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty(
$comment_user_homepage)) {
          
$comment_user_homepage_button "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        
$comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? $comment_row[$i][$user_table_fields['user_icq']] : "";
        if (!empty(
$comment_user_icq)) {
          
$comment_user_icq_button "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty(
$comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          
$comment_user_email $comment_row[$i][$user_table_fields['user_email']];
          
$comment_user_email_save str_replace("@"" at "$comment_row[$i][$user_table_fields['user_email']]);
          if (!empty(
$url_mailform)) {
            
$comment_user_mailform_link $site_sess->url(preg_replace("/{user_id}/"$comment_user_id$url_mailform));
          }
          else {
            
$comment_user_mailform_link $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          
$comment_user_email_button "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        if (!isset(
$comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          
$comment_user_info $lang['userlevel_user'];
        }
        elseif (
$comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          
$comment_user_info $lang['userlevel_admin'];
        }

        
$comment_user_info .= "<br />";
        
$comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        
$comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      
$comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      
$admin_links "";
      if (
$user_info['user_level'] == ADMIN) {
        
$admin_links .= "<a class=\"keywordstyle\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";
        
$admin_links .= "<a class=\"keywordstyle\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['delete']."</a>";
      }
 elseif (
$is_image_owner || $comment_user_id == $user_info['user_id'] && $user_info['user_level'] >= USER) {
       
$admin_links .= ($config['user_edit_comments'] != 1) ? "" "<a class=\"keywordstyle\" href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
       
$admin_links .= ($config['user_delete_comments'] != 1) ? "" "<a class=\"keywordstyle\" href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

      
$site_template->register_vars(array(
        
"comment_id" => $comment_row[$i]['comment_id'],
        
"comment_user_id" => $comment_user_id,
        
"comment_user_status_img" => $comment_user_status_img,
        
"comment_user_name" => $comment_user_name,
        
"comment_user_info" => $comment_user_info,
        
"comment_user_profile_button" => $comment_user_profile_button,
        
"comment_user_email" => $comment_user_email,
        
"comment_user_email_save" => $comment_user_email_save,
        
"comment_user_mailform_link" => $comment_user_mailform_link,
        
"comment_user_email_button" => $comment_user_email_button,
        
"comment_user_homepage_button" => $comment_user_homepage_button,
        
"comment_user_icq_button" => $comment_user_icq_button,
        
"comment_user_ip" => $comment_user_ip,
        
"comment_headline" => format_text($comment_row[$i]['comment_headline'], 0$config['wordwrap_comments'], 00),
        
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
        
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        
"row_bg_number" => $row_bg_number,
        
"admin_links" => $admin_links
      
));
      
$comments .= $site_template->parse_template("comment_bit");
    } 
// end while
  
//end else
  
$site_template->register_vars("comments"$comments);
  unset(
$comments);

  
//-----------------------------------------------------
  //--- BBCode & Form -----------------------------------
  //-----------------------------------------------------
  
$allow_posting check_permission("auth_postcomment"$cat_id);
  
$bbcode "";
  if (
$config['bb_comments'] == && $allow_posting) {
    
$site_template->register_vars(array(
      
"lang_bbcode" => $lang['bbcode'],
      
"lang_tag_prompt" => $lang['tag_prompt'],
      
"lang_link_text_prompt" => $lang['link_text_prompt'],
      
"lang_link_url_prompt" => $lang['link_url_prompt'],
      
"lang_link_email_prompt" => $lang['link_email_prompt'],
      
"lang_list_type_prompt" => $lang['list_type_prompt'],
      
"lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    
$bbcode $site_template->parse_template("bbcode");
  }

  if (!
$allow_posting) {
    
$comment_form "";
  }
  else {
    
$user_name = (isset($HTTP_POST_VARS['user_name']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['user_name']))) : (($user_info['user_level'] != GUEST) ? htmlspecialchars($user_info['user_name']) : "");
    
$comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']))) : "";
    
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? stripslashes(htmlspecialchars(trim($HTTP_POST_VARS['comment_text']))) : "";

    
$site_template->register_vars(array(
      
"bbcode" => $bbcode,
      
"user_name" => $user_name,
      
"comment_headline" => $comment_headline,
      
"comment_text" => $comment_text,
      
"lang_post_comment" => $lang['post_comment'],
      
"lang_name" => $lang['name'],
      
"lang_headline" => $lang['headline'],
      
"lang_comment" => $lang['comment']
    ));
    
$comment_form $site_template->parse_template("comment_form");
  }
  
$site_template->register_vars("comment_form"$comment_form);
  unset(
$comment_form);
// end if allow_comments

// Admin Links
$admin_links "";
if (
$user_info['user_level'] == ADMIN) {
  
$admin_links .= "<br>&nbsp;&nbsp;<img border=\"0\" src=\"./picture_library/pfeil.gif\"/>&nbsp;  <a class=\"schwarz\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['image_edit']."&nbsp;&nbsp;</a>"
  
$admin_links .= "<img border=\"0\" src=\"./picture_library/pfeil.gif\"/>&nbsp;  <a class=\"schwarz\" href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['image_delete']."</a>";
}
elseif (
$is_image_owner) {
  
$admin_links .= ($config['user_edit_image'] != 1) ? "" "<br>&nbsp;&nbsp;<img border=\"0\" src=\"./picture_library/pfeil.gif\"/>&nbsp;&nbsp;<a class=\"schwarz\" href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['image_edit']."&nbsp;&nbsp;</a>"
  
$admin_links .= (!$config['user_delete_image']) ? "" "<img border=\"0\" src=\"./picture_library/pfeil.gif\"/>&nbsp;&nbsp;<a class=\"schwarz\" href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['image_delete']."</a>";
}
$site_template->register_vars("admin_links"$admin_links);

// Update Hits
if ($user_info['user_level'] != ADMIN) {
  
$sql "UPDATE ".IMAGES_TABLE."
          SET image_hits = image_hits + 1
          WHERE image_id = 
$image_id";
  
$site_db->query($sql);
}


// #################################### Start Mod Colorsearch ##################################
global $site_db$config$site_sess$lang$user_info$setting;
$show_colors $config['colorsearch_colors'];
$show_colors_lines_br $config['colorsearch_colors_line'];
$show_colors_size $config['colorsearch_size'];

$ext get_file_extension($image_row['image_media_file']);
$config['colorsearch_types_array'] = explode(","$config['colorsearch_types']);
if (
in_array($ext$config['colorsearch_types_array']) && ($config['colorsearch_Show'] == "1")) {

class 
GetMostCommonColors
{
        var 
$image;
        function 
Get_Color()
        {
                if (isset(
$this->image))
                {
                        
$PREVIEW_WIDTH    150;
                        
$PREVIEW_HEIGHT   150;
                        
$size GetImageSize($this->image);
                        
$scale=1;
                        if (
$size[0]>0)
                        
$scale min($PREVIEW_WIDTH/$size[0], $PREVIEW_HEIGHT/$size[1]);
                        if (
$scale 1)
                        {
                                
$width floor($scale*$size[0]);
                                
$height floor($scale*$size[1]);
                        }
                        else
                        {
                                
$width $size[0];
                                
$height $size[1];
                        }
                        
$image_resized imagecreatetruecolor($width$height);
                        if (
$size[2]==1)
                        
$image_orig=imagecreatefromgif($this->image);
                        if (
$size[2]==2)
                        
$image_orig=imagecreatefromjpeg($this->image);
                        if (
$size[2]==3)
                        
$image_orig=imagecreatefrompng($this->image);
                        
imagecopyresampled($image_resized$image_orig0000$width$height$size[0], $size[1]);
                        
$im $image_resized;
                        
$imgWidth imagesx($im);
                        
$imgHeight imagesy($im);
                        for (
$y=0$y $imgHeight$y++)
                        {
                                for (
$x=0$x $imgWidth$x++)
                                {
                                        
$index imagecolorat($im,$x,$y);
                                        
$Colors imagecolorsforindex($im,$index);
                                        
$Colors['red']=intval((($Colors['red'])+15)/32)*32;
                                        
$Colors['green']=intval((($Colors['green'])+15)/32)*32;
                                        
$Colors['blue']=intval((($Colors['blue'])+15)/32)*32;
                                        if (
$Colors['red']>=256)
                                        
$Colors['red']=240;
                                        if (
$Colors['green']>=256)
                                        
$Colors['green']=240;
                                        if (
$Colors['blue']>=256)
                                        
$Colors['blue']=240;
                                        
$hexarray[]=substr("0".dechex($Colors['red']),-2).substr("0".dechex($Colors['green']),-2).substr("0".dechex($Colors['blue']),-2);
                                }
                        }
                        
$hexarray=array_count_values($hexarray);
                        
natsort($hexarray);
                        
$hexarray=array_reverse($hexarray,true);
                        return 
$hexarray;

                }
                else die(
"ERROR! (\$image parameter)");
        }
}

$ex=new GetMostCommonColors();
$ex->imageROOT_PATH.MEDIA_DIR."/".$image_row['cat_id']."/".$image_row['image_media_file']."";
$colors=$ex->Get_Color();
$colors_key=array_keys($colors);
$how_many count(array_keys($colors))-1;
$image_farbton_suche '';

// Start line 1
if ($show_colors_lines_br >= $how_many && $show_colors >= $how_many) {
for (
$i 0$i <= $how_many$i++)
{
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
}
}
elseif (
$show_colors_lines_br >= $how_many && $show_colors <= $how_many) {
for (
$i 0$i <= ($show_colors-1); $i++)
{
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
}
}
elseif (
$show_colors_lines_br <= $how_many && $show_colors <= $how_many && $show_colors_lines_br >= $show_colors) {
for (
$i 0$i <= ($show_colors-1); $i++)
{
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
}
}
// End line 1
// Start line 1
else {
for (
$i 0$i <= ($show_colors_lines_br -1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    
$image_farbton_suche .="</tr>\n";
// End line 1


// Start line 2
    
if ($show_colors >= $show_colors_lines_br && $show_colors >= ($show_colors_lines_br*2) && $how_many >= ($show_colors_lines_br*2)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i $show_colors_lines_br$i <= ($show_colors_lines_br*2-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    
$image_farbton_suche .="</tr>\n";
    }
    elseif (
$show_colors >= $show_colors_lines_br && $show_colors >= ($show_colors_lines_br*2) && $how_many <= ($show_colors_lines_br*2) || $show_colors >= $show_colors_lines_br && $how_many >= $show_colors_lines_br && $how_many <= ($show_colors_lines_br*2)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i $show_colors_lines_br$i <= $how_many$i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
    elseif (
$show_colors >= $show_colors_lines_br && $show_colors <= ($show_colors_lines_br*2) && $how_many >= ($show_colors_lines_br*2)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i $show_colors_lines_br$i <= ($show_colors-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
// End line 2
// Start line 3
    
if ($show_colors >= ($show_colors_lines_br*2) && $show_colors >= ($show_colors_lines_br*3) && $how_many >= ($show_colors_lines_br*3)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*2); $i <= ($show_colors_lines_br*3-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    
$image_farbton_suche .="</tr>\n";
    }
    elseif (
$show_colors >= ($show_colors_lines_br*2) && $show_colors >= ($show_colors_lines_br*3) && $how_many <= ($show_colors_lines_br*3) || $show_colors >= ($show_colors_lines_br*2) && $how_many >= ($show_colors_lines_br*2) && $how_many <= ($show_colors_lines_br*3)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*2); $i <= $how_many$i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
    elseif (
$show_colors >= ($show_colors_lines_br*2) && $show_colors <= ($show_colors_lines_br*3) && $how_many >= ($show_colors_lines_br*3)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*2); $i <= ($show_colors-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
// End line 3
// Start line 4
    
if ($show_colors >= ($show_colors_lines_br*3) && $show_colors >= ($show_colors_lines_br*4) && $how_many >= ($show_colors_lines_br*4)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*3); $i <= ($show_colors_lines_br*4-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    
$image_farbton_suche .="</tr>\n";
    }
    elseif (
$show_colors >= ($show_colors_lines_br*3) && $show_colors >= ($show_colors_lines_br*4) && $how_many <= ($show_colors_lines_br*4) || $show_colors >= ($show_colors_lines_br*3) && $how_many >= ($show_colors_lines_br*3) && $how_many <= ($show_colors_lines_br*4)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*3); $i <= $how_many$i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
    elseif (
$show_colors >= ($show_colors_lines_br*3) && $show_colors <= ($show_colors_lines_br*4) && $how_many >= ($show_colors_lines_br*4)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*3); $i <= ($show_colors-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
// End line 4
// Start line 5
    
if ($show_colors >= ($show_colors_lines_br*4) && $show_colors >= ($show_colors_lines_br*5) && $how_many >= ($show_colors_lines_br*5)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*4); $i <= ($show_colors_lines_br*5-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    
$image_farbton_suche .="</tr>\n";
    }
    elseif (
$show_colors >= ($show_colors_lines_br*4) && $show_colors >= ($show_colors_lines_br*5) && $how_many <= ($show_colors_lines_br*5) || $show_colors >= ($show_colors_lines_br*4) && $how_many >= ($show_colors_lines_br*4) && $how_many <= ($show_colors_lines_br*5)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*4); $i <= $how_many$i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
    elseif (
$show_colors >= ($show_colors_lines_br*4) && $show_colors <= ($show_colors_lines_br*5) && $how_many >= ($show_colors_lines_br*5)) {
    
$image_farbton_suche .="<tr>\n";
    for (
$i = ($show_colors_lines_br*4); $i <= ($show_colors-1); $i++)
    {
    
$colorsearch_link $site_sess->url(ROOT_PATH."search.php?search_keywords=".$colors_key[$i]."&search_fields=image_farbton");
    
$image_farbton_suche .="<td bgcolor=\"#".$colors_key[$i]."\" class=\"colorsearch\"><a href=\"".$colorsearch_link."\" style=\"background-color: #".$colors_key[$i].";\"><img src=\"templates/".$config['template_dir']."/images/spacer.gif\" alt=\"[".$lang['farbton_suche_link_1']." ".$colors[$colors_key[$i]]." Pixel]&nbsp; ".$lang['farbton_suche_link_2']."\" width=\"".$show_colors_size."\" height=\"".$show_colors_size."\" border=\"0\"></a></td>\n";
    }
    }
// End line 5
}

$site_template->register_vars(array(
  
"image_farbton_suche" => $image_farbton_suche,
  
"lang_farbton_suche" => $lang['farbton_suche'],
  
"lang_farbton_suche_link_1" => $lang['farbton_suche_link_1'],
  
"lang_farbton_suche_link_2" => $lang['farbton_suche_link_2'],
  
"lang_farbton_suche_haeufigkeit" => $lang['farbton_suche_haeufigkeit']
));
}
else {
$image_farbton_suche '';
$site_template->register_vars(array(
  
"image_farbton_suche" => $image_farbton_suche
));
}
unset(
$image_farbton_suche);
// #################################### End Mod Colorsearch ##################################


//-----------------------------------------------------
//---Clickstream---------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];

if (
$mode == "lightbox" && $in_mode) {
  
$page_url "";
  if (
preg_match("/".URL_PAGE."=([0-9]+)/"$url$regs)) {
    if (!empty(
$regs[1]) && $regs[1] != && !$page_details) {
      
$page_url "?".URL_PAGE."=".$regs[1];
    }
  }
/*
  MOD MULTI-LIGHTBOXES
  START REPLACE
*/
  
$page_url .= ($lightbox_id) ? (($page_url) ? "&" "?")."lightbox_id=".$lightbox_id "";
  
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$txt_clickstream."</a>".$config['category_separator'];
/*
  MOD MULTI-LIGHTBOXES
  END REPLACE
*/
}
elseif (
$mode == "search" && $in_mode) {
  
$page_url "";
  if (
preg_match("/".URL_PAGE."=([0-9]+)/"$url$regs)) {
    if (!empty(
$regs[1]) && $regs[1] != 1) {
      
$page_url "&amp;".URL_PAGE."=".$regs[1];
    }
  }
  
$clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
}
else {
  
$clickstream .= get_category_path($cat_id1$cur_page).$config['category_separator'];
}
$clickstream .= $image_name."</span>";

//-----------------------------------------------------
//--- Voted stats -------------------------------------
//-----------------------------------------------------
$sql "SELECT v.user_id, v.vote, u.user_name
        FROM "
.VOTED_TABLE." v
        LEFT JOIN "
.USERS_TABLE." u ON (u.user_id = v.user_id)
        WHERE u.user_id = v.user_id AND image_id = "
.$image_id;
$result $site_db->query($sql);
$voted_list "";
while (
$row $site_db->fetch_array($result))
{
  
$vote = ($user_info['user_level'] == ADMIN) ? " (".$row['vote'].")" "";
  
$voted_list .= "<a class=\"keywordstyle\" href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id'])."\">".$row['user_name']."</a>".$vote."<br />"//member name WITH a link to their profile page
//  $voted_list .= $row['user_name'].$vote."<br />"; //member name WITHOUT a link to their profile page
}
$site_template->register_vars(array(
  
"voted_list" => $voted_list,
  
"lang_voted_list" => $lang['voted_list']
));
//----- End Voted stats ----------------


//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream,
  
"lang_category" => $lang['category'],
  
"lang_added_by" => $lang['added_by'],
  
"lang_description" => $lang['description'],
  
"lang_keywords" => $lang['keywords'],
  
"lang_date" => $lang['date'],
  
"lang_hits" => $lang['hits'],
  
"lang_downloads" => $lang['downloads'],
  
"lang_rating" => $lang['rating'],
  
"lang_votes" => $lang['votes'],
  
"lang_author" => $lang['author'],
  
"lang_comment" => $lang['comment'],
  
"lang_prev_image" => $lang['prev_image'],
  
"lang_next_image" => $lang['next_image'],
  
"lang_file_size" => $lang['file_size']
));

$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>
71  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Falsches Bild nach Klick auf Link Vorheriges / nächstes Bild in detail.php on: December 07, 2007, 03:13:45 PM
Hier gelangst du in die Kategorie "Architektur"
http://www.photofront.ch/categories.php?cat_id=2&sessionid=9eebed0b07107d899dad2a8c1cec7794

Das erste Bild heisst "rear window", dann folgt "Schatten".
Klick nun auf das Bild "Schatten".
Oben rechts wird nun als nächstes Bild "rear window" angezeigt.
Das stimmt aber nicht, rear window ist das vorherige Bild und das nächste Bild sollte "UP" sein.
Wenn du das Bild rear window in der Detailansicht anschaust, siehst du oben rechts "Schatten" als das vorherige Bild und "UP" als das nächste Bild.
Hier gibt es aber kein vorheriges Bild (rear window ist das erste Bild) und das nächste Bild müsste "Schatten" sein.
72  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Falsches Bild nach Klick auf Link Vorheriges / nächstes Bild in detail.php on: December 07, 2007, 02:53:31 PM
Hallo nobby

ich weiss, das ist nur meine testseite - ist nicht weiter schlimm  Wink
Aber wähl mal eine Kategorie aus, klick dann auf ein Bild und klick auf nächstes Bild (Bildname oben im orangen Balken).
Es wird nicht das Bild präsentiert, das eigentlich gemäss Reihenfolge in der Kategorieübersicht, gezeigt werden müsste.
73  4images Issues / Ausgaben / Discussion & Troubleshooting / Re: Falsches Bild nach Klick auf Link Vorheriges / nächstes Bild in detail.php on: December 07, 2007, 02:44:55 PM
Hi

Kann mir da jemand helfen? Das Problem kann auf www.photofront.ch nachvollzogen werden.

Vielen Dank!
74  4images Modifications / Modifikationen / Mods & Plugins (Releases & Support) / Re: [MOD] Multi-Lightboxes v1.03.1 on: December 02, 2007, 04:36:20 PM
thats ok for me.
another possibility would be:
Ablum: San Francisco erstellt von Serge Meier
means:
Lightbox: San Francisco created by Serge Meier

Thank you very mucht for your support!  Very Happy
75  4images Modifications / Modifikationen / Mods & Plugins (Releases & Support) / Re: [MOD] Multi-Lightboxes v1.03.1 on: December 02, 2007, 04:26:58 PM
YES - IT WORKS  Very Happy

Last question: what do I have to do if I dont want to show the user in brackets?
instead of
Album: San Franciso (Serge Meier)
new
Album: San Francisco

Thanks!
Pages: «« « 1 2 3 4 [5] 6 7 8 9 ... 31 » »»
Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.35 seconds with 18 queries.
Post your comments here