本文整理汇总了PHP中parse_link函数的典型用法代码示例。如果您正苦于以下问题:PHP parse_link函数的具体用法?PHP parse_link怎么用?PHP parse_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parse_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logbook_pagination
function logbook_pagination($start, $n_count, $n_per_page)
{
global $game;
$page_html = '';
$n_pages = ceil($n_count / $n_per_page);
$current_page = $start > 0 ? $start / $n_per_page + 1 : 1;
$next_start = 0;
if ($current_page > 1) {
$page_html .= '[<a href="' . parse_link('a=logbook') . '">' . constant($game->sprache("TEXT0")) . '</a>] ';
$page_html .= '[<a href="' . parse_link('a=logbook&start=' . ($start - $n_per_page)) . '">' . constant($game->sprache("TEXT1")) . '</a>] ';
}
for ($i = 1; $i <= $n_pages; ++$i) {
if ($i == $current_page) {
$page_html .= '[' . $i . '] ';
} else {
$page_html .= '[<a href="' . parse_link('a=logbook&start=' . $next_start) . '">' . $i . '</a>] ';
}
$_div = $i / 10;
if ($_div == (int) $_div) {
$page_html .= '<br>';
}
$next_start = $next_start + $n_per_page;
}
if ($current_page < $n_pages) {
$page_html .= '[<a href="' . parse_link('a=logbook&start=' . ($start + $n_per_page)) . '">' . constant($game->sprache("TEXT2")) . '</a>] ';
$page_html .= '[<a href="' . parse_link('a=logbook&start=' . ($n_pages - 1) * $n_per_page) . '">' . constant($game->sprache("TEXT3")) . '</a>]';
}
return $page_html;
}
示例2: display_logbook
function display_logbook($log)
{
global $game;
$game->out('
<br>
<table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_outer">
<tr>
<td>
<table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
<tr>
<td width="450">
');
switch ($log['log_data']['what']) {
case 'break':
$game->out(constant($game->sprache("TEXT138")) . ' <a href="' . parse_link('a=stats&a2=viewplayer&id=' . $log['log_data']['who_id']) . '">' . $log['log_data']['who_name'] . '</a> ' . constant($game->sprache("TEXT139")));
break;
}
$game->out('
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
');
}
示例3: taxes_pagination
function taxes_pagination($start, $n_count, $n_per_page)
{
global $game;
$page_html = '';
$n_pages = ceil($n_count / $n_per_page);
$current_page = $start > 0 ? $start / $n_per_page + 1 : 1;
$next_start = 0;
if ($current_page > 1) {
$page_html .= '[<a href="' . parse_link('a=alliance_taxes') . '">' . constant($game->sprache("TEXT0")) . '</a>] ';
$page_html .= '[<a href="' . parse_link('a=alliance_taxes&start=' . ($start - $n_per_page)) . '">' . constant($game->sprache("TEXT1")) . '</a>]<br> ';
}
if ($current_page > 5) {
$page_html .= '[<a href="' . parse_link('a=alliance_taxes') . '">1</a>] ... ';
}
for ($i = 1; $i <= $n_pages; ++$i) {
if ($i == $current_page) {
$page_html .= '<b><span style="color: #00FF00;">[' . $i . ']</span></b> ';
} elseif ($i >= $current_page - 4 && $i <= $current_page + 4) {
$page_html .= '[<a href="' . parse_link('a=alliance_taxes&start=' . $next_start) . '">' . $i . '</a>] ';
}
$_div = $i / 25;
if ($_div == (int) $_div && $n_pages < $div) {
$page_html .= ' ';
}
$next_start = $next_start + $n_per_page;
}
if ($current_page < $n_pages - 5) {
$page_html .= ' ... [<a href="' . parse_link('a=alliance_taxes&start=' . ($n_pages - 1) * $n_per_page) . '">' . $n_pages . '</a>]';
}
if ($current_page < $n_pages) {
$page_html .= '<br>[<a href="' . parse_link('a=alliance_taxes&start=' . ($start + $n_per_page)) . '">' . constant($game->sprache("TEXT2")) . '</a>] ';
$page_html .= '[<a href="' . parse_link('a=alliance_taxes&start=' . ($n_pages - 1) * $n_per_page) . '">' . constant($game->sprache("TEXT3")) . '</a>]';
}
return $page_html;
}
示例4: display_logbook
function display_logbook($log)
{
global $game, $BUILDING_NAME;
$game->out('
<br>
<table align="center" border="0" cellpadding="2" cellspacing="2" class="style_outer">
<tr>
<td>
<table align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
<tr>
<td width="450">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="450">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="330" align="left"><b><u>' . $log['log_title'] . '</u></b></td>
<td width="120" align="right"><b>' . date('d.m.y H:i:s', $log['log_date']) . '</b></td>
</tr>
</table>
<br>
' . constant($game->sprache("TEXT136")) . ' <a href="' . parse_link('a=tactical_cartography&planet_id=' . encode_planet_id($log['log_data']['planet_id'])) . '"><b>' . $log['log_data']['planet_name'] . '</a></b> ' . constant($game->sprache("TEXT137")) . '
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
');
}
示例5: display_fleets_map
function display_fleets_map()
{
global $game;
if ($game->option_retr('show_fleets_map') == 0) {
$html_code = '<b>[ <a href="' . parse_link('a=ship_fleets_display&sfmap=1') . '"><i>' . constant($game->sprache("TEXT102")) . '</i></a> ]</b>';
} else {
$html_code = '<b>[ <a href="' . parse_link('a=ship_fleets_display&sfmap=0') . '"><i>' . constant($game->sprache("TEXT103")) . '</i></a> ]</b><br><br>
<a href="userfleets.php?size=6&map" target=_blank><img src="userfleets.php?size=2" border=0></a><br>';
}
$game->out('
<table width="90%" align="center" border="0" cellpadding="2" cellspacing="2" class="style_outer"><tr><td>
<table width="100%" align="center" border="0" cellpadding="4" cellspacing="2" class="style_inner"><tr><td align="center">
' . constant($game->sprache("TEXT101")) . ' ' . $html_code . '
</tr><td></table></tr></td></table><br>');
}
示例6: display_logbook
function display_logbook($log)
{
global $game, $BUILDING_NAME;
$game->out('
<br>
<table align="center" border="0" cellpadding="2" cellspacing="2" class="style_outer">
<tr>
<td>
<table align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
<tr>
<td width="450">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="450">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="330" align="left"><b><u>' . $log['log_title'] . '</u></b></td>
<td width="120" align="right"><b>' . date('d.m.y H:i:s', $log['log_date']) . '</b></td>
</tr>
</table>
<br>
' . constant($game->sprache("TEXT120")) . ', ' . $game->player['user_name'] . '!<br>
' . constant($game->sprache("TEXT121")) . ' "<a href="' . parse_link('&a=trade&view=view_bidding_detail&id=' . $log['log_data']['auction_id']) . '">' . $log['log_data']['auction_name'] . '</a>" ' . constant($game->sprache("TEXT122")) . '
<img src="' . $game->GFX_PATH . 'menu_metal_small.gif"> ' . $log['log_data']['resource_1'] . '
<img src="' . $game->GFX_PATH . 'menu_mineral_small.gif"> ' . $log['log_data']['resource_2'] . '
<img src="' . $game->GFX_PATH . 'menu_latinum_small.gif"> ' . $log['log_data']['resource_3'] . ' <img src="' . $game->GFX_PATH . 'menu_unit1_small.gif"> ' . $log['log_data']['unit_1'] . ' <img src="' . $game->GFX_PATH . 'menu_unit2_small.gif"> ' . $log['log_data']['unit_2'] . ' <img src="' . $game->GFX_PATH . 'menu_unit3_small.gif"> ' . $log['log_data']['unit_3'] . ' <img src="' . $game->GFX_PATH . 'menu_unit4_small.gif"> ' . $log['log_data']['unit_4'] . ' <img src="' . $game->GFX_PATH . 'menu_unit5_small.gif"> ' . $log['log_data']['unit_5'] . ' <img src="' . $game->GFX_PATH . 'menu_unit6_small.gif"> ' . $log['log_data']['unit_6'] . '<br><br>
' . constant($game->sprache("TEXT123")) . '
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
');
}
示例7: check_auth
(at your option) any later version.
STFC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
$magic_split = 9;
// Must be commented out, because otherwise this tool cannot be used without the planet
//$game->init_player();
check_auth(STGC_DEVELOPER);
if (!isset($_GET['sure'])) {
$game->out('<br><center>Do you really want to rebuild all star systems slots?<br><br><b>The old must be deleted before!</b><br><br><a href="' . parse_link('a=tools/world/create_starsystem_slots&sure') . '">Create new</a></center>');
return;
}
$system_slots = $processed_sector_slots = array();
$n_slots = 0;
$n_sectors = pow($magic_split * 2, 2);
$systems_per_sector = pow($magic_split, 2);
for ($i = 1; $i <= $n_sectors; ++$i) {
$system_slots[$i] = array();
$processed_sector_slots[$i] = 0;
for ($j = 1; $j <= $magic_split; ++$j) {
for ($k = 1; $k <= $magic_split; ++$k) {
$system_slots[$i][] = array($j, $k);
++$n_slots;
}
}
示例8: fetch
/**
* Fetches information from the url by getting the contents of the
* webpage, parse the webpage and extract the information from the
* opengraph meta-tags.
* If the site doesn't have any opengraph-metatags it is in fact no
* opengraph node and thus no data will be stored in the database.
* Only $url['is_opengraph'] === '0' indicates that the site is no
* opengraph node at all.
*
* @todo The combination of parse_link() and the following request
* leads to two requests for the open graph data. This should
* be fixed due to performance reasons.
*/
public function fetch()
{
if (!Config::get()->OPENGRAPH_ENABLE) {
return;
}
$response = parse_link($this['url']);
if ($response['response_code'] == 200 && strpos($response['Content-Type'], 'html') !== false) {
if (preg_match('/(?<=charset=)[^;]*/i', $response['Content-Type'], $match)) {
$currentEncoding = $match[0];
} else {
$currentEncoding = 'ISO-8859-1';
}
$context = stream_context_create(array('http' => array('method' => 'GET', 'header' => sprintf("User-Agent: Stud.IP v%s OpenGraph Parser\r\n", $GLOBALS['SOFTWARE_VERSION']))));
$content = file_get_contents($this['url'], false, $context);
$content = mb_encode_numericentity($content, array(0x80, 0xffff, 0, 0xffff), $currentEncoding);
$old_libxml_error = libxml_use_internal_errors(true);
$doc = new DOMDocument();
$doc->loadHTML($content);
libxml_use_internal_errors($old_libxml_error);
$metatags = $doc->getElementsByTagName('meta');
$reservedTags = array('url', 'chdate', 'mkdate', 'last_update', 'is_opengraph', 'data');
$isOpenGraph = false;
$ogTags = array();
$data = array();
foreach ($metatags as $tag) {
$key = false;
if ($tag->hasAttribute('property') && strpos($tag->getAttribute('property'), 'og:') === 0) {
$key = strtolower(substr($tag->getAttribute('property'), 3));
}
if (!$key && $tag->hasAttribute('name') && strpos($tag->getAttribute('name'), 'og:') === 0) {
$key = strtolower(substr($tag->getAttribute('name'), 3));
}
if ($key) {
$content = studip_utf8decode($tag->getAttribute('content'));
$data[] = array('og:' . $key => $content);
$ogTags[$key] = $content;
$isOpenGraph = true;
}
}
foreach ($ogTags as $key => $tag) {
if ($this->isField($key) && !in_array($key, $reservedTags)) {
$this[$key] = $tag;
}
}
if (!$this['title'] && $isOpenGraph) {
$titles = $doc->getElementsByTagName('title');
if ($titles->length > 0) {
$this['title'] = studip_utf8decode($titles->item(0)->textContent);
}
}
if (!$this['description'] && $isOpenGraph) {
foreach ($metatags as $tag) {
if (stripos($tag->getAttribute('name'), "description") !== false || stripos($tag->getAttribute('property'), "description") !== false) {
$this['description'] = studip_utf8decode($tag->getAttribute('content'));
}
}
}
$this['data'] = $data;
}
$this['is_opengraph'] = (int) $isOpenGraph;
}
示例9: constant
</fieldset></tr>');
// Options for sorting etc.:
$game->out('</table></td></tr></table><br><br>
<table border=0 cellpadding=1 cellspacing=1 class="style_outer"><tr><td>
<table border=0 cellpadding=1 cellspacing=1 class="style_inner">
<tr valign=top><td width=120><b>' . constant($game->sprache("TEXT41")) . '</b><br>
<a href="' . parse_link('a=planetlist&s_o=0') . '">' . ($game->option_retr('planetlist_order') == 0 ? '<u>' : '') . '' . constant($game->sprache("TEXT42")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_o=1') . '">' . ($game->option_retr('planetlist_order') == 1 ? '<u>' : '') . '' . constant($game->sprache("TEXT43")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_o=2') . '">' . ($game->option_retr('planetlist_order') == 2 ? '<u>' : '') . '' . constant($game->sprache("TEXT44")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_o=3') . '">' . ($game->option_retr('planetlist_order') == 3 ? '<u>' : '') . '' . constant($game->sprache("TEXT45")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_o=4') . '">' . ($game->option_retr('planetlist_order') == 4 ? '<u>' : '') . '' . constant($game->sprache("TEXT46")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_o=5') . '">' . ($game->option_retr('planetlist_order') == 5 ? '<u>' : '') . '' . constant($game->sprache("TEXT47")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_o=6') . '">' . ($game->option_retr('planetlist_order') == 6 ? '<u>' : '') . '' . constant($game->sprache("TEXT48")) . '</u></a><br>
</td><td width=120><b>' . constant($game->sprache("TEXT49")) . '</b><br>
<a href="' . parse_link('a=planetlist&s_s=0') . '">' . ($game->option_retr('planetlist_show') == 0 ? '<u>' : '') . '' . constant($game->sprache("TEXT50")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_s=1') . '">' . ($game->option_retr('planetlist_show') == 1 ? '<u>' : '') . '' . constant($game->sprache("TEXT51")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_s=2') . '">' . ($game->option_retr('planetlist_show') == 2 ? '<u>' : '') . '' . constant($game->sprache("TEXT48")) . '</u></a><br>
<a href="' . parse_link('a=planetlist&s_s=3') . '">' . ($game->option_retr('planetlist_show') == 3 ? '<u>' : '') . '' . constant($game->sprache("TEXT52")) . '</u></a><br>
</td>
</td><td width=120><b>' . constant($game->sprache("TEXT53")) . '</b><br>
' . ($game->SITTING_MODE ? '' : '<a href="' . parse_link('a=planetlist&s_op=0') . '">') . ($game->option_retr('redalert_options') == 0 ? '<u>' : '') . '' . constant($game->sprache("TEXT54")) . '</u>' . ($game->SITTING_MODE ? '' : '</a>') . '<br>
' . ($game->SITTING_MODE ? '' : '<a href="' . parse_link('a=planetlist&s_op=1') . '">') . ($game->option_retr('redalert_options') == 1 ? '<u>' : '') . '' . constant($game->sprache("TEXT55")) . '</u>' . ($game->SITTING_MODE ? '' : '</a>') . '<br>
' . ($game->SITTING_MODE ? '' : '<a href="' . parse_link('a=planetlist&s_op=2') . '">') . ($game->option_retr('redalert_options') == 2 ? '<u>' : '') . '' . constant($game->sprache("TEXT56")) . '</u>' . ($game->SITTING_MODE ? '' : '</a>') . '
</td>
</tr>
</table>
</td>
</tr>
</table>
');
示例10: htmlspecialchars
echo '</div>';
}
} else {
?>
<div style="font-size:0.7em; float:right">
<a href="<?php
echo SITE;
?>
/index.php?a=edit&q=<?php
echo htmlspecialchars($url);
?>
" style="color:white">编辑</a>
</div>
<?php
echo '<div style="padding-right:1em">';
echo parse_link(parse_template($content));
if ($special) {
require __DIR__ . '/special.php';
}
echo '</div>';
}
?>
</td>
</tr>
<tr style="height:0">
<td style="height:0">
<footer>符文工房中文百科的全部文字在<a href="https://creativecommons.org/licenses/by-sa/3.0/deed.zh">知识共享 署名-相同方式共享 3.0</a>协议之条款下提供。</footer>
</td>
</tr>
</table>
</body>
示例11: parse_link
<table width="450" align="center" border="0" cellpadding="1" cellspacing="1" class="style_outer"><tr><td>
<table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
<form name="minerals_form" method="post" action="' . parse_link('a=mines') . '" onSubmit="return deactivate_buttons();">
<tr>
<td width="350"><b>' . $BUILDING_NAME[$game->player['user_race']][2] . '</b> (<img src="' . $game->GFX_PATH . 'menu_mineral_small.gif"> <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerTickMineral() . '' : '' . ResourcesPerTickMineral() . '') . '</b> <i>' . constant($game->sprache("TEXT11")) . '</i> / <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerHourMineral() . '' : '' . ResourcesPerHourMineral() . '') . '</b> <i>' . constant($game->sprache("TEXT12")) . '</i>)</td>
<td width="100" rowspan="2" align="center" valign="middle"><input class="button" type="submit" name="submit" value="' . constant($game->sprache("TEXT13")) . '"></td>
</tr>
<tr>
<td width="300">' . constant($game->sprache("TEXT14")) . ' <select name="worker">' . $minerals_option_html . '</select></td>
</tr>
<input type="hidden" name="type" value="2">
</form>
</table>
</td></tr></table>
<br><br>
<table width="450" align="center" border="0" cellpadding="1" cellspacing="1" class="style_outer"><tr><td>
<table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner">
<form name="latinum_form" method="post" action="' . parse_link('a=mines') . '" onSubmit="return deactivate_buttons();">
<tr>
<td width="350"><b>' . $BUILDING_NAME[$game->player['user_race']][3] . '</b> (<img src="' . $game->GFX_PATH . 'menu_latinum_small.gif"> <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerTickLatinum() . '' : '' . ResourcesPerTickLatinum() . '') . '</b> <i>' . constant($game->sprache("TEXT11")) . '</i> / <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerHourLatinum() . '' : '' . ResourcesPerHourLatinum() . '') . '</b> <i>' . constant($game->sprache("TEXT12")) . '</i>)</td>
<td width="100" rowspan="2" align="center" valign="middle"><input class="button" type="submit" name="submit" value="' . constant($game->sprache("TEXT13")) . '"></td>
</tr>
<tr>
<td width="300">' . constant($game->sprache("TEXT14")) . ' <select name="worker">' . $latinum_option_html . '</select></td>
</tr>
<input type="hidden" name="type" value="3">
</form>
</table>
</td></tr></table>
');
}
示例12: constant
<td>
<table class="style_inner" width="450" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td><b>' . constant($game->sprache("TEXT20")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT21")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT22")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT23")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT24")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT25")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT26")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT27")) . '</b></td><td align="center"><b>' . constant($game->sprache("TEXT28")) . '</b></td><td><b>' . constant($game->sprache("TEXT29")) . '</b></td>
</tr>
');
while (($user_rights = $db->fetchrow($listquery)) != false) {
if ($user_rights['user_id'] == $alliance['alliance_owner']) {
$game->out('
<td><a href="' . parse_link('a=stats&a2=viewplayer&id=' . $user_rights['user_id'] . '') . '">' . $user_rights['user_name'] . '</a></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td>' . constant($game->sprache("TEXT30")) . '</td>
');
} else {
$game->out(' <form action="' . parse_link('a=alliance_rights') . '" method="post"><input type="hidden" name="user_id" value="' . $user_rights['user_id'] . '"><tr><td><a href="' . parse_link('a=stats&a2=viewplayer&id=' . $user_rights['user_id'] . '') . '">' . $user_rights['user_name'] . '</a></td> ');
if ($user_rights['user_alliance_rights1'] == 1) {
$game->out('<td><input type="checkbox" name="rights1" size="1" value="1" checked></td>');
} else {
$game->out('<td><input type="checkbox" name="rights1" size="1" value="1"></td>');
}
if ($user_rights['user_alliance_rights2'] == 1) {
$game->out('<td><input type="checkbox" name="rights2" size="1" value="1" checked></td>');
} else {
$game->out('<td><input type="checkbox" name="rights2" size="1" value="1"></td>');
}
if ($user_rights['user_alliance_rights3'] == 1) {
$game->out('<td><input type="checkbox" name="rights3" size="1" value="1" checked></td>');
} else {
$game->out('<td><input type="checkbox" name="rights3" size="1" value="1"></td>');
}
示例13: IN
$sql = 'UPDATE user
SET unread_messages = unread_messages + 1
WHERE user_id IN (' . implode(',', $user_ids) . ')';
if (!$db->query($sql)) {
message(DATABASE_ERROR, 'Could not update user unread messages');
}
redirect('a=alliance_main');
}
$game->out('
<table class="style_outer" width="350" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center">
<span style="font-size: 12pt; font-weight: bold;">' . $game->player['alliance_name'] . ' [' . $game->player['alliance_tag'] . ']</span><br><br>
<table class="style_inner" width="350" align="center" border="0" cellpadding="2" cellspacing="2">
<form method="post" action="' . parse_link('a=alliance_massmail') . '">
<tr>
<td colspan="2" width="350">' . constant($game->sprache("TEXT4")) . '</td>
</tr>
<tr height="10"><td></td></tr>
<tr>
<td width="50">' . constant($game->sprache("TEXT5")) . '</td>
<td width="300"><input class="field" type="text" name="mail_subject" maxlength="32" style="width: 280px;"></td>
</tr>
<tr height="5"><td></td></tr>
<tr>
<td width="50">' . constant($game->sprache("TEXT6")) . '</td>
<td width="300"><textarea name="mail_text" cols="45" rows="8" style="width: 280px;"></textarea>
</tr>
<tr>
<td width="50">' . constant($game->sprache("TEXT7")) . '</td>
示例14: message
// Check if the last system shouldn't be filled
if ($planets_to_go == 0) {
break;
}
}
}
$sql = 'UPDATE user
SET user_planets = ' . $n_planets . '
WHERE user_id = ' . $user_id;
if (!$db->query($sql)) {
message(DATABASE_ERROR, 'Could not update user data!');
}
//
} else {
$game->out('
<form method="post" action="' . parse_link('a=tools/players/encourage_user') . '">
<table border="0" cellpadding="2" cellspacing="2" class="style_outer">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="2" class="style_inner">
<tr>
<td>User ID:</td>
<td><input class="field" type="text" name="user_id" value=""></td>
</tr>
<tr>
<td colspan=2" align="center"><input class="button" type="submit" name="submit" value="Submit"><td>
</tr>
</table>
</td>
</tr>
</table>
示例15: parse_link
</script>
<table class="style_outer" align="center" border="0" cellpadding="2" cellspacing="2" width="450"><tr><td>
<table class="style_inner" align="center" border="0" cellpadding="2" cellspacing="2" width="450">
<form name="send_form" method="post" action="' . parse_link('a=ship_send') . '">
<input type="hidden" name="dest" value="' . encode_planet_id($dest) . '">
');
$fleet_option_html = '';
for ($i = 0; $i < $n_fleets; ++$i) {
$fleet_option_html .= '<option>' . $fleets[$i]['fleet_name'] . ' (' . $fleets[$i]['n_ships'] . ')</option>';
$game->out('<input type="hidden" name="fleets[]" value="' . $fleets[$i]['fleet_id'] . '">');
}
$game->out('
<tr>
<td>
' . constant($game->sprache("TEXT28")) . ' <a href="' . parse_link('a=tactical_cartography&planet_id=' . encode_planet_id($start)) . '"><b>' . $start_planet['planet_name'] . '</b></a> (' . $game->get_sector_name($start_planet['sector_id']) . ':' . $game->get_system_cname($start_planet['system_x'], $start_planet['system_y']) . ':' . ($start_planet['planet_distance_id'] + 1) . ')' . ($start_planet['user_id'] != $game->player['user_id'] ? ' ' . constant($game->sprache("TEXT26")) . ' <a href="' . parse_link('a=stats&a2=viewplayer&id=' . $start_planet['user_id']) . '"><b>' . $start_planet['user_name'] . '</b></a>' : '') . '<br>
');
if ($free_planet) {
$game->out(constant($game->sprache("TEXT29")) . ' <i>' . constant($game->sprache("TEXT51")) . '</i> (' . $game->get_sector_name($dest_planet['sector_id']) . ':' . $game->get_system_cname($dest_planet['system_x'], $dest_planet['system_y']) . ':' . ($dest_planet['planet_distance_id'] + 1) . ')<br><br>');
} else {
$game->out(constant($game->sprache("TEXT29")) . $dest_str . '<br><br>');
}
$game->out('
' . constant($game->sprache("TEXT30")) . ' <select style="width: 200px;">' . $fleet_option_html . '</select><br><br>
' . constant($game->sprache("TEXT52")) . ' <b>' . $max_speed_str . '</b><br>
' . constant($game->sprache("TEXT53")) . ' ' . $min_stardate . '</b><br><br>
' . constant($game->sprache("TEXT31")) . ' <input class="field" style="width: 45px;" type="text" name="higher_arrival_stardate" value="' . $min_stardate_split[0] . '" maxlength="5" onBlur="return update_times();"> . <input class="field" style="width: 15px;" type="text" name="lower_arrival_stardate" value="' . $min_stardate_split[1] . '" maxlength="1" onBlur="return update_times();"> <input class="button" style="width: 20px;" type="button" value="+" onClick="return increment_arrival();""> <input class="button" style="width: 20px;" type="button" value="-" onClick="return decrement_arrival();"><br><br>
' . constant($game->sprache("TEXT54")) . ' <input class="field" style="width: 25px;" type="text" name="arrival_days" value="" disabled="disabled"> <i>' . constant($game->sprache("TEXT55")) . '</i> <input class="field" style="width: 25px;" name="arrival_hours" value="" disabled="disabled"> <i>' . constant($game->sprache("TEXT56")) . '</i> <input class="field" style="width: 25px;" name="arrival_minutes" value="" disabled="disabled"> <i>' . constant($game->sprache("TEXT57")) . ' +</i> <i id="timer2" title="time1_' . $NEXT_TICK . '_type1_4"> </i><br><br>
<table width="440" align="center" border="0" cellpadding="0" cellspacing="0"><tr><td width="220">
');