point
title

アーカイブ

eof; $cntx = 0; $ken = ($page-1)*6; if($element_06 <> ""){ $res = mysql_query("SELECT * from news_tbl where element_06 = $element_06 order by element_07 DESC limit 6 OFFSET $ken") or die(mysql_error()); } else{ $res = mysql_query("SELECT * from news_tbl order by element_07 DESC limit 6 OFFSET $ken") or die(mysql_error()); } while ($row = mysql_fetch_array($res)) { $key = $row["keyx"]; $element_01 = $row["element_01"]; $element_02 = $row["element_02"]; $element_03 = $row["element_03"]; $element_04 = $row["element_04"]; $element_05 = $row["element_05"]; $element_04 = html_entity_decode($element_04); $ymd = $element_01."年".$element_02."月".$element_03."日"; $element = $element_01."/".$element_02."/".$element_03; $element_05 = mb_strimwidth($element_05,0,41, "...", utf8); preg_match_all('//i', $element_04, $images); $element_04 = strip_tags($element_04); $element_04 = str_replace(array("\r\n","\r"), "", $element_04); $element_04 = str_replace(array(" ",""), "", $element_04); $element_04 = str_replace(array(" ",""), "", $element_04); $element_04 = mb_strimwidth($element_04,0,220, "...", utf8); if($images[1][0] == ""){ $url = "img/top/conts_img.png";} else{ $url = '"'.$images[1][0].'"'; $url = str_replace('../../', '', $url); $cntx++; } print<<

$ymd

$element_05

$element_04

eof; } print<< eof; //pager require_once("Pager/Pager.php"); //DBの行数を取得します if($element_06 == "" ){ $rs = mysql_query("SELECT * from news_tbl"); } else{ $rs = mysql_query("SELECT * from news_tbl where element_06 = $element_06"); } $rowcnt = mysql_num_rows($rs); function showPage($start,$cnt) { global $con; mysqli_query($con,_MY_CHARSET_); if($element_06 == ""){ $sql = "SELECT * from news_tbl order by element_07 DESC limit $start,$cnt;"; } else{ $sql = "SELECT * from news_tbl where element_06 = $element_06 order by element_07 DESC limit $start,$cnt;"; } $rs = mysqli_query($con,$sql); } $perPage=6; // 1ページに表示する行数 $params=array( 'perPage'=>$perPage, 'totalItems'=> $rowcnt, 'mode'=>'Sliding', //Jumping "delta"=>6, 'firstPagePre'=>'', 'altFirst'=>'first page', 'altLast'=>'last page', 'prevImg'=>' ', 'nextImg'=>' ', 'separator'=>'', 'firstPagePost'=>'', 'lastPagePre'=>'', 'lastPagePost'=>'' ); $p=Pager::factory($params); showPage(($p->getCurrentPageID()-1)*$perPage, $perPage); $navi=$p->getLinks(); echo "
"; print $navi['all']; echo "
"; eof; print<<
    eof; //アーカイブ $res = mysql_query("select element_01,element_02,element_06,count(*) from news_tbl GROUP BY element_06 desc") or die(mysql_error()); while ($row = mysql_fetch_array($res)) { $nen = $row[0]; $tuki = $row[1]; $element_06 = $row[2]; $achi = $row[3]; $ym = $nen."年".$tuki."月(".$achi.")"; print<<>$ym eof; } print<<
eof; ?>