";
//author id
$query = "SELECT id from 'author' where name = '$word'";
$arr_author = PDO_FetchAll($query);
if (count($arr_author) > 0) {
$author_id = $arr_author[0]["id"];
}
//查album
$query = "SELECT count(*) from 'album' where author = '$author_id'";
$count = PDO_FetchOne($query);
if ($count > 0) {
$query = "SELECT * from 'album' where author = '$author_id' limit 0,10";
$Fetch = PDO_FetchAll($query);
$iFetch = count($Fetch);
if ($iFetch > 0) {
echo "
";
for ($i = 0; $i < $iFetch; $i++) {
$open_link = "onclick='index_render_res_list(" . $Fetch[$i]["book"] . "," . $Fetch[$i]["id"] . ",-1)'";
echo "
" . $Fetch[$i]["title"] . "
";
}
}
}
//查资源
$query = "SELECT count(*) from \""._TABLE_RES_INDEX_."\" where author = '$author_id'";
$count = PDO_FetchOne($query);
if ($count > 0) {
$query = "SELECT * from \""._TABLE_RES_INDEX_."\" where author = '$author_id' limit 0,10";
$Fetch = PDO_FetchAll($query);
$iFetch = count($Fetch);
if ($iFetch > 0) {
echo "
";
for ($i = 0; $i < $iFetch; $i++) {
$open_link = "onclick='index_render_res_list(" . $Fetch[$i]["book"] . "," . $Fetch[$i]["album"] . "," . $Fetch[$i]["paragraph"] . ")'";
echo "
" . $Fetch[$i]["title"] . "
";
}
}
}
echo "