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


PHP nicenum函数代码示例

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


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

示例1: rgnum

function rgnum($num)
{
    if ($num < 0) {
        return "<font color=\"#FF0000\">" . nicenum($num) . "</font>";
    } else {
        if ($num > 0) {
            return "<font color=\"#00FF00\">" . nicenum($num) . "</font>";
        } else {
            return nicenum($num);
        }
    }
}
开发者ID:Ansty93,项目名称:ogame-opensource,代码行数:12,代码来源:infos.php

示例2: FlightDistance

}
// Рассчитать расстояние, время полёта и затраты дейтерия.
$dist = FlightDistance($aktplanet['g'], $aktplanet['s'], $aktplanet['p'], $galaxy, $system, $planet);
$slowest_speed = FlightSpeed($fleet, $GlobalUser['r115'], $GlobalUser['r117'], $GlobalUser['r118']);
$flighttime = FlightTime($dist, $slowest_speed, $speed, $unispeed);
$arr = FlightCons($fleet, $dist, $flighttime, $GlobalUser['r115'], $GlobalUser['r117'], $GlobalUser['r118'], $unispeed);
$cons = $arr['fleet'] + $arr['probes'];
if ($aktplanet['d'] < $cons) {
    AjaxSendError(613);
}
// не хватает дейта на полёт
if ($cargo < $cons) {
    AjaxSendError(615);
}
// нет места в грузовом отсеке для дейтерия
// Fleet lock
$fleetlock = "temp/fleetlock_" . $aktplanet['planet_id'];
if (file_exists($fleetlock)) {
    AjaxSendError();
}
$f = fopen($fleetlock, 'w');
fclose($f);
// Отправить флот.
$fleet_id = DispatchFleet($fleet, $aktplanet, $target, $order, $flighttime, 0, 0, 0, $cons, time(), 0);
UserLog($aktplanet['owner_id'], "FLEET", "Отправка флота {$fleet_id} (AJAX): " . GetMissionNameDebug($order) . " " . $aktplanet['name'] . " [" . $aktplanet['g'] . ":" . $aktplanet['s'] . ":" . $aktplanet['p'] . "] -&gt; " . $target['name'] . " [" . $target['g'] . ":" . $target['s'] . ":" . $target['p'] . "]<br>" . DumpFleet($fleet) . "<br>" . "Время полёта: " . BuildDurationFormat($flighttime) . ", затраты дейтерия: " . nicenum($cons));
// Поднять флот с планеты.
AdjustResources(0, 0, $cons, $aktplanet['planet_id'], '-');
AdjustShips($fleet, $aktplanet['planet_id'], '-');
UpdatePlanetActivity($aktplanet['planet_id']);
unlink($fleetlock);
AjaxSendDone($nowfleet + 1, $probes, $recyclers, $missiles);
开发者ID:Ansty93,项目名称:ogame-opensource,代码行数:31,代码来源:flottenversand_ajax.php

示例3: nicenum

    ?>
<tr>
<td class="c" colspan="8">
<?php 
    if ($aktplanet["f210"] > 0) {
        echo "<span id=\"probes\">" . nicenum($aktplanet["f210"]) . "</span> Шпионские зонды &nbsp;&nbsp;&nbsp;&nbsp;";
    }
    if ($aktplanet["f209"] > 0) {
        echo "<span id=\"recyclers\">" . nicenum($aktplanet["f209"]) . "</span> Переработчик  &nbsp;&nbsp;&nbsp;&nbsp;";
    }
    if ($aktplanet["d503"] > 0) {
        echo "<span id=\"missiles\">" . nicenum($aktplanet["d503"]) . "</span> Межпланетные ракеты  &nbsp;&nbsp;&nbsp;&nbsp;";
    }
    ?>
Дейтерий:  <?php 
    echo nicenum($aktplanet["d"]);
    ?>
&nbsp;&nbsp;&nbsp;&nbsp;<br/><span id='slots'><?php 
    echo $nowfleet;
    ?>
</span>&nbsp;из <?php 
    echo $maxfleet;
    ?>
 слотов находятся в эксплуатации</td>
</tr>
<tr style="display: none;" id="fleetstatusrow"><th colspan="8"><!--<div id="fleetstatus"></div>-->
<table style="font-weight: bold;" width=100% id="fleetstatustable">
<!-- will be filled with content later on while processing ajax replys -->
</table>
</th>
</tr>
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:31,代码来源:galaxy.php

