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


PHP construct_page_nav函数代码示例

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


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

示例1: eval

    if ($show['inlinemod']) {
        $columncount++;
    }
    $show['forumlink'] = true;
    $threadbits = '';
    ($hook = vBulletinHook::fetch_hook('tags_list_threads')) ? eval($hook) : false;
    foreach ($threadids as $threadid) {
        $thread = $threads["{$threadid}"];
        $forumperms = fetch_permissions($thread['forumid']);
        if ($vbulletin->options['threadpreview'] > 0 and !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
            $thread['preview'] = '';
        }
        $thread = process_thread_array($thread, $lastread["{$thread['forumid']}"]);
        $show['disabled'] = ($movethread["{$thread['threadid']}"] or $deletethread["{$thread['threadid']}"] or $approvethread["{$thread['threadid']}"] or $openthread["{$thread['threadid']}"]) ? false : true;
        eval('$threadbits .= "' . fetch_template('threadbit') . '";');
    }
    if ($show['popups'] and $show['inlinemod']) {
        eval('$threadadmin_imod_menu = "' . fetch_template('threadadmin_imod_menu_thread') . '";');
    }
    $pagenav = construct_page_nav($pagenumber, $perpage, $totalthreads, 'tags.php?tag=' . urlencode(unhtmlspecialchars($tag['tagtext'])) . ($perpage != $vbulletin->options['maxthreads'] ? "&pp={$perpage}" : ''));
    $navbits = construct_navbits(array('tags.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['tags'], '' => construct_phrase($vbphrase['threads_tagged_with_x'], $tag['tagtext'])));
    eval('$navbar = "' . fetch_template('navbar') . '";');
    ($hook = vBulletinHook::fetch_hook('tags_list_complete')) ? eval($hook) : false;
    eval('print_output("' . fetch_template('tag_search') . '");');
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26862 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:tags.php

示例2: build_datastore

    build_datastore('maxloggedin', serialize($vbulletin->maxloggedin), 1);
}
$recordusers = $vbulletin->maxloggedin['maxonline'];
$recorddate = vbdate($vbulletin->options['dateformat'], $vbulletin->maxloggedin['maxonlinedate'], true);
$recordtime = vbdate($vbulletin->options['timeformat'], $vbulletin->maxloggedin['maxonlinedate']);
$currenttime = vbdate($vbulletin->options['timeformat']);
$metarefresh = '';
$show['refresh'] = false;
if ($vbulletin->options['WOLrefresh']) {
    $show['refresh'] = true;
    $refreshargs = ($vbulletin->GPC['who'] ? '&who=' . $vbulletin->GPC['who'] : '') . ($vbulletin->GPC['ua'] ? '&ua=1' : '');
    $refreshargs_js = ($vbulletin->GPC['who'] ? '&who=' . $vbulletin->GPC['who'] : '') . ($vbulletin->GPC['ua'] ? '&ua=1' : '');
    $refreshtime = $vbulletin->options['WOLrefresh'] * 10;
}
$frmjmpsel['wol'] = ' selected="selected" class="fjsel"';
construct_forum_jump();
$pagenav = construct_page_nav($pagenumber, $perpage, $totalonline, 'online.php?' . $vbulletin->session->vars['sessionurl'] . "sort={$sortfield}&order={$sortorder}&pp={$perpage}" . iif($vbulletin->GPC['who'], '&who=' . $vbulletin->GPC['who']) . iif($vbulletin->GPC['ua'], '&ua=1'));
$numbervisible += $numberinvisible;
$colspan = 2;
$colspan = iif($show['ip'], $colspan + 1, $colspan);
$colspan = iif($vbulletin->options['showimicons'], $colspan + 1, $colspan);
($hook = vBulletinHook::fetch_hook('online_complete')) ? eval($hook) : false;
$navbits = construct_navbits(array('' => $vbphrase['whos_online']));
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('WHOSONLINE') . '");');
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26760 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:online.php

