當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Website::getGroupName方法代碼示例

本文整理匯總了PHP中Website::getGroupName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Website::getGroupName方法的具體用法?PHP Website::getGroupName怎麽用?PHP Website::getGroupName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Website的用法示例。


在下文中一共展示了Website::getGroupName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: IN

<img id="ContentBoxHeadline" class="Title" src="layouts/tibiacom/images/header/headline-team.gif" alt="Contentbox headline">
<?php 
if (!defined('INITIALIZED')) {
    exit;
}
$list = $SQL->query('SELECT ' . $SQL->fieldName('name') . ', ' . $SQL->fieldName('id') . ', ' . $SQL->fieldName('group_id') . ' FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' IN (' . implode(',', $config['site']['groups_support']) . ') ORDER BY ' . $SQL->fieldName('group_id') . ' DESC');
$main_content .= "<table border=0 cellpadding=4 cellspacing=1 width=100%>\n\n<tr><td class=\"white\" align=\"center\" bgcolor=\"#505050\"><b>Contact Information</b></td></tr>\n\n<tr><td bgcolor=\"#D4C0A1\"><table border=\"0\" cellpadding=\"8\">\n<tr><td>Support Skype:</td><td><a>onjogos</a></td></tr>\n<tr><td>Support Email:</td><td><a>mitsuig@xtibia.com</a></td></tr>\n</td></tr></table></td></tr>";
$main_content .= "<br>";
$main_content .= "<table border=0 cellpadding=4 cellspacing=1 width=100%>\n\n<tr><td class=\"white\" align=\"center\" bgcolor=\"#505050\"><b>Disclaimer</b></td></tr>\n\n<tr><td bgcolor=\"#D4C0A1\"><table border=\"0\" cellpadding=\"8\"><tr><td>\nCipSoft GmbH disclaims all warranties for the up-to-dateness, correctness,\ncompleteness or quality of the information presented on this website.\nCipSoft GmbH is not liable for any lost profits or special, incidental\nor consequential damages arising out of the use or not-use of the presented\ninformation. CipSoft GmbH reserves the right to supplement, change or\ndelete parts of the website or the whole website, or even to close the\nservice temporarily or finally.\n</td></tr><tr><td>\nThe following of our websites contain links to other pages on the internet:\ntibia.com, tibia.net, tibia.org as well as all connected\nsubdomains. We would like to expressly emphasise the fact that CipSoft GmbH\nhas no influence whatsoever on the design or the content of any of the\nwebsites to which these links refer. For this reason CipSoft GmbH cannot\ntake responsibility for the up-to-dateness, correctness, completeness or\ngeneral quality of the information supplied by these websites. Also,\nCipsoft GmbH expressly disassociates itself from any content presented on\nsaid websites. This declaration applies to any link to external websites to\nbe found on one or more of CipSoft's websites, as well as to any kind of\ncontent these external websites may contain.\n\n</td></tr></table></td></tr>";
$main_content .= "<br><br>";
$main_content .= "<table border=0 cellspacing=1 cellpadding=4 width=100%>\n\t<td class=\"white\" colspan=\"3\" align=\"center\" bgcolor=\"#505050\"><b>Support Team</b></td>\n\t <tr bgcolor=\"#D4C0A1\"><td width=\"100%\"><b>Name</b></td><td><b>Group</b></td></tr>";
foreach ($list as $i => $supporter) {
    $bgcolor = $i++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
    $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>' . htmlspecialchars($supporter['name']) . '</a></td><td>' . htmlspecialchars(Website::getGroupName($supporter['group_id'])) . '</td></tr>';
}
$main_content .= "<br><br>";
$main_content .= "</table>";
開發者ID:aottibia,項目名稱:www,代碼行數:17,代碼來源:team.php

示例2: htmlspecialchars

         $skull = "<img style='border: 0;' src='./images/skulls/blackskull.gif'/>";
     }
 }
 $main_content .= '<table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor="' . $config['site']['vdarkborder'] . '"><td colspan="2" style="font-weight:bold;color:white">Character Information</td></tr>';
 $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td width="20%">Name:</td><td style="font-weight:bold;color:' . ($player->isOnline() ? 'green' : 'red') . '">' . htmlspecialchars($player->getName()) . ' ' . $skull . ' <img src="' . $config['site']['flag_images_url'] . $account->getFlag() . $config['site']['flag_images_extension'] . '" title="Country: ' . $account->getFlag() . '" alt="' . $account->getFlag() . '" />';
 if ($player->isBanned() || $account->isBanned()) {
     $main_content .= '<span style="color:red">[BANNED]</span>';
 }
 if ($player->isNamelocked()) {
     $main_content .= '<span style="color:red">[NAMELOCKED]</span>';
 }
 $main_content .= '<br /><img src="' . $config['site']['outfit_images_url'] . '?id=' . $player->getLookType() . '&addons=' . $player->getLookAddons() . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet() . '" alt="" /></td></tr>';
 if (in_array($player->getGroup(), $config['site']['groups_support'])) {
     $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
     $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Group:</td><td>' . htmlspecialchars(Website::getGroupName($player->getGroup())) . '</td></tr>';
 }
 $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Sex:</td><td>' . htmlspecialchars($player->getSex() == 0 ? 'female' : 'male') . '</td></tr>';
 $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Profession:</td><td>' . htmlspecialchars(Website::getVocationName($player->getVocation())) . '</td></tr>';
 $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Level:</td><td>' . htmlspecialchars($player->getLevel()) . '</td></tr>';
 $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>World:</td><td>' . htmlspecialchars($config['site']['worlds'][$player->getWorldID()]) . '</td></tr>';
 $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
 $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Residence:</td><td>' . htmlspecialchars($towns_list[0][$player->getTownID()]) . '</td></tr>';
 $rank_of_player = $player->getRank();
 if (!empty($rank_of_player)) {
     $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
     $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Guild Membership:</td><td>' . htmlspecialchars($rank_of_player->getName()) . ' of the <a href="?subtopic=guilds&action=show&guild=' . $rank_of_player->getGuild()->getID() . '">' . htmlspecialchars($rank_of_player->getGuild()->getName()) . '</a></td></tr>';
開發者ID:Pietia10,項目名稱:Gesior-for-OTServ,代碼行數:31,代碼來源:characters.php

示例3: IN

<?php

if (!defined('INITIALIZED')) {
    exit;
}
$list = $SQL->query('SELECT ' . $SQL->fieldName('name') . ', ' . $SQL->fieldName('online') . ', ' . $SQL->fieldName('group_id') . ', ' . $SQL->fieldName('world_id') . ' FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' IN (' . implode(',', $config['site']['groups_support']) . ') ORDER BY ' . $SQL->fieldName('group_id') . ' DESC');
$main_content .= '<center><h2>Support in game</h2></center>';
$main_content .= "<table border=0 cellspacing=1 cellpadding=4 width=100%>\n\t<tr bgcolor=\"" . $config['site']['vdarkborder'] . "\">\n\t<td width=\"20%\"><font class=white><b>Group</b></font></td>\n\t<td width=\"45%\"><font class=white><b>Name</b></font></td>\n\t<td width=\"15%\"><font class=white><b>Status</b></font></td>\n\t<td width=\"20%\"><font class=white><b>World</b></font></td>";
foreach ($list as $i => $supporter) {
    if ($supporter['online'] == 0) {
        $player_list_status = '<font color="red">Offline</font>';
    } else {
        $player_list_status = '<font color="green">Online</font>';
    }
    $bgcolor = $i++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
    $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>' . htmlspecialchars(Website::getGroupName($supporter['group_id'])) . '</td><td><a href="?subtopic=characters&name=' . urlencode($supporter['name']) . '">' . htmlspecialchars($supporter['name']) . '</a></td><td>' . $player_list_status . '</td><td>' . htmlspecialchars($config['site']['worlds'][$supporter['world_id']]) . '</td></tr>';
}
$main_content .= "</table>";
開發者ID:Pietia10,項目名稱:Gesior-for-OTServ,代碼行數:18,代碼來源:team.php


注:本文中的Website::getGroupName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。