示例4: Admin_Users


//.........这里部分代码省略.........
        echo IsSelected($user, "sortorder", 0);
        ?>
>по возрастанию</option>
     <option value="1" <?php 
        echo IsSelected($user, "sortorder", 1);
        ?>
>по убыванию</option>
   </select>
</th></tr>
            <tr><th>Скин</th><th><input type=text name="dpath" maxlength="80" size="40" value="<?php 
        echo $user['skin'];
        ?>
" /></th></tr>
            <tr><th>Использовать скин</th><th><input type="checkbox" name="design" <?php 
        echo IsChecked($user, "useskin");
        ?>
 /></th></tr>
            <tr><th>Декативировать проверку IP</th><th><input type="checkbox" name="deact_ip" <?php 
        echo IsChecked($user, "deact_ip");
        ?>
 /></th></tr>
            <tr><th>Количество зондов</th><th><input type="text" name="spio_anz" maxlength="2" size="2" value="<?php 
        echo $user['maxspy'];
        ?>
" /></th></tr>
            <tr><th>Количество сообщений флота</th><th><input type="text" name="settings_fleetactions" maxlength="2" size="2" value="<?php 
        echo $user['maxfleetmsg'];
        ?>
" /></th></tr>

            <tr><th colspan=2>&nbsp</th></tr>
            <tr><td class=c colspan=2>Статистика</td></tr>
            <tr><th>Очки (старые)</th><th><?php 
        echo nicenum($user['oldscore1'] / 1000);
        ?>
 / <?php 
        echo nicenum($user['oldplace1']);
        ?>
</th></tr>
            <tr><th>Флот (старые)</th><th><?php 
        echo nicenum($user['oldscore2']);
        ?>
 / <?php 
        echo nicenum($user['oldplace2']);
        ?>
</th></tr>
            <tr><th>Исследования (старые)</th><th><?php 
        echo nicenum($user['oldscore3']);
        ?>
 / <?php 
        echo nicenum($user['oldplace3']);
        ?>
</th></tr>
            <tr><th>Очки</th><th><?php 
        echo nicenum($user['score1'] / 1000);
        ?>
 / <?php 
        echo nicenum($user['place1']);
        ?>
</th></tr>
            <tr><th>Флот</th><th><?php 
        echo nicenum($user['score2']);
        ?>
 / <?php 
        echo nicenum($user['place2']);
        ?>
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:67,代码来源:admin_users.php

示例5: nicenum

echo nicenum($GlobalUser['dm']);
?>
&lt;/span&gt;&lt;br/&gt;Найденная: &lt;span class=''&gt;<?php 
echo nicenum($GlobalUser['dmfree']);
?>
&lt;/span&gt;">
				<a href="index.php?page=premium&session=<?php 
echo $session;
?>
&openDetail=1">
					<img src="red_images/layout/ressourcen_DM.gif" />
				</a>
                <span class="value">
                	<span id="resources_darkmatter">
						<?php 
echo nicenum($GlobalUser['dm'] + $GlobalUser['dmfree']);
?>
					</span>
                </span>
            </li>
      </ul>
      	<div id="officers">
      				<a href="index.php?page=premium&session=<?php 
echo $session;
?>
&openDetail=2" class="tipsTitle on  pic1" title="Нанять Командира|Активен ещё 62 дней.">
            	<img src="red_images/3e567d6f16d040326c7a0ea29a4f41.gif" width="30" height="30"/>
            </a>
      				<a href="index.php?page=premium&session=<?php 
echo $session;
?>
开发者ID:Ansty93,项目名称:ogame-opensource,代码行数:31,代码来源:red_header_old.php

示例6: nicenum

