Florian Schaal
2015-01-21 f7580dde244b7180da4edf4dc6d97c1f9a0c964f
fixed sql-query in dns_spf_edit.php and re-add spf-template
1 files modified
1 files added
62 ■■■■■ changed files
interface/web/dns/dns_spf_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/dns/templates/dns_spf_edit.htm 60 ●●●●● patch | view | raw | blame | history
interface/web/dns/dns_spf_edit.php
@@ -229,7 +229,7 @@
        $this->dataRecord["stamp"] = date('Y-m-d H:i:s');
        // always update an existing entry
        $check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data LIKE 'v=spf1%' AND name = ?", $this->dataRecord["zone"], $this->dataRecord["type"], $this->dataRecord['name'].'.');
        $check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data LIKE 'v=spf1%' AND name = ?", $this->dataRecord["zone"], $this->dataRecord["type"], $this->dataRecord['name']);
        $this->id = $check['id'];
        if (!isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'N';
interface/web/dns/templates/dns_spf_edit.htm
New file
@@ -0,0 +1,60 @@
<div class='page-header'>
    <h1><tmpl_var name="list_head_txt"></h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
            <div class="form-group">
                <label for="data" class="col-sm-3 control-label">{tmpl_var name='data_txt'}</label>
                <div class="col-sm-9"><input type="text" name="data" id="data" value="{tmpl_var name='data'}" readonly class="form-control" /></div></div>
            <div class="form-group">
                <label for="spf_mechanism" class="col-sm-3 control-label">{tmpl_var name='spf_mechanism_txt'}</label>
                <div class="col-sm-9"><select name="spf_mechanism" id="spf_mechanism" class="form-control">
                    {tmpl_var name='spf_mechanism'}
                </select></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='spf_mx_txt'}</label>
                <div class="col-sm-9"><input class="form-control" type="checkbox" value="1" id="spf_mx" name="spf_mx" {tmpl_var name = 'spf_mx_active'} /></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='spf_a_txt'}</label>
                <div class="col-sm-9"><input class="form-control" type="checkbox" value="1" id="spf_a" name="spf_a" {tmpl_var name = 'spf_a_active'} /></div>
            </div>
            <div class="form-group">
                <label for="spf_ip" class="col-sm-3 control-label">{tmpl_var name='spf_ip_txt'}</label>
                <div class="col-sm-6"><input type="text" name="spf_ip" id="spf_ip" value="{tmpl_var name='spf_ip'}" class="form-control" /></div><div class="col-sm-3 input-sm">
                {tmpl_var name='spf_ip_note_txt'}
            </div></div>
            <div class="form-group">
                <label for="spf_hostname" class="col-sm-3 control-label">{tmpl_var name='spf_hostname_txt'}</label>
                <div class="col-sm-6"><input type="text" name="spf_hostname" id="spf_hostname" value="{tmpl_var name='spf_hostname'}" class="form-control" /></div><div class="col-sm-3 input-sm">
                {tmpl_var name='spf_hostname_note_txt'}
            </div></div>
            <div class="form-group">
                <label for="spf_domain" class="col-sm-3 control-label">{tmpl_var name='spf_domain_txt'}</label>
                <div class="col-sm-6"><input type="text" name="spf_domain" id="spf_domain" value="{tmpl_var name='spf_domain'}" class="form-control" /></div><div class="col-sm-3 input-sm">
                {tmpl_var name='spf_domain_note_txt'}
            </div></div>
            <div class="form-group">
                <label for="ttl" class="col-sm-3 control-label">{tmpl_var name='ttl_txt'}</label>
                <div class="col-sm-9"><input type="text" name="ttl" id="ttl" value="{tmpl_var name='ttl'}" class="form-control" /></div></div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                <div class="col-sm-9"><input class="form-control" type="checkbox" value="1" id="active" name="active" {tmpl_var name='active'} /></div>
            </div>
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <input type="hidden" name="zone" value="{tmpl_var name='zone'}" id="zone">
        <input type="hidden" name="type" value="{tmpl_var name='type'}">
        <input type="hidden" name="name" value="{tmpl_var name='name'}">
            </div>
        <div class="clear"><div class="right">
            <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="dns/dns_spf_edit.php">{tmpl_var name='btn_save_txt'}</button>
            <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='zone'}">{tmpl_var name='btn_cancel_txt'}</button>
        </div></div>