Ankündigung

Einklappen
Keine Ankündigung bisher.

Blättern durch Datensätze

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Blättern durch Datensätze

    Hallo,

    ich suche dringend eine Funkton, mit der man durch eine Fotogalerie blättern kann.

    Das Problem ist, ich habe 3 Ebenen: Galerieübersicht, Fotoübersicht je Galerie und Detailansicht des Bildes.

    Ich möchte erreichen, dass man, wenn man auf ein Vorschaubild klickt, zur Großansicht gelangt, und dort genau an der Stelle, an der man vorher geklickt hat, weiterblättern bzw. zurückblättern kann.

    Ich bekomme das einfach nicht gebacken!

    Wäre nett, wenn mir jemand helfen könnte, vielen Dank schon mal...

    Gruß
    Hans

  • #2
    hmm ja ... ohne code vielleicht ein wenig schwer meinst nicht auch?
    mfg Floh

    Programmers don't die, they GOSUB without RETURN

    Kommentar


    • #3
      Code der beiden Seiten

      Hier die Datei, in der alle Fotos in einer Galerie angezeigt werden:

      Code:
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td height="450" align="center" valign="top">
      <?
      $mspwidth=round(100/$cfgfotgaldat[galfotueb_anzhorizontal]);
      if(empty($sprung))
      {
      $sprung=0;
      }
      $galnameres=mysql_query("select * from tbl_fot_galerie where id='$mgal'");
      $galnamedat=(mysql_fetch_array($galnameres));
      if ($cfgfotgaldat[galfotueb_sorter]=="Manuell")
      {
      $fotgalres=mysql_query("select * from tbl_fot_galerieinhalt where status='Ja' and fot_archiv='$mgal' order by sorter limit $sprung, $cfgfotgaldat[galfotueb_anzpage]");
      }
      if ($cfgfotgaldat[galfotueb_sorter]=="Datum") { $fotgalres=mysql_query("select * from tbl_fot_galerieinhalt where status='Ja' and fot_archiv='$mgal' order by date_insert limit $sprung, $cfgfotgaldat[galfotueb_anzpage]");
      }
      $eintrag=mysql_query($fotgalres);
      $ergebnis1=mysql_query("select * from tbl_fot_galerieinhalt where status='Ja' and fot_archiv='$mgal'");
      $ergeb1dat=mysql_fetch_array($ergebnis1);
      $spa=mysql_num_rows($ergebnis1);
      $anfang=($sprung+1);
      $ende=($sprung+$cfgfotgaldat[galfotueb_anzpage]);
      ?>
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td height="50" colspan="<? echo $cfgfotgaldat[galfotueb_anzhorizontal] ?>" align="center" valign="top"><font size="4" style="font-family: <? echo $cfgfotgaldat[galfotueb_textfont] ?>; color: <? echo $cfgfotgaldat[galfotueb_textcolor] ?>;"><? echo $galnamedat[arc_name] ?> (<? echo $spa ?> Bild(er)</font></td>
      </tr>
      <?
      if ($cfgfotgaldat[galfotueb_toptext]<>"")
      {
      ?>
      <tr>
      <td height="20" width="100%" align="center" valign="top"><font style="font-family: <? echo $cfgfotgaldat[galfotueb_textfont] ?>; font-size: <? echo $cfgfotgaldat[galfotueb_textsize] ?>; color: <? echo $cfgfotgaldat[galfotueb_textcolor] ?>; font-weight: <? echo $cfgfotgaldat[galfotueb_textweight] ?>;"><? echo $cfgfotgaldat[galfotueb_toptext] ?></font></td>
      </tr>
      <?
      }
      ?>
      </table>
      <?
      $gesanzahl=mysql_num_rows($fotgalres);
      $spaanzahl=floor($gesanzahl/$cfgfotgaldat[galfotueb_anzhorizontal]);
      if ($spaanzahl<($gesanzahl/$cfgfotgaldat[galfotueb_anzhorizontal]))
      {
      $spaanzahl=($spaanzahl+1);
      }
      if ($spa==0)
      {
      ?>
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td height="350" align="center" valign="middle"><font size="4" style="font-family: <? echo $cfgfotgaldat[galfotueb_textfont] ?>; color: <? echo $cfgfotgaldat[galfotueb_textcolor] ?>;">Derzeit befinden sich noch keine Bilder in dieser Galerie!</font></td>
      </tr>
      </table>
      <?
      }
      ?>
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <?
      for($ia=0;$ia<$spaanzahl;$ia++)
      {
      ?>
      <tr>
      <?
      for($ja=0;$ja<$cfgfotgaldat[galfotueb_anzhorizontal];$ja++)
      {
      $fotgaldat=(mysql_fetch_array($fotgalres));
      $dbxid=$fotgaldat[id];
      if(empty($dbxid))
      {
      ?>
      <td height="120" width="<? echo $mspwidth ?>%" align="center" valign="top"></td>
      <?
      }
      else
      {
      ?>
      <td height="120" align="center" valign="top" width="<? echo $mspwidth ?>">
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td align="center">
      <table width="100%" border="<? echo $cfgfotgaldat[galfotueb_border] ?>" bordercolor="<? echo $cfgfotgaldat[galfotueb_bordercolor] ?>" cellspacing="0" cellpadding="1">
      <tr>
      <td align="center" valign="middle">[img]<? echo $cfgsitedat[site_path] ?>/fotogalerie/vorschaubilder/<? echo $fotgaldat[fot_smalpic] ?>[/img]"></td>
      </tr>
      </table>
      <?
      if ($cfgfotgaldat[galfotueb_date]=="Ja")
      {
      ?>
      <font size="1" style="font-family: <? echo $cfgfotgaldat[galfotueb_textfont] ?>; color: <? echo $cfgfotgaldat[galfotueb_textcolor] ?>;">Datum: [ <? echo $fotgaldat[date_insert] ?> ]</font>
      <?
      }
      ?>
      </td>
      </tr>
      </table>
      </td>
      <? } } ?>
      </tr>
      <?
      }
      ?>
      </table>
      </td>
      </tr>
      <?
      if ($cfgfotgaldat[galfotueb_bottontext]<>"")
      {
      ?>
      <tr>
      <td height="20" width="100%" align="center" valign="top"><font style="font-family: <? echo $cfgfotgaldat[galfotueb_textfont] ?>; font-size: <? echo $cfgfotgaldat[galfotueb_textsize] ?>; color: <? echo $cfgfotgaldat[galfotueb_textcolor] ?>; font-weight: <? echo $cfgfotgaldat[galfotueb_textweight] ?>;"><? echo $cfgfotgaldat[galfotueb_bottontext] ?></font></td>
      </tr>
      <?
      }
      ?>
      </table>
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td height="50" width="10%" align="right" valign="middle"><? if($sprung>0) { $zurueck=$sprung-$cfgfotgaldat[galfotueb_anzpage]; if($zurueck<0) { $zurueck=0; } ?>/include/button-zurueck-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-zurueck-link.gif[/img]<? } else { ?>
      <? } ?></td>
      <td height="50" width="80%" align="center" valign="middle">/include/button-back-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-back-link.gif[/img]</td>
      <td height="50" width="10%" align="left" valign="middle"><? $seiten=intval($spa/$cfgfotgaldat[galfotueb_anzpage]); if($spa%$cfgfotgaldat[galfotueb_anzpage]) { $seiten++; } for($i=1;$i<=$seiten;$i++) { $fwd=($i-1)*$cfgfotgaldat[galfotueb_anzpage]; } if($sprung<$spa-$cfgfotgaldat[galfotueb_anzpage]) { $neusprung=$sprung+$cfgfotgaldat[galfotueb_anzpage]; ?>/include/button-weiter-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-weiter-link.gif[/img]<? } else { ?>
      <? } ?></td>
      </tr>
      </table>
      </td>
      </tr>
      </table>
      Hier die Datei, in der das Detailbild angezeigt wird:

      Code:
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td align="center" valign="top">
      <?
      $limit=1;
      if(empty($sprung1))
      {
      $sprung1=0;
      }
      $galnameres=mysql_query("select * from tbl_fot_galerie where id='$mgal'");
      $galnamedat=(mysql_fetch_array($galnameres));
      if ($cfgfotgaldat[galfotueb_sorter]=="Manuell")
      {
      $subcat="select * from tbl_fot_galerieinhalt where status='Ja' and fot_archiv='$mgal' order by sorter limit $sprung1, $limit";
      }
      if ($cfgfotgaldat[galfotueb_sorter]=="Datum")
      {
      $subcat="select * from tbl_fot_galerieinhalt where status='Ja' and fot_archiv='$mgal' order by date_insert limit $sprung1, $limit";
      }
      $eintrag=mysql_query($subcat);
      $ergebnis1=mysql_query("select * from tbl_fot_galerieinhalt where status='Ja'");
      $spa1=mysql_num_rows($ergebnis1);
      $anz1=mysql_num_rows($eintrag);
      $anfang=($sprung1+1);
      $ende=($sprung1+$limit);
      ?>
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td height="50" width="100%" align="center" valign="top"><font size="4" style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>;"><? echo $galnamedat[arc_name] ?> (<? echo $spa1 ?> Bild(er)</font></td>
      </tr>
      <?
      if ($cfgfotgaldat[galfotdet_toptext]<>"")
      {
      ?>
      <tr>
      <td height="20" width="100%" align="center" valign="top"><font style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; font-size: <? echo $cfgfotgaldat[galfotdet_textsize] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>; font-weight: <? echo $cfgfotgaldat[galfotdet_textweight] ?>;"><? echo $cfgfotgaldat[galfotdet_toptext] ?></font></td>
      </tr>
      <?
      }
      for($i=0;$i<$anz1;$i++)
      {
      $array=mysql_fetch_array($eintrag, MYSQL_ASSOC);
      ?>
      <tr>
      <td height="400" width="100%" align="center" valign="top">
      <table border="<? echo $cfgfotgaldat[galfotdet_border] ?>" bordercolor="<? echo $cfgfotgaldat[galfotdet_bordercolor] ?>" cellspacing="0" cellpadding="1">
      <tr>
      <td align="center" valign="top">[img]<? echo $cfgsitedat[site_path] ?>/fotogalerie/detailbilder/<? echo $array[fot_bigpic] ?>[/img]</td>
      </tr>
      </table>
      <font size="1" style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>;"><? if ($cfgfotgaldat[galfotdet_date]=="Ja") { ?>Datum: [ <? echo $array[date_insert] ?> ]<? } else { ?><? } ?><? if ($cfgfotgaldat[galfotdet_quelle]=="Ja") { ?> / Quelle: [ <? echo $array[galfotdet_quelle] ?> ]<? } else { ?><? } ?></font></td>
      </td>
      </tr>
      <?
      }
      if ($cfgfotgaldat[galfotueb_bottontext]<>"")
      {
      ?>
      <tr>
      <td height="20" width="100%" align="center" valign="top"><font style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; font-size: <? echo $cfgfotgaldat[galfotdet_textsize] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>; font-weight: <? echo $cfgfotgaldat[galfotdet_textweight] ?>;"><? echo $cfgfotgaldat[galfotdet_bottontext] ?></font></td>
      </tr>
      <?
      }
      ?>
      </table>
      <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
      <tr>
      <td height="50" width="10%" align="right" valign="middle"><? if($sprung1>0) { $zurueck1=$sprung1-$limit; if($zurueck1<0) { $zurueck1=0; } ?>/include/button-zurueck-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-zurueck-link.gif[/img]<? } else { ?>
      <? } ?></td>
      <td height="50" width="80%" align="center" valign="middle">/include/button-back-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-back-link.gif[/img]</td>
      <td height="50" width="10%" align="left" valign="middle"><? $seiten1=intval($spa1/$limit); if($spa1%$limit) { $seiten1++; } for($i=1;$i<=$seiten1;$i++) { $fwd1=($i-1)*$limit; } if($sprung1<$spa1-$limit) { $neusprung1=$sprung1+$limit; ?>/include/button-weiter-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-weiter-link.gif[/img]<? } else { ?>
      <? } ?></td>
      </tr>
      </table>
      </td>
      </tr>
      </table>

      Kommentar


      • #4
        icb bezweifel, dass den code jemand lesen kann bzw. will, bevor du ihn nicht einrückst.

        Kommentar


        • #5
          Neuer Code

          Hallo,

          ich habe den Code für die Detailseite jetzt formatiert. Er zeigt mir jetzt zwar das große Bild an, ich kann aber nicht blättern. Es erscheint nur der "Zurückbutton" und nicht der "Weiterbutton" und wenn ich klicke, dann tut sich gar nichts.

          Code:
          <?
          $galnameres=mysql_query("select * from tbl_fot_galerie where id='$mgal'");
          $galnamedat=(mysql_fetch_array($galnameres));
          $limit=1;
          if(empty($sprung1))
          {
            $sprung1=0;
          }
          //if ($cfgfotgaldat[galfotueb_sorter]=="Manuell")
          //{
          $subcat="select * from tbl_fot_galerieinhalt where galinh_status='Ja' and galinh_archiv='$mgal' order by galinh_sorter limit $sprung, $limit";
          //}
          //if ($cfgfotgaldat[galfotueb_sorter]=="Datum")
          //{
          //$subcat="select * from tbl_fot_galerieinhalt where galinh_status='Ja' and galinh_archiv='$mgal' order by date_insert limit $sprung, $limit";
          //}
          $eintrag=mysql_query($subcat);
          $galgesinh=mysql_query("select * from tbl_fot_galerieinhalt where galinh_status='Ja' and galinh_archiv='$mgal'");
          $spa1=mysql_num_rows($galgesinh);
          $anz1=mysql_num_rows($eintrag);
          $anfang1=($sprung1+1);
          $ende1=($sprung1+$limit);
          ?>
          <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td height="50" width="100%" align="center" valign="top"><font size="4" style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>;"><? echo $galnamedat[gal_name] ?> (<? echo $spa ?> Bild(er)</font></td>
            </tr>
          <?
          if ($cfgfotgaldat[galfotdet_toptext]<>"")
          {
          ?>
            <tr>
              <td height="20" width="100%" align="center" valign="top"><font style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; font-size: <? echo $cfgfotgaldat[galfotdet_textsize] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>; font-weight: <? echo $cfgfotgaldat[galfotdet_textweight] ?>;"><? echo $cfgfotgaldat[galfotdet_toptext] ?></font></td>
            </tr>
            <?
          }
          for($i=0;$i<$anz1;$i++)
          {
            $array=mysql_fetch_array($eintrag);
            ?>
            <tr>
              <td height="400" width="100%" align="center" valign="top">
                <table border="<? echo $cfgfotgaldat[galfotdet_border] ?>" bordercolor="<? echo $cfgfotgaldat[galfotdet_bordercolor] ?>" cellspacing="0" cellpadding="1">
                  <tr>
                    <td align="center" valign="top">[img]<? echo $cfgsitedat[site_path] ?>/fotogalerie/bilder/<? echo $array[galinh_bild] ?>[/img]</td>
                  </tr>
                </table>
                <font size="1" style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>;"><? if ($cfgfotgaldat[galfotdet_date]=="Ja") { ?>Datum: [ <? echo $array[date_insert] ?> ]<? } else { ?><? } ?><? if ($cfgfotgaldat[galfotdet_quelle]=="Ja") { ?> / Quelle: [ <? echo $array[galfotdet_quelle] ?> ]<? } else { ?><? } ?></font></td>
              </td>
            </tr>
            <?
            }
            if ($cfgfotgaldat[galfotueb_bottontext]<>"")
            {
            ?>
            <tr>
              <td height="20" width="100%" align="center" valign="top"><font style="font-family: <? echo $cfgfotgaldat[galfotdet_textfont] ?>; font-size: <? echo $cfgfotgaldat[galfotdet_textsize] ?>; color: <? echo $cfgfotgaldat[galfotdet_textcolor] ?>; font-weight: <? echo $cfgfotgaldat[galfotdet_textweight] ?>;"><? echo $cfgfotgaldat[galfotdet_bottontext] ?></font></td>
            </tr>
            <?
            }
            ?>
          </table>
          <table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td height="50" width="10%" align="right" valign="middle">
          	<?
          	if($sprung1>0)
          	{
          	  $zurueck1=$sprung1-$limit;
          	  if($zurueck1<0)
          	  {
          	    $zurueck1=0;
          	  }
          	  ?>
          	  /include/button-zurueck-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-zurueck-link.gif[/img]
          	  <?
          	  }
          	  else
          	  {
          	  ?>
          	    
          
          	  <?
          	  }
          	  ?>
          	  </td>
                <td height="50" width="80%" align="center" valign="middle">
          	  /include/button-back-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-back-link.gif[/img]
          	  </td>
                <td height="50" width="10%" align="left" valign="middle">
          	  <?
          	  $seiten1=intval($spa1/$limit);
          	  if($spa1%$limit)
          	  {
          	    $seiten1++;
                }
          	  for($i=1;$i<=$seiten1;$i++)
          	  {
          	    $fwd1=($i-1)*$limit;
          	  }
          	  if($sprung1<$spa1-$limit)
          	  {
          	    $neusprung1=$sprung1+$limit;
          	    ?>
          	    /include/button-weiter-over.gif','',0)" onMouseOut="MM_nbGroup('out')">[img]<? echo $cfgsitedat[site_path] ?>/include/button-weiter-link.gif[/img]
          		<?
          	  }
          	  else
          	  {
          		?>
          		
          
          		<?
          	  }
          	  ?>
          	</td>
            </tr>
          </table>
          Gruß
          Hans

          Kommentar

          Lädt...
          X