mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 07:17:22 +08:00
批量添加解析支持设置备注
This commit is contained in:
parent
e56122d7d0
commit
70d3922013
@ -837,6 +837,7 @@ class Domain extends BaseController
|
||||
$line = input('post.line', null, 'trim');
|
||||
$ttl = input('post.ttl/d', 600);
|
||||
$mx = input('post.mx/d', 1);
|
||||
$remark = input('post.remark', null, 'trim');
|
||||
$recordlist = explode("\n", $record);
|
||||
|
||||
if (empty($record) || empty($recordlist)) {
|
||||
@ -858,7 +859,7 @@ class Domain extends BaseController
|
||||
$arr = explode(' ', $record);
|
||||
if (empty($record) || empty($arr[0]) || empty($arr[1])) continue;
|
||||
$thistype = empty($type) ? getDnsType($arr[1]) : $type;
|
||||
$recordid = $dns->addDomainRecord($arr[0], $thistype, $arr[1], $line, $ttl, $mx);
|
||||
$recordid = $dns->addDomainRecord($arr[0], $thistype, $arr[1], $line, $ttl, $mx, null, $remark);
|
||||
if ($recordid) {
|
||||
$this->add_log($drow['name'], '添加解析', $arr[0].' ['.$thistype.'] '.$arr[1].' (线路:'.$line.' TTL:'.$ttl.')');
|
||||
$success++;
|
||||
|
||||
@ -54,8 +54,6 @@ class Index extends BaseController
|
||||
|
||||
if (config('app.dbversion') && config_get('version') != config('app.dbversion')) {
|
||||
$this->db_update();
|
||||
config_set('version', config('app.dbversion'));
|
||||
Cache::clear();
|
||||
}
|
||||
|
||||
$tmp = 'version()';
|
||||
@ -87,8 +85,9 @@ class Index extends BaseController
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
config_set('version', config('app.dbversion'));
|
||||
Cache::clear();
|
||||
if(Db::name('account')->count() > 0 && Db::name('account')->whereNotNull('config')->count() == 0) {
|
||||
Cache::clear();
|
||||
$accounts = Db::name('account')->select();
|
||||
foreach ($accounts as $account) {
|
||||
if (!empty($account['config']) || !isset(\app\lib\DnsHelper::$dns_config[$account['type']])) continue;
|
||||
|
||||
@ -880,7 +880,9 @@ class DeployHelper
|
||||
sudo visudo<br/>
|
||||
#在文件最后一行增加以下内容,需要将username替换成自己的用户名<br/>
|
||||
username ALL=(ALL) NOPASSWD: NOPASSWD: ALL<br/>
|
||||
ctrl+x 保存退出',
|
||||
ctrl+x 保存退出<br/>
|
||||
sudo mkdir -p /home/<用户名><br/>
|
||||
sudo chown -R <用户名>: /home/<用户名><br/>',
|
||||
'tasknote' => '系统会根据关联SSL证书的域名,自动更新对应证书',
|
||||
'inputs' => [
|
||||
'host' => [
|
||||
|
||||
@ -48,6 +48,12 @@
|
||||
<input type="text" class="form-control" name="ttl" value="600" placeholder="指解析结果在DNS服务器中的缓存时间" required min="{$minTTL}">
|
||||
</div>
|
||||
</div>
|
||||
{if $dnsconfig.remark == 2}<div class="form-group">
|
||||
<label class="col-sm-3 control-label no-padding-right">备注</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="remark" placeholder="">
|
||||
</div>
|
||||
</div>{/if}
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-6"><button type="button" class="btn btn-primary" onclick="save()">添加</button></div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user