本文整理汇总了PHP中bb2html函数的典型用法代码示例。如果您正苦于以下问题:PHP bb2html函数的具体用法?PHP bb2html怎么用?PHP bb2html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bb2html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: browse_motd
function browse_motd()
{
global $output, $action_permission, $sql;
valid_login($action_permission["insert"]);
$motds = $sql["mgr"]->query("SELECT * FROM motd ORDER BY Priority ASC");
$output .= '
<table class="lined center">
<tr>
<th style="width: 1%;">' . lang("global", "delete_short") . '</th>
<th style="width: 1%;">' . lang("global", "edit") . '</th>
<th style="width: 1%;">' . lang("motd", "enabled") . '</th>
<th style="width: 20%;">' . lang("motd", "message") . '</th>
<th style="width: 1%;">' . lang("motd", "target") . '</th>
<th style="width: 1%;">' . lang("motd", "min_sec_level") . '</th>
</tr>';
while ($motd = $sql["mgr"]->fetch_assoc($motds)) {
if ($motd["Target"] != 0) {
if ($core == 1) {
$un_query = "SELECT login FROM accounts WHERE acct=" . $motd["Target"];
} else {
$un_query = "SELECT username AS login FROM account WHERE id=" . $motd["Target"];
}
$un_result = $sql["logon"]->query($un_query);
$un = $sql["logon"]->fetch_assoc($un_result);
$un = $un["login"];
} else {
$un = "-";
}
$output .= '
<tr>
<td>
<a href="motd.php?action=delete_motd&id=' . $motd["ID"] . '&redirect=1"><img src="img/cross.png" alt="" /></a>
</td>
<td>
<a href="motd.php?action=edit_motd&id=' . $motd["ID"] . '&redirect=1"><img src="img/edit.png" alt="" /></a>
</td>
<td>
' . ($motd["Enabled"] ? '<img src="img/up.gif" alt="" />' : '<img src="img/down.gif" alt="" />') . '
</td>
<td>
' . bb2html($motd["Message"]) . '
</td>
<td>
' . $un . '
</td>
<td>
' . gmlevel_name($motd["Min_Sec_Level"]) . '
</td>
</tr>';
}
$output .= '
</table>
<br />';
makebutton(lang("motd", "add_motd"), 'motd.php?action=add_motd&error=4&redirect=1" type="def', 180);
$output .= '
<br />
<br />';
}
示例2: Frontend
function Frontend($topic, $subtopic, $language, $filename, $QUERY_STRING)
{
global $db;
$this->setVars($topic, $subtopic, $language, $filename, $QUERY_STRING);
// content handle
$row_lastcontent = mysql_fetch_row($this->result_lastcontent);
$this->languageinfo_id = $row_lastcontent[0];
$this->content_id = $row_lastcontent[1];
$tmp = $this->info_id[content];
$result_content = $db->sql("SELECT value FROM languageinfo WHERE languageinfo_id='{$this->languageinfo_id}' AND language_id='{$this->lang_id}' AND info_id = '{$tmp}'");
$row_content = mysql_fetch_row($result_content);
$this->maincontent = bb2html($row_content[0]);
return true;
}
示例3: HTMLize
function HTMLize($no)
{
global $ddir, $ext, $kdir, $kext;
$log = file($ddir . $no . $ext);
list($fname, $femail, $fdate, $fcom, $fsub) = explode(",", $log[0]);
//親
$fcom = bb2html($fcom);
$kako = "<title>{$fsub}</title><body><dl><b><font size=+1 color=red>{$fsub}</font></b>";
$kako .= "<dt>1 <font color=\"forestgreen\"><b>{$fname}</b></font> [ {$fdate} ]<dt><dd>{$fcom}<br><br><br>";
for ($i = 2; $i < count($log) + 1; $i++) {
list($name, $email, $date, $com) = explode(",", $log[$i - 1]);
$com = bb2html($com);
$kako .= "<dt>{$i} <font color=forestgreen><b>{$name}</b></font> [ {$date} ]<dd>{$com}<br><br>";
}
$kako .= "</dl><hr size=1></body>";
$fp = fopen($kdir . $no . $kext, "w");
fputs($fp, $kako);
fclose($fp);
echo "<a href=\"{$kdir}{$no}{$kext}\"> {$fsub} </a>HTML化完了<br>";
}
示例4: bb2html
</li><br>
<?php
print bb2html($row['post_content']);
?>
<?php
if ($row['post_lastedit_user'] && $row['post_lastedit_date']) {
$username = $db->query('select username from ' . $_CONF['dbprefix'] . 'users where user_id=' . getInt($row['post_lastedit_user']));
$db->freeResult();
$username = sanitizeHTML($username[0]['username']);
$lastdate = @date('d M Y, h:i:s a', getInt($row['post_lastedit_date']));
print '<br><br><span style="font-size: 10px">' . $_LANG['last_modify_by'] . ' <a href="' . BASEDIR . 'user/' . getInt($row['post_lastedit_user']) . '">' . $username . '</a> ' . '@ ' . $lastdate . '</span>';
}
if ($user[0]['user_signature']) {
print '<br><br><div class="signatureHead"></div><div class="signature">' . bb2html($user[0]['user_signature']) . '</div>';
}
?>
</td>
</tr>
<?php
}
?>
</table><br><br>
<?php
if ($numPosts >= 10) {
print '<center>';
for ($i = 1; $i <= (int) ($numPosts / 10) + 1; $i++) {
if ($i == $page) {
示例5: date
<?php
echo "by <a href=\"/\" onClick=\"load('about=", $row["user_id"], "', '#content'); return false;\">", $row["username"], "</a> on ", date("F jS Y", $date_created);
?>
<?php
if ($row["updated"]) {
?>
<?php
echo "<i>(updated ", date("F jS Y", $date_updated), ")</i>";
?>
<?php
}
?>
</div>
<div class="content">
<?php
echo bb2html($row["content"]);
?>
</div>
</div>
<?php
}
?>
<?php
$row = $result->fetch_assoc();
?>
<?php
if ($row && $i < 4) {
?>
<hr/>
<?php
}
示例6: mail_send
function mail_send()
{
global $ir, $c, $userid, $h;
$sql = mysql_query("select max(userid) from users");
$result = mysql_result($sql, $users);
if ($_POST['userid'] > $result or $_POST['userid'] == 0) {
print "Oh no, you're trying to mail a ghost.<br /><br />\n<a href='mailbox.php'>Back</a>";
$h->endpage();
exit;
}
if ($userid == $_POST['userid']) {
print "Whats the point in mailing yourself ?<br /><br />\n<a href='mailbox.php'>Back</a>";
$h->endpage();
exit;
}
$subj = str_replace(array("\n"), array("<br />"), strip_tags($_POST['subject']));
$msg = bb2html($_POST['message']);
$codes = array(":)", ";)", ":o", ":D", ":s", ":(", ":red", ":clown", ":bashful", ":x", ":green", ":|", ";(", ":]", ":horny", ":cool");
$images = array("<img src=smilies/smiley1.gif>", "<img src=smilies/smiley2.gif>", "<img src=smilies/smiley3.gif>", "<img\n\nsrc=smilies/smiley4.gif>", "<img src=smilies/smiley5.gif>", "<img src=smilies/smiley6.gif>", "<img\n\nsrc=smilies/smiley7.gif>", "<img src=smilies/smiley8.gif>", "<img src=smilies/smiley9.gif>", "<img\n\nsrc=smilies/smiley10.gif>", "<img src=smilies/smiley11.gif>", "<img src=smilies/smiley12.gif>", "<img\n\nsrc=smilies/smiley13.gif>", "<img src=smilies/smiley14.gif>", "<img src=smilies/smiley15.gif>", "<img src=smilies/smiley16.gif>");
$newmsg = str_replace($codes, $images, $msg);
$to = (int) $_POST['userid'];
mysql_query("INSERT INTO mail VALUES ('',0,{$userid},{$to},unix_timestamp(),'{$subj}','{$newmsg}')", $c) or die(mysql_error());
mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$to}") or die(mysql_error());
print "Message sent.<br /><br />\n<a href='mailbox.php'>Back</a>";
}
示例7: show_error
}
$uid = $userdata['userid'];
if (get_user_right($f_id) == 0) {
show_error('ln_error_10', $modul_name);
exit;
}
$topic_count = 1;
$last_post_id = 0;
$a_count = 0;
$result = $db->query("SELECT * FROM cc" . $n . "_forum_posts where si_forum_id = '" . $f_id . "' and si_topic_id='" . $ft_id . "' ORDER BY si_post_time ASC");
while ($row = $db->fetch_array($result)) {
$post_name_t = $row['si_poster_name'];
$post_new_id = $row['si_post_id'];
$post_id_t = $row['si_poster_id'];
$post_name = generate_userlink($post_id_t, $post_name_t);
$post_text = bb2html($row['si_post_text']);
$post_date_t = $row['si_post_time'];
$post_date = date("d.m.Y, H:i", $post_date_t);
if ($last_post_id < $post_new_id) {
$last_post_id = $post_new_id;
}
if ($post_id_t == $userdata['userid']) {
$post_edit_pic = "<a href=\"forum.php?action=edit&ft_id={$ft_id}&f_id={$f_id}&fp_id={$post_new_id}\"><img src=\"" . LITO_IMG_PATH_URL . $modul_name . "/edit.png\" title=\"Bearbeiten\" alt=\"Bearbeiten\" border=\"0\"></a>";
} else {
$post_edit_pic = "";
}
// l�schen
$ali_admin = $userdata['isadmin'];
if ($post_id_t == $userdata['userid'] || $ali_admin == 1) {
$post_del_pic = "<a href=\"forum.php?action=delete&ft_id={$ft_id}&f_id={$f_id}&fp_id={$post_new_id}\"><img src=\"" . LITO_IMG_PATH_URL . $modul_name . "/del.png\" title=\"L�schen\" alt=\"L�schen\" border=\"0\"></a>";
} else {
示例8: bb2html
print " node-unpublished";
}
?>
">
<?php
if ($page == 0) {
?>
<?php
print $picture;
?>
<h1 class="title"><a href="<?php
print $node_url;
?>
"><?php
print bb2html($title);
?>
</a></h1>
<?php
}
?>
<?php
if ($links) {
?>
<div class="links">
<?php
$totalComments = $node->comment_count;
if ($totalComments == 1) {
$commentText = "comment";
示例9: create_mail
}
}
/* end function bb2html()
*/
/*
create_mail
a callback function for the email tag */
function create_mail($matches)
{
$removers = array('"', '\\');
// in case they add quotes
$mail = str_replace($removers, '', $matches[1]);
$mail = str_replace(' ', '%20', bbmashed_mail($mail));
return '<a title="mail me!" href="' . $mail . '">' . $matches[2] . '</a>';
}
/*
create *my* email
a callback function for the mmail tag */
function create_mmail($matches)
{
global $emailaddress;
$removers = array('"', '\\');
// in case they add quotes
$mashed_address = str_replace($removers, '', $matches[1]);
$mashed_address = bbmashed_mail($emailaddress . '?subject=' . $mashed_address);
$mashed_address = str_replace(' ', '%20', $mashed_address);
// hmmm
return '<a class="cb-mail" title="mail me!" href="' . $mashed_address . '\\">' . $matches[2] . '<!--mail--></a>';
}
echo bb2html(file_get_contents("/dev/stdin"));
示例10: VALUES
}
$db->query("INSERT INTO cc" . $n . "_messages (username,fromuserid,touserid,text,time,isnew,inbox,subject,pri) VALUES ('" . $userdata['username'] . "','" . $userdata['userid'] . "','" . $userid_c . "','" . mysql_real_escape_string($text) . "','" . time() . "','1','1','" . mysql_real_escape_string($subject) . "','" . $pri . "')");
}
header("LOCATION: message.php");
exit;
}
if ($action == "lookup") {
$pmid = intval($_GET['pmid']);
$result = $db->query("SELECT * FROM cc" . $n . "_messages WHERE touserid='" . $userdata['userid'] . "' AND pmid='{$pmid}'");
$row = $db->fetch_array($result);
if ($row['pmid'] != $pmid) {
show_error('ln_message_e_notfound', $modul_name);
exit;
}
$db->query("UPDATE cc" . $n . "_messages SET isnew='0' WHERE pmid='{$pmid}' AND touserid='" . $userdata['userid'] . "' AND isnew='1'");
$text = bb2html($row['text']);
$row['subject'] = c_trim($row['subject']);
$time = date("d.m.Y, H:i", $row['time']);
$M_USER_ID = $row['fromuserid'];
$M_USER_NAME = $row['username'];
if ($op_use_badwords == 1) {
$result_bad = $db->query("select badword from cc" . $n . "_badwords where in_mail ='1'");
while ($row_bad = $db->fetch_array($result_bad)) {
$text = str_replace($row_bad['badword'], "**ZENSIERT**", $text);
}
}
$tpl->assign('M_USER_ID', $M_USER_ID);
$tpl->assign('M_USER_NAME', $M_USER_NAME);
$tpl->assign('M_SUBJECT', $row['subject']);
$tpl->assign('M_TEXT', $text);
$tpl->assign('M_ID', $row['pmid']);
示例11: bb2html
print $mission;
?>
</div>
<?php
}
?>
<?php
if ($tabs) {
print '<div id="tabs-wrapper" class="clear-block">';
}
?>
<?php
if ($title) {
print '
<h1' . ($tabs ? ' class="with-tabs title"' : '') . '>' . bb2html($title) . '</h1>
';
}
?>
<?php
if ($tabs) {
print '<ul class="tabs primary">' . $tabs . '</ul></div>';
}
?>
<?php
if ($tabs2) {
print '<ul class="tabs secondary">' . $tabs2 . '</ul>';
}
?>
<?php
示例12: parseObjects
/**
* Fetches the objects given in $result
* @param $result
* @return array
*/
function parseObjects($result, $username = null)
{
global $db;
$objects = array();
while ($row = $db->fetchAssoc($result)) {
$row['description'] = bb2html(nl2br(str_replace("\\n", "\n", $row['description'])));
//Fetch latest bid
$bidResult = $db->buildQuery("SELECT TOP 1 * FROM bids WHERE objectid=%d ORDER BY bidvalue DESC", $row['id']);
if ($db->getHasRows($bidResult)) {
$res = $db->fetchAssoc($bidResult);
$row['currentBid'] = $res['bidvalue'];
$row['currentBidName'] = $res['username'];
} else {
$row['currentBid'] = $row['start_bid'];
}
$imageResult = $db->buildQuery("SELECT TOP 1 filename FROM files WHERE objectid=%d", $row['id']);
if ($db->getHasRows($imageResult)) {
if ($row['city'] == 'batch') {
$row['image'] = "http://iproject2.icasites.nl/pics/" . $db->fetchAssoc($imageResult)['filename'];
} else {
$row['image'] = baseurl("upload/" . $db->fetchAssoc($imageResult)['filename']);
}
} else {
$row['image'] = "https://placehold.it/150x110";
}
if ($username != null) {
$ownBidResult = $db->buildQuery("SELECT TOP 1 bidvalue FROM bids WHERE username =%s AND objectid=%d ORDER BY bidvalue DESC", $username, $row['id']);
$row['ownBid'] = $db->fetchAssoc($ownBidResult)['bidvalue'];
}
$row['timeRemaining'] = $row['end_moment']->getTimeStamp() - time();
$objects[] = $row;
}
return $objects;
}
示例13: lang
// keep html indent in sync, so debuging from browser source would be easy to read
$output .= '
<div class="bubble">
<!-- start of error.php -->
<div class="center_text">
<br />
<table id="error_message_table" class="flat center">
<tr>
<td align="center">
<h1>
<span class="error">
<img src="img/warn_red.gif" width="48" height="48" alt="error" />
<br />' . lang("error", "error") . '!
</span>
</h1>
<br />' . bb2html($err) . '<br />
</td>
</tr>
</table>
<br />
<table id="error_buttons" class="hidden center">
<tr>
<td align="center">';
makebutton(lang("global", "home"), 'index.php', 130);
makebutton(lang("global", "back"), 'javascript:window.history.back()', 130);
unset($err);
$output .= '
</td>
</tr>
</table>
<br />
示例14: header
header("LOCATION: alliance.php?action=change_forum");
exit;
}
if ($action == "get_info") {
$id = intval($_GET['id']);
if (!$id) {
show_error('ln_allianz_e_4', $modul_name);
exit;
}
$result = $db->query("SELECT * FROM cc" . $n . "_allianz WHERE aid='{$id}'");
$row = $db->fetch_array($result);
$banner = trim($row['imageurl']);
if ($banner == "") {
$banner = LITO_IMG_PATH_URL . $modul_name . "/no_ali_banner.png";
}
$description = bb2html($row['text_long']);
$ibit = "";
$result = $db->query("SELECT userid,username,is_ali_admin,status FROM cc" . $n . "_users WHERE allianzid='{$id}' ORDER BY is_ali_admin DESC");
while ($i = $db->fetch_array($result)) {
$ibit .= generate_messagelink_smal($i[username]) . " " . generate_userlink($i[userid], $i[username]);
if ($i['is_ali_admin'] == 1) {
$ibit .= " (Leiter)";
}
$ibit .= " {$img}<br>";
}
$is_in_ali = 0;
if (intval($userdata['allianzid']) > 0) {
$is_in_ali = 1;
}
$tpl->assign('is_in_ali', $is_in_ali);
$tpl->assign('banner', $banner);
示例15: getInt
die;
}
$db->query('delete from ' . $_CONF['dbprefix'] . 'privmsgs where privmsg_id=' . getInt($_GET['msg_id']) . ' ' . 'and privmsg_to=' . getInt($userinfo['user_id']));
require_once ABSOLUTE_BASEPATH . '/header.' . PHPEXT;
notification($_LANG['delete_privmsg_ok'], $_SERVER['HTTP_REFERER'], 3);
die;
}
$db = new nullBB_Database($_CONF, $_LANG);
$res = $db->query('select * from ' . $_CONF['dbprefix'] . 'privmsgs ' . "where privmsg_id=" . getInt($_GET['msg_id']) . " and privmsg_to=" . getInt($userinfo['user_id']));
$db->freeResult();
if (empty($res)) {
print $_LANG['privmsg_not_found'];
die;
}
$res = $res[0];
if ($res['privmsg_seen'] == false) {
$db->query('update ' . $_CONF['dbprefix'] . 'privmsgs set privmsg_seen=1 ' . 'where privmsg_id=' . getInt($_GET['msg_id']) . ' and privmsg_to=' . getInt($userinfo['user_id']));
}
$from = $db->query('select username from ' . $_CONF['dbprefix'] . 'users where user_id=' . getInt($res['privmsg_from']));
$db->freeResult();
$from = sanitizeHTML($from[0]['username']);
$to = sanitizeHTML($userinfo['username']);
$content = bb2html($res['privmsg_content']);
print '<li class="privmsgHead">' . $_LANG['from'] . ': ' . '<a href="' . BASEDIR . 'user/' . getInt($res['privmsg_from']) . '">' . $from . "</a></li>\n";
print '<li class="privmsgHead">' . $_LANG['to'] . ': ' . '<a href="' . BASEDIR . 'user/' . getInt($res['privmsg_to']) . '">' . $to . "</a></li><br>\n";
print '<div class="privmsgContent">' . $content . "</div><br>\n";
unset($res);
$db->close();
?>