• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP userlink函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中userlink函数的典型用法代码示例。如果您正苦于以下问题:PHP userlink函数的具体用法?PHP userlink怎么用?PHP userlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了userlink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: contacts

function contacts()
{
    ?>
контакты: <?php 
    userlink('Наталья Гришина', 1926);
    ?>
<a href="mailto:[email protected]">[email protected]</a>
<?php 
}
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:9,代码来源:contacts.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;
 }
开发者ID:cosmocode,项目名称:dokuwiki-plugin-struct,代码行数:17,代码来源:User.php


示例3: content

function content($data)
{
    global $authorized;
    ?>

<h3>»сходный код: #<?php 
    echo _data('submitid');
    ?>
&nbsp;::<a href="./status.php?contest=<?php 
    echo _data('contestid');
    echo -1 != _data('top') ? '&amp;top=' . _data('top') : '';
    echo -1 != _data('topuserid') ? '&amp;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('/\\</', '&lt;', _data('source'));
    ?>
</p>

</div>

<?php 
}
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:45,代码来源:source.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?>&nbsp;::<a href="javascript:refreshMonitor('table.php', {'div':1});">студенты</a>&nbsp;::<a href="javascript:refreshMonitor('table.php', {'div':2});">школьники</a>&nbsp;::<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 } ?>
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:68,代码来源:table.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 <[email protected]>
 *
 * @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;
}
开发者ID:RnBConsulting,项目名称:dokuwiki,代码行数:21,代码来源:template.php


示例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);
}
开发者ID:splitbrain,项目名称:dokuwiki,代码行数:14,代码来源:common.php


示例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>
          &nbsp;::<a href="#old_questions">старые вопросы</a>
          &nbsp;::<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>
                  &nbsp;
                  ::<a href="./deleteq.php?questionId=<?php 
            echo $value->questionId;
            ?>
">удалить</a>
                  &nbsp;
<?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 
        }
        //конец цикла по запис¤м в таблице вопросов
        ?>
//.........这里部分代码省略.........
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:101,代码来源:admininfo.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>
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:67,代码来源:questions.php


示例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&amp;id=" . $row['revision'] . "\" title=\"View this revision\">View</a> |" . " <a href=\"" . $url . "?action=diff&amp;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";
开发者ID:aquarion,项目名称:AqWiki,代码行数:67,代码来源:wiki.inc.php


示例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 . "})";
 }
开发者ID:djqhuan,项目名称:CSCMS-v4.0-UTF8,代码行数:55,代码来源:gbook.php


示例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>";
开发者ID:Treeki,项目名称:historical-tboard,代码行数:31,代码来源:users.php


示例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>";
}
开发者ID:Treeki,项目名称:historical-tboard,代码行数:31,代码来源:idx.php


示例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>
开发者ID:projectesIF,项目名称:Ateneu,代码行数:31,代码来源:main.php


示例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');
            ?>
&amp;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 
            }
            ?>
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:67,代码来源:status.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'>
开发者ID:Treeki,项目名称:historical-tboard,代码行数:31,代码来源:main.php


