|
include ("personal.php"); ?>
$sql = "SET NAMES big5";
if ($stmt = $db->prepare($sql)) {
$stmt->execute();
}
$sql = "select book_id,book_name,book_summary,book_data from agribiz_book where published = 'Y' order by book_id desc";
if ($stmt = $db->prepare($sql)) {
#$stmt->bind_param("i", $book_id);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows > 0) {
$stmt->bind_result($book_id,$book_name,$book_summary,$book_data);
while ($stmt->fetch()) {
if ($book_data != "") $dataFile = "efile/".$book_data;
else $dataFile = "#";
//取出手冊圖片資訊
$db2 = new mysqli($host,$user,$pass,$database);
$sql = "SET NAMES big5";
if ($stmt2 = $db2->prepare($sql)) {
$stmt2->execute();
}
$sql2 = "select pic,pic_sub,pos from agribiz_graphs where parent_type = ? and parent_id = ? order by pos";
if ($stmt2 = $db2->prepare($sql2)) {
$stmt2->bind_param("si", $parent_type,$book_id);
$stmt2->execute();
$stmt2->bind_result($pic,$pic_sub,$pos);
$existPic2 = array();
$existPic2Sub = array();
while($stmt2->fetch()) {
$existPic2[$pos] = $pic;
$existPic2Sub[$pos] = $pic_sub;
}
$stmt2->close();
}
?>
我要下載
|
for ($i=1;$i<=count($existPic2);$i++) {
if ($i % 4 == 1) echo "";
?>
|
if ($i % 4 == 0) echo " ";
if ($i % 4 == 1 && $i == count($existPic2)) echo " | ";
if ($i % 4 == 2 && $i == count($existPic2)) echo " | ";
if ($i % 4 == 3 && $i == count($existPic2)) echo " | ";
}
?>
|
|
版主的話: |
|
}
}
}
?>
|
|
include ("right.php"); ?>
|
|