<div id="content">
    <div id="box1">
        <div class="title1">
            <h1>Donate Shop</h1>
            <a href="/user" class="back-to-user-menu">Back to user menu</a>
        </div>
        <div id="content_center">
            <div class="box-style1" style="margin-bottom:25px;">
                <div class="entry">
                    <div>
                        <div class="sort-form">
                            <div id="webmarket">
                                <div class="filterButton" onclick="toggleFilter()">
                                    <b id="fltrtab">+ показать фильтр</b>
                                </div>
                                <div id="fltrdiv" class="small" style="margin: 0px; display: block;">
                                    <form method="post" action="webmarket" name="filter_form">
                                        <table class="filter">
                                            <tbody><tr>
                                                <td colspan="3">
                                                    <label>В названии: <input name="str" type="text" value="" maxlength="30" style="width:156px;"></label>
                                                    <label>Класс:
                                                        <select name="class">
                                                            <option></option>
                                                            <option value="0">Dark Wizzard</option>
                                                            <option value="1">Dark Knight</option>
                                                            <option value="2">Fairy ELf</option>
                                                            <option value="3">Magic Gladiator</option>
                                                            <option value="4">Dark Lord</option>
                                                            <option value="5">Summoner</option>
                                                            <option value="6">Rage FIghter</option>
                                                        </select>
                                                    </label>
                                                </td>
                                            </tr>
                                            <!--<tr><td></td></tr>-->
                                            <tr>
                                                <td style="width: 180px">
                                                    <div style="height: 30px">Тип:
                                                        <select name="itype" style="float:right; width: 70px;">
                                                            <option value="-1">Любой</option>
                                                            <option value="0">Swords</option>
                                                            <option value="1">Axes</option>
                                                            <option value="2">Scepters</option>
                                                            <option value="3">Spears</option>
                                                            <option value="4">Bows &amp; crossbows</option>
                                                            <option value="5">Staves</option>
                                                            <option value="6">Shields</option>
                                                            <option value="7">Helms</option>
                                                            <option value="8">Armors</option>
                                                            <option value="9">Pants</option>
                                                            <option value="10">Gloves</option>
                                                            <option value="11">Boots</option>
                                                            <option value="12">Wings/Orbs/Seed/Boxes</option>
                                                            <option value="13">Miscs</option>
                                                            <option value="14">Jewels/Potions/Tickets</option>
                                                            <option value="15">Scrolls</option>
                                                        </select>
                                                    </div>
                                                    <!--<div style="height: 30px">Для расы:
                                                      <select name="race" style="float:right; width: 70px;">
                                                        <option value="-1">Любой</option>
                                                        <option value="1">DW/SM/GM</option>
                                                        <option value="2">DK/BK/BM</option>
                                                        <option value="3">FE/ME/HE</option>
                                                        <option value="4">MG/DM</option>
                                                        <option value="5">DL/LE</option>
                                                        <option value="6">SU/BS/DiM</option>
                                                        <option value="7">RF/FM</option>
                                                      </select>
                                                    </div>-->
                                                </td>
                                                <td class="item_options">
                                                    <label>
                                                        <input name="luck" type="checkbox" value="1">
                                                        <span style="vertical-align:2px">Luck</span>
                                                    </label>
                                                    <label>
                                                        <input name="skill" type="checkbox" value="1">
                                                        <span style="vertical-align:2px">Skill</span>
                                                    </label>
                                                    <label>
                                                        <input name="exl" type="checkbox" value="1">
                                                        <span style="vertical-align:2px">Excellent</span>
                                                    </label>
                                                    <label>
                                                        <input name="anc" type="checkbox" value="1">
                                                        <span style="vertical-align:2px">Ancient</span>
                                                    </label>
                                                    <label>
                                                        <input name="pvp" type="checkbox" value="1">
                                                        <span style="vertical-align:2px">PvP</span>
                                                    </label>
                                                    <label>
                                                        <input name="harm" type="checkbox" value="1">
                                                        <span style="vertical-align:2px">Harm</span>
                                                    </label>
                                                </td>
                                                <td style="width: 268px">
                                                    <div>Уровень от
                                                        <select name="lvl1" style="width: 50px">
                                                            <option value="-1"></option>
                                                            <option value="0">0</option>
                                                            <option value="1">1</option>
                                                            <option value="2">2</option>
                                                            <option value="3">3</option>
                                                            <option value="4">4</option>
                                                            <option value="5">5</option>
                                                            <option value="6">6</option>
                                                            <option value="7">7</option>
                                                            <option value="8">8</option>
                                                            <option value="9">9</option>
                                                            <option value="10">10</option>
                                                            <option value="11">11</option>
                                                            <option value="12">12</option>
                                                            <option value="13">13</option>
                                                            <option value="14">14</option>
                                                            <option value="15">15</option>
                                                        </select>
                                                        до
                                                        <select name="lvl2" style="width: 50px">
                                                            <option value="-1"></option>
                                                            <option value="0">0</option>
                                                            <option value="1">1</option>
                                                            <option value="2">2</option>
                                                            <option value="3">3</option>
                                                            <option value="4">4</option>
                                                            <option value="5">5</option>
                                                            <option value="6">6</option>
                                                            <option value="7">7</option>
                                                            <option value="8">8</option>
                                                            <option value="9">9</option>
                                                            <option value="10">10</option>
                                                            <option value="11">11</option>
                                                            <option value="12">12</option>
                                                            <option value="13">13</option>
                                                            <option value="14">14</option>
                                                            <option value="15">15</option>
                                                        </select>
                                                    </div>
                                                    <div style="padding-top: 3px;">
                                                        JoL option от:
                                                        <select name="opt">
                                                            <option value="-1">Не важно</option>
                                                            <option value="1">+4/+5/1%</option>
                                                            <option value="2">+8/+10/2%</option>
                                                            <option value="3">+12/+15/3%</option>
                                                            <option value="4">+16/+20/4%</option>
                                                            <option value="5">+20/+25/5%</option>
                                                            <option value="6">+24/+30/6%</option>
                                                            <option value="7">+28/+35/7%</option>
                                                        </select>
                                                    </div>
                                                    <div style="padding-top: 3px;">
                                                        <div>Цена (<span onclick="">Zen</span>):</div>
                                                        <div style="height:25px; text-align: right;">
                                                            <div style="padding-top: 3px;">
                                                                от<input name="cost1" type="text" value="" maxlength="10" size="10">
                                                                до<input name="cost2" type="text" value="" maxlength="10" size="10">
                                                            </div>
                                                        </div>
                                                        <label>Zen <input type="radio" name="valute" value="1" checked=""></label>
                                                        <label>VoteCoins <input type="radio" name="valute" value="2"></label>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                    <button class="sort-btn" onclick="filter_form.reset(); return false;">Сбросить</button>
                                                </td>
                                                <td>
                                                    <button class="sort-btn" onclick="filter_form.submit(); return false;">Фильтровать</button>

                                                      </td>
                                            </tr>
                                            </tbody></table>
                                        <input type="hidden" name="filter" value="1">
                                    </form>
                                </div>
                            </div>
                        </div>
                        <br>
                        {if !empty($Categoryes)}
                        <ul id="list-cat-don">
                            {foreach $Categoryes as $cat }
                                <li >
                                    <a href="/user/donate/{$cat.Category}">
                                        <div style="background: url({$cat.Img}) center center no-repeat;" class="cat-don">
                                            <p>{$cat.Name}</p>
                                        </div>
                                    </a>
                                </li>

                            {/foreach}

                        </ul>
                        {elseif !empty($ViewCategory)}
                        <ul id="list-cat-don">
                            <script src="/web/templates/default/js/tooltip.js" type="text/javascript"></script>
                            {$i=0}
                            {foreach $ViewCategory as $item}
                                <li >
                                {$item.Info}
                                <p>{$item.Name}</p>
                                    <span>
                                        {$i=0}
                                        {foreach $Valutes as $valute}
                                            {if ($valute.Name != '' && $item.Price.Valutes[$i] > 0)}
                                                <span>{$valute.Name}: {$item.Price.Valutes[$i]}</span>
                                            {/if}
                                            {$i=$i+1}
                                        {/foreach}
                                    </span>
                                <form action="" method="post">
                                    <button name="buy" value="{$item.Key}">Buy</button>
                                </form>


                    </li>
                    {/foreach}
                    </ul>
                    {else}
                         <h2>List Empty</h2>
                    {/if}
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<script type="text/javascript">

    document.getElementById('fltrdiv').style.display = 'none';
    function toggleFilter()
    {
        var e = document.getElementById('fltrdiv'), t = document.getElementById('fltrtab');
        if (e.style.display == 'block')
        {
            e.style.display = 'none';
            t.innerHTML = '+ показать фильтр';
        }
        else
        {
            e.style.display = 'block'
            ;
            t.innerHTML = '– скрыть фильтр';
        }
    }
</script>
