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


PHP getPlayerName函数代码示例

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


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

示例1: foreach

          <td align="center"><strong><?echo ($sort == 4) ? "Zone <img src='images/sort_red.bmp' border='0' width='8' height='8'/>" : "<a href='index.php?editor=qglobal&sort=4" . (($filter['status'] == "on") ? $filter['url'] : "") . "'>Zone <img src='images/sort_green.bmp' border='0' width='8' height='8' title='Sort by Zone'/></a>";?></strong></td>
          <td align="center"><strong>Expires</strong></td>
          <td width="5%">&nbsp;</td>
        </tr>
<?$x=0;
foreach($qglobals as $qglobal):?>
        <tr bgcolor="#<? echo ($x % 2 == 0) ? "BBBBBB" : "AAAAAA";?>">
          <td align="center"><?php 
echo $qglobal['name'];
?>
</td>
          <td align="center"><?php 
echo $qglobal['value'];
?>
</td>
          <td align="center"><?echo ($qglobal['charid'] > 0) ? '<a href="index.php?editor=player&playerid=' . $qglobal['charid'] . '">' . getPlayerName($qglobal['charid']) . '</a>' : "ANY";?></td>
          <td align="center"><?echo ($qglobal['npcid'] > 0) ? '<a href="index.php?editor=npc&npcid=' . $qglobal['npcid'] . '">' . getNPCName($qglobal['npcid']) . '</a>' : "ANY";?></td>
          <td align="center"><?echo ($qglobal['zoneid'] > 0) ? getZoneName($qglobal['zoneid']) : "ANY";?></td>
          <td align="center"><?echo ($qglobal['expdate'] != '') ? get_real_time($qglobal['expdate']) : "NEVER";?></td>
          <td align="right"><a href="index.php?editor=qglobal&name=<?php 
echo $qglobal['name'];
?>
&charid=<?php 
echo $qglobal['charid'];
?>
&npcid=<?php 
echo $qglobal['npcid'];
?>
&zoneid=<?php 
echo $qglobal['zoneid'];
?>
开发者ID:N0ctrnl,项目名称:peqphpeditor,代码行数:31,代码来源:qglobal.tmpl.php

示例2: foreach

  <div class="table_container" style="width:250px;">
    <div class="table_header">Search Results</div>
    <div class="table_content">
<?php 
if ($search_results != '') {
    $x = 0;
    foreach ($search_results as $result) {
        extract($result);
        ?>
      <a href="index.php?editor=inv&action=1&playerid=<?php 
        echo $result['charid'];
        ?>
"><?php 
        echo getPlayerName($result['charid']);
        ?>
 - (<?php 
        echo $result['charid'];
        ?>
)</a><br/>
<?php 
        $x++;
    }
    if ($x == $list_limit) {
        echo "<br/>List limited to " . $list_limit . " results.";
    }
} else {
    ?>
      Your search produced no results!
<?php 
}
?>
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:inventory.searchresults.tmpl.php

示例3: foreach

        <div class="table_header">
          Guild Search Results
        </div>
        <div class="table_content">
          <?php 
if ($results != '') {
    ?>
            <?php 
    foreach ($results as $result) {
        extract($result);
        ?>
              <a href="index.php?editor=guild&guildid=<?php 
        echo $guild_id;
        ?>
"><?php 
        echo getPlayerName($char_id) . " (" . $char_id . ") - " . getGuildName($guild_id) . " (" . $guild_id . ")" . "</a><br />";
        ?>
            <?php 
    }
    ?>
          <?php 
}
?>
          <?php 
if ($results == '') {
    ?>
            Your search produced no results!
          <?php 
}
?>
        </div>
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:guild.searchresults.bychar.tmpl.php

示例4: questStatus

            <ul class="nav nav-pills pull-right">
                <li role="presentation" class="active"><a href="#">Hlavní stránka</a></li>
                <li role="presentation"><a href="#">Vývojáři</a></li>
                <li role="presentation"><a href="#">Kontakt</a></li>
            </ul>
        </nav>
        <h3 class="text-muted">Minecore Times</h3>
    </div>


    <h1><?php 
print $name;
?>
 <?php 
$status = questStatus($uId, $qId, $mysqli);
echo niceStatus($status) . " <small>od hráče " . getPlayerName($uId, $mysqli) . "</small>";
?>
</h1>

    <blockquote>

        <p><?php 
