$GetSelfProgramName = "news";
$strSQL = "select the_no, the_date, the_name, content";
for($i = 1;$i <= 1;$i++){
$strSQL.= " , file" . $i . "_name";
$strSQL.= " , file" . $i . "_ext";
}
$strSQL.= " from " . $GetSelfProgramName;
$strSQL.= " where is_top = '2'";
$strSQL.= " order by the_date desc, the_no desc";
$strSQL.= " limit 0, 1";
//echo $strSQL;
$DBList = mysql_query( FixBig5( $strSQL ), $strDBLink );
$aryDB = SetQueryToArray($DBList);
$i = 0;
$intI = 1;
$strTargetFile = $strWorkFolder . $GetSelfProgramName . "/" . $aryDB[$i]["the_no"] . "_" . $intI . $aryDB[$i]["file". $intI ."_name"] . $aryDB[$i]["file" . $intI . "_ext"];
if ( file_exists( $strTargetFile ) ){
$strFile1 = "upload/" . $GetSelfProgramName . "/" . $aryDB[$i]["the_no"] . "_" . $intI . $aryDB[$i]["file". $intI ."_name"] . $aryDB[$i]["file". $intI ."_ext"];
}
else{
$strFile1 = "images/m/spacer.gif";
}
?>
|
|
|
$strSQL = "select the_no, the_date, the_name";
$strSQL.= " from " . $GetSelfProgramName;
$strSQL.= " where the_no <> " . $aryDB[$i]["the_no"];
$strSQL.= " order by the_date desc, the_no desc";
$strSQL.= " limit 0, 9";
//echo $strSQL;
$DBList = mysql_query( FixBig5( $strSQL ), $strDBLink );
$aryDB = SetQueryToArray($DBList);
$i = 0;
for($i = 0;$i < count($aryDB);$i++){
?>
|
}
?>
|