dbprefix}content"; $category_title = ""; $category_keywords = ""; $category_description = ""; $category_content_image = ""; $mgs_the_loai = $jconf->msg_category; $category_page = $_GET["page"]; if($category_page == "" || $category_page == null){ $category_page = 1; } $category_count = 0; $database_menu = "{$jconf->dbprefix}menu"; $array_menu = array(); $sql = "SELECT * FROM `{$database_menu}` where deleteFlg = 0 order by sort"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($result)){ $array_menu[] = $row; if($row["category"] == $category){ $category_title = $row["category_title1"]; $category_keywords = $row["keywords"]; $category_description = $row["description"]; $category_content_image = $row["content_image"]; } } $count_array_new_category_sidebar = $jconf->count_array_new_category_sidebar; $count_array_new_category_group = $jconf->count_array_new_category_group; //カテゴリのページ数計算 $inputAnd = ""; if($category1_1_id != ""){ $inputAnd = " and category1_1_id = '{$category1_1_id}'"; } $sql = "SELECT count(stt) as count FROM `{$database_content}` where removeFlag = 0 and category = '{$category}' ".$inputAnd ; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($result)){ $category_count = $row['count']; } if($category_count == 0){ header("Location: {$jconf->siteUrl}"); } $category_page_start = ($category_page - 1)*$count_array_new_category_group ; if($category_page_start > $category_count){ $category_page_start = 0; } $sql = "SELECT category,category1_1,category1_1_id,content_url,title,content_image,description FROM `{$database_content}` where removeFlag = 0 and category = '{$category}' ".$inputAnd." order by updateTime desc limit ".$category_page_start.",".$count_array_new_category_group; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($result)){ $array_category_sort[] = $row; } if($category1_1_id != ""){ $category_title = $array_category_sort[0]["category1_1"]; } ?>