本文整理汇总了PHP中get_user_uri函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_uri函数的具体用法?PHP get_user_uri怎么用?PHP get_user_uri使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_user_uri函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: print_summary
function print_summary($type = 'full', $karma_best_comment = 0, $show_tags = true)
{
global $current_user, $current_user, $globals, $db;
if (!$this->read) {
return;
}
$this->is_votable();
switch ($this->status) {
case 'queued':
// another color box for not-published
$box_class = 'mnm-queued';
break;
case 'abuse':
// another color box for discarded
// another color box for discarded
case 'autodiscard':
// another color box for discarded
// another color box for discarded
case 'discard':
// another color box for discarded
$box_class = 'mnm-discarded';
break;
case 'published':
// default for published
// default for published
default:
$box_class = 'mnm-published';
break;
}
$this->has_warning = !(!$this->check_warn() || $this->is_discarded());
$this->is_editable = $this->author == $current_user->user_id && $this->is_editable();
$this->total_votes = $this->votes + $this->anonymous;
$this->rpermalink = $this->get_relative_permalink();
$this->author_html = '<a href="' . get_user_uri($this->username, 'history') . '">' . $this->username . '</a>';
$this->normal_link = preg_replace('/\\/mobile\\//', '/', $this->get_relative_permalink());
$this->show_shakebox = $type != 'preview' && $this->votes > 0;
$this->thumb_url = $this->has_thumb();
if ($this->status == 'abuse' || $this->has_warning) {
$this->negative_text = FALSE;
$negatives = $db->get_row("select SQL_CACHE vote_value, count(vote_value) as count from votes where vote_type='links' and vote_link_id={$this->id} and vote_value < 0 group by vote_value order by count desc limit 1");
if ($negatives->count > 2 && $negatives->count >= $this->negatives / 2 && ($negatives->vote_value == -6 || $negatives->vote_value == -8)) {
$this->negative_text = get_negative_vote($negatives->vote_value);
}
}
$text = $this->content;
$my_domain = get_server_name();
$parent_domain = preg_replace('/m\\./', '', $my_domain);
if ($parent_domain != $my_domain && preg_match('#[^\\.]' . preg_quote($parent_domain) . '/#', $text)) {
$text = preg_replace('#([^\\.])' . preg_quote($parent_domain) . '/#', "\$1{$my_domain}/", $text);
}
$vars = compact('type', 'karma_best_comment', 'show_tags', 'box_class', 'nofollow', 'url', 'text');
$vars['self'] = $this;
return Haanga::Load('mobile/link_summary.html', $vars);
}
开发者ID:GallardoAlba,项目名称:Meneame,代码行数:54,代码来源:linkmobile.php
示例2: print_summary
function print_summary($link = 0, $length = 0, $single_link = true)
{
global $current_user, $globals;
if (!$this->read) {
return;
}
echo '<li id="c-' . $this->order . '">';
$this->hidden = $this->karma < -80 || $this->user_level == 'disabled' && $this->type != 'admin';
if ($this->hidden) {
$comment_meta_class = 'comment-meta-hidden';
$comment_class = 'comment-body-hidden';
} else {
$comment_meta_class = 'comment-meta';
$comment_class = 'comment-body';
if ($this->karma > $globals['comment_highlight_karma']) {
$comment_class .= ' high';
}
}
$this->link_permalink = $link->get_relative_permalink();
echo '<div class="' . $comment_class . '">';
echo '<strong>#' . $this->order . '</strong>';
echo ' <span id="cid-' . $this->id . '">';
if ($this->hidden && ($current_user->user_comment_pref & 1) == 0) {
echo '» <a href="javascript:load_html(\'get_commentmobile.php\',\'comment\',\'cid-' . $this->id . '\',0,' . $this->id . ')" title="' . _('ver comentario') . '">' . _('ver comentario') . '</a>';
} else {
$this->print_text($length);
}
echo '</span></div>';
// The comments info bar
echo '<div class="' . $comment_meta_class . '">';
if ($this->type == 'admin') {
$author = '<strong>' . _('admin') . '</strong> ';
} else {
$author = '<a href="' . get_user_uri($this->username) . '" title="karma: ' . $this->user_karma . '">' . $this->username . '</a> ';
}
printf(_('por %s el %s'), $author, get_date_time($this->date));
// Check that the user can vote
if ($this->type != 'admin' && $this->user_level != 'disabled') {
echo ' ' . _('votos') . ': <span id="vc-' . $this->id . '">' . $this->votes . '</span>, ' . _('karma') . ': <span id="vk-' . $this->id . '">' . $this->karma . '</span>';
}
echo '</div>';
echo "</li>\n";
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:43,代码来源:commentmobile.php
示例3: print_summary
function print_summary($link = 0, $length = 0, $single_link = true)
{
global $current_user, $globals;
if (!$this->read) {
return;
}
if (!$link && $this->link > 0) {
$link = new Link();
$link->id = $this->link;
$link->read();
$this->link_object = $link;
}
$this->link_permalink = $link->get_relative_permalink();
$this->check_visibility();
if ($this->hidden) {
$comment_meta_class = 'comment-meta-hidden';
$comment_class = 'comment-body-hidden';
} else {
$comment_meta_class = 'comment-meta';
$comment_class = 'comment-body';
if ($this->karma > $globals['comment_highlight_karma']) {
$comment_class .= ' high';
}
}
$this->truncate($length);
$this->txt_content = $this->to_html($this->content);
if ($this->type == 'admin') {
$author = '<strong>' . _('admin') . '</strong> ';
} else {
$author = '<a href="' . get_user_uri($this->username) . '" title="karma: ' . $this->user_karma . '">' . $this->username . '</a> ';
}
if ($this->media_size > 0) {
$this->media_thumb_dir = Upload::get_cache_relative_dir($this->id);
}
$vars = compact('comment_meta_class', 'comment_class', 'author');
$vars['self'] = $this;
return Haanga::Load('mobile/comment_summary.html', $vars);
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:38,代码来源:commentmobile.php
示例4: show_profile
function show_profile()
{
global $user, $user_levels, $globals, $site_key, $current_user;
echo '<div>';
echo '<form enctype="multipart/form-data" action="' . get_auth_link() . 'profile.php" method="post" id="thisform" AUTOCOMPLETE="off">';
echo '<fieldset><legend>';
echo '<span class="sign">' . _('opciones de usuario') . " <a href='" . get_user_uri($user->username) . "'>{$user->username}</a>: {$user->level}</span></legend>";
echo '<img class="thumbnail" src="' . $globals['base_url'] . 'backend/get_avatar.php?id=' . $user->id . '&size=80&t=' . time() . '" width="80" height="80" alt="' . $user->username . '" />';
echo '<input type="hidden" name="process" value="1" />';
echo '<input type="hidden" name="user_id" value="' . $user->id . '" />';
echo '<input type="hidden" name="form_hash" value="' . md5($site_key . $user->id . mnminclude) . '" />';
get_form_auth_ip();
echo '<p><label>' . _('usuario') . ':</label><br/>';
echo '<input type="text" autocomplete="off" name="username" id="username" value="' . $user->username . '"/>';
echo '</p>';
echo '<p><label>' . _('nombre real') . ':</label><br/>';
echo '<input type="text" autocomplete="off" name="names" id="names" value="' . $user->names . '"/>';
echo '</p>';
echo '<p><label>' . _('correo electrónico') . ':</label><br/>';
echo '<input type="text" autocomplete="off" name="email" id="email" value="' . $user->email . '"/>';
echo '</p>';
echo '<p><label>' . _('página web') . ':</label><br/>';
echo '<input type="text" autocomplete="off" name="url" id="url" value="' . $user->url . '" />';
echo '</p>';
if (is_avatars_enabled()) {
echo '<input type="hidden" name="MAX_FILE_SIZE" value="300000" />';
echo '<p><label>' . _('avatar') . ':</label><br/>';
echo '<input type="file" autocomplete="off" name="image" />';
echo '</p>';
}
echo '<p><label for="password">' . _("nueva clave") . ':</label><br />' . "\n";
echo '<input type="password" autocomplete="off" id="password" name="password" size="25" onkeyup="return securePasswordCheck(this.form.password);"/></p>' . "\n";
echo '<p><label for="verify">' . _("repite la clave") . ': </label><br />' . "\n";
echo '<input type="password" autocomplete="off" id="verify" name="password2" size="25" onkeyup="checkEqualFields(this.form.password2, this.form.password)"/></p>' . "\n";
echo '<p><input type="submit" name="save_profile" value="' . _('actualizar') . '"/></p>';
echo '</fieldset>';
echo "</form></div>\n";
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:38,代码来源:profile.php
示例5: do_redirect
function do_redirect($type)
{
global $globals, $current_user;
$url = '/';
// If everything fails, it will be redirected to the home
switch ($type) {
case 'privates':
$url = post_get_base_url('_priv');
break;
case 'posts':
$url = post_get_base_url($current_user->user_login) . '/_conversation';
break;
case 'comments':
$url = get_user_uri($current_user->user_login, 'conversation');
break;
case 'friends':
$url = get_user_uri($current_user->user_login, 'friends_new');
break;
}
header("HTTP/1.1 302 Moved");
header('Location: ' . $url);
header("Content-Length: 0");
}
开发者ID:GallardoAlba,项目名称:Meneame,代码行数:23,代码来源:notifications.json.php
示例6: do_header
function do_header($title, $id = 'home')
{
global $current_user, $dblang, $globals, $greetings;
check_auth_page();
header('Content-Type: text/html; charset=utf-8');
http_cache();
if (!empty($globals['link_id'])) {
// Pingback autodiscovery
// http://www.hixie.ch/specs/pingback/pingback
header('X-Pingback: http://' . get_server_name() . $globals['base_url'] . 'xmlrpc.php');
}
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
//echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . $dblang . '" lang="' . $dblang . '">' . "\n";
echo '<head>' . "\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
echo '<meta name="ROBOTS" content="NOARCHIVE" />' . "\n";
echo "<title>{$title}</title>\n";
do_css_includes();
echo '<meta name="generator" content="meneame" />' . "\n";
if ($globals['noindex']) {
echo '<meta name="robots" content="noindex,follow"/>' . "\n";
}
if ($globals['tags']) {
echo '<meta name="keywords" content="' . $globals['tags'] . '" />' . "\n";
}
if ($globals['description']) {
echo '<meta name="description" content="' . $globals['description'] . '" />' . "\n";
}
if ($globals['link']) {
echo '<link rel="pingback" href="http://' . get_server_name() . $globals['base_url'] . 'xmlrpc.php"/>' . "\n";
}
echo '<link rel="microsummary" type="application/x.microsummary+xml" href="' . $globals['base_url'] . 'microsummary.xml" />' . "\n";
echo '<link rel="search" type="application/opensearchdescription+xml" title="' . _("menéame search") . '" href="http://' . get_server_name() . $globals['base_url'] . 'opensearch_plugin.php"/>' . "\n";
echo '<link rel="alternate" type="application/rss+xml" title="' . _('publicadas') . '" href="http://' . get_server_name() . $globals['base_url'] . 'rss2.php" />' . "\n";
echo '<link rel="alternate" type="application/rss+xml" title="' . _('pendientes') . '" href="http://' . get_server_name() . $globals['base_url'] . 'rss2.php?status=queued" />' . "\n";
echo '<link rel="alternate" type="application/rss+xml" title="' . _('comentarios') . '" href="http://' . get_server_name() . $globals['base_url'] . 'comments_rss2.php" />' . "\n";
if (!$globals['favicon']) {
$globals['favicon'] = 'img/favicons/favicon4.ico';
}
echo '<link rel="shortcut icon" href="' . $globals['base_static'] . $globals['favicon'] . '" type="image/x-icon"/>' . "\n";
do_js_includes();
if ($globals['thumbnail']) {
// WARN: It's assumed a thumbanil comes with base_url included
$thumb = $globals['thumbnail'];
} else {
$thumb = 'http://' . get_static_server_name() . $globals['base_url'] . $globals['thumbnail_logo'];
}
echo '<meta name="thumbnail_url" content="' . $thumb . "\"/>\n";
echo '<link rel="image_src" href="' . $thumb . "\"/>\n";
if ($globals['extra_head']) {
echo $globals['extra_head'];
}
echo '</head>' . "\n";
echo "<body id=\"{$id}\" " . $globals['body_args'] . ">\n";
echo '<div id="wrap">' . "\n";
echo '<div id="header">' . "\n";
echo '<a href="' . $globals['base_url'] . '" title="' . _('inicio') . '" id="logo">' . _("menéame") . '</a>' . "\n";
echo '<ul id="headtools">' . "\n";
// Main search form
echo '<li class="searchbox">' . "\n";
echo '<form action="' . $globals['base_url'] . 'search.php" method="get" name="top_search">' . "\n";
echo '<img src="' . $globals['base_static'] . 'img/common/search-left-04.png" width="6" height="22" alt=""/>';
if (!empty($_REQUEST['q'])) {
echo '<input type="text" name="q" value="' . htmlspecialchars($_REQUEST['q']) . '" />';
} else {
echo '<input name="q" value="' . _('buscar') . '..." type="text" onblur="if(this.value==\'\') this.value=\'' . _('buscar') . '...\';" onfocus="if(this.value==\'' . _('buscar') . '...\') this.value=\'\';"/>';
}
echo '<a href="javascript:document.top_search.submit()"><img class="searchIcon" alt="' . _('buscar') . '" src="' . $globals['base_static'] . 'img/common/search-04.png" id="submit_image" width="28" height="22"/></a>' . "\n";
if ($globals['search_options']) {
foreach ($globals['search_options'] as $name => $value) {
echo '<input type="hidden" name="' . $name . '" value="' . $value . '"/>' . "\n";
}
}
echo '</form>';
echo '</li>' . "\n";
// form
echo '<li><a href="http://meneame.wikispaces.com/Comenzando">' . _('ayuda') . ' <img src="' . $globals['base_static'] . 'img/common/help-bt-02.png" alt="help button" title="' . _('ayuda') . '" width="13" height="16" /></a></li>';
if ($current_user->admin) {
echo '<li><a href="' . $globals['base_url'] . 'admin/bans.php">admin <img src="' . $globals['base_static'] . 'img/common/tools-bt-02.png" alt="tools button" title="herramientas" width="16" height="16" /> </a></li>' . "\n";
}
if ($current_user->authenticated) {
$randhello = array_rand($greetings, 1);
echo '<li><a href="' . get_user_uri($current_user->user_login) . '" title="' . _('menéame te saluda en ') . $greetings[$randhello] . '">' . $randhello . ' ' . $current_user->user_login . ' <img src="' . get_avatar_url($current_user->user_id, $current_user->user_avatar, 20) . '" width="20" height="20" alt="' . $current_user->user_login . '"/></a></li>' . "\n";
echo '<li><a href="' . $globals['base_url'] . 'login.php?op=logout&return=' . urlencode($_SERVER['REQUEST_URI']) . '">' . _('cerrar sesión') . ' <img src="' . $globals['base_static'] . 'img/common/logout-bt-02.png" alt="" title="logout" width="22" height="16" /></a></li>' . "\n";
} else {
echo '<li><a href="' . $globals['base_url'] . 'register.php">' . _('registrarse') . ' <img src="' . $globals['base_static'] . 'img/common/register-bt-02.png" alt="" title="register" width="16" height="18" /></a></li>' . "\n";
echo '<li><a href="' . $globals['base_url'] . 'login.php?return=' . urlencode($_SERVER['REQUEST_URI']) . '">' . _('login') . ' <img src="' . $globals['base_static'] . 'img/common/login-bt-02.png" alt="" title="login" width="22" height="16" /></a></li>' . "\n";
}
//echo '<li><a href="'.$globals['base_url'].'faq-'.$dblang.'.php">' . _('acerca de menéame').'</a></li>' . "\n";
echo '</ul>' . "\n";
echo '</div>' . "\n";
echo '<div id="naviwrap">' . "\n";
echo '<ul>' . "\n";
echo '<li><a href="' . $globals['base_url'] . 'submit.php">' . _('enviar noticia') . '</a></li>' . "\n";
echo '<li><a href="' . $globals['base_url'] . 'shakeit.php">' . _('pendientes') . '</a></li>' . "\n";
echo '<li><a href="' . $globals['base_url'] . 'sneak.php">' . _('fisgona') . '</a></li>' . "\n";
echo '<li><a href="' . $globals['base_url'] . 'notame/">' . _('nótame') . '</a></li>' . "\n";
echo '</ul></div>' . "\n";
do_banner_top();
//.........这里部分代码省略.........
开发者ID:brainsqueezer,项目名称:fffff,代码行数:101,代码来源:html1.php
示例7: print_summary
//.........这里部分代码省略.........
//echo ' <span id="cid-'.$this->id.'">';
echo ' <span id="cid-'.$this->id.'">';
if ($this->ignored || ($this->hidden && ($current_user->user_comment_pref & 1) == 0)) {
echo '» <a href="javascript:get_votes(\'get_comment.php\',\'comment\',\'cid-'.$this->id.'\',0,'.$this->id.')" title="'._('ver comentario').'">'._('ver comentario').'</a>';
echo '</span>';
} else {
$this->print_text($length, $html_id);
echo '</span>';
}
//echo '</div>';
// The comments info bar
echo '<div class="'.$comment_meta_class.' comment_mc" >';
// Check that the user can vote
echo '<div class="comment-votes-info">';
echo '<a class="comment_vi" href="#c-'.$this->c_order.'" >#'.$this->c_order.'</a> ';
if ($this->type != 'admin' && $this->user_level != 'disabled') {
// Print the votes info (left)
/*
if ($current_user->user_id > 0
&& $this->author != $current_user->user_id
&& $single_link
&& $this->date > $globals['now'] - $globals['time_enabled_comments']
&& $this->level != 'autodisabled') {
//$this->print_shake_icons();
}
*/
echo _('votos').': <span id="vc-'.$this->id.'">'.$this->votes.'</span>, '._('karma').': <span id="vk-'.$this->id.'">'.$this->karma.'</span> ';
// Add the icon to show votes
if ($this->votes > 0 && $this->date > $globals['now'] - 30*86400) { // Show votes if newer than 30 days
echo '<a href="javascript:modal_from_ajax(\''.$globals['base_url'].'backend/get_c_v.php?id='.$this->id.'\')">';
echo '<img src="'.$globals['base_static'].'img/common/vote-info02.png" width="18" height="16" alt="+ info" title="'._('¿quién ha votado?').'"/>';
echo '</a>';
}
}
// Comment reply
if ($current_user->user_id > 0 && $globals['link'] && $globals['link']->date > $globals['now'] - $globals['time_enabled_comments']) {
echo '<a href="javascript:comment_reply('.$this->order.','.$this->id.')" title="'._('responder').'"><img src="'.$globals['base_static'].'img/common/reply02.png" width="18" height="16"/></a>';
}
// Comment permalink
echo '<a href="'.$this->get_relative_individual_permalink().'" title="permalink"><img class="link-icon" src="'.$globals['base_static'].'img/common/link-02.png" width="18" height="16" alt="link" title="'._('enlace permanente').'"/></a>';
// If the user is authenticated, show favorite box
if ($current_user->user_id > 0) {
echo '<a id="fav-'.$this->id.'" href="javascript:get_votes(\'get_favorite_comment.php\',\''.$current_user->user_id.'\',\'fav-'.$this->id.'\',0,\''.$this->id.'\')">'.favorite_teaser($current_user->user_id, $this, 'comment').'</a>';
}
echo '</div>';
// Print comment info (right)
echo '<div class="comment-info">';
if ($this->type == 'admin') {
$author = '<strong>'._('admin').'</strong> ';
if ($current_user->admin) {
$author .= ' ('.$this->username.')';
}
} elseif ($single_link) {
$author = '<a href="'.get_user_uri($this->username).'" title="karma: '.$this->user_karma.'" id="cauthor-'.$this->order.'">'.$this->username.'</a>';
} else {
$author = '<a href="'.get_user_uri($this->username).'" title="karma: '.$this->user_karma.'">'.$this->username.'</a>';
}
// Print dates
if ($this->modified > $this->date + 1) {
$edited = sprintf('<strong title="'. _('editado %s después').'">* </strong>', txt_time_diff($this->date, $this->modified));
} else $edited = '';
if (!$this->hidden && $this->type != 'admin' && $this->avatar) {
$avatar = get_avatar_url($this->author, $this->avatar, 20);
} else {
$avatar = get_no_avatar_url(20);
}
if ($globals['now'] - $this->date > 604800) { // 7 days
printf(_('el %s %s por %s'), get_date_time($this->date), $edited, $author);
} else {
printf(_('fai %s %s por %s'), txt_time_diff($this->date), $edited, $author);
}
echo '<img src="'.$avatar.'" width="20" height="20" alt="" title="'.$this->username.', karma: '.$this->user_karma.'" />';
echo '</div>';
echo '</div></div>';
}
开发者ID:rasomu,项目名称:chuza,代码行数:101,代码来源:comment.php
示例8: __
</div>
<?php
if (!$isrunning) {
?>
<div class="box">
<h2><?php
echo __("Voters");
?>
</h2>
<ul>
<?php
foreach ($whovoted as $voter) {
?>
<li><a href="<?php
echo get_user_uri($voter);
?>
"><?php
echo htmlspecialchars($voter);
?>
</a></li>
<?php
}
?>
</ul>
</div>
<?php
}
?>
<div class="box">
开发者ID:pyp22,项目名称:aurweb,代码行数:31,代码来源:tu_details.php
示例9: do_categories
function do_categories()
{
global $globals, $current_user, $db, $user, $login;
$options = array();
$options[$user->username] = get_user_uri($user->username);
$options[_('categorías personalizadas')] = get_user_uri($user->username, 'categories');
if ($current_user->user_id == $user->id || $current_user->user_level == 'god') {
$options[_('modificar perfil') . ' →'] = $globals['base_url'] . 'profile.php?login=' . urlencode($login);
}
do_user_subheader($options, 1, 'rss2.php?personal=' . $user->id, _('categorías personalizadas en rss2'));
if (is_array($_POST['categories'])) {
$db->query("delete from prefs where pref_user_id = {$current_user->user_id} and pref_key = 'category_" . SitesMgr::my_id() . "'");
$total = count(SitesMgr::get_categories());
if (count($_POST['categories']) < $total) {
for ($i = 0; $i < count($_POST['categories']); $i++) {
$cat = intval($_POST['categories'][$i]);
$db->query("insert into prefs (pref_user_id, pref_key, pref_value) values ({$current_user->user_id}, 'category_" . SitesMgr::my_id() . "', {$cat})");
}
}
}
print_categories_checkboxes($user);
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:22,代码来源:user.php
示例10: switch
}
$prefered_page_size = 20;
$prefered_offset = ($prefered_page - 1) * $prefered_page_size;
switch ($prefered_type) {
case 'friends':
$prefered_total = $db->get_var("SELECT count(*) FROM friends WHERE friend_type='affiliate' AND friend_from={$prefered_id} AND friend_to !=0");
$dbusers = $db->get_results("SELECT friend_to as who, friend_value FROM friends WHERE friend_type='affiliate' AND friend_from={$prefered_id} AND friend_to !=0 ORDER BY friend_value DESC LIMIT {$prefered_offset},{$prefered_page_size}");
break;
case 'voters':
$prefered_total = $db->get_var("SELECT count(*) FROM friends WHERE friend_type='affiliate' AND friend_to={$prefered_id} AND friend_from !=0");
$dbusers = $db->get_results("SELECT friend_from as who, friend_value FROM friends WHERE friend_type='affiliate' AND friend_to={$prefered_id} AND friend_from !=0 ORDER BY friend_value DESC LIMIT {$prefered_offset},{$prefered_page_size}");
break;
}
if ($dbusers) {
$friend = new User();
echo '<div class="voters-list">';
foreach ($dbusers as $dbuser) {
$friend->id = $dbuser->who;
$value = $dbuser->friend_value * 100;
$value = sprintf("%6.2f", $value);
$friend->read();
echo '<div class="item">';
echo '<a href="' . get_user_uri($friend->username) . '" title="' . $value . ' %">';
echo '<img src="' . get_avatar_url($friend->id, $friend->avatar, 20) . '" width="20" height="20" alt="' . $friend->username . '"/>';
echo $friend->username . '</a>';
echo '</div>';
echo "\n";
}
echo '</div>';
do_contained_pages($prefered_id, $prefered_total, $prefered_page, $prefered_page_size, 'get_prefered.php', $prefered_type, $prefered_type . '-container');
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:31,代码来源:get_prefered.php
示例11: __
<p>
<?php
echo __('You can use this form to permanently delete the AUR account %s.', '<strong>' . htmlspecialchars($username) . '</strong>');
?>
</p>
<p>
<?php
echo __('%sWARNING%s: This action cannot be undone.', '<strong>', '</strong>');
?>
</p>
<form id="edit-profile-form" action="<?php
echo get_user_uri($username) . 'delete/';
?>
" method="post">
<fieldset>
<input type="hidden" name="Action" value="<?php
echo $A;
?>
" />
<input type="hidden" name="ID" value="<?php
echo $UID;
?>
" />
<input type="hidden" name="token" value="<?php
echo htmlspecialchars($_COOKIE['AURSID']);
?>
" />
</fieldset>
<fieldset>
<p><label class="confirmation"><input type="checkbox" name="confirm" value="1" />
开发者ID:pyp22,项目名称:aurweb,代码行数:31,代码来源:account_delete.php
示例12: do_friends
function do_friends($option)
{
global $db, $user, $globals, $current_user;
$header_options = array(_('amigos') => get_user_uri($user->username, 'friends'), _('elegido por') => get_user_uri($user->username, 'friend_of'));
if ($user->id == $current_user->user_id) {
$header_options[_('ignorados')] = get_user_uri($user->username, 'ignored');
$header_options[_('nuevos')] = get_user_uri($user->username, 'friends_new');
}
$prefered_id = $user->id;
$prefered_admin = $user->admin;
switch ($option) {
case 3:
do_user_subheader($header_options, $option);
$prefered_type = 'new';
break;
case 2:
do_user_subheader($header_options, $option);
$prefered_type = 'ignored';
break;
case 1:
$prefered_type = 'to';
do_user_subheader($header_options, $option);
break;
default:
do_user_subheader($header_options, $option, 'rss?friends_of=' . $user->id, _('envíos de amigos en rss2'));
$prefered_type = 'from';
}
echo '<div style="padding: 5px 0px 10px 5px">';
echo '<div id="' . $prefered_type . '-container">' . "\n";
require 'backend/get_friends_bars.php';
echo '</div>' . "\n";
echo '</div>' . "\n";
// Post processing
switch ($option) {
case 3:
if ($user->id == $current_user->user_id) {
User::update_new_friends_date();
}
break;
default:
}
}
开发者ID:GallardoAlba,项目名称:Meneame,代码行数:42,代码来源:user.php
示例13: do_header
function do_header($title, $id = 'home')
{
global $current_user, $dblang, $globals;
check_auth_page();
header('Content-type: text/html; charset=utf-8');
http_cache();
//echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">' . "\n";
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . $dblang . '">' . "\n";
echo '<head>' . "\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
echo '<meta name="ROBOTS" content="NOARCHIVE" />' . "\n";
echo '<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>' . "\n";
echo "<title>{$title}</title>\n";
do_css_includes();
echo '<meta name="generator" content="meneame mobile" />' . "\n";
if (!empty($globals['noindex'])) {
echo '<meta name="robots" content="noindex,follow"/>' . "\n";
}
if (!empty($globals['tags'])) {
echo '<meta name="keywords" content="' . $globals['tags'] . '" />' . "\n";
}
if (empty($globals['favicon'])) {
$globals['favicon'] = 'img/favicons/favicon4.ico';
}
echo '<link rel="icon" href="' . $globals['base_static'] . $globals['favicon'] . '" type="image/x-icon"/>' . "\n";
echo '<link rel="apple-touch-icon" href="' . $globals['base_static'] . 'img/favicons/apple-touch-icon.png"/>' . "\n";
echo '<link rel="alternate" type="application/rss+xml" title="' . _('publicadas') . '" href="http://' . get_server_name() . $globals['base_url'] . 'rss2.php" />' . "\n";
if ($globals['extra_head']) {
echo $globals['extra_head'];
}
echo '</head>' . "\n";
echo "<body id=\"{$id}\" " . $globals['body_args'] . ">\n";
echo '<div id="header">' . "\n";
echo '<a href="' . $globals['base_url'] . '" title="' . _('inicio') . '" id="logo">' . _("menéame") . '</a>' . "\n";
echo '<ul id="headtools">';
echo '<li><a href="' . $globals['base_url'] . 'search.php">' . _('buscar') . '</a></li>';
if ($current_user->authenticated) {
echo '<li><a href="' . $globals['base_url'] . 'login.php?op=logout&return=' . urlencode($_SERVER['REQUEST_URI']) . '">' . _('logout') . '</a></li>';
echo '<li class="noborder"><a href="' . get_user_uri($current_user->user_login) . '" title="' . $current_user->user_login . '"><img src="' . get_avatar_url($current_user->user_id, $current_user->user_avatar, 20) . '" width="20" height="20" alt="' . $current_user->user_login . '"/></a></li>';
} else {
echo '<li class="noborder"><a href="' . $globals['base_url'] . 'login.php?return=' . urlencode($_SERVER['REQUEST_URI']) . '">' . _('login') . '</a></li>';
}
echo '</ul>' . "\n";
echo '</div>' . "\n";
do_banner_top_mobile();
echo '<div id="container">' . "\n";
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:48,代码来源:html1-mobile.php
示例14: to_html
function to_html($string, $fancy = true)
{
global $globals;
$string = nl2br($string, true);
$regexp = '#[^\\s\\.\\,\\:\\;\\¡\\!\\)\\-<>&\\?]{1,42}';
if ($fancy) {
// Add smileys
$regexp .= '|\\{\\S{3,14}\\}';
}
if (is_a($this, 'Post')) {
// references to @users
$regexp .= '|@[\\p{L}\\.\\_][\\.\\d\\-_\\p{L}]+(?:,\\d+){0,1}';
} elseif (is_a($this, 'Comment')) {
$regexp .= '|@[\\p{L}\\.][\\.\\d\\-_\\p{L}]+\\w';
}
$regexp .= '|(https{0,1}:\\/\\/)([^\\s<>]{5,500}[^\\s<>,;:\\.])';
$regexp .= '|\\|([\\p{L}\\d_]+)';
$regexp = '/([\\s\\(\\[{}¡;,:¿>\\*]|^)(' . $regexp . ')/Smu';
$callback = function ($matches) {
global $globals;
switch ($matches[2][0]) {
case '#':
if (preg_match('/^#\\d+$/', $matches[2])) {
$id = substr($matches[2], 1);
if (is_a($this, 'Comment')) {
if ($id > 0) {
return $matches[1] . '<a class="tooltip c:' . $this->link . '-' . $id . '" href="' . $this->link_permalink . '/c0' . $id . '#c-' . $id . '" rel="nofollow">#' . $id . '</a>';
} else {
return $matches[1] . '<a class="tooltip l:' . $this->link . '" href="' . $this->link_permalink . '" rel="nofollow">#' . $id . '</a>';
}
} elseif (is_a($this, 'Link')) {
return $matches[1] . '<a class="tooltip c:' . $this->id . '-' . $id . '" href="' . $this->get_permalink() . '/c0' . $id . '#c-' . $id . '" rel="nofollow">#' . $id . '</a>';
}
} else {
switch (get_class($this)) {
case 'Link':
$w = 'links';
break;
case 'Comment':
$w = 'comments';
break;
case 'Post':
$w = 'posts';
break;
}
return $matches[1] . '<a href="' . $globals['base_url'] . 'search?w=' . $w . '&q=%23' . substr($matches[2], 1) . '&o=date">#' . substr($matches[2], 1) . '</a>';
}
break;
case '@':
$ref = substr($matches[2], 1);
if (is_a($this, 'Post')) {
$a = explode(',', $ref);
if (count($a) > 1) {
$user = $a[0];
$id = ',' . $a[1];
} else {
$user = $ref;
$id = '';
}
$user_url = urlencode($user);
return $matches[1] . "<a class='tooltip p:{$user_url}{$id}-{$this->date}' href='" . $globals['base_url'] . "backend/get_post_url?id={$user_url}{$id};" . $this->date . "'>@{$user}</a>";
} else {
return $matches[1] . "<a class='tooltip u:{$ref}' href='" . get_user_uri($ref) . "'>@{$ref}</a>";
}
break;
case '{':
$m = array($matches[2], substr($matches[2], 1, -1));
return $matches[1] . put_emojis_callback($m);
case 'h':
$suffix = '';
if (substr($matches[4], -1) == ')' && strrchr($matches[4], '(') === false) {
$matches[4] = substr($matches[4], 0, -1);
$suffix = ')';
}
return $matches[1] . '<a href="' . $matches[3] . $matches[4] . '" title="' . $matches[4] . '" rel="nofollow">' . substr($matches[4], 0, 70) . '</a>' . $suffix;
case '|':
return $matches[1] . '<a href="' . $globals['base_url_general'] . 'm/' . $matches[5] . '">|' . $matches[5] . '</a>';
}
return $matches[1] . $matches[2];
};
return preg_replace_callback($regexp, $callback, $string);
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:82,代码来源:LCPBase.php
示例15: clean_input_string
<?php
// 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-mobile.php';
$offset = (get_current_page() - 1) * $page_size;
$url_args = $globals['path'];
$login = clean_input_string($url_args[1]);
if (empty($login)) {
if ($current_user->user_id > 0) {
header('Location: ' . get_user_uri($current_user->user_login));
die;
} else {
header('Location: ' . $globals['base_url']);
die;
}
}
$user = new User();
$user->username = $db->escape($login);
if (!$user->read()) {
not_found();
}
do_header($login);
echo '<div id="singlewrap">' . "\n";
$url_login = urlencode($login);
do_profile();
开发者ID:manelio,项目名称:woolr,代码行数:31,代码来源:user.php
示例16: inline_friend_votes
function inline_friend_votes() {
global $db, $current_user;
$votes = $db->get_results("SELECT vote_user_id, vote_value, user_avatar, user_login, UNIX_TIMESTAMP(vote_date) as ts,inet_ntoa(vote_ip_int) as ip FRO
|
请发表评论