本文整理汇总了PHP中userlink函数的典型用法代码示例。如果您正苦于以下问题:PHP userlink函数的具体用法?PHP userlink怎么用?PHP userlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了userlink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: contacts
function contacts()
{
?>
контакты: <?php
userlink('Наталья Гришина', 1926);
?>
<a href="mailto:natalia.grishina@icl-services.com">natalia.grishina@icl-services.com</a>
<?php
}
示例2: renderValue
/**
* @param string $value the user to display
* @param \Doku_Renderer $R
* @param string $mode
* @return bool
*/
public function renderValue($value, \Doku_Renderer $R, $mode)
{
if ($mode == 'xhtml') {
$name = userlink($value);
$R->doc .= $name;
} else {
$name = userlink($value, true);
$R->cdata($name);
}
return true;
}
示例3: content
function content($data)
{
global $authorized;
?>
<h3>»сходный код: #<?php
echo _data('submitid');
?>
::<a href="./status.php?contest=<?php
echo _data('contestid');
echo -1 != _data('top') ? '&top=' . _data('top') : '';
echo -1 != _data('topuserid') ? '&userid=' . _data('topuserid') : '';
?>
">к списку посылок</a></h3>
<p>
<label style="color:#bbb;">јвтор:</label> <?php
echo userlink(_data('nickname'), _data('userid'));
?>
<br />
<label style="color:#bbb;">¬рем¤ сдачи:</label> <?php
echo _data('submitdate');
?>
<br />
<label style="color:#bbb;">язык:</label> <?php
echo _data('language');
?>
<br />
<label style="color:#bbb;">–езультат:</label> <?php
echo _data('submitmessage');
?>
<br />
</p>
<div class="wrapper">
<p class="code" style="width:auto;float:left;"><?php
echo preg_replace('/\\</', '<', _data('source'));
?>
</p>
</div>
<?php
}
示例4: content
function content($data) {
global $curuserid;
$requested_contest_name = _data('requested_contest_name');
$monitor_time = _data('monitor_time');
$contest = _data('contest');
$kind = _data('kind');
$indexes = _data('indexes');
$names = _data('names');
$problems = _data('problems');
$standing = _data('standing');
$first = _data('first');
$teams = _data('teams');
$pagesize = _data('pagesize');
$rowcount = _data('rowcount');
$page = _data('page');
if (0 == $rowcount):
?>
<p class="message">Таблица результатов контеста пока пуста</p>
<?php
else:
if ($requested_contest_name != ''):
?>
<h3>Результаты: <?=$requested_contest_name?><?=$monitor_time?> ::<a href="javascript:refreshMonitor('table.php', {'div':1});">студенты</a> ::<a href="javascript:refreshMonitor('table.php', {'div':2});">школьники</a> ::<a href="javascript:refreshMonitor('table.php', {'div':0});">все</a></h3>
<?php
else:
endif;
?>
<table class="standing">
<tr>
<th>#</th>
<th>Пользователь</th>
<th>Состав / тренер</th>
<th>OK</th>
<th>Время</th>
</tr>
<?php
//выводим строки
$index = 0;
while (list($key, $f) = each($standing)):
$index++;
?>
<tr <?=$f->ID==$curuserid ? 'class="active"' : ($index%2==0 ? 'class="s"' : '')?>>
<td class="c"><?=$index+$first?></td>
<td class="user-info">
<?php userlink($teams[$f->ID]->nickname, $f->ID); ?>
</td>
<td style="white-space:normal;">
<?php echo $teams[$f->ID]->members; ?>
</td>
<td class="c"><?=isset($f->Solved) && $f->Solved ? $f->Solved : 0?></td>
<?php
if (!isset($penalty) || !$penalty) { $penalty = 0; }
$penalty = $f->Penalty/60;
settype($penalty,'integer');
?>
<td class="c"><?=$penalty?></td>
</tr>
<?
endwhile; //конец пробега по строкам
?>
</table>
<?
endif; // конец чека на наличие записей
?>
<script type="text/javascript">
window.setTimeout('refreshMonitor("table.php")', 60000);
</script>
<?php } ?>
示例5: tpl_userinfo
/**
* Print info if the user is logged in
* and show full name in that case
*
* Could be enhanced with a profile link in future?
*
* @author Andreas Gohr <andi@splitbrain.org>
*
* @return bool
*/
function tpl_userinfo()
{
global $lang;
/** @var Input $INPUT */
global $INPUT;
if ($INPUT->server->str('REMOTE_USER')) {
print $lang['loggedinas'] . ' ' . userlink();
return true;
}
return false;
}
示例6: editorinfo
/**
* Return the users real name or e-mail address for use
* in page footer and recent changes pages
*
* @param string|null $username or null when currently logged-in user should be used
* @param bool $textonly true returns only plain text, true allows returning html
* @return string html or plain text(not escaped) of formatted user name
*
* @author Andy Webber <dokuwiki AT andywebber DOT com>
*/
function editorinfo($username, $textonly = false)
{
return userlink($username, $textonly);
}
示例7: content
function content($data)
{
$new_questions = _data('new_questions');
$old_questions = _data('old_questions');
$print_queue = _data('print_queue');
?>
<p>
::<a href="#new_questions">новые вопросы</a>
::<a href="#old_questions">старые вопросы</a>
::<a href="#print_queue">очередь печати</a>
</p>
<hr />
<h3 id="new_questions">Ќовые вопросы</h3>
<?php
//выводим сообщение, что вопросов нет
if (count($new_questions) == 0) {
?>
<p>Ќет вопросов дл¤ отображени¤.</p>
<?php
} else {
?>
<table style="width:100%;">
<tr>
<th>ѕользователь</th>
<th>«адача</th>
<th>¬опрос</th>
<th>ќперации</th>
</tr>
<?php
$nth = false;
//цикл по запис¤м в таблице вопросов
while (list($key, $value) = each($new_questions)) {
//определение цвета строки
if (!$nth) {
?>
<tr>
<?php
} else {
?>
<tr class="s">
<?php
}
//конец определени¤ цвета строки
$nth = !$nth;
?>
<td style="width:10%">
<?php
userlink($value->userNickName, $value->userId);
?>
</td>
<td style="width:20%">
<?php
echo $value->taskName;
?>
</td>
<td style="width:45%">
<?php
echo $value->question;
?>
</td>
<td style="width:25%">
<sup>
::<a href="./editqform.php?questionId=<?php
echo $value->questionId;
?>
">ответить</a>
::<a href="./deleteq.php?questionId=<?php
echo $value->questionId;
?>
">удалить</a>
<?php
//если вопрос не публичный - показать галочку "сделать публичным"
if ($value->isPublic == 0) {
?>
::<a href="./publicq.php?questionId=<?php
echo $value->questionId;
?>
&public=1">отметить как публичный</a>
<?php
//иначе показать галочку "сделать непубличным"
} else {
?>
::<a href="./publicq.php?questionId=<?php
echo $value->questionId;
?>
&public=0">отметить как непубличный</a>
<?php
}
//конец проверки общедоступности вопроса
?>
</sup>
</td>
</tr>
<?php
}
//конец цикла по запис¤м в таблице вопросов
?>
//.........这里部分代码省略.........
示例8: content
//.........这里部分代码省略.........
if ($instance->isPublic == 0) {
?>
::<a href="./publicq.php?questionId=<?php
echo $instance->questionId;
?>
&public=1">отметить как публичный</a>
<?php
//иначе показать галочку "сделать непубличным"
} else {
?>
::<a href="./publicq.php?questionId=<?php
echo $instance->questionId;
?>
&public=0">отметить как непубличный</a>
<?php
}
//конец проверки общедоступности вопроса
?>
</sup>
</td>
</tr>
<?php
}
//конец обработки панели управлени¤
?>
<tr>
<td rowspan="<?php
echo $row_span;
?>
" class="userdate">
<?php
userlink($instance->userNickName, $instance->userId);
?>
<sup><?php
echo $instance->dateTime;
?>
</sup>
<?php
if ($instance->isPublic == 1) {
?>
<sup>публичный</sup>
<?php
}
?>
</td>
<?php
if ($instance->question) {
?>
<td class="question">
<?php
echo $instance->question;
?>
</td>
</tr>
<?php
$new_line = true;
}
if ($instance->result > 0) {
if (!$new_line) {
$new_line = true;
} else {
?>
<tr>
示例9: wiki
//.........这里部分代码省略.........
}
if ($form) {
$out .= "<form method=post action=\"" . $_SERVER['REQUEST_URI'] . "\" class=\"shiny wikiedit\">";
$out .= '<h2>Editing "' . $content[1] . '"</h2>';
$out .= "<p>You should read the ((help)). If you are having problems with the formatting, post it and add a note explaining the problem to ((formattingProblems)) and I'll dive in and fix it. If you believe you've found a bug in the wiki software, post your problem to \"the bug tracker\":http://trac.aqxs.net/aqwiki/newticket and I'll dive in and fix that too.</p>\n";
//$out .= "<label for=\"creator\">Author</label>\n";
//$out .= $_EXTRAS['me']."<br>\n";
$out .= "<label for=\"content\">Content of page \"" . $content[1] . "\"</label>\n";
$out .= "<textarea name=\"content\" id=\"content\" rows=\"30\" cols=\"72\">[[TEXTAREA]]</textarea>\n<br>\n";
$out .= "<label for=\"comment\">Comment</label>\n";
$out .= "<input type=\"text\" name=\"comment\" id=\"comment\" size=\"72\" value=\"" . $_POST['comment'] . "\"><br>\n";
$out .= "<input class=\"submit\" type=\"hidden\" name=\"edittime\" value=\"" . time() . "\">\n";
$out .= "<input class=\"submit\" type=\"submit\" name=\"submit\" value=\"Post\"> ";
$out .= "<input class=\"submit\" type=\"submit\" name=\"submit\" value=\"Preview\"> ";
$out .= "<input class=\"submit\" type=\"submit\" name=\"submit\" value=\"Spell Check\"> ";
$out .= "<input class=\"submit\" type=\"reset\" name=\"revert\" value=\"Revert to pre-editing\">\n";
$out .= "</form>";
$content[2] .= $out;
break;
}
case "allrev":
if (!$dataSource->pageExists($article)) {
$content[2] = 'Error: Page doesn\'t exist. What are you playing at?';
break;
}
$content[2] = '<form method="GET" action="' . $url . '" style="width: auto;">';
$content[2] .= '<h2>Viewing all revisions for ((' . $article . "))</h2>\n\n";
$content[2] .= 'Select the <input type="radio" /> boxes to compare two revisions' . "\n\n";
$pages = $dataSource->getPage($article);
$pages = array_reverse($pages);
foreach ($pages as $row) {
$line = '<input type="radio" name="from" value="' . $row['revision'] . '">';
$line .= '<input type="radio" name="to" value="' . $row['revision'] . '">';
$line .= date("Y-m-d H:i", $row['created']) . " - " . userlink($row['creator']);
if ($row['comment']) {
$line .= " : " . $row['comment'];
}
$content[2] .= "# " . $line . " [ <a href=\"" . $url . "?action=viewrev&id=" . $row['revision'] . "\" title=\"View this revision\">View</a> |" . " <a href=\"" . $url . "?action=diff&from=" . $row['revision'] . "\"\" title=\"View differences between this and the current revision\">Diff</a> ]\n";
}
$content[2] .= '<input type="submit" value="Compare Revisions">
<input type="hidden" value="diff" name="action">
</form>';
break;
case "revert":
if (!in_array($_EXTRAS['me'], $_EXTRAS['admins'])) {
panic('AqWiki Reversion', 'You\'re not an admin, you can\'t do this shit');
}
if (!$_GET['id']) {
die("Parameters incorrect");
}
$id = $_GET['id'];
$pages = $dataSource->getPage($article);
$oldVersion = $pages[$id];
//die($oldVersion['content']);
$dataSource->post($article, $oldVersion['content'], 'reverted back to version ' . $id);
$form = false;
$content[2] = 'Reverted ((' . $article . ')) back to version ' . $id;
break;
default:
$_EXTRAS['versions'] = "";
if (!$dataSource->pageExists($article)) {
if ($_EXTRAS['restrictNewPages'] || $_EXTRAS['reqEdit']) {
if ($_EXTRAS['restrictNewPages'] == "register") {
$message = "any registered users";
} else {
$message = "only certain users";
示例10: add
public function add()
{
$callback = $this->input->get('callback', true);
$token = $this->input->get_post('token', TRUE);
$add['uida'] = (int) $this->input->get_post('uid', TRUE);
$add['neir'] = $this->input->get_post('neir', TRUE);
$add['neir'] = facehtml(filter(get_bm($add['neir'])));
//转化回复
preg_match_all('/' . L('gbook_02') . '@(.*)@:/i', $add['neir'], $bs);
if (!empty($bs[0][0]) && !empty($bs[1][0])) {
$uid = getzd('user', 'id', $bs[1][0], 'name');
$nichen = getzd('user', 'nichen', $bs[1][0], 'name');
$ulink = userlink('index', $uid, $bs[1][0]);
if (empty($nichen)) {
$nichen = $bs[1][0];
}
$b = L('gbook_02') . '<a target="_blank" href="' . $ulink . '">@' . $nichen . '@</a>:';
$add['neir'] = str_replace($bs[0][0], $b, $add['neir']);
}
unset($bs);
if ($add['uida'] == 0) {
$error = '10000';
} elseif (!isset($_SESSION['gbooktoken']) || $token != $_SESSION['gbooktoken']) {
$error = '10001';
} elseif (isset($_SESSION['gbookaddtime']) && time() < $_SESSION['gbookaddtime'] + 30) {
$error = '10006';
} elseif (empty($add['neir'])) {
$error = '10002';
} elseif (empty($_SESSION['cscms__id'])) {
$error = '10003';
} else {
$add['uidb'] = $_SESSION['cscms__id'];
$add['fid'] = intval($this->input->get_post('fid'));
$add['ip'] = getip();
$add['addtime'] = time();
$ids = $this->CsdjDB->get_insert('gbook', $add);
if (intval($ids) == 0) {
$error = '10004';
//失败
} else {
//摧毁token
unset($_SESSION['token']);
$error = '10005';
$_SESSION['gbookaddtime'] = time();
//发送通知
$addm['uida'] = $add['uida'];
$addm['uidb'] = $_SESSION['cscms__id'];
$addm['name'] = L('gbook_03');
$addm['neir'] = vsprintf(L('ajax_04'), array($_SESSION['cscms__name']));
$addm['addtime'] = time();
$this->CsdjDB->get_insert('msg', $addm);
}
}
echo $callback . "({error:" . $error . "})";
}
示例11: intval
break;
case 'profile':
$userid = $_GET['id'];
if (!is_numeric($userid)) {
print "Invalid user ID.<br><a href='index.php'>Return to the main page</a>";
break;
}
$userid = intval($userid);
// just to be safe
$memberquery = dbquery("SELECT * FROM users WHERE userid = {$userid}");
if (mysql_num_rows($memberquery) == 0) {
print "No user with this ID exists.<br><a href='index.php'>Return to the main page</a>";
} else {
$member = dbrow($memberquery);
//$member[username] = htmlspecialchars($member[username]);
$namelink = userlink($member[userid], htmlspecialchars($member[username]), $member[powerlevel]);
print "<table class='styled' style='width: 100%; margin: 0px auto; border: 0px' cellpadding='0' cellspacing='0'>";
print "<tr><td colspan='2' style='font-size: 15px; font-weight: bold'>Profile for {$namelink}</td></tr>";
print "<tr>";
// left bit
print "<td style='width: 50%' valign='top'>";
print "<table class='styled' style='width: 100%'>";
print "<tr class='header'><td>Profile Info</td></tr>";
print "<tr><td style='text-align: left'>";
if ($member[hasavatar] == 1) {
print "<img src='avatars/{$member['userid']}.{$member['avatarext']}' alt='Avatar' style='display: block; margin: 0 auto'>";
print "<div class='bigspacing'></div>";
}
if ($member[usertitle]) {
$member[usertitle] = htmlspecialchars($member[usertitle]);
print "<div style='text-align: center'>{$member['usertitle']}</div>";
示例12: substr
} else {
print "<tr>";
}
print "<td style='text-align: center'>{$forumicon}</td>";
print "<td style='font-size: 12px'><a href='index.php?showforum={$forum['id']}' style='font-size: 14px; font-weight: bold'>{$forum['name']}</a><br>{$forum['desc']}</td>";
print "<td style='font-size: 11px'>{$forum['threads']} threads<br>{$forum['posts']} posts</td>";
if ($forum[lastpostdate] == 0) {
print "<td>Never</td>";
} else {
if (strlen($forum[lastpostedin]) > 35) {
$forum[lastpostedin] = substr($forum[lastpostedin], 0, 32) . '...';
}
$forum[lastpostedin] = htmlspecialchars($forum[lastpostedin]);
$lastpostdate = parsedate($forum[lastpostdate]);
print "<td>";
print "<a href='index.php?showthread={$forum['lastpostedinid']}&page=last'>{$forum['lastpostedin']}</a><br>";
print "{$lastpostdate}<br>";
$lastposter = userlink($forum[lastposterid], htmlspecialchars($forum[lastposter]), $forum[powerlevel]);
print "by {$lastposter}";
print "</td>";
}
print "</tr>";
}
print "</table>";
print "<div class='bigspacing'></div>";
}
if ($s[logged_in]) {
print "<form action='index.php?m=board' method='post'>";
print "<input type='submit' name='markread' class='button' value='Mark all threads/forums as read'>";
print "</form>";
}
示例13: userlink
" class="dw-navbar-brand">
<i class="uk-icon-wrench"></i> <?php
echo $conf['title'];
?>
</a>
</div>
<?php
if (!empty($_SERVER['REMOTE_USER'])) {
?>
<div class="uk-navbar-flip uk-hidden-small">
<ul class="uk-navbar-nav">
<li data-uk-dropdown>
<a href=""><?php
echo userlink();
?>
<i class="uk-icon-caret-down"></i></a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
<?php
tpl_action('profile', 1, 'li');
?>
<?php
tpl_action('login', 1, 'li');
?>
</ul>
</div>
</li>
</ul>
</div>
示例14: content
//.........这里部分代码省略.........
?>
&top=<?php
echo _data('first_submit') . $params;
?>
" title="Исходный код"><?php
echo $f->SubmitID;
?>
</a></td>
<?php
} else {
?>
<td><?php
echo $f->SubmitID;
?>
</td>
<?php
}
?>
<td><?php
echo $f->SubmitTime;
?>
</td>
<td><a href="./problem.php?contest=<?php
echo _data('contest');
?>
&problem=<?php
echo $f->ProblemID;
?>
"><?php
echo $f->ProblemID;
?>
</a></td>
<td><?php
userlink($f->Nickname, $f->ID);
?>
</td>
<td><?php
echo $f->Ext;
?>
</td>
<?php
// определение цвета ячейки статуса
$color = 0 != $f->StatusID ? ' ' : (0 != $f->ResultID ? ' class="wa"' : ' class="ok"');
?>
<td<?php
echo $color;
?>
>
<?php
echo $f->Message;
?>
</td>
<?php
if (_settings_show_submit_info || 1 == $is_admin) {
?>
<td><?php
echo '0' === $f->TotalTime ? '-' : $f->TotalTime . ' ms';
?>
</td>
<td><?php
echo '0' === $f->TotalMemory ? '-' : $f->TotalMemory . ' kb';
?>
</td>
<?php
}
?>
示例15: intval
$lastread[$row[id]] = intval($row[lastread]);
}
$canview = implode(',', $canview_arr);
$eachone = array(array('Newest Threads', 'ORDER BY threads.id DESC LIMIT 5', '', 'author'), array('Latest Posts', 'ORDER BY threads.lastpostdate DESC LIMIT 5', '&page=last', 'lastposter'));
foreach ($eachone as $doit) {
?>
<div class='portalheader'><?php
echo $doit[0];
?>
</div>
<div class='portalbox'>
<?php
$getthreads = dbquery("SELECT threads.id, threads.name, threads.{$doit[3]}id, threads.forum, threads.lastpostdate, authorusers.username as authorname, authorusers.powerlevel as authorpower, threadread.thread FROM threads LEFT JOIN users as authorusers ON threads.{$doit[3]}id=authorusers.userid LEFT JOIN threadread ON threads.id=threadread.thread AND threadread.user={$s[user][userid]} WHERE threads.forum IN ({$canview}) {$doit['1']}");
while ($row = dbrow($getthreads)) {
$row[name] = htmlspecialchars($row[name]);
$author = userlink($row[$doit[3] . 'id'], htmlspecialchars($row[authorname]), $row[authorpower]);
$unread = '';
if ($s[logged_in] && $row[lastpostdate] > $lastread[$row[forum]] && $row[id] != $row[thread]) {
$icon = "<img src='{$theme}images/icon_unreadtiny.png' alt='This thread has unread posts.' title='This thread has unread posts.'>";
} else {
$icon = "<img src='{$theme}images/icon_tiny.png' alt='This thread has no unread posts.' title='This thread has no unread posts.'>";
}
print "{$icon} <a href='index.php?showthread={$row['id']}{$doit['2']}'>{$row['name']}</a> by {$author}<br>";
}
?>
</div>
<?php
}
?>
<div class='portalheader'>Board Statistics</div>
<div class='portalbox'>