当前位置: 首页>>代码示例>>PHP>>正文


PHP print_link函数代码示例

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


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

示例1: indexed_links

function indexed_links($total, $offset, $per_page)
{
    $separator = ' | ';
    // print "<<Prev" link
    print_link($offset == 1, '<< Prev', max(1, $offset - $per_page));
    // print all groupings except last one
    for ($start = 1, $end = $per_page; $end < $total; $start += $per_page, $end += $per_page) {
        print $separator;
        print_link($offset == $start, "{$start}-{$end}", $start);
    }
    /* print the last grouping -
     * at this point, $start points to the element at the beginning
     * of the last grouping
     */
    /* the text should only contain a range if there's more than
     * one element on the last page. For example, the last grouping
     * of 11 elements with 5 per page should just say "11", not "11-11"
     */
    $end = $total > $start ? "-{$total}" : '';
    print $separator;
    print_link($offset == $start, "{$start}{$end}", $start);
    // print "Next>>" link
    print $separator;
    print_link($offset == $start, 'Next >>', $offset + $per_page);
}
开发者ID:zmwebdev,项目名称:PHPcookbook-code-3ed,代码行数:25,代码来源:indexedlinks.php

示例2: print_menu

function print_menu($submenu_array, $current_menu)
{
    if (count($submenu_array) == 0) {
        return;
    }
    $links = array();
    $labels = array();
    foreach ($submenu_array as $submenu_item) {
        $pieces = preg_split('/\\s+/', $submenu_item, 2, PREG_SPLIT_NO_EMPTY);
        $links[] = $pieces[0];
        $labels[] = $pieces[1];
    }
    print_link($links[0], $labels[0], $current_menu, $links);
    if (count($links) > 1) {
        if (in_array($current_menu, $links)) {
            echo '<img src="images/dropdown_arrow_white.gif">';
        } else {
            echo '<img src="images/dropdown_arrow_white.gif" style="display:none;">';
            echo '<img src="images/dropdown_arrow_grey.gif">';
        }
    }
    array_shift($links);
    array_shift($labels);
    echo '</a>';
    if (count($links) > 0) {
        echo '<ul>';
        foreach ($links as $link) {
            $label = array_shift($labels);
            print_link($link, $label, $current_menu, array($link));
            echo '</a></li>';
        }
        echo '</ul>';
    }
    echo '</li>';
}
开发者ID:carriercomm,项目名称:Freeside,代码行数:35,代码来源:menu.php

示例3: indexed_links

function indexed_links($total, $offset, $per_page)
{
    $separator = '|';
    print_link($offset == 1, '<< Prev', max(1, $offset - $per_page));
    for ($start = 1, $end = $per_page; $end < $total; $start += $per_page, $end += $per_page) {
        print $separator;
        print_link($offset == $start, "{$start}-{$end}", $start);
    }
    //var_dump($start);
    $end = $total > $start ? "-{$total}" : '';
    print $separator;
    print_link($offset == $start, "{$start}{$end}", $start);
    print $separator;
    print_link($offset == $start, "Next>>", $offset + $per_page);
}
开发者ID:xiaobudongzhang,项目名称:lib,代码行数:15,代码来源:page.php

示例4: print_column_bugnotes_count

/**
 * Print column content for column bugnotes count
 *
 * @param BugData $p_bug bug object
 * @param int $p_columns_target see COLUMNS_TARGET_* in constant_inc.php
 * @return null
 * @access public
 */
function print_column_bugnotes_count($p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $t_filter;
    # grab the bugnote count
    $t_bugnote_stats = bug_get_bugnote_stats($p_bug->id);
    if (NULL !== $t_bugnote_stats) {
        $bugnote_count = $t_bugnote_stats['count'];
        $v_bugnote_updated = $t_bugnote_stats['last_modified'];
    } else {
        $bugnote_count = 0;
    }
    echo '<td class="column-bugnotes-count">';
    if ($bugnote_count > 0) {
        $t_show_in_bold = $v_bugnote_updated > strtotime('-' . $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] . ' hours');
        if ($t_show_in_bold) {
            echo '<span class="bold">';
        }
        print_link(string_get_bug_view_url($p_bug->id) . "&nbn={$bugnote_count}#bugnotes", $bugnote_count);
        if ($t_show_in_bold) {
            echo '</span>';
        }
    } else {
        echo '&#160;';
    }
    echo '</td>';
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:34,代码来源:columns_api.php

示例5: print_link

