本文整理汇总了PHP中bbcode::encode方法的典型用法代码示例。如果您正苦于以下问题:PHP bbcode::encode方法的具体用法?PHP bbcode::encode怎么用?PHP bbcode::encode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bbcode
的用法示例。
在下文中一共展示了bbcode::encode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
if (!defined('PROPER_START')) {
header("HTTP/1.0 403 Forbidden");
exit;
}
api::send('self/message/update', array('id' => $_POST['id'], 'content' => bbcode::encode($_POST['content'])));
if (isset($_GET['redirect'])) {
template::redirect($_GET['redirect']);
} else {
$template->redirect('/panel/messages/detail?id=' . security::encode($_POST['parent']));
}
示例2: array
}
if (!$_POST['parent']) {
$message = "[i]{$lang['type']}[/i] {$lang['quota']}\n[i]{$lang['select']}[/i] {$_POST['quota']}\n[i]{$lang['request']}[/i] {$_POST['max']}\n\n{$_POST['content']}\n\t";
} else {
$message = $_POST['content'];
api::send('message/update', array('id' => $_POST['parent'], 'status' => 2));
// send email
$msg = api::send('message/list', array('id' => $_POST['parent']));
$msg = $msg[0];
$user = api::send('user/list', array('id' => $msg['user']['id']));
$user = $user[0];
$email = str_replace(array('{ID}'), array($msg['id']), $lang['content']);
mail($user['email'], $lang['subject'], str_replace('{CONTENT}', $email, $GLOBALS['CONFIG']['MAIL_TEMPLATE']), "MIME-Version: 1.0\r\nContent-type: text/html; charset=utf-8\r\nFrom: Olympe <no-reply@olympe.in>\r\n");
}
$params = array();
$params['content'] = bbcode::encode($message);
$params['type'] = 1;
if ($_POST['title']) {
$params['title'] = $_POST['title'];
}
if ($_POST['parent']) {
$params['parent'] = $_POST['parent'];
}
try {
api::send('self/message/add', $params);
} catch (Exception $e) {
$_SESSION['MESSAGE']['TYPE'] = 'error';
$_SESSION['MESSAGE']['TEXT'] = $lang['error'];
}
if (isset($_GET['redirect'])) {
template::redirect($_GET['redirect']);