本文整理汇总了PHP中do_navbar函数的典型用法代码示例。如果您正苦于以下问题:PHP do_navbar函数的具体用法?PHP do_navbar怎么用?PHP do_navbar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_navbar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: include
<?
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include('config.php');
include(mnminclude.'html1.php');
do_header("login");
do_navbar("login");
if($_GET["op"] === 'logout') {
$current_user->Logout(preg_replace('/ /', '', $_REQUEST['return']));
}
echo '<div id="genericform-contents">'."\n";
echo '<div id="genericform">'."\n";
if($_GET["op"] === 'recover' || !empty($_POST['recover'])) {
do_recover();
} else {
do_login();
}
echo '</div>'."\n";
echo '</div>'."\n";
do_footer();
示例2: array
$range_values = array(86400, 604800, 2592000, 31536000, 0);
$offset = (get_current_page() - 1) * $page_size;
$from = intval($_GET['range']);
if ($from >= count($range_values) || $from < 0) {
$from = 0;
}
if ($range_values[$from] > 0) {
$from_time = time() - $range_values[$from];
$sql = "SELECT link_id, link_comments as comments FROM links WHERE link_date > FROM_UNIXTIME({$from_time}) ORDER BY link_comments DESC ";
$time_link = "link_date > FROM_UNIXTIME({$from_time})";
} else {
$sql = "SELECT link_id, link_comments as comments FROM links ORDER BY link_comments DESC ";
$time_link = '';
}
do_header(_('más comentadas'));
do_navbar(_('noticias') . ' » ' . _('estadísticas'));
echo '<div id="contents">';
echo '<h2>' . _('noticias más comentadas') . '</h2>';
$link = new Link();
$rows = min(100, $db->get_var("SELECT count(*) FROM links WHERE {$time_link}"));
$links = $db->get_results("{$sql} LIMIT {$offset},{$page_size}");
if ($links) {
foreach ($links as $dblink) {
$link->id = $dblink->link_id;
$link->read();
$link->print_summary('short');
}
}
do_pages($rows, $page_size);
echo '</div>';
do_sidebar_top();
示例3: clean_input_string
// do_user_ad: 0 = noad, > 0: probability n/100
// 100 if the user is the current one
if ($globals['external_user_ads'] && !empty($user->adcode)) {
$globals['user_adcode'] = $user->adcode;
if ($current_user->user_id == $user->id || $current_user->user_level == 'god') {
$globals['do_user_ad'] = 100;
} else {
$globals['do_user_ad'] = $user->karma * 2;
}
}
$view = clean_input_string($_REQUEST['view']);
if (empty($view)) {
$view = 'profile';
}
do_header(_('perfil de usuario') . ': ' . $login);
do_navbar('<a href="' . $globals['base_url'] . 'topusers.php">' . _('usuarios') . '</a> » ' . $user->username);
echo '<div id="genericform-contents">' . "\n";
// Tabbed navigation
if (strlen($user->names) > 0) {
$display_name = $user->names;
} else {
$display_name = $user->username;
}
echo '<h2>' . $display_name . '</h2>' . "\n";
$url_login = urlencode($login);
switch ($view) {
case 'history':
do_user_tabs(2, $login);
do_history();
do_pages($rows, $page_size);
break;
示例4: array
$range_values = array(604800, 2592000, 31536000, 0);
if (($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0) {
$from_time = time() - $range_values[$from];
//$from_where = "FROM blogs, links WHERE link_published_date > FROM_UNIXTIME($from_time) and link_status = 'published' and link_lang = '$dblang' and link_blog = blog_id and blog_type='blog'";
$from_where = "FROM blogs, links WHERE link_published_date > FROM_UNIXTIME({$from_time}) and link_status = 'published' and link_lang = '{$dblang}' and link_blog = blog_id";
$time_query = "&from={$from_time}";
} else {
//$from_where = "FROM blogs, links WHERE link_status = 'published' and link_lang = '$dblang' and link_blog = blog_id and blog_type='blog'";
$from_where = "FROM blogs, links WHERE link_status = 'published' and link_lang = '{$dblang}' and link_blog = blog_id";
}
$from_where .= " GROUP BY blog_id";
$max = max($db->get_var("select count(*) as count {$from_where} order by count desc limit 1"), 2);
//echo "MAX= $max\n";
$coef = ($max_pts - $min_pts) / ($max - 1);
do_header(_('nube de blogs'));
do_navbar(_('blogs'));
echo '<div id="contents">';
echo '<h2>Los + blogs</h2>';
echo '<div style="margin: 20px 0 20px 0; line-height: ' . $line_height . 'pt; margin-left: 100px;">';
$res = $db->get_results("select blog_url, count(*) as count {$from_where} order by count desc limit {$limit}");
if ($res) {
foreach ($res as $item) {
$blogs[$item->blog_url] = $item->count;
}
ksort($blogs);
foreach ($blogs as $url => $count) {
$text = preg_replace('/http:\\/\\//', '', $url);
$text = preg_replace('/^www\\./', '', $text);
$text = preg_replace('/\\/$/', '', $text);
$size = intval($min_pts + ($count - 1) * $coef);
echo '<span style="font-size: ' . $size . 'pt"><a href="' . $url . '">' . $text . '</a></span> ';
示例5: array
$line_height = $max_pts * 0.75;
$range_names = array(_('48 horas'), _('última semana'), _('último mes'), _('último año'), _('todas'));
$range_values = array(172800, 604800, 2592000, 31536000, 0);
if (($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0) {
$from_time = time() - $range_values[$from];
$from_where = "FROM tags, links WHERE tag_lang='{$dblang}' and tag_date > FROM_UNIXTIME({$from_time}) and link_id = tag_link_id and link_status != 'discard'";
$time_query = "&from={$from_time}";
} else {
$from_where = "FROM tags, links WHERE tag_lang='{$dblang}' and link_id = tag_link_id and link_status != 'discard'";
}
$from_where .= " GROUP BY tag_words";
$max = max($db->get_var("select count(*) as words {$from_where} order by words desc limit 1"), 2);
//echo "MAX= $max\n";
$coef = ($max_pts - $min_pts) / ($max - 1);
do_header(_('nube de etiquetas'));
do_navbar(_('etiquetas'));
echo '<div id="contents">';
echo '<h2>+ ' . $words_limit . '</h2>';
echo '<div style="margin: 20px 0 20px 0; line-height: ' . $line_height . 'pt; margin-left: 100px;">';
$res = $db->get_results("select tag_words, count(*) as count {$from_where} order by count desc limit {$words_limit}");
if ($res) {
foreach ($res as $item) {
$words[$item->tag_words] = $item->count;
}
ksort($words);
foreach ($words as $word => $count) {
$size = intval($min_pts + ($count - 1) * $coef);
echo '<span style="font-size: ' . $size . 'pt"><a href="index.php?search=tag:' . urlencode($word) . $time_query . '">' . $word . '</a></span> ';
}
}
echo '</div>';
示例6: include
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');
force_authentication();
do_header(_("editar noticia"), "post");
do_navbar(_('editar noticia'));
echo '<div id="genericform-contents">'."\n";
if (!empty($_REQUEST['id']) && is_numeric($_REQUEST['id'])) {
$linkres=new Link;
$linkres->id=$link_id = intval($_REQUEST['id']);
$linkres->read();
if (!$linkres->is_editable() || intval($_GET['user'] != $current_user->user_id)) {
echo '<div class="form-error-submit"> '._("noticia no modificable").'</div>'."\n";
return;
}
if ($_POST['phase'] == "1")
do_save();
else
示例7: insert_comment
// do_user_ad: 0 = noad, > 0: probability n/100
if ($link->status == 'published' && $link->user_karma > 7 && !empty($link->user_adcode)) {
$globals['do_user_ad'] = $link->user_karma * 2;
$globals['user_adcode'] = $link->user_adcode;
}
if ($link->status != 'published') {
$globals['do_vote_queue'] = true;
}
if (!empty($link->tags)) {
$globals['tags'] = $link->tags;
}
if ($_POST['process'] == 'newcomment') {
insert_comment();
}
do_header($link->title, 'post');
do_navbar('<a href="' . $globals['base_url'] . '?category=' . $link->category . '">' . $globals['category_name'] . '</a> » ' . $link->title);
echo '<div id="contents">';
$link->print_summary();
echo '<div class="air-with-footer">' . "\n";
switch ($tab_option) {
case 1:
case 2:
echo '<div class="comments">';
// Print tabs
print_story_tabs($tab_option);
// AdSense
do_banner_story();
$comments = $db->get_col("SELECT comment_id FROM comments WHERE comment_link_id={$link->id} ORDER BY {$order_field}");
if ($comments) {
echo '<ol class="comments-list">';
require_once mnminclude . 'comment.php';
示例8: User
header("Location: ./login.php");
die;
}
$user=new User();
$user->username = $login;
if(!$user->read()) {
echo $login;
echo "error 2";
die;
}
do_header(_('edición del perfil del usuario'). ': ' . $user->username);
do_navbar('<a href="/topusers.php">'._('usuarios') . '</a> » <a href="/user.php">' . $user->username .'</a> » ' . _('editar'));
show_profile();
do_footer();
function show_profile() {
global $user, $admin_mode, $user_levels, $globals;
save_profile();
echo '<div id="genericform-contents"><div id="genericform"><fieldset><legend>';
if (!$admin_mode)
echo '<span class="sign">'._('modifica tu perfil')." ($user->username: $user->level)</span></legend>";
else
示例9: get_server_name
str=str.replace(/( |^)[xX]D+|:lol:/g, ' <img src="img/smileys/laugh.gif" alt="xD" title=":lol: xD" />');
str=str.replace(/ :-{0,1}S/gi, ' <img src="img/smileys/confused.gif" alt=":-S" title=":-S :S"/>');
str=str.replace(/:-{0,1}\|/gi, ' <img src="img/smileys/blank.gif" alt=":-|" title=":-| :|"/>');
str=str.replace(/:-{0,1}\*/gi, ' <img src="img/smileys/kiss.gif" alt=":-*" title=":-* :*"/>');
return str;
}
//]]>
</script>
<script type="text/javascript" src="http://<?php
echo get_server_name() . $globals['base_url'];
?>
js/sneak05.js.php"></script>
<?php
do_navbar(_('fisgona'));
//echo '<div class="air-with-footer">';
echo '<div class="sneaker">';
echo '<div class="sneaker-legend" onmouseout="tooltip.clear(event);" onmouseover="tooltip.clear(event);">';
echo '<form action="" class="sneaker-control" id="sneaker-control" name="sneaker-control">';
echo '<img id="play-pause-img" onclick="play_pause()" src="img/common/sneak-pause01.png" alt="play/pause" title="play/pause" /> ';
echo '<input type="checkbox" checked="checked" name="sneak-pubvotes" id="pubvotes-status" onclick="toggle_control(\'pubvotes\')" /><img src="img/common/sneak-vote-published01.png" width="20" height="16" title="' . _('votos de publicadas') . '" alt="' . _('votos de publicadas') . '" />';
echo '<input type="checkbox" checked="checked" name="sneak-vote" id="vote-status" onclick="toggle_control(\'vote\')" /><img src="img/common/sneak-vote01.png" width="20" height="16" title="' . _('meneos') . '" alt="' . _('meneos') . '" />';
echo '<input type="checkbox" checked="checked" name="sneak-problem" id="problem-status" onclick="toggle_control(\'problem\')" /><img src="img/common/sneak-problem01.png" width="20" height="16" alt="' . _('problema') . '" title="' . _('problema') . '"/>';
echo '<input type="checkbox" checked="checked" name="sneak-comment" id="comment-status" onclick="toggle_control(\'comment\')" /><img src="img/common/sneak-comment01.png" width="20" height="16" alt="' . _('comentario') . '" title="' . _('comentario') . '"/>';
echo '<input type="checkbox" checked="checked" name="sneak-new" id="new-status" onclick="toggle_control(\'new\')" /><img src="img/common/sneak-new01.png" width="20" height="16" alt="' . _('nueva') . '" title="' . _('nueva') . '"/>';
echo '<input type="checkbox" checked="checked" name="sneak-published" id="published-status" onclick="toggle_control(\'published\')" /><img src="img/common/sneak-published01.png" width="20" height="16" alt="' . _('publicada') . '" title="' . _('publicada') . '"/>';
// Only registered users can see the chat messages
if ($current_user->user_id > 0) {
$chat_checked = 'checked="checked"';
echo '<input type="checkbox" ' . $chat_checked . ' name="sneak-chat" id="chat-status" onclick="toggle_control(\'chat\')" /><img src="img/common/sneak-chat01.png" width="20" height="16" alt="' . _('mensaje') . '" title="' . _('mensaje') . '"/>';
示例10: count
break;
case 4:
$select = "SELECT user_id, count(*) as count ";
$from_where = " FROM votes, users WHERE vote_type='links' and vote_user_id=user_id GROUP BY vote_user_id";
$order_by = " ORDER BY count DESC ";
break;
case 5:
$select = "SELECT user_id, count(*) as count ";
$from_where = " FROM votes, users, links WHERE vote_type='links' and vote_user_id=user_id AND link_id=vote_link_id AND link_status='published' AND vote_date < link_published_date GROUP BY user_id";
$order_by = " ORDER BY count DESC ";
break;
}
// Sort by votes
do_header(_('usuarios'));
do_navbar('<a href="/topusers.php">'._('usuarios') . '</a> » ' . _('estadísticas'));
echo '<h2>'._('estadísticas').'</h2>';
echo '<p> </p> <table><tr>';
// Print headers
for($i=0; $i<count($items); $i++) {
echo '<th class="short">';
if($i==$sortby)
echo '<span class="info_s">'.$items[$i].'</span>';
else
echo '<a href="'.$_SERVER['PHP_SELF'].'?sortby='.$i.'">'.$items[$i].'</a>';
echo '</th>';
}
echo '<th class="short">karma</th>';
示例11: do_header
}
if ($search) {
do_header(_('búsqueda de') . '"' . $search_txt . '"');
do_navbar(_('búsqueda'));
echo '<div id="contents">';
// benjami: repetit, no m'agrada, arreglar depres
echo '<h2>' . _('resultados de la búsqueda') . ' "' . $search_txt . '" </h2>';
$from_where .= $search;
if ($_REQUEST['tag'] == 'true' || $_REQUEST['date'] == 'true') {
$order_by = ' ORDER BY link_date DESC ';
} else {
$order_by = '';
}
} else {
do_header(_('últimas publicadas'));
do_navbar('');
echo '<div id="contents">';
// benjami: repetit, no m'agrada, arreglar despres
echo '<h2>' . _('últimas noticias') . '</h2>';
$order_by = " ORDER BY link_published_date DESC ";
}
$link = new Link();
$rows = $db->get_var("SELECT count(*) {$from_where} {$order_by}");
$links = $db->get_col("SELECT link_id {$from_where} {$order_by} LIMIT {$offset},{$page_size}");
if ($links) {
foreach ($links as $link_id) {
$link->id = $link_id;
$link->read();
$link->print_summary();
}
}
示例12: do_header
$user->username = $login;
if (!$user->read()) {
echo $login;
echo "error 2";
die;
}
$globals['ads'] = true;
// Enable user AdSense
// do_user_ad: 0 = noad, > 0: probability n/100
// 100 if the user is the current one
if ($current_user->user_id == $user->id && $globals['external_user_ads'] && !empty($user->adcode)) {
$globals['user_adcode'] = $user->adcode;
$globals['do_user_ad'] = 100;
}
do_header(_('edición del perfil del usuario') . ': ' . $user->username);
do_navbar('<a href="/topusers.php">' . _('usuarios') . '</a> » <a href="' . get_user_uri($user->username) . '">' . $user->username . '</a> » ' . _('editar'));
show_profile();
do_footer();
function show_profile()
{
global $user, $admin_mode, $user_levels, $globals;
save_profile();
echo '<div id="genericform-contents"><div id="genericform"><fieldset><legend>';
if (!$admin_mode) {
echo '<span class="sign">' . _('modifica tu perfil') . " ({$user->username}: {$user->level})</span></legend>";
} else {
echo '<span class="sign">' . "<a href='" . get_user_uri($user->username) . "'>{$user->username}</a>: {$user->level}</span></legend>";
}
echo '<img class="sub-nav-img" src="' . $globals['base_url'] . 'backend/get_avatar.php?id=' . $user->id . '&size=80&t=' . time() . '" width="80" height="80" alt="' . $user->username . '" />';
echo '<form enctype="multipart/form-data" action="profile.php" method="post" id="thisform" AUTOCOMPLETE="off">';
echo '<input type="hidden" name="process" value="1" />';
示例13: get_server_name
str=str.replace(/([^a-zA-Z]|^)[xX]D+|:lol:/g, '<img src="img/smileys/laugh.gif" alt="xD" title=":lol: xD" />');
str=str.replace(/ :-{0,1}S/gi, ' <img src="img/smileys/confused.gif" alt=":-S" title=":-S :S"/>');
str=str.replace(/:-{0,1}\|/gi, '<img src="img/smileys/blank.gif" alt=":-|" title=":-| :|"/>');
str=str.replace(/:-{0,1}\*/gi, '<img src="img/smileys/kiss.gif" alt=":-*" title=":-* :*"/>');
return str;
}
//]]>
</script>
<script type="text/javascript" src="http://<?php
echo get_server_name() . $globals['base_url'];
?>
js/sneak04.js.php"></script>
<?php
do_navbar(_('¡HOYGAN!'));
//echo '<div class="air-with-footer">';
echo '<div class="sneaker">';
echo '<div class="sneaker-legend">';
echo '<form action="" class="sneaker-control" id="sneaker-control" name="sneaker-control">';
echo '<img id="play-pause-img" onclick="play_pause()" src="img/common/sneak-pause01.png" alt="play/pause" title="play/pause"> ';
echo '<input type="checkbox" checked="checked" name="sneak-pubvotes" id="pubvotes-status" onclick="toggle_control(\'pubvotes\')" /><img src="img/common/sneak-vote-published01.png" width="20" height="16" title="' . _('votos de publicadas') . '" alt="' . _('votos de publicadas') . '" />';
echo '<input type="checkbox" checked="checked" name="sneak-vote" id="vote-status" onclick="toggle_control(\'vote\')" /><img src="img/common/sneak-vote01.png" width="20" height="16" title="' . _('meneos') . '" alt="' . _('meneos') . '" />';
echo '<input type="checkbox" checked="checked" name="sneak-problem" id="problem-status" onclick="toggle_control(\'problem\')" /><img src="img/common/sneak-problem01.png" width="20" height="16" alt="' . _('problema') . '" title="' . _('problema') . '"/>';
echo '<input type="checkbox" checked="checked" name="sneak-comment" id="comment-status" onclick="toggle_control(\'comment\')" /><img src="img/common/sneak-comment01.png" width="20" height="16" alt="' . _('HOYGAN') . '" title="' . _('HOYGAN') . '"/>';
echo '<input type="checkbox" checked="checked" name="sneak-new" id="new-status" onclick="toggle_control(\'new\')" /><img src="img/common/sneak-new01.png" width="20" height="16" alt="' . _('nueva') . '" title="' . _('nueva') . '"/>';
echo '<input type="checkbox" checked="checked" name="sneak-published" id="published-status" onclick="toggle_control(\'published\')" /><img src="img/common/sneak-published01.png" width="20" height="16" alt="' . _('publicada') . '" title="' . _('publicada') . '"/>';
if ($current_user->user_id > 0) {
$chat_checked = 'checked="checked"';
} else {
$chat_checked = '';
示例14: count
break;
case 4:
$select = "SELECT user_id, count(*) as count ";
$from_where = " FROM comments, users WHERE comment_user_id=user_id GROUP BY comment_user_id";
$order_by = " ORDER BY count DESC ";
break;
case 5:
$select = "SELECT user_id, count(*) as count ";
$from_where = " FROM votes, users WHERE vote_type='links' and vote_user_id=user_id GROUP BY vote_user_id";
$order_by = " ORDER BY count DESC ";
break;
}
// Sort by votes
do_header(_('usuarios'));
do_navbar('<a href="'.$globals['base_url'].'topusers.php">'._('usuarios') . '</a> » ' . _('estadísticas'));
echo '<h2>'._('estadísticas').'</h2>';
echo '<p> </p> <table><tr>';
// Print headers
for($i=0; $i<count($items); $i++) {
echo '<th class="short">';
if($i==$sortby)
echo '<span class="info_s">'.$items[$i].'</span>';
else
echo '<a href="'.$_SERVER['PHP_SELF'].'?sortby='.$i.'">'.$items[$i].'</a>';
echo '</th>';
}
echo '</tr>';
示例15: User
if ($current_user->user_id > 0 && $current_user->authenticated && in_array($current_user->user_level, array('admin', 'god'))) {
$login=$current_user->user_login;
} else {
header("Location: ./login.php");
die;
}
$user=new User();
$user->username = $login;
if(!$user->read()) {
echo "error 2";
die;
}
do_header(_('administración de categorías'));
do_navbar(_('administración de categorías'));
show_category_form();
do_footer();
function show_category_form() {
global $user;
change_categories();
echo '<div id="genericform-contents"><div id="genericform"><fieldset><legend>';
echo '<span class="sign">'._('administración de categorías').'</span></legend>';
echo '<div class="column-list">'."\n";