<?php
    /**
     * Fusion filter view.
     *
     * To be included from the fusion view.
     *
     * @category View
     * @property_read mixed[] $filters Selected filters.
     * @property_read Fusion_Page $page The page model.
     * @property_read int $page Player ID.
     */
?>
<form action='/<?=$UID?>/fusion/' method='get' id='filter_fusion' class='filter'>
    <table>
        <tr>
            <td class='filter'>
                <span>Target:</span>
                <select name='product' id='filter_product'>
                    <option value=''>All</option>
<?php
                    foreach ($page->products as $product){
                        if ($product->id == $page->filters["PRODUCT"]){
                            $selected = "selected";
                        }
                        else{
                            $selected = "";
                        }
?>
                            <option value='<?=$product->id?>' <?=$selected?>><?=$product->element_name?> <?=$product->name?></option>
<?php
                    }
?>
                </select>
            </td>
        </tr>
    </table>
    <div id='filter_apply'>
        <input type='submit' value='Apply'/>
    </div>
</form>

