本文整理匯總了PHP中Flux::getEquipJobsList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Flux::getEquipJobsList方法的具體用法?PHP Flux::getEquipJobsList怎麽用?PHP Flux::getEquipJobsList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Flux
的用法示例。
在下文中一共展示了Flux::getEquipJobsList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: equippableJobs
/**
*
*/
public function equippableJobs($equipJob)
{
$jobs = array();
$equipJob = (int) $equipJob;
$equipJobs = Flux::getEquipJobsList();
foreach ($equipJobs as $bit => $name) {
if ($equipJob & $bit) {
$jobs[] = $name;
}
}
if (count($jobs) === count($equipJobs)) {
return array('All Jobs');
} else {
if (count($jobs) === count($equipJobs) - 1 && !in_array($equipJobs[0], $jobs)) {
return array('All Jobs Except Novice');
} else {
return $jobs;
}
}
}
示例2: foreach
<?php
}
?>
</select>
<p class="action">
<span class="anchor" onclick="$('#equip_upper option').attr('selected', 'selected')">Selecionar Tudo</span> |
<span class="anchor" onclick="$('#equip_upper option').attr('selected', false)">Não Selecionar Nada</span>
</p>
</td>
</tr>
<tr>
<th><label for="equip_jobs">Classes Equipáveis</label></th>
<td colspan="3">
<select class="multi-select" name="equip_jobs[]" id="equip_jobs" size="10" multiple="multiple">
<?php
foreach (Flux::getEquipJobsList() as $bit => $className) {
?>
<option value="<?php
echo htmlspecialchars($bit);
?>
"<?php
if ($equipJobs && in_array($bit, $equipJobs)) {
echo ' selected="selected"';
}
?>
>
<?php
echo htmlspecialchars($className);
?>
</option>
<?php
示例3: foreach
break;
}
}
}
if (empty($errorMessage) && is_array($equipUpper)) {
$upper = Flux::getEquipUpperList();
foreach ($equipUpper as $bit) {
if (!array_key_exists($bit, $upper)) {
$errorMessage = 'Invalid equip upper specified.';
$equipUpper = null;
break;
}
}
}
if (empty($errorMessage) && is_array($equipJobs)) {
$jobs = Flux::getEquipJobsList();
foreach ($equipJobs as $bit) {
if (!array_key_exists($bit, $jobs)) {
$errorMessage = 'Invalid equippable job specified.';
$equipJobs = null;
break;
}
}
}
if (empty($errorMessage)) {
require_once 'Flux/TemporaryTable.php';
if ($server->isRenewal) {
$fromTables = array("{$server->charMapDatabase}.item_db_re", "{$server->charMapDatabase}.item_db2_re");
} else {
$fromTables = array("{$server->charMapDatabase}.item_db", "{$server->charMapDatabase}.item_db2");
}