本文整理汇总了PHP中AZLib::convert_one_br方法的典型用法代码示例。如果您正苦于以下问题:PHP AZLib::convert_one_br方法的具体用法?PHP AZLib::convert_one_br怎么用?PHP AZLib::convert_one_br使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AZLib
的用法示例。
在下文中一共展示了AZLib::convert_one_br方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_mes_outbox
function show_mes_outbox()
{
$search_text = AZLib::getParam('search_text');
$is_archive = Url::get('is_archive', 0);
$table_topics = 'message_topics';
$table_text = 'message_text';
$url_archive = '';
$url_cmd = '';
if ($is_archive) {
$table_topics = $table_topics . '_archive';
$table_text = $table_text . '_archive';
$url_cmd = '?cmd=archive';
$url_archive = '&is_archive=1';
}
$condition = $table_topics . '.mt_owner_id =' . User::id() . '
AND ' . $table_topics . '.mt_vid_folder = "sent"
AND ' . $table_topics . '.mt_newest = 0';
if ($search_text && $search_text != "Account thành viên") {
$condition .= " AND mt_to_name LIKE '%{$search_text}%' ";
}
$str_content = '<form name="message">
<div id="boxFunctions">
Chọn:
<a style="cursor:pointer" id="select_all">Tất cả</a>,
<a style="cursor:pointer" id="select_read">Đã đọc</a>,
<a style="cursor:pointer" id="select_unchecked">Không chọn</a>
<div id="boxFunctionRight">
<div id="btn_del_mess" align="center" class="btnAllNewFeedback" onmouseout="this.className=\'btnAllNewFeedback\'" onmouseover="this.className=\'btnAllNewFeedbackHover\'" style="width:40px;">
<div class="btnRightAllFeedback" align="center" style="width:40px"><a title="Xóa tất cả tin nhặn đã chọn" href="javascript:void(0)" onClick="return delMessage(0,\'true\',\'outbox\')">Xoá</a></div>
</div>
</div>
</div>
';
$str_content .= '<table cellpadding="3" cellspacing="0" border="0" width="100%">';
$sql_count = 'SELECT COUNT(mt_id) AS total_row FROM ' . $table_topics . ' WHERE ' . $condition;
$total_item = DB::fetch($sql_count, 'total_row', 0);
$item_per_page = 15;
$limit = '';
$divID = 'mess_content';
$url_path = WEB_DIR . 'ajax.php?act=personal&code=show_mes_outbox' . $url_archive . '&search_text=' . $search_text;
$paging = AZPagging::AjaxPaging($limit, $total_item, $item_per_page, 5, 'page_mes', '', false, false, $url_path, $divID, true);
$sql = 'SELECT ' . $table_text . '.msg_id, ' . $table_text . '.msg_author_name, ' . $table_text . '.msg_date, ' . $table_text . '.msg_post, ' . $table_topics . '.mt_id, ' . $table_topics . '.mt_ref_id,
' . $table_topics . '.mt_title, ' . $table_topics . '.mt_from_id, ' . $table_topics . '.mt_owner_id, ' . $table_topics . '.mt_read, ' . $table_topics . '.mt_owner_name, ' . $table_topics . '.mt_to_name,
user.avatar_url, user.img_server
FROM ' . $table_text . ', ' . $table_topics . ', user
WHERE ' . $table_text . '.msg_id = ' . $table_topics . '.mt_msg_id AND ' . $table_topics . '.mt_from_id = user.id AND ' . $condition . '
ORDER BY ' . $table_text . '.msg_date DESC ' . $limit;
//echo $sql;
//exit;
$result = DB::query($sql);
$stt = 0;
if ($result) {
while ($row = mysql_fetch_assoc($result)) {
if ($stt < $item_per_page) {
if ($row['mt_ref_id']) {
$sourceTitle = DB::select($table_topics, 'mt_id = ' . $row['mt_ref_id']);
if ($sourceTitle['mt_title']) {
$row['mt_title'] = $sourceTitle['mt_title'];
}
//else
//{
// $sentTitle = DB::select($table_topics,'mt_mgsid = ' . $row['mt_ref_id']);
//}
$row["mt_id"] = $row['mt_ref_id'];
$row['mt_ref_id'] = 0;
}
if ($row['avatar_url']) {
$row['avatar_url'] = AZLib::getImageThumb($row['avatar_url'], 50, 50, 0, $row['img_server']);
} else {
$row['avatar_url'] = "style/images/50x50.gif";
}
//$row['msg_date'] = AZLib::duration_time($row['msg_date']);
$msg_date = date('H:i | ', $row['msg_date']);
if (date('d.m.y', $row['msg_date']) == date('d.m.y', TIME_NOW)) {
$msg_date .= '<font color="green">Hôm nay</font>';
} else {
$msg_date .= date('d.m.y', $row['msg_date']);
}
$row['msg_date'] = $msg_date;
$row['msg_post'] = preg_replace("/\n/", "<br />", $row['msg_post']);
$row['msg_post'] = strip_tags(AZLib::parseBBCode(AZLib::convert_one_br($row['msg_post'])), '<br />');
if (strlen($row['msg_post']) > 40) {
$row['msg_post_short'] = AZLib::word_limit($row['msg_post'], 40, ' ...');
//$row['msg_post_short'] = AZLib::cleanHtml(AZLib::word_limit($row['msg_post'],40,' ...'));
} else {
$row['msg_post_short'] = $row['msg_post'];
//$row['msg_post_short'] = AZLib::cleanHtml($row['msg_post']);
}
//$str_title = '<a onclick="fn_show_mes_detail('.$row["mt_id"].')" rel="history" href="message.html'.$url_cmd.'#outbox/'.$row["mt_id"].'" id="a_'.$row["mt_id"].'" title="Hiển thị chi tiết" >'.$row["mt_title"].'</a> - <span class="textMestime">'.$row['msg_date'].'</span>';
if ($row['mt_owner_id'] != User::id()) {
$strUser = '<a href="' . $row["mt_owner_name"] . '">' . $row["mt_owner_name"] . '</a>';
} else {
$strUser = '<a href="' . $row["mt_to_name"] . '">' . $row["mt_to_name"] . '</a>';
}
if ($row["mt_read"] == 0 && !$is_archive) {
$str_title = '<a onclick="detail_reload_jcache = true;fn_show_mes_detail(' . $row["mt_id"] . ',1,\'outbox\')" rel="history" id="a_' . $row["mt_id"] . '" href="message.html' . $url_cmd . '#outbox/' . $row["mt_id"] . '" title="Hiển thị chi tiết" ><b>' . $row["mt_title"] . '</b></a>';
$read_class = ' unreadMessage';
} else {
$str_title = '<a onclick="detail_reload_jcache = true;fn_show_mes_detail(' . $row["mt_id"] . ',1,\'outbox\')" rel="history" id="a_' . $row["mt_id"] . '" href="message.html' . $url_cmd . '#outbox/' . $row["mt_id"] . '" title="Hiển thị chi tiết">' . $row["mt_title"] . '</a>';
//.........这里部分代码省略.........