Probleme mit Seite

  • Öhhm sieht so aus wie wenn dein Server kein PHP hätte...

    Farbenklau, Traditionsverkauf wo hört denn dieser Schwachsinn auf?
    Violett Weiss seit 1933

  • <?php
    /*
    ###english#######################################################
    # COPYRIGHT NOTICE:
    #
    # This program is freeware.
    #
    # You are allowed to use this script, to change it to your design.
    # The backlinks in the templates or in the selectbox must stay intakt.
    # It may be used and modified free of charge, so long as this copyright notice and
    # the header that give me credit remains intact.
    #
    # Selling the code for this program without prior written consent is
    # expressly forbidden. Obtain permission before redistributing this
    # program over the Internet or in any other medium. In all cases
    # copyright and header must remain intact.
    #
    # THIS SOFTWARE IS PROVIDED `AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
    # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    ###german#########################################################
    # Copyright Hinweis:
    #
    # Dieses Programm ist Freeware, es darf kostenlos benutzt werden, aber die Backlinks müssen funktionsfähig bleiben.
    # Weitere Infos finden Sie auf http://www.webYourPhotos.info
    #
    # Die Benutzung des Programmes erfolgt auf eigene Verantwortung. Für eventuelle Schäden wird keine Haftung übernommen.
    #
    # Die Copyrightrechte liegen bei Andreas Rebmann, Am Osthaag 24, D-74638 Waldenburg, webmaster@superphotos.info
    # http://www.webyourphotos.info
    */


    include('config.php');
    include('functions.php');

    $seite = max(intval($_GET[seite]),1);
    $letzte_komentare_html=''; $anzahl_coments=''; $anzahl_coments_text=''; $html_4_bilder='';

    // Farben:
    if ($color_inside == ""){ $color_inside = create_random_color() ; }

    $mysql_mylink = mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die ("Can not make the connection");
    mysql_select_db($mysql_db, $mysql_mylink) or die ("Can not connect to the database");
    // schauen wieviel sind da:
    $ordnen_nach = "cat_order,id";
    if($sort_index_page == "alpha"){ $ordnen_nach = "cat_Name,id"; }
    if($sort_index_page == "date"){ $ordnen_nach = "cat_order,id"; }
    if($sort_index_page == "date_ordner"){ $ordnen_nach = "id"; }
    if($sort_index_page_backwards) { $ordnen_nach .= " DESC"; }
    $start = ($seite-1) * $ordner_anzahl_pro_seite ;
    $result = mysql_query("SELECT id,cat_Name,cat_description,anzahl,gesamt,ober_ordner,unter_ordner,cat_photo FROM {$db_prefix}cats WHERE anzahl>'0' AND privat='no' ORDER BY $ordnen_nach LIMIT $start,$ordner_anzahl_pro_seite") OR die(mysql_error());
    if(mysql_num_rows($result)<1){
    if($user_duerfen_bilder_hochladen) {
    $result = mysql_query("SELECT id FROM {$db_prefix}cats WHERE cat_Name!='' LIMIT 1") OR die(mysql_error());
    if(mysql_num_rows($result)>0){ echo "


    <center><a href=foto_hochladen.php4>$text_71</a></center>"; }
    }
    echo "

    <center>Sorry - noch keine Bilder, oder Galerie noch nicht fertig eingerichtet!
    Sorry, there are no Pics, or the gallery is not jet ready installed

    Home</center>";
    exit;
    }
    // Anzahl aller Galerien errechnen:
    if(mysql_num_rows($result)==$ordner_anzahl_pro_seite){
    $result_anzahl_Ordner = mysql_query("SELECT id FROM {$db_prefix}cats WHERE anzahl>'0' AND privat='no'") OR die(mysql_error());
    $anz_galerien = mysql_num_rows($result_anzahl_Ordner) ;
    } else {
    $anz_galerien = (($seite-1) * $ordner_anzahl_pro_seite) + mysql_num_rows($result) ;
    }
    // Seitennavigation:
    $seite_max = ceil($anz_galerien / $ordner_anzahl_pro_seite);
    $seite_navi = '';
    if($seite_max > 1) {
    for($x=1;$x<=$seite_max;$x++){
    if($x==1) { $pagepart1 = ''; $pagepart2 = $text_27.' 1'; } else { $pagepart1 = '?seite='.$x; $pagepart2 = $x; }
    if($x==$seite) {
    if($x==1) { $seite_navi .= $text_27.' 1'; } else { $seite_navi .= ''.$pagepart2.''; }
    } else {
    $seite_navi .= ' '.$pagepart2.' ';
    }
    }
    }

    $ga = 0 ; $anz_galerien_angez = 0; $gallery_links = '';

    if($ordner_auf_index_seite_hirarchisch_anzeigen) { // wenn hirarchische Ansicht eingestellt
    $anz_galerien_anzeigen = 108 ; // max Anzahl Galerien
    $cat_array1 = array();$cat_array2 = array();$cat_array3 = array();$cat_array4 = array();
    $cat_nr = 0;
    $sql1 = "ober_ordner='0'";
    if($ordner_ebenen_auf_index>1) { $sql1 .= " OR ober_ordner2='0' "; }
    if($ordner_ebenen_auf_index>2) { $sql1 .= " OR ober_ordner3='0' "; }
    if($ordner_ebenen_auf_index>3) { $sql1 .= " OR ober_ordner4='0' "; }
    $result2 = mysql_query("SELECT id,cat_Name,cat_description,cat_order,anzahl,ober_ordner,ober_ordner2,ober_ordner3,ober_ordner4,cat_photo FROM {$db_prefix}cats WHERE ($sql1) AND anzahl>0 ORDER BY cat_Name LIMIT 250") OR die(mysql_error());
    if(mysql_num_rows($result2) > 0) {
    while ( $cats = mysql_fetch_array($result2) ) { // echo $cats['id'].'
    ';
    $id_soll_noch_gezeigt_werden[$cats['id']] = true;
    $ober_ordner_von_cat[$cats['id']] = $cats['ober_ordner'];
    $ober_ordner2_von_cat[$cats['id']] = $cats['ober_ordner2'];
    $ober_ordner3_von_cat[$cats['id']] = $cats['ober_ordner3'];
    if($cats['ober_ordner4']==$cat_nr) { $cat_array4[] = $cats['id']; $anz_oberordner4++; $einruecken = ' ';$format = '<span>';} // wenn die Einrückleerzeichen geändertw erden, dann muß auch weiter unten str_replace('&gt; ',... geändert werden.
    if($cats['ober_ordner3']==$cat_nr) { $cat_array3[] = $cats['id']; $anz_oberordner3++; $einruecken = ' ';$format = '<span>';}
    if($cats['ober_ordner2']==$cat_nr) { $cat_array2[] = $cats['id']; $anz_oberordner2++; $einruecken = ' ';$format = '<span>';}
    if($cats['ober_ordner'] ==$cat_nr) { $cat_array1[] = $cats['id']; $anz_oberordner++; $einruecken = ''; $format = '<span style="text-transform:uppercase;">'; }
    if(strlen($cats[cat_description])>124) { $cats[cat_description] = substr($cats[cat_description],0,122) . '..';}
    list($cat_bildchen_id,$cat_bildchen_w,$cat_bildchen_h,$cat_bildchen_url,$cat_bildchen_title) = explode("'",$cats[cat_photo]);
    if($auf_index_seite_1_bilder_pro_ordner) { $html_4_bilder = html_4_bilder($cat_bildchen_id); }
    if($local) { $cat_bildchen_url = str_replace('\\','/',$cat_bildchen_url); }
    if($mouseover_pic_vorschau) {
    $bild_w_mausi = $cat_bildchen_w ;
    $bild_h_mausi = $cat_bildchen_h ;
    $mausi_w = $bild_w_mausi + 6;
    if($mouseover_text) {
    if(stristr($cats[cat_Name],'&#')) { $mouseover_t = ''; } else { $mouseover_t = '
    '.$cats[cat_Name]; }
    } else { $mouseover_t = ''; }
    $mouseover = " onmouseover=\"this.T_WIDTH=$mausi_w; return escape('<img src=\'$cat_bildchen_url\' width=\'$bild_w_mausi\' height=\'$bild_h_mausi\'>$mouseover_t')\"";
    }
    // kann auch benutzt werden: $bildzeile[$cats['id']] = '<A HREF=vorschau.php?cat="' . $cats[id] . $url_part . '" CLASS="aThumbs"></A>'." \n";
    if ($cat_bildchen_h>$max_bildhoehe_des_galleriebildchen) { $cat_bildchen_w = round($cat_bildchen_w / $cat_bildchen_h * $max_bildhoehe_des_galleriebildchen); $cat_bildchen_h = $max_bildhoehe_des_galleriebildchen;}
    if($cats[anzahl]==1) { $anz_text = $cats[anzahl] . " " . $text_16.' '; } else { $anz_text = $cats[anzahl] . " " . $text_1; }
    $zeile[$cats['id']] = '<td class="subKatTabZelle"> . $url_part . '"]'.$einruecken.$format.$cats[cat_Name].'</span></td><TD VALIGN="MIDDLE" class="subKatTabZelle"> . $url_part . '"]'.$html_4_bilder.'</td><td align="right" class="subKatTabZelle">' . $anz_text . "</td></tr>\n" ;
    // mit Beschreibung: $zeile[$cats['id']] = '<TD VALIGN="MIDDLE" ALIGN="CENTER"> . $url_part . '"]</td><td> . $url_part . '"]'.$einruecken.$cats[cat_Name].'
    '.$einruecken . $cats[anzahl] . " " . $text_1 . '</td><td>'.$cats[cat_description]."</td></tr>\n" ;
    }
    // diejenigen, die einen leeren Oberordner der ersten Ebene haben:
    foreach($cat_array4 as $id) {
    if($id_soll_noch_gezeigt_werden[$id]&&($ober_ordner_von_cat[$id]>0)&&(!($id_soll_noch_gezeigt_werden[$ober_ordner_von_cat[$id]]))) {
    $ober_ordner_von_cat[$id] = $ober_ordner2_von_cat[$id];
    $zeile[$id] = str_replace('> ','>',$zeile[$id]);
    $cat_array3[] = $id;
    }
    }
    foreach($cat_array3 as $id) {
    if($id_soll_noch_gezeigt_werden[$id]&&($ober_ordner_von_cat[$id]>0)&&(!($id_soll_noch_gezeigt_werden[$ober_ordner_von_cat[$id]]))) {
    if($ober_ordner_von_cat[$id] != $ober_ordner2_von_cat[$id]) {
    $ober_ordner_von_cat[$id] = $ober_ordner2_von_cat[$id];
    } else {
    $ober_ordner_von_cat[$id] = $ober_ordner3_von_cat[$id];
    }
    $zeile[$id] = str_replace('> ','>',$zeile[$id]);
    $cat_array2[] = $id;
    }
    }
    foreach($cat_array2 as $id) {
    if($id_soll_noch_gezeigt_werden[$id]&&($ober_ordner_von_cat[$id]>0)&&(!($id_soll_noch_gezeigt_werden[$ober_ordner_von_cat[$id]]))) {
    if($ober_ordner_von_cat[$id] != $ober_ordner2_von_cat[$id]) {
    $ober_ordner_von_cat[$id] = $ober_ordner2_von_cat[$id];
    } else {
    $ober_ordner_von_cat[$id] = $ober_ordner3_von_cat[$id];
    }
    $zeile[$id] = str_replace('> ','>',$zeile[$id]);
    $cat_array1[] = $id;
    }
    }
    if($anz_oberordner>$anz_galerien_anzeigen) { $cat_array2=array();$cat_array3=array();$cat_array4=array(); } else {
    if($anz_oberordner+$anz_oberordner2>$anz_galerien_anzeigen) { $cat_array3=array();$cat_array4=array(); } else {
    if($anz_oberordner+$anz_oberordner3+$anz_oberordner2>$anz_galerien_anzeigen) { $cat_array4=array(); }
    }
    }
    foreach($cat_array1 as $id) {
    if($id_soll_noch_gezeigt_werden[$id]) {
    $ga++;
    $id_soll_noch_gezeigt_werden[$id] = false;
    if ($ga%2==0) { $sub_kategorien_liste .= '<tr class="subKatTabZeile1"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id]; } else { $sub_kategorien_liste .= '<tr class="subKatTabZeile2"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id]; }
    }
    foreach($cat_array2 as $id2) {
    if(($id_soll_noch_gezeigt_werden[$id2])&&($ober_ordner_von_cat[$id2]==$id)) {
    $ga++;
    $id_soll_noch_gezeigt_werden[$id2] = false;
    if ($ga%2==0) { $sub_kategorien_liste .= '<tr class="subKatTabZeile1"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id2]; } else { $sub_kategorien_liste .= '<tr class="subKatTabZeile2"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id2]; }
    }
    foreach($cat_array3 as $id3) {
    if(($id_soll_noch_gezeigt_werden[$id3])&&($ober_ordner_von_cat[$id3]==$id2)&&($ober_ordner_von_cat[$id2]==$id)) {
    $ga++;
    $id_soll_noch_gezeigt_werden[$id3] = false;
    if ($ga%2==0) { $sub_kategorien_liste .= '<tr class="subKatTabZeile1"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id3]; } else { $sub_kategorien_liste .= '<tr class="subKatTabZeile2"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id3]; }
    }
    foreach($cat_array4 as $id4) {
    if(($id_soll_noch_gezeigt_werden[$id4])&&($ober_ordner_von_cat[$id4]==$id3)&&($ober_ordner_von_cat[$id3]==$id2)&&($ober_ordner_von_cat[$id2]==$id)) {
    $ga++;
    $id_soll_noch_gezeigt_werden[$id4] = false;
    if ($ga%2==0) { $sub_kategorien_liste .= '<tr class="subKatTabZeile1"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id4]; } else { $sub_kategorien_liste .= '<tr class="subKatTabZeile2"'.$tr_effekt.'><td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id4]; }
    }
    }
    }
    }
    }
    }
    foreach(array_merge($cat_array2,$cat_array3,$cat_array4) as $id) { // diejenigen, die einen leeren Oberordner der ersten Ebene haben
    if($id_soll_noch_gezeigt_werden[$id]) {
    $ga++;
    $id_soll_noch_gezeigt_werden[$id] = false;
    // Wichtig: Wenn oben das Einrückzeichen geändert wird muß dies hier und weiter oben bei str_replace auch geschehen:
    $zeile[$id] = str_replace(' ','',$zeile[$id]);
    if ($ga%2==0) { $sub_kategorien_liste .= '<tr class="subKatTabZeile1"'.$tr_effekt.'>'; } else { $sub_kategorien_liste .= '<tr class="subKatTabZeile2"'.$tr_effekt.'>'; }
    $sub_kategorien_liste .= '<td align="right" class="subKatTabZelle"> ' . $ga . ' </td>'.$zeile[$id];
    }
    }
    $gallery_links = '<table border="0" cellspacing="0" cellpadding="3" class="subKatTab"><tr class="subKatTabZeile1"><td colspan="4">'.$text_91.':</td></tr>'.$sub_kategorien_liste.'</table>';
    if ($anz_galerien==0) { $gallery_links = ''; }
    } else { // also wenn keine hirarchische Tabelle:
    while ( $cats = mysql_fetch_array($result) ) {
    $anz_galerien_angez++;
    list($cat_bildchen_id,$cat_bildchen_w,$cat_bildchen_h,$cat_bildchen_url,$cat_bildchen_title) = explode("'",$cats[cat_photo]);
    if($auf_index_seite_5_bilder_pro_ordner) { $html_4_bilder = html_4_bilder($cat_bildchen_id); }
    if($local) { $cat_bildchen_url = str_replace('\\','/',$cat_bildchen_url); }
    $gal_name = $cats[cat_Name];
    if($mouseover_pic_vorschau) {
    $bild_w_mausi = $cat_bildchen_w ;
    $bild_h_mausi = $cat_bildchen_h ;
    $mausi_w = $bild_w_mausi + 6;
    if($mouseover_text) {
    if(stristr($cats[cat_Name],'&#')) { $mouseover_t = ''; } else { $mouseover_t = '
    '.$cats[cat_Name]; }
    } else { $mouseover_t = ''; }
    $mouseover = " onmouseover=\"this.T_WIDTH=$mausi_w; return escape('<img src=\'$cat_bildchen_url\' width=\'$bild_w_mausi\' height=\'$bild_h_mausi\'>$mouseover_t')\"";
    } else { $mouseover = ''; }
    if ($cat_bildchen_h>$max_bildhoehe_des_galleriebildchen) { $cat_bildchen_w = round($cat_bildchen_w / $cat_bildchen_h * $max_bildhoehe_des_galleriebildchen); $cat_bildchen_h = $max_bildhoehe_des_galleriebildchen;}
    if($cats[anzahl]==1) { $bild_anzahl = "1 ".$text_16 ; } else { $bild_anzahl = $cats[anzahl] . " " . $text_1 ; }
    $anzahl_bilder_all = $cats[gesamt];
    $vorschau_url = "vorschau.php?cat=".$cats[id].$url_part;
    // $vorschau_url = "javascript: diese_kategorie_ansehen('vorschau.php?cat=".$cats[id].$url_part."');"; wenn in neuem Fenster geöffnet werden soll ->es muß dann noch im js-template die diese_kategorie_ansehen - Funktion definiert werden
    if($anz_galerien_angez < 11) {
    $all_folders .= $gal_name . ", " ;
    $galerien_links_unten .= "$gal_name | " ;
    }
    $selectbox_options .= '<option value="'.$vorschau_url.'">'.substr($gal_name,0,52)."</option>" ;
    // der Hauptteil:
    if($gallerys_in_rows==0) {
    $gallery_links .= '[url=''.$vorschau_url.'']'.$gal_name."[/url] " . $bild_anzahl . "
    \n" ;
    } else {
    $ga++ ;
    if($ga == 1){$gallery_links .= "<tr>\n" ; }
    if($gallerys_in_rows==1) {$gallery_links .= '<TD VALIGN="MIDDLE">[url='' . $vorschau_url . ''][/url]'.$html_4_bilder.'</td><td>[url=''.$vorschau_url.'']'.$gal_name."[/url]
    " . $bild_anzahl . '</td><td>'.$cats[cat_description]."</td>\n" ;}
    if($gallerys_in_rows > 1) {$gallery_links .= '<TD VALIGN="MIDDLE" ALIGN="CENTER">[url='' . $vorschau_url . ''][/url]<br clear=all>[url=''.$vorschau_url.'']'.$gal_name."[/url]
    " . $bild_anzahl . "</td>\n" ;}
    if($ga == $gallerys_in_rows){$gallery_links .= "</tr>\n" ; $ga = 0; }
    }
    }
    if($gallerys_in_rows > 0) {
    if ($ga > 0) {
    $gallery_links .= str_repeat('<td></td>',$gallerys_in_rows-$ga);
    $gallery_links .= "</tr>\n" ;
    }
    $gallery_links = '<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">' . $gallery_links . "</table>\n" ;
    } else {
    $gallery_links = '<table border="0" cellspacing="0" cellpadding="0" align="center"><tr><td>' . $gallery_links . "</td></tr></table>\n" ;
    }
    $gallery_links = "<center>$anz_galerien $text_90 $seite_navi</center>
    " . $gallery_links . "
    <center>$seite_navi</center>";
    if(substr($all_folders,-2)==', ') { $all_folders = substr($all_folders,0,-2);}
    if(substr($galerien_links_unten,-3)==' | ') { $galerien_links_unten = substr($galerien_links_unten,0,-3);}
    }
    $selectbox_options .= $options_trenner . "<option value=\"$home\">$text_13</option>";
    if ($user_duerfen_bilder_hochladen) { $selectbox_options .= $options_trenner . '<option value="foto_hochladen.php4?cat=' . $cat_nr . '"> ' . $text_71 . "</option>\n" ; }
    if ($eigene_optionen!='') { $selectbox_options .= $options_trenner . $eigene_optionen; }
    if($mouseover_pic_vorschau) { $mausi_js = '<script language="JavaScript" type="text/javascript" src="templates/wz_tooltip.js"></script>'; } else { $mouseover = ''; $mausi_js = '';}


    // die letzten Kommentare:
    /* (Bitte ausklammern, falls die letzten Kommentare verwendet werden sollen. Man kann dann im index-template die Variable: $letzte_komentare_html einsetzen.)
    $anzahl_last_comments = 3 ;
    $anzahl_zeichen = 180 ; // Wieviele Zeichen im Kommentar - comments lenght
    $letzte_komentare_text = 'Die letzten Kommentare:';
    $letzte_komentare_html = '<table width="300" border="0" cellspacing="0" cellpadding="3" align="center">' ; // Überschrift etc..
    $anzahl_zeichen_max = 200;
    if($mouseover_pic_vorschau) { $mausi = 'Bild_Name,Bild_Name_W,Bild_Name_H,Medium_Bild,Medium_Bild_W,Medium_Bild_H,';} else { $mouseover = ''; $mausi = '';}
    $result_l = mysql_query("SELECT user,comment_text,photo_id FROM {$db_prefix}comments WHERE approved='1' ORDER BY id DESC LIMIT $anzahl_last_comments") OR die(mysql_error());
    while ( $comment = mysql_fetch_array($result_l) ) {
    $photo_id = $comment['photo_id'];
    $comment_text = text_bereinigen($comment['comment_text']);
    // kleines Bild holen:
    $result_foto = mysql_query("SELECT id,cat,title,".$mausi."Small_Bild,Small_Bild_W,Small_Bild_H FROM {$db_prefix}photos WHERE id='$photo_id' LIMIT 1") OR die(mysql_error());
    $foto = mysql_fetch_array($result_foto);
    $bild_url = $absoluter_pfad_zu_den_Bildern . 'bilder.php?foto='.$photo_id ;
    if ($foto[Small_Bild_W]>180) { $foto[Small_Bild_H] = round($foto[Small_Bild_H] / $foto[Small_Bild_W] * 180); $foto[Small_Bild_W] = 180;}
    if ($foto[Small_Bild_H]>180) { $foto[Small_Bild_W] = round($foto[Small_Bild_W] / $foto[Small_Bild_H] * 180); $foto[Small_Bild_H] = 180;}
    if($local) {
    $foto[Small_Bild] = str_replace('\\','/',$foto[Small_Bild]);
    if($mouseover_pic_vorschau) {
    $foto[Medium_Bild] = str_replace('\\','/',$foto[Medium_Bild]);
    $foto[Bild_Name] = str_replace('\\','/',$foto[Bild_Name]);
    }
    }
    if($mouseover_pic_vorschau) {
    if($foto[Medium_Bild_W] > 1) {
    $bild_url_mausi = $foto[Medium_Bild];
    $bild_w_mausi = $foto[Medium_Bild_W];
    $bild_h_mausi = $foto[Medium_Bild_H];
    } else {
    $bild_url_mausi = $foto[Bild_Name];
    $bild_w_mausi = $foto[Bild_Name_W];
    $bild_h_mausi = $foto[Bild_Name_H];
    }
    if($bild_w_mausi>$mouseover_max) { $bild_h_mausi = ($bild_h_mausi*$mouseover_max)/$bild_w_mausi; $bild_w_mausi = $mouseover_max; }
    if($bild_h_mausi>$mouseover_max) { $bild_w_mausi = ($bild_w_mausi*$mouseover_max)/$bild_h_mausi; $bild_h_mausi = $mouseover_max; }
    $mausi_w = $bild_w_mausi + 6;
    if($mouseover_text) { $mouseover_t = '
    '.$foto[title]; if(stristr($foto[title],'&#')) { $mouseover_t = ''; } } else { $mouseover_t = ''; }
    $mouseover = " onmouseover=\"this.T_WIDTH=$mausi_w; return escape('<img src=\'$bild_url_mausi\' width=\'$bild_w_mausi\' height=\'$bild_h_mausi\'>$mouseover_t')\"";
    }
    $letzte_komentare_html .= '<tr><td class="mittel">'.$letzte_komentare_text.'<hr>[url=''.$bild_url.''][/url]'.$comment_text.'</td></tr>' ;
    $letzte_komentare_text = '';
    }
    $letzte_komentare_html .= '</table>' ;
    // Anzahl aller Kommentare berechnen:
    $result_anzahl_coments = mysql_query("SELECT photo_id FROM {$db_prefix}comments WHERE approved='1'") OR die(mysql_error());
    $anzahl_coments = mysql_num_rows($result_anzahl_coments);
    $anzahl_coments_text = 'Es wurden bereits '.$anzahl_coments.' Kommentare geschrieben.
    '; */


    include("templates/template_index_".$template.".php");
    echo $html ;


    // Funktionen:
    function text_bereinigen($text) {
    GLOBAL $anzahl_zeichen,$anzahl_zeichen_max;
    $text = strip_tags($text);
    // $text = preg_replace("/\b[^ \/]{50,}\b/", " *** ",$text);
    $bis = max(@strpos($text,' ',$anzahl_zeichen_max),$anzahl_zeichen);
    $text = substr($text,0,$bis); // echo $text . $bis . "
    \n";
    return $text;
    }

    function html_4_bilder($id) {
    GLOBAL $sort, $db_prefix, $local, $sort_backwards, $max_bildhoehe_des_galleriebildchen, $url_part, $mouseover_pic_vorschau, $mouseover_text, $cat_bildchen_id ;
    $html_4 = '';
    $ist_schon_angezeigt[] = $cat_bildchen_id;
    $result = mysql_query("SELECT $sort FROM {$db_prefix}photos WHERE id='$id' LIMIT 1") OR die(mysql_error());
    $foto = mysql_fetch_array($result);
    if($local) { $foto[$sort] = str_replace('\\','/',$foto[$sort]); }
    if($sort_backwards) { list($next_id[4],$next_w[4],$next_h[4],$next_url[4],$next_title[4],$next_id[3],$next_w[3],$next_h[3],$next_url[3],$next_title[3],$next_id[2],$next_w[2],$next_h[2],$next_url[2],$next_title[2],$next_id[1],$next_w[1],$next_h[1],$next_url[1],$next_title[1]) = explode("'",$foto[$sort]); }
    else { list($next_id[1],$next_w[1],$next_h[1],$next_url[1],$next_title[1],$next_id[2],$next_w[2],$next_h[2],$next_url[2],$next_title[2],$next_id[3],$next_w[3],$next_h[3],$next_url[3],$next_title[3],$next_id[4],$next_w[4],$next_h[4],$next_url[4],$next_title[4]) = explode("'",$foto[$sort]); }
    $all_id = array(3,4,1,2);
    foreach($all_id as $a_id) {
    if ((!in_array($next_id[$a_id],$ist_schon_angezeigt))&&($next_url[$a_id]!='')&&($next_w[$a_id]>0)&&($next_h[$a_id]>0)) {
    $ist_schon_angezeigt[] = $next_id[$a_id];
    $BH1 = min($max_bildhoehe_des_galleriebildchen,$next_h[$a_id]);
    $w = @round($next_w[$a_id]/$next_h[$a_id]*$BH1);
    if($mouseover_pic_vorschau) {
    $mausi_w = $next_w[$a_id] + 6;
    if($mouseover_text) {
    if(stristr($next_title[$a_id],'&#')) { $mouseover_t = ''; } else { $mouseover_t = '
    '.$next_title[$a_id]; }
    } else { $mouseover_t = ''; }
    $mouseover = " onmouseover=\"this.T_WIDTH=$mausi_w; return escape('<img src=\'$next_url[$a_id]\' width=\'$next_w[$a_id]\' height=\'$next_h[$a_id]\'>$mouseover_t')\"";
    }
    $html_4 .= " " ;
    }
    }
    return $html_4;
    }
    ?>


    das ist der quelltext

  • isn privatserver vom kumpel... er hatte ja auch php und nu gehts einfach net mehr

    hat jemand nen anderes gutes galleryprog zur hand ? brauch nur ne albensortierfunktion haben, sonst nix besonderes..