本文整理汇总了PHP中Maintenance::isAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP Maintenance::isAvailable方法的具体用法?PHP Maintenance::isAvailable怎么用?PHP Maintenance::isAvailable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Maintenance
的用法示例。
在下文中一共展示了Maintenance::isAvailable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stat_max
$aSpot = $tank['spotted'] / $battles;
$aFrag = $tank['frags'] / $battles;
$aDef = $tank['dropped_capture_points'] / $battles;
$rDamage = $aDamage / $exp_data['expDamage'];
$rSpot = $aSpot / $exp_data['expSpot'];
$rFrag = $aFrag / $exp_data['expFrag'];
$rDef = $aDef / $exp_data['expDef'];
$rWin = $aWin / $exp_data['expWinRate'];
$rWinc = stat_max(0, ($rWin - 0.71) / (1 - 0.71));
$rDamagec = stat_max(0, ($rDamage - 0.22) / (1 - 0.22));
$rFragc = stat_min($rDamagec + 0.2, stat_max(0, ($rFrag - 0.12) / (1 - 0.12)));
$rSpotc = stat_min($rDamagec + 0.1, stat_max(0, ($rSpot - 0.38) / (1 - 0.38)));
$rDefc = stat_min($rDamagec + 0.1, stat_max(0, ($rDef - 0.1) / (1 - 0.1)));
return 980 * $rDamagec + 210 * $rDamagec * $rFragc + 155 * $rFragc * $rSpotc + 75 * $rDefc * $rFragc + 145 * stat_min(1.8, $rWinc);
}
if (!Maintenance::isAvailable('myclan/damage')) {
Maintenance::displayMaintenanceMessage();
}
$db = new MySQLi($db_addr, $db_user, $db_pass, $db_db, 3306);
$alerts = new Alerts('root-index');
$api = new WGAPI(getKeyBasedOn($server), $server);
$openid = new OpenIDWrapper($server, $clanid, "myclan.php");
$clanInfo = $api->pageClanInfo($clanid);
extract($_REQUEST);
$openid->authenticate();
if (!$openid->isAuthenticated() && !in_array('chandog', $_COOKIE)) {
header("Location: {$base_url}?r=nlogged");
}
if (isset($_REQUEST['submit'])) {
if ($_REQUEST['submit'] == "destroy") {
setcookie("{$clanid}-wg-user", "сессии уничтожены", time() - 604800, '/', $_SERVER['SERVER_NAME']);