本文整理汇总了PHP中theme_linktree函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_linktree函数的具体用法?PHP theme_linktree怎么用?PHP theme_linktree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了theme_linktree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: template_shop_above
function template_shop_above()
{
global $txt, $context, $modSettings, $scripturl;
// Doing nothing? So be it :P
if (!isset($context['shop_do'])) {
$context['shop_do'] = '';
}
// TODO: Simplify the code (for the links) below?
echo '
<!-- The Linktree -->
<table width="100%" cellpadding="3" cellspacing="0"><tr><td valign="bottom">', theme_linktree(), '</td></tr></table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="padding-top: 1ex;"><tr>
<td width="180" valign="top" style="width: 26ex; padding-right: 10px; padding-bottom: 10px;">
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="bordercolor">
<tr>
<td class="catbg">', $txt['shop'], ' Stuff</td>
</tr>
<tr class="windowbg2">
<td class="smalltext" style="line-height: 1.3; padding-bottom: 3ex;">
', $context['shop_do'] == 'main' ? '<b>' : '', '<a href="', $scripturl, '?action=shop">', $txt['shop'], ' Home</a>', $context['shop_do'] == 'main' ? '</b>' : '', '<br />';
// Allowed to buy stuff?
if (allowedTo('shop_buy')) {
echo '
', ($context['shop_do'] == 'buy' ? '<b>' : '') . '<a href="' . $scripturl . '?action=shop;do=buy">' . $txt['shop_buy'] . '</a>' . ($context['shop_do'] == 'buy' ? '</b>' : '') . '<br />';
}
// The inventory - Everyone can access this!
echo '
', ($context['shop_do'] == 'inv' ? '<b>' : '') . '<a href="' . $scripturl . '?action=shop;do=inv">' . $txt['shop_yourinv'] . '</a>' . ($context['shop_do'] == 'inv' ? '</b>' : ''), '<br />';
// Allowed to send money to other people
if (allowedTo('shop_sendmoney')) {
echo '
', ($context['shop_do'] == 'sendmoney' ? '<b>' : '') . '<a href="' . $scripturl . '?action=shop;do=sendmoney">' . $txt['shop_send_money'] . '</a>' . ($context['shop_do'] == 'sendmoney' ? '</b>' : '') . '<br />';
}
// Allowed to send items to other people?
if (allowedTo('shop_senditems')) {
echo '
', $context['shop_do'] == 'senditems' ? '<b>' : '', '<a href="' . $scripturl . '?action=shop;do=senditems">' . $txt['shop_send_item'] . '</a>' . ($context['shop_do'] == 'senditems' ? '</b>' : ''), '<br />';
}
// Allowed to view inventory of others?
if (allowedTo('shop_invother')) {
echo '
', $context['shop_do'] == 'invother' ? '<b>' : '', '<a href="' . $scripturl . '?action=shop;do=invother">' . $txt['shop_invother'] . '</a>' . ($context['shop_do'] == 'invother' ? '</b>' : ''), '<br />';
}
// Allowed to access the bank?
if (allowedTo('shop_bank')) {
echo '
', ($context['shop_do'] == 'bank' ? '<b>' : '') . $modSettings['shopBankEnabled'] ? '<a href="' . $scripturl . '?action=shop;do=bank">' . $txt['shop_bank'] . '</a><br />' : '' . ($context['shop_do'] == 'bank' ? '</b>' : '');
}
// Allowed to access the trade centre?
if (allowedTo('shop_trade')) {
echo '
', ($context['shop_do'] == 'trade' ? '<b>' : '') . $modSettings['shopTradeEnabled'] ? '<a href="' . $scripturl . '?action=shop;do=trade">' . $txt['shop_trade'] . '</a><br />' : '', $context['shop_do'] == 'trade' ? '</b>' : '';
}
echo '
</td>
</tr>
</table>
</td>
<td valign="top">';
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:60,代码来源:Shop.template.php
示例2: template_pm_above
function template_pm_above()
{
global $context, $settings, $options, $txt;
echo '
<div style="padding: 3px;">', theme_linktree(), '</div>';
echo '
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
<td width="125" valign="top">
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100">';
// Loop through every main area - giving a nice section heading.
foreach ($context['pm_areas'] as $section) {
echo '
<tr>
<td class="catbg">', $section['title'], '</td>
</tr>
<tr class="windowbg2">
<td class="smalltext" style="padding-bottom: 2ex;">';
// Each sub area.
foreach ($section['areas'] as $i => $area) {
if (empty($area)) {
echo '<br />';
} elseif (!empty($area['limit_bar'])) {
// !!! Hardcoded colors = bad.
echo '
<br /><br />
<div align="center">
<b>', $txt['pm_capacity'], '</b>
<div align="left" style="border: 1px solid black; height: 7px; width: 100px;">
<div style="border: 0; background-color: ', $context['limit_bar']['percent'] > 85 ? '#A53D05' : ($context['limit_bar']['percent'] > 40 ? '#EEA800' : '#468008'), '; height: 7px; width: ', $context['limit_bar']['bar'], 'px;"></div>
</div>
<span', $context['limit_bar']['percent'] > 90 ? ' style="color: red;"' : '', '>', $context['limit_bar']['text'], '</span>
</div>
<br />';
} else {
if ($i == $context['pm_area']) {
echo '
<b>', $area['link'], empty($area['unread_messages']) ? '' : ' (<b>' . $area['unread_messages'] . '</b>)', '</b><br />';
} else {
echo '
', $area['link'], empty($area['unread_messages']) ? '' : ' (<b>' . $area['unread_messages'] . '</b>)', '<br />';
}
}
}
echo '
</td>
</tr>';
}
echo '
</table>
<br />
</td>
<td valign="top">';
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:53,代码来源:PersonalMessage.template.php
示例3: template_main
function template_main()
{
global $context, $settings, $options, $scripturl, $txt;
// Display the table header and linktree.
echo '
<div style="padding: 3px;">', theme_linktree(), '</div>
<table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder">
<tr class="titlebg">
<td width="30%"><a href="' . $scripturl . '?action=who;start=', $context['start'], ';sort=user', $context['sort_direction'] != 'down' && $context['sort_by'] == 'user' ? '' : ';asc', '">', $txt['who_user'], ' ', $context['sort_by'] == 'user' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
<td style="width: 14ex;"><a href="' . $scripturl . '?action=who;start=', $context['start'], ';sort=time', $context['sort_direction'] == 'down' && $context['sort_by'] == 'time' ? ';asc' : '', '">', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
<td>', $txt['who_action'], '</td>
</tr>';
// This is used to alternate the color of the background.
$alternate = true;
// For every member display their name, time and action (and more for admin).
foreach ($context['members'] as $member) {
// $alternate will either be true or false. If it's true, use "windowbg2" and otherwise use "windowbg".
echo '
<tr class="windowbg', $alternate ? '2' : '', '">
<td>';
// Guests don't have information like icq, msn, y!, and aim... and they can't be messaged.
if (!$member['is_guest']) {
echo '
<div style="float: right; width: 14ex;">
', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" align="middle" />' : $member['online']['text'], $context['can_send_pm'] ? '</a>' : '', '
', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], '
</div>';
}
echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>';
if (!empty($member['ip'])) {
echo '
(<a href="' . $scripturl . '?action=trackip;searchip=' . $member['ip'] . '" target="_blank">' . $member['ip'] . '</a>)';
}
echo '
</td>
<td nowrap="nowrap">', $member['time'], '</td>
<td>', $member['action'], '</td>
</tr>';
// Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.)
$alternate = !$alternate;
}
echo '
<tr class="titlebg">
<td colspan="3"><b>', $txt[139], ':</b> ', $context['page_index'], '</td>
</tr>
</table>';
}
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:48,代码来源:Who.template.php
示例4: template_body_above
//.........这里部分代码省略.........
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
', $txt['quick_login_dec'], '
<input type="hidden" name="hash_passwrd" value="" />
</div>
</form>';
}
echo '
</td></tr></table>
</div>
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<div style="margin-top: 7px;">
<strong>', $txt['search'], ': </strong><input type="text" name="search" value="" style="width: 190px;" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 8ex;" class="button_submit" />
<a href="', $scripturl, '?action=search;advanced">', $txt['search_advanced'], '</a>
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic'])) {
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
} elseif (!empty($context['current_board'])) {
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
}
echo '
</div>
</form>
</td>
<td style="width: 262px; ', !$context['right_to_left'] ? 'padding-left' : 'padding-right', ': 6px;" valign="top">';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif); margin-bottom: 8px;">
<img src="', $settings['lang_images_url'], '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $context['random_news_line'], '</div>
</div>';
}
// The "key stats" box.
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['lang_images_url'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="', !$context['browser']['is_ie'] ? 'min-height: 35px;' : 'height: 4em;', ' padding: 5px;" class="smalltext">
<strong>', $context['common_stats']['total_posts'], '</strong> ', $txt['posts_made'], ' ', $txt['in'], ' <strong>', $context['common_stats']['total_topics'], '</strong> ', $txt['topics'], ' ', $txt['by'], ' <span style="white-space: nowrap;"><strong>', $context['common_stats']['total_members'], '</strong> ', $txt['members'], '</span><br />
', $txt['latest_member'], ': <strong> ', $context['common_stats']['latest_member']['link'], '</strong>
</div>
</div>';
echo '
</td>
</tr>
</table>
<img id="upshrink" src="', $settings['images_url'], '/upshrink.gif" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 2ex 2px 0; display: none;" border="0" />';
// Show the menu here, according to the menu sub template.
template_menu();
// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeader\',
\'upshrinkHeader2\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrink\'
}
});
// ]]></script>';
echo '
</div>';
// The main content should go here. A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
// Show the navigation tree.
theme_linktree();
}
开发者ID:dailinjie,项目名称:babylon,代码行数:101,代码来源:index.template.php
示例5: template_main
//.........这里部分代码省略.........
<a id="bot"></a><strong>', $txt['pages'], ':</strong> ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '<a href="#top">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/go_up.gif" alt="' . $txt['go_up'] . '" border="0" align="top" />' : $txt['go_up']) . '</a>' : '', '
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" style="font-size: smaller;">';
$buttonArray = array();
if ($context['can_reply']) {
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/reply.gif" alt="' . $txt['reply'] . '" border="0" />' : $txt['reply']) . '</a>';
}
if ($context['can_mark_notify']) {
$buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/' . ($context['is_marked_notify'] ? 'un' : '') . 'notify.gif" alt="' . $txt[$context['is_marked_notify'] ? 'unnotify' : 'notify'] . '" border="0" />' : $txt[$context['is_marked_notify'] ? 'unnotify' : 'notify']) . '</a>';
}
// Another special case, similar to above but reversed. Show "add poll" unless they can't - then show unread here too.
if ($context['can_add_poll']) {
$buttonArray[] = '<a href="' . $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/addpoll.gif" alt="' . $txt['add_poll'] . '" border="0" />' : $txt['add_poll']) . '</a>';
} elseif ($context['user']['is_logged'] && $settings['show_mark_read']) {
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';
}
if ($context['can_send_topic']) {
$buttonArray[] = '<a href="' . $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/sendtopic.gif" alt="' . $txt['send_topic'] . '" border="0" />' : $txt['send_topic']) . '</a>';
}
$buttonArray[] = '<a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank" class="new_win">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/print.gif" alt="' . $txt['print'] . '" border="0" />' : $txt['print']) . '</a>';
echo implode($context['menu_separator'], $buttonArray);
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>';
if ($settings['linktree_inline']) {
echo '
<td valign="top">', theme_linktree(), '</td> ';
}
echo '
<td valign="top" align="', !$context['right_to_left'] ? 'right' : 'left', '" class="smalltext"> <span class="nav"> ', $context['previous_next'], '</span></td>
</tr>
</table>
<div style="padding-top: 4px; padding-bottom: 4px;" id="moderationbuttons">', theme_show_mod_buttons(), '</div>';
echo '
</form>';
echo '
<div class="righttext" style="margin-bottom: 1ex;" id="display_jump_to"> </div><br />';
if ($context['can_reply'] && !empty($options['display_quick_reply'])) {
echo '
<a id="quickreply"></a>
<table border="0" cellspacing="1" cellpadding="3" class="clear bordercolor" width="100%">
<tr>
<td colspan="2" class="catbg"><a href="javascript:oQuickReply.swap();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" border="0" id="quickReplyExpand" /></a> <a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a></td>
</tr>
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_desc'], $context['is_locked'] ? '<br /><br /><strong>' . $txt['quick_reply_warning'] . '</strong>' : '', '</td>
<td class="windowbg" width="75%" align="center">
', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
<form action="', $scripturl, '?action=post2', empty($context['current_board']) ? '' : ';board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="', $context['current_topic'], '" />
<input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="from_qr" value="1" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />';
// Guests just need more.
开发者ID:dailinjie,项目名称:babylon,代码行数:67,代码来源:Display.template.php
示例6: template_body_above
//.........这里部分代码省略.........
if (!empty($context['user']['avatar'])) {
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
}
/* echo '
<ul class="reset">
<!-- <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li> -->';
*/
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin']) {
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';
}
// Are there any members waiting for approval?
if (!empty($context['unapproved_members'])) {
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
}
if (!empty($context['open_mod_reports']) && $context['show_open_reports']) {
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
}
echo '
<!-- <li>', $context['current_time'], '</li> -->
</ul>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
/*
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="info">', sprintf($txt['welcome_guest'], $txt['guest_title']), '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
<div class="info">', $txt['quick_login_dec'], '</div>';
if (!empty($modSettings['enableOpenID']))
echo '
<br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</div>
<div class="news normaltext">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';
*/
// Search within current topic?
if (!empty($context['current_topic'])) {
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
} elseif (!empty($context['current_board'])) {
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
}
echo '</form>';
/*
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>';
echo '
<!-- </div> -->
<!-- </div> -->
<br class="clear" />';
// Show the menu here, according to the menu sub template.
// template_menu();
echo '
<br class="clear" />
</div>';
*/
// The main content should go here.
echo '
<div id="content_section" class="row panels"><div class="frame">
<div id="main_content_section">';
// Custom banners and shoutboxes should be placed here, before the linktree.
// Show the navigation tree.
theme_linktree();
}
开发者ID:juanitotaveras,项目名称:Polyphasic.xyz,代码行数:101,代码来源:index.template.php
示例7: template_mainview
function template_mainview()
{
global $scripturl, $txt, $settings, $modSettings, $ID_MEMBER, $subcats_linktree, $context;
// To get Permissions text
loadLanguage('Admin');
// See if they can approve links
$a_links = allowedTo('approve_links');
$addlink = allowedTo('add_links');
$m_cats = allowedTo('links_manage_cat');
// Get the Category
if (!empty($_REQUEST['cat'])) {
$cat = (int) $_REQUEST['cat'];
}
echo '
<div style="padding: 3px;">', theme_linktree(), '</div>';
// Check if there was a category
if (empty($cat)) {
// No category found show the links index
echo '<h1 align="center"><strong>', $txt['smflinks_indextitle'], '</strong></h1>';
$ratelink = allowedTo('rate_links');
// List all the catagories
// Get category count
$cat_count = $context['cat_count'];
echo '<table cellspacing="0" cellpadding="10" border="0" align="center" width="90%" class="tborder">
<tr>
<td class="titlebg" colspan="2">', $txt['smflinks_ctitle'], '</td>
<td class="titlebg">', $txt['smflinks_description'], '</td>
<td class="titlebg">', $txt['smflinks_totallinks'], '</td>
', $m_cats ? '<td class="titlebg">' . $txt['smflinks_options'] . '</td>' : '', '
</tr>
';
foreach ($context['catlist'] as $row) {
$totallinks = GetLinkTotals($row['ID_CAT']);
echo '<tr>';
if (empty($row['image'])) {
echo '
<td colspan="2" class="windowbg2">
<a href="', $scripturl, '?action=links;cat=', $row['ID_CAT'], '">', parse_bbc($row['title']), '</a>
</td>
<td class="windowbg2">', parse_bbc($row['description']), '</td>
';
} else {
echo '
<td class="windowbg2">
<a href="', $scripturl, '?action=links;cat=', $row['ID_CAT'], '">
<img src="', $row['image'], '" border="0" alt="" />
</a>
</td>
<td class="windowbg2">
<a href="', $scripturl, '?action=links;cat=', $row['ID_CAT'], '">', parse_bbc($row['title']), '</a>
</td>
<td class="windowbg2">', parse_bbc($row['description']), '</td>
';
}
echo '<td class="windowbg2">', $totallinks, '</td>';
// Show Edit Delete and Order category
if ($m_cats) {
echo '<td class="windowbg2"><a href="', $scripturl, '?action=links;sa=catup;cat=', $row['ID_CAT'], ';sesc=', $context['session_id'], '">', $txt['smflinks_txtup'], '</a> <a href="', $scripturl, '?action=links;sa=catdown;cat=', $row['ID_CAT'], ';sesc=', $context['session_id'], '">', $txt['smflinks_txtdown'], '</a></span> <a href="', $scripturl, '?action=links;sa=catperm;cat=', $row['ID_CAT'], ';sesc=', $context['session_id'], '">', $txt['smflinks_txt_perm'], '</a> <a href="', $scripturl, '?action=links;sa=editcat;cat=', $row['ID_CAT'], ';sesc=', $context['session_id'], '">', $txt['smflinks_txtedit'], '</a> <a href="', $scripturl, '?action=links;sa=deletecat;cat=', $row['ID_CAT'], ';sesc=', $context['session_id'], '">', $txt['smflinks_txtdel'], '</a></td>';
}
echo '</tr>';
if (!empty($subcats_linktree)) {
echo '<tr class="titlebg">
<td colspan="' . ($m_cats ? '5' : '4') . '"> <span class="smalltext">', $subcats_linktree != '' ? $txt['smflinks_sub_cats'] . $subcats_linktree : '', '</span></td>
</tr>';
}
}
echo '</table>';
// Permissions for Top 5 Rated, Top 5 Hits and Approval
$editlink_own = allowedTo('edit_links_own');
$editlink_any = allowedTo('edit_links_any');
$deletelink_own = allowedTo('delete_links_own');
$deletelink_any = allowedTo('delete_links_any');
echo '<table border="0" cellpadding="0" cellspacing="0" width="90%" align="center">
<tr>
<td width="50%" valign="top">';
// Show Top 5 rated
if (!empty($modSettings['smflinks_setshowtoprate'])) {
echo '<div class="tborder" style="margin: 2%;"><div class="catbg2" align="center">' . $txt['smflinks_topfiverated'] . '</div>';
echo '<table align="center">';
foreach ($context['linkstop5'] as $row) {
echo '<tr>
<td align="center">
<a href="' . $scripturl . '?action=links;sa=visit&id=' . $row['ID_LINK'] . '" target="blank">' . $row['title'] . '</a> ';
echo $txt['smflinks_rating'] . $row['rating'];
if ($editlink_any || $editlink_own && $ID_MEMBER == $row['ID_MEMBER']) {
echo ' <a href="' . $scripturl . '?action=links;sa=editlink&id=' . $row['ID_LINK'] . '">' . $txt['smflinks_txtedit'] . '</a> ';
}
if ($deletelink_any || $deletelink_own && $ID_MEMBER == $row['ID_MEMBER']) {
echo '<a href="' . $scripturl . '?action=links;sa=deletelink&id=' . $row['ID_LINK'] . '">' . $txt['smflinks_txtdel'] . '</a>';
}
echo '</td></tr>';
}
echo '</table>';
echo '</div>';
}
echo '</td>';
// Show Top 5 hits
echo '<td width="50%" valign="top">';
if (!empty($modSettings['smflinks_setshowmostvisited'])) {
echo '<div class="tborder" style="margin: 2%;"><div class="catbg2" align="center">' . $txt['smflinks_topfivevisited'] . '</div>';
//.........这里部分代码省略.........
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:101,代码来源:Links.template.php
示例8: template_body_above
//.........这里部分代码省略.........
if (!empty($context['open_mod_reports']) && $context['show_open_reports']) {
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
}
echo '
</ul>';
} elseif (!empty($context['show_login_bar'])) {
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form class="windowbg" id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
', $txt['login_or_register'], '<br />
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
', $txt['quick_login_dec'];
if (!empty($modSettings['enableOpenID'])) {
echo '
<br />
<input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';
}
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
if ($context['user']['is_logged'] || !empty($context['show_login_bar'])) {
echo '
</div>
</div>';
}
echo '
<div id="news_section" class="titlebg2 clearfix"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="' . $settings['images_url'] . '/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>
<input type="text" name="search" value="" style="width: 190px;" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex;" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic'])) {
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
} elseif (!empty($context['current_board'])) {
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
}
echo '
</form>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '
<div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';
}
echo '
</div>
</div>';
// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
\'user_section\',
\'news_section\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrink\'
}
});
// ]]></script>';
// Show the menu here, according to the menu sub template.
template_menu();
// Show the navigation tree.
theme_linktree();
// The main content should go here.
echo '
<div id="bodyarea">';
}
开发者ID:valek0972,项目名称:hackits,代码行数:101,代码来源:index.template.php
示例9: template_main
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<div style="margin-bottom: 2px;"><a name="top"></a>', theme_linktree(), '</div>';
if (isset($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) {
echo '
<div class="tborder" style="margin-bottom: 3ex; ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
<tr>
<td colspan="4" class="catbg">', $txt['parent_boards'], '</td>
</tr>';
foreach ($context['boards'] as $board) {
echo '
<tr>
<td ', !empty($board['children']) ? 'rowspan="2"' : '', ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
// If the board is new, show a strong indicator.
if ($board['new']) {
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
} elseif ($board['children_new']) {
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
} else {
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
}
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators'])) {
echo '
<div style="padding-top: 1px;"><small><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></small></div>';
}
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><small>
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'], ' ', $txt[330], '</small>
</td>
<td class="windowbg2" valign="middle" width="22%"><small>';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id'])) {
echo '
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['member']['link'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
}
echo '</small>
</td>
</tr>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children'])) {
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child) {
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}
echo '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
<small><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</small>
</td>
</tr>';
}
}
echo '
</table>
</div>';
}
if (!empty($options['show_board_desc']) && $context['description'] != '') {
echo '
<table width="100%" cellpadding="6" cellspacing="1" border="0" class="tborder" style="padding: 0; margin-bottom: 2ex;">
<tr>
<td class="titlebg2" width="100%" height="24" style="border-top: 0;">
<small>', $context['description'], '</small>
</td>
</tr>
</table>';
}
// Create the button set...
$normal_buttons = array('markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id']), 'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id']), 'new_topic' => array('test' => 'can_post_new', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'), 'post_poll' => array('test' => 'can_post_poll', 'text' => 'smf20', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'));
// They can only mark read if they are logged in and it's enabled!
if (!$context['user']['is_logged'] || !$settings['show_mark_read']) {
unset($normal_buttons['markread']);
}
if (!$context['no_topic_listing']) {
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#bot"><b>' . $txt['topbottom5'] . '</b></a>' : '', '</td>
<td align="right" style="padding-right: 1ex;">
<table cellpadding="0" cellspacing="0">
//.........这里部分代码省略.........
开发者ID:VBGAMER45,项目名称:SMFMods,代码行数:101,代码来源:MessageIndex.template.php
-
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1578|2022-08-30
-
joaomh/curso-de-matlab
阅读:1146|2022-08-17
-
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1001|2022-11-06
-
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1077|2022-08-17
-
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:757|2022-08-16
-
from:http://www.cnblogs.com/taofengli288/archive/2011/09/05/2167553.htmldelphi中
阅读:754|2022-07-18
-
H3C Magic R200 R200V200R004L02 was discovered to contain a stack overflow via th
阅读:910|2022-07-29
-
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:361|2022-11-06
-
生活中我们会发现有不少医院标明自己是三级综合医院或者三级甲等医院,而且很多患者看
阅读:430|2022-07-30
-
lightningtgc/MProgress.js: Material Progress —Google Material Design Progress l
阅读:404|2022-08-17
|
请发表评论