game2006api/webapp/controller/AnncController.class.php
aozhiwei 2aad8ca948 1
2024-08-16 14:44:30 +08:00

29 lines
808 B
PHP

<?php
use phpcommon\SqlHelper;
class AnncController extends BaseController {
public function getAnnc()
{
// myself()->_rspData(require('../config/annc.php'));
$data = array();
$row = myself()->_getConfDbMysql()->execQueryOne(
'SELECT * FROM t_game_annc WHERE begin_date < :begin_date AND end_date > :end_date AND is_open = :is_open',
array(
':begin_date' => myself()->_getNowTime(),
':end_date' => myself()->_getNowTime(),
':is_open' => 1,
)
);
if ($row){
$data = array(
'id' => $row['uniid'],
'title' => $row['title'],
'content' => $row['content']
);
}
myself()->_rspData($data);
}
}