könnt sich mal kurz jemand mein Code anschauen was ich hier Falsch mache ???
Die Felder die Ihr seht funkltionieren alle und werden auch in die Template geschrieben. Mit der zusaätzlichen SQL oben (siehe Code) versuche ich anhand meiner BildId über die con_upl Tabelle die URL zusammenzu bauen.
Das Funktioniert auch allerding nur für ein Bild, vermutlich mache ich in meiner Schleife etwas falsch.
Code: Alles auswählen
for ($i=0; $i <= $anz; $i++)
{
if($_msg["hauptbild"][$i] != "") {
$sql_getArtPic = "SELECT * FROM con_upl WHERE idupl='".$_msg["hauptbild"][$i]."'"; //mein Case arras
$result_getArtPic = mysql_query($sql_getArtPic);
while($getArtPic = mysql_fetch_object($result_getArtPic))
{
$getPicName = $getArtPic->filename;
$getPicDir = $getArtPic->dirname;
$buildPicUri = $getPicDir.$getPicName; //Rest wird im Template zusammengebaut
$navmod_link ="front_content.php?client=".$client."?=".$lang."&idcat=".$idcat."&idart=".$_msg["idart"][$i]."";
#Build output for Template Engine || Module Templates
$tpl->set('d', 'sel_prio', $_msg["sel_prio"][$i]);
$tpl->set('d', 'online_ab', $_msg["online_ab"][$i]);
$tpl->set('d', 'offline_ab', $_msg["offline_ab"][$i]);
$tpl->set('d', 'hauptbild', $buildPicUri);
$tpl->set('d', 'vorsatz', $_msg["vorsatz"][$i]);
$tpl->set('d', 'haupttitel', urldecode($_msg["haupttitel"][$i]));
$tpl->set('d', 'untertitel', $_msg["untertitel"][$i]);
$tpl->set('d', 'nachsatz', $_msg["nachsatz"][$i]);
$tpl->set('d', 'terminzeile', $_msg["terminzeile"][$i]);
$tpl->set('d', 'description_1', urldecode($_msg["description_1"][$i]));
$tpl->set('d', 'description_2', urldecode($_msg["description_2"][$i]));
$tpl->next();
}
} else {
$navmod_link ="front_content.php?client=".$client."?=".$lang."&idcat=".$idcat."&idart=".$_msg["idart"][$i]."";
#Build output for Template Engine || Module Templates
$tpl->set('d', 'sel_prio', $_msg["sel_prio"][$i]);
$tpl->set('d', 'online_ab', $_msg["online_ab"][$i]);
$tpl->set('d', 'offline_ab', $_msg["offline_ab"][$i]);
$tpl->set('d', 'vorsatz', $_msg["vorsatz"][$i]);
$tpl->set('d', 'haupttitel', urldecode($_msg["haupttitel"][$i]));
$tpl->set('d', 'untertitel', $_msg["untertitel"][$i]);
$tpl->set('d', 'nachsatz', $_msg["nachsatz"][$i]);
$tpl->set('d', 'terminzeile', $_msg["terminzeile"][$i]);
$tpl->set('d', 'description_1', urldecode($_msg["description_1"][$i]));
$tpl->set('d', 'description_2', urldecode($_msg["description_2"][$i]));
$tpl->next();
}
}
$tpl->generate('templates/ART_msgListViewer_tpl.html');