0){
$sFileName=$Fetch[0]["file"];
$book=$Fetch[0]["book"];
$type=$Fetch[0]["type"];
$thisFileName=basename(__FILE__);
?>
授权
0){
$query = "select * from 'album_power' where album_id='{$album_info[0]["id"]}'";
$Fetch = PDO_FetchAll($query);
?>
";
}
?>
章节
0 and level<9";
//查询章节标题文内容
$FetchText = PDO_FetchAll($query);
$iFetchText=count($FetchText);
if($iFetchText>0){
echo "
";
for($i=0;$i<$iFetchText;$i++){
$read_link="../pcdl/reader.php?book={$book}&album={$album_id}¶graph={$FetchText[$i]["paragraph"]}";
echo "- {$FetchText[$i]["title"]}
";
}
echo "
";
}
?>
beginTransaction();
$query="INSERT INTO album (id,
book,
guid,
title,
file,
cover,
language,
author,
tag,
summary,
create_time,
update_time,
version,
edition,
type,
owner) VALUES
(NULL,
'{$book}',
'{$album_guid}',
'{$title}',
'{$dbFileName}',
'',
'{$_slang[$lang]}',
'{$author}',
'{$tag}',
'{$summary}',
".time().",
".time().",
'1',
'{$edition}',
'{$type[$album_type]}',
'{$UID}')";
$stmt = @PDO_Execute($query);
$PDO->commit();
if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
$error = PDO_ErrorInfo();
echo "error - $error[2]";
}
else{
//获取刚刚插入的索引号
$album_index=$PDO->lastInsertId();
echo $album_index;
}
break;
case "get":
$db_file = _FILE_DB_RESRES_INDEX_;
PDO_Connect("sqlite:$db_file");
$query = "select * from 'album' where book='{$book}' and type='{$type[$album_type]}' and owner='{$UID}'";
$Fetch = PDO_FetchAll($query);
echo json_encode($Fetch,JSON_UNESCAPED_UNICODE);
break;
case "get_album":
if(isset($_GET["album_id"])){
$album_id=$_GET["album_id"];
}
if(isset($_GET["book"])){
$book=$_GET["book"];
}
if(isset($_GET["type"])){
$album_type=$_GET["type"];
}
$db_file = _FILE_DB_RESRES_INDEX_;
PDO_Connect("sqlite:$db_file");
$query = "select * from 'album' where id='{$album_id}'";
$Fetch = PDO_FetchAll($query);
$result=array();
if(count($Fetch)>0){//找到专辑
$result=array_merge($result,$Fetch);
}
//找本人相关专辑
$query = "select * from 'album' where id!='{$album_id}' and book='{$book}' and type='{$type[$album_type]}' and owner='{$UID}'";
$Fetch = PDO_FetchAll($query);
$result=array_merge($result,$Fetch);
echo json_encode($result,JSON_UNESCAPED_UNICODE);
break;
}
?>