require('../_func/wea.all.php'); $open_DB =new DB; $data_DB =new DB; $open_DB -> connect(); $open_DB -> query('set names utf8'); $id = isset($_REQUEST['id'])? $_REQUEST['id']:'2'; $cat = isset($_GET['cat'])?$_GET['cat']:'top'; $open_DB->query($query); $tablename = "wea_prayers"; $query = "select count(id) from wea_prayers where id > 0 and cat = '".$cat."'"; $Pages = new Page($open_DB,$query,3,5); $Pages -> where = ""; $startnum = $Pages -> startlimit; $endnum = $Pages -> endlimit; $limitnum = $Pages -> limitlist; $query = "select * from wea_prayers where cat= '".$cat."' order by id DESC LIMIT $startnum ,$limitnum "; $open_DB->query($query); while($lists[] = $open_DB -> fetch()){ } $lists = array_filter($lists); if($cat =='top'){ $subtitle = 'Top Prayers'; }elseif($cat =='idop'){ $subtitle = 'IDOP for the presecuted Church'; }elseif($cat =='global'){ $subtitle = 'Global Day of Prayer'; }else{ $subtitle = 'Ethne'; } ?>