本文整理汇总了PHP中ubb函数的典型用法代码示例。如果您正苦于以下问题:PHP ubb函数的具体用法?PHP ubb怎么用?PHP ubb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ubb函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ajax_themeinfoOp
/**
* GET 话题详细信息
*/
public function ajax_themeinfoOp()
{
$model = Model();
$m_theme = $model->table('circle_theme');
$theme = $m_theme->where(array("theme_id" => $this->t_id))->select();
$this->c_id = $theme['circle_id'];
// 话题信息
$this->themeInfo();
$data = $this->theme_info;
$model = Model();
// 访问数增加
$model->table('circle_theme')->update(array('theme_id' => $this->t_id, 'theme_browsecount' => array('exp', 'theme_browsecount+1')));
$data['theme_content'] = ubb($data['theme_content']);
if ($data['theme_edittime'] != '') {
$data['theme_edittime'] = @date('Y-m-d H:i', $data['theme_edittime']);
}
$data['member_avatar'] = getMemberAvatarForID($data['member_id']);
// 是否赞过话题
$data['theme_nolike'] = 1;
if (!empty($this->member_info['member_id'])) {
// 是否赞过话题
$like_info = $model->table('circle_like')->where(array('theme_id' => $this->t_id, 'member_id' => $this->member_info['member_id']))->find();
if (empty($like_info)) {
$data['theme_nolike'] = 1;
} else {
$data['theme_nolike'] = 0;
}
}
if (strtoupper(CHARSET) == 'GBK') {
$data = Language::getUTF8($data);
}
output_data(array('theme_info' => $data));
die;
}
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:37,代码来源:circle_theme.php
示例2: insert
function insert()
{
$userId = Session::get(C('USER_AUTH_KEY'));
$recordId = intval($_POST['recordId']);
if ($_POST['module'] == "Blog") {
$dao = D('Blog');
if ($blog = $dao->getById($recordId)) {
$toUserId = $blog->userId;
$blogTitle = $blog->title;
} else {
$this->error("文章不存在,无法回复!", false);
}
} else {
if ($_POST['module'] == "Photo") {
$dao = D('Photo');
if ($photo = $dao->getById($recordId)) {
$toUserId = $photo->userId;
$photoPath = $photo->imagePath;
} else {
$this->error("图片不存在,无法回复!", false);
}
}
}
$dao = D("Comment");
$vo = $dao->create();
$vo->cTime = time();
$vo->userId = $userId;
if ($result = $dao->add($vo)) {
if ($vo->replyType == 0) {
$map = new HashMap();
$map->put('replyId', $result);
$replyId = $dao->save($map, "id='{$result}'");
}
$content = ubb($vo->content);
if ($_POST['module'] == 'Blog') {
/* add_user_feed */
$feedTitle = "评论了日志:<a href=\"/blog/{$recordId}\">{$blogTitle}</a>";
$feedInfo = '<div class="share-comment"><p>' . $content . '</p></div>';
$this->addUserFeed($userId, 'add', 'comment', $recordId, $feedTitle, $feedInfo);
/* /add_user_feed */
$this->addUserAlert($toUserId, "reply" . $_POST['module'], $_POST['recordId']);
} elseif ($_POST['module'] == 'Photo') {
/* add_user_feed */
$feedTitle = "评论了照片:";
$feedInfo = "<p class=\"image\"><a href=\"/photo/{$recordId}\"><img src=\"" . WEB_PUBLIC_URL . "/Thumb/?w=100&h=100&url={$photoPath}\" alt=\"照片\" /></a></p>" . '<div class="share-comment"><p>' . $content . '</p></div>';
$this->addUserFeed($userId, 'add', 'comment', $recordId, $feedTitle, $feedInfo);
/* /add_user_feed */
$this->addUserAlert($toUserId, "reply" . $_POST['module'], $_POST['recordId']);
}
//$this->success('回复成功!');
if ($_POST['module'] == 'Board') {
header("Location:" . __APP__ . "/Board");
} else {
echo $result;
}
} else {
//$this->error('回复失败!');
echo false;
}
}
开发者ID:skiman100,项目名称:thinksns,代码行数:60,代码来源:CommentAction.class.php
示例3: parseSmileys
function parseSmileys($str = '', $image_url = '', $ubb = true)
{
global $cfg_smileys;
if ($image_url == '') {
return $str;
}
$image_url = preg_replace("/(.+?)\\/*\$/", "\\1/", $image_url);
foreach ($cfg_smileys as $key => $val) {
$str = str_replace($key, "<img src=\"" . $image_url . $cfg_smileys[$key][0] . "\" width=\"" . $cfg_smileys[$key][1] . "\" height=\"" . $cfg_smileys[$key][2] . "\" alt=\"" . $cfg_smileys[$key][3] . "\"/>", $str);
}
return $ubb ? ubb($str) : $str;
}
开发者ID:stonelf,项目名称:mcgmh,代码行数:12,代码来源:smiley.helper.php
示例4: ajax_themeinfoOp
/**
* ajax获取话题详细信息 话题列表页使用
*/
public function ajax_themeinfoOp()
{
// 话题信息
$this->themeInfo();
$data = $this->theme_info;
$model = Model();
// 话题商品
$goods_list = $model->table('circle_thg')->where(array('theme_id' => $this->t_id, 'reply_id' => 0))->select();
$goods_list = tidyThemeGoods($goods_list, 'themegoods_id');
$data['goods_list'] = $goods_list;
// 附件
$affix_list = $model->table('circle_affix')->where(array('affix_type' => 1, 'theme_id' => $this->t_id))->select();
if (!empty($affix_list)) {
foreach ($affix_list as $key => $val) {
$affix_list[$key]['affix_filename'] = themeImageUrl($val['affix_filename']);
$affix_list[$key]['affix_filethumb'] = themeImageUrl($val['affix_filethumb']);
}
}
$data['affix_list'] = $affix_list;
// 访问数增加
$model->table('circle_theme')->update(array('theme_id' => $this->t_id, 'theme_browsecount' => array('exp', 'theme_browsecount+1')));
$data['theme_content'] = ubb($data['theme_content']);
if ($data['theme_edittime'] != '') {
$data['theme_edittime'] = @date('Y-m-d H:i', $data['theme_edittime']);
}
// 是否赞过话题
$data['theme_nolike'] = 1;
if (isset($_SESSION['member_id'])) {
// 是否赞过话题
$like_info = $model->table('circle_like')->where(array('theme_id' => $this->t_id, 'member_id' => $_SESSION['member_id']))->find();
if (empty($like_info)) {
$data['theme_nolike'] = 1;
} else {
$data['theme_nolike'] = 0;
}
}
if (strtoupper(CHARSET) == 'GBK') {
$data = Language::getUTF8($data);
}
echo json_encode($data);
exit;
}
开发者ID:mengtaolin,项目名称:shopping,代码行数:45,代码来源:theme.php
示例5: index
public function index()
{
if (IS_CLI) {
$data = M('Content')->field("id,content")->select();
foreach ($data as $value) {
$value['content'] = ubb($value['content']);
M('Content')->save($value);
}
} else {
$category = D('Category')->getTree();
$lists = D('Document')->lists(null);
$this->assign('category', $category);
//栏目
$this->assign('lists', $lists);
//列表
$this->assign('page', D('Document')->page);
//分页
$this->display();
}
}
开发者ID:commiunty,项目名称:Mytest,代码行数:20,代码来源:IndexController.class.php
示例6: get_date
}
?>
[<?php
echo $rs[$i]['ip'];
?>
]</th>
<th width="47">时间:</th>
<th width="390"><?php
echo get_date($rs[$i]['addtime'], 'Y-m-d H:i:s');
?>
</th>
</tr>
<tr>
<td>评论:</td>
<td colspan="4"><?php
echo ubb($rs[$i]['contents']);
?>
<?php
if ($rs[$i]['reply']) {
?>
<blockquote style="background-color:#F7F7F7;border:#E5E5E5 solid 1px; padding:4px;">
<?php
echo $rs[$i]['reply'];
?>
</blockquote>
<?php
}
?>
<blockquote id="reply<?php
echo $rs[$i]['id'];
?>
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:comment.php
示例7: questionOp
/**
* GET 问题详情
*/
public function questionOp()
{
// 问题信息
$question_id = intval($_GET['q_id']);
if ($question_id > 0) {
$this->questionInfo($question_id);
$data = $this->question_info;
$model = Model();
// 访问数增加
$model->table('circle_theme')->update(array('theme_id' => $question_id, 'theme_browsecount' => array('exp', 'theme_browsecount+1')));
$data['theme_content'] = ubb($data['theme_content']);
if ($data['theme_edittime'] != '') {
$data['theme_edittime'] = @date('Y-m-d H:i', $data['theme_edittime']);
}
$data['member_avatar'] = getMemberAvatarForID($data['member_id']);
if (strtoupper(CHARSET) == 'GBK') {
$data = Language::getUTF8($data);
}
output_data(array('questionInfo' => $data));
die;
} else {
output_error("问题id错误");
die;
}
}
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:28,代码来源:question.php
示例8: WHERE
$db->query("DELETE FROM et_messages WHERE (senduid ='{$my['user_id']}' || sendtouid ='{$my['user_id']}') && message_id='{$_GET['mid']}'");
echo "success";
exit;
}
$i = 0;
$start = ($page - 1) * $home_num;
if ($pm == "my") {
$sql = "SELECT * FROM et_messages WHERE sendtouid='{$my['user_id']}' order by message_id desc limit {$start},{$home_num}";
} elseif ($pm == "send") {
$sql = "SELECT * FROM et_messages WHERE senduid='{$my['user_id']}' order by message_id desc limit {$start},{$home_num}";
}
$query = $db->query($sql);
while ($data = $db->fetch_array($query)) {
$i++;
$sendhead = $data['sendhead'] ? $data['sendhead'] : "{$webaddr}/images/noavatar.jpg";
$messagebody = ubb($data['messagebody']);
$isread = $data['isread'] ? 1 : 2;
$mymsg[] = array("message_id" => $data['message_id'], "senduid" => $data['senduid'], "sendname" => $data['sendname'], "sendnickname" => $data['sendnickname'], "sendhead" => $sendhead, "messagebody" => $messagebody, "sendtouid" => $data['sendtouid'], "sendtoname" => $data['sendtoname'], "sendtonickname" => $data['sendtonickname'], "sendtime" => timeop($data['sendtime']), "isread" => $isread);
}
if ($my['priread'] != 0) {
$db->query("UPDATE et_users SET priread = 0 WHERE user_id='{$my['user_id']}'");
$db->query("UPDATE et_messages SET isread = 1 WHERE sendtouid='{$my['user_id']}'");
}
if ($pm == "my") {
$total = getcount('et_messages', array('sendtouid' => $my[user_id]));
} elseif ($pm == "send") {
$total = getcount('et_messages', array('senduid' => $my[user_id]));
}
$pg_num = ceil($total / $home_num);
//模板和Foot
$web_name3 = '我的私信';
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:31,代码来源:op_privatemsg.inc.php
示例9: while
$start = ($page - 1) * $index_num;
$query = $db->query("SELECT * FROM et_content WHERE privacy=0 && replyshow=1 ORDER BY posttime DESC LIMIT {$start},{$index_num}");
while ($data = $db->fetch_array($query)) {
$indexnum++;
$content[] = array('content_id' => $data['content_id'], 'user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'user_nickname' => $data['user_nickname'], 'user_head' => $data['user_head'], 'content_body' => ubb($data['content_body']), 'posttime' => timeop($data['posttime']), 'type' => $data['type'], 'status_id' => $data['status_id'], 'status_uname' => $data['status_uname'], 'status_unickname' => $data['status_unickname'], 'replytimes' => $data['replytimes'], 'zftimes' => $data['zftimes']);
}
echo loadindex($content);
exit;
}
//新信息
if ($act == 'getupdate') {
$lastid = $_GET['lastid'];
if ($lastid > 0) {
$query = $db->query("SELECT * FROM et_content WHERE privacy=0 && replyshow=1 && content_id>'{$lastid}'");
while ($data = $db->fetch_array($query)) {
$content[] = array('content_id' => $data['content_id'], 'user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'user_nickname' => $data['user_nickname'], 'user_head' => $data['user_head'], 'content_body' => ubb($data['content_body']), 'posttime' => timeop($data['posttime']), 'type' => $data['type'], 'status_id' => $data['status_id'], 'status_uname' => $data['status_uname'], 'status_unickname' => $data['status_unickname'], 'replytimes' => $data['replytimes'], 'zftimes' => $data['zftimes']);
}
}
echo loadindex($content);
exit;
}
//上榜
$query = $db->query("SELECT user_name,nickname,user_head FROM et_users WHERE indextop=1 ORDER BY rand() LIMIT 7");
while ($data = $db->fetch_array($query)) {
$data['user_head'] = $data['user_head'] ? "{$webaddr}/attachments/head/" . $data['user_head'] : "{$webaddr}/images/noavatar.jpg";
$indextop[] = array('user_name' => $data['user_name'], 'nickname' => $data['nickname'], 'user_head' => $data['user_head']);
}
//在线用户 放入memcache 半小时更新
$query = $db->query("SELECT user_id,user_name,nickname,user_head FROM et_users WHERE last_login>='" . ($addtime - 600) . "' ORDER BY last_login DESC LIMIT 12");
while ($data = $db->fetch_array($query)) {
$uhead = $data[user_head] ? "{$webaddr}/attachments/head/" . $data[user_head] : "{$webaddr}/images/noavatar.jpg";
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:31,代码来源:index.php
示例10: while
} else {
echo "ºÜ±§Ç¸£¬É¾³ýÆÀÂÛʧ°ÜÁË£¬";
exit;
}
}
$i = 0;
$start = ($page - 1) * $home_num;
$sql = "SELECT r.*,u.user_id,u.user_name,u.user_head FROM et_users AS u,et_sharereply AS r where r.user_id=u.user_id && r.share_id='{$sid}' order by r.shre_id desc limit {$start},{$home_num}";
$query = $db->query($sql);
while ($data = $db->fetch_array($query)) {
$i = $i + 1;
$shre_id = $data['shre_id'];
$reuid = $data['user_id'];
$reuname = $data['user_name'];
$reuhead = $data['user_head'] ? "{$webaddr}/attachments/head/" . $data['user_head'] : "{$webaddr}/images/noavatar.jpg";
$reply_body = ubb($data['reply_body']);
$reply_time = timeop($data['reply_time']);
$reply[] = array("shre_id" => $shre_id, "reuid" => $reuid, "reuname" => $reuname, "reuhead" => $reuhead, "reply_body" => $reply_body, "reply_time" => $reply_time);
}
$query = $db->query("select count(*) as count from et_sharereply where share_id='{$sid}'");
$row = $db->fetch_array($query);
$total = $row['count'];
$pg_num = $total / $index_num;
$pg_num = intval($pg_num);
if ($total != $pg_num * $index_num) {
$pg_num = $pg_num + 1;
}
$np = $page + 1;
$pp = $page - 1;
if ($pg_num > 8) {
if ($pg_num - $page <= 6) {
开发者ID:BGCX067,项目名称:eztalk-svn-to-git,代码行数:31,代码来源:op_sharereply.inc.php
示例11: artikelInOrde
function artikelInOrde($artikel)
{
$artikel = stripslashes($artikel);
$artikel = ubb($artikel);
$artikel = nl2br($artikel);
return $artikel;
}
开发者ID:erwincornelis,项目名称:Lepa.slm.be,代码行数:7,代码来源:php_functions.php
示例12: afkorten
<tr>
<td valign="top" style="text-align: right;" class="gbHead"><strong>
<?php
echo $rij['naam'];
// verkorte if constructie
// indien email en website zijn opgegeven worden ze weergegeven, anders niet
// stripslashes zorgt voor het verwijderen van overbodige backslashes die voor
// de escapes zorgden bij het in de tabel steken.
echo $rij['email'] != '-' ? '<br /><abbr title="' . $rij['email'] . '">' . afkorten($rij['email'], 27) : '</abbr>';
echo $rij['website'] != '-' ? '<br /><a href="' . $rij['website'] . '" target="_blank"><abbr title="' . $rij['website'] . '">' . afkorten($rij['website'], 27) . '</abbr></a>' : '';
echo '<br />' . $rij['datum'];
?>
</strong>
</td>
<td valign="top" style="background-image: url('images/gastenboek.png'); background-position: 336px 0px; background-repeat: no-repeat;" class="gbBody"><?php
echo ubb($rij['bericht'], $mapSmileys);
?>
</td>
</tr>
</table>
</div>
<?php
$nummer++;
}
}
// NAVIGATIE
// enkel wanneer het aantal entries groter is dan het max aantal te tonen berichten
// moet de navigatie weergegeven worden
if ($aantalRijen > $max) {
echo '<div class="gbPaginasOuter"><div class="gbPaginasInner" style="font-size: 12px;">';
echo '<table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"><tr><td style="width: 80px; text-align: left;" valign="top">';
开发者ID:erwincornelis,项目名称:00_Layouts,代码行数:31,代码来源:gastenboek_lezen.php
示例13: afkorten
<tr>
<td valign="top" style="text-align: right;" class="gbHead"><strong>
<?php
echo $rij['naam'];
// verkorte if constructie
// indien email en website zijn opgegeven worden ze weergegeven, anders niet
// stripslashes zorgt voor het verwijderen van overbodige backslashes die voor
// de escapes zorgden bij het in de tabel steken.
echo $rij['email'] != '-' ? '<br />' . afkorten(stripslashes($rij['email']), 27) : '';
echo $rij['website'] != '-' ? '<br /><a href="' . stripslashes($rij['website']) . '" target="_blank">' . afkorten(stripslashes($rij['website']), 27) . '</a>' : '';
echo '<br />' . $rij['datum'];
?>
</strong>
</td>
<td valign="top" style="background-image: url('images/gastenboek.png'); background-position: 336px 0px; background-repeat: no-repeat;" class="gbBody"><?php
echo ubb(stripslashes($rij['bericht']), $mapSmileys);
?>
</td>
</tr>
</table>
</div>
<div class="gbItem">
<table border="0" cellpadding="0" cellspacing="0" style="width: 574px;">
<tr>
<td>
<a href="?pagina=gastenboek">Keer terug naar de index</a>
</td>
<td style="width: 10px; text-align: center; padding: 5px;">
<a href="?pagina=gastenboek&action=gastenboek_verwijderen&gastenboekId=<?php
echo $rij['id'];
开发者ID:erwincornelis,项目名称:00_Layouts,代码行数:31,代码来源:gastenboek_meer.php
示例14: ubb
<?php
if (isset($_COOKIE['username'])) {
?>
<span>[<a href="#ree" name="reply_re" title="回复<?php
echo $i + ($page - 1) * $pagesize;
?>
楼的<?php
echo $re['username'];
?>
">回复</a>]</span></h3>
<?php
}
?>
<div class="detail">
<?php
echo ubb($re['content']);
?>
</div>
</div>
</div>
<div id="line">
</div>
<?php
$i++;
}
?>
<div id="page_text">
<ul>
<li><?php
echo $page;
开发者ID:hachi-zzq,项目名称:guest-cms,代码行数:31,代码来源:article.php
示例15: comment
public function comment()
{
$Comment = D('Comment');
if ($comment = $Comment->create()) {
//dump($comment);
$list = $Comment->add();
if ($list) {
// 更新评论数
$objDao = D("Blog");
$objDao->setInc('commentCount', "id='" . $comment["recordId"] . "'");
// 返回客户端数据
$comment["content"] = nl2br(ubb(trim($comment["content"])));
$comment["id"] = $list;
$this->ajaxReturn($comment, "评论成功!", 1);
} else {
$this->error("评论失败!");
}
} else {
$this->error($Comment->getError());
}
}
开发者ID:zjstage,项目名称:ThinkPHP,代码行数:21,代码来源:PublicAction.class.php
示例16: str
function str($msg)
{
global $admin;
if (!$admin[html]) {
$msg = htmlspecialchars($msg);
}
if ($admin[ubb]) {
$msg = ubb($msg);
}
$msg = nl2br($msg);
#处理message
$msg = str_replace("\n", "", $msg);
#处理message
$msg = str_replace("\r", "", $msg);
#处理message
return $msg;
}
开发者ID:nldfr219,项目名称:zhi,代码行数:17,代码来源:index.php
示例17: tologin
tologin();
if ($action == 'follow') {
$follow = $_POST['follow'];
$follownew = array();
for ($i = 0; $i < count($follow); $i++) {
$isfriend = isfriend($follow[$i], $my[user_id]);
if ($isfriend == 0 && $follow[$i] != $my[user_id]) {
$follownew[] = $follow[$i];
}
}
if ($follownew) {
for ($j = 0; $j < count($follownew); $j++) {
$db->query("INSERT INTO et_friend (fid_jieshou,fid_fasong) VALUES ('{$follownew[$j]}','{$my['user_id']}')");
frinum($my[user_id]);
frinum($follownew[$j]);
}
}
header("location: {$webaddr}/op/setting");
exit;
}
$query = $db->query("SELECT * FROM et_users WHERE user_id=1 || (followme_num>0 && lastconttime>0) ORDER BY followme_num DESC LIMIT 10");
while ($data = $db->fetch_array($query)) {
$uhead = $data['user_head'] ? "{$webaddr}/attachments/head/" . $data['user_head'] : "{$webaddr}/images/noavatar.jpg";
$follows[] = array('user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'nickname' => $data['nickname'], 'user_head' => $uhead, 'lastcontent' => ubb($data['lastcontent']), 'lastconttime' => timeop($data['lastconttime']), 'followme_num' => $data['followme_num'], 'msg_num' => $data['msg_num']);
}
//模板和Foot
$web_name3 = "新来乍到";
$sqlnum = $db->querynum;
$mtime = explode(' ', microtime());
$loadtime = $mtime[1] + $mtime[0] - $starttime;
include $template->getfile('op_guide.htm');
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:31,代码来源:op_guide.inc.php
示例18: array
<h1>gastenboek</h1>
<?php
$mapSmileys = "../images/smileys/";
if (isset($_GET['action'])) {
$toegelaten = array('gastenboek_verwijderen', 'gastenboek_meer');
if (in_array($_GET['action'], $toegelaten) && file_exists($_GET['action'] . '.php')) {
include $_GET['action'] . '.php';
} else {
include '../error.php';
}
} else {
$query = mysql_query("SELECT * FROM gastenboek ORDER BY id DESC") or die(mysql_error());
if (mysql_num_rows($query) < 1) {
echo '<h6>Er zijn nog geen berichten in het gastenboek aanwezig</h6>';
} else {
$nummer = 1;
echo '<div class="gbItem">';
echo '<table border="0" cellpadding="0" cellspacing="0" style="width: 574px;">';
while ($rij = mysql_fetch_array($query)) {
$color = $nummer % 2 == 0 ? 'E5E5E5' : 'DFDFDF';
echo '<tr>';
echo '<td style="border-bottom: 1px dashed #B0B0B0; background-color: #' . $color . '; width: 170px; padding: 5px;">' . $rij['naam'] . '</td>';
echo '<td style="border-bottom: 1px dashed #B0B0B0; background-color: #' . $color . '; padding: 5px;"><a href="?pagina=gastenboek&action=gastenboek_meer&gastenboekId=' . $rij['id'] . '">' . ubb(afkorten($rij['bericht'], 50), $mapSmileys) . '</a></td>';
echo '<td style="border-bottom: 1px dashed #B0B0B0; background-color: #' . $color . '; width: 10px; text-align: center; padding: 5px;"><a href="?pagina=gastenboek&action=gastenboek_verwijderen&gastenboekId=' . $rij['id'] . '" onclick="javascript:return confirm(\'Weet u zeker dat u het bericht van persoon \\n \\t' . $rij['naam'] . '\\n definitief wilt verwijderen? \\n Deze actie is onomkeerbaar!\')"><img src="../images/delete.png" width="15" height="15" border="0" alt="delete" title="delete" /></a></td>';
echo '</tr>';
$nummer++;
}
echo '</table></div>';
}
}
开发者ID:erwincornelis,项目名称:00_Layouts,代码行数:30,代码来源:gastenboek.php
示例19: foreach
?>
<div style="padding-left:10px;word-break:break-all; table-layout: fixed;"><?php
echo $value['isSecret'] == 1 && $_SESSION['rights'] != "admin" ? $strGuestBookHidden : $gContent;
?>
</div>
<?php
}
?>
</div>
<?php
//取得回复
$sub_sql = "select distinct a.*,b.id as member_id,b.nickname,b.isHiddenEmail,b.email as member_email,b.homePage as member_homepage from " . $DBPrefix . "guestbook as a left join " . $DBPrefix . "members as b on a.author=b.username where parent='" . $value['id'] . "' order by postTime";
$query_result = $DMC->query($sub_sql);
$arr_sub = $DMC->fetchQueryAll($query_result);
foreach ($arr_sub as $fa) {
$rContent = ubb($fa['content']);
$icon_path = $fa['isSecret'] == 1 ? "images/icon_lock.gif" : "images/icon_reply.gif";
//头像
if ($settingInfo['gbface'] == 1) {
$myIcons = empty($fa['face']) ? "images/avatars/1.gif" : "images/avatars/" . $fa['face'] . ".gif";
} else {
$myIcons = "";
}
if ($fa['member_id'] > 0) {
$authorname = $fa['nickname'] != "" ? $fa['nickname'] : $fa['author'];
$guestemail = $fa['isHiddenEmail'] == 0 || !empty($_SESSION['rights']) && $_SESSION['rights'] == 'admin' ? str_replace("@", "#", $fa['member_email']) : "";
$guestemail = $guestemail != "" ? "<a href=\"mailto:{$guestemail}\" title=\"{$guestemail}\" target=\"_blank\">{$strShowEmail}</a>" : "";
$guesthomeurl = $fa['member_homepage'] != "" ? "<a href=\"{$fa['member_homepage']}\" target=\"_blank\">{$strShowHomepage}</a>" : "";
if (!empty($fa['member_homepage'])) {
$fa['homepage'] = $fa['member_homepage'];
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:guestbook_page_ajax.inc.php
示例20: while
echo "信息删除失败,可能网络错误或者您没有删除的权限!";
exit;
}
}
$i = 0;
$start = ($page - 1) * $home_num;
$sql = "SELECT s.content_id,s.content_body,s.posttime,s.type,s.status_id,s.status_uname,s.status_type,u.user_id,u.user_name,u.user_head,t.topic_id,t.topic_body,t.open FROM et_users AS u,et_content AS s left join et_topic AS t on s.topicid=t.topic_id && t.open=1 where s.user_id=u.user_id && s.user_id='{$user['user_id']}' order by s.content_id desc limit {$start},{$home_num}";
$query = $db->query($sql);
while ($data = $db->fetch_array($query)) {
$i = $i + 1;
$contentid = $data['content_id'];
$home_uid = $data['user_id'];
$home_uname = $data['user_name'];
$home_uhead = $data['user_head'] ? "{$webaddr}/attachments/head/" . $data['user_head'] : "{$webaddr}/images/noavatar.jpg";
$content = $data['content_body'];
$content = ubb($content);
$posttime = timeop($data['posttime']);
$statusid = $data['status_id'];
$status_uname = $data['status_uname'];
$status_type = $data['status_type'];
$type = $data['type'];
$topic_body = $data['topic_body'] ? "<a href='{$webaddr}/op/topic/{$data['topic_id']}' style='text-decoration:none;'><font color='red'>[" . $data['topic_body'] . "]</font></a> " : "";
$home[] = array("contentid" => $contentid, "home_uid" => $home_uid, "home_uname" => $home_uname, "home_uhead" => $home_uhead, "content" => $content, "posttime" => $posttime, "type" => $type, "statusid" => $statusid, "status_uname" => $status_uname, "status_type" => $status_type, "topic_body" => $topic_body);
}
$sql = "select count(*) AS count from et_content where user_id='{$user['user_id']}'";
$query = $db->query($sql);
$row = $db->fetch_array($query);
$total = $row['count'];
$pg_num = $total / $home_num;
$pg_num = intval($pg_num);
if ($total != $pg_num * $home_num) {
开发者ID:BGCX067,项目名称:eztalk-svn-to-git,代码行数:31,代码来源:hm_home.inc.php
注:本文中的ubb函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论