本文整理汇总了PHP中user_link函数的典型用法代码示例。如果您正苦于以下问题:PHP user_link函数的具体用法?PHP user_link怎么用?PHP user_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: user_edit_vouchers_controller
function user_edit_vouchers_controller()
{
global $privileges, $user;
if (isset($_REQUEST['user_id'])) {
$user_source = User($_REQUEST['user_id']);
} else {
$user_source = $user;
}
if (!in_array('admin_user', $privileges)) {
redirect(page_link_to(''));
}
if (isset($_REQUEST['submit'])) {
$ok = true;
if (isset($_REQUEST['vouchers']) && test_request_int('vouchers') && trim($_REQUEST['vouchers']) >= 0) {
$vouchers = trim($_REQUEST['vouchers']);
} else {
$ok = false;
error(_("Please enter a valid number of vouchers."));
}
if ($ok) {
$user_source['got_voucher'] = $vouchers;
$result = User_update($user_source);
if ($result === false) {
engelsystem_error('Unable to update user.');
}
success(_("Saved the number of vouchers."));
engelsystem_log(User_Nick_render($user_source) . ': ' . sprintf("Got %s vouchers", $user_source['got_voucher']));
redirect(user_link($user_source));
}
}
return array(sprintf(_("%s's vouchers"), $user_source['Nick']), User_edit_vouchers_view($user_source));
}
示例2: UserDriverLicense_edit_view
/**
* Edit a user's driving license information.
* @param User $user_source
* @param bool $wants_to_drive
* @param bool $has_car
* @param bool $has_license_car
* @param bool $has_license_3_5t_transporter
* @param bool $has_license_7_5t_truck
* @param bool $has_license_12_5t_truck
* @param bool $has_license_forklift
*/
function UserDriverLicense_edit_view($user_source, $wants_to_drive, $has_car, $has_license_car, $has_license_3_5t_transporter, $has_license_7_5t_truck, $has_license_12_5t_truck, $has_license_forklift)
{
return page_with_title(sprintf(_("Edit %s driving license information"), User_Nick_render($user_source)), [buttons([button(user_link($user_source), _("Back to profile"), 'back')]), msg(), form([form_info(_("Privacy"), _("Your driving license information is only visible for coordinators and admins.")), form_checkbox('wants_to_drive', _("I am willing to operate cars for the PL"), $wants_to_drive), div('panel panel-default', [div('panel-body', [form_checkbox('has_car', _("I have my own car with me and am willing to use it for the PL (You'll get reimbursed for fuel)"), $has_car), heading(_("Driver license"), 3), form_checkbox('has_license_car', _("Car"), $has_license_car), form_checkbox('has_license_3_5t_transporter', _("Transporter 3,5t"), $has_license_3_5t_transporter), form_checkbox('has_license_7_5t_truck', _("Truck 7,5t"), $has_license_7_5t_truck), form_checkbox('has_license_12_5t_truck', _("Truck 12,5t"), $has_license_12_5t_truck), form_checkbox('has_license_forklift', _("Forklift"), $has_license_forklift)])], 'driving_license'), form_submit('submit', _("Save"))]), '<script type="text/javascript">
$(function() {
if($("#wants_to_drive").is(":checked"))
$("#driving_license").show();
else
$("#driving_license").hide();
$("#wants_to_drive").click(
function(e) {
if($("#wants_to_drive").is(":checked"))
$("#driving_license").show();
else
$("#driving_license").hide();
}
);
});
</script>']);
}
示例3: user_got_voucher_controller
function user_got_voucher_controller()
{
global $privileges, $user;
if (isset($_REQUEST['user_id'])) {
$user_source = User($_REQUEST['user_id']);
} else {
$user_source = $user;
}
$admin_user_privilege = in_array('admin_user', $privileges);
if (!in_array('admin_user', $privileges)) {
redirect(page_link_to(''));
}
if (!isset($_REQUEST['got_voucher'])) {
redirect(page_link_to(''));
}
$user_source['got_voucher'] = $_REQUEST['got_voucher'] == 'true';
$result = User_update($user_source);
if ($result === false) {
engelsystem_error('Unable to update user.');
}
success($user_source['got_voucher'] ? _('User got vouchers.') : _('User didnt got vouchers.'));
engelsystem_log(User_Nick_render($user_source) . ($user_source['got_voucher'] ? ' got vouchers' : ' didnt got vouchers'));
redirect(user_link($user_source));
}
示例4: slot
<?php
slot('header_text', $network['name']);
slot('header_link', LsListTable::getNetworkInternalUrl($network));
?>
<?php
include_partial('global/section', array('title' => 'Analysts in this Network', 'pager' => $user_pager));
?>
<div class="padded">
<?php
foreach ($user_pager->execute() as $user) {
?>
<div style="float: left; padding: .6em; height: 5em; text-align: center;">
<?php
echo user_pic($user);
?>
<br />
<span class="text_small"><?php
echo user_link($user);
?>
</span>
</div>
<?php
}
?>
</div>
示例5: user_link
<? $author = CI::model('users')->getUserById( $data); ?>
<? $thumb = CI::model('users')->getUserThumbnail( $author['id'], 70); ?>
<li>
<a href="<? print user_link($author['id']); ?>"> <span style="background-image: url('<? print $thumb; ?>');"></span> <strong><? print user_name($author['id']) ; ?></strong> </a> </li>
示例6: response_header
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
$Id$
*/
response_header('Announcing the PEAR Group');
?>
<h1>Announcing the PEAR Group</h1>
[August 20, 2003]
<div id="news-entry">
<p>
On 12th August 2003 <?php
echo user_link('ssb', true);
?>
, the founder of PEAR, announced
the forming of the PEAR Group, which will be the governing body of
PEAR. The full announcement can be
<?php
echo make_link('http://marc.theaimsgroup.com/?l=pear-dev&m=106073080219083&w=2', 'found here');
?>
.
</p>
<p>
More information about the Group, including a first administrative
document, can be found at a <?php
echo make_link("/group/", "dedicated place");
?>
示例7: sendActionEmail
function sendActionEmail($event, $userType, $user_handle = null, $comment = '')
{
global $dbh, $karma, $auth_user;
if (empty($karma)) {
$karma = new Damblan_Karma($dbh);
}
require 'pepr/pepr-emails.php';
$email = $proposalEmailTexts[$event];
if (empty($email)) {
return PEAR::raiseError("Email template for {$event} not found");
}
switch ($userType) {
case 'admin':
$prefix = "[ADMIN]";
break;
case 'mixed':
if ($karma->has($user_handle, "pear.pepr.admin") && $this->user_handle != $user_handle) {
$prefix = "[ADMIN]";
} else {
$prefix = "";
}
break;
default:
$prefix = "";
}
$prefix = PROPOSAL_EMAIL_PREFIX . $prefix . " ";
include_once 'pear-database-user.php';
$actorinfo = user::info($user_handle);
$ownerinfo = user::info($this->user_handle);
$this->getVotes($dbh);
$vote = @$this->votes[$user_handle];
if (isset($vote)) {
$vote->value = $vote->value > 0 ? "+" . $vote->value : $vote->value;
if ($vote->is_conditional) {
$vote_conditional = "\n\nThis vote is conditional. The condition is:\n\n" . $vote->comment;
} elseif ($vote->comment) {
$comment = "\n\nComment:\n\n" . $vote->comment;
}
$vote_url = "http://" . PEAR_CHANNELNAME . "/pepr/pepr-vote-show.php?id=" . $this->id . "&handle=" . $user_handle;
}
if ($event == 'change_status_finished') {
$proposalVotesSum = ppVote::getSum($dbh, $this->id);
$vote_result = 'Sum of Votes: ' . $proposalVotesSum['all'];
$vote_result .= ' (' . $proposalVotesSum['conditional'] . ' conditional)';
if ($proposalVotesSum['all'] >= 5) {
$vote_result .= "\nResult: This proposal was accepted";
} else {
$vote_result .= "\nResult: This proposal was rejected";
}
}
$proposal_url = "http://" . PEAR_CHANNELNAME . "/pepr/pepr-proposal-show.php?id=" . $this->id;
$end_voting_time = @$this->longened_date > 0 ? $this->longened_date + PROPOSAL_STATUS_VOTE_TIMELINE : @$this->vote_date + PROPOSAL_STATUS_VOTE_TIMELINE;
if ($event == 'proposal_comment' && $user_handle == $this->user_handle) {
$email['to'] = $email['to']['owner'];
} else {
if (!isset($user_handle)) {
$email['to'] = $email['to']['pearweb'];
} else {
if ($karma->has($user_handle, "pear.pepr.admin")) {
$email['to'] = $email['to']['admin'];
} else {
$email['to'] = $email['to']['user'];
}
}
}
$email['subject'] = $prefix . $email['subject'];
$replace = array("/\\{pkg_category\\}/", "/\\{pkg_name\\}/", "/\\{owner_name\\}/", "/\\{owner_email\\}/", "/\\{owner_link\\}/", "/\\{actor_name\\}/", "/\\{actor_email\\}/", "/\\{actor_link\\}/", "/\\{proposal_url\\}/", "/\\{end_voting_time\\}/", "/\\{vote_value\\}/", "/\\{vote_url\\}/", "/\\{email_pear_dev\\}/", "/\\{email_pear_group\\}/", "/\\{comment\\}/", "/\\{vote_result\\}/", "/\\{vote_conditional\\}/");
$replacements = array($this->pkg_category, $this->pkg_name, isset($ownerinfo['name']) ? $ownerinfo['name'] : "", isset($ownerinfo['email']) ? "<{$ownerinfo['email']}>" : '', isset($ownerinfo['handle']) ? user_link($ownerinfo['handle'], true) : "", isset($actorinfo['name']) ? $actorinfo['name'] : "", isset($actorinfo['email']) ? $actorinfo['email'] : "", isset($actorinfo['handle']) ? "http://" . PEAR_CHANNELNAME . "/user/" . $actorinfo['handle'] : "", $proposal_url, format_date($end_voting_time), isset($vote) ? $vote->value : 0, isset($vote) ? $vote_url : "", PROPOSAL_MAIL_PEAR_DEV, PROPOSAL_MAIL_PEAR_GROUP, isset($comment) ? wordwrap($comment) : '', isset($vote_result) ? $vote_result : '', isset($vote_conditional) ? $vote_conditional : "");
$email = preg_replace($replace, $replacements, $email);
$email['text'] .= PROPOSAL_EMAIL_POSTFIX;
if (is_object($auth_user)) {
$from = '"' . $auth_user->name . '" <' . $auth_user->email . '>';
} else {
$from = PROPOSAL_MAIL_FROM;
}
$to = explode(", ", $email['to']);
$email['to'] = array_shift($to);
$headers = "CC: " . implode(", ", $to) . "\n";
$headers .= "From: " . $from . "\n";
$headers .= "X-Mailer: " . "PEPr, PEAR Proposal System" . "\n";
$headers .= "X-PEAR-Category: " . $this->pkg_category . "\n";
$headers .= "X-PEAR-Package: " . $this->pkg_name . "\n";
$headers .= "X-PEPr-Status: " . $this->getStatus() . "\n";
if ($event == "change_status_proposal") {
$headers .= "Message-ID: <proposal-" . $this->id . "@" . PEAR_CHANNELNAME . ">\n";
} else {
$headers .= "In-Reply-To: <proposal-" . $this->id . "@" . PEAR_CHANNELNAME . ">\n";
}
if (!DEVBOX) {
$res = mail($email['to'], $email['subject'], $email['text'], $headers, '-f ' . PEAR_BOUNCE_EMAIL);
} else {
$res = true;
}
if (!$res) {
return PEAR::raiseError('Could not send notification email.');
}
return true;
}
示例8: link_to
<tr>
<td>
<strong><?php
echo link_to($object->getOneLiner(), 'entity/addressModifications?id=' . $object->id);
?>
</strong>
</td>
<td>
<?php
echo $object->created_at;
?>
by <?php
echo user_link($object->getCreatedByUser());
?>
</td>
<td>
<?php
echo time_ago_in_words(strtotime($object->updated_at));
?>
</td>
<td>
<?php
echo $object->is_deleted ? 'deteled' : 'active';
?>
</td>
</td>
示例9: user_link
echo $__info['pic_hd_url'];
?>
">高清图</a>
<?php
}
if ($__info['pic_url'] != $__info['pic_hd_url']) {
?>
<a class="label label-primary hidden-print" href="<?php
echo $__info['pic_url'];
?>
">原图</a>
<?php
}
?>
<a class="visible-print glyphicon glyphicon-user" href="<?php
echo user_link($__info['user_name']);
?>
"><?php
echo $__info['user_aliases'];
?>
</a>
</p>
</div>
<ul class="pager left">
<?php
if ($__info['previous_id'] < $__info['pic_id'] && $__info['previous_id'] != 0) {
?>
<li class="previous">
<a title="第 <?php
echo $__info['previous_id'];
?>
示例10: admin_arrive
function admin_arrive()
{
$msg = "";
$search = "";
if (isset($_REQUEST['search'])) {
$search = strip_request_item('search');
}
if (isset($_REQUEST['reset']) && preg_match("/^[0-9]*\$/", $_REQUEST['reset'])) {
$id = $_REQUEST['reset'];
$user_source = User($id);
if ($user_source != null) {
sql_query("UPDATE `User` SET `Gekommen`=0, `arrival_date` = NULL WHERE `UID`='" . sql_escape($id) . "' LIMIT 1");
engelsystem_log("User set to not arrived: " . User_Nick_render($user_source));
success(_("Reset done. Angel has not arrived."));
redirect(user_link($user_source));
} else {
$msg = error(_("Angel not found."), true);
}
} elseif (isset($_REQUEST['arrived']) && preg_match("/^[0-9]*\$/", $_REQUEST['arrived'])) {
$id = $_REQUEST['arrived'];
$user_source = User($id);
if ($user_source != null) {
sql_query("UPDATE `User` SET `Gekommen`=1, `arrival_date`='" . time() . "' WHERE `UID`='" . sql_escape($id) . "' LIMIT 1");
engelsystem_log("User set has arrived: " . User_Nick_render($user_source));
success(_("Angel has been marked as arrived."));
redirect(user_link($user_source));
} else {
$msg = error(_("Angel not found."), true);
}
}
$users = sql_select("SELECT * FROM `User` ORDER BY `Nick`");
$arrival_count_at_day = [];
$planned_arrival_count_at_day = [];
$planned_departure_count_at_day = [];
$table = "";
$users_matched = [];
if ($search == "") {
$tokens = [];
} else {
$tokens = explode(" ", $search);
}
foreach ($users as $usr) {
if (count($tokens) > 0) {
$match = false;
$index = join(" ", $usr);
foreach ($tokens as $t) {
if (stristr($index, trim($t))) {
$match = true;
break;
}
}
if (!$match) {
continue;
}
}
$usr['nick'] = User_Nick_render($usr);
if ($usr['planned_departure_date'] != null) {
$usr['rendered_planned_departure_date'] = date('Y-m-d', $usr['planned_departure_date']);
} else {
$usr['rendered_planned_departure_date'] = '-';
}
$usr['rendered_planned_arrival_date'] = date('Y-m-d', $usr['planned_arrival_date']);
$usr['rendered_arrival_date'] = $usr['arrival_date'] > 0 ? date('Y-m-d', $usr['arrival_date']) : "-";
$usr['arrived'] = $usr['Gekommen'] == 1 ? _("yes") : "";
$usr['actions'] = $usr['Gekommen'] == 1 ? '<a href="' . page_link_to('admin_arrive') . '&reset=' . $usr['UID'] . '&search=' . $search . '">' . _("reset") . '</a>' : '<a href="' . page_link_to('admin_arrive') . '&arrived=' . $usr['UID'] . '&search=' . $search . '">' . _("arrived") . '</a>';
if ($usr['arrival_date'] > 0) {
$day = date('Y-m-d', $usr['arrival_date']);
if (!isset($arrival_count_at_day[$day])) {
$arrival_count_at_day[$day] = 0;
}
$arrival_count_at_day[$day]++;
}
if ($usr['planned_arrival_date'] != null) {
$day = date('Y-m-d', $usr['planned_arrival_date']);
if (!isset($planned_arrival_count_at_day[$day])) {
$planned_arrival_count_at_day[$day] = 0;
}
$planned_arrival_count_at_day[$day]++;
}
if ($usr['planned_departure_date'] != null && $usr['Gekommen'] == 1) {
$day = date('Y-m-d', $usr['planned_departure_date']);
if (!isset($planned_departure_count_at_day[$day])) {
$planned_departure_count_at_day[$day] = 0;
}
$planned_departure_count_at_day[$day]++;
}
$users_matched[] = $usr;
}
ksort($arrival_count_at_day);
ksort($planned_arrival_count_at_day);
ksort($planned_departure_count_at_day);
$arrival_at_day = [];
$arrival_sum = 0;
foreach ($arrival_count_at_day as $day => $count) {
$arrival_sum += $count;
$arrival_at_day[$day] = ['day' => $day, 'count' => $count, 'sum' => $arrival_sum];
}
$planned_arrival_sum_at_day = [];
$planned_arrival_sum = 0;
foreach ($planned_arrival_count_at_day as $day => $count) {
//.........这里部分代码省略.........
示例11: user_link
?>
</li>
<li><?php
echo user_link('ssb');
?>
</li>
<li><?php
echo user_link('richard');
?>
</li>
<li><?php
echo user_link('cmv');
?>
</li>
<li><?php
echo user_link('toby');
?>
</li>
</ul>
<small>(In alphabetic order)</small>
<p>The website team can be reached at
<?php
echo make_mailto_link(PEAR_WEBMASTER_EMAIL);
?>
.</p>
<p>More information about the website can be found on a
<a href="/about/">dedicated page</a>.</p>
示例12: user_link
* @var ULib\Comment $__comment
*/
?>
<div class="comment-msg">
<div class="comment-head clearfix">
<img class="img-rounded pull-left comment-avatar" alt="<?php
echo $__comment->getUser()->getName();
?>
" src="<?php
echo $__comment->getUser()->getAvatar();
?>
">
<div class="pull-left">
<p class="comment-info"><strong class="comment-aliases"><a href="<?php
echo user_link($__comment->getUser()->getName());
?>
"><?php
echo $__comment->getUser()->getAliases();
?>
</a></strong>
<span class="comment-name"><?php
echo $__comment->getUser()->getName();
?>
</span>
</p>
<p>
<small class="comment-post-at">评论于:</small>
<span class="comment-time"><?php
echo convert_time($__comment->getCommentTime());
示例13: include_partial
<?php
include_partial('global/section', array('title' => "Who's Watching", 'action' => array('credential' => 'editor', 'text' => $sf_user->getGuardUser()->Profile->watching_opt_out ? 'opt in' : 'opt out', 'url' => 'home/editSettings')));
?>
<div class="padded" style="padding-bottom: .6em">
<br />
</div>
<?php
foreach ($watchers as $watcher) {
?>
<div style = "float:left; padding: .6em; height: 5em">
<span style="vertical-align:bottom">
<?php
echo user_pic($watcher);
?>
</span>
<br />
<span class="text_small" style="vertical-align:top">
<?php
echo user_link($watcher, null, false);
?>
</span>
</div>
<?php
}
?>
<?php
}
示例14: user_pic
for ($i = 3; $i < 10; $i++) {
?>
<?php
$top_analyst = $top_analysts[$i];
?>
<table style="border-bottom: 1px dotted #EEEEEE;">
<tr>
<td style="padding: 0.5em; width: 40px;">
<?php
echo user_pic($top_analyst, 'profile', array('width' => 40));
?>
</td>
<td style="padding: 0.5em;">
<span class="text_big"><?php
echo user_link($top_analyst);
?>
</span>
<br />
<span style="color: #666;"><?php
echo $top_analyst->group_score;
?>
points</span>
</td>
</tr>
</table>
<?php
}
?>
<?php
示例15: include_partial
<?php
include_partial('global/section', array('title' => 'Recent Chatters', 'pointer' => 'Analysts who have viewed this page in the past five minutes'));
?>
<table>
<?php
foreach ($users as $u) {
?>
<tr>
<td style="width: 50px; padding-top: 5px;">
<?php
echo user_pic($u, 'profile', array('width' => 40));
?>
</td>
<td style="vertical-align: middle;">
<span class="text_big"><?php
echo user_link($u);
?>
</span>
</td>
</tr>
<?php
}
?>
</table>
<?php
end_slot();
?>
<script type="text/javascript">