<?php 
if ($ShowActivateDlg) {
    ?>

<form action="" method="POST" accept-charset="text/plain; charset=utf-8">
<input type="hidden" name="action" value="activate">
<input type="hidden" name="couponcode" value="<?php 
    echo $coupon['code'];
    ?>
">
<table class="ordertable">
<tbody>
<tr><td class="c" colspan="2">
<big>
Тёмная материя <?php 
    echo nicenum($coupon['amount']);
    ?>
 !
</big>
</td></tr>
<tr><td colspan="2"><center><input type="submit" value="Зачислить!"></center></td></tr>
</tbody></table>
</form>

<?php 
} else {
    ?>

<form action="" method="POST" accept-charset="text/plain; charset=utf-8">
<input type="hidden" name="action" value="check">
<table class="ordertable">
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:31,代码来源:payment.php

示例7: uploadFile

function uploadFile($tmpfile, $source, $sourcedata)
{
    // upload file from multiple sources
    global $uperrs;
    $povedlo = false;
    echo "<b>Adding file {$tmpfile}:</b><br>";
    if (!file_exists($tmpfile)) {
        switch ($source) {
            case "paste":
                echo "Creating file from text field...";
                if (file_put_contents($tmpfile, $sourcedata)) {
                    echo "OK";
                    $povedlo = true;
                } else {
                    echo "ERROR!";
                }
                break;
            case "upload":
                $hashfile = $sourcedata;
                $hashchyba = $hashfile["error"];
                if ($hashchyba == 0) {
                    echo "Moving uploaded file...";
                    if (move_uploaded_file($hashfile["tmp_name"], $tmpfile) && file_exists($tmpfile)) {
                        echo "OK";
                        $povedlo = true;
                    } else {
                        echo "ERROR";
                    }
                } else {
                    echo "Upload file error: " . $uperrs[$hashchyba];
                }
                break;
            case "import":
                echo "Loading imported file...";
                if (file_exists("import/" . $sourcedata)) {
                    rename("import/" . $sourcedata, $tmpfile);
                    if (file_exists($tmpfile)) {
                        echo "OK";
                        $povedlo = true;
                    } else {
                        echo "DST ERROR";
                    }
                } else {
                    echo "SRC ERROR";
                }
                break;
            case "url":
                $local = basename($sourcedata);
                echo "Downloading remote file <a href=\"{$sourcedata}\" target=\"_blank\">{$local}</a>...";
                $furl = fopen($sourcedata, "rb");
                if (!$furl) {
                    echo "SRC ERROR";
                } else {
                    $floc = fopen($tmpfile, "w");
                    if (!$floc) {
                        echo "DST ERROR";
                    } else {
                        $downed = 0;
                        $bufsize = 131072;
                        $cas_pinfo = time();
                        while (!feof($furl)) {
                            if (!($data = fread($furl, $bufsize))) {
                                echo "READ ERROR";
                                break;
                            }
                            fwrite($floc, $data);
                            $downed += strlen($data);
                            if ($cas_pinfo < time() - 10) {
                                echo nicenum($downed, 1024) . "B...\n";
                                $cas_pinfo = time();
                                flush();
                            }
                        }
                        fclose($floc);
                        echo "OK (" . nicenum($downed, 1024) . "B)";
                        $povedlo = true;
                    }
                    fclose($furl);
                }
                break;
            default:
                echo "Wrong file source.";
        }
    } else {
        echo "File already exists.";
    }
    echo "<br>";
    return $povedlo;
}
开发者ID:ryfon,项目名称:hashtopus,代码行数:89,代码来源:admin.php

示例8: FleetMissionText

    <th>
<?php 
        echo FleetMissionText($fleet['mission']);
        ?>
    </th>
    <th> <a title="<?php 
        $totalships = 0;
        foreach ($fleetmap as $i => $gid) {
            if ($fleet["ship{$gid}"] > 0) {
                echo loca("NAME_{$gid}") . ": " . nicenum($fleet["ship{$gid}"]) . " \n";
                $totalships += $fleet["ship{$gid}"];
            }
        }
        ?>
"><?php 
        echo nicenum($totalships);
        ?>
</a></th>
    <th><a href="index.php?page=galaxy&galaxy=<?php 
        echo $origin['g'];
        ?>
&system=<?php 
        echo $origin['s'];
        ?>
&position=<?php 
        echo $origin['p'];
        ?>
&session=<?php 
        echo $session;
        ?>
" >[<?php 
开发者ID:Ansty93,项目名称:ogame-opensource,代码行数:31,代码来源:flotten1.php

示例9: Exp_FleetFound


//.........这里部分代码省略.........
    // Возможные типы найденных кораблей
    if ($fleet[210] > 0) {
        $found = array(210, 202);
    }
    // шпик
    if ($fleet[202] > 0) {
        $found = array(210, 202, 203);
    }
    // мт
    if ($fleet[204] > 0) {
        $found = array(210, 202, 204, 203);
    }
    // ли
    if ($fleet[203] > 0) {
        $found = array(210, 202, 204, 203, 205);
    }
    // бт
    if ($fleet[205] > 0) {
        $found = array(210, 202, 204, 203, 205, 206);
    }
    // ти
    if ($fleet[206] > 0) {
        $found = array(210, 202, 204, 203, 205, 206, 207);
    }
    // крейсер
    if ($fleet[207] > 0) {
        $found = array(210, 202, 204, 203, 205, 206, 207, 215);
    }
    // линкор
    if ($fleet[215] > 0) {
        $found = array(210, 202, 204, 203, 205, 206, 207, 215, 211);
    }
    // линейка
    if ($fleet[211] > 0) {
        $found = array(210, 202, 204, 203, 205, 206, 207, 215, 211, 213);
    }
    // бомбер
    if ($fleet[213] > 0) {
        $found = array(210, 202, 204, 203, 205, 206, 207, 215, 211, 213);
    }
    // уник
    // Составить список найденных типов кораблей, каждый тип корабля может быть найден с равной вероятностью.
    $found_ids = array();
    if (count($found) > 0) {
        shuffle($found);
        $chance = floor(1 / count($found) * 100);
        foreach ($found as $i => $id) {
            $roll = mt_rand(0, 99);
            if ($roll < $chance) {
                $found_ids[] = $id;
            }
        }
    }
    // Соcтавить список найденного флота.
    $found_fleet = array();
    foreach ($found_ids as $i => $id) {
        $max = floor($structure / $UnitParam[$id][0]);
        if ($max > 0) {
            $amount = mt_rand(1, $max);
        } else {
            $amount = 0;
        }
        if ($amount == 0) {
            $no_structure = true;
            break;
        }
        // не хватило структуры для остального флота
        $found_fleet[$id] = $amount;
        $structure -= $amount * $UnitParam[$id][0];
    }
    // Вывести список найденного флота и посчитать его стоимость.
    if (count($found_fleet) > 0) {
        $msg .= loca("EXP_FLEET_FOUND");
        foreach ($found_fleet as $id => $amount) {
            $res = ShipyardPrice($id);
            $m = $res['m'];
            $k = $res['k'];
            $d = $res['d'];
            $e = $res['e'];
            $points += ($m + $k + $d) * $amount;
            $fpoints += $amount;
            $msg .= "<br>" . loca("NAME_{$id}") . " " . nicenum($amount);
            $fleet[$id] += $amount;
            // Добавить корабли к экспедиционному флоту
        }
    }
    // Зачислить очки, если найден хотя бы один корабль
    if ($fpoints > 0) {
        AdjustStats($fleet_obj['owner_id'], $points, $fpoints, 0, '+');
        RecalcRanks();
    }
    if ($no_structure) {
        $n = mt_rand(0, count($footer) - 1);
        $msg .= "<br><br>" . $footer[$n];
    }
    // Вернуть флот.
    // В качестве времени полёта используется время удержания.
    DispatchFleet($fleet, $origin, $target, 115, $fleet_obj['deploy_time'], $fleet_obj['m'], $fleet_obj['k'], $fleet_obj['d'], 0, $queue['end']);
    return $msg;
}
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:101,代码来源:expedition.php

