Exemplo n.º 1
0
function inFleetShipCheck($fleet_id, $current_ship, $selected_ship) {
	if ($current_ship == $selected_ship) {
		return inFleet($fleet_id, $selected_ship);
	} else {
		return false;
	}
}
Exemplo n.º 2
0
                        <tr>
                            <td  background="img/bg_balk.jpg"><b>Ship name</b></td>
                            <td  background="img/bg_balk.jpg" align="center"><b>Amount at base</b></td>
                            <td width="177" background="img/bg_balk.jpg" align="center"></td>
                            <td width="103" background="img/bg_balk.jpg" align="center"><b>Amount to sell</b></td>
                            <td width="95" background="img/bg_balk.jpg" align="center"></td>
                        </tr>
                        <tr>
                        	<td>
                    		<select name="ship_id" onChange="submitEditFleet()">
                    			<option value="0"<?if ($ship_id == 0) { echo 'selected'; }?>>-</option>
                    			<?
                    			
                    			for ($j = 0; $j < count($shipdata); $j++) {
                    			
                    				if (checkItem($playerdata['id'], $shipdata[$j]['depends']) && (!inFleet($fleet_id, $shipdata[$j]['id']) || ($edit_submit && inFleetShipCheck($fleet_id, $shipdata[$j]['id'], $ship_id)))) {
                    			?>
                    					<option value="<?php 
echo $shipdata[$j]['id'];
?>
"<?if ($ship_id == $shipdata[$j]['id']) { echo 'selected'; }?>><?php 
echo $shipdata[$j]['name'];
?>
</option>
                    			<?
                    				}
                    			}
                    			?>
                    		</select>
                        	</td>
                        	<td align="center"><?if (!$baseships) { echo 0; } else { echo $baseships; }?></td>
Exemplo n.º 3
0
                                                        					<option value="<?php 
echo $shipdata[$j]['id'];
?>
"<?if ($shipdata[$j]['id'] == getShipProperty($ship_id, 'secondary_target')) { echo 'selected'; }?>><?php 
echo $shipdata[$j]['name'];
?>
</option>
                                                        			<?
                                                            				}
                                                            			}
                                                            		}
                                                        			?>
                                                            	</select>
                                                            </td>
                                                            <td align="center">
                                                            <?if (inFleet($fleet_id, $ship_id) && $edit_submit) {?>
                                                            <input type="submit" name="editfleetship" value="Edit">
                                                            <? } elseif ($ship_id > 0) {?>
                                                            <input type="submit" name="addfleetship" value="Add">
                                                            <? } ?>
                                                            </td>
                                                        </tr>
                                                        </form>
                                                </table>
                                        </td>
                                </tr>
                        </table>
                </td>
                <td width="4" background="img/border/R.gif">&nbsp;</td>
        </tr>
        <tr>