コード例 #1
0
ファイル: adminpanel.php プロジェクト: s3kk/Gesior
<tr bgcolor=' . $config['site']['darkborder'] . '><td width="150"><b><a href="?subtopic=adminpanel&action=npc_check_by_mappingfor&lng=en">Check NPCs</a> [EN]</b></td><td><b><small>Check items prices.</small></b></td></tr>
</table><br/>';
    }
    if (!empty($_GET['name'])) {
        $name = $_GET['name'];
        $name_new = $_GET['name_new'];
        $player = new OTS_Player();
        $player->find($name);
        if ($player->isLoaded() && $player->isNameLocked()) {
            if ($name_new == $player->getOldName()) {
                if ($action == 'accept') {
                    $main_content .= '<font color="green">Changed name from <b>' . $player->getName() . '</b> to <b>' . $player->getOldName() . '</b>.</font>';
                    $player->setCustomField('old_name', $player->getName());
                    $player->setCustomField('name', $player->getOldName());
                    $player->setCustomField('nick_verify', 1);
                    $player->removeNameLock();
                } elseif ($action == 'reject') {
                    $main_content .= '<font color="green">Rejected proposition of change name from <b>' . $player->getName() . '</b> to <b>' . $player->getOldName() . '</b>.</font>';
                    $player->setCustomField('old_name', '');
                }
            } else {
                $main_content .= '<font color="red">Invalid new name. Try again.</font><br>';
            }
        } else {
            $main_content .= '<font color="red">Player with this name doesn\'t exist or isn\'t namelocked.</font><br>';
        }
    }
    $main_content .= '<table border="0" CELLPADDING=4 CELLSPACING=1 style="border: 1px solid black;margin: 0 auto;width: 80%;">
<TR BGCOLOR="' . $config['site']['vdarkborder'] . '" style="color: white;"><td colspan=\'2\' class=\'white\'><center><b>First 50 namelocked players</b></center></td></tr>';
    $main_content .= '<tr bgcolor="' . $config['site']['darkborder'] . '"><td width="50%"><b>Nick proposition</b></td><td><b>Decision</b></td></tr>';
    $number_of_rows = 1;