示例10: Cargo

function Cargo($m, $k, $d, $mission, $text)
{
    if ($m + $k + $d != 0) {
        return "<a href='#' onmouseover='return overlib(\"&lt;font color=white&gt;&lt;b&gt;Транспорт: &lt;br /&gt; Металл: " . nicenum($m) . "&lt;br /&gt;Кристалл: " . nicenum($k) . "&lt;br /&gt;Дейтерий: " . nicenum($d) . "&lt;/b&gt;&lt;/font&gt;\");' " . "onmouseout='return nd();'' class='{$mission}'>{$text}</a><a href='#' title='Транспорт: Металл: " . nicenum($m) . " Кристалл: " . nicenum($k) . " Дейтерий: " . nicenum($d) . "'></a>";
    } else {
        return "<span class='class'>{$text}</span>";
    }
}
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:8,代码来源:overview_events.php

示例11: RocketAttack

function RocketAttack($fleet_id, $planet_id)
{
    global $UnitParam;
    $fleet = LoadFleet($fleet_id);
    $amount = $fleet['ipm_amount'];
    $primary = $fleet['ipm_target'];
    $origin = GetPlanet($fleet['start_planet']);
    $target = GetPlanet($planet_id);
    $origin_user = LoadUser($origin['owner_id']);
    $target_user = LoadUser($target['owner_id']);
    // Отбить атаку МПР перехватчиками
    $ipm = $amount;
    $abm = $target['d502'];
    $ipm = max(0, $ipm - $abm);
    $ipm_destroyed = $amount - $ipm;
    $target['d502'] -= $ipm_destroyed;
    $maxdamage = $ipm * 12000 * (1 + $origin_user['r109'] / 10);
    // Произвести атаку первичной цели
    if ($primary > 0 && $ipm > 0) {
        $armor = $UnitParam[$primary][0] * (1 + 0.1 * $target_user['r111']) / 10;
        $count = $target["d{$primary}"];
        $destroyed = min(floor($maxdamage / $armor), $count);
        $target["d{$primary}"] -= $destroyed;
        $maxdamage -= $destroyed * $armor;
        $maxdamage -= $destroyed;
    }
    // Расчитать потери обороны, если еще остались МПР
    if ($maxdamage > 0) {
        $defmap = array(401, 402, 403, 404, 405, 406, 407, 408, 502, 503);
        foreach ($defmap as $i => $id) {
            if ($id == $primary) {
                continue;
            }
            $armor = $UnitParam[$id][0] * (1 + 0.1 * $target_user['r111']) / 10;
            $count = $target["d{$id}"];
            if ($count == 0) {
                continue;
            }
            $destroyed = min(floor($maxdamage / $armor), $count);
            $target["d{$id}"] -= $destroyed;
            $maxdamage -= $destroyed * $armor;
            $maxdamage -= $destroyed;
            if ($maxdamage <= 0) {
                break;
            }
        }
    }
    // Записать назад потери обороны.
    SetPlanetDefense($planet_id, $target);
    // Изменить статистику игроков
    RecalcRanks();
    $text = "{$amount} ракетам из общего числа выпущенных ракет с планеты " . $origin['name'] . " <a href=# onclick=showGalaxy(" . $origin['g'] . "," . $origin['s'] . "," . $origin['p'] . "); >[" . $origin['g'] . ":" . $origin['s'] . ":" . $origin['p'] . "]</a>  ";
    $text .= "удалось попасть на Вашу планету " . $target['name'] . " <a href=# onclick=showGalaxy(" . $target['g'] . "," . $target['s'] . "," . $target['p'] . "); >[" . $target['g'] . ":" . $target['s'] . ":" . $target['p'] . "]</a> !<br>";
    if ($ipm_destroyed) {
        $text .= "{$ipm_destroyed} ракет(-ы) было уничтожено Вашими ракетами-перехватчиками<br>:<br>";
    }
    $defmap = array(503, 502, 408, 407, 406, 405, 404, 403, 402, 401);
    $text .= "<table width=400><tr><td class=c colspan=4>Поражённая оборона</td></tr>";
    $n = 0;
    foreach ($defmap as $i => $gid) {
        if ($n % 2 == 0) {
            $text .= "</tr>";
        }
        if ($target["d{$gid}"]) {
            $text .= "<td>" . loca("NAME_{$gid}") . "</td><td>" . nicenum($target["d{$gid}"]) . "</td>";
            $n++;
        }
    }
    $text .= "</table><br>\n";
    // Обновить активность на планете.
    $queue = GetFleetQueue($fleet_id);
    UpdatePlanetActivity($planet_id, $queue['end']);
    SendMessage($target_user['player_id'], "Командование флотом", "Ракетная атака", $text, 2);
}
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:74,代码来源:battle.php