echo '<br>';
$container['body'] = '';
$container['url'] = 'mgu_create.php';
print_link($container, 'DL MGU Maps');
echo '<br>';
$container['body'] = '';
$container['url'] = 'mgu_create_new.php';
print_link($container, 'MGU Test');
echo '<br>';
$container['url'] = 'skeleton.php';
$container['body'] = 'album_edit.php';
print_link($container, 'Edit Photo');
echo '<br>';
echo '<a href="' . $URL . '/album/" target="_blank">Album</a><br><br>';
$container['body'] = 'bug_report.php';
print_link($container, 'Report a Bug');
echo '<br>';
$container['body'] = 'contact.php';
print_link($container, 'Contact Form');
echo '<br><br><b>';
if ($session->game_id > 0) {
    echo '<big>';
    $container['body'] = 'chat_rules.php';
    print_link($container, 'IRC Chat');
    echo '</big><br>';
}
echo '<a href="http://smrcnn.smrealms.de/viewtopic.php?t=3515/album/" target="_blank">User Policy</a><br>';
echo '<a href="http://smrcnn.smrealms.de/" target="_blank">WebBoard</a></b><br>';
$container['body'] = 'donation.php';
print_link($container, 'Donate');
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:menue.php

示例6: while

print "</tr>";
print "<tr>";
print "<td>Turrets</td><td align=\"center\">" . $planet->construction[3] . "</td><td align=\"center\">" . $planet->accuracy() . " %</td>";
print "</tr>";
print "</table>";
print "<br />";
$db->query("SELECT * FROM player WHERE sector_id = {$player->sector_id} AND " . "game_id = " . SmrSession::$game_id . " AND " . "account_id != " . SmrSession::$old_account_id . " AND " . "land_on_planet = 'TRUE' " . "ORDER BY last_active DESC");
while ($db->next_record()) {
    $planet_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id);
    $container = array();
    $container["url"] = "planet_kick_processing.php";
    $container["account_id"] = $planet_player->account_id;
    print_form($container);
    $container = array();
    $container["url"] = "skeleton.php";
    $container["body"] = "trader_search_result.php";
    $container["player_id"] = $planet_player->player_id;
    print_link($container, "<span style=\"color:yellow;\">{$planet_player->player_name}</span>");
    print "&nbsp;";
    // should we be able to kick this player from our rock?
    if (($player->alliance_id != $planet_player->alliance_id || $player->alliance_id == 0) && $planet->owner_id == $player->account_id) {
        print_submit("Kick");
    }
    print "</form>";
}
if ($db->nf() > 0) {
    print "<br>";
}
print_form(create_container("planet_launch_processing.php", ""));
print_submit("Launch");
print "</form>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:planet_main.php

示例7: lang_get

	</ul>
</div>

<div class="table-container">
	<h2><?php 
echo lang_get('manage_tags_link');
?>
 [<?php 
echo $t_total_tag_count;
?>
]</h2>
	<?php 
if ($t_can_edit) {
    ?>
	<div class="section-link"><?php 
    print_link('#tagcreate', lang_get('tag_create'));
    ?>
</div>
	<?php 
}
?>
	<table>
		<thead>
			<tr class="row-category">
				<td><?php 
echo lang_get('tag_name');
?>
</td>
				<td><?php 
echo lang_get('tag_creator');
?>
开发者ID:keetron,项目名称:mantisbt,代码行数:31,代码来源:manage_tags_page.php