示例3: eval

                        eval('$userbit = "' . fetch_template('pm_messagelistbit_user') . '";');
                    }
                    $show['pmicon'] = iif($pm['iconpath'], true, false);
                    $show['unread'] = iif(!$pm['messageread'], true, false);
                    ($hook = vBulletinHook::fetch_hook('private_messagelist_messagebit')) ? eval($hook) : false;
                    eval('$messagelistbits .= "' . fetch_template('pm_messagelistbit') . '";');
                }
            }
            // free up memory not required any more
            unset($pm_period_groups["{$groupid}"]);
            ($hook = vBulletinHook::fetch_hook('private_messagelist_period')) ? eval($hook) : false;
            // build group template
            eval('$messagelist_periodgroups .= "' . fetch_template('pm_messagelist_periodgroup') . '";');
        }
        // build pagenav
        $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], $totalmessages, 'private.php?' . $vbulletin->session->vars['sessionurl'] . 'folderid=' . $vbulletin->GPC['folderid'] . '&pp=' . $vbulletin->GPC['perpage']);
    }
    if ($vbulletin->GPC['folderid'] == -1) {
        $show['sentto'] = true;
        $show['movetofolder'] = false;
    } else {
        $show['sentto'] = false;
        $show['movetofolder'] = true;
    }
    $totalmessages = vb_number_format($totalmessages);
    $pmtotal = vb_number_format($vbulletin->userinfo['pmtotal']);
    $pmquota = vb_number_format($vbulletin->userinfo['permissions']['pmquota']);
    $templatename = 'pm_messagelist';
}
// #############################################################################
if ($templatename != '') {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:private.php

示例4: construct_page_nav

			$templater->register('bgclass', $bgclass);
			$templater->register('customfields', $customfields);
			$templater->register('userinfo', $userinfo);
		$memberlistbits .= $templater->render();
	}  // end while

	$last = $itemcount;

	if ($sqlsort == 'agesort')
	{
		$sortorder = ($sortorder == 'desc' ? 'asc' : 'desc');
	}

	$pagenav = construct_page_nav($pagenumber, $perpage, $totalusers, 'memberlist.php?' . $vbulletin->session->vars['sessionurl'], ''
		. (!empty($vbulletin->GPC['perpage']) ? "&pp=$perpage" : "")
		. (!empty($sortorder) ? "&order=$sortorder" : "")
		. (!empty($sortfield) ? "&sort=$sortfield" : "")
		. (!empty($sortaddon) ? "&$sortaddon" : "")
	);

	unset($customfieldsheader);
	if ($show['customfields'] AND is_array($profileinfo))
	{
		foreach ($profileinfo AS $index => $customfield)
		{
			$totalcols++;
			$customfield = $customfield['title'];
			$templater = vB_Template::create('memberlist_results_header');
				$templater->register('customfield', $customfield);
			$customfieldsheader .= $templater->render();
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:32,代码来源:memberlist.php

示例5: implode

     $pagenavbits[] = "pp={$perpage}";
 }
 if ($daysprune != ($vbulletin->userinfo['daysprune'] ? $vbulletin->userinfo['daysprune'] : 30)) {
     $pagenavbits[] = "daysprune={$daysprune}";
 }
 if ($sortfield != 'dateline') {
     $pagenavbits[] = "sortfield={$sortfield}";
 }
 if ($vbulletin->GPC['sortorder'] == 'asc') {
     $pagenavbits[] = 'order=' . $vbulletin->GPC['sortorder'];
 }
 if ($type == 'deleted') {
     $pagenavbits[] = 'type=deleted';
 }
 $pagenavurl = 'moderation.php?' . $vbulletin->session->vars['sessionurl'] . implode('&', $pagenavbits);
 $pagenav = construct_page_nav($pagenumber, $perpage, $picturetotal, $pagenavurl);
 $show['havepictures'] = $picturetotal ? true : false;
 $first = $picturetotal ? ($pagenumber - 1) * $perpage + 1 : 0;
 $last = ($last = $perpage * $pagenumber) > $picturetotal ? $picturetotal : $last;
 $show['delete'] = can_moderate(0, 'candeletealbumpicture');
 $hook_query_fields = $hook_query_joins = $hook_query_where = '';
 unset($sqlsortfield, $sqlsortorder);
 $navbits[''] = $vbphrase['moderation'];
 $navbits = construct_navbits($navbits);
 construct_usercp_nav('moderatedpics');
 ($hook = vBulletinHook::fetch_hook('moderation_picture_complete')) ? eval($hook) : false;
 eval('$headinclude .= "' . fetch_template('picturecomment_css') . '";');
 eval('$moderation_filter = "' . fetch_template('moderation_filter') . '";');
 eval('$navbar = "' . fetch_template('navbar') . '";');
 eval('$HTML = "' . fetch_template('moderation_pictures') . '";');
 eval('print_output("' . fetch_template('USERCP_SHELL') . '");');
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:moderation.php

示例6: vb_number_format

        } else {
            if ($album['state'] == 'profile') {
                $show['personalalbum'] = true;
                $albumtype = $vbphrase['profile_album_paren'];
            } else {
                $show['personalalbum'] = false;
            }
        }
        if ($album['moderation'] and (can_moderate(0, 'canmoderatepictures') or $vbulletin->userinfo['userid'] == $album['userid'])) {
            $show['moderated'] = true;
            $album['moderatedcount'] = vb_number_format($album['moderation']);
        }
        ($hook = vBulletinHook::fetch_hook('album_user_albumbit')) ? eval($hook) : false;
        eval('$albumbits .= "' . fetch_template('albumbit') . '";');
    }
    $pagenav = construct_page_nav($pagenumber, $perpage, $albumcount['total'], 'album.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}", '');
    $show['add_album_option'] = $userinfo['userid'] == $vbulletin->userinfo['userid'];
    ($hook = vBulletinHook::fetch_hook('album_user_complete')) ? eval($hook) : false;
    // navbar and final output
    $navbits = construct_navbits(array('member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}" => construct_phrase($vbphrase['xs_profile'], $userinfo['username']), '' => $vbphrase['albums']));
    eval('$navbar = "' . fetch_template('navbar') . '";');
    eval('print_output("' . fetch_template('album_list') . '");');
}
// #######################################################################
if ($_REQUEST['do'] == 'moderated') {
    if (!$vbulletin->options['pc_enabled']) {
        print_no_permission();
    }
    if ($userinfo['userid'] != $vbulletin->userinfo['userid']) {
        print_no_permission();
    }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:album.php

示例7: can_moderate

         } else {
             if (!$thread['visible']) {
                 $thread['hiddencount']++;
             }
             $show['moderated'] = ($thread['hiddencount'] > 0 and can_moderate($thread['forumid'], 'canmoderateposts')) ? true : false;
             $show['deletedthread'] = ($thread['deletedcount'] > 0 and (can_moderate($thread['forumid']) or $forumperms & $vbulletin->bf_ugp_forumpermissions['canseedelnotice'])) ? true : false;
             eval('$searchbits .= "' . fetch_template('threadbit') . '";');
         }
     }
     if ($show['popups'] and $show['inlinemod']) {
         eval('$threadadmin_imod_menu = "' . fetch_template('threadadmin_imod_menu_thread') . '";');
     }
 }
 // #############################################################################
 $last = $itemcount;
 $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], $numitems, 'search.php?' . $vbulletin->session->vars['sessionurl'] . 'searchid=' . $vbulletin->GPC['searchid'] . '&pp=' . $vbulletin->GPC['perpage']);
 // #############################################################################
 // get the bits for the summary bar
 if (!empty($display['words'])) {
     foreach ($display['words'] as $key => $val) {
         $display['words']["{$key}"] = htmlspecialchars_uni($val);
     }
     $display['words'] = str_replace(array('&lt;/u&gt;&lt;/b&gt;-&lt;b&gt;&lt;u&gt;', '&lt;/u&gt; OR &lt;u&gt;'), array('</u></b>-<b><u>', '</u> OR <u>'), $display['words']);
     $displayWords = '<b><u>' . implode('</u></b>, <b><u>', $display['words']) . '</u></b>';
 } else {
     $displayWords = '';
 }
 if (!empty($display['common'])) {
     $displayCommon = '<b><u>' . implode('</u></b>, <b><u>', htmlspecialchars_uni($display['common'])) . '</u></b>';
 } else {
     $displayCommon = '';
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:search.php

示例8: eval

             case 2:
                 $thread['notification'] = $vbphrase['daily'];
                 break;
             case 3:
                 $thread['notification'] = $vbphrase['weekly'];
                 break;
             default:
                 $thread['notification'] = $vbphrase['n_a'];
         }
         ($hook = vBulletinHook::fetch_hook('threadbit_display')) ? eval($hook) : false;
         eval('$threadbits .= "' . fetch_template('threadbit') . '";');
     }
     $db->free_result($threads);
     unset($threadids);
     $sorturl = 'subscription.php?' . $vbulletin->session->vars['sessionurl'] . "do=viewsubscription&amp;pp={$perpage}&amp;folderid={$folderid}";
     $pagenav = construct_page_nav($pagenumber, $perpage, $totalallthreads, $sorturl . "&amp;sort={$sortfield}" . iif(!empty($vbulletin->GPC['sortorder']), "&amp;order=" . $vbulletin->GPC['sortorder']));
     $oppositesort = iif($vbulletin->GPC['sortorder'] == 'asc', 'desc', 'asc');
     eval('$sortarrow[' . $sortfield . '] = "' . fetch_template('forumdisplay_sortarrow') . '";');
     $show['havethreads'] = true;
 } else {
     $totalallthreads = 0;
     $show['havethreads'] = false;
 }
 $navbits[''] = $vbphrase['subscriptions'];
 $navbits = construct_navbits($navbits);
 // build the cp nav
 construct_usercp_nav('substhreads_listthreads');
 ($hook = vBulletinHook::fetch_hook('usersub_view_complete')) ? eval($hook) : false;
 eval('$navbar = "' . fetch_template('navbar') . '";');
 eval('$HTML = "' . fetch_template('SUBSCRIBE') . '";');
 eval('print_output("' . fetch_template('USERCP_SHELL') . '");');
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:subscription.php

