Front.php
930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/FrontBase.php";?>
<?
if(!class_exists("Front")){
class Front extends FrontBase{
function __construct($req)
{
parent::__construct($req);
}
function wrapParam()
{
$this->req['page'] = ($this->req['page'] == "") ? 1 : $this->req['page'] ;
}
//공지사항 FAQ리스트
function getListOfNotice()
{
$noticeType = $this->req["notice_type"];
$lastNoticeNo = $this->req["last_notice_no"];
if($lastNoticeNo == "")
{
$limit = " LIMIT 0, 10 ";
}
else
{
$addWhere .= " AND no < '{$lastNoticeNo}' ";
}
$sql = "
SELECT
*,
CASE WHEN DATE_ADD(regist_dt, INTERVAL 1 DAY) > NOW() THEN '1' ELSE '0' END AS is_new
FROM tbl_notice
WHERE notice_type = '{$noticeType}' {$addWhere}
ORDER BY notice_no DESC
{$limit}
";
$list = $this->getArray($sql);
return $list;
}
}
}
?>