本文整理汇总了PHP中gcms::showip方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::showip方法的具体用法?PHP gcms::showip怎么用?PHP gcms::showip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcms
的用法示例。
在下文中一共展示了gcms::showip方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$cache->save($sql, $datas);
}
}
foreach ($datas as $i => $item) {
// moderator และ เจ้าของ สามารถแก้ไขความคิดเห็นได้
$canEdit = $moderator || $isMember && $login['id'] == $item['member_id'];
$replace = array();
$replace[] = $canEdit ? '\\1' : 'hidden';
$replace[] = $canDelete ? '\\1' : 'hidden';
$replace[] = gcms::HighlightSearch(gcms::showDetail($item['detail'], $canview), $search);
$replace[] = (int) $item['member_id'];
$replace[] = $item['displayname'];
$replace[] = $item['status'];
$replace[] = gcms::mktime2date($item['last_update']);
$replace[] = date(DATE_ISO8601, $item['last_update']);
$replace[] = gcms::showip($item['ip']);
$replace[] = $i + 1;
$replace[] = $item['id'];
$comments[] = preg_replace($patt, $replace, $skin);
}
}
if ($canReply) {
// antispam
$register_antispamchar = gcms::rndname(32);
$_SESSION[$register_antispamchar] = gcms::rndname(4);
}
// url ของหน้านี้
if ($config['module_url'] == '1') {
$canonical = gcms::getURL($index['module'], $index['alias']);
} else {
$canonical = gcms::getURL($index['module'], '', 0, $index['id']);
示例2: foreach
$datas = $cache->get($sql);
if (!$datas) {
$datas = $db->customQuery($sql);
if (sizeof($datas) > 0) {
$cache->save($sql, $datas);
}
}
foreach ($datas as $i => $item) {
$i++;
$row = '<article class=r>';
$row .= '<div class=detail>' . gcms::showDetail($item['detail'], true) . '</div>';
$row .= '<footer>';
$row .= '<p><strong>{LNG_COMMENT_NO}#' . $i . '</strong></p>';
$row .= '<p><strong>{LNG_BY}</strong>: ' . $index['displayname'] . '</p>';
$row .= '<p><strong>{LNG_POSTED}</strong>: ' . gcms::mktime2date($index['last_update']) . '</p>';
$row .= '<p><strong>{LNG_IP}</strong>: ' . gcms::showip($item['ip']) . '</p>';
$row .= '</footer>';
$row .= '</article>';
$comments[] = $row;
}
}
$title = $index['topic'];
if ($config['module_url'] == '1') {
$url = gcms::getURL($modules['module'], $index['alias'], 0, 0, '', false);
} else {
$url = gcms::getURL($modules['module'], '', 0, $index['id'], '', false);
}
$content = '<article>';
$content .= '<header><h1>' . $index['topic'] . '</h1></header>';
$content .= '<div class=detail>' . gcms::showDetail($index['detail'], true, false) . '</div>';
$content .= '<footer>';