示例12: Admin_BattleSim


//.........这里部分代码省略.........
        }
        echo "</select> </td> ";
    }
    echo " </tr>\n";
    foreach ($fleetmap as $i => $gid) {
        ?>
           <tr><td> <?php 
        echo loca("NAME_{$gid}");
        ?>
 </td> <td> <input id="a_<?php 
        echo $gid;
        ?>
" size=5  onKeyUp="OnChangeValue(1, <?php 
        echo $gid;
        ?>
);"> </td> </tr>
<?php 
    }
    ?>

<tr><td colspan=2> 
<table>
<tr><td class=c colspan=2>Настройки</td></tr>
<tr><td>Отладочная информация</td><td><input type="checkbox" name="debug" <? if($debug) echo "checked"; ?> ></td></tr>
<tr><td>Скорострел</td><td><input type="checkbox" name="rapid" <? if($rf) echo "checked"; ?> ></td></tr>
<tr><td>Флот в обломки</td><td><input name="fid" size=3 value="<?php 
    echo $fid;
    ?>
"> </td></tr>
<tr><td>Оборона в обломки</td><td><input name="did" size=3 value="<?php 
    echo $did;
    ?>
"></td></tr>
</table>
</td></tr>

        </table>
        </th>

        <th valign=top>
        <table>