print $description;
?>
</p>
        <footer>Doporučené materiály: <?php 
print $materials;
?>
</footer>
    </blockquote>
    <h3>Podrobný popis questu</h3>
开发者ID:Ownercz,项目名称:Web-times.minecore.cz,代码行数:31,代码来源:admin-single.php

示例5: check_admin_authorization

             $body->set('pages', 0);
         }
     }
     break;
 case 1:
     // Edit Player Profile
     check_admin_authorization();
     $body = new Template("templates/player/player.edit.tmpl.php");
     $body->set('playerid', $playerid);
     $body->set('classes', $classes);
     $body->set('genders', $genders);
     $body->set('bodytypes', $bodytypes);
     $body->set('races', $races);
     $body->set('yesno', $yesno);
     $body->set('skilltypes', $skilltypes);
     $body->set('player_name', getPlayerName($playerid));
     $vars = player_info();
     if ($vars) {
         foreach ($vars as $key => $value) {
             $body->set($key, $value);
         }
     }
     break;
 case 2:
     // Search Players
     check_admin_authorization();
     $body = new Template("templates/player/player.searchresults.tmpl.php");
     if (isset($_POST['playerid']) && $_POST['playerid'] != "Player ID") {
         $results = search_players_by_id();
     } else {
         $results = search_players_by_name();
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:player.php

示例6: die

include '../db.php';
include '../util.php';
include '../pages/player-list-getter.php';
include '../queries.php';
if (!isset($_GET['page'])) {
    die(json_encode("POST not correct, " . var_dump($_GET)));
}
$page = $_GET['page'];
$totalPlayers = getAmountOfPlayers($mysqli, $mysql_table_prefix, 0);
$totalPages = (int) ($totalPlayers / 15) + ($totalPlayers % 15 != 0 ? 1 : 0);
if ($page > $totalPages) {
    $page = $totalPages;
}
if (!is_numeric($page)) {
    die(json_encode("Page is not a number (???)"));
}
$players = getPlayerList($mysqli, $mysql_table_prefix, $player_list_sort_by, $player_list_sort_order, $page);
if (!$players || empty($players)) {
    die(json_encode("Query failed, or no players are found"));
}
$arr = array();
array_push($arr, $totalPages);
while ($player = $players->fetch_array()) {
    $newPlayer = array();
    $newPlayer['player_id'] = $player['player_id'];
    $newPlayer['name'] = getPlayerName($mysqli, $mysql_table_prefix, $player['player_id']);
    $newPlayer['lastjoin'] = $player['lastjoin'];
    $newPlayer['lastleave'] = $player['lastleave'];
    array_push($arr, $newPlayer);
}
echo json_encode($arr);
开发者ID:madtomic,项目名称:Fluid-MC-Stats,代码行数:31,代码来源:player-list.php

示例7: handleTimeOut

function handleTimeOut($playerId)
{
    $gameName = getGameName($gameId);
    $playerEmail = getPlayerName($playerId);
    sendTimeOut($playerEmail, $gameName);
}
开发者ID:jtamayo,项目名称:StanfordAssassins,代码行数:6,代码来源:handler.php

示例8: file_put_contents

        //Save stat data
        file_put_contents("{$statDataDir}/" . $id, serialize($stat['ranking']));
    }
}
//Save player stats
foreach ($playerStats as $id => $pstat) {
    echo "Saving data for {$id} ...\n";
    file_put_contents("{$playerDataDir}/" . $id, serialize($pstat));
}
//Save awards
echo "Saving awards ...\n";
file_put_contents($awardsFile, serialize($awards));
//Create award output
if ($awardOutputFile) {
    echo "Generating award output ...\n";
    $f = fopen($awardOutputFile, 'w');
    foreach ($stats as $id => $stat) {
        if (array_key_exists($id, $awards)) {
            $award = $awards[$id];
            fwrite($f, str_replace('%A%', $stat['award'], str_replace('%D%', $stat['desc'], str_replace('%W%', getPlayerName($award['id']), str_replace('%S%', getStatDisplayValue($stat, $award['score']), $awardOutputFormat)))));
        }
    }
    fclose($f);
}
//Sort and save Hall of Fame
echo "Saving hall of fame\n";
uasort($hof, 'compareRankingEntries');
file_put_contents($hofFile, serialize($hof));
//Save last update
echo "Saving last update time ...\n";
file_put_contents($lastUpdateFile, serialize(time()));
开发者ID:zmdoyouknow,项目名称:MinecraftStats,代码行数:31,代码来源:update.php