示例16: html_footer

 /**
  * Returns the meta line below the included page
  * @param $renderer Doku_Renderer_xhtml The (xhtml) renderer
  * @return string The HTML code of the footer
  */
 function html_footer($page, $sect, $sect_title, $flags, $footer_lvl, &$renderer)
 {
     global $conf, $ID;
     if (!$flags['footer']) {
         return '';
     }
     $meta = p_get_metadata($page);
     $exists = page_exists($page);
     $xhtml = array();
     // permalink
     if ($flags['permalink']) {
         $class = $exists ? 'wikilink1' : 'wikilink2';
         $url = $sect ? wl($page) . '#' . $sect : wl($page);
         $name = $sect ? $sect_title : $page;
         $title = $sect ? $page . '#' . $sect : $page;
         if (!$title) {
             $title = str_replace('_', ' ', noNS($page));
         }
         $link = array('url' => $url, 'title' => $title, 'name' => $name, 'target' => $conf['target']['wiki'], 'class' => $class . ' permalink', 'more' => 'rel="bookmark"');
         $xhtml[] = $renderer->_formatLink($link);
     }
     // date
     if ($flags['date'] && $exists) {
         $date = $meta['date']['created'];
         if ($date) {
             $xhtml[] = '<abbr class="published" title="' . strftime('%Y-%m-%dT%H:%M:%SZ', $date) . '">' . strftime($conf['dformat'], $date) . '</abbr>';
         }
     }
     // modified date
     if ($flags['mdate'] && $exists) {
         $mdate = $meta['date']['modified'];
         if ($mdate) {
             $xhtml[] = '<abbr class="published" title="' . strftime('%Y-%m-%dT%H:%M:%SZ', $mdate) . '">' . strftime($conf['dformat'], $mdate) . '</abbr>';
         }
     }
     // author
     if ($flags['user'] && $exists) {
         $author = $meta['user'];
         if ($author) {
             if (function_exists('userlink')) {
                 $xhtml[] = '<span class="vcard author">' . userlink($author) . '</span>';
             } else {
                 // DokuWiki versions < 2014-05-05 doesn't have userlink support, fall back to not providing a link
                 $xhtml[] = '<span class="vcard author">' . editorinfo($author) . '</span>';
             }
         }
     }
     // comments - let Discussion Plugin do the work for us
     if (empty($sect) && $flags['comments'] && !plugin_isdisabled('discussion') && ($discussion =& plugin_load('helper', 'discussion'))) {
         $disc = $discussion->td($page);
         if ($disc) {
             $xhtml[] = '<span class="comment">' . $disc . '</span>';
         }
     }
     // linkbacks - let Linkback Plugin do the work for us
     if (empty($sect) && $flags['linkbacks'] && !plugin_isdisabled('linkback') && ($linkback =& plugin_load('helper', 'linkback'))) {
         $link = $linkback->td($page);
         if ($link) {
             $xhtml[] = '<span class="linkback">' . $link . '</span>';
         }
     }
     $xhtml = implode(DOKU_LF . DOKU_TAB . '&middot; ', $xhtml);
     // tags - let Tag Plugin do the work for us
     if (empty($sect) && $flags['tags'] && !plugin_isdisabled('tag') && ($tag =& plugin_load('helper', 'tag'))) {
         $tags = $tag->td($page);
         if ($tags) {
             $xhtml .= '<div class="tags"><span>' . DOKU_LF . DOKU_TAB . $tags . DOKU_LF . DOKU_TAB . '</span></div>' . DOKU_LF;
         }
     }
     if (!$xhtml) {
         $xhtml = '&nbsp;';
     }
     $class = 'inclmeta';
     $class .= ' level' . $footer_lvl;
     return '<div class="' . $class . '">' . DOKU_LF . DOKU_TAB . $xhtml . DOKU_LF . '</div>' . DOKU_LF;
 }
开发者ID:mattandwhatnot,项目名称:plugin-include,代码行数:81,代码来源:footer.php


示例17: 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?>&nbsp;::<a href="javascript:refreshMonitor({'div':1});">студенты</a>&nbsp;::<a href="javascript:refreshMonitor({'div':2});">школьники</a>&nbsp;::<a href="javascript:refreshMonitor({'div':0});">все</a></h3>
<?php
else:
?>
          <h3>Результаты<?=$monitor_time?>&nbsp;::<a href="javascript:refreshMonitor({'div':1});">студенты</a>&nbsp;::<a href="javascript:refreshMonitor({'div':2});">школьники</a>&nbsp;::<a href="javascript:refreshMonitor({'div':0});">все</a></h3>
<?php
endif;
?>
          <table class="standing">
            <tr>
<?php
if ($kind==1):
?>
              <th>#</th>
              <th>Пользователь</th>
              <th class="c">OK</th>
              <th>Последняя сдача</th>