<?php 
    echo "<tr><td class=c><b>Флот</b></td>";
    if ($maxslot > 0) {
        echo "<td>Слот: <select name=\"dslot\" onchange=\"OnChangeSlot(0);\">\n";
        for ($n = 1; $n <= $maxslot; $n++) {
            echo "<option value=\"{$n}\">{$n}</option>\n";
        }
        echo "</select> </td> ";
    }
    echo "</tr>\n";
    foreach ($fleetmap as $i => $gid) {
        ?>
           <tr><td> <?php 
        echo loca("NAME_{$gid}");
        ?>
 </td> <td> <input id="d_<?php 
        echo $gid;
        ?>
" size=5 onKeyUp="OnChangeValue(0, <?php 
        echo $gid;
        ?>
);"> </td> </tr>
<?php 
    }
    echo "<tr><td class=c><b>Оборона</b></td></tr>\n";
    foreach ($defmap as $i => $gid) {
        ?>
           <tr><td> <?php 
        echo loca("NAME_{$gid}");
        ?>
 </td> <td> <input id="d_<?php 
        echo $gid;
        ?>
" size=5 onKeyUp="OnChangeValue(0, <?php 
        echo $gid;
        ?>
);"> </td> </tr>
<?php 
    }
    ?>
        </table>
        </th></tr>

<tr><td colspan=2><center><input type="submit" value="Начать бой"></center></td></tr>
</form>
</table>

<?php 
    if ($BattleReport !== "") {
        $a_result = array(0 => "combatreport_ididattack_iwon", 1 => "combatreport_ididattack_ilost", 2 => "combatreport_ididattack_draw");
        $bericht = SendMessage($GlobalUser['player_id'], "Командование флотом", "Боевой доклад", $BattleReport, 6);
        MarkMessage($GlobalUser['player_id'], $bericht);
        $subj = "<a href=\"#\" onclick=\"fenster('index.php?page=bericht&session={$session}&bericht={$bericht}', 'Bericht_Kampf');\" ><span class=\"" . $a_result[$battle_result] . "\">Боевой доклад [" . $d[0]['g'] . ":" . $d[0]['s'] . ":" . $d[0]['p'] . "] (V:" . nicenum($dloss) . ",A:" . nicenum($aloss) . ")</span></a>";
        echo "{$subj}<br>";
    }
    ?>

<?php 
}
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:101,代码来源:admin_sim.php

示例13: nicenum

                        </th>           
        </TR>
        
        <TR>
            <th class="c" align="center" width=25% >Дейтерий</th>
<?php 
    if ($GlobalUser['trader'] == 3) {
        echo "                          <th class=\"c\" align='center' width=25% ><span id=\"3_value\">0</span></th>\n";
    } else {
        echo "                          <th class=\"c\" align='center' width=25% ><input type=\"text\" size=\"9\" name=\"3_value\" value=\"0\" style=\"text-align:right;\" onkeyup='checkValue(3);'> <a href=\"#\" onClick=\"setMaxValue(3);\">max</a></th>\n";
    }
    ?>
              <th class="c" align='center' width=25% >
<?php 
    if ($GlobalUser['trader'] != 3) {
        echo "<span id=\"3_storage\">" . nicenum($dmax) . "</span>";
    } else {
        echo "---";
    }
    ?>
</th>
                        
            <th class="c" align='center' width=25% >
