ячейки в таблице формируются в таком виде
images
2011-04/1302973461_1.png|||
2011-04/1302973492_12976696664d58de2245eac.jpg|||
2011-04/1302974063_1.png
titles
Картинка1|||
картинка2|||
Картинка3
if ($row['gallery'] == 1){
$row_3 = $db->super_query( "SELECT images, titles FROM " . PREFIX . "_gallery_images where news_id = '".$row['id']."' ORDER by images, titles, news_id DESC LIMIT 0,100" );
$listimages = explode( "|||", $row_3['images']);
if( $row_3['images'] != "")
foreach ($listimages as $dataimages){
$url_image = explode( "/", $dataimages );
if( count( $url_image ) == 2 ) {
$folder = $url_image[0] . "/";
$dataimages = $url_image[1];
} else {
$folder = "";
$dataimages = $url_image[0];
}
///////////////////////
$gallery .= "<li>
<a href=".$config['http_home_url']."uploads/gallery/".$folder.$dataimages." title=\"{}\">
<img src=".$config['http_home_url']."uploads/gallery/".$folder."thumbs/".$dataimages." alt=\"\" width=\"200\" height=\"139\" />
</a></li>\n";
////////////////////////////////////
}
}
$tpl->set('{gallery}', $gallery);
}else{
$tpl->set('{gallery}', "-------------------------");
}