Commit 0a329cdf authored by Marius Burkard's avatar Marius Burkard
Browse files

- added dns bulk editor, contributed by Timme Hosting

parent 336b8380
<?php
/*
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('dns');
// Loading the template
$app->uses('tpl,tfrom_base,validate_dns,functions');
$app->tpl->newTemplate("form.tpl.htm");
include 'lib/lang/'.$_SESSION['s']['language'].'_dns_bulk_editor.lng';
$app->tpl->setVar($wb);
// Load clients (if admin):
if ($app->auth->is_admin()) {
$clients = $app->db->queryAllRecords("SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name");
$clients_select_options = '<option value="">'.$wb['select_client_txt'].'</option>';
foreach($clients as $client) {
$selected = (intval($_POST["client_group_id"]) == $client['groupid'])?'SELECTED':'';
$clients_select_options .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
$app->tpl->setVar('clients_select_options', $clients_select_options);
}
// Load zones:
if ($app->auth->is_admin()) {
if (isset($_POST["client_group_id"])) {
$client_group_ids = intval($_POST["client_group_id"]);
}
} else {
$client_group_ids = $_SESSION['s']['user']['groups'];
}
if(isset($client_group_ids)) {
$sql = 'SELECT id, origin FROM dns_soa WHERE sys_groupid IN ('.$client_group_ids.') AND '.$app->tform_base->getAuthSQL('u');
$zones = $app->db->queryAllRecords($sql);
$zones_rows = array(); // All zones (for output)
foreach ($zones as $zone) {
$zones_rows[] = array(
'zone_id'=>$zone['id'],
'zone_name'=>$zone['origin'],
'zone_selected'=>isset($_POST['zone_'.$zone['id']]),
);
}
$app->tpl->setLoop('zones_rows', $zones_rows);
$app->tpl->setVar('zones_rows_count', count($zones_rows));
$update_zones = array(); // Currently selected zones in form (if any)
foreach ($zones as $zone) {
if (isset($_POST['zone_'.$zone['id']])) {
$update_zones[$zone['id']] = $zone['origin'];
}
}
} else {
$app->tpl->setVar('zones_rows_count', 0);
}
if (isset($_GET['submitted'])) {
validate_and_update($update_zones);
}
$app->tpl_defaults();
if (isset($result)) {
$app->tpl->setVar('result', $result);
$app->tpl->setInclude('content_tpl', 'templates/dns_bulk_editor_result.htm');
} else {
$app->tpl->setInclude('content_tpl', 'templates/dns_bulk_editor.htm');
}
$app->tpl->pparse();
function validate_and_update($update_zones) {
global $app, $wb, $client_group_ids, $result;
// Validate:
if ($client_group_ids == 0) {
$app->tpl->setVar('error', $wb['error_no_client_txt']);
return;
}
if (!isset($_POST['action'])) {
$app->tpl->setVar('error', $wb['error_no_action_txt']);
return;
}
switch ($_POST['action']) {
case 'a_records':
$app->tpl->setVar('action_a_records', true);
$app->tpl->setVar('a_records_search', htmlspecialchars($_POST['a_records_search']));
$app->tpl->setVar('a_records_replace', htmlspecialchars($_POST['a_records_replace']));
if (!validate_ips($_POST['a_records_search'], $_POST['a_records_replace'])) {
// Error message is set in validate_ips
return;
}
break;
case 'mx_records':
$app->tpl->setVar('action_mx_records', true);
$app->tpl->setVar('mx_records_search', htmlspecialchars($_POST['mx_records_search']));
$app->tpl->setVar('mx_records_replace', htmlspecialchars($_POST['mx_records_replace']));
if (!validate_zone($_POST['mx_records_search']) || !validate_zone($_POST['mx_records_replace'])) {
$app->tpl->setVar('error', $wb['error_invalid_dns_zone_txt']);
return;
}
break;
case 'ttl':
$app->tpl->setVar('action_ttl', true);
$app->tpl->setVar('ttl', htmlspecialchars($_POST['ttl']));
if (trim($_POST['ttl']) == '' || !is_numeric($_POST['ttl']) || intval($_POST['ttl']) < 60) {
$app->tpl->setVar('error', $wb['error_no_ttl_txt']);
return;
}
break;
}
if (!(isset($update_zones) && count($update_zones) > 0)) {
$app->tpl->setVar('error', $wb['error_no_zone_txt']);
return;
}
foreach ($update_zones as $id=>$origin) {
$sql = 'SELECT id FROM dns_soa WHERE id = ? AND '.$app->tform_base->getAuthSQL('u');
if (!is_array($app->db->queryOneRecord($sql, $id))) {
$app->tpl->setVar('error', $wb['error_invalid_zone_txt']);
return;
}
}
// Update:
switch ($_POST['action']) {
case 'a_records':
$result = '<h3>'.$wb['a_records_txt'].'</h3>';
foreach ($update_zones as $id=>$origin) {
$result .= "<h4>".$wb['zone_txt']." $origin</h4>";
$records = $app->db->queryAllRecords('SELECT id, type, name FROM dns_rr WHERE zone = ? AND data = ? AND type IN (\'A\', \'AAAA\') ORDER BY 2,3', $id, $_POST['a_records_search']);
if (count($records) == 0) {
// Zone has no records or no matching records
$result .= $wb['no_matches_txt'];
continue;
}
$result .= "<ul>";
foreach ($records as $record) {
$app->db->datalogUpdate('dns_rr', "data='".$app->db->escape($_POST['a_records_replace'])."'", 'id', $record['id']);
$result .= '<li>'.$record['type']." ".$record['name']." ".htmlentities($_POST['a_records_search']).' &#x27a1; <strong>'.htmlentities($_POST['a_records_replace']).'</strong></li>';
}
$result .= "</ul>";
if (count($records) > 0) {
soa_increase_serial($id);
}
}
break;
case 'mx_records':
$result = '<h3>'.$wb['mx_records_txt'].'</h3>';
foreach ($update_zones as $id=>$origin) {
$result .= "<h4>".$wb['zone_txt']." $origin</h4>";
$search_zone = normalize_zone($_POST['mx_records_search']);
$replace_zone = normalize_zone($_POST['mx_records_replace']);
$records = $app->db->queryAllRecords('SELECT id, type, name FROM dns_rr WHERE zone = ? AND data = ? AND type = \'MX\' ORDER BY 2,3', $id, $search_zone);
if (count($records) == 0) {
// Zone has no records or no matching records
echo 'No matches';
$result .= $wb['no_matches_txt'];
continue;
}
$result .= "<ul>";
foreach ($records as $record) {
$app->db->datalogUpdate('dns_rr', "data='".$app->db->escape($replace_zone)."'", 'id', $record['id']);
$result .= '<li>'.$record['type']." ".$record['name']." ".$search_zone.' &#x27a1; <strong>'.$replace_zone.'</strong></li>';
}
$result .= "</ul>";
if (count($records) > 0) {
soa_increase_serial($id);
}
}
break;
case 'ttl':
$result = '<h3>'.$wb['ttl_txt'].'</h3>';
$ttl = intval($_POST['ttl']);
foreach ($update_zones as $id=>$origin) {
$result .= "<h4>".$wb['zone_txt']." $origin</h4>";
$records = $app->db->queryAllRecords('SELECT id, type, name FROM dns_rr WHERE zone = ? AND type IN (\'A\', \'AAAA\', \'MX\') ORDER BY 2,3', $id);
if (count($records) == 0) {
// Zone has no records?
$result .= $wb['no_matches_txt'];
continue;
}
$result .= "<ul>";
foreach ($records as $record) {
$app->db->datalogUpdate('dns_rr', "ttl=$ttl", 'id', $record['id']);
$result .= "<li>".$record['type']." ".$record['name']." <strong>$ttl</strong></li>";
}
$result .= "</ul>";
if (count($records) > 0) {
soa_increase_serial($id);
}
}
break;
}
}
function validate_ips($search, $replace) {
global $app, $wb;
if (trim($search) == '' || trim($replace) == '') {
$app->tpl->setVar('error', $wb['error_no_search_replace_txt']);
return false;
}
$search_ip_type = get_ip_type($search);
$replace_ip_type = get_ip_type($replace);
if ($search_ip_type == 'none' || $replace_ip_type == 'none') {
$app->tpl->setVar('error', $wb['error_invalid_ip_txt']);
return false;
}
if ($search_ip_type != $replace_ip_type) {
$app->tpl->setVar('error', $wb['error_ip_type_mismatch_txt']);
return false;
}
return true;
}
function get_ip_type($s) {
if (filter_var($s, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false) return 'IPv4';
if (filter_var($s, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false) return 'IPv6';
return 'none';
}
function validate_zone($zone) {
$s = normalize_zone($zone);
$result = preg_match('/^[a-z0-9\.\-\*]{1,255}$/', $s) === 1;
return $result;
}
function normalize_zone($zone) {
global $app;
$s = trim($zone);
$s = strtolower($s);
$s = $app->functions->idn_encode($s);
return $s;
}
function soa_increase_serial($id) {
global $app;
$soa = $app->db->queryOneRecord('SELECT serial FROM dns_soa WHERE id = ?', $id);
$serial = $app->validate_dns->increase_serial($soa['serial']);
$app->db->datalogUpdate('dns_soa', "serial=$serial", 'id', $id);
}
?>
......@@ -19,4 +19,4 @@ $wb['Add DNS Zone'] = 'DNS Zone hinzufügen';
$wb['Templates'] = 'Vorlagen';
$wb['Secondary Zones'] = 'Slave DNS-Zonen';
$wb['Import Zone File'] = 'Zonen-Datei-Import';
?>
$wb['Bulk Editor'] = 'Bulk-Editor';
<?php
$wb['list_head_txt'] = 'Bulk-Editor';
$wb['list_desc_txt'] = 'DNS-Einträge per Suchen und Ersetzen ändern';
$wb['error_txt'] = 'Fehler';
$wb['error_no_client_txt'] = 'Bitte einen Kunden auswählen';
$wb['error_no_action_txt'] = 'Bitte eine Aktion auswählen';
$wb['error_no_zone_txt'] = 'Bitte mindestens eine Zone auswählen';
$wb['error_invalid_zone_txt'] = 'Ungültige Zone';
$wb['error_no_search_replace_txt'] = 'Bitte Werte für Suchen und Ersetzen eingeben';
$wb['error_no_ttl_txt'] = 'Bitte gültigen TTL-Wert eingeben';
$wb['error_invalid_ip_txt'] = 'Bitte eine gültige IP-Adresse eingeben';
$wb['error_invalid_dns_zone_txt'] = 'Bitte einen gültigen Zonennamen eingeben';
$wb['error_ip_type_mismatch_txt'] = 'Bitte entweder IPv4- oder IPv6-Adressen eingeben';
$wb['legend_client_txt'] = 'Kunde auswählen';
$wb['legend_action_txt'] = 'Aktion auswählen';
$wb['legend_zones_txt'] = 'Zonen auswählen';
$wb['legend_result_txt'] = 'Folgendes wurde geändert:';
$wb['select_client_txt'] = 'Bitte einen Kunden auswählen';
$wb['client_txt'] = 'Kunde';
$wb['search_txt'] = 'Suchen';
$wb['replace_txt'] = 'Ersetzen';
$wb['a_records_txt'] = 'A-Records';
$wb['mx_records_txt'] = 'MX-Records';
$wb['ttl_txt'] = 'TTL';
$wb['ttl_desc_txt'] = 'von A-, AAAA- und MX-Records';
$wb['check_uncheck_all_txt'] = 'Alle/keine auswählen';
$wb['zone_txt'] = 'Zone';
$wb['btn_ok_txt'] = 'Ändern';
$wb['no_matches_txt'] = 'Keine Treffer.';
$wb['ttip_a_records_txt'] = 'Bitte geben Sie entweder eine vollständige IPv4-Adresse oder eine vollständige IPv6-Adresse in die Felder ein.';
$wb['ttip_mx_records_txt'] = 'Wenn Sie einen kompletten Hostnamen angeben, vergessen Sie bitte auf keinen Fall, einen Punkt am Ende hinzuzufügen, z.B.: www.meinedomain.de<b><u>.</u></b><br><br>Wenn Sie eine Subdomain Ihrer Domain angeben und und die Domain weglassen (z.B. <i>www</i> statt <i>www.meinedomain.de</i>), dann geben Sie bitte <b>keinen</b> Punkt am Ende an.';
$wb['ttip_ttl_txt'] = 'Bitte geben Sie den gewünschten TTL-Wert als Ganzzahl in Sekunden ein.';
?>
......@@ -20,4 +20,4 @@ $wb['Add DNS Zone'] = 'Add DNS-Zone';
$wb['Templates'] = 'Templates';
$wb['Secondary Zones'] = 'Secondary DNS-Zones';
$wb['Import Zone File'] = 'Zone-File Import';
?>
\ No newline at end of file
$wb['Bulk Editor'] = 'Bulk Editor';
\ No newline at end of file
<?php
$wb['list_head_txt'] = 'Bulk Editor';
$wb['list_desc_txt'] = 'Change DNS records using search and replace';
$wb['error_txt'] = 'Error';
$wb['error_no_client_txt'] = 'Please select a client';
$wb['error_no_action_txt'] = 'Please select an action';
$wb['error_no_zone_txt'] = 'Please select at least one zone';
$wb['error_invalid_zone_txt'] = 'Invalid zone';
$wb['error_no_search_replace_txt'] = 'Please enter values for search and replace';
$wb['error_no_ttl_txt'] = 'Please enter valid TTL value';
$wb['error_invalid_ip_txt'] = 'Please enter a valid IP address';
$wb['error_invalid_dns_zone_txt'] = 'Please enter a valid zone name';
$wb['error_ip_type_mismatch_txt'] = 'Please enter either IPv4 or IPv6 addresses';
$wb['legend_client_txt'] = 'Select customer';
$wb['legend_action_txt'] = 'Select action';
$wb['legend_zones_txt'] = 'Select zones';
$wb['legend_result_txt'] = 'The following changes were made:';
$wb['select_client_txt'] = 'Please select a customer';
$wb['client_txt'] = 'Client';
$wb['search_txt'] = 'Search';
$wb['replace_txt'] = 'Replace';
$wb['a_records_txt'] = 'A Records';
$wb['mx_records_txt'] = 'MX Records';
$wb['ttl_txt'] = 'TTL';
$wb['ttl_desc_txt'] = 'of A, AAAA and MX records';
$wb['check_uncheck_all_txt'] = 'Check/uncheck all';
$wb['zone_txt'] = 'Zone';
$wb['btn_ok_txt'] = 'Update';
$wb['no_matches_txt'] = 'No matches.';
$wb['ttip_a_records_txt'] = 'Please enter either a valid IPv4 or a valid IPv6 address into the fields.';
$wb['ttip_mx_records_txt'] = 'If you enter a fully qualified domain name, do not forget to enter a dot at the end, for example: www.example.com<b><u>.</u></b><br><br>If you enter a subdomain of your domain, please enter only the subdomain and no dot at the end, for example <i>www</i>.';
$wb['ttip_ttl_txt'] = 'Please enter the desired TTL value in seconds.';
?>
......@@ -25,6 +25,10 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
'html_id' => 'dns_template_list');
}
$items[] = array( 'title' => "Bulk Editor",
'target' => 'content',
'link' => 'dns/dns_bulk_editor.php',
'html_id' => 'dns_bulk_editor');
$module["nav"][] = array( 'title' => 'DNS Wizard',
'open' => 1,
......
<tmpl_if name="list_head_txt">
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
</tmpl_if>
<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
<tmpl_if name="error">
<div class='alert alert-danger clear'>
<div class='alert-label'><strong><tmpl_var name="error_txt"></strong></div>
<div class='alert-content'>
<ol>
<li><tmpl_var name="error"></li>
</ol>
</div>
</div>
</tmpl_if>
<div class="content-tab-wrapper">
<div id="tabbox_content" class="tab-content">
<div class="tab-pane active fade in">
<tmpl_if name='is_admin'>
<legend><tmpl_var name="legend_client_txt"></legend>
<div class="form-group">
<label for="client_group_id" class="col-sm-2 control-label">{tmpl_var name='client_txt'}</label>
<div class="col-sm-10">
<select name="client_group_id" id="client_group_id" class="form-control" onchange="ISPConfig.submitForm('pageForm','dns/dns_bulk_editor.php');">
{tmpl_var name='clients_select_options'}
</select>
</div>
</div>
</tmpl_if>
<legend><tmpl_var name="legend_action_txt"></legend>
<div class="form-group">
<div class="col-sm-1 text-center">
<div class="ttip" title="{tmpl_var name='ttip_a_records_txt'}"></div>
<input type="radio" name="action" value="a_records" id="action_a_records"{tmpl_if name='action_a_records'} checked="true"{/tmpl_if}>
</div>
<label class="col-sm-1 control-label">{tmpl_var name='a_records_txt'}</label>
<label class="col-sm-1 control-label">{tmpl_var name='search_txt'}</label>
<div class="col-sm-4">
<input type="text" name="a_records_search" id="a_records_search" value="{tmpl_var name='a_records_search'}" class="form-control" {tmpl_if name='action_a_records' op='!=' value='true'} disabled="true"{/tmpl_if}/>
</div>
<label class="col-sm-1 control-label">{tmpl_var name='replace_txt'}</label>
<div class="col-sm-4">
<input type="text" name="a_records_replace" id="a_records_replace" value="{tmpl_var name='a_records_replace'}" class="form-control" {tmpl_if name='action_a_records' op='!=' value='true'} disabled="true"{/tmpl_if}//>
</div>
</div>
<div class="form-group">
<div class="col-sm-1 text-center">
<div class="ttip" title="{tmpl_var name='ttip_mx_records_txt'}"></div>
<input type="radio" name="action" value="mx_records" id="action_mx_records"{tmpl_if name='action_mx_records'} checked="true"{/tmpl_if}>
</div>
<label class="col-sm-1 control-label">{tmpl_var name='mx_records_txt'}</label>
<label class="col-sm-1 control-label">{tmpl_var name='search_txt'}</label>
<div class="col-sm-4">
<input type="text" name="mx_records_search" id="mx_records_search" value="{tmpl_var name='mx_records_search'}" class="form-control" {tmpl_if name='action_mx_records' op='!=' value='true'} disabled="true"{/tmpl_if}/>
</div>
<label class="col-sm-1 control-label">{tmpl_var name='replace_txt'}</label>
<div class="col-sm-4">
<input type="text" name="mx_records_replace" id="mx_records_replace" value="{tmpl_var name='mx_records_replace'}" class="form-control" {tmpl_if name='action_mx_records' op='!=' value='true'} disabled="true"{/tmpl_if}/>
</div>
</div>
<div class="form-group">
<div class="col-sm-1 text-center">
<div class="ttip" title="{tmpl_var name='ttip_ttl_txt'}"></div>
<input type="radio" name="action" value="ttl" id="action_ttl"{tmpl_if name='action_ttl'} checked="true"{/tmpl_if} />
</div>
<label class="col-sm-1 control-label">{tmpl_var name='ttl_txt'}</label>
<div class="col-sm-1"></div>
<div class="col-sm-1">
<input type="text" name="ttl" id="ttl" value="{tmpl_var name='ttl'}" class="form-control" {tmpl_if name='action_ttl' op='!=' value='true'} disabled="true"{/tmpl_if}/>
</div>
<div class="col-sm-8">{tmpl_var name='ttl_desc_txt'}</div>
</div>
<legend><tmpl_var name="legend_zones_txt"></legend>
<div class="table-wrapper marginTop15">
<table class="table">
<thead class="dark form-group-sm">
<th width="10%"><input type="checkbox" class="check_uncheck_all"></th>
<th>{tmpl_var name='zone_txt'}</th>
</thead>
<tmpl_if name='zones_rows_count' op='>' value='0'>
<tbody>
<tmpl_loop name='zones_rows'>
<tr>
<td><input type="checkbox" value="y" name="zone_{tmpl_var name='zone_id'}" id="zone_{tmpl_var name='zone_id'}" {tmpl_if name='zone_selected'}checked="true"{/tmpl_if}></td>
<td>{tmpl_var name='zone_name'}</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td colspan=2><input type="checkbox" class="check_uncheck_all"> {tmpl_var name='check_uncheck_all_txt'}</td>
</tr>
</tfoot>
</tmpl_if>
</table>
</div>
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_ok_txt'}" name="btn_ok" onclick=";ISPConfig.submitForm('pageForm','dns/dns_bulk_editor.php?submitted=y');">{tmpl_var name='btn_ok_txt'}</button>
</div></div>
</div>
</div>
</div>
<script language="JavaScript" type="text/javascript">
jQuery('#action_a_records').click(function() {
jQuery('#a_records_search').prop('disabled', false);
jQuery('#a_records_replace').prop('disabled', false);
jQuery('#mx_records_search').prop('disabled', true);
jQuery('#mx_records_replace').prop('disabled', true);
jQuery('#ttl').prop('disabled', true);
});
jQuery('#action_mx_records').click(function() {
jQuery('#a_records_search').prop('disabled', true);
jQuery('#a_records_replace').prop('disabled', true);
jQuery('#mx_records_search').prop('disabled', false);
jQuery('#mx_records_replace').prop('disabled', false);
jQuery('#ttl').prop('disabled', true);
});
jQuery('#action_ttl').click(function() {
jQuery('#a_records_search').prop('disabled', true);
jQuery('#a_records_replace').prop('disabled', true);
jQuery('#mx_records_search').prop('disabled', true);
jQuery('#mx_records_replace').prop('disabled', true);
jQuery('#ttl').prop('disabled', false);
});
jQuery('.check_uncheck_all').click(function() {
jQuery('input[type=checkbox]').prop('checked', this.checked);
});
</script>
<tmpl_if name="list_head_txt">
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
</tmpl_if>
<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
<tmpl_if name="error">
<div class='alert alert-danger clear'>
<div class='alert-label'><strong><tmpl_var name="error_txt"></strong></div>
<div class='alert-content'>
<ol>
<li><tmpl_var name="error"></li>
</ol>
</div>
</div>
</tmpl_if>
<div class="content-tab-wrapper">
<div id="tabbox_content" class="tab-content">
<div class="tab-pane active fade in">
<legend><tmpl_var name="legend_result_txt"></legend>
<tmpl_var name="result">
</div>
</div>