<?php

//////////////////////////////////////////////////////////////
//===========================================================
// editdnsplan_theme.php
//===========================================================
// SOFTACULOUS VIRTUALIZOR
// Version : 2.1.7
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Julien
// Date:       9th July 2012
// Time:       00:51 hrs
// Site:       https://www.virtualizor.com/ (SOFTACULOUS VIRTUALIZOR)
// ----------------------------------------------------------
// Please Read the Terms of use at https://www.virtualizor.com
// ----------------------------------------------------------
//===========================================================
// (c)Softaculous Ltd.
//===========================================================
//////////////////////////////////////////////////////////////

if(!defined('VIRTUALIZOR')){

	die('Hacking Attempt');

}

function editdnsplan_theme(){

global $theme, $globals, $kernel, $user, $l, $error, $done, $dns_servers, $dnsplan;

softheader($l['<title>']);
					

echo page_header(__('Edit DNS Plan'), 'icon icon-pdns', '', 0, 0, '');

$breadcrumbs = array( 'dashboard', 'lm_dnsplans', 'lms_edit_dns_plan');

echo get_breadcrumb($breadcrumbs);

error_handle($error);

if(!empty($done)){
	show_alert(__('The DNS Plan has been edited. Return to <a href="index.php?act=dnsplans">Plans Overview</a>'));
}

echo '<script language="javascript" type="text/javascript"></script>
<div class="card p-2 mx-3">
	<form accept-charset="'.$globals['charset'].'" name="editdnsplan" method="post" action="" class="form-horizontal">
		<div class="row mx-auto w-100 my-3">
			<div class="col-sm-4">
				<label class="control-label">'.__('Plan Name').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('The name of this plan').'"><i class="fas text-primary fa-info-circle"></i></a></label>
			</div>
			<div class="col-sm-4">
				<input type="text" class="form-control" name="plan_name" id="plan_name" size="30" value="'.POSTval('plan_name', $dnsplan['plan_name']).'" />
			</div>
		</div>
		<div class="row mx-auto w-100 my-3">
			<div class="col-sm-4">
				<label class="control-label">'.__('DNS Server').'&nbsp;<a class="info" data-placement="right" tooltip="'.__('The DNS server to be used').'"><i class="fas text-primary fa-info-circle"></i></a></label>
			</div>
			<div class="col-sm-4">	
				<select class="custom-select" name="dnsserverid">';
				foreach($dns_servers as $k => $v){
					echo '<option value="'.$v['id'].'" '.ex_POSTselect('dnsserverid', $v['id'], $dnsplan['pdnsid']).' >'.$v['name'].'</option>';
				}
		echo   '</select>
			</div>
		</div>
		<div class="row mx-auto w-100 my-3">
			<div class="col-sm-4">
				<label class="control-label">'.__('Max Domains').'</label><br />
			</div>
			<div class="col-sm-4">
				<input type="number" class="form-control" name="maxdomains" id="maxdomains" size="10" value="'.POSTval('maxdomains', $dnsplan['max_domains']).'" />
			</div>	
		</div>
		<div class="row mx-auto w-100 my-3">
			<div class="col-sm-4">
				<label class="control-label">'.__('Max Domain Records').'</label><br />	
			</div>
			<div class="col-sm-4">
				<input type="number" class="form-control" name="maxdomainsrec" id="maxdomainsrec" size="10" value="'.POSTval('maxdomainsrec', $dnsplan['max_domain_records']).'" />
			</div>	
		</div>
		<div class="row mx-auto w-100 my-3">
			<div class="col-sm-4">
				<label class="control-label">'.__('Default TTL').'</label><br />
			</div>
			<div class="col-sm-4">
				<input type="number" class="form-control" name="ttl" id="ttl" size="10" value="'.POSTval('ttl', $dnsplan['def_ttl']).'" />
			</div>	
		</div>
		<center>
			<input type="submit" name="editdnsplan" value="'.__('Edit DNS Plan').'" class="go_btn mt-5">
		</center>
	</form>
</div>';

softfooter();

}

?>