示例9: standard_error

         if ($issuestatus['issuecompleted'] == $status_flag_value) {
             $status_limit[] = $issuestatus['issuestatusid'];
         }
     }
     if (!$status_limit) {
         standard_error(fetch_error('pt_no_issue_statues_represent_this_state'));
     }
 }
 require_once DIR . '/includes/class_pt_issuelist.php';
 $issue_list =& new vB_Pt_IssueList($project, $vbulletin);
 $issue_list->set_sort($vbulletin->GPC['sortfield'], $vbulletin->GPC['sortorder']);
 $list_criteria = $perms_query["{$project['projectid']}"] . "\r\n\t\tAND issue.milestoneid = {$milestone['milestoneid']}\r\n\t\tAND issue.issuetypeid IN ('" . implode("','", $milestone_types) . "')\r\n\t\t" . ($status_limit ? "AND issue.issuestatusid IN (" . implode(',', $status_limit) . ")" : '') . "\r\n\t\tAND issue.visible IN ('visible', 'private')\r\n\t";
 $issue_list->exec_query($list_criteria, $vbulletin->GPC['pagenumber'], $vbulletin->options['pt_issuesperpage']);
 $nav_url_base = 'projectmilestone.php?' . $vbulletin->session->vars['sessionurl'] . "do=issuelist&amp;milestoneid={$milestone['milestoneid']}" . ($vbulletin->GPC['filter'] ? '&amp;filter=' . $vbulletin->GPC['filter'] : '');
 $sort_arrow = $issue_list->fetch_sort_arrow_array($nav_url_base);
 $pagenav = construct_page_nav($issue_list->real_pagenumber, $vbulletin->options['pt_issuesperpage'], $issue_list->total_rows, $nav_url_base, ($issue_list->sort_field != 'lastpost' ? '&amp;sort=' . urlencode($issue_list->sort_field) : '') . ($issue_list->sort_order != 'desc' ? '&amp;order=asc' : ''));
 $issuebits = '';
 while ($issue = $db->fetch_array($issue_list->result)) {
     $issuebits .= build_issue_bit($issue, $project, $projectperms["{$issue['issuetypeid']}"]);
 }
 // issue state filter
 $filter_options = array('active' => '', 'completed' => '', 'any' => '');
 $filter_options[$vbulletin->GPC['filter'] ? $vbulletin->GPC['filter'] : 'any'] = ' selected="selected"';
 // search box data
 $show['search_options'] = false;
 foreach ($milestone_types as $milestone_typeid) {
     if ($projectperms["{$milestone_typeid}"]['generalpermissions'] & $vbulletin->pt_bitfields['general']['cansearch']) {
         $show['search_options'] = true;
         break;
     }
 }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:projectmilestone.php