<?php 
    if ($GlobalUser['trader'] != 3) {
        ?>
                          <a href=# onmouseover="return overlib('<font color=white><?php 
        echo va("Один #1 даёт #2 #3", $resname[$GlobalUser['trader']], round($GlobalUser['rate_d'] / $ratewhat, 2), $resname[3]);
        ?>
</font>');" onmouseout="return nd();">
<?php 
开发者ID:vksavochkin,项目名称:ogame-opensource,代码行数:31,代码来源:trader.php

示例14: nicenum

    ?>
"
                           title="|&lt;B&gt;<?php 
    echo $planet['name'];
    ?>
 [<?php 
    echo $planet['g'];
    ?>
:<?php 
    echo $planet['s'];
    ?>
:<?php 
    echo $planet['p'];
    ?>
]&lt;/B&gt;&lt;BR&gt;<?php 
    echo nicenum($planet['diameter']);
    ?>
км (<?php 
    echo $planet['fields'];
    ?>
/<?php 
    echo $planet['maxfields'];
    ?>
)&lt;BR&gt;от <?php 
    echo $planet['temp'];
    ?>
°C до <?php 
    echo $planet['temp'] + 40;
    ?>
°C"
                           class="planetlink <?php 
开发者ID:Ansty93,项目名称:ogame-opensource,代码行数:31,代码来源:redesign_planetlist.php

示例15: ResourceList

function ResourceList($m, $k, $d, $enow, $emax, $dm, $mmax, $kmax, $dmax)
{
    global $GlobalUser;
    $sess = $GlobalUser['session'];
    $mcol = $kcol = $dcol = $ecol = "";
    if ($m >= $mmax) {
        $mcol = "color='#ff0000'";
    }
    if ($k >= $kmax) {
        $kcol = "color='#ff0000'";
    }
    if ($d >= $dmax) {
        $dcol = "color='#ff0000'";
    }
    if ($enow < 0) {
        $ecol = "color='#ff0000'";
    }
    echo "<td class='header'><table class='header' id='resources' border='0' cellspacing='0' cellpadding='0' padding-right='30' >\n";
    echo "<tr class='header'>\n";
    echo "<td align='center' width='85' class='header'>\n";
    echo "<img border='0' src='" . UserSkin() . "images/metall.gif' width='42' height='22'>\n</td>\n";
    echo "<td align='center' width='85' class='header'>\n";
    echo "<img border='0' src='" . UserSkin() . "images/kristall.gif' width='42' height='22'>\n</td>\n";
    echo "<td align='center' width='85' class='header'>\n";
    echo "<img border='0' src='" . UserSkin() . "images/deuterium.gif' width='42' height='22'>\n</td>\n";
    echo "<td align='center' width='85' class='header'>\n";
    echo "<a href=index.php?page=micropayment&session={$sess}>\n";
    echo "<img border='0' src='img/dm_klein_2.jpg' width='42' height='22' title='" . loca("DM") . "'></a>\n</td>\n";
    echo "<td align='center' width='85' class='header'>\n";
    echo "<img border='0' src='" . UserSkin() . "images/energie.gif' width='42' height='22'>\n</td>\n</tr>\n";
    echo "<tr class='header'>\n";
    echo "    <td align='center' class='header' width='85'><i><b><font color='#ffffff'>" . loca("METAL") . "</font></b></i></td>\n";
    echo "    <td align='center' class='header' width='85'><i><b><font color='#ffffff'>" . loca("CRYSTAL") . "</font></b></i></td>\n";
    echo "    <td align='center' class='header' width='85'><i><b><font color='#ffffff'>" . loca("DEUTERIUM") . "</font></b></i></td>\n";
    echo "    <td align='center' class='header' width='85'><i><b><font color='#ffffff'>" . loca("DM") . "</font></b></i></td>\n";
    echo "    <td align='center' class='header' width='85'><i><b><font color='#ffffff'>" . loca("ENERGY") . "</font></b></i></td>\n";
    echo "</tr>\n";
    echo "<tr class='header'>\n";
    echo "    <td align='center' class='header' width='90'><font {$mcol}>" . nicenum($m) . "</font></td>\n";
    echo "    <td align='center' class='header' width='90'><font {$kcol}>" . nicenum($k) . "</font></td>\n";
    echo "    <td align='center' class='header' width='90'><font {$dcol}>" . nicenum($d) . "</font></td>\n";
    echo "    <td align='center' class='header' width='90'><font color='#FFFFFF'>" . nicenum($dm) . "</font></td>\n";
    echo "    <td align='center' class='header' width='90'><font {$ecol}>" . nicenum($enow) . "</font>/" . nicenum($emax) . "</td>\n\n";
    echo "</tr>\n";
    echo "</table></td>\n";
}
开发者ID:Ansty93,项目名称:ogame-opensource,代码行数:46,代码来源:page.php


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