本文整理匯總了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>';