本文整理匯總了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']);