本文整理汇总了PHP中method函数的典型用法代码示例。如果您正苦于以下问题:PHP method函数的具体用法?PHP method怎么用?PHP method使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了method函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AllyPage_Already
function AllyPage_Already($app_id)
{
global $session;
$app = LoadApplication($app_id);
$ally = LoadAlly($app['ally_id']);
if (method() === "POST") {
if (key_exists('bcancel', $_POST)) {
RemoveApplication($app['app_id']);
}
}
?>
<table width=519>
<form action="index.php?page=allianzen&session=<?php
echo $session;
?>
" method=POST>
<tr><td class=c colspan=2>Ваше заявление</td></tr>
<tr><th colspan=2><?php
echo va("Вы уже подали заявку в альянс [#1]. Подождите ответа либо отзовите своё заявление.", $ally['tag']);
?>
</th></tr>
<tr><th colspan=2><input type=submit name="bcancel" value="Отозвать заявление"></th></tr>
</table></form><br><br><br><br>
<?php
}
示例2: Admin_Debug
function Admin_Debug()
{
global $session;
global $db_prefix;
global $GlobalUser;
if (method() === "POST") {
$query = "SELECT * FROM " . $db_prefix . "debug ORDER BY date DESC, error_id DESC LIMIT 50";
$result = dbquery($query);
$rows = dbrows($result);
while ($rows--) {
$msg = dbarray($result);
if ($_POST["delmes" . $msg['error_id']] === "on" || $_POST['deletemessages'] === "deleteall") {
$query = "DELETE FROM " . $db_prefix . "debug WHERE error_id = " . $msg['error_id'];
dbquery($query);
}
}
}
$query = "SELECT * FROM " . $db_prefix . "debug ORDER BY date DESC, error_id DESC LIMIT 50";
$result = dbquery($query);
?>
<?php
echo AdminPanel();
?>
<table class='header'><tr class='header'><td><table width="519">
<form action="index.php?page=admin&session=<?php
echo $session;
?>
&mode=Debug" method="POST">
<tr><td colspan="4" class="c">Сообщения</td></tr>
<tr><th>Действие</th><th>Дата</th><th>От</th><th>Браузер</th></tr>
<?php
$rows = dbrows($result);
while ($rows--) {
$msg = dbarray($result);
$user = LoadUser($msg['owner_id']);
$from = "<a href=\"index.php?page=admin&session={$session}&mode=Users&player_id=" . $msg['owner_id'] . "\">" . $user['oname'] . "</a> [" . $msg['ip'] . "]";
$msg['text'] = str_replace("{PUBLIC_SESSION}", $session, $msg['text']);
echo "<tr><th><input type=\"checkbox\" name=\"delmes" . $msg['error_id'] . "\"/></th><th>" . date("m-d H:i:s", $msg['date']) . "</th><th>{$from} </th><th>" . $msg['agent'] . " </th></tr>\n";
echo "<tr><td class=\"b\"> </td><td class=\"b\" colspan=\"3\">" . $msg['text'] . "</td></tr>\n";
}
?>
<tr><td class="b"> </td><td class="b" colspan="3"></td></tr>
<tr><th colspan="4" style='padding:0px 105px;'></th></tr>
<tr><th colspan="4">
<select name="deletemessages">
<option value="deletemarked">Удалить выделенные сообщения</option>
<option value="deleteall">Удалить все сообщения</option>
</select><input type="submit" value="ok" /></th></tr>
<tr><td colspan="4"><center> </center></td></tr>
</form>
</table>
<?php
}
示例3: debug
function debug()
{
print "<strong>query string:</strong> {$_SERVER['QUERY_STRING']}\n\n";
print "<strong>module:</strong> " . implode("-", module()) . "\n";
print "<strong>function:</strong> " . func() . "\n";
print "<strong>method:</strong> " . method() . "\n\n";
print "<strong>include:</strong> /module/" . implode("/", module()) . "/main.php\n\n";
print "<strong>run:</strong> " . command() . "\n\n";
}
示例4: get
public function get()
{
$allow = array('view');
// TODO plan!
// here i'm trying to detect which method('GET', 'x') isset, from there, act upon it
foreach ($allow as $key) {
if (method('GET', $key) instanceof SecureData) {
switch ($key) {
case 'view':
echo '<p>viewing blog entry ' . method('GET', $key)->toInteger() . '</p>';
break;
}
}
}
}
示例5: Admin_Reports
function Admin_Reports()
{
global $session;
global $db_prefix;
global $GlobalUser;
// Обработка POST-запроса.
if (method() === "POST") {
}
?>
<?php
echo AdminPanel();
?>
TODO
<?php
}
示例6: boot
public function boot()
{
//$this->request = singleton('HTTPRequest');
//$this->db = singleton('DB');
try {
if (($this->section = method('GET', 'plugin')) === false) {
$this->section = new SecureData('home');
}
} catch (Exception $e) {
$this->section = new SecureData('home');
}
//var_dump($this->section);
require_once DIR_PLUGIN . DS . $this->section->toXHTML() . DS . $this->section->toXHTML() . '.php';
//echo '<p>' . $this->section->toXHTML() . '</p>';
// what was i doing here?
//singleton($this->section->toXHTML())->get();
//singleton($this->section->toXHTML())->post();
}
示例7: Admin_Expedition
function Admin_Expedition()
{
global $session;
global $db_prefix;
global $GlobalUser;
// Обработка POST-запроса.
if (method() === "POST") {
}
?>
<?php
echo AdminPanel();
?>
TODO: Планируется переработка параметров экспедиции.<br><br>
<?php
$exptab = LoadExpeditionSettings();
print_r($exptab);
}
示例8: Admin_Bans
function Admin_Bans()
{
global $session;
global $db_prefix;
global $GlobalUser;
// Обработка POST-запроса.
if (method() === "POST" && $GlobalUser['admin'] >= 1) {
if ($_GET['action'] === 'search') {
// Результаты поиска
switch (intval($_POST['searchby'])) {
case 0:
// Забаненных с РО
$query = "SELECT * FROM " . $db_prefix . "users WHERE banned = 1 AND vacation = 1";
break;
case 1:
// Забаненных без РО
$query = "SELECT * FROM " . $db_prefix . "users WHERE banned = 1 AND vacation = 0";
break;
case 2:
// Блокировка атак
$query = "SELECT * FROM " . $db_prefix . "users WHERE noattack = 1";
break;
case 3:
// Зарегистрированных недавно (дней)
$when = time() - intval($_POST['text']) * 24 * 60 * 60;
$query = "SELECT * FROM " . $db_prefix . "users WHERE regdate >= {$when}";
break;
case 4:
// Имя пользователя (примерное)
$query = "SELECT * FROM " . $db_prefix . "users WHERE oname LIKE '" . $_POST['text'] . "%' ";
break;
case 5:
// Тег альянса
$query = "SELECT ally_id FROM " . $db_prefix . "ally WHERE tag LIKE '%" . $_POST['text'] . "%' ";
$query = "SELECT * FROM " . $db_prefix . "users WHERE ally_id = ANY ({$query}) ";
break;
case 6:
// Одинаковый адрес email
$query = "SELECT * FROM " . $db_prefix . "users WHERE email = LIKE '%" . $_POST['text'] . "%' OR pemail = LIKE '%" . $_POST['text'] . "%' ";
break;
case 7:
// Одинаковый IP
$query = "SELECT * FROM " . $db_prefix . "users AS t1 INNER JOIN ( \r\nSELECT ip_addr,COUNT(*) FROM " . $db_prefix . "users GROUP BY ip_addr HAVING COUNT(*)>1) as t2 \r\nON t1.ip_addr = t2.ip_addr ORDER BY t1.ip_addr ASC, t1.name ASC";
break;
default:
$query = '';
}
$result = dbquery($query);
$rows0 = $rows = dbrows($result);
echo AdminPanel();
?>
<script>
function SetClearCheckbox (status)
{
var theForm = document.getElementById('banform');
for (i=0,n=theForm.elements.length;i<n;i++)
{
if (theForm.elements[i].className.indexOf('ids') !=-1) {
theForm.elements[i].checked = status;
}
}
}
</script>
<!-- Результаты поиска -->
<table>
<form id="banform" action="index.php?page=admin&session=<?php
echo $session;
?>
&mode=Bans&action=ban" method="POST" >
<tr> <td class=c> <input type="checkbox" onclick="SetClearCheckbox(this.checked);"> ID</td> <td class=c>Имя</td> <td class=c>Главная планета</td> <td class=c>Постоянный адрес</td> <td class=c>Временный адрес</td> <td class=c>IP адрес</td> <td class=c>Дата регистрации</td> </td>
<?php
if ($rows == 0) {
echo "<tr><td colspan=7>Ничего не найдено. <a href=\"index.php?page=admin&session={$session}&mode=Bans\">Назад</a></td></tr>";
}
while ($rows--) {
$user = dbarray($result);
$hp = GetPlanet($user['hplanetid']);
?>
<tr> <th><input type="checkbox" name="id[<?php
echo $user['player_id'];
?>
]" class="ids"/><?php
echo $user['player_id'];
?>
</th>
<th><a><?php
echo AdminUserName($user);
?>
</a></th>
<th><?php
echo AdminPlanetCoord($hp);
?>
<?php
echo AdminPlanetName($hp);
?>
//.........这里部分代码省略.........
示例9: floor
$cd = floor($aktplanet['d'] / $d);
} else {
$cd = 1000;
}
$v = min($cm, min($ck, $cd));
if ($value > $v) {
$value = $v;
}
AddShipyard($GlobalUser['player_id'], $aktplanet['planet_id'], intval($gid), intval($value));
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
// обновить состояние планеты.
}
}
}
// Обработка GET-запросов.
if (method() === "GET" && !$GlobalUser['vacation']) {
if ($_GET['mode'] === "Forschung") {
$result = GetResearchQueue($GlobalUser['player_id']);
$resqueue = dbarray($result);
if ($resqueue == null) {
if (key_exists('bau', $_GET)) {
StartResearch($GlobalUser['player_id'], $aktplanet['planet_id'], intval($_GET['bau']), $now);
}
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
// обновить состояние планеты.
} else {
if (key_exists('unbau', $_GET)) {
StopResearch($GlobalUser['player_id']);
}
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
// обновить состояние планеты.
示例10: method
<?php
function method($cache)
{
$prepared = clone $cache;
var_dump($prepared->data);
$prepared->data = "bad";
return $prepared;
}
$cache = new stdClass();
$cache->data = "good";
for ($i = 0; $i < 5; ++$i) {
method($cache);
}
示例11: Admin_Planets
function Admin_Planets()
{
global $loca_lang, $Languages;
global $session;
global $db_prefix;
global $GlobalUser;
$SearchResult = "";
$buildmap = array(1, 2, 3, 4, 12, 14, 15, 21, 22, 23, 24, 31, 33, 34, 41, 42, 43, 44);
$fleetmap = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215);
$defmap = array(401, 402, 403, 404, 405, 406, 407, 408, 502, 503);
// Обработка POST-запроса.
if (method() === "POST" && $GlobalUser['admin'] >= 2) {
$cp = intval($_GET['cp']);
$action = $_GET['action'];
$now = time();
//print_r ( $_POST);
if ($action === "update") {
$param = array('b1', 'b2', 'b3', 'b4', 'b12', 'b14', 'b15', 'b21', 'b22', 'b23', 'b24', 'b31', 'b33', 'b34', 'b41', 'b42', 'b43', 'b44', 'd401', 'd402', 'd403', 'd404', 'd405', 'd406', 'd407', 'd408', 'd502', 'd503', 'f202', 'f203', 'f204', 'f205', 'f206', 'f207', 'f208', 'f209', 'f210', 'f211', 'f212', 'f213', 'f214', 'f215', 'm', 'k', 'd', 'g', 's', 'p', 'diameter', 'type', 'temp', 'mprod', 'kprod', 'dprod', 'sprod', 'fprod', 'ssprod');
$moon_param = array('g', 's', 'p');
$query = "UPDATE " . $db_prefix . "planets SET lastpeek={$now}, ";
foreach ($param as $i => $p) {
if (strpos($p, "prod")) {
$query .= ", {$p}='" . $_POST[$p] . "'";
} else {
if ($i == 0) {
$query .= "{$p}=" . intval($_POST[$p]);
} else {
$query .= ", {$p}=" . intval($_POST[$p]);
}
}
}
$query .= " WHERE planet_id={$cp};";
if (key_exists("delete_planet", $_POST)) {
$planet = GetPlanet($cp);
$user = LoadUser($planet['owner_id']);
if ($user['hplanetid'] != $cp) {
DestroyPlanet($cp);
$_GET['cp'] = $user['hplanetid'];
// перенаправить на главную планету.
}
} else {
// Обновить данные планеты
$moon_id = PlanetHasMoon($cp);
// Переместить луну за планетой.
if ($moon_id) {
$mquery = "UPDATE " . $db_prefix . "planets SET lastpeek={$now}, ";
foreach ($moon_param as $i => $p) {
if ($i == 0) {
$mquery .= "{$p}=" . intval($_POST[$p]);
} else {
$mquery .= ", {$p}=" . intval($_POST[$p]);
}
}
$mquery .= " WHERE planet_id={$moon_id};";
dbquery($mquery);
}
dbquery($query);
RecalcFields($cp);
}
} else {
if ($action === "search") {
$searchtype = $_POST['type'];
if ($_POST['searchtext'] === "") {
$SearchResult .= "Укажите строку для поиска<br>\n";
$searchtype = "none";
}
if ($searchtype === "playername") {
$query = "SELECT player_id FROM " . $db_prefix . "users WHERE oname LIKE '" . $_POST['searchtext'] . "%'";
$query = "SELECT * FROM " . $db_prefix . "planets WHERE owner_id = ANY ({$query});";
} else {
if ($searchtype === "planetname") {
$query = "SELECT * FROM " . $db_prefix . "planets WHERE name LIKE '" . $_POST['searchtext'] . "%';";
} else {
if ($searchtype === "allytag") {
$query = "SELECT ally_id FROM " . $db_prefix . "ally WHERE tag LIKE '" . $_POST['searchtext'] . "%'";
$query = "SELECT player_id FROM " . $db_prefix . "users WHERE ally_id <> 0 AND ally_id = ANY ({$query})";
$query = "SELECT * FROM " . $db_prefix . "planets WHERE owner_id = ANY ({$query});";
}
}
}
if ($query) {
$result = dbquery($query);
}
$SearchResult .= "<table>\n";
$rows = dbrows($result);
if ($rows > 0) {
while ($rows--) {
$planet = dbarray($result);
$user = LoadUser($planet['owner_id']);
$SearchResult .= "<tr><th>" . date("Y-m-d H:i:s", $planet['date']) . "</th><th>" . AdminPlanetCoord($planet) . "</th>";
$SearchResult .= "<th><a href=\"index.php?page=admin&session={$session}&mode=Planets&cp=" . $planet['planet_id'] . "\">" . $planet['name'] . "</a></th>";
$SearchResult .= "<th><a href=\"index.php?page=admin&session={$session}&mode=Users&player_id=" . $user['player_id'] . "\">" . $user['oname'] . "</a></th></tr>\n";
}
} else {
$SearchResult .= "Ничего не найдено<br>\n";
}
$SearchResult .= "</table>\n";
}
}
}
//.........这里部分代码省略.........
示例12: confirm
function confirm($_POST)
{
extract($_POST);
if (isset($back)) {
unset($back);
return method($_POST);
}
require_lib("validate");
$v = new validate();
$v->isOk($all, "num", 1, 1, "Invalid allocation.");
for ($t = 0; $t < $rec_amount; $t++) {
if (!isset($descript[$t]) or !isset($reference[$t]) or !isset($setamt[$t]) or empty($descript[$t]) or empty($reference[$t]) or empty($setamt[$t])) {
continue;
}
if (!isset($out[$t]) or strlen($out[$t]) < 1) {
$out[$t] = $amt[$t];
}
if (!isset($out1[$t])) {
$out1[$t] = '';
}
if (!isset($out2[$t])) {
$out2[$t] = '';
}
if (!isset($out3[$t])) {
$out3[$t] = '';
}
if (!isset($out4[$t])) {
$out4[$t] = '';
}
if (!isset($out5[$t])) {
$out5[$t] = '';
}
$v->isOk($bankid[$t], "num", 1, 30, "Invalid Bank Account.");
$v->isOk($date[$t], "date", 1, 14, "Invalid Date.");
$v->isOk($descript[$t], "string", 0, 255, "Invalid Description.");
$v->isOk($reference[$t], "string", 0, 50, "Invalid Reference Name/Number.");
$v->isOk($cheqnum[$t], "num", 0, 30, "Invalid Cheque number.");
$v->isOk($amt[$t], "float", 1, 40, "Invalid amount.");
$v->isOk($setamt[$t], "float", 1, 40, "Invalid settlement amount.");
$v->isOk($setvat[$t], "string", 1, 10, "Invalid Settlement VAT Option.");
$v->isOk($setvatcode[$t], "string", 1, 40, "Invalid Settlement VAT code");
$v->isOk($out[$t], "float", 1, 40, "Invalid out amount.");
$v->isOk($out1[$t], "float", 0, 40, "Invalid paid amount(currant).");
$v->isOk($out2[$t], "float", 0, 40, "Invalid paid amount(30).");
$v->isOk($out3[$t], "float", 0, 40, "Invalid paid amount(60).");
$v->isOk($out4[$t], "float", 0, 40, "Invalid paid amount(90).");
$v->isOk($out5[$t], "float", 0, 40, "Invalid paid amount(120).");
$v->isOk($cusid[$t], "num", 1, 10, "Invalid customer number.");
if (isset($invids[$t])) {
foreach ($invids[$t] as $key => $value) {
if ($paidamt[$t][$key] < 0.01) {
continue;
}
$v->isOk($invids[$t][$key], "num", 1, 50, "Invalid Invoice No. [{$key}]");
$v->isOk($paidamt[$t][$key], "float", 1, 40, "Invalid amount to be paid. [{$key}]");
}
}
}
if ($v->isError()) {
$confirm = "";
$errors = $v->getErrors();
foreach ($errors as $e) {
$confirm .= "<li class='err'>" . $e["msg"] . "</li>";
}
for ($t = 0; $t < $rec_amount; $t++) {
//$temp1 = $out1[$t];
$_POST["out1[{$t}]"] = $out1[$t] + 0;
$_POST["out2[{$t}]"] = $out2[$t] + 0;
$_POST["out3[{$t}]"] = $out3[$t] + 0;
$_POST["out4[{$t}]"] = $out4[$t] + 0;
$_POST["out5[{$t}]"] = $out5[$t] + 0;
}
return $confirm . alloc($_POST);
}
$passon = "";
for ($t = 0; $t < $rec_amount; $t++) {
if (!isset($descript[$t]) or !isset($reference[$t]) or !isset($setamt[$t]) or empty($descript[$t]) or empty($reference[$t]) or empty($setamt[$t])) {
continue;
}
$tot[$t] = 0;
if (isset($invids[$t])) {
foreach ($invids[$t] as $key => $value) {
if ($paidamt[$t][$key] < 0.01) {
continue;
}
$tot[$t] += $paidamt[$t][$key];
}
}
if (isset($open_amount[$t])) {
$tot[$t] += array_sum($open_amount[$t]);
}
$passon .= "\n\t\t\t<input type='hidden' name='bankid[{$t}]' value='{$bankid[$t]}'>\n\t\t\t<input type='hidden' name='date[{$t}]' value='{$date[$t]}'>\n\t\t\t<input type='hidden' name='cusid[{$t}]' value='{$cusid[$t]}'>\n\t\t\t<input type='hidden' name='descript[{$t}]' value='{$descript[$t]}'>\n\t\t\t<input type='hidden' name='reference[{$t}]' value='{$reference[$t]}'>\n\t\t\t<input type='hidden' name='cheqnum[{$t}]' value='{$cheqnum[$t]}'>\n\t\t\t<input type='hidden' name='out[{$t}]' value='{$out[$t]}'>\n\t\t\t<input type='hidden' name='date_day[{$t}]' value='{$date_day[$t]}'>\n\t\t\t<input type='hidden' name='date_month[{$t}]' value='{$date_month[$t]}'>\n\t\t\t<input type='hidden' name='date_year[{$t}]' value='{$date_year[$t]}'>\n\t\t\t<input type='hidden' name='out1[{$t}]' value='{$out1[$t]}'>\n\t\t\t<input type='hidden' name='out2[{$t}]' value='{$out2[$t]}'>\n\t\t\t<input type='hidden' name='out3[{$t}]' value='{$out3[$t]}'>\n\t\t\t<input type='hidden' name='out4[{$t}]' value='{$out4[$t]}'>\n\t\t\t<input type='hidden' name='out5[{$t}]' value='{$out5[$t]}'>\n\t\t\t<input type='hidden' name='amt[{$t}]' value='{$amt[$t]}'>\n\t\t\t<input type='hidden' name='setamt[{$t}]' value='{$setamt[$t]}'>\n\t\t\t<input type='hidden' name='setvat[{$t}]' value='{$setvat[$t]}'>\n\t\t\t<input type='hidden' name='setvatcode[{$t}]' value='{$setvatcode[$t]}'>";
}
$confirm = "\n\t\t<h3>New Bank Receipt</h3>\n\t\t<h4>Confirm entry (Please check the details)</h4>\n\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t<input type='hidden' name='key' value='write'>\n\t\t\t<input type='hidden' name='all' value='{$all}'>\n\t\t\t<input type='hidden' name='rec_amount' value='{$rec_amount}'>\n\t\t\t{$passon}\n\t\t<table " . TMPL_tblDflts . ">";
$passon2 = "";
for ($t = 0; $t < $rec_amount; $t++) {
$out[$t] += 0;
$OUT1[$t] = $out1[$t] + 0;
$OUT2[$t] = $out2[$t] + 0;
$OUT3[$t] = $out3[$t] + 0;
//.........这里部分代码省略.........
示例13: dbquery
$query .= " WHERE id = {$id}";
dbquery($query);
}
} else {
// Добавить
// Ограничить количество.
$query = "SELECT * FROM " . $db_prefix . "template WHERE owner_id = " . $GlobalUser['player_id'];
$result = dbquery($query);
$rows = dbrows($result);
if ($rows < $MAX) {
$temp = array(null, $GlobalUser['player_id'], $name, $now, intval($_POST['ship'][202]), intval($_POST['ship'][203]), intval($_POST['ship'][204]), intval($_POST['ship'][205]), intval($_POST['ship'][206]), intval($_POST['ship'][207]), intval($_POST['ship'][208]), intval($_POST['ship'][209]), intval($_POST['ship'][210]), intval($_POST['ship'][211]), 0, intval($_POST['ship'][213]), intval($_POST['ship'][214]), intval($_POST['ship'][215]));
AddDBRow($temp, 'template');
}
}
}
if (method() === "GET" && $_GET['mode'] === "delete") {
// Удалить
$id = intval($_GET['id']);
$query = "SELECT * FROM " . $db_prefix . "template WHERE id = {$id} AND owner_id = " . $GlobalUser['player_id'] . " LIMIT 1";
$result = dbquery($query);
if (dbrows($result) > 0) {
$query = "DELETE FROM " . $db_prefix . "template WHERE id = {$id}";
dbquery($query);
}
}
?>
<!-- CONTENT AREA -->
<div id='content'>
<center>
<script type="text/javascript">
示例14: Admin_Bots
function Admin_Bots()
{
global $session;
global $db_prefix;
global $GlobalUser;
$result = "";
// Обработка POST-запроса.
if (method() === "POST") {
if (AddBot($_POST['name'])) {
$result = "<font color=lime>Бот успешно добавлен.</font>";
} else {
$result = "<font color=red>Игрок с таким именем уже существует.</font>";
}
}
// Обработка GET-запроса.
if (method() === "GET") {
StopBot(intval($_GET['id']));
$result = "<font color=lime>Бот остановлен.</font>";
}
?>
<?php
echo AdminPanel();
?>
<center><?php
echo $result;
?>
</center>
<h2>Список ботов:</h2>
<?php
$query = "SELECT * FROM " . $db_prefix . "queue WHERE type = 'AI' GROUP BY owner_id";
$result = dbquery($query);
$rowss = $rows = dbrows($result);
if ($rows == 0) {
echo "Ботов не обнаружено<br>";
} else {
echo "<table>\n";
echo "<tr><td class=c>ID</td><td class=c>Имя</td><td class=c>Главная планета</td><td class=c>Действие</td></tr>\n";
}
while ($rows--) {
$queue = dbarray($result);
$user = LoadUser($queue['owner_id']);
$planet = GetPlanet($user['hplanetid']);
echo "<tr>";
echo "<td>" . $user['player_id'] . "</td>";
echo "<td>" . AdminUserName($user) . "</td>";
echo "<td>" . AdminPlanetName($planet) . " " . AdminPlanetCoord($planet) . "</td>";
echo "<td><a href=\"index.php?page=admin&session={$session}&mode=Bots&action=stop&id=" . $user['player_id'] . "\">Остановить</a></td>";
echo "</tr>\n";
}
if ($rowss) {
echo "</table>";
}
?>
<h2>Добавить бота:</h2>
<form action="index.php?page=admin&session=<?php
echo $session;
?>
&mode=Bots" method="POST">
<table>
<tr><td>Имя <input type=text size=10 name="name" /> <input type=submit value="Отправить" /></td></tr>
</table>
</form>
<?php
}
示例15: command
function command()
{
return func() . "_" . method();
}