include_once("common/dbconf.php");
include_once("common/common.php");
dbcon();
$p=abs($_REQUEST['p']);
if($p==""){$p=1;}
$pvol=20;
$sql="select * from `news` where `disp`=1;";
$res=mysql_query($sql,DB_HDL);
$num=mysql_num_rows($res);
$pcnt=ceil($num/$pvol);
if($p>$pcnt){$p=1;}
$p0=$p-1;
$pos=$p0*$pvol;
$sql="select * from `news` where `disp`=1 order by `head`,`date` desc,`juyo`,`ID` desc limit ".$pos.",".$pvol.";";
$res=mysql_query($sql,DB_HDL);
$num=mysql_num_rows($res);
if($num<1){
$loc="news.html?p=1";
header("Location: $loc");
}
$item=array();
while($row=mysql_fetch_array($res)){
$id=$row['ID'];
$title=stripslashes($row['title']);
$date=date('Y/m/d',$row['date']);
$juyo=$row['juyo'];
$dscr=$row['description'];
if($juyo!=1){$juyo=2;}
$item[]=array(
'id'=>$id,
'title'=>$title,
'date'=>$date,
'dscr'=>$dscr,
'juyo'=>$juyo,
);
}
header_mod();
?>
お知らせ | 片づけ・お掃除コンシェルン
日付 |
タイトル |
Warning: Undefined variable $item in /home/users/1/lolipop.jp-dp57306665/web/news.html on line 186
Warning: foreach() argument must be of type array|object, null given in /home/users/1/lolipop.jp-dp57306665/web/news.html on line 186
if($p>1){ ?>
← }else{ ?> } ?>
if($pcnt>1){ ?>
お知らせTOP }else{ ?> } ?>
if($pcnt>$p){ ?>
→ }else{ ?> } ?>
▲