Commit f7580dde authored by Florian Schaal's avatar Florian Schaal
Browse files

fixed sql-query in dns_spf_edit.php and re-add spf-template

parent 93fdfe3a
......@@ -229,7 +229,7 @@ class page_action extends tform_actions {
$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';
......
<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>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment