-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecord_add.php
executable file
·60 lines (59 loc) · 3.12 KB
/
record_add.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<div>
<h3><a href="/domain">我的域名</a> > <a href="/record/<?php echo $domain['id'];?>"><?php echo $domain['domain'];?></a> > 添加记录</h3>
<form role="form" action="" method="post" onsubmit="return false;">
<div class="form-group">
<label for="sub_domain">记录名称</label>
<input type="text" class="form-control" name="sub_domain" id="name" value="<?php echo @$record['sub_domain'];?>" />
</div>
<div class="form-group">
<label for="record_type">记录类型</label>
<select id="record_type" name="record_type" class="form-control">
<option value="A">A</option>
<option value="CNAME">CNAME</option>
<option value="MX">MX</option>
<option value="TXT">TXT</option>
<option value="NS">NS</option>
<option value="AAAA">AAAA</option>
<option value="SRV">SRV</option>
<option value="URL">URL</option>
</select>
</div>
<div class="form-group">
<label for="record_line">记录线路</label>
<select id="record_line" name="record_line" class="form-control">
<option value="默认">默认</option>
<option value="联通">联通</option>
<option value="电信">电信</option>
<option value="教育网">教育网</option>
<option value="百度">百度</option>
</select>
</div>
<div class="form-group">
<label for="value">记录值</label>
<input type="text" class="form-control" name="value" id="value" value="<?php echo @$record['value'];?>" />
</div>
<div class="form-group" id="sub_domain_mx">
<label for="mx">MX</label>
<input type="text" class="form-control" name="mx" id="mx" placeholder="范围:1-20" value="<?php echo @$record['mx'];?>" />
</div>
<div class="form-group">
<label for="ttl">TTL</label>
<input type="text" class="form-control" name="ttl" id="ttl" placeholder="范围:1-604800" value="<?php echo @$record['ttl'];?>" />
</div>
<?php if ( ! empty($record)):?>
<input type="hidden" name="record_id" value="<?php echo $record['id'];?>" />
<?php endif;?>
<input type="hidden" name="domain_id" value="<?php echo $domain['id'];?>" />
<input type="button" value="添加" class="btn btn-default" onclick="ajax_submit_form('/record/insert/', this.form, '/record/<?php echo $domain['id'];?>');" />
</form>
</div>
<div>
<h3>导入纪录</h3>
<form role="form" action="/import/record/<?php echo $domain['id'];?>" method="post" enctype="multipart/form-data" onsubmit="$(this).find('input[type=submit]').attr('disabled',true);">
<div class="form-group">
<label for="domain_xml">域名XML文件</label>
<input type="file" name="upload_xml" id="domain_xml" />
</div>
<input type="submit" class="btn btn-default" />
</form>
</div>