示例8: print_link

    }
}
//this table contains the star system, and the minimap. The first row being for the system data
$error_str .= "\n\n<table width='100%' border='0'><tr><td>";
$error_str .= "\n<table border='0' cellspacing='1' cellpadding='3'>";
$error_str .= "\n<tr>\n<td bgcolor='#333333' colspan='2' nowrap><h4 id='systeme'>" . $cw['star_system'] . " #{$user['location']} - <b class='b1'>{$star['star_name']}</b> = ({$star['planetary_slots']} " . $cw['planetary_slots'] . ")</h4></td></tr>";
#warp links
$error_str .= "\n<tr><td bgcolor='#555555'><span class='liens_prl'>" . $cw['sauter_vers'] . "</span></td><td bgcolor=#333333>";
if ($user['location'] > 0 && $user['location'] <= $game_info['num_stars']) {
    //ensure user is in a system that exists.
    print_link($star['link_1']);
    print_link($star['link_2']);
    print_link($star['link_3']);
    print_link($star['link_4']);
    print_link($star['link_5']);
    print_link($star['link_6']);
    $error_str .= $auto_str . "</td>";
    // => autowarp
    if (!empty($star['wormhole'])) {
        $error_str .= "<td bgcolor=#555555>" . $cw['wormhole'] . "</td><td bgcolor=#333333>&lt;<a href='location.php?toloc={$star['wormhole']}'>{$star['wormhole']}</a>&gt;</td>";
    }
} else {
    //user not in a system that exists, so make a link to system 1.
    $error_str .= "&lt;<a href='location.php?toloc=1'>1</a>&gt; ";
}
$error_str .= "</tr>";
#end warp links
#autowarp
if (!empty($auto_link)) {
    if (preg_match("/[0-9]/", $sys_to_go)) {
        //only put the '-' in when more than 1 jump left.
开发者ID:nilsine,项目名称:Astra-Vires,代码行数:31,代码来源:location.php

示例9: get_file_loc

include get_file_loc('menue.inc');
print_galactic_post_menue();
$db->query("SELECT * FROM galactic_post_applications WHERE game_id = {$player->game_id}");
if ($db->nf()) {
    print "You have received an application from the following players (click name to view description)<br>";
    print "Becareful when choosing your writters.  Make sure it is someone who will actually help you.<br><br>";
} else {
    print "You have no applications to view at the current time.";
}
while ($db->next_record()) {
    $appliee = new SMR_PLAYER($db->f("account_id"), $player->game_id);
    $container = array();
    $container["url"] = "skeleton.php";
    $container["body"] = "galactic_post_view_applications.php";
    $container["id"] = $appliee->account_id;
    print_link($container, "<font color=yellow>{$appliee->player_name}</font>");
    print " who has ";
    if ($db->f("written_before") == "YES") {
        print "written for some kind of a newspaper before.";
    } else {
        print "not written for a newspaper before.";
    }
    print "<br>";
}
print "<br><br>";
if (isset($var["id"])) {
    $db->query("SELECT * FROM galactic_post_applications WHERE game_id = {$player->game_id} AND account_id = {$var['id']}");
    $db->next_record();
    $desc = stripslashes($db->f("description"));
    $applie = new SMR_PLAYER($var["id"], $player->game_id);
    print "Name : {$applie->player_name}<br>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:galactic_post_view_applications.php

示例10: foreach

<table class="width75" cellspacing="0">
<?php 
$t_column_count = 0;
$t_max_column_count = 2;
foreach ($t_query_arr as $t_id => $t_name) {
    if ($t_column_count == 0) {
        print '<tr>';
    }
    print '<td>';
    if (OFF != $t_rss_enabled) {
        # Use the "new" RSS link style.
        print_rss(rss_get_issues_feed_url(null, null, $t_id), lang_get('rss'));
        echo ' ';
    }
    $t_query_id = (int) $t_id;
    print_link('view_all_set.php?type=3&source_query_id=' . $t_query_id, $t_name);
    if (filter_db_can_delete_filter($t_id)) {
        echo ' ';
        print_button('query_delete_page.php?source_query_id=' . $t_query_id, lang_get('delete_query'));
    }
    print '</td>';
    $t_column_count++;
    if ($t_column_count == $t_max_column_count) {
        print '</tr>';
        $t_column_count = 0;
    }
}
# Tidy up this row
if ($t_column_count > 0 && $t_column_count < $t_max_column_count) {
    for ($i = $t_column_count; $i < $t_max_column_count; $i++) {
        print '<td>&#160;</td>';
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:query_view_page.php

示例11: print_link

    print_link($container, $curr_player->get_colored_name());
    print "</td>";
    print "<td valign=\"top\"";
    if ($player->account_id == $curr_player->account_id) {
        print " style=\"font-weight:bold;\"";
    }
    print ">{$curr_player->race_name}</td>";
    print "<td valign=\"top\"";
    if ($player->account_id == $curr_player->account_id) {
        print " style=\"font-weight:bold;\"";
    }
    print ">";
    if ($curr_player->alliance_id > 0) {
        $container = array();
        $container["url"] = "skeleton.php";
        $container["body"] = "alliance_roster.php";
        $container["alliance_id"] = $curr_player->alliance_id;
        print_link($container, "{$curr_player->alliance_name}");
    } else {
        print "(none)";
    }
    print "</td>";
    print "<td valign=\"top\" align=\"right\"";
    if ($player->account_id == $curr_player->account_id) {
        print " style=\"font-weight:bold;\"";
    }
    print ">" . number_format($curr_player->deaths) . "</td>";
    print "</tr>";
}
print "</table>";
print "</div>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:rankings_player_death.php

示例12: config_get

$t_rss_enabled = config_get('rss_enabled');
if (OFF != $t_rss_enabled && news_is_enabled()) {
    $t_rss_link = rss_get_news_feed_url($t_project_id);
    html_set_rss_link($t_rss_link);
}
html_page_top(lang_get('main_link'));
if (!current_user_is_anonymous()) {
    $t_current_user_id = auth_get_current_user_id();
    $t_hide_status = config_get('bug_resolved_status_threshold');
    echo '<div class="quick-summary-left">';
    echo lang_get('open_and_assigned_to_me_label') . lang_get('word_separator');
    print_link("view_all_set.php?type=1&handler_id={$t_current_user_id}&hide_status={$t_hide_status}", current_user_get_assigned_open_bug_count(), false, 'subtle');
    echo '</div>';
    echo '<div class="quick-summary-right">';
    echo lang_get('open_and_reported_to_me_label') . lang_get('word_separator');
    print_link("view_all_set.php?type=1&reporter_id={$t_current_user_id}&hide_status={$t_hide_status}", current_user_get_reported_open_bug_count(), false, 'subtle');
    echo '</div>';
    echo '<div class="quick-summary-left">';
    echo lang_get('last_visit_label') . lang_get('word_separator');
    echo date(config_get('normal_date_format'), current_user_get_field('last_visit'));
    echo '</div>';
}
if (news_is_enabled()) {
    $t_news_rows = news_get_limited_rows($f_offset, $t_project_id);
    $t_news_count = count($t_news_rows);
    if ($t_news_count) {
        echo '<div id="news-items">';
        # Loop through results
        for ($i = 0; $i < $t_news_count; $i++) {
            $t_row = $t_news_rows[$i];
            # only show VS_PRIVATE posts to configured threshold and above
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:main_page.php

示例13: make_bug_link

?>
,
   <?php 
print make_bug_link('Documentation', 'report', '<strong>Documentation</strong>');
?>
 or
   <?php 
print make_bug_link('Bug System', 'report', '<strong>Bug&nbsp;System</strong>');
?>
.
   Do be aware that this &quot;Bug System&quot; link is
   <strong>only</strong> for reporting issues with the
   <strong>user interface</strong> for reporting, searching and
   editing the bugs, so is <strong>not</strong> for reporting bugs
   about packages or other parts of the website.
  </li>
</ul>

<p>
You may find the
<?php 
print_link('https://bugs.php.net/stats.php', 'Bug Statistics');
?>
 page interesting.
</p>

<?php 
response_footer();
?>

开发者ID:phpsource,项目名称:web-pecl,代码行数:29,代码来源:index.php

示例14: foreach

<table class="width75" cellspacing="0">
<?php 
$t_column_count = 0;
$t_max_column_count = 2;
foreach ($t_query_arr as $t_id => $t_name) {
    if ($t_column_count == 0) {
        print '<tr>';
    }
    print '<td>';
    if (OFF != $t_rss_enabled) {
        # Use the "new" RSS link style.
        print_rss(rss_get_issues_feed_url(null, null, $t_id), lang_get('rss'));
        echo ' ';
    }
    $t_query_id = db_prepare_int($t_id);
    print_link("view_all_set.php?type=3&source_query_id={$t_query_id}", $t_name);
    if (filter_db_can_delete_filter($t_id)) {
        echo ' ';
        print_button("query_delete_page.php?source_query_id={$t_query_id}", lang_get('delete_query'));
    }
    print '</td>';
    $t_column_count++;
    if ($t_column_count == $t_max_column_count) {
        print '</tr>';
        $t_column_count = 0;
    }
}
# Tidy up this row
if ($t_column_count > 0 && $t_column_count < $t_max_column_count) {
    for ($i = $t_column_count; $i < $t_max_column_count; $i++) {
        print '<td>&#160;</td>';
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:query_view_page.php

示例15: printf

?>

<P>This list is used for general questions and discussion of hwloc.
Please see the "<a href="<?php 
printf("{$topdir}/community/help/");
?>
">Getting Help</a>" page for details on submitting requests for
help.  <?php 
red("Subscribers");
?>
 can post questions, comments,
suspected bug reports, etc. to the list at the following address:</p>

<?php 
print_list("hwloc-devel");
?>

<?php 
print_link("Git commit list (<font color=red>USERS\nCANNOT POST TO THIS LIST</font>)", "hwloc-commits");
?>

<p>A mail is sent to this list for every git push to Github in the
hwloc code base.  The mail includes a list of files that were changed,
the developer's commit message, and a diff of the changes.  <strong>Only the
automated Github web hook post to this list;</strong> all other posts
are automatically discarded.

</UL>

<?php 
include_once "{$topdir}/includes/footer.inc";
开发者ID:nrgraham23,项目名称:ompi-www,代码行数:31,代码来源:hwloc.php


注:本文中的print_link函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。