init
This commit is contained in:
153
app/admin/view/action_log/edit.html
Executable file
153
app/admin/view/action_log/edit.html
Executable file
@@ -0,0 +1,153 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
日志编辑
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/action_log/lists');?>"> 日志列表</a></li>
|
||||
<li class="active">日志</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/action_log/update');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="title" id="name" required value="<?php echo $action_log['title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ip" class="col-sm-2 control-label">IP</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="ip" id="ip" value="<?php echo $action_log['ip'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(IP)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">网址</label>
|
||||
<div class="col-sm-5 has-feedback">
|
||||
<input type="text" class="form-control" name="url" value="<?php echo $action_log['url'];?>">
|
||||
<span class="fa fa-globe form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(网址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="param" class="col-sm-2 control-label">参数</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="param"><?php echo $action_log['param'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(参数)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="content"><?php echo $action_log['content'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="agree"> 确认</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $action_log['id'];?>" type="hidden">
|
||||
<div class="col-sm-2 col-sm-offset-2">
|
||||
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
|
||||
</div>
|
||||
<!-- /. row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">快捷入口</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="<?php echo url('/admin/action_log/lists');?>" class="btn btn-block btn-primary">日志列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('title');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('日志必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//common.js
|
||||
function isNull(data) {
|
||||
return (data == "" || data == undefined || data == null) ? true : false;
|
||||
}
|
||||
function trim(str) {
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
</script>
|
||||
109
app/admin/view/action_log/lists.html
Executable file
109
app/admin/view/action_log/lists.html
Executable file
@@ -0,0 +1,109 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
日志管理
|
||||
<small>日志列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/action_log/lists');?>"> 日志</a></li>
|
||||
<li class="active"> 日志列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">日志列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="<?php echo $search['skeyword'];?>">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th width="90rem" class="text-center">标题</th>
|
||||
<th>内容</th>
|
||||
<th width="70rem" class="text-center">IP</th>
|
||||
<th width="75rem" class="text-center">时间</th>
|
||||
<th width="90rem" class="text-center">操作人员</th>
|
||||
<th width="90rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$action_log):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $action_log['id'];?>"></td>
|
||||
<td class="text-center">
|
||||
<a href="<?php echo url('/admin/action_log/edit',['id'=>$action_log['id']]);?>"><?php echo $action_log['id'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><?php echo $action_log['title'];?></td>
|
||||
<td style="word-break:break-all;"><?php echo $action_log['content'];?></td>
|
||||
<td class="text-center"><?php echo $action_log['ip'];?></td>
|
||||
<td class="text-center"><?php echo date('Y-m-d H:i:s',$action_log['addtime']);?></td>
|
||||
<td class="text-center"><?php echo $action_log['username'];?></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/action_log/edit',['id'=>$action_log['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $action_log['id'];?>" data-url="<?php echo url('/admin/action_log/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls row">
|
||||
<div class="col-sm-6">
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/action_log/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/action_log/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
<?php if($page):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user