// include "src/news.php"; ?> |
|
|
|
|
|
|
|
|
$max = 250;
$sql = "
SELECT
car_bbs.no,
car_bbs.brandcode,
car_bbs.brandname,
car_bbs.year,
car_bbs.day,
car_bbs.price,
car_bbs.file1,
car_bbs.id,
car_bbs.consultant
FROM car_bbs
WHERE car_bbs.price > 0
AND car_bbs.file1 <> ''
AND car_bbs.woodae = 'Y'
AND car_bbs.consultant = 'Y'
AND id IN (SELECT U_ID
FROM member_table
)
LIMIT ".rand(1, $max).", 5
";
$rs = mysql_query($sql);
$t_record = mysql_num_rows($rs);
/* ¸Å¹°¼ö°¡ 5°³ ¹Ì¸¸ÀÏ °æ¿ì ÃÖ±Ù ¸ñ·Ï 5°³ */
if($t_record <5) {
$sql_0 = "
SELECT
car_bbs.no,
car_bbs.brandcode,
car_bbs.brandname,
car_bbs.year,
car_bbs.day,
car_bbs.price,
car_bbs.file1,
car_bbs.id,
car_bbs.consultant
FROM car_bbs
WHERE car_bbs.price > 0
AND car_bbs.file1 <> ''
AND car_bbs.woodae = 'Y'
AND car_bbs.consultant = 'Y'
AND id IN (SELECT U_ID
FROM member_table
)
LIMIT 5
";
$sql = $sql_0;
$rs = mysql_query($sql);
}
/* ¸Å¹°¼ö°¡ 5°³ ¹Ì¸¸ÀÏ °æ¿ì ÃÖ±Ù ¸ñ·Ï 5°³ end */
while($row_w=mysql_fetch_array($rs)) {
if($row_w["consultant"] == "Y") {
if($row_w["price"] > 0) {
$price = "".number_format($row_w["price"])."";
} else {
$price = "°¡°ÝÀýÃæ";
}
} else if($row_w["consultant"] == "N") {
$price = "ÆǸſϷá";
}
$file1 = $row_w[file1];
$file_date = substr($row_w["file1"],0,4)."/".substr($row_w["file1"],4,2)."/";
$new_img = "../DATA/640X480/".$file_date.$file1;
// 2004.09.02 Ãß°¡
if( is_file($middle_url.$file_date.eregi_replace("640X480","106X080",$file1)) ) {
//if($file1){
$new_img = "../DATA/106X080/".$file_date.eregi_replace("640X480","106X080",$file1);
} else {
$new_img = "../DATA/640X480/".$file_date.$file1;
}
$cut_name = $PARSE->str_cut2($row_w[brandname],12);
$p_year = substr($row_w["year"],2,4);
?>
|
}
?>
|
|