示例#1
0
文件: add.php 项目: mleo1/rAFluxCP
     $errorMessage = 'Attack must be a number.';
 } elseif (!is_null($matk) && !ctype_digit($matk)) {
     $errorMessage = 'MATK must be a number.';
 } elseif (!is_null($defense) && !ctype_digit($defense)) {
     $errorMessage = 'Defense must be a number.';
 } elseif (!is_null($range) && !ctype_digit($range)) {
     $errorMessage = 'Range must be a number.';
 } elseif (!is_null($weaponLevel) && !ctype_digit($weaponLevel)) {
     $errorMessage = 'Weapon level must be a number.';
 } elseif (!is_null($equipLevelMin) && !ctype_digit($equipLevelMin)) {
     $errorMessage = 'Minimum equip level must be a number.';
 } elseif (!is_null($equipLevelMax) && !ctype_digit($equipLevelMax)) {
     $errorMessage = 'Maximum equip level must be a number.';
 } else {
     if (empty($errorMessage) && is_array($equipLocs)) {
         $locs = Flux::getEquipLocationList();
         foreach ($equipLocs as $bit) {
             if (!array_key_exists($bit, $locs)) {
                 $errorMessage = 'Invalid equip location specified.';
                 $equipLocs = null;
                 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;
示例#2
0
 /**
  *
  */
 public function equipLocations($equipLoc)
 {
     $locations = array();
     $equipLoc = (int) $equipLoc;
     $equipLocs = Flux::getEquipLocationList();
     foreach ($equipLocs as $bit => $name) {
         if ($equipLoc & $bit) {
             $locations[] = $name;
         }
     }
     return $locations;
 }
示例#3
0
文件: add.php 项目: mleo1/rAFluxCP
?>
/>Yes</label>
				<label style="display: inline"><input type="radio" name="refineable" value="0"<?php 
if (!$refineable) {
    echo ' checked="checked"';
}
?>
 />No</label>
			</td>
		</tr>
		<tr>
			<th><label for="equip_locations">Equip Locations</label></th>
			<td colspan="3">
				<select class="multi-select" name="equip_locations[]" id="equip_locations" size="5" multiple="multiple">
				<?php 
foreach (Flux::getEquipLocationList() as $bit => $location) {
    ?>
					<option value="<?php 
    echo htmlspecialchars($bit);
    ?>
"<?php 
    if ($equipLocs && in_array($bit, $equipLocs)) {
        echo ' selected="selected"';
    }
    ?>
>
						<?php 
    echo htmlspecialchars($location);
    ?>
					</option>
				<?php