Ich habe da ein Problem. In dem von mir verwendeten Modul Fotoalbum, wird eine Navigation der gesamten Bilder erzeugt, welche anschließend in einem iframe ausgegeben werden, soweit so gut. Doch aus irgend einem Grund, werden die URLs in der erzeugten Navigation falsch ausgegeben, denn anstatt dem Artikelnamen, wird in der URL die index_controller.php geschrieben.
Ich poste hier mal den Output von dem Modul, vielleicht kannst Du mir einen Tipp geben wie ich es anstellen kann, dass der Artikel und nicht die index_controller.php in der URL angegeben wird.
Code: Alles auswählen
<?php
/******************** editierbare variable ***************************/
$db_album = $cfg["tab"]["fotoalbum"];
$db_fotos = $cfg["tab"]["fotos"];
$upldir = "upload/galerie/";
//anzahl der angezeigten thumbnails
$fps = "14";
/*********************************************************************/
//fotoupdate
if ($Absenden = "Ändern") {
$sql_update = "UPDATE ".$cfg["tab"]["fotos"]." SET foto_pos='$foto_pos',foto_text='$foto_text' WHERE foto_id = '".$picture."'";
$db->query($sql_update);
}
//galerie finden
$dbA = new DB_contenido;
$sqlA = "SELECT * from $db_album WHERE idart = ".$idart;
$dbA = mysql_query($sqlA);
if (mysql_num_rows($dbA) != 1) {
$fehler = "Keine Fotogalerie gefunden";
} else {
$album = mysql_fetch_array($dbA);
$album_id = $album[album_id];
$img_dir = $upldir.$album[album_dir]."/";
$thm_dir = $img_dir."thm/";
}
if (!$fehler) {
$dbF = new DB_contenido;
$sqlF = "SELECT * from $db_fotos WHERE album_id = ".$album_id;
$dbF->query($sqlF);
if ($dbF->num_rows() < 1) {
$fehler = "Keine Fotos zu dieser Galerie gespeichert.";
} else {
$alle_fotos = $dbF->num_rows();
}
}
if ($fehler) {
exit ('<p style="color:red; font-weight: bold;">'.$fehler.'</span>');
}
//##########-Navigation-###########
[color=red]$meineseite=$auth->url();[/color]
$seiten = ceil($alle_fotos / $fps);
switch ($eintrag) { // das erste mal beim aufruf ist $eintrag undefiniert
case "";
$eintrag = "0"; // deswegen wertzuweisung 0
}
$max = ($eintrag + $fps);
if ($max > $alle_fotos) {
$last = $alle_fotos;
} else {
$last = $max;
}
//##########-Output-##########
$nav1 = "<tr><td align=center colspan=2 class=thubor bgcolor=#D8DED8><strong>";
$nav2 = "<tr><td align=center colspan=2 class=thubor bgcolor=#D8DED8><strong>";
if ($max >= $fps) {
$nav1 .= "Fotos ".($eintrag+1)."-".($last)." von ".$alle_fotos;
$nav2 .= 'Seite';
$currpage = ($max / $fps);
for ($i = 0; $i < $seiten; $i++) {
if (($i+1) == $currpage) {
$nav2 .= '</strong> | '.($i+1);
} else {
$nav2 .= '</strong> | <strong><a href="'[color=red].$meineseite.[/color]'&eintrag='.(($i)*$fps).'">'.($i+1).'</a></strong>';
}
}//end for
$nav2 .= ' |';
} else {
$nav1 .= "Fotos ".($eintrag+1)."-".($alle_fotos)." von ".$alle_fotos;
}
$nav1 .= "</strong></td></tr>";
$nav2 .= "</td></tr>";
//##########-HTML-Output-##########
echo '
<table width="512" border="0" cellspacing="0" cellpadding="0" style="padding:16px 0; margin-top:0px;">
<tr>
<td width="192" valign="top">
<table width="100%" border="0" cellspacing="16" cellpadding="0" class="fotos">
';
echo $nav1.'<tr>';
//ausgabe thumbnails
$dbF_limited = new DB_contenido;
$sqlF_limited = "SELECT * from $db_fotos WHERE album_id = ".$album_id." ORDER by foto_pos LIMIT ".$eintrag.",".$fps;
$dbF_limited->query($sqlF_limited);
$count = "0";
while ($dbF_limited->next_record()) {
$link = "idart=".$idart."&picture=".$dbF_limited->f("foto_id");
if ($contenido) { $link .= '&contenido='.$contenido; }
$img = $img_dir.$dbF_limited->f("filename");
$thumb = $thm_dir.$dbF_limited->f("filename");
echo '<td align="center"><a href="picture.php?'.$link.'" target="hauptbild"><img border=0 vspace=3 src="'.$thumb.'"></a></td>';
$count++;
if ($count == 2) {
echo '</tr><tr>';
$count = 0;
}
}
echo '</tr>'.$nav2.'
</table>
</td>
<td width="32"> </td>
<td width="320" align="right" valign="top">
<iframe style="margin-top:16px;" name="hauptbild" src="picture.php?client=1&lang=1&idcat='.$idcat.'&idart='.$idart;
if ($contenido) { echo '&contenido='.$contenido; }
if ($picture) { echo '&picture='.$picture; }
echo '" height="274" width="320" scrolling="no" border="0" frameborder="0" style="background:#eeeeee; padding:0px; margin-top:0px;">
</iframe>
</td>
</tr>
</table>
';
//##########-HTML-Output Ende-##########
?>