本文整理汇总了PHP中gcms::txtQuote方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::txtQuote方法的具体用法?PHP gcms::txtQuote怎么用?PHP gcms::txtQuote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcms
的用法示例。
在下文中一共展示了gcms::txtQuote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
// antispam
$register_antispamchar = gcms::rndname(32);
$_SESSION[$register_antispamchar] = gcms::rndname(4);
$patt = array('/{BREADCRUMS}/', '/<UPLOAD>(.*)<\\/UPLOAD>/s', '/<ADMIN>(.*)<\\/ADMIN>/s', '/{CATEGORIES}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/', '/{QID}/', '/{RID}/', '/{TOPIC}/', '/{DETAIL}/', '/{DATE}/', '/{HOUR}/', '/{MINUTE}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = $index['img_upload_type'] == '' ? '' : '$1';
$replace[] = $moderator ? '$1' : '';
$replace[] = implode("\n", $categories);
$replace[] = $register_antispamchar;
$replace[] = $isAdmin ? $_SESSION[$register_antispamchar] : '';
$replace[] = (int) $index['index_id'];
$replace[] = (int) $index['comment_id'];
$replace[] = $index['topic'];
$replace[] = gcms::txtQuote($index['detail']);
if ($rid == 0) {
preg_match('/([0-9]{4,4}\\-[0-9]{2,2}\\-[0-9]{2,2})\\s([0-9]+):([0-9]+)/', date('Y-m-d H:i', $index['create_date']), $match);
// วันที่ของบอร์ด
$replace[] = $match[1];
// hour
$datas = array();
for ($i = 0; $i < 24; $i++) {
$d = sprintf('%02d', $i);
$sel = $d == $match[2] ? ' selected' : '';
$datas[] = '<option value=' . $d . $sel . '>' . $d . '</option>';
}
$replace[] = implode('', $datas);
// minute
$datas = array();
for ($i = 0; $i < 60; $i++) {
示例2: array
} else {
$index = $index[0];
// config
gcms::r2config($index['config'], $index);
// login
$login = gcms::getVars($_SESSION, 'login', array('id' => 0, 'status' => -1, 'email' => '', 'password' => ''));
// สมาชิก
$isMember = gcms::isMember();
// ผู้ดูแล
$moderator = $isMember && gcms::canConfig($index, 'moderator');
if ($action == 'quote') {
// อ้างอิง
if ($index['detail'] == '') {
$ret['detail'] = '';
} else {
$ret['detail'] = rawurlencode('[quote' . ($rid > 0 ? " r={$no}]" : ']') . gcms::txtQuote($index['detail'], true) . '[/quote]');
}
} elseif ($qid > 0 && in_array($action, array('pin', 'lock')) && $moderator) {
if ($action == 'pin') {
$ret['value'] = $index['pin'] == 0 ? 1 : 0;
$db->edit(DB_BOARD_Q, $qid, array('pin' => $ret['value']));
$ret['title'] = $lng['LNG_' . ($ret['value'] == 0 ? '' : 'UN') . 'PIN'];
$ret['error'] = 'BOARD_' . ($ret['value'] == 0 ? 'UN' : '') . 'PIN_SUCCESS';
} elseif ($action == 'lock') {
$ret['value'] = $index['locked'] == 0 ? 1 : 0;
$db->edit(DB_BOARD_Q, $qid, array('locked' => $ret['value']));
$ret['title'] = $lng['LNG_' . ($ret['value'] == 0 ? '' : 'UN') . 'LOCK'];
$ret['error'] = 'BOARD_' . ($ret['value'] == 0 ? 'UN' : '') . 'LOCKED_SUCCESS';
}
} elseif ($action == 'delete' && $isMember) {
// สามารถลบได้ (mod=ลบ,สมาชิก=แจ้งลบ)