本文整理汇总了PHP中links函数的典型用法代码示例。如果您正苦于以下问题:PHP links函数的具体用法?PHP links怎么用?PHP links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了links函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: textile
function textile($text, $lite = '')
{
if (get_magic_quotes_gpc() == 1) {
$text = stripslashes($text);
}
$text = incomingEntities($text);
$text = encodeEntities($text);
$text = fixEntities($text);
$text = cleanWhiteSpace($text);
$text = getRefs($text);
$text = noTextile($text);
$text = image($text);
$text = links($text);
$text = span($text);
$text = superscript($text);
$text = footnoteRef($text);
$text = code($text);
$text = glyphs($text);
$text = retrieve($text);
if ($lite == '') {
$text = lists($text);
$text = table($text);
$text = block($text);
}
/* clean up <notextile> */
$text = preg_replace('/<\\/?notextile>/', "", $text);
/* turn the temp char back to an ampersand entity */
$text = str_replace("x%x%", "&", $text);
$text = str_replace("<br />", "<br />\n", $text);
return trim($text);
}
示例2: head
function head($directoryLevel)
{
$directoryString = getDirectoryString($directoryLevel);
$returnValue = "";
$returnValue .= <<<EOT
<header>
\t<!-- OVERFLOW MENU -->
\t<div class="overflow-menu">
\t\t<div class="title-div">
\t\t\t<span class="title"><a href="{$directoryString}">Queen's Chess Club</a></span>
\t\t</div>
EOT;
$returnValue .= links($directoryString);
$returnValue .= <<<EOT
\t</div>
\t<div class="container">
\t\t<div class="row">
\t\t\t<div class="twelve columns header">
\t\t\t\t<!-- HEADER-LEFT -->
\t\t\t\t<div class="three columns header-left" >
\t\t\t\t\t<a href="{$directoryString}">
\t\t\t\t\t\t<img class="logo" src="{$directoryString}/icons/logo2.png"/>
\t\t\t\t\t</a>
\t\t\t\t\t<button class="overflow">
\t\t\t\t\t\t<img class="iconMenuGray" src="{$directoryString}icons/icon-menu-gray.png" alt="Menu button in black" style="width:22px;"/>
\t\t\t\t\t</button>
\t\t\t\t</div>
\t\t\t\t<!-- HEADER RIGHT -->
\t\t\t\t<div class="nine columns header-right">
\t\t\t\t\t<div class="title-div">
\t\t\t\t\t\t<span class="title"><a href="{$directoryString}">Queen's Chess Club</a></span>
\t\t\t\t\t</div>
EOT;
$returnValue .= links($directoryString);
$returnValue .= <<<EOT
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
</header>
EOT;
return $returnValue;
}
示例3: theme_navigation
/**
* @return The themed html string for the navigation menu.
*/
function theme_navigation()
{
$output = '<ul class="nav">';
$links = links();
$sitemap = page_sitemap();
foreach ($links as $path => $title) {
if (in_array($path, $sitemap)) {
$output .= '<li>' . theme('navigation_link', $path, $title) . '</li>';
}
}
$output .= '</ul>';
return $output;
}
示例4: fbHeader
function fbHeader($pages, $activePage)
{
?>
<div id="header">
<div id="logo"><h1>Fajita Boy</h1></div>
<div id="nav"><?php
links($pages, $activePage);
?>
</div>
</div>
<?php
}
示例5: links
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>COSMUS</title>
<link href="/cosmus/css/bootstrap.min.css" rel="stylesheet">
<?php
links();
?>
<style>
body {
background: url("http://itsmyfun.net/MyFiles/2014/01/A-NEW-wallpapers-HD-2013-serrcs-94.jpg") no-repeat fixed;
background-size: 100% 100%;
}
#navigation{
position: relative;
display: block;
}
#navigation:after{
width:100%;
height:100%;
top: 0;
content:"";
position: absolute;
background: url("http://www.seamlesspatternchecker.com/hash/seamless-pattern-samples/d/d/9/dd9-vector-abstract-circuit-board-black-and-white-seamless-pattern-geometric-lined-vector-background-151743344.jpg") no-repeat fixed;/*rgba(255, 173, 92, 0.5);*/ /*url("http://wallpaper-download.net/wallpapers/random-wallpapers-tumblr-backgrounds-wallpaper-36963.jpg") repeat fixed;*/
background-size: 100% 50%;
border-bottom-right-radius: 500px;
示例6: lhcontent
function lhcontent()
{
makeLinks(links());
}
示例7: show
} else {
$sel = "";
}
$kats .= show(_select_field, array("value" => $getk['id'], "what" => re($getk['name']), "sel" => $sel));
}
$show = show($dir . "/form_dl", array("admin_head" => _downloads_admin_head_edit, "ddownload" => re($get['download']), "durl" => re($get['url']), "file" => $dl, "lokal" => _downloads_lokal, "exist" => _downloads_exist, "nothing" => _nothing, "nofile" => _downloads_nofile, "oder" => _or, "dbeschreibung" => re_bbcode($get['beschreibung']), "kat" => _downloads_kat, "what" => _button_value_edit, "do" => "editdl&id=" . $_GET['id'] . "", "kats" => $kats, "url" => _downloads_url, "beschreibung" => _beschreibung, "download" => _downloads_name));
} elseif ($_GET['do'] == "editdl") {
if (empty($_POST['download']) || empty($_POST['url'])) {
if (empty($_POST['download'])) {
$show = error(_downloads_empty_download, 1);
} elseif (empty($_POST['url'])) {
$show = error(_downloads_empty_url, 1);
}
} else {
if (preg_match("#^www#i", $_POST['url'])) {
$dl = links($_POST['url']);
} else {
$dl = up($_POST['url']);
}
$qry = db("UPDATE " . $db['downloads'] . "\n SET `download` = '" . up($_POST['download']) . "',\n `url` = '" . $dl . "',\n `beschreibung` = '" . up($_POST['beschreibung'], 1) . "',\n `date` = '" . (int) time() . "',\n `kat` = '" . (int) $_POST['kat'] . "'\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_downloads_edited, "?admin=dladmin");
}
} elseif ($_GET['do'] == "delete") {
$qry = db("DELETE FROM " . $db['downloads'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_downloads_deleted, "?admin=dladmin");
} else {
$qry = db("SELECT * FROM " . $db['downloads'] . "\n ORDER BY id");
while ($get = _fetch($qry)) {
$edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=dladmin&do=edit", "title" => _button_title_edit));
$delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=dladmin&do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_dl)));
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
示例8: links
?>
"><?php
$pages->title();
?>
</a></li>
<?php
}
?>
</ul>
</aside>
<aside class="widget widget_links">
<h2 class="widget-title">友情链接</h2>
<div class="widget-plain">
<?php
links('links');
?>
</div>
</aside>
<?php
/*
<aside class="widget widget_categories">
<h2 class="widget-title">分类目录</h2>
<ul>
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while($category->next()): ?>
<li><a href="<?php $category->permalink(); ?>"><?php $category->name(); ?></a></li>
<?php endwhile; ?>
</ul>
</aside>
示例9: _fetch
$get = _fetch($qry);
$files = get_files('../banner/partners/');
for ($i = 0; $i < count($files); $i++) {
if (re($get['banner']) == $files[$i]) {
$sel = "selected=\"selected\"";
} else {
$sel = "";
}
$banners .= show(_partners_select_icons, array("icon" => $files[$i], "sel" => $sel));
}
$show = show($dir . "/form_partners", array("do" => "editbutton&id=" . $get['id'] . "", "head" => _partners_edit_head, "nothing" => "", "banner" => _partners_button, "link" => _link, "e_link" => re($get['link']), "e_textlink" => empty($get['textlink']) ? '' : re($get['banner']), "or" => _or, "textlink" => _partnerbuttons_textlink, "banners" => $banners, "what" => _button_value_edit));
} elseif ($_GET['do'] == "editbutton") {
if (empty($_POST['link'])) {
$show = error(_empty_url, 1);
} else {
$qry = db("UPDATE " . $db['partners'] . "\n SET `link` = '" . links($_POST['link']) . "',\n `banner` = '" . up(empty($_POST['textlink']) ? $_POST['banner'] : $_POST['textlink']) . "',\n `textlink` = '" . intval(empty($_POST['textlink']) ? 0 : 1) . "'\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_partners_edited, "?admin=partners");
}
} elseif ($_GET['do'] == "delete") {
$del = db("DELETE FROM " . $db['partners'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_partners_deleted, "?admin=partners");
} else {
$qry = db("SELECT * FROM " . $db['partners'] . "\n ORDER BY id");
while ($get = _fetch($qry)) {
$edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=partners&do=edit", "title" => _button_title_edit));
$delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=partners&do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_entry)));
$rlink = str_replace('http://', '', re($get['link']));
$button = '<img src="../banner/partners/' . re($get['banner']) . '" alt="' . $rlink . '" title="' . $rlink . '" />';
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
$color++;
$show_ .= show($dir . "/partners_show", array("class" => $class, "button" => empty($get['textlink']) ? $button : '<center>' . _partnerbuttons_textlink . ': <b>' . re($get['banner']) . '</b></center>', "link" => re($get['link']), "id" => $get['id'], "edit" => $edit, "delete" => $delete));
示例10: current_status
</head>
<body>
<p>I’m John Holdun. I design interactions for the web.</p>
<p><?php
echo current_status();
?>
</p>
<p>I’m currently in <?php
echo current_city();
?>
.</p>
<ul>
<?php
foreach (links() as $link) {
?>
<li><a href="<?php
echo $link->url;
?>
"><?php
echo $link->text;
?>
</a></li>
<?php
}
?>
</ul>
</body>
</html>
示例11: cnt
$get_id = cnt($db['acomments'], " WHERE artikel = " . intval($_GET['id']) . "") + 1;
$get_userid = $userid;
$get_date = time();
if ($chkMe == 'unlogged') {
$regCheck = false;
} else {
$regCheck = true;
$pUId = $userid;
}
}
$get_hp = $_POST['hp'];
$get_email = $_POST['email'];
$get_nick = $_POST['nick'];
if (!$regCheck) {
if ($get_hp) {
$hp = show(_hpicon_forum, array("hp" => links($get_hp)));
}
if ($get_email) {
$email = '<br />' . show(_emailicon_forum, array("email" => eMailAddr($get_email)));
}
$onoff = "";
$avatar = "";
$nick = show(_link_mailto, array("nick" => re($get_nick), "email" => $get_email));
} else {
$hp = "";
$email = "";
$onoff = onlinecheck($get_userid);
$nick = cleanautor($get_userid);
}
$titel = show(_eintrag_titel, array("postid" => $get_id, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date) . _uhr, "edit" => $edit, "delete" => $delete));
$index = show("page/comments_show", array("titel" => $titel, "comment" => bbcode($_POST['comment'], 1), "nick" => $nick, "editby" => bbcode($editedby, 1), "email" => $email, "hp" => $hp, "avatar" => useravatar($get_userid), "onoff" => $onoff, "rank" => getrank($get_userid), "ip" => $userip . _only_for_admins));
示例12: error
$index = error(_awards_empty_url, 1);
}
} else {
if (empty($_POST['place'])) {
$place = "-";
} else {
$place = $_POST['place'];
}
}
if (empty($_POST['prize'])) {
$prize = "-";
} else {
$prize = $_POST['prize'];
}
$datum = mktime(0, 0, 0, $_POST['m'], $_POST['t'], $_POST['j']);
$qry = db("UPDATE " . $db['awards'] . "\n SET `date` = '" . (int) $datum . "',\n \t\t\t\t\t `squad` = '" . (int) $_POST['squad'] . "',\n \t\t\t\t\t `event` = '" . up($_POST['event']) . "',\n `url` = '" . links($_POST['url']) . "',\n \t\t\t\t\t `place` = '" . up($place) . "',\n \t\t\t\t\t `prize` = '" . up($prize) . "'\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_awards_admin_edited, "?admin=awards");
} elseif ($_GET['do'] == "delete") {
$qry = db("DELETE FROM " . $db['awards'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_awards_admin_deleted, "?admin=awards");
} else {
$qry = db("SELECT * FROM " . $db['awards'] . "\n ORDER BY date DESC");
while ($get = _fetch($qry)) {
$edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=awards&do=edit", "title" => _button_title_edit));
$delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=awards&do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_award)));
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
$color++;
$show_ .= show($dir . "/awards_show", array("datum" => date("d.m.Y", $get['date']), "award" => re($get['event']), "id" => $get['squad'], "class" => $class, "edit" => $edit, "delete" => $delete));
}
$show = show($dir . "/awards", array("head" => _awards_head, "date" => _datum, "titel" => _award, "show" => $show_, "add" => _awards_admin_head_add));
}
示例13: show
$squads .= show(_select_field_ranking_add, array("what" => re($gets['name']), "value" => $gets['id'], "icon" => $gets['icon'], "sel" => $sel));
}
$show = show($dir . "/form_rankings", array("head" => _rankings_edit_head, "do" => "editranking&id=" . $_GET['id'] . "", "what" => _button_value_edit, "squad" => _rankings_squad, "league" => _rankings_league, "rank" => _rankings_admin_place, "squads" => $squads, "e_league" => re($get['league']), "e_rank" => $get['rank'], "e_url" => re($get['url']), "url" => _rankings_teamlink));
} elseif ($_GET['do'] == "editranking") {
if (empty($_POST['league']) || empty($_POST['url']) || empty($_POST['rank'])) {
if (empty($_POST['league'])) {
$show = error(_error_empty_league, 1);
} elseif (empty($_POST['url'])) {
$show = error(_error_empty_url, 1);
} elseif (empty($_POST['rank'])) {
$show = error(_error_empty_rank, 1);
}
} else {
$qry = db("SELECT rank FROM " . $db['rankings'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$get = _fetch($qry);
$qry = db("UPDATE " . $db['rankings'] . "\n SET `league` = '" . up($_POST['league']) . "',\n `squad` = '" . up($_POST['squad']) . "',\n `url` = '" . links($_POST['url']) . "',\n `rank` = '" . (int) $_POST['rank'] . "',\n `lastranking` = '" . (int) $get['rank'] . "',\n `postdate` = '" . (int) time() . "'\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_ranking_edited, "?admin=rankings");
}
} elseif ($_GET['do'] == "delete") {
$del = db("DELETE FROM " . $db['rankings'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_ranking_deleted, "?admin=rankings");
} else {
$qry = db("SELECT s1.*,s2.name,s2.id AS sqid FROM " . $db['rankings'] . " AS s1\n LEFT JOIN " . $db['squads'] . " AS s2\n ON s1.squad = s2.id\n ORDER BY s1.postdate DESC");
while ($get = _fetch($qry)) {
$edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=rankings&do=edit", "title" => _button_title_edit));
$delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=rankings&do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_ranking)));
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
$color++;
$show_ .= show($dir . "/rankings_show", array("squad" => re($get['name']), "league" => re($get['league']), "id" => $get['sqid'], "class" => $class, "edit" => $edit, "delete" => $delete));
}
$show = show($dir . "/rankings", array("head" => _config_rankings, "league" => _cw_head_liga, "squad" => _cw_head_squad, "show" => $show_, "add" => _rankings_add_head));
示例14: show
$index = show($dir . "/serverliste", array("serverlist" => $serverlist, "slist_head" => _slist_head, "clan" => _profil_clan, "serverip" => _slist_serverip, "slots" => _slist_slots, "pwd" => _pwd, "eintragen" => _slist_add, "hlswip" => _gt_addip));
break;
case 'add':
$index = show($dir . "/add", array("add_head" => _slist_add, "clan" => _profil_clan, "hp" => _profil_hp, "what" => "slist", "security" => _register_confirm, "serverpasswort" => _server_password, "serverip" => _slist_serverip, "serverport" => _slist_serverport, "value" => _button_value_add, "slots" => _slist_slots, "serverpassword" => _server_password));
break;
case 'addserver':
if ($_POST['secure'] != $_SESSION['sec_slist'] || empty($_SESSION['sec_slist'])) {
$index = error(_error_invalid_regcode, 1);
} elseif (empty($_POST['clanname'])) {
$index = error(_error_empty_clanname, 1);
} elseif (empty($_POST['ip'])) {
$index = error(_error_empty_ip, 1);
} elseif (empty($_POST['port'])) {
$index = error(_error_empty_port, 1);
} elseif (empty($_POST['slots'])) {
$index = error(_error_empty_slots, 1);
} else {
$msg = _slist_added_msg;
$title = _slist_title;
$send = db("INSERT INTO " . $db['msg'] . "\n SET `datum` = '" . (int) time() . "',\n `von` = '0',\n `an` = '1',\n `titel` = '" . up($title) . "',\n `nachricht` = '" . up($msg) . "'");
$insert = db("INSERT INTO " . $db['serverliste'] . "\n SET `datum` = '" . (int) time() . "',\n `clanname` = '" . up($_POST['clanname']) . "',\n `clanurl` = '" . links($_POST['clanurl']) . "',\n `ip` = '" . up($_POST['ip']) . "',\n `port` = '" . (int) $_POST['port'] . "',\n `pwd` = '" . up($_POST['pwd']) . "',\n `slots` = '" . (int) $_POST['slots'] . "'");
$index = info(_error_server_saved, "../serverliste/");
}
break;
}
## SETTINGS ##
$time_end = generatetime();
$time = round($time_end - $time_start, 4);
page($index, $title, $where, $time);
## OUTPUT BUFFER END ##
gz_output();
示例15: cleanautor
$nick = cleanautor($get_userid);
}
$titel = show(_eintrag_titel, array("postid" => $get_id, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date) . _uhr, "edit" => $edit, "delete" => $delete));
$index = show("page/comments_show", array("titel" => $titel, "comment" => bbcode($_POST['comment'], 1), "nick" => $nick, "editby" => bbcode($editedby, 1), "email" => $email, "hp" => $hp, "avatar" => useravatar($get_userid), "onoff" => $onoff, "rank" => getrank($get_userid), "ip" => $userip . _only_for_admins));
echo '<table class="mainContent" cellspacing="1">' . $index . '</table>';
exit;
break;
case 'preview':
header("Content-type: text/html; charset=utf-8");
$qry = db("SELECT * FROM " . $db['squads'] . "\n WHERE id = '" . intval($_POST['squad']) . "'");
$get = _fetch($qry);
$serverpwd = show(_cw_serverpwd, array("cw_serverpwd" => re($_POST['serverpwd'])));
$img = squad($get['icon']);
$show = show(_cw_details_squad, array("game" => re($get['game']), "name" => re($get['name']), "id" => $_POST['squad'], "img" => $img));
$flagge = flag($get['gcountry']);
$gegner = show(_cw_details_gegner_blank, array("gegner" => re($_POST['clantag'] . " - " . $_POST['gegner']), "url" => links($_POST['url'])));
$server = show(_cw_details_server, array("servername" => re($_POST['servername']), "serverip" => re($_POST['serverip'])));
if ($_POST['punkte'] == "0" && $_POST['gpunkte'] == "0") {
$result = _cw_no_results;
} else {
$result = cw_result_details($_POST['punkte'], $_POST['gpunkte']);
}
$editcw = "";
if ($_POST['bericht']) {
$bericht = bbcode($_POST['bericht'], 1);
} else {
$bericht = " ";
}
if (!empty($_POST['s1'])) {
$screen1 = '<img src="../inc/images/admin/cwscreen.jpg" alt="" />';
} else {