- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
<?
include "config/bd.php";
$myrow22 = mysql_query("select * from `content` where id_content=3");
$row22 = mysql_fetch_array($myrow22);
include "includes/head1.php";
include "includes/leftm.php";
$category_id = isset($_GET['category_id']) ? (int)$_GET['category_id'] : 1;
$myrow = mysql_query("SELECT * FROM `gallery` LEFT JOIN `gallery_files` `gf` ON `gallery`.id = gallery_id WHERE category_id = " . $category_id . " ORDER BY `gf`.id");
$items = array();
$photos = array();
while($row = mysql_fetch_array($myrow)) {
$items[ $row['gallery_id']] = $row;
$photos[ $row['gallery_id']][] = $row['filename'];
}
echo '<div id=content>
<p><table width=100% >
<tr>';
$i = 0;
foreach ($items as $id => $item) {
$i++;
echo '<td>';
$photo = array_shift($photos[$id]); // только первая картинка
echo '<a href="infokuhni.php?id=' . $item['gallery_id'] . '" ><img src="./uploads/resized_' . $photo . '" /><br/><br/>';
echo '<font face="Georgia, Times New Roman, Times, serif">'; echo $item['title'] . '</font><br/>';
echo '<font face="Times New Roman, Times, serif">Цена: '; echo $item['price'] . ' рублей</font></a><br/><br>';
echo '</td>';
if (!($i % 4)) echo '</tr><tr>';
}
echo '</tr>
</table>
<p></div>';
include "includes/foot.php";
?>
nolka4 15.02.2012 21:03 # 0
3_dar 08.09.2016 23:05 # 0
barop 08.09.2016 23:06 # 0
там и в 2020м такой будут писать
bagor 09.09.2016 00:12 # 0
govnokod-observer 16.02.2012 09:16 # 0