当前位置: 首页>>代码示例>>PHP>>正文


PHP get_total_posts函数代码示例

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


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


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