'.$value.'
';
}
$category_list .='require_once("./common.inc.php"); getget(); getpost(); $sql = "SELECT * FROM `product` WHERE `display` = 1 and `category_id` = ".$cid." order by `sorting`"; $result=mysql_query($sql); $count=mysql_num_rows($result); $list = ''; $count = 1; while($row=$db->fetch_array($result)){ $file = get_attachment("product", $row['id'], "photo1"); if ($file["file_name"] != "") { list($width, $height, $type, $attr) = getimagesize($file["path"].$file["file_name"]); if($height>$width){ $imgset = "width=80"; }else{ $imgset = "height=80"; } $photo = ''; } else { $photo = ''; } $list .='
'; $count++; } $sql2 = "SELECT * FROM `category` WHERE `id` = ".$cid; $result2=mysql_query($sql2); $row2=$db->fetch_array($result2); ?>