28 lines
813 B
PHP
28 lines
813 B
PHP
<?php
|
|
|
|
use phpcommon\SqlHelper;
|
|
class AnncController extends BaseController {
|
|
|
|
public function getAnnc()
|
|
{
|
|
$seconds = myself()->_getNowTime() - myself()->_getNowDaySeconds();
|
|
$data = array();
|
|
$row = myself()->_getConfDbMysql()->execQueryOne(
|
|
'SELECT * FROM t_game_annc WHERE :nowtime >= begin_date AND :nowtime <= end_date AND is_open = 1 AND :seconds >= begin_time AND :seconds <= end_time',
|
|
array(
|
|
':nowtime' => myself()->_getNowTime(),
|
|
':seconds' => $seconds,
|
|
)
|
|
);
|
|
if ($row){
|
|
$data = array(
|
|
'id' => $row['uniid'],
|
|
'title' => $row['title'],
|
|
'content' => $row['content']
|
|
);
|
|
}
|
|
myself()->_rspData($data);
|
|
}
|
|
|
|
}
|