フォトギャラリー
準備中です" ;
}
function cosmos_gallery($p=1,$listlimit=3) {
$r = "";
// global $pdo,$sitedata,$_POST,$_GET ;
// unset($r) ;
//
// //SQLを書く
// $offset = ( $p - 1 ) * $listlimit ;
//
// $offset = " OFFSET ".$offset ;
//
// $sql_all = "SELECT count(id) as id FROM tbl_gallery WHERE active = 1" ;
//
// $sql = "SELECT * FROM tbl_gallery WHERE active = 1 ORDER BY updatetime DESC,id DESC LIMIT ".$listlimit.$offset ;
//
// //一覧作成
//
// $rst = $pdo->query($sql) ;
//
// $group = 1;
//
// while($list = $rst->fetch(PDO::FETCH_ASSOC)){
//
// $targeturl = "/?aid=".$list['id'] ;
// if ($ct) $targeturl .= "&ct=".$ct ;
// if ($tag) $targeturl .= "&tag=".urlencode($tag) ;
// $targeturl .= "&p=".$p ;
//
// if ($list['listname']) $list['name'] = $list['listname'] ;
// if (!$list['listname'] and !$list['name']) $list['name'] = $list['newsname'] ;
// if ($ct == -1 and $list['newsname']) $list['name'] = $list['newsname'] ;
//
// //リストモード
//
// $listvalue .= "
";
// if($list['name']) {
// $listvalue .= "
" ;
//
// $group++ ;
//
// }
//
//
// //総数計算
// $rst = $pdo->query($sql_all) ;
// $col = $rst->fetch(PDO::FETCH_ASSOC) ;
// $total = $col['id'] ;
//
// //必要なページ数
// $lastpage = ceil($total / $listlimit) ;
//
// //一覧するデータがある場合
//
// if ($listvalue) {
//
// $r .= ""; // $listvalue .= strip_tags(mdk_2br($list['name'])) ; // $listvalue .= "
"; // } // // if($list['txt']) { // $listvalue .= ""; // $listvalue .= mdk_2br($list['txt']) ; // $listvalue .= "
"; // } // // // //写真一覧 // // $sqlp = "SELECT * FROM tbl_picture WHERE gallery = ".$list['id'] ; // $rstp = $pdo->query($sqlp) ; // // unset($picturevalue) ; // $i = 1; // // while($picture = $rstp->fetch(PDO::FETCH_ASSOC)){ // if ($picture['imagefile']) { // $picturevalue .= "" ; // } // } // // if ($picturevalue) { // $listvalue .= "" ;
// $listvalue .= $picturevalue ;
// $listvalue .= "
" ;
// }
//
//
// if ($list['url']) {
// $listvalue .= "" ; //// $listvalue .= "" ; // $listvalue .= "" ; // $listvalue .= "写真印刷の申込みはこちらからどうぞ" ; // $listvalue .= "" ; // $listvalue .= "
" ; // } // // $listvalue .= "" ;
//
// //一覧タイトル
//
// if ($category['displaytitle'] or $ct == -1 or $tag) {
// $r .= "" ;
//
// } else {
//
// if ($lastpage > 1) {
//
// //スタートとエンドを決める
//
// $pagermax = 10;
//
// //最終ページがボタンの最大数より小さい場合
// if($lastpage <= $pagermax) {
//
// $start = 1;
// $end = $lastpage;
//
// } else {
//
// if ($p > intval($pagermax/2)) {
// $start = $p - intval($pagermax/2) ;
// if ($start <= 0) $start = 1 ;
// $end = $start + $pagermax -1 ;
// } else {
// $start = 1;
// $end = $pagermax;
// }
//
// if ($end > $lastpage) {
// $end = $lastpage ;
// $start = $end - $pagermax +1;
// }
//
// }
//
// $r .= "" ;
//
// }
//
// }
//
// $r .= "
" ;
//
// }
return $r ;
}
?>
".$category['listtitle']."
" ; // } // // //一覧 // // $r .= $listvalue ; // // //ページャー // // if ($home) { // // if (!$sitedata['listtitlemore']) $sitedata['listtitlemore'] = $sitedata['listtitle']."一覧" ; // // $r .= "- " ;
//
// $r .= "
- ".$sitedata['listtitlemore']." " ; // // $r .= "