示例9: foreach

             foreach ($page_stats as $key => $value) {
                 $body->set($key, $value);
             }
         } else {
             $body->set('page', 0);
             $body->set('pages', 0);
         }
     }
     break;
 case 1:
     // Edit Account Details
     check_admin_authorization();
     $body = new Template("templates/account/account.edit.tmpl.php");
     $body->set('acctid', $acctid);
     $body->set('yesno', $yesno);
     $body->set('acctname', getPlayerName($acctid));
     $vars = account_info();
     if ($vars) {
         foreach ($vars as $key => $value) {
             $body->set($key, $value);
         }
     }
     break;
 case 2:
     // Search Accounts
     check_admin_authorization();
     $body = new Template("templates/account/account.searchresults.tmpl.php");
     if (isset($_POST['lsaccount_id']) && $_POST['lsaccount_id'] != "LS Acct ID") {
         $results = search_accounts_by_id();
     } else {
         $results = search_accounts_by_name();
开发者ID:N0ctrnl,项目名称:peqphpeditor,代码行数:31,代码来源:account.php

示例10: foreach

      <tr>
        <td align="center" width="35%"><strong>Character</strong></td>
        <td align="center" width="35%"><strong>Currency</strong></td>
        <td align="center" width="20%"><strong>Amount</strong></td>
        <td width="10%">&nbsp;</td>
      </tr>
<?php 
    $x = 0;
    foreach ($altcur_characters as $character) {
        ?>
      <tr bgcolor="#<?php 
        echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA";
        ?>
">
        <td align="center" width="35%"><?php 
        echo getPlayerName($character['char_id']);
        ?>
 (<?php 
        echo $character['char_id'];
        ?>
)</td>
        <td align="center" width="35%"><?php 
        echo get_currency_name($character['currency_id']);
        ?>
 (<?php 
        echo $character['currency_id'];
        ?>
)</td>
        <td align="center" width="20%"><?php 
        echo $character['amount'];
        ?>
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:altcur.characters.tmpl.php

示例11: getPlayerName

 * Copyright (c) 1998-2008 John Morrison.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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.
 */
?>

<?php 
$name = getPlayerName($mc->getPid());
?>
<table border="0" width=100%>
<tr><td><div class="subheading"><b>Navigation</b></div></td></tr><tr>
<td>
<div class="bodytext">
<?php 
if ($mc->getId() != '') {
    include "{$BASE_FILES}/inc_mapcollection_location.php";
} else {
    echo "Welcome to WinBolo.net players map collections. You can navigate the map collection by clicking on the folders section below. To move back up a folder click on the folder name in the navigation section or click the back button on your web browser.<P>To download a map simply click on the map picture or click on the map name. To bring up more information click on the word info next to the map. If you are logged in you can write reviews of maps.<P>To create a map collection login and goto your profile. At the bottom of the page you will find a create map collection button. Press it to create a collection. After creating a collection you will be able to browse the map collection and add maps and folders into your own map collection. Please only upload maps that you have created or modified, this will save on resources. <P>For more information about features to come as well as feedback please see the forums";
    echo "<P>";
    echo "It is now possible to <a href='mapcollectionsearch.php'>Search the map collection</a>.";
    echo "<P><P>";
}
echo "Path: ";
开发者ID:andrewroth,项目名称:winbolo,代码行数:31,代码来源:inc_mapcollection_navigation.php

示例12: printf

             if ($attr_count > 2) {
                 printf("<td>%s</td>", $row['attr_3']);
                 if ($attr_count > 3) {
                     printf("<td>%s</td>", $row['attr_4']);
                     if ($attr_count > 4) {
                         printf("<td>%s</td>", $row['attr_5']);
                     }
                 }
             }
         }
         printf("</tr>");
     }
 } else {
     while (($row = $result->fetch_array()) != null) {
         printf("<tr>");
         $player_name = sprintf("<a style=\"color: %s; \" target=\"_blank\" href=\"%s%s\"><strong>%s</strong></a>", getPlayerColor($row['character_guid']), $armory_url, getPlayerName($row['character_guid']), getPlayerName($row['character_guid']));
         printf("<td>%s</td>", $player_name);
         printf("<td style=\"min-width: 49px; padding-left: 0; padding-right: 0;\"><img src=\"img/class/%d.gif\"> <img src=\"img/race/%d-%d.gif\"></td>", getPlayerClass($row['character_guid']), getPlayerRace($row['character_guid']), getPlayerGender($row['character_guid']));
         printf("<td>%s</td>", $row['score_killing_blows']);
         printf("<td>%s</td>", $row['score_deaths']);
         printf("<td>%s</td>", $row['score_honorable_kills']);
         printf("<td>%s</td>", $row['score_bonus_honor']);
         printf("<td>%s</td>", $row['score_damage_done']);
         printf("<td>%s</td>", $row['score_healing_done']);
         printf("<td>%s</td>", $row['attr_1']);
         if ($attr_count > 1) {
             printf("<td>%s</td>", $row['attr_2']);
             if ($attr_count > 2) {
                 printf("<td>%s</td>", $row['attr_3']);
                 if ($attr_count > 3) {
                     printf("<td>%s</td>", $row['attr_4']);
开发者ID:illusion-rebirth,项目名称:PvPstats,代码行数:31,代码来源:battleground.php

示例13: getPlayerName

      <table class="edit_form" width="300px">
        <tr>
          <td class="edit_form_header">
            Inventory item located at <?php 
echo getPlayerName($inv_item['charid']);
?>
's <?php 
echo $slots[$inv_item['slotid']];
?>
          </td>
        </tr>
        <tr>
          <td class="edit_form_content">
            <form name="inventory" id="inventory" method="POST" action="index.php?editor=inv&playerid=<?php 
echo $inv_item['charid'];
?>
&slotid=<?php 
echo $inv_item['slotid'];
?>
&action=7">
              <table width="100%" cellpadding="3" cellspacing="0">
                <tr>
                  <td>
                    Player ID:<br/>
                    <input type="text" size="5" name="charid" value="<?php 
echo $inv_item['charid'];
?>
" readonly="true">
                  </td>
                  <td>
                    <a title="22-29: Main Inventory Slots">Slot ID:</a><br/>
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:inventory.edit.tmpl.php

示例14: foreach

              <td align="center" width="20%"><strong>Value</strong></td>
              <td width="10%">&nbsp;</td>
            </tr>
<?php 
    $x = 0;
    foreach ($player_factions as $player_faction) {
        ?>
            <tr bgcolor="#<?php 
        echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA";
        ?>
">
              <td align="center" width="20%"><a title="Character ID: <?php 
        echo $player_faction['char_id'];
        ?>
"><?php 
        echo getPlayerName($player_faction['char_id']);
        ?>
</a></td>
              <td align="center" width="20%"><a title="Faction: <?php 
        echo getFactionName($player_faction['faction_id']);
        ?>
"><?php 
        echo $player_faction['faction_id'];
        ?>
</a></td>
              <td align="center" width="20%"><?php 
        echo $player_faction['current_value'];
        ?>
</td>
              <td align="right"><a href="index.php?editor=faction&char_id=<?php 
        echo $player_faction['char_id'];
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:faction.players.view.tmpl.php

示例15: foreach

    foreach ($mail as $message) {
        ?>
            <tr bgcolor="#<?php 
        echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA";
        ?>
">
              <td align="center" width="10%"><?php 
        echo $message['msgid'];
        ?>
</td>
              <td align="center" width="15%"><?php 
        echo $message['from'];
        ?>
</td>
              <td align="center" width="15%"><?php 
        echo getPlayerName($message['charid']);
        ?>
</td>
              <td align="center" width="35%"><?php 
        echo $message['subject'];
        ?>
</td>
              <td align="center" width="20%"><?php 
        echo get_real_time($message['timestamp']);
        ?>
</td>
              <td align="right"><a href="index.php?editor=mail&msg_id=<?php 
        echo $message['msgid'];
        ?>
&action=1"><img src="images/mail.gif" width="13" height="13" border="0" title="View Message"></a>&nbsp;<a onClick="return confirm('Really delete message <?php 
        echo $message['msgid'];
开发者ID:Xackery,项目名称:EQEmuEOC,代码行数:31,代码来源:mail.tmpl.php


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