示例10: can_moderate

                $show['managethread'] = (can_moderate($forumid, 'candeleteposts') or can_moderate($forumid, 'canremoveposts')) ? true : false;
                $show['moderated'] = ($thread['hiddencount'] > 0 and can_moderate($forumid, 'canmoderateposts')) ? true : false;
                $show['deletedthread'] = $canseedelnotice;
                eval('$threadbit .= "' . fetch_template('threadbit_deleted') . '";');
            } else {
                if (!$thread['visible']) {
                    $thread['hiddencount']++;
                }
                $show['moderated'] = ($thread['hiddencount'] > 0 and can_moderate($forumid, 'canmoderateposts')) ? true : false;
                $show['deletedthread'] = ($thread['deletedcount'] > 0 and $canseedelnotice) ? true : false;
                eval('$threadbit .= "' . fetch_template('threadbit') . '";');
            }
        }
        $db->free_result($threads);
        unset($thread, $counter);
        $pagenav = construct_page_nav($pagenumber, $perpage, $totalthreads, 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}", "" . (!empty($vbulletin->GPC['perpage']) ? "&amp;pp={$perpage}" : '') . (!empty($vbulletin->GPC['prefixid']) ? "&amp;prefixid=" . $vbulletin->GPC['prefixid'] : '') . (!empty($vbulletin->GPC['sortfield']) ? "&amp;sort={$sortfield}" : "") . (!empty($vbulletin->GPC['sortorder']) ? "&amp;order=" . $vbulletin->GPC['sortorder'] : '') . (!empty($vbulletin->GPC['daysprune']) ? "&amp;daysprune={$daysprune}" : ''));
        eval('$sortarrow[' . $sortfield . '] = "' . fetch_template('forumdisplay_sortarrow') . '";');
    }
    unset($threads, $dotthreads);
    // get colspan for bottom bar
    $foruminfo['bottomcolspan'] = 5;
    if ($foruminfo['allowicons']) {
        $foruminfo['bottomcolspan']++;
    }
    if ($show['inlinemod']) {
        $foruminfo['bottomcolspan']++;
    }
    $show['threadslist'] = true;
    /////////////////////////////////
} else {
    $show['threadslist'] = false;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:forumdisplay.php

示例11: showComments

	private static function showComments($nodeid, $userinfo, $pageno,
		$perpage, $target_url, $associatedthreadid )
	{
		require_once DIR . '/includes/functions_misc.php';
		require_once DIR . '/includes/functions.php';
		require_once DIR . '/includes/functions_databuild.php';
		require_once DIR . '/includes/functions_bigthree.php';

		global $vbphrase;
		global $show;
		global $sessionhash;

		fetch_phrase_group('posting');

		//First let's see if we have forum/thread view permissions. If not,
		// we're done
		if (! $permissions = self::canViewThread($nodeid, $userinfo))
		{
			return false;
		}
		$forumperms = fetch_permissions(self::getForumId($nodeid));

		//Normally this thread will be wide open, so let's get the list first
		// without checking. We'll verify each post anyway.

		//get our results
		$results = self::getComments($nodeid, $userinfo, $permissions, $associatedthreadid);
		$record_count = count($results);

		if (!$results OR !count($results))
		{
			return '';
		}


		//If we are passed a postid, we'll display just that comment.
		if (vB::$vbulletin->GPC_exists['postid'] AND intval(vB::$vbulletin->GPC['postid'])
			AND ($record_count > $perpage) AND in_array(vB::$vbulletin->GPC['postid'], $results))
		{
			$index = array_search(vB::$vbulletin->GPC['postid'], $results) ;
			$pageno = max(1,ceil($index/$perpage));
			$first = ($pageno -1) * $perpage;
		}
		else
		{
			//we accept the parameter "last" for pageno.
			if ($pageno == 'last')
			{
				$pageno = intval(($record_count + $perpage -1) / $perpage);
				$first = ($pageno -1) * $perpage;
			}
			else
			{
				$pageno = max(1, intval($pageno) );
				$first = $perpage * ($pageno -1) ;
			}
		}
		//Let's trim off the results we need.
		//This also tells us if we should show the "next" button.
		$results = array_slice($results, $first, $perpage, true);

		//Now format the overall block.
		if (!count($results) OR !$comments = self::renderResult( $userinfo, $results, $permissions,
				$forumperms, $target_url, $nodeid)
			OR ($comments == ''))
		{
			return false;
		}

		if (strpos($target_url,'?') === false)
		{
			$target_url .= '?';
		}

		$pagenav = construct_page_nav($pageno, $perpage, $record_count, $target_url, '', 'comments');

		$template = vB_Template::create('vbcms_comments_block');
		$template->register('comment_count', $record_count	);
		$template->register('sessionhash', $sessionhash	);
		$template->register('pagenav', $pagenav);
		$template->register('cms_comments', $comments);
		$template->register('this_url', $target_url);
		$template->register('nodeid', $nodeid);
		$template->register('target_url', $target_url);

		return $template->render() ;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:87,代码来源:comments.php

示例12: unset

         if ('deleted' == $item['state']) {
             $item['state'] = 'visible';
         }
         // add bit
         $bit =& $bit_factory->create($item, $group);
         $bit->show_moderation_tools(false);
         $bit->show_subscription(true);
         // always show inline selection
         $bit->force_inline_selection(true);
         $discussionbits .= $bit->construct();
     }
 }
 unset($bit, $bit_factory, $collection_factory, $collection);
 // Construct pagenav
 $pagenavlink = 'groupsubscription.php?' . $vbulletin->session->vars['sessionurl'] . ($perpage ? "pp=" . $perpage : '') . ($sortfield ? "&amp;sort={$sortfield}" : '') . (!$desc ? '&amp;order=asc' : '');
 $pagenav = construct_page_nav($pagenumber, $perpage, $totaldiscussions, $pagenavlink);
 // Sort helpers
 $oppositesort = $desc ? 'asc' : 'desc';
 $sorturl = 'groupsubscription.php?' . $vbulletin->session->vars['sessionurl'];
 $orderlinks = array('replies' => $sorturl . '&amp;sort=replies' . ($sortfield == 'replies' ? '&amp;order=' . $oppositesort : ''), 'dateline' => $sorturl . '&amp;sort=dateline' . ($sortfield == 'dateline' ? '&amp;order=' . $oppositesort : ''), 'lastpost' => $sorturl . '&amp;sort=lastpost' . ($sortfield == 'lastpost' ? '&amp;order=' . $oppositesort : ''), 'subscription' => $sorturl . '&amp;sort=subscription' . ($sortfield == 'subscription' ? '&amp;order=' . $oppositesort : ''));
 $templater = vB_Template::create('forumdisplay_sortarrow');
 $templater->register('oppositesort', $oppositesort);
 $sortarrow["{$sortfield}"] = $templater->render();
 $group_subscribe_list = '';
 if ($pagenumber <= 1) {
     // show group subscriptions on page one
     require_once DIR . '/includes/class_socialgroup_search.php';
     $socialgroupsearch = new vB_SGSearch($vbulletin);
     $socialgroupsearch->add('subscribed', $vbulletin->userinfo['userid']);
     $socialgroupsearch->set_sort('lastpost', 'ASC');
     if ($numsocialgroups = $socialgroupsearch->execute(true)) {
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:groupsubscription.php

示例13: print_no_permission

     print_no_permission();
 }
 require_once DIR . '/includes/functions_user.php';
 do {
     $perpage = ($vbulletin->GPC['perpage'] > 30 or !$vbulletin->GPC['perpage']) ? 20 : $vbulletin->GPC['perpage'];
     if (!$vbulletin->GPC['pagenumber']) {
         $vbulletin->GPC['pagenumber'] = 1;
     }
     $start = ($vbulletin->GPC['pagenumber'] - 1) * $perpage;
     $members = $db->query_read_slave("\r\n\t\t\tSELECT\r\n\t\t\t\tSQL_CALC_FOUND_ROWS\r\n\t\t\t\tgm.userid, user.*\r\n\t\t\t\t" . ($vbulletin->options['avatarenabled'] ? ', avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb, customavatar.width as avwidth, customavatar.height as avheight, customavatar.filedata_thumb' : '') . "\r\n\t\t\tFROM " . TABLE_PREFIX . "blog_groupmembership AS gm\r\n\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = gm.userid)\r\n\t\t\t\t" . ($vbulletin->options['avatarenabled'] ? "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON (avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (customavatar.userid = user.userid) " : '') . "\r\n\t\t\tWHERE\r\n\t\t\t\tgm.bloguserid = " . $vbulletin->GPC['userid'] . "\r\n\t\t\t\t\tAND\r\n\t\t\t\tgm.state = 'active'\r\n\t\t\tORDER BY user.username\r\n\t\t\tLIMIT {$start}, {$perpage}\r\n\t\t");
     $membercount = $db->found_rows();
     if ($start > $membercount) {
         $vbulletin->GPC['pagenumber'] = ceil($membercount / $perpage);
     }
 } while ($start >= $membercount and $membercount);
 $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $membercount, 'blog.php?' . $vbulletin->session->vars['sessionurl'] . "do=members&amp;u={$userinfo['userid']}&amp;pp={$perpage}");
 while ($member = $db->fetch_array($members)) {
     fetch_avatar_from_userinfo($member, true);
     $templater = vB_Template::create('blog_grouplist_userbit');
     $templater->register('member', $member);
     $memberlist .= $templater->render();
     if ($vbulletin->userinfo['userid'] == $member['userid']) {
         $show['removeself'] = true;
     }
 }
 $show['avatars'] = true;
 $sidebar =& build_user_sidebar($userinfo);
 $navbits[fetch_seo_url('blog', $userinfo, null, 'userid', 'blog_title')] = $userinfo['blog_title'];
 $navbits[''] = $vbphrase['blog_membership'];
 $templater = vB_Template::create('blog_grouplist');
 $templater->register('membercount', $membercount);
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:blog.php

