Initial project files: BESCMS full source
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{template "header.html"}
|
||||
|
||||
<form class="form-horizontal" role="form" id="myform">
|
||||
{$form}
|
||||
<div class="form-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{dr_lang('自动任务权限')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio mt-radio-outline"><input name="test2" onclick="dr_cron_value(0)" type="radio" {if !$data['SYS_CRON_AUTH']}checked{/if} /> {dr_lang('任意服务器执行')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input name="test2" onclick="dr_cron_value(1)" type="radio" {if $data['SYS_CRON_AUTH'] && $data['SYS_CRON_AUTH'] != 'cli'}checked{/if} /> {dr_lang('限本服务器IP')} <span></span></label>
|
||||
<label class="mt-radio mt-radio-outline"><input name="test2" onclick="dr_cron_value(2)" type="radio" {if $data['SYS_CRON_AUTH'] == 'cli'}checked{/if} /> {dr_lang('CLI模式运行')} <span></span></label>
|
||||
</div>
|
||||
<input type="hidden" id="dr_cron_sync" value="{$data['SYS_CRON_AUTH']}" />
|
||||
<label id="dr_cron_row" {if $data['SYS_CRON_AUTH'] && $data['SYS_CRON_AUTH'] != 'cli'}{else}style="display:none"{/if}><input id="dr_cron" class="form-control input-large" type="text" name="data[SYS_CRON_AUTH]" value="{$data['SYS_CRON_AUTH']}" ></label>
|
||||
<span class="help-block">{dr_lang('填写本服务器的IP地址或者CLI模式运行,可以限制任务脚本的执行权限,防止被其他人恶意执行')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{dr_lang('URL方式的脚本地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{ROOT_URL}api/cron.php</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{dr_lang('CLI模式的脚本实际地址')}</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">{WEBPATH}api/cron.php</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function dr_cron_value(id) {
|
||||
if (id == "1") {
|
||||
$("#dr_cron_row").show();
|
||||
$("#dr_cron").val($("#dr_cron_sync").val());
|
||||
} else if (id == "2") {
|
||||
$("#dr_cron_row").hide();
|
||||
$("#dr_cron_sync").val('cli');
|
||||
$("#dr_cron").val('cli');
|
||||
} else {
|
||||
$("#dr_cron_row").hide();
|
||||
$("#dr_cron_sync").val($("#dr_cron").val());
|
||||
$("#dr_cron").val('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{template "footer.html"}
|
||||
Reference in New Issue
Block a user