• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_total_posts函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_total_posts函数的典型用法代码示例。如果您正苦于以下问题:PHP get_total_posts函数的具体用法?PHP get_total_posts怎么用?PHP get_total_posts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_total_posts函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: DialogBox

    }
}
$out .= $dialogBox->render();
//display edit form if any
if (isset($form)) {
    $formBox = new DialogBox();
    $formBox->form($form->render());
    $out .= $formBox->render() . '<hr />';
}
//display topic review if any
if ($topicSettingList) {
    // get post and use pager
    if (!$viewall) {
        $postLister = new postLister($topicId, $start, get_conf('posts_per_page'));
    } else {
        $postLister = new postLister($topicId, $start, get_total_posts($topicId, 'topic'));
        $incrementViewCount = false;
    }
    // get post and use pager
    $postList = $postLister->get_post_list();
    $totalPosts = $postLister->sqlPager->get_total_item_count();
    $pagerUrl = claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?topic=' . $topicId));
    //increment topic view count if required
    if ($incrementViewCount) {
        increase_topic_view_count($topicId);
        $claro_notifier->is_a_notified_ressource(claro_get_current_course_id(), $claro_notifier->get_notification_date(claro_get_current_user_id()), claro_get_current_user_id(), claro_get_current_group_id(), claro_get_current_tool_id(), $forumId . "-" . $topicId);
        //$claroline->notifier->event( 'forum_read_topic', array( 'data' => array( 'topic_id' => $topicId ) ) );
    }
    if ($is_postAllowed) {
        $cmdList = get_forum_toolbar_array('viewtopic', $forumSettingList['forum_id'], $forumSettingList['cat_id'], $topicId);
        if (count($postList) > 2) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:viewtopic.php


示例2: forumerror

         forumerror('0001');
     }
     $sql = "UPDATE " . $NPDS_Prefix . "forumtopics SET topic_title = '{$subject}', topic_time = '" . date("Y-m-d H:i:s", time() + $gmt * 3600) . "', current_poster='" . $userdata['uid'] . "' WHERE topic_id = '" . $row['topic_id'] . "'";
     if (!($result = sql_query($sql))) {
         forumerror('0020');
     }
     redirect_url("{$hrefX}?topic=" . $row['topic_id'] . "&forum={$forum}");
 } else {
     $indice = sql_num_rows(sql_query("select post_id from " . $NPDS_Prefix . "posts where post_idH='{$post_id}'"));
     if (!$indice) {
         $sql = "DELETE FROM " . $NPDS_Prefix . "posts WHERE post_id='{$post_id}'";
         if (!($r = sql_query($sql))) {
             forumerror('0001');
         }
         control_efface_post("forum_npds", $post_id, "", "");
         if (get_total_posts($forum, $row['topic_id'], "topic", $Mmod) == 0) {
             $sql = "DELETE FROM " . $NPDS_Prefix . "forumtopics WHERE topic_id = '" . $row['topic_id'] . "'";
             if (!($r = sql_query($sql))) {
                 forumerror('0001');
             }
             $sql = "DELETE FROM " . $NPDS_Prefix . "forum_read WHERE topicid = '" . $row['topic_id'] . "'";
             @sql_query($sql);
             redirect_url("viewforum.php?forum={$forum}");
             die;
         } else {
             $result = sql_query("SELECT post_time, poster_id FROM " . $NPDS_Prefix . "posts where topic_id='" . $row['topic_id'] . "' ORDER BY post_id DESC limit 0,1");
             $rowX = sql_fetch_row($result);
             $sql = "UPDATE " . $NPDS_Prefix . "forumtopics SET topic_time = '{$rowX['0']}', current_poster='{$rowX['1']}' WHERE topic_id = '" . $row['topic_id'] . "'";
             if (!($r = sql_query($sql))) {
                 forumerror('0001');
             }
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:31,代码来源:editpost.php


示例3: number_format

<?php

// Get started
require_once 'admin.php';
require_once BB_PATH . BB_INC . 'functions.bb-statistics.php';
// Get counts and format numbers
$rn_forums = number_format(get_total_forums());
$rn_forums = sprintf(__ngettext('<span>%s</span> forum', '<span>%s</span> forums', $rn_forums), $rn_forums);
$rn_topics = number_format(get_total_topics());
$rn_topics = sprintf(__ngettext('<span>%s</span> topic', '<span>%s</span> topics', $rn_topics), $rn_topics);
$rn_posts = number_format(get_total_posts());
$rn_posts = sprintf(__ngettext('<span>%s</span> post', '<span>%s</span> posts', $rn_posts), $rn_posts);
$rn_users = number_format(bb_get_total_users());
$rn_users = sprintf(__ngettext('<span>%s</span> user', '<span>%s</span> users', $rn_users), $rn_users);
$rn_topic_tags = number_format(bb_get_total_topic_tags());
$rn_topic_tags = sprintf(__ngettext('<span>%s</span> tag', '<span>%s</span> tags', $rn_topic_tags), $rn_topic_tags);
$rn_topics_average = number_format(get_topics_per_day());
$rn_topics_average = sprintf(__ngettext('<span>%s</span> topic', '<span>%s</span> topics', $rn_topics_average), $rn_topics_average);
$rn_posts_average = number_format(get_posts_per_day());
$rn_posts_average = sprintf(__ngettext('<span>%s</span> post', '<span>%s</span> posts', $rn_posts_average), $rn_posts_average);
$rn_users_average = number_format(get_registrations_per_day());
$rn_users_average = sprintf(__ngettext('<span>%s</span> user', '<span>%s</span> users', $rn_users_average), $rn_users_average);
$rn_topic_tags_average = number_format(bb_get_topic_tags_per_day());
$rn_topic_tags_average = sprintf(__ngettext('<span>%s</span> tag', '<span>%s</span> tags', $rn_topic_tags_average), $rn_topic_tags_average);
// Filter the numbers
$rn = apply_filters('bb_admin_right_now', array('forums' => array($rn_forums, '-'), 'topics' => array($rn_topics, $rn_topics_average), 'posts' => array($rn_posts, $rn_posts_average), 'topic_tags' => array($rn_topic_tags, $rn_topic_tags_average), 'users' => array($rn_users, $rn_users_average)));
$bb_admin_body_class = ' bb-admin-dashboard';
bb_get_admin_header();
?>

<div class="wrap">
开发者ID:un1coin,项目名称:ovn-space,代码行数:31,代码来源:index.php


示例4: get_total_posts

 }
 if ($ibid = theme_image("forum/icons/posticon.gif")) {
     $imgtmpP = $ibid;
 } else {
     $imgtmpP = "images/forum/icons/posticon.gif";
 }
 if ($ibid = theme_image("box/right.gif")) {
     $imgtmpRi = $ibid;
 } else {
     $imgtmpRi = "images/download/right.gif";
 }
 if ($myrow = sql_fetch_assoc($result)) {
     $linked = "onmouseover=\"this.className='lignb'; this.style.cursor='default';\" " . " onmouseout=\"this.className='ligna';\"";
     do {
         echo '<tr>';
         $replys = get_total_posts($forum, $myrow['topic_id'], "topic", $Mmod);
         $replys--;
         if ($replys >= 0) {
             global $smilies;
             if ($smilies) {
                 $rowQ1 = Q_Select("SELECT image FROM " . $NPDS_Prefix . "posts WHERE topic_id='" . $myrow['topic_id'] . "' AND forum_id='{$forum}' LIMIT 0,1", 86400);
                 $image_subject = $rowQ1[0]['image'];
             }
             if ($user) {
                 $sqlR = "SELECT rid FROM " . $NPDS_Prefix . "forum_read WHERE forum_id='{$forum}' AND uid='{$userR['0']}' AND topicid='" . $myrow['topic_id'] . "' AND status!='0'";
                 if ($replys >= $hot_threshold) {
                     if (sql_num_rows(sql_query($sqlR)) == 0) {
                         $image = '<i class="fa fa-lg fa-file-text"></i>';
                     } else {
                         $image = '<i class="fa fa-lg fa-file"></i>';
                     }
开发者ID:npds,项目名称:npds_dune,代码行数:31,代码来源:viewforum.php


示例5: get_posts_per_day

/**
 * Get the average number of posts per day
 *
 * @since 0.7.2
 *
 * @return int|float
 */
function get_posts_per_day()
{
    return get_total_posts() / ceil((time() - bb_get_inception('timestamp')) / 3600 / 24);
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:11,代码来源:functions.bb-statistics.php


示例6: purify

 }
 $message = purify($message);
 $poster_ip = $_SERVER['REMOTE_ADDR'];
 $time = date("Y-m-d H:i:s");
 $topic_id = Database::get()->query("INSERT INTO forum_topic (title, poster_id, forum_id, topic_time) VALUES (?s, ?d, ?d, ?t)", $subject, $uid, $forum_id, $time)->lastInsertID;
 Indexer::queueAsync(Indexer::REQUEST_STORE, Indexer::RESOURCE_FORUMTOPIC, $topic_id);
 $post_id = Database::get()->query("INSERT INTO forum_post (topic_id, post_text, poster_id, post_time, poster_ip) VALUES (?d, ?s, ?d, ?t, ?s)", $topic_id, $message, $uid, $time, $poster_ip)->lastInsertID;
 Indexer::queueAsync(Indexer::REQUEST_STORE, Indexer::RESOURCE_FORUMPOST, $post_id);
 $forum_user_stats = Database::get()->querySingle("SELECT COUNT(*) as c FROM forum_post \n                        INNER JOIN forum_topic ON forum_post.topic_id = forum_topic.id\n                        INNER JOIN forum ON forum.id = forum_topic.forum_id\n                        WHERE forum_post.poster_id = ?d AND forum.course_id = ?d", $uid, $course_id);
 Database::get()->query("DELETE FROM forum_user_stats WHERE user_id = ?d AND course_id = ?d", $uid, $course_id);
 Database::get()->query("INSERT INTO forum_user_stats (user_id, num_posts, course_id) VALUES (?d,?d,?d)", $uid, $forum_user_stats->c, $course_id);
 Database::get()->query("UPDATE forum_topic\n                    SET last_post_id = ?d\n                WHERE id = ?d\n                AND forum_id = ?d", $post_id, $topic_id, $forum_id);
 Database::get()->query("UPDATE forum\n                    SET num_topics = num_topics+1,\n                    num_posts = num_posts+1,\n                    last_post_id = ?d\n\t\tWHERE id = ?d", $post_id, $forum_id);
 $topic = $topic_id;
 $total_forum = get_total_topics($forum_id);
 $total_topic = get_total_posts($topic) - 1;
 // subtract 1 because we want the number of replies, not the number of posts.
 // --------------------------------
 // notify users
 // --------------------------------
 $subject_notify = "{$logo} - {$langNewForumNotify}";
 $category_id = forum_category($forum_id);
 $cat_name = category_name($category_id);
 $c = course_code_to_title($course_code);
 $name = uid_to_name($uid);
 $title = course_id_to_title($course_id);
 $forum_message = "-------- {$langBodyMessage} ({$langSender}: {$name})\n{$message}--------";
 $plain_forum_message = q(html2text($forum_message));
 $body_topic_notify = "{$langBodyForumNotify} {$langInForums} '" . q($forum_name) . "' \n                               {$langInCat} '" . q($cat_name) . "' {$langTo} {$langCourseS} '{$c}' <br /><br />" . q($forum_message) . "<br />\n                               <br />{$gunet}<br /><a href='{$urlServer}courses/{$course_code}'>{$urlServer}courses/{$course_code}</a>";
 $plain_body_topic_notify = "{$langBodyForumNotify} {$langInForums} '" . q($forum_name) . "' {$langInCat} '" . q($cat_name) . "' {$langTo} {$langCourseS} '{$c}' \n\n{$plain_forum_message} \n\n{$gunet}\n<a href='{$urlServer}courses/{$course_code}'>{$urlServer}courses/{$course_code}</a>";
 $linkhere = "&nbsp;<a href='{$urlServer}main/profile/emailunsubscribe.php?cid={$course_id}'>{$langHere}</a>.";
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:newtopic.php


示例7: xoops_getmodulehandler

include XOOPS_ROOT_PATH."/header.php";

$xoopsTpl->assign('xoops_pagetitle', $xoops_pagetitle);
$xoopsTpl->assign('xoops_module_header', $xoops_module_header);
$xoopsTpl->assign('forum_index_title', $xforum_index_title);
if ($xoopsModuleConfig['wol_enabled']){
	$online_handler =& xoops_getmodulehandler('online', 'xforum');
	$online_handler->init();
    $xoopsTpl->assign('online', $online_handler->show_online());
}

/* display forum stats */
$xoopsTpl->assign(array(
	"lang_welcomemsg" => sprintf(_MD_WELCOME, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), 
	"total_topics" => get_total_topics(), 
	"total_posts" => get_total_posts(), 
	"lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), 
	"lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m"))));

$xforum_handler =& xoops_getmodulehandler('forum', 'xforum');
$xforums_obj = $xforum_handler->getForumsByCategory(array_keys($categories), "access");
$xforums_array = $xforum_handler->display($xforums_obj);
unset($xforums_obj);

if(count($xforums_array)>0){
    foreach ($xforums_array[0] as $parent => $xforum) {
        if (isset($xforums_array[$xforum['forum_id']])) {
            $xforum['subforum'] =& $xforums_array[$xforum['forum_id']];
        }
        $xforumsByCat[$xforum['forum_cid']][] = $xforum;
    }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:index.new.php


示例8: get_total_forums

<?php

require_once 'admin.php';
require_once BB_PATH . BB_INC . 'functions.bb-statistics.php';
$rn_forums = get_total_forums();
$rn_forums = sprintf(__ngettext('<span>%d</span> forum', '<span>%d</span> forums', $rn_forums), $rn_forums);
$rn_topics = get_total_topics();
$rn_topics = sprintf(__ngettext('<span>%d</span> topic', '<span>%d</span> topics', $rn_topics), $rn_topics);
$rn_posts = get_total_posts();
$rn_posts = sprintf(__ngettext('<span>%d</span> post', '<span>%d</span> posts', $rn_posts), $rn_posts);
$rn_users = bb_get_total_users();
$rn_users = sprintf(__ngettext('<span>%d</span> user', '<span>%d</span> users', $rn_users), $rn_users);
$rn_topic_tags = bb_get_total_topic_tags();
$rn_topic_tags = sprintf(__ngettext('<span>%d</span> tag', '<span>%d</span> tags', $rn_topic_tags), $rn_topic_tags);
$rn_topics_average = get_topics_per_day();
$rn_topics_average = sprintf(__ngettext('<span>%d</span> topic', '<span>%d</span> topics', $rn_topics_average), $rn_topics_average);
$rn_posts_average = get_posts_per_day();
$rn_posts_average = sprintf(__ngettext('<span>%d</span> post', '<span>%d</span> posts', $rn_posts_average), $rn_posts_average);
$rn_users_average = get_registrations_per_day();
$rn_users_average = sprintf(__ngettext('<span>%d</span> user', '<span>%d</span> users', $rn_users_average), $rn_users_average);
$rn_topic_tags_average = bb_get_topic_tags_per_day();
$rn_topic_tags_average = sprintf(__ngettext('<span>%d</span> tag', '<span>%d</span> tags', $rn_topic_tags_average), $rn_topic_tags_average);
$bb_admin_body_class = ' bb-admin-dashboard';
bb_get_admin_header();
?>

<div class="wrap">
	<h2><?php 
_e('Dashboard');
?>
</h2>
开发者ID:abc2mit,项目名称:abc2mit.github.io,代码行数:31,代码来源:index.php


示例9: q

    $forum_message = "-------- {$langBodyMessage} ({$langSender}: {$name} )\n{$message}--------";
    $plain_forum_message = q(html2text($forum_message));
    $body_topic_notify = "<br>{$langBodyTopicNotify} {$langInForum} '" . q($topic_title) . "' {$langOfForum} '" . q($forum_name) . "' \n                                {$langInCat} '" . q($cat_name) . "' {$langTo} {$langCourseS} '{$c}'  <br />\n                                <br />" . q($forum_message) . "<br /><br />{$gunet}<br />\n                                <a href='{$urlServer}{$course_code}'>{$urlServer}{$course_code}</a>";
    $plain_body_topic_notify = "{$langBodyTopicNotify} {$langInForum} '" . q($topic_title) . "' {$langOfForum} " . q($forum_name) . "' {$langInCat} '" . q($cat_name) . "' {$langTo} {$langCourseS} '{$c}' \n\n{$plain_forum_message} \n\n{$gunet}\n<a href='{$urlServer}{$course_code}'>{$urlServer}{$course_code}</a>";
    $linkhere = "&nbsp;<a href='{$urlServer}main/profile/emailunsubscribe.php?cid={$course_id}'>{$langHere}</a>.";
    $unsubscribe = "<br /><br />{$langNote}: " . sprintf($langLinkUnsubscribe, $title);
    $plain_body_topic_notify .= $unsubscribe . $linkhere;
    $body_topic_notify .= $unsubscribe . $linkhere;
    foreach ($sql as $r) {
        if (get_user_email_notification($r->user_id, $course_id)) {
            $emailaddr = uid_to_email($r->user_id);
            send_mail_multipart('', '', '', $emailaddr, $subject_notify, $plain_body_topic_notify, $body_topic_notify, $charset);
        }
    }
    // end of notification
    $total_posts = get_total_posts($topic);
    if ($total_posts > $posts_per_page) {
        $page = '&start=' . $posts_per_page * intval(($total_posts - 1) / $posts_per_page);
    } else {
        $page = '';
    }
    $_SESSION['message'] = "<div class='alert alert-success'>{$langStored}</div>";
    header("Location: {$urlServer}modules/forum/viewtopic.php?course={$course_code}&topic={$topic}&forum={$forum_id}" . $page);
    exit;
} else {
    // Topic review
    $tool_content .= action_bar(array(array('title' => $langBack, 'url' => "viewtopic.php?course={$course_code}&topic={$topic}&forum={$forum_id}", 'icon' => 'fa-reply', 'level' => 'primary-label')));
    if (!isset($reply)) {
        $reply = "";
    }
    $tool_content .= "\n    <div class='form-wrapper'>\n        <form class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;topic={$topic}&forum={$forum_id}' method='post'>\n            <input type='hidden' name='parent_post' value='{$parent_post}'>\n            <fieldset>\n            <div class='form-group'>\n              <label for='message' class='col-sm-2 control-label'>{$langBodyMessage}:</label>\n              <div class='col-sm-10'>\n                " . rich_text_editor('message', 15, 70, $reply) . "\n              </div>\n            </div>\n            <div class='form-group'>\n                <div class='col-sm-10 col-sm-offset-2'>\n                    <input class='btn btn-primary' type='submit' name='submit' value='{$langSubmit}'>\n                    <a class='btn btn-default' href='viewtopic.php?course={$course_code}&topic={$topic}&forum={$forum_id}'>{$langCancel}</a>\n                </div>\n            </div>              \n        </fieldset>\n\t</form>\n    </div>";
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:reply.php


示例10: total_posts

    ?>
</div>
								</div>
							</div>
						</div>
						<div class="col-md-4 col-sm-6 col-xs-12 statistics">
							<div class="row">
								<div class="col-xs-6">
									<div class="statistic-item"><?php 
    total_posts();
    ?>
</div>
								</div>
								<div class="col-xs-6">
									<div class="statistic-item-stat"><?php 
    echo _n('Post', 'Posts', get_total_posts(), 'luna');
    ?>
</div>
								</div>
							</div>
						</div>
						<div class="col-md-4 col-sm-6 col-xs-12 statistics">
							<div class="row">
								<div class="col-xs-6">
									<div class="statistic-item"><?php 
    newest_user();
    ?>
</div>
								</div>
								<div class="col-xs-6">
									<div class="statistic-item-stat"><?php 
开发者ID:BogusCurry,项目名称:Luna,代码行数:31,代码来源:footer.php


示例11: redirect_header

    redirect_header($url, 2, _MD_ALL_FORUM_MARKED . ' ' . $markresult);
}
$xoopsOption['template_main'] = 'newbb_index.html';
include XOOPS_ROOT_PATH . "/header.php";
if (!empty($xoopsModuleConfig['rss_enable'])) {
    $xoops_module_header .= '<link rel="alternate" type="application/xml+rss" title="' . $xoopsModule->getVar('name') . '" href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/rss.php" />';
}
$xoopsTpl->assign('xoops_module_header', $xoops_module_header);
if ($xoopsModuleConfig['wol_enabled']) {
    $online_handler =& xoops_getmodulehandler('online', 'newbb');
    $online_handler->init();
    $xoopsTpl->assign('online', $online_handler->show_online());
    $xoopsTpl->assign('color_admin', $xoopsModuleConfig['wol_admin_col']);
    $xoopsTpl->assign('color_mod', $xoopsModuleConfig['wol_mod_col']);
}
$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT, formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW, formatTimestamp(time(), "m"))));
$viewcat = !empty($_GET['cat']) ? intval($_GET['cat']) : 0;
$category_handler =& xoops_getmodulehandler('category', 'newbb');
if (!$viewcat) {
    $categories =& $category_handler->getAllCats("access");
    $xoopsTpl->assign('forum_index_title', '');
} else {
    $cat =& $category_handler->get($viewcat);
    if ($category_handler->getPermission($cat)) {
        $categories = array($cat);
    } else {
        $categories = array();
    }
    $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
}
if (count($categories) == 0) {
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:index.php


示例12: total_posts

function total_posts()
{
    echo get_total_posts();
}
开发者ID:istrwei,项目名称:Luna,代码行数:4,代码来源:statistic_functions.php


示例13: stripslashes

        if ($myrow = sql_fetch_assoc($sub_result)) {
            echo "<tbody><tr><td class=\"active\" colspan=\"7\">" . stripslashes($cat_title) . "</td></tr>";
            do {
                $num_for++;
                $last_post = get_last_post($myrow['forum_id'], "forum", "infos", true);
                echo "<tr>";
                $total_topics = get_total_topics($myrow['forum_id']);
                echo "<td><i class=\"fa fa-lg fa-file-text-o\"></i></td>";
                $name = stripslashes($myrow['forum_name']);
                $xfile .= "\$xforum[{$num_for}][1] = \"{$name}\";\n";
                $xfile .= "\$xforum[{$num_for}][2] = {$total_topics};\n";
                echo "<td><a href=\"viewforum.php?forum=" . $myrow['forum_id'] . "\" class=\"noir\"><span class=\"rouge\">" . $xforum[$num_for][1] . "</span> -/- {$name} </a>\n";
                $desc = stripslashes($myrow['forum_desc']);
                echo "<br />{$desc}</td>\n";
                echo "<td><span class=\"rouge\">" . $xforum[$num_for][2] . "</span> -/- {$total_topics}</td>\n";
                $total_posts = get_total_posts($myrow['forum_id'], "", "forum", false);
                $xfile .= "\$xforum[{$num_for}][3] = {$total_posts};\n";
                echo "<td><span class=\"rouge\">" . $xforum[$num_for][3] . "</span> -/- {$total_posts}</td>\n";
                echo "<td>{$last_post}</td>\n";
            } while ($myrow = sql_fetch_assoc($sub_result));
        }
    }
    echo "</tr></tbody></table>";
    $file = fopen("abla.log.php", "w");
    $xfile .= "?>\n";
    fwrite($file, $xfile);
    fclose($file);
    include "footer.php";
} else {
    redirect_url("index.php");
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:31,代码来源:abla.php


示例14: base64_decode

    $userX = base64_decode($user);
    $userdata = explode(':', $userX);
}
$moderator = get_moderator($mod);
$moderator = explode(' ', $moderator);
$Mmod = false;
if (isset($user)) {
    for ($i = 0; $i < count($moderator); $i++) {
        if ($userdata[1] == $moderator[$i]) {
            $Mmod = true;
            break;
        }
    }
}
$sql = "SELECT topic_title, topic_status, topic_poster FROM " . $NPDS_Prefix . "forumtopics WHERE topic_id = '{$topic}'";
$total = get_total_posts($forum, $topic, "topic", $Mmod);
if ($total > $posts_per_page) {
    $times = 0;
    $current_page = 0;
    for ($x = 0; $x < $total; $x += $posts_per_page) {
        if ($x >= $start and $current_page == 0) {
            $current_page = $times + 1;
        }
        $times++;
    }
    $pages = $times;
}
if (!($result = sql_query($sql))) {
    forumerror('0001');
}
$myrow = sql_fetch_assoc($result);
开发者ID:npds,项目名称:npds_dune,代码行数:31,代码来源:viewtopic.php


示例15: forum_admin_getPathStatus

 echo "</div>";
 echo "<div style='padding: 8px;'>" . _AM_XFORUM_ATTACHPATH . ": ";
 $attach_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/';
 $path_status = forum_admin_getPathStatus($attach_path);
 echo $attach_path . ' ( ' . $path_status . ' )';
 echo "<br />" . _AM_XFORUM_THUMBPATH . ": ";
 $thumb_path = $attach_path . 'thumbs/';
 // be careful
 $path_status = forum_admin_getPathStatus($thumb_path);
 echo $thumb_path . ' ( ' . $path_status . ' )';
 echo "</div>";
 echo "</fieldset><br />";
 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XFORUM_BOARDSUMMARY . "</legend>";
 echo "<div style='padding: 12px;'>";
 echo _AM_XFORUM_TOTALTOPICS . " <strong>" . get_total_topics() . "</strong> | ";
 echo _AM_XFORUM_TOTALPOSTS . " <strong>" . get_total_posts() . "</strong> | ";
 echo _AM_XFORUM_TOTALVIEWS . " <strong>" . get_total_views() . "</strong></div>";
 echo "</fieldset><br />";
 $report_handler =& xoops_getmodulehandler('report', 'xforum');
 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XFORUM_REPORT . "</legend>";
 echo "<div style='padding: 12px;'><a href='admin_report.php'>" . _AM_XFORUM_REPORT_PENDING . "</a> <strong>" . $report_handler->getCount(new Criteria("report_result", 0)) . "</strong> | ";
 echo _AM_XFORUM_REPORT_PROCESSED . " <strong>" . $report_handler->getCount(new Criteria("report_result", 1)) . "</strong>";
 echo "</div>";
 echo "</fieldset><br />";
 if ($xoopsModuleConfig['email_digest'] > 0) {
     $digest_handler =& xoops_getmodulehandler('digest', 'xforum');
     echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XFORUM_DIGEST . "</legend>";
     $due = $digest_handler->checkStatus() / 60;
     // minutes
     $prompt = $due > 0 ? sprintf(_AM_XFORUM_DIGEST_PAST, $due) : sprintf(_AM_XFORUM_DIGEST_NEXT, abs($due));
     echo "<div style='padding: 12px;'><a href='index.php?op=senddigest'>" . $prompt . "</a> | ";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:index.php


示例16: newbb_admin_getPathStatus

 echo "</div>";
 echo "<div style='padding: 8px;'>" . _AM_NEWBB_ATTACHPATH . ": ";
 $attach_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/';
 $path_status = newbb_admin_getPathStatus($attach_path);
 echo $attach_path . ' ( ' . $path_status . ' )';
 echo "<br />" . _AM_NEWBB_THUMBPATH . ": ";
 $thumb_path = $attach_path . 'thumbs/';
 // be careful
 $path_status = newbb_admin_getPathStatus($thumb_path);
 echo $thumb_path . ' ( ' . $path_status . ' )';
 echo "</div>";
 echo "</fieldset><br />";
 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_BOARDSUMMARY . "</legend>";
 echo "<div style='padding: 12px;'>";
 echo _AM_NEWBB_TOTALTOPICS . " <strong>" . get_total_topics() . "</strong> | ";
 echo _AM_NEWBB_TOTALPOSTS . " <strong>" . get_total_posts(0, 'all') . "</strong> | ";
 echo _AM_NEWBB_TOTALVIEWS . " <strong>" . get_total_views() . "</strong></div>";
 echo "</fieldset><br />";
 $report_handler =& xoops_getmodulehandler('report', 'newbb');
 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_REPORT . "</legend>";
 echo "<div style='padding: 12px;'><a href='admin_report.php'>" . _AM_NEWBB_REPORT_PENDING . "</a> <strong>" . $report_handler->getReportCount(0) . "</strong> | ";
 echo _AM_NEWBB_REPORT_PROCESSED . " <strong>" . $report_handler->getReportCount(1) . "</strong>";
 echo "</div>";
 echo "</fieldset><br />";
 if ($xoopsModuleConfig['email_digest'] > 0) {
     $digest_handler =& xoops_getmodulehandler('digest', 'newbb');
     echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_DIGEST . "</legend>";
     $due = $digest_handler->checkStatus() / 60;
     // minutes
     $prompt = $due > 0 ? sprintf(_AM_NEWBB_DIGEST_PAST, $due) : sprintf(_AM_NEWBB_DIGEST_NEXT, abs($due));
     echo "<div style='padding: 12px;'><a href='index.php?op=senddigest'>" . $prompt . "</a> | ";
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:index.php


示例17: foreach

    if (isset($arr[$key]['replies']) && !empty($arr[$key]['replies'])) {
        $prefix .= "&nbsp;&nbsp;";
        foreach ($arr[$key]['replies'] as $replykey) {
            $current = $current == 0 ? $replykey : $current;
            showTree($arr, $current, $replykey, $prefix, $foundusers);
        }
    }
}
if ($order == 'DESC') {
    $xoopsTpl->assign(array('order_current' => 'DESC', 'order_other' => 'ASC', 'lang_order_other' => _OLDESTFIRST));
} else {
    $xoopsTpl->assign(array('order_current' => 'ASC', 'order_other' => 'DESC', 'lang_order_other' => _NEWESTFIRST));
}
// initialize the start number of select query
$start = !empty($_GET['start']) ? intval($_GET['start']) : 0;
$total_posts = get_total_posts($topic_id, 'topic');
if ($total_posts > 50) {
    $viewmode = "flat";
    // hide link to theaded view
    $xoopsTpl->assign('lang_threaded', "");
    $xoopsTpl->assign('lang_flat', _FLAT);
} else {
    $xoopsTpl->assign(array('lang_threaded' => _THREADED, 'lang_flat' => _FLAT));
}
if ($can_post == 1) {
    $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "<a href=\"newtopic.php?forum=" . $forum . "\"><img src=\"" . $bbImage['post'] . "\" alt=\"" . _MD_POSTNEW . "\" /></a>"));
} else {
    $xoopsTpl->assign('viewer_can_post', false);
    if ($show_reg == 1) {
        $xoopsTpl->assign('forum_post_or_register', '<a href="' . XOOPS_URL . '/user.php?xoops_redirect=' . htmlspecialchars($xoopsRequestUri) . '">' . _MD_REGTOPOST . '</a>');
    } else {
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:viewtopic.php


示例18: intval

          <a href='$nexturl' aria-label='Next'>
            <span aria-hidden='true'>&raquo;</span>
          </a>
        </li>
      </ul>
    </nav>
    ";

}

// delete topic
if (($is_editor) and isset($_GET['topicdel'])) {
    if (isset($_GET['topic_id'])) {
        $topic_id = intval($_GET['topic_id']);
    }
    $number_of_posts = get_total_posts($topic_id);
    $sql = Database::get()->queryArray("SELECT id,poster_id,post_text FROM forum_post WHERE topic_id = ?d", $topic_id);
    $post_authors = array();
    foreach ($sql as $r) {
        $post_authors[] = $r->poster_id;
        //delete abuse_reports for forum_posts and log actions
        $result = Database::get()->queryArray("SELECT * FROM abuse_report WHERE `rid` = ?d AND `rtype` = ?s", $r->id, 'forum_post');
        foreach ($result as $res) {
            Log::record($res->course_id, MODULE_ID_ABUSE_REPORT, LOG_DELETE,
                array('id' => $res->id,
                     'user_id' => $res->user_id,
                     'reason' => $res->reason,
                     'message' => $res->message,
                     'rtype' => 'forum_post',
                     'rid' => $r->id,
                     'rcontent' => $r->post_text,
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:viewforum.php


示例19: redirect_header

// Author: Kazumi Ono (AKA onokazu)                                          //
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
include "header.php";
// this page uses smarty template
// this must be set before including main header.php
$xoopsOption['template_main'] = 'newbb_index.html';
include XOOPS_ROOT_PATH . "/header.php";
$myts =& MyTextSanitizer::getInstance();
$sql = 'SELECT c.* FROM ' . $xoopsDB->prefix('bb_categories') . ' c, ' . $xoopsDB->prefix("bb_forums") . ' f WHERE f.cat_id=c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order';
if (!($result = $xoopsDB->query($sql))) {
    redirect_header(XOOPS_URL . '/', 1, _MD_ERROROCCURED);
    exit;
}
$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME, $xoopsConfig['sitename']), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT, formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW, formatTimestamp(time(), "m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR));
$viewcat = !empty($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0;
$categories = array();
while ($cat_row = $xoopsDB->fetchArray($result)) {
    $categories[] = $cat_row;
}
$sql = 'SELECT f.*, u.uname, u.uid, p.topic_id, p.post_time, p.subject, p.icon FROM ' . $xoopsDB->prefix('bb_forums') . ' f LEFT JOIN ' . $xoopsDB->prefix('bb_posts') . ' p ON p.post_id = f.forum_last_post_id LEFT JOIN ' . $xoopsDB->prefix('users') . ' u ON u.uid = p.uid';
if ($viewcat != 0) {
    $sql .= ' WHERE f.cat_id = ' . $viewcat;
    $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX, $xoopsConfig['sitename']));
} else {
    $xoopsTpl->assign('forum_index_title', '');
}
$sql .= ' ORDER BY f.cat_id, f.forum_id';
if (!($result = $xoopsDB->query($sql))) {
    exit("Error");
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:index.php



注:本文中的get_total_posts函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_tpl函数代码示例发布时间:2022-05-15
下一篇:
PHP get_total_bonus函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap