<div align=center>
    <div style="font-size:14px;"><b>{$lang.Module_settings}</b><span class='help_bt' h_id='SMS_module'></div>
    <br>
    {if $save_complete or $error}
        <table border=0 cellpadding=3>
            <tr>
                {if $save_complete}
                    <td align=center style="color:green">{$lang.succes_settings_save}</td>
                {elseif $error}
                    <td align=center style="color:red">{$error}</td>
                {/if}
            </tr>
        </table>
    {/if}
    <div style="font-size:14px;">{$lang.modules.sms.Smsc_servers}:</div>
    <br>
    <form action="{$config.site_root}/edit_modules.php?module=sms" method="post" id="edit_form">
        <input type="hidden" name="csrf" value="{$csrf}">
        <table border=0 cellpadding=3
               {if $all_servers[0].balance or $all_servers[0].error}style="margin-left:100px;"{/if}>
            {foreach from=$all_servers item=one_server}
                <tr>
                    <td>{if !$one_server.system}<a
                            href="{$config.site_root}/edit_modules.php?module=sms&id={$one_server.id}&delete"
                            {if $demo}{$demo}{else}onClick="if(!confirm('{$lang.smtp_delete_confirm}'))return false;"{/if}>
                            <img alt="{$lang.delete}" title="{$lang.Delete}" src="{$config.site_root}/images/b_drop.png"
                                 border=0></a>{/if}</td>
                    <td><input type=radio name=active value={$one_server.id} {if $one_server.active}checked{/if}
                               title="{$lang.turn_on_off}" onclick="document.getElementById('edit_form').submit()"></td>
                    <td>
                        <a href="{$config.site_root}/edit_modules.php?module=sms&id={$one_server.id}">{$one_server.name}</a>
                    </td>
                    {if $one_server.balance}
                        <td><span style="color:gray"> &nbsp; {$one_server.balance}</span></td>{/if}
                    {if $one_server.error}
                        <td><span style="color:gray"> &nbsp; <i>{$one_server.error}</i></span></td>{/if}
                </tr>
            {/foreach}
        </table>
        {if $user.group_id==1 && !$trial}
            <br>
            <input class="btn btn-default btn-sm" type=button value="{$lang.Add_server}"
                   onClick="location.href='{$config.site_root}/edit_modules.php?module=sms&id=-1';">
        {/if}
    </form>
    {if $all_servers}
    <br>
    <form action="{$config.site_root}/edit_modules.php?module=sms" method="post">
        <input type=hidden name=csrf value='{$csrf}'>
        <table style="width:400px;align:center;">
            <tr>
                <td align=right>{$lang.Auto_delete_mailing}</td>
                <td>
                    <input class="form-control form-control-35" type="text" name="auto_delete_smsing_days" {if $trial} value="10" disabled{else} value="{$config.auto_delete_smsing_days}" {/if} size=3> {$lang.days}
                    <span class='help_bt' h_id='auto_delete_smsing'></span>
                </td>
            </tr>
            {if !$trial}
            <tr>
                <td colspan=2 align=center><br>
                    <input class="btn btn-default btn-sm" type=submit value="{$lang.Save}">
                </td>
            </tr>
            {/if}
        </table>
    </form>
    {/if}
    {if $trial}
        <div style="margin-top:20px;font-size:13px" > {$lang.modules.sms.trial_version}</div>
    {/if}
</div>