本文整理汇总了PHP中dgmdate函数的典型用法代码示例。如果您正苦于以下问题:PHP dgmdate函数的具体用法?PHP dgmdate怎么用?PHP dgmdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dgmdate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _init_global
static function _init_global()
{
global $_G;
include_once ROOT_PATH . 'inc/config/db.config.php';
$_G = array('uid' => 0, 'adminid' => 0, 'siteurl' => 'http://' . $_SERVER['HTTP_HOST'] . '/', 'clientip' => get_client_ip(), 'referer' => $_SERVER['HTTP_REFERER'], 'host' => $_SERVER['HTTP_HOST'], 'domain' => $_SERVER['HTTP_HOST'], 'username' => '', 'is_show' => false, 'cpmsg' => false, 'login_img' => '', 'cache_type' => 'auto', 'today' => dgmdate(TIMESTAMP, 'd'), 'dateline' => dgmdate(TIMESTAMP, 'dt'), 'authkey' => $_config[authkey], 'inajax' => intval($_GET['inajax']) > 0 ? true : false, 'id' => isset($_GET['id']) && $_GET['id'] > 0 ? intval($_GET['id']) : 0, 'aid' => isset($_GET['aid']) && $_GET['aid'] > 0 ? intval($_GET['aid']) : 0, 'fid' => isset($_GET['fid']) && $_GET['fid'] > 0 ? intval($_GET['fid']) : 0, 'cate' => $_GET['cate'] > 0 ? intval($_GET['cate']) : 0, 'page' => $_GET['page'] > 0 ? intval($_GET['page']) : 1, 'page_end' => '', 'qq_zone' => 0, 'mobile' => false, 'pad' => false, '_config' => $_config, 'goods_sql' => array(), 'memory_list' => array(), 'goods_cache' => array(), 'member' => array(), 'user' => array(), 'setting' => array(), 'api_list' => array(), 'channel' => array(), 'channels' => array(), 'friend_link' => array(), 'goods' => array(), 'pics_type' => array(), 'pics' => array(), 'ad' => array(), 'table' => array(), 'showpage' => '', 'keywords' => '', 'description' => '', 'TOP' => NULL);
if (DEBUG) {
$_G['starttime'] = microtime(true);
$_G['runtime'] = 0;
}
//缓存类型
$cache = $_config['cache_type'];
if ($cache == 'auto') {
if (TAE) {
$cache = 'baichuan';
} else {
if (class_exists('Memcache')) {
$cache = 'memcache';
} else {
$cache = 'file';
}
}
}
$_G['cache_type'] = $cache;
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
$_G[inajax] = 1;
}
$_G['siteurl'] = get_siteurl();
$_G['siteurl2'] = $_G['siteurl'];
//$host = explode('.',$_G[host]);
//$len = count($host)-2;
//$_G[domain] = $host[$len] .'.'. end($host);
unset($_config);
}
示例2: viewthread_sidetop_output
function viewthread_sidetop_output($a)
{
//var_dump($a);
global $_G, $postlist;
if ($a["template"] == "viewthread") {
$aid = $_G['forum_thread']['authorid'];
$return = array();
$tid = $_G['tid'];
if ($postlist && $aid) {
foreach ($postlist as $value) {
if ($value['first']) {
$amu_query = DB::fetch_first("SELECT * FROM " . DB::table("plugin_dsuampper") . " WHERE uid= '{$aid}'");
if ($amu_query) {
$today = $this->vars['today'];
$lasttime = dgmdate($query['lasttime'], 'Ymd', $this->vars['offset']);
}
if (!$amu_query['addup'] || $today != $lasttime) {
$addup = $amu_query['addup'] ? $amu_query['addup'] : 0;
$return[0] = '<dl class="pil cl"><dt><a href="plugin.php?id=dsu_amupper:list" target="_blank" class="xi2">' . lang('plugin/dsu_amupper', 'vw') . '</a></dt><dd>' . $addup . '</dd></dl>';
}
if ($amu_query && $today == $lasttime) {
$addup = $amu_query['addup'] ? $amu_query['addup'] : 0;
$return[0] = '<dl class="pil cl"><dt><a href="plugin.php?id=dsu_amupper:list" target="_blank" class="xi2">' . lang('plugin/dsu_amupper', 'vw') . '</a></dt><dd><b>' . $addup . '</b></dd></dl>';
}
}
}
}
} else {
$return = array();
}
return $return;
}
示例3: usesubmit
function usesubmit()
{
global $_G;
if (empty($_G['gp_tid'])) {
showmessage(lang('magic/sofa', 'sofa_info_nonexistence'));
}
$thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'dateline', 'subject'));
$this->_check($thread);
$firstsofa = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_threadmod') . " WHERE magicid='" . $this->magic['magicid'] . "' AND tid='{$_G['gp_tid']}'");
if ($firstsofa >= 1) {
showmessage(lang('magic/sofa', 'sofa_info_sofaexistence'), '', array(), array('login' => 1));
}
$sofamessage = lang('magic/sofa', 'sofa_text', array('actor' => $_G['member']['username'], 'time' => dgmdate(TIMESTAMP), 'magicname' => $this->magic['name']));
$dateline = $thread['dateline'] + 1;
insertpost(array('fid' => $thread['fid'], 'tid' => $_G['gp_tid'], 'first' => '0', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'dateline' => $dateline, 'message' => $sofamessage, 'useip' => $_G['clientip'], 'usesig' => '1'));
DB::query("UPDATE " . DB::table('forum_thread') . " SET replies=replies+1, moderated='1' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
DB::query("UPDATE " . DB::table('forum_forum') . " SET posts=posts+1, todayposts=todayposts+1 WHERE fid='{$post['fid']}'", 'UNBUFFERED');
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid']);
if ($thread['authorid'] != $_G['uid']) {
notification_add($thread['authorid'], 'magic', lang('magic/sofa', 'sofa_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
}
showmessage(lang('magic/sofa', 'sofa_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
}
示例4: output
function output()
{
global $_G;
$noticelang = lang('notification', 'reppost_noticeauthor');
$noticepreg = '/^' . str_replace(array('\\{actor\\}', '\\{subject\\}', '\\{tid\\}', '\\{pid\\}'), array('(.+?)', '(.+?)', '(\\d+)', '(\\d+)'), preg_quote($noticelang, '/')) . '$/';
$actorlang = '<a href="home.php?mod=space&uid={actoruid}">{actorusername}</a>';
$actorpreg = '/^' . str_replace(array('\\{actoruid\\}', '\\{actorusername\\}'), array('(\\d+)', '(.+?)'), preg_quote($actorlang, '/')) . '$/';
foreach ($GLOBALS['list'] as $_k => $_v) {
if (preg_match($noticepreg, $_v['note'], $_r)) {
list(, $actor, $tid, $pid, $subject) = $_r;
if (preg_match($actorpreg, $actor, $_r)) {
list(, $actoruid, $actorusername) = $_r;
}
//取出回帖的内容
include_once libfile('function/forum');
require_once libfile('function/discuzcode');
loadforum(null, $tid);
if ($pid) {
$postlist = $this->post = get_post_by_pid($pid, 'message');
$GLOBALS['list'][$_k]['message'] = discuzcode($postlist['message']);
}
$GLOBALS['list'][$_k]['dateline'] = dgmdate($GLOBALS['list'][$_k]['dateline']);
$GLOBALS['list'][$_k]['dbdateline'] = $GLOBALS['list'][$_k]['dateline'];
$GLOBALS['list'][$_k]['notevar'] = array('tid' => $tid, 'pid' => $pid, 'subject' => $subject, 'actoruid' => $actoruid, 'actorusername' => $actorusername);
}
}
$variable = array('hash' => md5(substr(md5($_G['config']['security']['authkey']), 8) . $_G['uid']), 'list' => mobile_core::getvalues(array_values($GLOBALS['list']), array('/^\\d+$/'), array('id', 'uid', 'type', 'new', 'authorid', 'author', 'note', 'dateline', 'from_id', 'from_idtype', 'from_num', 'style', 'rowid', 'notevar', 'message')), 'count' => $GLOBALS['count'], 'perpage' => $GLOBALS['perpage'], 'page' => intval($GLOBALS['page']));
mobile_core::result(mobile_core::variable($variable));
}
示例5: build_cache_forumrecommend
function build_cache_forumrecommend()
{
$data = array();
$fids = C::t('forum_forum')->fetch_all_fids();
foreach ($fids as $row) {
require_once libfile('function/group');
$recommendlist = C::t('forum_forum')->fetch_all_recommend_by_fid($row['fid']);
foreach ($recommendlist as $info) {
$group = array('fid' => $info['fid'], 'name' => $info['name'], 'threads' => $info['threads'], 'lastpost' => $info['lastpost'], 'icon' => $info['icon'], 'membernum' => $info['membernum'], 'description' => $info['description']);
$group['icon'] = get_groupimg($group['icon'], 'icon');
$lastpost = array(0, 0, '', '');
$group['lastpost'] = is_string($group['lastpost']) ? explode("\t", $group['lastpost']) : $group['lastpost'];
$group['lastpost'] = count($group['lastpost']) != 4 ? $lastpost : $group['lastpost'];
list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = $group['lastpost'];
if ($lastpost['tid']) {
$lastpost['dateline'] = dgmdate($lastpost['dateline'], 'Y-m-d H:i:s');
if ($lastpost['author']) {
$lastpost['encode_author'] = rawurlencode($lastpost['author']);
}
$group['lastpost'] = $lastpost;
} else {
$group['lastpost'] = '';
}
$data[$row['fid']][] = $group;
}
}
savecache('forumrecommend', $data);
}
示例6: global_header_mobile
function global_header_mobile()
{
global $_G, $show_message;
function dsu_signtz()
{
dheader('Location: plugin.php?id=dsu_paulsign:sign&mobile=yes');
}
$var = $_G['cache']['plugin']['dsu_paulsign'];
if (defined('IN_dsu_paulsign') || $show_message || defined('IN_dsu_paulsc') || !$_G['uid'] || !$var['ifopen'] || !$var['wap_sign']) {
return '';
}
$tdtime = gmmktime(0, 0, 0, dgmdate($_G['timestamp'], 'n', $var['tos']), dgmdate($_G['timestamp'], 'j', $var['tos']), dgmdate($_G['timestamp'], 'Y', $var['tos'])) - $var['tos'] * 3600;
$allowmem = memory('check');
if ($var['ftopen'] && in_array($_G['groupid'], unserialize($var['tzgroupid'])) && !in_array($_G['uid'], explode(",", $var['ban'])) && in_array($_G['groupid'], unserialize($var['groups']))) {
if ($allowmem && $var['mcacheopen']) {
$signtime = memory('get', 'dsu_pualsign_' . $_G['uid']);
}
if (!$signtime) {
$qiandaodb = DB::fetch_first("SELECT time FROM " . DB::table('dsu_paulsign') . " WHERE uid='{$_G['uid']}'");
$signtime = $qiandaodb['time'];
$htime = dgmdate($_G['timestamp'], 'H', $var['tos']);
if ($qiandaodb) {
if ($allowmem && $var['mcacheopen']) {
memory('set', 'dsu_pualsign_' . $_G['uid'], $qiandaodb['time'], 86400);
}
if ($qiandaodb['time'] < $tdtime) {
if ($var['timeopen']) {
if (!($htime < $var['stime']) && !($htime > $var['ftime'])) {
return dsu_signtz();
}
} else {
return dsu_signtz();
}
}
} else {
$ttps = DB::fetch_first("SELECT posts FROM " . DB::table('common_member_count') . " WHERE uid='{$_G['uid']}'");
if ($var['mintdpost'] <= $ttps['posts']) {
if ($var['timeopen']) {
if (!($htime < $var['stime']) && !($htime > $var['ftime'])) {
return dsu_signtz();
}
} else {
return dsu_signtz();
}
}
}
} else {
if ($signtime < $tdtime) {
if ($var['timeopen']) {
if (!($htime < $var['stime']) && !($htime > $var['ftime'])) {
return dsu_signtz();
}
} else {
return dsu_signtz();
}
}
}
}
return '<a href="plugin.php?id=dsu_paulsign:sign">' . lang('plugin/dsu_paulsign', 'name') . '</a>';
}
示例7: _getAnnouncementInfo
private function _getAnnouncementInfo($res, $id)
{
global $_G;
require_once libfile('function/discuzcode');
$announce = DzForumAnnouncement::getAnnouncementByUid($id);
if (!count($announce)) {
$res = $this->makeErrorInfo($res, 'announcement_nonexistence');
} else {
$tempAnnounce = array();
$tempAnnounce['author'] = $announce['author'];
$tmp = explode('.', dgmdate($announce['starttime'], 'Y.m'));
$months[$tmp[0] . $tmp[1]] = $tmp;
if (!empty($_GET['m']) && $_GET['m'] != dgmdate($announce['starttime'], 'Ym')) {
continue;
}
$tempAnnounce['starttime'] = dgmdate($announce['starttime'], 'd');
$tempAnnounce['endtime'] = $announce['endtime'] ? dgmdate($announce['endtime'], 'd') : '';
$tempAnnounce['title'] = WebUtils::emptyHtml($announce['subject']);
$uid = DzCommonMember::getUidByUsername($announce['author']);
$tempAnnounce['icon'] = UserUtils::getUserAvatar($uid);
$announceMessage = $announce['type'] == 1 ? "{$announce[message]}" : $announceMessage;
$announceMessage = nl2br(discuzcode($announce['message'], 0, 0, 1, 1, 1, 1, 1));
$announceType = array();
$announceType['infor'] = WebUtils::emptyHtml($announceMessage);
$announce['type'] == 1 ? $announceType['type'] = 'url' : ($announceType['type'] = 'text');
$tempAnnounce['content'] = $announceType;
$res['body']['list'] = $tempAnnounce;
}
return $res;
}
示例8: fetch_all_will_birthday_by_uid
public function fetch_all_will_birthday_by_uid($uids)
{
$birthlist = array();
if (!empty($uids)) {
$uids = explode(',', (string) $uids);
$uids = dimplode(dintval($uids, true));
list($s_month, $s_day) = explode('-', dgmdate(TIMESTAMP - 3600 * 24 * 3, 'n-j'));
list($n_month, $n_day) = explode('-', dgmdate(TIMESTAMP, 'n-j'));
list($e_month, $e_day) = explode('-', dgmdate(TIMESTAMP + 3600 * 24 * 7, 'n-j'));
if ($e_month == $s_month) {
$wheresql = "sf.birthmonth='{$s_month}' AND sf.birthday>='{$s_day}' AND sf.birthday<='{$e_day}'";
} else {
$wheresql = "(sf.birthmonth='{$s_month}' AND sf.birthday>='{$s_day}') OR (sf.birthmonth='{$e_month}' AND sf.birthday<='{$e_day}' AND sf.birthday>'0')";
}
$query = DB::query("SELECT sf.uid,sf.birthyear,sf.birthmonth,sf.birthday,s.username\n\t\t\t\tFROM " . DB::table('common_member_profile') . " sf\n\t\t\t\tLEFT JOIN " . DB::table('common_member') . " s USING(uid)\n\t\t\t\tWHERE (sf.uid IN ({$uids})) AND ({$wheresql})");
while ($value = DB::fetch($query)) {
$value['istoday'] = 0;
if ($value['birthmonth'] == $n_month && $value['birthday'] == $n_day) {
$value['istoday'] = 1;
}
$key = sprintf("%02d", $value['birthmonth']) . sprintf("%02d", $value['birthday']);
$birthlist[$key][] = $value;
ksort($birthlist);
}
}
return $birthlist;
}
示例9: album_creat_by_id
function album_creat_by_id($albumid)
{
global $_G, $space;
preg_match("/^new\\:(.+)\$/i", $albumid, $matchs);
if (!empty($matchs[1])) {
$albumname = dhtmlspecialchars(trim($matchs[1]));
if (empty($albumname)) {
$albumname = dgmdate($_G['timestamp'], 'Ymd');
}
$albumid = album_creat(array('albumname' => $albumname));
} else {
$albumid = intval($albumid);
if ($albumid) {
$query = DB::query("SELECT albumname,friend FROM " . DB::table('home_album') . " WHERE albumid='{$albumid}' AND uid='{$_G['uid']}'");
if ($value = DB::fetch($query)) {
$albumname = addslashes($value['albumname']);
$albumfriend = $value['friend'];
} else {
$albumname = dgmdate($_G['timestamp'], 'Ymd');
$albumid = album_creat(array('albumname' => $albumname));
}
}
}
return $albumid;
}
示例10: fetch_all_by_bid
public function fetch_all_by_bid($bid, $isverified = 1, $start = 0, $limit = 0, $bannedids = array(), $format = true)
{
$data = array();
if ($bid = dintval($bid, true)) {
$addsql = $bannedids = dintval($bannedids, true) ? ' AND id NOT IN (' . dimplode($bannedids) . ')' : '';
$query = DB::query('SELECT * FROM %t WHERE ' . DB::field('bid', $bid) . ' AND isverified=%d' . $addsql . ' ORDER BY stickgrade DESC, displayorder DESC, verifiedtime DESC, dataid DESC ' . DB::limit($start, $limit), array($this->_table, $isverified));
while ($value = DB::fetch($query)) {
if ($format) {
$value['fields'] = unserialize($value['fields']);
$value['fields']['timestamp'] = $value['fields']['dateline'];
$value['fields']['dateline'] = dgmdate($value['fields']['dateline']);
$value['pic'] = $value['pic'] !== STATICURL . 'image/common/nophoto.gif' ? $value['pic'] : '';
if ($value['pic'] && $value['picflag'] == '1') {
$value['pic'] = getglobal('setting/attachurl') . $value['pic'];
} elseif ($value['picflag'] == '2') {
$value['pic'] = getglobal('setting/ftp/attachurl') . $value['pic'];
}
$value['dateline'] = dgmdate($value['dateline'], 'u');
$value['verifiedtime'] = dgmdate($value['verifiedtime'], 'u');
}
$data[$value['id']] = $value;
}
}
return $data;
}
示例11: getattach_row
function getattach_row($attach, &$attachs, &$imgattachs)
{
global $_G;
$attach['filename'] = cutstr($attach['filename'], $_G['setting']['allowattachurl'] ? 25 : 30);
$attach['attachsize'] = sizecount($attach['filesize']);
$attach['dateline'] = dgmdate($attach['dateline']);
$attach['filetype'] = attachtype($attach['ext'] . "\t" . $attach['filetype']);
if ($attach['isimage'] < 1) {
if ($attach['isimage']) {
$attach['url'] = $attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl'];
$attach['width'] = $attach['width'] > 300 ? 300 : $attach['width'];
}
if ($attach['pid']) {
$attachs['used'][] = $attach;
} else {
$attachs['unused'][] = $attach;
}
} else {
$attach['url'] = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . '/forum';
$attach['width'] = $attach['width'] > 300 ? 300 : $attach['width'];
if ($attach['pid']) {
$imgattachs['used'][] = $attach;
} else {
$imgattachs['unused'][] = $attach;
}
}
}
示例12: sanree_brand_mobile
function sanree_brand_mobile()
{
if ($this->chkwap()) {
define('IN_SANREE_MOBILE', TRUE);
$GLOBALS['curtime'] = dgmdate(TIMESTAMP);
}
}
示例13: huxcity
function huxcity()
{
global $_G;
$citysetting = $_G['cache']['plugin']['huxcity'];
$uid = $_G['uid'];
$username = $_G['username'];
if (($citysetting['powtobbs'] == '1' || $citysetting['bantobbs'] == '1') && $uid) {
$uidnum = C::t('#huxcity#hux_city_user')->fetch_by_uid($uid, 'power,bantime');
if (!$uidnum) {
$setarr = array('uid' => $uid, 'username' => $username, 'power' => 100, 'regtime' => TIMESTAMP);
C::t('hux_city_user')->insert($setarr);
} else {
$userpow = $uidnum['power'];
}
}
if ($citysetting['powtobbs'] == '1' && $uid && $uidnum && $userpow <= 0) {
$nopow_msg = lang('plugin/huxcity', 'no_pow');
$pow_yes = lang('plugin/huxcity', 'pow_yes');
$pow_no = lang('plugin/huxcity', 'pow_no');
include template('huxcity:powtobbs');
return $return;
} elseif ($citysetting['bantobbs'] == '1' && $uid && $uidnum && $uidnum['bantime'] != 0) {
$ban_msg = lang('plugin/huxcity', 'baned') . dgmdate($uidnum['bantime']);
$ban_yes = lang('plugin/huxcity', 'ban_yes');
$ban_no = lang('plugin/huxcity', 'ban_no');
include template('huxcity:bantobbs');
return $returnb;
} else {
return '';
}
}
示例14: build_cache_forumrecommend
function build_cache_forumrecommend()
{
$data = array();
$query = DB::query("SELECT fid FROM " . DB::table('forum_forum') . " WHERE type<>'group' AND status<>3");
while ($row = DB::fetch($query)) {
require_once libfile('function/group');
$squery = DB::query("SELECT f.fid, f.name, f.threads, f.lastpost, ff.icon, ff.membernum, ff.description FROM " . DB::table('forum_forum') . " f LEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid WHERE recommend='{$row['fid']}'");
while ($group = DB::fetch($squery)) {
$group['icon'] = get_groupimg($group['icon'], 'icon');
$lastpost = array(0, 0, '', '');
$group['lastpost'] = is_string($group['lastpost']) ? explode("\t", $group['lastpost']) : $group['lastpost'];
$group['lastpost'] = count($group['lastpost']) != 4 ? $lastpost : $group['lastpost'];
list($lastpost['tid'], $lastpost['subject'], $lastpost['dateline'], $lastpost['author']) = $group['lastpost'];
if ($lastpost['tid']) {
$lastpost['dateline'] = dgmdate($lastpost['dateline'], 'Y-m-d H:i:s');
if ($lastpost['author']) {
$lastpost['encode_author'] = rawurlencode($lastpost['author']);
}
$group['lastpost'] = $lastpost;
} else {
$group['lastpost'] = '';
}
$data[$row['fid']][] = $group;
}
}
save_syscache('forumrecommend', $data);
}
示例15: main
function main()
{
global $_G;
if ($_GET['onsubmit'] && check()) {
foreach ($_GET[ids] as $k => $v) {
$id = intval($v);
if ($_GET[del][$k] == 0) {
continue;
}
if ($_GET['_del_all'] == 1 && $_GET['del'][$k]) {
DB::delete(__CLASS__, "id=" . intval($id));
}
}
cpmsg('操作成功', 'success', 'm=' . __CLASS__ . '&a=' . __FUNCTION__);
return false;
}
$size = 30;
$start = ($_G['page'] - 1) * $size;
$url = '';
$and = '';
if ($_GET['uid']) {
$uid = intval($_GET[uid]);
$and .= " AND uid =" . $uid;
$url .= "&uid=" . $uid;
}
if ($_GET['username']) {
$username = urldecode_utf8(trim($_GET[username]));
$and .= " AND username ='" . $username . "'";
$url .= "&username=" . urlencode_utf8($username);
}
if ($_GET['ip']) {
$ip = trim($_GET[ip]);
$and .= " AND ip ='" . $ip . "'";
$url .= "&ip=" . $ip;
}
if ($_GET['jf_down']) {
$jf_down = intval($_GET[jf_down]);
$and .= " AND org_jf >='" . $jf_down . "'";
$url .= "&jf_down=" . $jf_down;
}
if ($_GET['jf_up']) {
$jf_up = intval($_GET[jf_up]);
$and .= " AND org_jf <='" . $jf_up . "'";
$url .= "&jf_up=" . $jf_up;
}
if ($_GET[type] && array_key_exists($_GET[type], $_G['setting']['jf_type'])) {
$type = addslashes(trim($_GET[type]));
$and .= " AND type='{$type}'";
$url .= "&type=" . $type;
}
$sign_list = DB::fetch_all("SELECT * FROM " . DB::table(__CLASS__) . " where 1 {$and} ORDER BY id DESC LIMIT {$start},{$size}");
$count = getcount(__CLASS__, $and);
$showpage = multi($count, $size, $_G[page], URL . "m=sign&a=main" . $url);
foreach ($sign_list as $k => $v) {
$sign_list[$k][username_url] = urlencode_utf8($v[username]);
$sign_list[$k][dateline] = dgmdate($v[dateline], 'u');
}
$this->add(array('count' => $count, 'sign_list' => $sign_list, 'showpage' => $showpage));
$this->show('sign/main');
}