Files

77 lines
2.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{template header.html}
<script type="text/javascript">
function dr_test(obj, name, domain) {
$(obj).html('{dr_lang('在检测中')}');
$.ajax({
url: domain+"/rewrite-test.html",
type: 'GET',
timeout: 1000,
dataType: "jsonp",
jsonp: "callback",
jsonpCallback: "callback"
}).done(function(data) {
$(obj).html('{dr_lang('环境检测')}');
if (data.code) {
dr_tips(1, data.msg);
} else {
alert('域名【'+name+'】不支持伪静态,首先需要确定服务器支持rewrite模块并开启了,其次需要正确配置上面的方法');
}
}) .fail(function() {
$(obj).html('{dr_lang('环境检测')}');
alert('域名【'+name+'】不支持伪静态,首先需要确定服务器支持rewrite模块并开启了,其次需要正确配置上面的方法');
});
}
function dr_rewrite_config() {
$('#dr_write').hide();
$.ajax({
type: "GET",
url: "{dr_url('module/urlrule/rewrite_add')}",
dataType: "json",
success: function (data) {
if (data.code) {
dr_tips(1, data.msg);
$('#dr_write').show();
$('#dr_code').html(data.data.code);
$('#dr_error').html(data.data.error);
} else {
dr_tips(0, data.msg);
}
},
error: function(HttpRequest, ajaxOptions, thrownError) {
dr_ajax_alert_error(HttpRequest, this, thrownError);
}
});
}
</script>
<div class="note note-danger">
<p>{dr_lang('当前服务器是:<b>%s</b>', $name)}</p>
</div>
<div class="portlet light bordered">
<div class="portlet-title">
<div class="caption">
<span class="caption-subject font-green sbold">{$name}</span>
<span class="caption-helper">需要在服务器中配置,不懂的可以咨询服务器空间商</span>
</div>
</div>
<div class="portlet-body">
<p>{$note}</p>
{if $code}
<p><textarea class="form-control" style="width:90%; height:{php echo $count * 25;}px;">{$code}</textarea></p>
{/if}
<ul class="list-group" style="width:90%;">
{loop $domain $name $cname}
<li class="list-group-item">{$cname}{$name}
<span class="badge badge badge-danger" style="cursor: pointer" onClick="dr_test(this, '{$name}', '{dr_http_prefix($name)}')">{dr_lang('环境检测')} </span>
</li>
{/loop}
</ul>
</div>
</div>
</div>
{template footer.html}