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