示例14: vbseo_complete_sec


//.........这里部分代码省略.........
                }
                if (THIS_SCRIPT == 'index') {
                    if (VBSEO_CODE_CLEANUP_LASTPOST == 2) {
                        vbseo_modify_template('FORUMHOME', '#<td[^<]+?vbphrase\\[last_post\\]</td>#is', '');
                        vbseo_modify_template('forumhome_forumbit_level1_nopost', '#<td[^<]+?vbphrase\\[last_post\\].*?</td>#is', '');
                        vbseo_modify_template('FORUMDISPLAY', '#<td[^<]+?(<span[^<]+?)?(<a[^<]+?)?vbphrase\\[last_post\\].*?</td>#is', '');
                        vbseo_modify_template('forumhome_forumbit_level2_post', '#<td[^<]+?forum\\[lastpostinfo\\].*?</td>#is', '');
                        vbseo_modify_template('forumhome_forumbit_level1_post', '#<td[^<]+?forum\\[lastpostinfo\\].*?</td>#is', '');
                        vbseo_modify_template('threadbit', '#\\(\\(\\$show\\[\'threadmoved\'.*?/td>\\s*"\\)\\)\\.#is', '');
                    }
                    if (VBSEO_CODE_CLEANUP_LASTPOST == 1) {
                        vbseo_modify_template('threadbit', '#<a href=[^>]*?->[^>]*?->[^>]*?lastpostid.*?</a>#is', '');
                        vbseo_modify_template('forumhome_lastpostby', '#<a href=[^>]*?->[^>]*?->[^>]*?lastpostid.*?</a>#is', '');
                        $vbphrase['by_x'] = strip_tags($vbphrase['by_x']);
                    }
                    vbseo_modify_template('threadbit', '#<a href=\\\\"misc\\.php\\?do=whoposted.*?>(.*?)</a>#is', '$1');
                }
            }
            break;
        case 'moderation_start':
            if ($_REQUEST['do'] == 'viewlinkbacks') {
                global $navbar, $navclass, $HTML, $navbits, $headinclude, $header, $footer, $db, $show, $navclass, $notices, $pmbox, $notifications_total;
                if (!can_moderate(0, 'vbseo_linkbacks')) {
                    print_no_permission();
                }
                vbseo_startup();
                $vbseolinkbackbits = '';
                $perpage = 20;
                $pagenumber = $_GET['page'] ? $_GET['page'] : 1;
                $vbseodb = vbseo_get_db();
                $tp = $vbseodb->vbseodb_query_first("\nSELECT COUNT(*) as cnt\nFROM " . vbseo_tbl_prefix('vbseo_linkback') . "\nWHERE t_incoming=1 AND t_deleted=0 AND t_approve=0");
                $totalposts = $tp['cnt'];
                $vbseopings = $vbseodb->vbseodb_query($q = "\nSELECT t_id, t_time, t_src_url, t_dest_url, t_type, t_postid, t_postcount, t_threadid, t_page, t_title, t_text, t_approve, forumid\nFROM " . vbseo_tbl_prefix('vbseo_linkback') . "\nLEFT JOIN " . vbseo_tbl_prefix('thread') . " on threadid=t_threadid\nWHERE t_incoming=1 AND t_deleted=0 AND t_approve=0\nORDER BY t_time " . (preg_match('#^(asc|desc)$#i', VBSEO_DEFAULT_LINKBACKS_ORDER) ? VBSEO_DEFAULT_LINKBACKS_ORDER : "DESC") . " LIMIT " . ($pagenumber - 1) * $perpage . "," . $perpage);
                $pagenav = construct_page_nav($pagenumber, $perpage, $totalposts, "moderation.php?do=viewlinkbacks");
                while ($vbseoping = @$vbseodb->funcs['fetch_assoc']($vbseopings)) {
                    if (can_moderate($vbseoping['forumid'], 'vbseo_linkbacks')) {
                        $vbseoping['postno'] = $vbseoping['t_postcount'];
                        $vbseoping['ismod'] = 1;
                        $vbseoping['date'] = vbdate($vbulletin->options['dateformat'], $vbseoping['t_time'], true);
                        $vbseoping['time'] = vbdate($vbulletin->options['timeformat'], $vbseoping['t_time'], true);
                        $vbseoping['t_src_url'] = htmlentities($vbseoping['t_src_url']);
                        $vbseoping['t_dest_url'] = htmlentities($vbseoping['t_dest_url']);
                        $vbseoping['t_text_nohtml'] = htmlspecialchars(strip_tags($vbseoping['t_text']));
                        $vbseoping['t_title_html'] = htmlspecialchars($vbseoping['t_title']);
                        eval('$vbseolinkbackbits .= "' . fetch_template('vbseo_linkbackbit') . '";');
                    }
                }
                if ($vbseolinkbackbits) {
                    eval('$HTML = "' . fetch_template('vbseo_linkbacks') . '";');
                } else {
                    $HTML = $vbphrase['vbseo_no_linkbacks_found'];
                }
                unset($vbseolinkbackbits);
                $navbits[''] = $vbphrase['moderation'];
                $navbits = construct_navbits($navbits);
                construct_usercp_nav('moderatedlinkbacks');
                eval('$navbar = "' . fetch_template('navbar') . '";');
                eval('print_output("' . fetch_template('USERCP_SHELL') . '");');
            }
            break;
        case 'misc_start':
            if ($_REQUEST['do'] == 'linkbacks') {
                global $navbits, $headinclude, $header, $footer;
                $navbits = construct_navbits(array('faq.' . VBSEO_VB_EXT . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['faq'], '' => $vbphrase['vbseo_linkbacks']));
                @extract($GLOBALS);
                @eval('$navbar = "' . fetch_template('navbar') . '";');
开发者ID:holandacz,项目名称:nb4,代码行数:67,代码来源:functions_vbseo_hook.php

示例15: construct_page_nav

		$templater = vB_Template::create('blog_search_results_result');
			$templater->register('blog', $blog);
		$resultbits .= $templater->render();
	}

	$next_result = $previous_results + $db->num_rows($results) + 1;
	$show['next_page'] = ($next_result <= $search['resultcount']);
	$show['previous_page'] = ($pagenum > 1);
	$show['pagenav'] = ($show['next_page'] OR $show['previous_page']);
	$first = ($pagenum - 1) * $perpage + 1;
	$last = ($last = $perpage * $pagenum) > $search['resultcount'] ? $search['resultcount'] : $last;

	$pagenav = construct_page_nav(
		$pagenum,
		$perpage,
		$search['resultcount'],
		'blog_search.php?' . $vbulletin->session->vars['sessionurl'] . "do=searchresults&amp;searchid=$search[blogsearchid]",
		''
	);

	// navbar and output
	$navbits['blog_search.php?' . $vbulletin->session->var['sessionurl'] . 'do=search'] = $vbphrase['search'];
	$navbits[] = $vbphrase['search_results'];

	($hook = vBulletinHook::fetch_hook('blog_search_results_complete')) ? eval($hook) : false;

	$templater = vB_Template::create('blog_search_results');
		$templater->register('first', $first);
		$templater->register('last', $last);
		$templater->register('pagenav', $pagenav);
		$templater->register('resultbits', $resultbits);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:blog_search.php


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