<?php
elseif ($kind==2):
?>
              <th>#</th>
              <th>Пользователь</th>
              <th class="c">OK</th>
              <th class="c">Последняя сдача</th>
              <th>Баллы</th>
<?php
else:
?>
              <th>#</th>
              <th>Пользователь</th>
<?php
    if (3==$kind || 4==$kind):
        //контест третьего типа - надо вывести индексы задач
        for ($i=0; $i<count($indexes); $i++):
?>              
              <th><a class="white" href="problem.php?contest=<?=$contest?>&amp;problem=<?=$indexes[$i]?>" title="<?=$names[$i]?>"><?=$indexes[$i]?></a></th>
<?php
        endfor; //конец цикла по индексам задач
    endif; // конец обработки контеста третьего типа
?>
              <th>OK</th>
              <th>Время</th>
<?php              
    if (3 != $kind):
?>              
              <th>Последняя сдача</th>
<?php
    endif;
    
    if (2 == $kind || 4 == $kind):
?>
              <th>Баллы</th>
<?php
    endif;
endif; //конец рисования заголовка
?>
              </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>
<?php
    //контест типа 3/4 - надо писать индексы задач
    if ($kind == 3 || $kind == 4):
        //цикл по индексам задач
        for ($j=0; $j<count($indexes); $j++):
            //если задача решена с первой попытки - выводим +
            //если задача решена - выводим +<количество неудачных попыток>
            //попыток не было - выводим .
            $valueIndex = 'A'.$indexes[$j];
            $value = $f->$valueIndex;
//.........这里部分代码省略.........
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:101,代码来源:standing.php


示例18: login

function login()
{
    global $authorized;
    global $is_admin;
    global $curnickname;
    global $curuserid;
    global $messagecount;
    global $mysqli_;
    // запрос количества сообщений
    if (1 == $authorized) {
        $q = $mysqli_->prepare('select count(*) from `messages` M inner join `reads` R on M.messageid=R.messageid and R.userid=? where M.kind=1 and M.touser=?');
        $q->bind_param('ii', $curuserid, $curuserid);
        $q->bind_result($tmp1);
        if (!$q->execute()) {
            fail(_error_mysql_query_error_code);
        }
        // auto-close query
        $q->fetch();
        // always one row
        $q->close();
        $q = $mysqli_->prepare('select count(*) from `messages` M where M.kind=1 and M.touser=?');
        $q->bind_param('i', $curuserid);
        $q->bind_result($tmp2);
        if (!$q->execute()) {
            fail(_error_mysql_query_error_code);
        }
        // auto-close query
        $q->fetch();
        // always one row
        $messagecount = $tmp2 - $tmp1;
        $q->close();
    }
    // конец запроса количества уведомлений
    if ($authorized == 1) {
        ?>
<form name="frmLogout" action="logout.php" method="post" style="text-align:right;">
    <?php 
        userlink($curnickname, $curuserid);
        ?>
    &nbsp;&nbsp;::<a href="javascript:void(0);" onclick="document.frmLogout.submit();">выйти</a>
</form>
<?php 
    } else {
        ?>
<form name="frmLogin" action="login.php" method="post" style="text-align:right;">
    <span style="float:left;width:40px;text-align:left;">login</span>&nbsp;<input type="text" name="login" maxlength="50" /><br /><br />
    <span style="float:left;width:40px;text-align:left;">пароль</span>&nbsp;<input type="password" name="password" maxlength="20" /><br /><br />
    ::<input type="submit" id="btnsubmit" class="submit" name="btnsubmit" value="войти" />
    <?php 
        if (_permission_allow_register_new_user || $is_admin == 1) {
            // если разрешено показывать регистрацию или мы в админском режиме - показываем
            ?>
          
    &nbsp;::<a href="./register.php">регистрация</a>
    <?php 
        }
        //конец проверки возможности показа регистрации
        ?>
</form>
<?php 
    }
}
开发者ID:bearf,项目名称:xicl-web-interface,

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP userlogin函数代码示例发布时间:2022-05-23
下一篇:
PHP userinfo函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap