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>
|
||||
602
app/admin/view/ad/add.html
Executable file
602
app/admin/view/ad/add.html
Executable file
@@ -0,0 +1,602 @@
|
||||
<!-- 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/ad/lists');?>"> 广告列表</a></li>
|
||||
<li class="active"> 广告</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 代码</a></li>
|
||||
<li class="active"><a href="#navsecond" data-toggle="tab">图片</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">文字</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">FLASH</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane" id="navfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ad/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">广告名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">广告排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(广告排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeset" class="col-sm-2 control-label">时间限定</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="1"/> 限定时间
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="0" checked="checked"/> 不限时间
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(时间限定)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">投放时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="starttime" id="starttime1" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#starttime1');">开始</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="endtime" id="endtime1" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#endtime1');">结束</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(投放时间格式(0000-00-00 00:00:00))</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">广告内容</label>
|
||||
<div class="col-sm-5">
|
||||
<input name="normbody[style]" type="hidden" value="htmlcode"/>
|
||||
<textarea class="form-control" name="normbody[htmlcode]" id="htmlcode"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="expbody" class="col-sm-2 control-label">过期显示内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="expbody"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(过期显示内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">广告标识<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="active tab-pane" id="navsecond">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ad/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">广告名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">广告排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(广告排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeset" class="col-sm-2 control-label">时间限定</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="1"/> 限定时间
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="0" checked="checked"/> 不限时间
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(时间限定)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">投放时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="starttime" id="starttime2" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#starttime2');">开始</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="endtime" id="endtime2" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#endtime2');">结束</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(投放时间格式(0000-00-00 00:00:00))</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="video" class="col-sm-2 control-label">图片地址</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="hidden" name="normbody[style]" value="image"/>
|
||||
<input type="text" class="form-control" name="normbody[src]" id="imagesrc">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="webuploader_modal('imagesrc', '', '', 'image', 'file_call_back')">选择文件</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(图片地址*)</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="normbody[href]">
|
||||
<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="alt" class="col-sm-2 control-label">图片描述</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="normbody[alt]">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(图片描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">图片宽度</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="normbody[width]">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(图片宽度)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">图片高度</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="normbody[height]">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(图片高度)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="expbody" class="col-sm-2 control-label">过期显示内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="expbody"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(过期显示内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">广告标识<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ad/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">广告名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">广告排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(广告排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeset" class="col-sm-2 control-label">时间限定</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="1"/> 限定时间
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="0" checked="checked"/> 不限时间
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(时间限定)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">投放时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="starttime" id="starttime3" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#starttime3');">开始</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="endtime" id="endtime3" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#endtime3');">结束</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(投放时间格式(0000-00-00 00:00:00))</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="video" class="col-sm-2 control-label">文字内容</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="hidden" name="normbody[style]" value="text"/>
|
||||
<input type="text" class="form-control" name="normbody[text]">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文字内容*)</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="normbody[href]">
|
||||
<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="alt" class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="normbody[color]">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文字颜色 例如:red或#EF8684)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">文字大小</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="normbody[size]">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(文字大小 例如:4px或12px)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="expbody" class="col-sm-2 control-label">过期显示内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="expbody"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(过期显示内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">广告标识<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ad/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">广告名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">广告排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(广告排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeset" class="col-sm-2 control-label">时间限定</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="1"/> 限定时间
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="0" checked="checked"/> 不限时间
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(时间限定)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">投放时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="starttime" id="starttime4" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#starttime4');">开始</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="endtime" id="endtime4" value="" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#endtime4');">结束</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(投放时间格式(0000-00-00 00:00:00))</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">广告内容</label>
|
||||
<div class="col-sm-5">
|
||||
<input name="normbody[style]" type="hidden" value="flash"/>
|
||||
<textarea class="form-control" name="normbody[flash]" id="flash"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="expbody" class="col-sm-2 control-label">过期显示内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="expbody"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(过期显示内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">广告标识<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer">
|
||||
|
||||
<!-- /. row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</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/ad/lists');?>" class="btn btn-block btn-primary">广告列表</a>
|
||||
<a href="<?php echo url('/admin/ad/typelists');?>" class="btn btn-block btn-primary">广告类别</a>
|
||||
<a href="<?php echo url('/admin/ad/add');?>" 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(event) {
|
||||
event = event ? event : window.event;
|
||||
var obj = event.srcElement ? event.srcElement : event.target;
|
||||
var nameObj = obj.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = obj.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var typeidObj = obj.getElementById('typeid');
|
||||
if (isNaN(typeidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
typeidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
208
app/admin/view/ad/edit.html
Executable file
208
app/admin/view/ad/edit.html
Executable file
@@ -0,0 +1,208 @@
|
||||
<!-- 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/ad/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/ad/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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">图片信息</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">广告名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $ad['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告名称*)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid" id="typeid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">广告排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $ad['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(广告排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeset" class="col-sm-2 control-label">时间限定</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="1" <?php if($ad['timeset']):?>checked=""<?php endif;?>/> 限定时间
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="timeset" type="radio" value="0" <?php if(!$ad['timeset']):?>checked=""<?php endif;?>/> 不限时间
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(时间限定)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">投放时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="starttime" id="starttime" value="<?php echo empty($ad['starttime'])?'':date('Y-m-d H:i:s',$ad['starttime']);?>" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#starttime');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="endtime" id="endtime" value="<?php echo empty($ad['endtime'])?'':date('Y-m-d H:i:s',$ad['endtime']);?>" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#endtime');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(投放时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="normbody" class="col-sm-2 control-label">广告内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="normbody"><?php echo $ad['normbody'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="expbody" class="col-sm-2 control-label">过期显示内容</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="expbody"><?php echo $ad['expbody'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(过期显示内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">广告标识<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" id="tags" required value="<?php echo $ad['tags'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(广告标识*)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $ad['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/ad/lists');?>" class="btn btn-block btn-primary">广告列表</a>
|
||||
<a href="<?php echo url('/admin/ad/typelists');?>" class="btn btn-block btn-primary">广告类别</a>
|
||||
<a href="<?php echo url('/admin/ad/add');?>" 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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var typeidObj = document.getElementById('typeid');
|
||||
if (isNaN(typeidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
typeidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
137
app/admin/view/ad/lists.html
Executable file
137
app/admin/view/ad/lists.html
Executable file
@@ -0,0 +1,137 @@
|
||||
<!-- 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/ad/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>广告名称</th>
|
||||
<th width="135rem" class="text-center">广告标识</th>
|
||||
<th width="135rem" class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">广告排序</th>
|
||||
<th width="75rem" class="text-center">是否限时</th>
|
||||
<th width="75rem" class="text-center">结束时间</th>
|
||||
<th width="135rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$ad):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $ad['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $ad['id'];?></td>
|
||||
<td class="text-left">
|
||||
<a href="<?php echo url('/admin/ad/edit',['id'=>$ad['id']]);?>"><?php echo $ad['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><?php echo $ad['tags'];?></td>
|
||||
<td class="text-center">
|
||||
<?php echo $ad['typename'];?>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $ad['sort'];?>" type="text" data-id="<?php echo $ad['id'];?>" data-url="<?php echo url('/admin/ad/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<?php if ($ad['timeset'] == 0) {echo '不限时间';} else {echo '限定时间';}?>
|
||||
</td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$ad['endtime']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $ad['id'];?>" data-url="<?php echo url('/admin/ad/preview');?>" data-cod="preview-ad">预览</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/ad/edit',['id'=>$ad['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $ad['id'];?>" data-url="<?php echo url('/admin/ad/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/ad/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/ad/clear_cache');?>" data-cod="clearcache">清除Ad缓存</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/ad/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() {
|
||||
$("[data-cod='preview-ad']").click(function(event) {
|
||||
event = event ? event : window.event;
|
||||
var obj = event.srcElement ? event.srcElement : event.target;
|
||||
var param = {}, url, method;
|
||||
method = obj.getAttribute('data-method');
|
||||
param.id = obj.getAttribute('data-id');
|
||||
url = obj.getAttribute('data-url');
|
||||
$('#modal-adjs').remove();
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: param,
|
||||
dataType: "html",
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-adjs" class="modal fade">' + html + '</div>');
|
||||
$('#modal-adjs').modal({show: true, backdrop: false, keyboard: false});
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
21
app/admin/view/ad/preview.html
Executable file
21
app/admin/view/ad/preview.html
Executable file
@@ -0,0 +1,21 @@
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">广告预览内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label">JS调用代码:</label>
|
||||
<?php echo $showhtml;?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">预览:</label>
|
||||
</div>
|
||||
<iframe src="<?php echo $iframesrc;?>" style="width:100%;height:auto;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
102
app/admin/view/ad/typeadd.html
Executable file
102
app/admin/view/ad/typeadd.html
Executable file
@@ -0,0 +1,102 @@
|
||||
<!-- 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/ad/typelists');?>"> 类别列表</a></li>
|
||||
<li class="active"> 类别</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增类别</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ad/typecreate');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">类别名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">类别描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"></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 class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
function isNull(data) {
|
||||
return (data == "" || data == undefined || data == null) ? true : false;
|
||||
}
|
||||
function trim(str)
|
||||
{
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
</script>
|
||||
103
app/admin/view/ad/typeedit.html
Executable file
103
app/admin/view/ad/typeedit.html
Executable file
@@ -0,0 +1,103 @@
|
||||
<!-- 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/ad/typelists');?>"> 类别列表</a></li>
|
||||
<li class="active"> 类别</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增类别</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ad/typeupdate');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">类别名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $adtype['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">类别描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"><?php echo $adtype['description'];?></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 class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $adtype['id'];?>"/>
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
function isNull(data) {
|
||||
return (data == "" || data == undefined || data == null) ? true : false;
|
||||
}
|
||||
function trim(str)
|
||||
{
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
</script>
|
||||
101
app/admin/view/ad/typelists.html
Executable file
101
app/admin/view/ad/typelists.html
Executable file
@@ -0,0 +1,101 @@
|
||||
<!-- 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/ad/typelists');?>"> 类别</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="70rem" class="text-center">ID</th>
|
||||
<th class="text-center">类别名称</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th class="text-center">描述</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$adtype):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $adtype['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $adtype['id'];?></td>
|
||||
<td class="text-center"><?php echo $adtype['name'];?></td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$adtype['createtime']);?></td>
|
||||
<td class="text-center"><?php echo $adtype['description'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/ad/add',['typeid'=>$adtype['id']]);?>">添加广告</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/ad/typeedit',['id'=>$adtype['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $adtype['id'];?>" data-url="<?php echo url('/admin/ad/typedelete');?>" 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">
|
||||
<!-- Check all button -->
|
||||
<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/ad/typedeletes');?>" 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/ad/typeadd');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
136
app/admin/view/agent/add.html
Executable file
136
app/admin/view/agent/add.html
Executable file
@@ -0,0 +1,136 @@
|
||||
<!-- 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/shopselle/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 添加经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">添加经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/creat');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
150
app/admin/view/agent/edit.html
Executable file
150
app/admin/view/agent/edit.html
Executable file
@@ -0,0 +1,150 @@
|
||||
<!-- 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/agent/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 编辑经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required value="{$data.name}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required value="{$data.address}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required value="{$data.phone}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required value="{$data.country}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required value="{$data.province}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required value="{$data.city}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required value="{$data.area}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(区)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">是否启用</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="0" {if $data.stat==0}checked=''{/if}/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="1" {if $data.stat==1}checked=''{/if}/> 否
|
||||
</label>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
97
app/admin/view/agent/index.html
Executable file
97
app/admin/view/agent/index.html
Executable file
@@ -0,0 +1,97 @@
|
||||
<!-- 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/pinglun/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">
|
||||
<!---->
|
||||
<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">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="10%">ID</th>
|
||||
<th width="30%" style="text-align: center">经销商名</th>
|
||||
<th width="40%" class="text-center" style="margin: auto">经销商地址</th>
|
||||
<th width="10%">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="10%">{$vv.id}</th>
|
||||
<th width="30%" style="text-align: center">{$vv.name}</th>
|
||||
<th width="40%" class="text-center" style="margin: auto">{$vv.address}</th>
|
||||
<th width="10%">
|
||||
<a class="btn btn-xs btn-info" href="edit?id={$vv.id}">编辑</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/agent/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
161
app/admin/view/agents/lists.html
Executable file
161
app/admin/view/agents/lists.html
Executable file
@@ -0,0 +1,161 @@
|
||||
<!-- 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/agents/lists');?>"> 代理商申请</a></li>
|
||||
<li class="active"> 代理商申请列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agents/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" placeholder="申请人、手机或兴趣产品" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">代理商申请列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="160rem"style="text-align: center">公司名称</th>
|
||||
<th width="60rem" style="text-align: center">姓名</th>
|
||||
<th width="60rem" style="text-align: center">邮箱</th>
|
||||
<th width="60rem" style="text-align: center">手机</th>
|
||||
<th class="text-center" style="margin: auto">想代理的产品</th>
|
||||
<th width="120rem" style="text-align: center">代理区域/国家</th>
|
||||
<th wwidth="100rem" style="text-align: center">提交时间</th>
|
||||
<th wwidth="35rem" style="text-align: center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<th class="text-center">{$vv.company}</th>
|
||||
<th class="text-center">{$vv.name} {$vv.last_name}</th>
|
||||
<th class="text-center">{$vv.email}</th>
|
||||
<th class="text-center">{$vv.phone}</th>
|
||||
<th class="text-center">{$vv.interest}</th>
|
||||
<th class="text-center">{$vv.country}</th>
|
||||
<th class="text-center">{$vv.createtime}</th>
|
||||
<th class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/agents/view',['id'=>$vv['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/agents/delete');?>" data-cod="dowarn">删除</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/agents/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
178
app/admin/view/agents/view.html
Executable file
178
app/admin/view/agents/view.html
Executable file
@@ -0,0 +1,178 @@
|
||||
<!-- 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/agents/lists');?>"> 代理商申请列表</a></li>
|
||||
<li class="active"> 查看代理商申请</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">查看代理商申请</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agents/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">公司名称</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.company}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Company Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">官网</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.uri}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Official Website)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">姓名</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.name} {$data.last_name}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Your Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">邮箱</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.email}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Email)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">手机</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.phone}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Phone Number)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">想代理的产品</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.interest}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Products you are interested in?)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">是否保留库存</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{if $data.is_inventory==0}No{else}Yes{/if}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Are you will to keep inventory?)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">留言</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.message}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">Message</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">想代理的国家/区域</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.country} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Distribution region)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">申请时间</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.createtime}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<hr>
|
||||
<div class="tab-pane form-horizontal" id="tabfirst">
|
||||
|
||||
|
||||
<div class="col-sm-12 control-label" style="text-align: left;padding: 10px 25px;">访问监控信息</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">来源设备</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">
|
||||
{$data.drvice}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">设备信息</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.user_agent}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问落地页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.url}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问来源页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.refer}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">IP定位</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.ip} {$data.city} {$data.province} {$data.state}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
496
app/admin/view/article/add.html
Executable file
496
app/admin/view/article/add.html
Executable file
@@ -0,0 +1,496 @@
|
||||
<!-- 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/article/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/article/create');?>" 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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</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">新闻名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="cid" id="cid" >
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="product_series">所属型号</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="mult-select-imitate">
|
||||
<div class="mult-select-view">默认值</div>
|
||||
<span class="mult-select-icon-cert">^</span>
|
||||
<input type="hidden" name="product_series" id="product_series" />
|
||||
<select multiple size="15">
|
||||
<?php echo $seriesOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(按ctrl键多选)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">新闻排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(新闻排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="viewcount" class="col-sm-2 control-label">浏览数量<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="viewcount" id="viewcount">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(浏览数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="viewcount" class="col-sm-2 control-label">点赞数量</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="zancount" value="0">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(点赞数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="headline" class="col-sm-2 control-label">首页推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="headline" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="headline" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(首页推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label for="ishot" class="col-sm-2 control-label">热门推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="ishot" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="ishot" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(热门推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="form-group jump_link" style="display:none;">
|
||||
<label for="jump_link" class="col-sm-2 control-label">社区链接</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" id="jump_link" name="jump_link">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(社区评测)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="writer" class="col-sm-2 control-label">新闻作者</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="writer">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻作者)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="source" class="col-sm-2 control-label">新闻来源</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="source">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻来源)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">新闻标签</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻标签,多个用英文逗号分隔)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">新闻描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(新闻描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="createtime" class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="createtime" value="<?php //echo date('Y-m-d H:i:s');?>" id="laydate_createtime" onclick="laydate_datetime('#laydate_createtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_createtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</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 class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">新闻图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="article-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/article/lists');?>" class="btn btn-block btn-primary">新闻列表</a>
|
||||
<a href="<?php echo url('/admin/article_category/lists');?>" class="btn btn-block btn-primary">新闻分类</a>
|
||||
<a href="<?php echo url('/admin/article/add');?>" 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;
|
||||
}
|
||||
|
||||
.mult-select-imitate {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mult-select-imitate .mult-select-view {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
color: #555;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid #ccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mult-select-imitate .mult-select-view.active {
|
||||
border: 1px solid rgb(60, 141, 188);
|
||||
}
|
||||
|
||||
.mult-select-imitate .mult-select-icon-cert {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 8px;
|
||||
font-size: 14px;
|
||||
transform: scaleX(160%) rotate(180deg);
|
||||
}
|
||||
|
||||
.mult-select-imitate select {
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: none;
|
||||
width: calc(100% - 2px);
|
||||
box-shadow:
|
||||
0px 1px 1px -2px rgb(85, 85, 85, 0.2),
|
||||
-1px 0px 1px -2px rgb(85, 85, 85, 0.2),
|
||||
1px 0px 1px -2px rgb(85, 85, 85, 0.2),
|
||||
0px -1px 0px -2px rgb(255, 255, 255);
|
||||
z-index: 2;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
function checkUrl(url) {
|
||||
var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\/])+$/;
|
||||
|
||||
if(!reg.test(url)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var visit = ['none', 'block']
|
||||
$('div.mult-select-imitate div.mult-select-view').click(function () {
|
||||
var target = $(this).siblings('select')
|
||||
var idx = Number(target.css('display') == 'none')
|
||||
$(this).toggleClass('active')
|
||||
$(this).siblings('select').css('display', visit[idx])
|
||||
$(this).siblings('select').get(0).focus()
|
||||
})
|
||||
$('div.mult-select-imitate select').change(function () {
|
||||
var vals = $(this).val()
|
||||
var txts = []
|
||||
$(this).children().each(function (i, v) {
|
||||
if ($.inArray($(v).attr('value'), vals) >= 0) {
|
||||
txts.push($(v).text())
|
||||
}
|
||||
})
|
||||
$('div.mult-select-imitate div.mult-select-view').text(txts)
|
||||
$('div.mult-select-imitate input[type="hidden"]').val(vals.join(","))
|
||||
})
|
||||
$('div.mult-select-imitate select').blur(function () {
|
||||
$(this).css('display', 'none')
|
||||
$('div.mult-select-imitate div.mult-select-view').toggleClass('active')
|
||||
})
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$("#cid").on("change",function(){
|
||||
console.log(222222);
|
||||
var selectedValue = $(this).val();
|
||||
$("#jump_link").val('');
|
||||
if(selectedValue == 2){
|
||||
$(".jump_link").show();
|
||||
}
|
||||
else{
|
||||
$(".jump_link").hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var cidObj = document.getElementById('cid');
|
||||
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
cidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var viewcountObj = document.getElementById('viewcount');
|
||||
if (isNaN(viewcountObj.value)) {
|
||||
alert('浏览数量值必须是数字');
|
||||
viewcountObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var linkObj = document.getElementById('jump_link');
|
||||
if (linkObj.value) {
|
||||
|
||||
if(!checkUrl(linkObj.value)){
|
||||
linkObj.focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
// $("#btn-subcid").click(function(e) {
|
||||
// var subcolumn = '';
|
||||
// if ($("#subcid").val())
|
||||
// subcolumn = encodeURIComponent($("#subcid").val());
|
||||
// $('#modal-subcolumn').remove();
|
||||
// $.ajax({
|
||||
// url: "<?php echo url('/admin/article_category/subcolumn');?>",
|
||||
// data: {subcolumn: subcolumn},
|
||||
// dataType: 'html',
|
||||
// success: function(html) {
|
||||
// $('body').append('<div id="modal-subcolumn" class="modal fade">' + html + '</div>');
|
||||
// $('#modal-subcolumn').modal({show: true, backdrop: 'static'});
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
12
app/admin/view/article/content.html
Executable file
12
app/admin/view/article/content.html
Executable file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<base target='_blank'>
|
||||
<title>新闻内容</title>
|
||||
</head>
|
||||
<body>
|
||||
<div><?php echo $video['content'];?></div>
|
||||
</body>
|
||||
</html>
|
||||
502
app/admin/view/article/edit.html
Executable file
502
app/admin/view/article/edit.html
Executable file
@@ -0,0 +1,502 @@
|
||||
<!-- 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/article/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/article/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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</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">新闻名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $article['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="cid" id="cid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="product_series">所属型号</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="mult-select-imitate">
|
||||
<div class="mult-select-view">默认值</div>
|
||||
<span class="mult-select-icon-cert">^</span>
|
||||
<input type="hidden" name="product_series" id="product_series" />
|
||||
<select multiple size="15">
|
||||
<?php echo $seriesOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(按ctrl键多选)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">新闻排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $article['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(新闻排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="viewcount" class="col-sm-2 control-label">浏览数量<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="viewcount" id="viewcount" value="<?php echo $article['viewcount'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(浏览数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="viewcount" class="col-sm-2 control-label">点赞数量</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="zancount" value="<?php echo $article['zancount'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(点赞数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="headline" class="col-sm-2 control-label">首页推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="headline" type="radio" value="1" <?php if($article['headline']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="headline" type="radio" value="0" <?php if(!$article['headline']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(首页推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label for="ishot" class="col-sm-2 control-label">热门推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="ishot" type="radio" value="1" <?php if($article['ishot']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="ishot" type="radio" value="0" <?php if(!$article['ishot']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(热门推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($article['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$article['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="form-group jump_link" style="<?php if($article['cid'] ==2){?>display:block;<?php }else{?>display:none;<?php } ?>">
|
||||
<label for="jump_link" class="col-sm-2 control-label">跳转链接</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="jump_link" id="jump_link" value="<?php echo $article['jump_link'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(社区评测)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="writer" class="col-sm-2 control-label">新闻作者</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="writer" value="<?php echo $article['writer'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻作者)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="source" class="col-sm-2 control-label">新闻来源</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="source" value="<?php echo $article['source'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻来源)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">新闻标签</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" value="<?php echo $article['tags'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(新闻标签,多个用英文逗号分隔)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">新闻描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $article['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(新闻描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="createtime" class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="createtime" value="<?php echo date('Y-m-d H:i:s',$article['createtime']);?>" id="laydate_createtime" onclick="laydate_datetime('#laydate_createtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_createtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</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 class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80"><?php echo $article['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">新闻图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($article['picture'])?'/uploads/nopic.jpg':$article['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $article['picture'];?>" id="input-image"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $article['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $article['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"><?php echo $article['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $article['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/article/lists');?>" class="btn btn-block btn-primary">新闻列表</a>
|
||||
<a href="<?php echo url('/admin/article_category/lists');?>" class="btn btn-block btn-primary">新闻分类</a>
|
||||
<a href="<?php echo url('/admin/article/add');?>" 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;
|
||||
}
|
||||
|
||||
.mult-select-imitate {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mult-select-imitate .mult-select-view {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
color: #555;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid #ccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mult-select-imitate .mult-select-view.active {
|
||||
border: 1px solid rgb(60, 141, 188);
|
||||
}
|
||||
|
||||
.mult-select-imitate .mult-select-icon-cert {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 8px;
|
||||
font-size: 14px;
|
||||
transform: scaleX(160%) rotate(180deg);
|
||||
}
|
||||
|
||||
.mult-select-imitate select {
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: none;
|
||||
width: calc(100% - 2px);
|
||||
box-shadow:
|
||||
0px 1px 1px -2px rgb(85, 85, 85, 0.2),
|
||||
-1px 0px 1px -2px rgb(85, 85, 85, 0.2),
|
||||
1px 0px 1px -2px rgb(85, 85, 85, 0.2),
|
||||
0px -1px 0px -2px rgb(255, 255, 255);
|
||||
z-index: 2;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
function checkUrl(url) {
|
||||
var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\/])+$/;
|
||||
|
||||
if(!reg.test(url)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
(function init() {
|
||||
var txts = []
|
||||
var vals = []
|
||||
$('div.mult-select-imitate select option').each(function (i, v) {
|
||||
if ($(v).is(':selected')) {
|
||||
txts.push($(v).text())
|
||||
vals.push($(v).attr('value'))
|
||||
}
|
||||
})
|
||||
if (txts.length > 0) {
|
||||
$('div.mult-select-imitate div.mult-select-view').text(txts.join(','))
|
||||
}
|
||||
if (vals.length > 0) {
|
||||
$('div.mult-select-imitate input[type="hidden"]').val(vals.join(","))
|
||||
}
|
||||
})()
|
||||
|
||||
var visit = ['none', 'block']
|
||||
$('div.mult-select-imitate div.mult-select-view').click(function () {
|
||||
var target = $(this).siblings('select')
|
||||
var idx = Number(target.css('display') == 'none')
|
||||
$(this).toggleClass('active')
|
||||
$(this).siblings('select').css('display', visit[idx])
|
||||
$(this).siblings('select').get(0).focus()
|
||||
})
|
||||
$('div.mult-select-imitate select').change(function () {
|
||||
var vals = $(this).val()
|
||||
var txts = []
|
||||
$(this).children().each(function (i, v) {
|
||||
if ($.inArray($(v).attr('value'), vals) >= 0) {
|
||||
txts.push($(v).text())
|
||||
}
|
||||
})
|
||||
$('div.mult-select-imitate div.mult-select-view').text(txts)
|
||||
$('div.mult-select-imitate input[type="hidden"]').val(vals.join(","))
|
||||
})
|
||||
$('div.mult-select-imitate select').blur(function () {
|
||||
$(this).css('display', 'none')
|
||||
$('div.mult-select-imitate div.mult-select-view').toggleClass('active')
|
||||
})
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$("#cid").on("change",function(){
|
||||
var selectedValue = $(this).val();
|
||||
$("#jump_link").val('');
|
||||
console.log(111111);
|
||||
if(selectedValue == 2){
|
||||
$(".jump_link").show();
|
||||
}
|
||||
else{
|
||||
$(".jump_link").hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var cidObj = document.getElementById('cid');
|
||||
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
cidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var viewcountObj = document.getElementById('viewcount');
|
||||
if (isNaN(viewcountObj.value)) {
|
||||
alert('浏览数量值必须是数字');
|
||||
viewcountObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var linkObj = document.getElementById('jump_link');
|
||||
if (linkObj.value) {
|
||||
|
||||
if(!checkUrl(linkObj.value)){
|
||||
linkObj.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">
|
||||
|
||||
var arr_product_img = [];
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
123
app/admin/view/article/export.html
Executable file
123
app/admin/view/article/export.html
Executable file
@@ -0,0 +1,123 @@
|
||||
<!-- 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/article/lists');?>"> 新闻</a></li>
|
||||
<li class="active"> 新闻导出</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-download"></i></h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/article/export');?>" method="post" target="_blank">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">字段</label>
|
||||
<div class="col-sm-8">
|
||||
<?php foreach($fields as $cbkey=>$cbname):?>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="field[<?php echo $cbkey;?>]" value="<?php echo $cbname;?>"> <?php echo $cbname;?>
|
||||
</label>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="col-sm-2"><button type="button" class="btn btn-info btn-sm" id="checkbox-suball">全选</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标签</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="tags" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="cid" class="form-control"><!-- class="col-xs-10 col-sm-4" -->
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="submit" value="export"><i class="fa fa-fw fa-check"></i>导出</button>
|
||||
<button type="reset" class="btn btn-info btn-sm" ><i class="fa fa-fw fa-undo"></i>重置</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</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() {
|
||||
$('#checkbox-suball').click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
$('form.form-horizontal input[name^=field]').each(function(i) {
|
||||
$(this).prop("checked", !clicks);
|
||||
});
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
206
app/admin/view/article/lists.html
Executable file
206
app/admin/view/article/lists.html
Executable file
@@ -0,0 +1,206 @@
|
||||
<!-- 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/article/lists');?>"> 新闻</a></li>
|
||||
<li class="active"> 新闻列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/article/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标签</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="tags" class="form-control" value="<?php echo $search['tags']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="cid" class="form-control">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="reset" class="btn btn-info btn-sm" ><i class="fa fa-fw fa-undo"></i>重置</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">新闻列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</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">图片</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th>新闻名称</th>
|
||||
<th class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">新闻排序</th>
|
||||
<th width="75rem" class="text-center">首页推荐</th>
|
||||
<!-- <th width="75rem" class="text-center">热门推荐</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>-->
|
||||
<th width="75rem" class="text-center">发布时间</th>
|
||||
<th width="60rem" class="text-center">状态</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$article):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $article['id'];?>"></td>
|
||||
<td><img src="<?php echo getImage($article['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $article['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="text-center"><?php echo $article['id'];?></td>
|
||||
<td class="text-left">
|
||||
<a href="<?php echo url('/admin/article/edit',['id'=>$article['id']]);?>"><?php echo $article['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="<?php echo url('/admin/article/lists',['cid'=>$article['cid']]);?>"><?php echo $article['categoryname'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $article['sort'];?>" type="text" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($article['headline']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/toggleheadline');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<span class="fa <?php if($article['ishot']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/toggleishot');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($article['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>-->
|
||||
<td class="text-center"><?php echo date('Y-m-d H:i:s',$article['createtime']);?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('-2' => '<span class="label label-warning">已删除</span>','-1' => '<span class="label label-danger">删除</span>', '0' => '<span class="label label-success">启用</span>', '1' => '<span class="label label-info">已审核</span>'),$article['stat']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article/edit',['id'=>$article['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/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-3">
|
||||
<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/article/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/article/recommends');?>" 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/article/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-inline input-group">
|
||||
<span class="input-group-addon">分类</span>
|
||||
<select name="cid" id="move_cid" class="form-control input-sm">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-info btn-sm" data-url="<?php echo url('/admin/article/movecategory');?>" data-cod="move">移动</button>
|
||||
</span>
|
||||
</div>
|
||||
</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>
|
||||
139
app/admin/view/article/recycle.html
Executable file
139
app/admin/view/article/recycle.html
Executable file
@@ -0,0 +1,139 @@
|
||||
<!-- 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/article/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">图片</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th>新闻名称</th>
|
||||
<th class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">新闻排序</th>
|
||||
<th width="75rem" class="text-center">首页推荐</th>
|
||||
<!--<th width="75rem" class="text-center">热门推荐</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>-->
|
||||
<th width="75rem" class="text-center">发布时间</th>
|
||||
<th width="60rem" class="text-center">状态</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$article):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $article['id'];?>"></td>
|
||||
<td><img src="<?php echo getImage($article['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $article['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="text-center"><?php echo $article['id'];?></td>
|
||||
<td class="text-left">
|
||||
<?php echo $article['name'];?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php echo $article['categoryname'];?>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $article['sort'];?>" type="text" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($article['headline']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/toggleheadline');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<span class="fa <?php if($article['ishot']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/toggleishot');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($article['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>-->
|
||||
<td class="text-center"><?php echo date('Y-m-d H:i:s',$article['createtime']);?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('-2' => '<span class="label label-warning">已删除</span>','-1' => '<span class="label label-danger">删除</span>', '0' => '<span class="label label-success">启用</span>', '1' => '<span class="label label-info">已审核</span>'),$article['stat']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/destroy');?>" data-cod="dowarn">删除</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $article['id'];?>" data-url="<?php echo url('/admin/article/recovery');?>" 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-3">
|
||||
<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/article/destroys');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/article/recommends');?>" data-cod="batch">推荐</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/article/recoverys');?>" 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/article/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-inline input-group">
|
||||
<span class="input-group-addon">分类</span>
|
||||
<select name="cid" id="move_cid" class="form-control input-sm">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-info btn-sm" data-url="<?php echo url('/admin/article/movecategory');?>" data-cod="move">移动</button>
|
||||
</span>
|
||||
</div>
|
||||
</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>
|
||||
366
app/admin/view/article_category/add.html
Executable file
366
app/admin/view/article_category/add.html
Executable file
@@ -0,0 +1,366 @@
|
||||
<!-- 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/article_category/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/article_category/create');?>" 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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
<!-- <li><a href="#navfifth" data-toggle="tab">高级选项</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">分类名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(分类名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">分类排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(分类排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" checked> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0"> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">分类描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(分类描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="article-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfifth">
|
||||
<?php if($administrator):?>
|
||||
<div class="form-group">
|
||||
<label for="tempindex" class="col-sm-2 control-label">封面页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempindex" id="tempindex">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempindex">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(封面页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="templist" class="col-sm-2 control-label">列表页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="templist" id="templist">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="templist">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(列表页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tempdetail" class="col-sm-2 control-label">内容页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempdetail" id="tempdetail">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempdetail">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="form-group">
|
||||
<label for="classtype" class="col-sm-2 control-label">栏目类型</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="1"> 封面
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="2" checked> 列表
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="3"> 外部链接
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(栏目属性)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">链接地址</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="url" id="url-input">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="url-btn"><i class="fa fa-globe"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(链接地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/article/lists');?>" class="btn btn-block btn-primary">新闻列表</a>
|
||||
<a href="<?php echo url('/admin/article_category/lists');?>" class="btn btn-block btn-primary">新闻分类</a>
|
||||
<a href="<?php echo url('/admin/article_category/add');?>" class="btn btn-block btn-primary">添加分类</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-url" tabindex="0">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">外部链接内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="urliframe" style="width:100%;height:400px;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#url-btn").click(function(e) {
|
||||
var urlObj = document.getElementById('url-input');
|
||||
var frameSrc = urlObj.value;
|
||||
if (isUrl(frameSrc)) {
|
||||
$("#urliframe").attr("src", frameSrc);
|
||||
$('#modal-url').modal({show: true, backdrop: 'static'});
|
||||
} else {
|
||||
alert('链接内容有误');
|
||||
urlObj.focus();
|
||||
}
|
||||
|
||||
});
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.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">
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
51
app/admin/view/article_category/childcat.html
Executable file
51
app/admin/view/article_category/childcat.html
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php if(!empty($list)):?>
|
||||
<table class="table table-hover table-bordered margin-bottom-none">
|
||||
<tbody>
|
||||
<?php foreach($list as $k=>$article_category):?>
|
||||
<tr>
|
||||
<td class="tcell1"><input type="checkbox" name="ids[]" value="<?php echo $article_category['id'];?>"></td>
|
||||
<td class="tcell2"><?php echo $article_category['id'];?></td>
|
||||
<td class="tcell3">
|
||||
<?php echo str_repeat('|---', $level); ?> <span class="fa fa-fw fa-plus-square" data-id="<?php echo $article_category['id'];?>" data-level="<?php echo $level;?>" data-cod="getchild"></span> <a href="<?php echo url('/admin/article_category/lists',['pid'=>$article_category['id']]);?>"><?php echo $article_category['name'];?></a>
|
||||
</td>
|
||||
<td class="tcell4"><input size="3" maxlength="7" value="<?php echo $article_category['sort'];?>" type="text" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="tcell5">
|
||||
<span class="fa <?php if($article_category['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell6">
|
||||
<span class="fa <?php if($article_category['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell7"><img src="<?php echo getImage($article_category['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $article_category['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="tcell8">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article_category/add',['pid'=>$article_category['id']]);?>">添加子分类</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article/add',['cid'=>$article_category['id']]);?>">添加新闻</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article_category/edit',['id'=>$article_category['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td id="catsun<?php echo $article_category['id'];?>" colspan="8" class="table-responsive no-padding" style="display: none;"></td></tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("[data-cod='sort']", "#catsun<?php echo $pid;?>").keyup(ajaxsort);
|
||||
$("[data-cod='dowarn']", "#catsun<?php echo $pid;?>").click(ajaxdowarn);
|
||||
$("[data-cod='state']", "#catsun<?php echo $pid;?>").click(togglestate);
|
||||
$("[data-cod='getchild']", "#catsun<?php echo $pid;?>").click(ajaxgetchild);
|
||||
$("[data-toggle='preview-image']", "#catsun<?php echo $pid;?>").each(function() {
|
||||
var element = $(this);
|
||||
element.popover({
|
||||
content: function() {
|
||||
return '<img src="' + element.attr('data-image') + '" style="max-width:200px;"/>';
|
||||
},
|
||||
placement: 'auto',
|
||||
trigger: 'click',
|
||||
html: true,
|
||||
container: 'body',
|
||||
delay: {show: 5, hide: 10}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif;?>
|
||||
369
app/admin/view/article_category/edit.html
Executable file
369
app/admin/view/article_category/edit.html
Executable file
@@ -0,0 +1,369 @@
|
||||
<!-- 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/article_category/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/article_category/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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
<!-- <li><a href="#navfifth" data-toggle="tab">高级选项</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">分类名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $article_category['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(分类名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">分类排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $article_category['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(分类排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" <?php if($article_category['isshow']):?>checked=""<?php endif;?>/> 显示
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0" <?php if(!$article_category['isshow']):?>checked=""<?php endif;?>/> 隐藏
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($article_category['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$article_category['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">分类描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $article_category['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(分类描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80"><?php echo $article_category['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="article-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($article_category['picture'])?'/uploads/nopic.jpg':$article_category['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $article_category['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $article_category['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $article_category['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"><?php echo $article_category['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfifth">
|
||||
<?php if($administrator):?>
|
||||
<div class="form-group">
|
||||
<label for="tempindex" class="col-sm-2 control-label">封面页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempindex" id="tempindex" value="<?php echo $article_category['tempindex'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempindex">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(封面页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="templist" class="col-sm-2 control-label">列表页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="templist" id="templist" value="<?php echo $article_category['templist'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="templist">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(列表页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tempdetail" class="col-sm-2 control-label">内容页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempdetail" id="tempdetail" value="<?php echo $article_category['tempdetail'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempdetail">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="form-group">
|
||||
<label for="classtype" class="col-sm-2 control-label">栏目类型</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="1" <?php if($article_category['classtype']==1):?>checked=""<?php endif;?>> 封面
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="2" <?php if($article_category['classtype']==2):?>checked=""<?php endif;?>> 列表
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="3" <?php if($article_category['classtype']==3):?>checked=""<?php endif;?>> 外部链接
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(栏目属性)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">链接地址</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="url" id="url-input" value="<?php echo $article_category['url'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="url-btn"><i class="fa fa-globe"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(链接地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input type="hidden" name="id" value="<?php echo $article_category['id'];?>">
|
||||
<input type="hidden" name="oldpid" value="<?php echo $article_category['pid'];?>">
|
||||
<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/article/lists');?>" class="btn btn-block btn-primary">新闻列表</a>
|
||||
<a href="<?php echo url('/admin/article_category/lists');?>" class="btn btn-block btn-primary">新闻分类</a>
|
||||
<a href="<?php echo url('/admin/article_category/add');?>" class="btn btn-block btn-primary">添加分类</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-url" tabindex="0">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">外部链接内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="urliframe" style="width:100%;height:400px;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#url-btn").click(function(e) {
|
||||
var urlObj = document.getElementById('url-input');
|
||||
var frameSrc = urlObj.value;
|
||||
if (isUrl(frameSrc)) {
|
||||
$("#urliframe").attr("src", frameSrc);
|
||||
$('#modal-url').modal({show: true, backdrop: 'static'});
|
||||
} else {
|
||||
alert('链接内容有误');
|
||||
urlObj.focus();
|
||||
}
|
||||
|
||||
});
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.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">
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
149
app/admin/view/article_category/listcategory.html
Executable file
149
app/admin/view/article_category/listcategory.html
Executable file
@@ -0,0 +1,149 @@
|
||||
<!-- 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/article_category/lists');?>"> 分类</a></li>
|
||||
<?php if($breadcrumb):foreach($breadcrumb as $k=>$bc):?>
|
||||
<?php if($pid==$bc['id']):?>
|
||||
<li class="active"> <?php echo $bc['name'];?></li>
|
||||
<?php else:?>
|
||||
<li><a href="<?php echo url('/admin/article_category/lists',['pid'=>$bc['id']]);?>"> <?php echo $bc['name'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php endforeach;endif;?>
|
||||
</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">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</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 class="tcell1"> </th>
|
||||
<th class="tcell2">ID</th>
|
||||
<th class="tcell3">分类名称</th>
|
||||
<th class="tcell4">分类排序</th>
|
||||
<th class="tcell5">是否显示</th>
|
||||
<th class="tcell6">是否推荐</th>
|
||||
<th class="tcell7">图片</th>
|
||||
<th class="tcell8">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$article_category):?>
|
||||
<tr>
|
||||
<td class="tcell1"><input type="checkbox" name="ids[]" value="<?php echo $article_category['id'];?>"></td>
|
||||
<td class="tcell2"><?php echo $article_category['id'];?></td>
|
||||
<td class="tcell3">
|
||||
<span class="fa fa-fw fa-plus-square" data-id="<?php echo $article_category['id'];?>" data-level="<?php echo $level;?>" data-cod="getchild"></span> <a href="<?php echo url('/admin/article_category/lists',['pid'=>$article_category['id']]);?>"><?php echo $article_category['name'];?></a>
|
||||
</td>
|
||||
<td class="tcell4"><input size="3" maxlength="7" value="<?php echo $article_category['sort'];?>" type="text" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="tcell5">
|
||||
<span class="fa <?php if($article_category['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell6">
|
||||
<span class="fa <?php if($article_category['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell7"><img src="<?php echo getImage($article_category['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $article_category['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="tcell8">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article_category/add',['pid'=>$article_category['id']]);?>">添加子分类</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article/add',['cid'=>$article_category['id']]);?>">添加新闻</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article_category/edit',['id'=>$article_category['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td id="catsun<?php echo $article_category['id'];?>" colspan="8" class="table-responsive no-padding" style="display: none;"></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">
|
||||
<!-- Check all button -->
|
||||
<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-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/article_category/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table .tcell1{width:3.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell2{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell3{text-align: left;vertical-align: middle;}
|
||||
.table-responsive .table .tcell4{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell5{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell6{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell7{width:6rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell8{width:16.5rem;text-align:center;vertical-align: middle;}
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("[data-cod='getchild']").click(ajaxgetchild);
|
||||
});
|
||||
function ajaxgetchild(event) {
|
||||
event = event ? event : window.event;
|
||||
var obj = event.srcElement ? event.srcElement : event.target;
|
||||
var val = (obj.className.match(/fa-plus-square/i)) ? 1 : 0;
|
||||
//var method = obj.getAttribute('data-method');
|
||||
//var url = obj.getAttribute('data-url');
|
||||
var id = obj.getAttribute('data-id');
|
||||
obj.className = val ? 'fa fa-fw fa-minus-square' : 'fa fa-fw fa-plus-square';
|
||||
var childcat = $('#catsun' + id);
|
||||
if (childcat.html().length < 10) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
data: {'pid': id, level: obj.getAttribute("data-level")},
|
||||
url: "<?php echo url('/admin/article_category/childcat');?>",
|
||||
dataType: 'html',
|
||||
success: function(data, status, xhr) {
|
||||
childcat.html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (val) {
|
||||
childcat.css('display', 'table-cell');
|
||||
} else {
|
||||
childcat.css('display', 'none');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
111
app/admin/view/article_category/lists.html
Executable file
111
app/admin/view/article_category/lists.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- 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/article_category/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="70rem" class="text-center">ID</th>
|
||||
<th>分类名称</th>
|
||||
<th width="75rem" class="text-center">分类排序</th>
|
||||
<th width="75rem" class="text-center">是否显示</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="60rem" class="text-center">图片</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$article_category):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $article_category['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $article_category['id'];?></td>
|
||||
<td>
|
||||
<?php if ($article_category['level']) echo str_repeat('|---', $article_category['level']); ?><a href="<?php echo url('/admin/article_category/edit',['id'=>$article_category['id']]);?>"><?php echo $article_category['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $article_category['sort'];?>" type="text" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($article_category['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($article_category['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td><img src="<?php echo getImage($article_category['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $article_category['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article_category/add',['pid'=>$article_category['id']]);?>">添加子分类</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article/add',['cid'=>$article_category['id']]);?>">添加新闻</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/article_category/edit',['id'=>$article_category['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $article_category['id'];?>" data-url="<?php echo url('/admin/article_category/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">
|
||||
<!-- Check all button -->
|
||||
<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" id="pagerefresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/article_category/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
83
app/admin/view/article_category/subcolumn.html
Executable file
83
app/admin/view/article_category/subcolumn.html
Executable file
@@ -0,0 +1,83 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">副分类选择框</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="row">
|
||||
<?php foreach($list as $k=>$category1):?>
|
||||
<div class="col-xs-12">
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category1['id'];?>" <?php echo in_array($category1['id'], $columns) ? 'checked' : '';?>> <?php echo $category1['name'];?></label>
|
||||
<?php if($category1['haschild']):?>
|
||||
<div class="row">
|
||||
<?php foreach($category1['child'] as $k=>$category2):?>
|
||||
<div class="col-xs-11 col-xs-offset-1">
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category2['id'];?>" <?php echo in_array($category2['id'], $columns) ? 'checked' : '';?>> <?php echo $category2['name'];?></label>
|
||||
<?php if($category2['haschild']):?>
|
||||
<div class="row">
|
||||
<?php foreach($category2['child'] as $k=>$category3):?>
|
||||
<div class="col-xs-10 col-xs-offset-2">
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category3['id'];?>" <?php echo in_array($category3['id'], $columns) ? 'checked' : '';?>> <?php echo $category3['name'];?></label>
|
||||
<?php if($category3['haschild']):?>
|
||||
<div class="row">
|
||||
<div class="col-xs-9 col-xs-offset-3">
|
||||
<?php foreach($category3['child'] as $k=>$category4):?>
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category4['id'];?>" <?php echo in_array($category4['id'], $columns) ? 'checked' : '';?>> <?php echo $category4['name'];?></label>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<!-- <button type="button" class="btn btn-default btn-sm pull-left" id="checkbox-suball">全选</button>-->
|
||||
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="checkbox-subcolumn">确定</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
<script type="text/javascript">
|
||||
$('#checkbox-subcolumn').click(function() {
|
||||
var state = false;
|
||||
var ids = new Array();
|
||||
var titles = new Array();
|
||||
$('#modal-subcolumn input[type=checkbox]').each(function(i) {
|
||||
if ($(this).prop("checked")) {
|
||||
state = true;
|
||||
ids.push($(this).val());
|
||||
titles.push($(this).parent().text());
|
||||
//titles.push($(this).data('title'));
|
||||
}
|
||||
});
|
||||
if (state == true) {
|
||||
$('#subcid').val(ids.join(','));
|
||||
console.log(titles.join(' '));
|
||||
//$('#adtitle').val(titles.join(' '));
|
||||
$('#modal-subcolumn').modal('hide');
|
||||
} else {
|
||||
if (confirm('确认清空此值吗?')) {
|
||||
$('#subcid').val('');
|
||||
//$('#adtitle').val('');
|
||||
$('#modal-subcolumn').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#checkbox-suball').click(function() {
|
||||
$('#modal-subcolumn input[type=checkbox]').each(function(i) {
|
||||
$(this).prop("checked", true);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
155
app/admin/view/ask/lists.html
Executable file
155
app/admin/view/ask/lists.html
Executable file
@@ -0,0 +1,155 @@
|
||||
<!-- 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/ask/lists');?>"> 客户问题</a></li>
|
||||
<li class="active"> 客户问题列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ask/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" placeholder="申请人、邮箱" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">客户问题列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="60rem" style="text-align: center">姓名</th>
|
||||
<th width="60rem" style="text-align: center">邮箱</th>
|
||||
<th width="60rem" style="text-align: center">订单号</th>
|
||||
<th width="120rem" style="text-align: center">国家</th>
|
||||
<th class="text-center" style="margin: auto">购买渠道</th>
|
||||
<th wwidth="100rem" style="text-align: center">提交时间</th>
|
||||
<th wwidth="35rem" style="text-align: center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<th class="text-center">{$vv.name}</th>
|
||||
<th class="text-center">{$vv.email}</th>
|
||||
<th class="text-center">{$vv.orderid}</th>
|
||||
<th class="text-center">{$vv.country}</th>
|
||||
<th class="text-center">{$vv.channel}</th>
|
||||
<th class="text-center">{$vv.create_time}</th>
|
||||
<th class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/ask/view',['id'=>$vv['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/ask/delete');?>" data-cod="dowarn">删除</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/ask/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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 -->
|
||||
|
||||
148
app/admin/view/ask/view.html
Executable file
148
app/admin/view/ask/view.html
Executable file
@@ -0,0 +1,148 @@
|
||||
<!-- 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/ask/lists');?>"> 客户问题列表</a></li>
|
||||
<li class="active"> 客户问题详情</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">客户问题详情</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/ask/save');?>" method="post">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">姓名</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.name}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Your Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">邮箱</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.email}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Email)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.country} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Country)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">购买渠道</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.channel} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Buy From)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">订单号</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.orderid} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Order ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">产品型号</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.product_model} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Product Model)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">操作系统</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.operation_system} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Operating System)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">描述</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.description}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Description)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">提交时间</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.create_time}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">附件</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
<?php var_dump($attachment); if(!empty($attachment)):?>
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Attachment)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
231
app/admin/view/auth_access/add.html
Executable file
231
app/admin/view/auth_access/add.html
Executable file
@@ -0,0 +1,231 @@
|
||||
<!-- 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/auth_access/lists');?>"> 权限列表</a></li>
|
||||
<li class="active"> 权限</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增权限</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/auth_access/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">权限名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(权限名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="gid" class="col-sm-2 control-label">所属分组</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="gid" id="gid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $groupOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分组)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="selModule" class="col-sm-2 control-label">所属模块</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="module" id="selModule" onchange="moduleChanged(this, 'selCtrl', 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
<option value="admin">admin</option>
|
||||
<option value="index">index</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属模块)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">可加权限</label>
|
||||
<div class="col-sm-2"><!--onblur="ctrlChanged(this, 'selAction')"-->
|
||||
<select class="form-control" name="ctrl" id="selCtrl" onchange="ctrlChanged(this, 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
<?php echo $ctrlOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="form-control" name="action" id="selAction">
|
||||
<option value="">默认值</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-danger" onclick="addAuth();">添加</button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(可加权限)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">具体权限</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="table-responsive">
|
||||
<table id="table-auth" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">权限码</td>
|
||||
<td class="text-center">操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(权限格式:controller/action)</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 class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
function addAuth() {
|
||||
var ca = [];
|
||||
$('#table-auth .form-control').each(function(i, o) {
|
||||
if ($(o).val() != '') {
|
||||
ca.push($(o).val());
|
||||
}
|
||||
})
|
||||
var ctrl = $('#selCtrl').val();
|
||||
var action = $('#selAction').val();
|
||||
if (ctrl !== '' && action !== '') {
|
||||
var temp = ctrl + '@' + action;
|
||||
if ($.inArray(temp, ca) != -1) {
|
||||
alert('此权限码已经添加!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var html = '<tr>';
|
||||
if (ctrl !== '' && action !== '') {
|
||||
html += '<td class="text-center"><input type="text" name="access[]" value="' + ctrl + '@' + action + '" class="form-control"/></td>';
|
||||
} else {
|
||||
html += '<td class="text-center"><input type="text" name="access[]" value="" class="form-control"/></td>';
|
||||
}
|
||||
html += '<td class="text-center"><a href="javascript:void(0);" class="btn btn-danger" onclick="$(this).parent().parent().remove();">删除</a></td></tr>';
|
||||
$('#table-auth').append(html);
|
||||
}
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var moduleObj = document.getElementById('selModule');
|
||||
if (isNull(moduleObj.value)) {
|
||||
alert('所属模块值无效');
|
||||
return false;
|
||||
}
|
||||
var gidObj = document.getElementById('gid');
|
||||
if (isNaN(gidObj.value) || !parseInt(gidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
gidObj.focus();
|
||||
return false;
|
||||
}
|
||||
if ($('input[name="access[]"]').length == 0) {
|
||||
alert('权限码不能为空!');
|
||||
return false;
|
||||
}
|
||||
var agree = $("input[name='agree']", this).prop('checked');
|
||||
if (agree) {
|
||||
//alert("Submitted");
|
||||
//e.preventDefault();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
alert("请勾选确认");
|
||||
}
|
||||
});
|
||||
});
|
||||
//类型changed事件
|
||||
function moduleChanged(obj, target, target2) {
|
||||
var module_val = obj.options[obj.selectedIndex].value;
|
||||
if (module_val && target && target2) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxctrl');?>",
|
||||
dataType: 'html',
|
||||
data: {"module": module_val},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
$('#' + target2).html('<option value="">默认值</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html('<option value="">默认值</option>' + html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//控制器changed事件
|
||||
function ctrlChanged(obj, target) {
|
||||
var ctrl_val = obj.options[obj.selectedIndex].value;
|
||||
if (ctrl_val && target) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxaction');?>",
|
||||
dataType: 'html',
|
||||
data: {"controller": ctrl_val, "module": 'admin'},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html(html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
241
app/admin/view/auth_access/edit.html
Executable file
241
app/admin/view/auth_access/edit.html
Executable file
@@ -0,0 +1,241 @@
|
||||
<!-- 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/auth_access/lists');?>"> 权限列表</a></li>
|
||||
<li class="active"> 权限</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑权限</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/auth_access/update');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">权限名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $auth_access['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(权限名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="gid" class="col-sm-2 control-label">所属分组</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="gid" id="gid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $groupOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分组)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="selModule" class="col-sm-2 control-label">所属模块</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="module" id="selModule" onchange="moduleChanged(this, 'selCtrl', 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
<option value="admin" <?php if($auth_access['module']=='admin'):?>selected<?php endif;?>>admin</option>
|
||||
<option value="index" <?php if($auth_access['module']=='index'):?>selected<?php endif;?>>index</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属模块)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">可加权限</label>
|
||||
<div class="col-sm-2"><!--onblur="ctrlChanged(this, 'selAction')"-->
|
||||
<select class="form-control" name="ctrl" id="selCtrl" onchange="ctrlChanged(this, 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="form-control" name="action" id="selAction">
|
||||
<option value="">默认值</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-danger" onclick="addAuth();">添加</button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(可加权限)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">具体权限</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="table-responsive">
|
||||
<table id="table-auth" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">权限码</td>
|
||||
<td class="text-center">操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $calists=explode(',',$auth_access['access']);
|
||||
foreach($calists as $ca):?>
|
||||
<tr>
|
||||
<td class="text-center"><input name="access[]" value="<?php echo $ca;?>" class="form-control" type="text"></td>
|
||||
<td class="text-center"><a href="javascript:void(0);" class="btn btn-danger" onclick="$(this).parent().parent().remove();">删除</a></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(权限格式:controller/action)</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 class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $auth_access['id'];?>">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
function addAuth() {
|
||||
var ca = [];
|
||||
$('#table-auth .form-control').each(function(i, o) {
|
||||
if ($(o).val() != '') {
|
||||
ca.push($(o).val());
|
||||
}
|
||||
})
|
||||
var ctrl = $('#selCtrl').val();
|
||||
var action = $('#selAction').val();
|
||||
if (ctrl !== '' && action !== '') {
|
||||
var temp = ctrl + '@' + action;
|
||||
if ($.inArray(temp, ca) != -1) {
|
||||
alert('此权限码已经添加!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var html = '<tr>';
|
||||
if (ctrl !== '' && action !== '') {
|
||||
html += '<td class="text-center"><input type="text" name="access[]" value="' + ctrl + '@' + action + '" class="form-control"/></td>';
|
||||
} else {
|
||||
html += '<td class="text-center"><input type="text" name="access[]" value="" class="form-control"/></td>';
|
||||
}
|
||||
html += '<td class="text-center"><a href="javascript:void(0);" class="btn btn-danger" onclick="$(this).parent().parent().remove();">删除</a></td></tr>';
|
||||
$('#table-auth').append(html);
|
||||
}
|
||||
$(function() {
|
||||
$('select[name=\'module\']').trigger('change');
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var moduleObj = document.getElementById('selModule');
|
||||
if (isNull(moduleObj.value)) {
|
||||
alert('所属模块值无效');
|
||||
moduleObj.focus();
|
||||
return false;
|
||||
}
|
||||
var gidObj = document.getElementById('gid');
|
||||
if (isNaN(gidObj.value) || !parseInt(gidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
gidObj.focus();
|
||||
return false;
|
||||
}
|
||||
if ($('input[name="access[]"]').length == 0) {
|
||||
alert('权限码不能为空!');
|
||||
return false;
|
||||
}
|
||||
var agree = $("input[name='agree']", this).prop('checked');
|
||||
if (agree) {
|
||||
//alert("Submitted");
|
||||
//e.preventDefault();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
alert("请勾选确认");
|
||||
}
|
||||
});
|
||||
});
|
||||
//类型changed事件
|
||||
function moduleChanged(obj, target, target2) {
|
||||
var module_val = obj.options[obj.selectedIndex].value;
|
||||
if (module_val && target && target2) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxctrl');?>",
|
||||
dataType: 'html',
|
||||
data: {"module": module_val},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
$('#' + target2).html('<option value="">默认值</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html('<option value="">默认值</option>' + html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//控制器changed事件
|
||||
function ctrlChanged(obj, target) {
|
||||
var ctrl_val = obj.options[obj.selectedIndex].value;
|
||||
if (ctrl_val && target) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxaction');?>",
|
||||
dataType: 'html',
|
||||
data: {"controller": ctrl_val, "module": 'admin'},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html(html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
102
app/admin/view/auth_access/lists.html
Executable file
102
app/admin/view/auth_access/lists.html
Executable file
@@ -0,0 +1,102 @@
|
||||
<!-- 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/auth_access/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-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="50rem" class="text-center">ID</th>
|
||||
<th width="100rem" class="text-center">名称</th>
|
||||
<th width="70rem" class="text-center">分组</th>
|
||||
<th width="70rem" class="text-center">模块</th>
|
||||
<th class="text-center">权限</th>
|
||||
<th width="100rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$auth_access):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" value="<?php echo $auth_access['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $auth_access['id'];?></td>
|
||||
<td class="text-center"><a href="<?php echo url('/admin/auth_access/edit',['id'=>$auth_access['id']]);?>"><?php echo $auth_access['name'];?></a></td>
|
||||
<td class="text-center"><?php echo $auth_access['group'];?></td>
|
||||
<td class="text-center"><?php echo $auth_access['module'];?></td>
|
||||
<td class="text-justify"><?php echo str_replace(',',' ',$auth_access['access']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/auth_access/edit',['id'=>$auth_access['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $auth_access['id'];?>" data-url="<?php echo url('/admin/auth_access/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/auth_access/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/auth_access/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 -->
|
||||
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
95
app/admin/view/auth_group/add.html
Executable file
95
app/admin/view/auth_group/add.html
Executable file
@@ -0,0 +1,95 @@
|
||||
<!-- 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/auth_group/lists');?>"> 权限组列表</a></li>
|
||||
<li class="active"> 权限组</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增权限组</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/auth_group/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">权限组名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(权限组名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">权限组描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"></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 class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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>
|
||||
96
app/admin/view/auth_group/edit.html
Executable file
96
app/admin/view/auth_group/edit.html
Executable file
@@ -0,0 +1,96 @@
|
||||
<!-- 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/auth_group/lists');?>"> 权限组列表</a></li>
|
||||
<li class="active"> 权限组</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增权限组</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/auth_group/update');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">权限组名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $auth_group['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(权限组名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">权限组描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"><?php echo $auth_group['description'];?></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 class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $auth_group['id'];?>">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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>
|
||||
109
app/admin/view/auth_group/lists.html
Executable file
109
app/admin/view/auth_group/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/auth_group/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-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>描述</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$auth_group):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" value="<?php echo $auth_group['id'];?>"></td>
|
||||
<td><?php echo $auth_group['id'];?></td>
|
||||
<td><a href="<?php echo url('/admin/auth_group/edit',['id'=>$auth_group['id']]);?>"><?php echo $auth_group['name'];?></a></td>
|
||||
<td><?php echo $auth_group['description'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/auth_group/edit',['id'=>$auth_group['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $auth_group['id'];?>" data-url="<?php echo url('/admin/auth_group/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-3">
|
||||
<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/auth_group/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/auth_group/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<!-- <div class="form-inline input-group">
|
||||
<span class="input-group-addon">权限组</span>
|
||||
<select name="groupid" id="groupid" class="form-control input-sm">
|
||||
<option value="0">默认值</option>
|
||||
<?php //echo $groupOption;?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-info btn-sm" id="move_archive">选择</button>
|
||||
</span>
|
||||
</div>-->
|
||||
</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 -->
|
||||
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
326
app/admin/view/banner/add.html
Executable file
326
app/admin/view/banner/add.html
Executable file
@@ -0,0 +1,326 @@
|
||||
<!-- 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/banner/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/banner/create');?>" 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>
|
||||
<li><a href="#navsecond" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navthree" data-toggle="tab">视频信息</a></li>
|
||||
<li class="pull-right"><a href="#" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
<li class="pull-right"><a href="#" class="text-muted"><i class="fa fa-gear"></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">横幅名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(横幅名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="alt" class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="alt">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(横幅文字颜色)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid" id="typeid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">相关分类</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="related-cat-title" readonly value="">
|
||||
<input type="hidden" class="form-control" name="categoryid" id="related-cat-in" value="">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="related-cat-btn">选择相关分类</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(相关分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="style" class="col-sm-2 control-label">展现形式</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="style" id="style">
|
||||
<option value="" selected="">请选择</option>
|
||||
<option value="1">居中显示</option>
|
||||
<option value="2" >居左显示</option>
|
||||
<option value="3" >居右显示</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(展现形式)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">横幅排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(横幅排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</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">
|
||||
<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="description" class="col-sm-2 control-label">横幅描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(横幅描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="descolor" class="col-sm-2 control-label">描述颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="descolor">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(横幅描述颜色)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">横幅图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="banner-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
|
||||
<div class="form-group">
|
||||
<label for="btncolor" class="col-sm-2 control-label">按钮颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="btncolor">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(按钮颜色)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="videourl" class="col-sm-2 control-label">视频外链</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="videourl" id="url-input">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="url-btn"><i class="fa fa-globe"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(外链地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display:none;">
|
||||
<label for="video" class="col-sm-2 control-label">文件</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="fileicon" id="fileicon">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="webuploader_modal('fileicon', '', 'default', 'file', 'file_call_back')">选择文件</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文件)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthree">
|
||||
<div class="form-group">
|
||||
<div class="form-group" style="display:block;">
|
||||
<label for="video" class="col-sm-2 control-label">视频文件/外链</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="videourl" id="videourl">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button"
|
||||
onclick="webuploader_modal('videourl', '', 'media', 'video', 'file_call_back')"><i
|
||||
class="fa fa-fw fa-folder-open-o"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(视频文件)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/banner/lists');?>" class="btn btn-block btn-primary">横幅列表</a>
|
||||
<a href="<?php echo url('/admin/banner/typelists');?>" class="btn btn-block btn-primary">横幅类别</a>
|
||||
<a href="<?php echo url('/admin/banner/add');?>" 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">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var typeidObj = document.getElementById('typeid');
|
||||
if (isNaN(typeidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
typeidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
$("#related-cat-btn").click(function(e) {
|
||||
var param = {}, $element = $(this).parent().parent();
|
||||
if ($("#related-cat-in").val()) {
|
||||
param.catcolumn = encodeURIComponent($("#related-cat-in").val());
|
||||
}
|
||||
param.callback = encodeURIComponent($(this).data('callback'));
|
||||
param.inputid = encodeURIComponent($element.find('input[type=hidden]').attr('id'));
|
||||
param.titleid = encodeURIComponent($element.find('input[type=text]').attr('id'));
|
||||
$('#modal-catcolumn').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/product_category/catcolumn');?>",
|
||||
data: param,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-catcolumn" class="modal fade">' + html + '</div>');
|
||||
$('#modal-catcolumn').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
326
app/admin/view/banner/edit.html
Executable file
326
app/admin/view/banner/edit.html
Executable file
@@ -0,0 +1,326 @@
|
||||
<!-- 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/banner/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/banner/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>
|
||||
<li><a href="#navsecond" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navthree" data-toggle="tab">视频信息</a></li>
|
||||
<li class="pull-right"><a href="#" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
<li class="pull-right"><a href="#" class="text-muted"><i class="fa fa-gear"></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">横幅名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $banner['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(横幅名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="alt" class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="alt" value="<?php echo $banner['alt'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文字颜色)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid" id="typeid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">相关分类</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="related-cat-title" readonly value="<?php echo $banner['categoryid'];?>">
|
||||
<input type="hidden" class="form-control" name="categoryid" id="related-cat-in" value="<?php echo $banner['categoryid'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="related-cat-btn">选择相关分类</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(相关分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="style" class="col-sm-2 control-label">展现形式</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="style" id="style">
|
||||
<option value="" >请选择</option>
|
||||
<option value="1" <?php if($banner['style']==1):?>selected=""<?php endif;?>>居中显示</option>
|
||||
<option value="2" <?php if($banner['style']==2):?>selected=""<?php endif;?>>居左显示</option>
|
||||
<option value="3" <?php if($banner['style']==3):?>selected=""<?php endif;?>>居右显示</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(展现形式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">横幅排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $banner['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(横幅排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($banner['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$banner['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</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 $banner['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="description" class="col-sm-2 control-label">横幅描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"><?php echo $banner['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(横幅描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="descolor" class="col-sm-2 control-label">描述颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="descolor" value="<?php echo $banner['descolor'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(描述文字颜色)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">横幅图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="banner-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($banner['picture'])?'/uploads/nopic.jpg':$banner['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $banner['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
|
||||
<div class="form-group">
|
||||
<label for="btncolor" class="col-sm-2 control-label">按钮颜色</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="btncolor" value="<?php echo $banner['btncolor'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(按钮颜色)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="videourl" class="col-sm-2 control-label">视频外链</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="videourl" id="url-input" value="<?php echo $banner['videourl'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="url-btn"><i class="fa fa-globe"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(外链地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" style="display:none;">
|
||||
<label for="video" class="col-sm-2 control-label">文件</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="fileicon" id="fileicon" value="<?php echo $banner['fileicon'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="webuploader_modal('fileicon', '', 'default', 'file', 'file_call_back')">选择文件</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文件)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthree">
|
||||
<div class="form-group">
|
||||
<div class="form-group" style="display:block;">
|
||||
<label for="video" class="col-sm-2 control-label">视频文件/外链</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="videourl" id="videourl"
|
||||
value="<?php echo $banner['videourl'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button"
|
||||
onclick="webuploader_modal('videourl', '', 'media', 'video', 'file_call_back')"><i
|
||||
class="fa fa-fw fa-folder-open-o"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(视频文件)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $banner['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/banner/lists');?>" class="btn btn-block btn-primary">横幅列表</a>
|
||||
<a href="<?php echo url('/admin/banner/typelists');?>" class="btn btn-block btn-primary">横幅类别</a>
|
||||
<a href="<?php echo url('/admin/banner/add');?>" 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">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var typeidObj = document.getElementById('typeid');
|
||||
if (isNaN(typeidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
typeidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
$("#related-cat-btn").click(function(e) {
|
||||
var param = {}, $element = $(this).parent().parent();
|
||||
if ($("#related-cat-in").val()) {
|
||||
param.catcolumn = encodeURIComponent($("#related-cat-in").val());
|
||||
}
|
||||
param.callback = encodeURIComponent($(this).data('callback'));
|
||||
param.inputid = encodeURIComponent($element.find('input[type=hidden]').attr('id'));
|
||||
param.titleid = encodeURIComponent($element.find('input[type=text]').attr('id'));
|
||||
$('#modal-catcolumn').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/product_category/catcolumn');?>",
|
||||
data: param,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-catcolumn" class="modal fade">' + html + '</div>');
|
||||
$('#modal-catcolumn').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
116
app/admin/view/banner/lists.html
Executable file
116
app/admin/view/banner/lists.html
Executable file
@@ -0,0 +1,116 @@
|
||||
<!-- 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/banner/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">图片</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th>横幅名称</th>
|
||||
<th class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">横幅排序</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$banner):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $banner['id'];?>"></td>
|
||||
<td><img src="<?php echo getImage($banner['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $banner['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="text-center"><?php echo $banner['id'];?></td>
|
||||
<td class="text-left">
|
||||
<a href="<?php echo url('/admin/banner/edit',['id'=>$banner['id']]);?>"><?php echo $banner['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php echo $banner['typename'];?>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $banner['sort'];?>" type="text" data-id="<?php echo $banner['id'];?>" data-url="<?php echo url('/admin/banner/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($banner['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $banner['id'];?>" data-url="<?php echo url('/admin/banner/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$banner['createtime']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/banner/edit',['id'=>$banner['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $banner['id'];?>" data-url="<?php echo url('/admin/banner/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/banner/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/banner/recommends');?>" 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/banner/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>
|
||||
102
app/admin/view/banner/typeadd.html
Executable file
102
app/admin/view/banner/typeadd.html
Executable file
@@ -0,0 +1,102 @@
|
||||
<!-- 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/banner/typelists');?>"> 类别列表</a></li>
|
||||
<li class="active"> 类别</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增类别</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/banner/typecreate');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">类别名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">类别描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"></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 class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
function isNull(data) {
|
||||
return (data == "" || data == undefined || data == null) ? true : false;
|
||||
}
|
||||
function trim(str)
|
||||
{
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
</script>
|
||||
103
app/admin/view/banner/typeedit.html
Executable file
103
app/admin/view/banner/typeedit.html
Executable file
@@ -0,0 +1,103 @@
|
||||
<!-- 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/banner/typelists');?>"> 类别列表</a></li>
|
||||
<li class="active"> 类别</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增类别</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/banner/typeupdate');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">类别名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $bannertype['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">类别描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"><?php echo $bannertype['description'];?></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 class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $bannertype['id'];?>"/>
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
function isNull(data) {
|
||||
return (data == "" || data == undefined || data == null) ? true : false;
|
||||
}
|
||||
function trim(str)
|
||||
{
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
}
|
||||
</script>
|
||||
101
app/admin/view/banner/typelists.html
Executable file
101
app/admin/view/banner/typelists.html
Executable file
@@ -0,0 +1,101 @@
|
||||
<!-- 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/banner/typelists');?>"> 类别</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="70rem" class="text-center">ID</th>
|
||||
<th class="text-center">类别名称</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th class="text-center">描述</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$bannertype):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $bannertype['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $bannertype['id'];?></td>
|
||||
<td class="text-center"><?php echo $bannertype['name'];?></td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$bannertype['createtime']);?></td>
|
||||
<td class="text-center"><?php echo $bannertype['description'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/banner/add',['typeid'=>$bannertype['id']]);?>">添加横幅</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/banner/typeedit',['id'=>$bannertype['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $bannertype['id'];?>" data-url="<?php echo url('/admin/banner/typedelete');?>" 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">
|
||||
<!-- Check all button -->
|
||||
<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/banner/typedeletes');?>" 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/banner/typeadd');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
256
app/admin/view/blog/add.html
Executable file
256
app/admin/view/blog/add.html
Executable file
@@ -0,0 +1,256 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
新增Blog
|
||||
</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/blog/lists');?>"> Blog列表</a></li>
|
||||
<li class="active"> Blog</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/blog/creat');?>" 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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="title" class="col-sm-2 control-label">Blog名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="title" id="title" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Blog名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="visit_count" class="col-sm-2 control-label">浏览数量<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="visit_count" id="visit_count" required>
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(浏览数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="is_top" class="col-sm-2 control-label">是否置顶</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_top" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_top" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否置顶)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="createtime" class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="public_time" value="<?php //echo date('Y-m-d H:i:s');?>" id="laydate_createtime" onclick="laydate_datetime('#laydate_createtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_createtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(发布时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">PC封面图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="article-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="icon" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">H5封面图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="article-h5_icon" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="h5_icon" value="/uploads/nopic.jpg" id="input-h5_icon" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/blog/lists');?>" class="btn btn-block btn-primary"> Blog列表</a>
|
||||
|
||||
<a href="<?php echo url('/admin/blog/add');?>" class="btn btn-block btn-primary">添加Blog</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<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 viewcountObj = document.getElementById('visit_count');
|
||||
if (isNaN(viewcountObj.value)) {
|
||||
alert('浏览数量值必须是数字');
|
||||
viewcountObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
250
app/admin/view/blog/edit.html
Executable file
250
app/admin/view/blog/edit.html
Executable file
@@ -0,0 +1,250 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
编辑Blog
|
||||
</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/blog/lists');?>"> Blog列表</a></li>
|
||||
<li class="active"> 编辑Blog</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/blog/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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">Blog封面图</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="navfirst">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">Blog名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" id="title" name="title" required value="{$data.title}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Blog标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="visit_count" class="col-sm-2 control-label">浏览数量<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" id="visit_count" name="visit_count" required value="{$data.visit_count}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(浏览数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="is_top" class="col-sm-2 control-label">是否置顶</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="is_top" type="radio" value="1" {if $data.is_top==1}checked=''{/if}/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="is_top" type="radio" value="0" {if $data.is_top==0}checked=''{/if}/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否置顶)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="add_time" class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="public_time" required value="{$data.public_time}">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(发布时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80"><?php echo $data['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">PC封面图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail">
|
||||
<img class="img-responsive" src="<?php echo empty($data['icon'])?'/uploads/nopic.jpg':$data['icon'];?>" />
|
||||
</a>
|
||||
<input type="hidden" name="icon" value="<?php echo $data['icon'];?>" id="input-image"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">H5封面图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-h5_icon" data-toggle="image" class="img-thumbnail">
|
||||
<img class="img-responsive" src="<?php echo empty($data['h5_icon'])?'/uploads/nopic.jpg':$data['h5_icon'];?>" />
|
||||
</a>
|
||||
<input type="hidden" name="h5_icon" value="<?php echo $data['h5_icon'];?>" id="input-h5_icon"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $data['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $data['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"><?php echo $data['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $data['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>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</form> <!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
location.reload();
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('title');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var viewcountObj = document.getElementById('visit_count');
|
||||
if (isNaN(viewcountObj.value)) {
|
||||
alert('浏览数量值必须是数字');
|
||||
viewcountObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var arr_product_img = [];
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
164
app/admin/view/blog/lists.html
Executable file
164
app/admin/view/blog/lists.html
Executable file
@@ -0,0 +1,164 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Blog管理
|
||||
<small>Blog列表</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/blog/lists');?>"> Blog</a></li>
|
||||
<li class="active"> Blog列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/blog/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发布时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Blog列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<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" style="margin: auto">封面</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th style="text-align: center">Blog名称</th>
|
||||
<th width="75rem" class="text-center">置顶</th>
|
||||
<th width="100rem" class="text-center">发布时间</th>
|
||||
<th width="60rem" class="text-center">状态</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<td><?php if($vv['icon']){?><img src="<?php echo getImage($vv['icon'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $vv['icon'];?>" data-toggle="preview-image"><?php }?></td>
|
||||
<th class="text-center">{$vv.id}</th>
|
||||
<th class="text-center"><a href="<?php echo url('/admin/blog/edit',['id'=>$vv['id']]);?>"><?php echo $vv['title'];?></a></th>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($vv['is_top']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/blog/toggletop');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<th class="text-center">{$vv.public_time}</th>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($vv['stat']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/blog/toggleshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/blog/edit',['id'=>$vv['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/blog/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/blog/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/blog/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
136
app/admin/view/bulk/add.html
Executable file
136
app/admin/view/bulk/add.html
Executable file
@@ -0,0 +1,136 @@
|
||||
<!-- 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/shopselle/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 添加经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">添加经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/creat');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
150
app/admin/view/bulk/edit.html
Executable file
150
app/admin/view/bulk/edit.html
Executable file
@@ -0,0 +1,150 @@
|
||||
<!-- 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/agent/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 编辑经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required value="{$data.name}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required value="{$data.address}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required value="{$data.phone}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required value="{$data.country}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required value="{$data.province}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required value="{$data.city}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required value="{$data.area}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(区)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">是否启用</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="0" {if $data.stat==0}checked=''{/if}/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="1" {if $data.stat==1}checked=''{/if}/> 否
|
||||
</label>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
97
app/admin/view/bulk/index.html
Executable file
97
app/admin/view/bulk/index.html
Executable file
@@ -0,0 +1,97 @@
|
||||
<!-- 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/pinglun/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">
|
||||
<!---->
|
||||
<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">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="10%">ID</th>
|
||||
<th width="30%" style="text-align: center">经销商名</th>
|
||||
<th width="40%" class="text-center" style="margin: auto">经销商地址</th>
|
||||
<th width="10%">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="10%">{$vv.id}</th>
|
||||
<th width="30%" style="text-align: center">{$vv.name}</th>
|
||||
<th width="40%" class="text-center" style="margin: auto">{$vv.address}</th>
|
||||
<th width="10%">
|
||||
<a class="btn btn-xs btn-info" href="edit?id={$vv.id}">编辑</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/agent/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
161
app/admin/view/bulk/lists.html
Executable file
161
app/admin/view/bulk/lists.html
Executable file
@@ -0,0 +1,161 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
OEM/ODM询盘管理
|
||||
<small>OEM/ODM询盘列表</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/bulk/lists');?>"> OEM/ODM询盘</a></li>
|
||||
<li class="active"> OEM/ODM询盘列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/bulk/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" placeholder="申请人、手机或兴趣产品" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">OEM/ODM询盘列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="160rem"style="text-align: center">公司名称</th>
|
||||
<th width="60rem" style="text-align: center">姓名</th>
|
||||
<th width="60rem" style="text-align: center">邮箱</th>
|
||||
<th width="60rem" style="text-align: center">手机</th>
|
||||
<th class="text-center" style="margin: auto">目标服务/产品</th>
|
||||
<th width="120rem" style="text-align: center">所在国家</th>
|
||||
<th wwidth="100rem" style="text-align: center">提交时间</th>
|
||||
<th wwidth="35rem" style="text-align: center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<th class="text-center">{$vv.company}</th>
|
||||
<th class="text-center">{$vv.first_name} {$vv.last_name}</th>
|
||||
<th class="text-center">{$vv.email}</th>
|
||||
<th class="text-center">{$vv.phone}</th>
|
||||
<th class="text-center">{$vv.interested}</th>
|
||||
<th class="text-center">{$vv.country}</th>
|
||||
<th class="text-center">{$vv.createtime}</th>
|
||||
<th class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/bulk/view',['id'=>$vv['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/bulk/delete');?>" data-cod="dowarn">删除</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/bulk/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
164
app/admin/view/bulk/view.html
Executable file
164
app/admin/view/bulk/view.html
Executable file
@@ -0,0 +1,164 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
查看OEM/ODM询盘
|
||||
</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/bulk/lists');?>"> OEM/ODM询盘列表</a></li>
|
||||
<li class="active"> 查看OEM/ODM询盘</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">查看OEM/ODM询盘</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/bulk/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">公司名称</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.company}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Company Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">姓名</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.first_name} {$data.last_name}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Your Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">邮箱</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.email}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Email)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">手机</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.phone}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Phone Number)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">所在国家</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.country} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Distribution region)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">留言</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.message} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Your Message)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">目标服务/产品</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.interested}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Interested Service/Product)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">申请时间</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.createtime}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<hr>
|
||||
<div class="tab-pane form-horizontal" id="tabfirst">
|
||||
|
||||
|
||||
<div class="col-sm-12 control-label" style="text-align: left;padding: 10px 25px;">访问监控信息</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">来源设备</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">
|
||||
{$data.drvice}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">设备信息</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.user_agent}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问落地页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.url}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问来源页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.refer}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">IP定位</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.ip} {$data.city} {$data.province} {$data.state}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
136
app/admin/view/bulk_inquiry/add.html
Executable file
136
app/admin/view/bulk_inquiry/add.html
Executable file
@@ -0,0 +1,136 @@
|
||||
<!-- 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/shopselle/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 添加经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">添加经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/creat');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
150
app/admin/view/bulk_inquiry/edit.html
Executable file
150
app/admin/view/bulk_inquiry/edit.html
Executable file
@@ -0,0 +1,150 @@
|
||||
<!-- 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/agent/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 编辑经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required value="{$data.name}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required value="{$data.address}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required value="{$data.phone}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required value="{$data.country}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required value="{$data.province}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required value="{$data.city}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required value="{$data.area}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(区)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">是否启用</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="0" {if $data.stat==0}checked=''{/if}/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="1" {if $data.stat==1}checked=''{/if}/> 否
|
||||
</label>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
159
app/admin/view/bulk_inquiry/lists.html
Executable file
159
app/admin/view/bulk_inquiry/lists.html
Executable file
@@ -0,0 +1,159 @@
|
||||
<!-- 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/bulk_inquiry/lists');?>"> 批量采购询盘</a></li>
|
||||
<li class="active"> 批量采购询盘列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/bulk_inquiry/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" placeholder="申请人、手机" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">产品询盘列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="160rem"style="text-align: center">公司名称</th>
|
||||
<th width="120rem" style="text-align: center">姓名</th>
|
||||
<th width="60rem" style="text-align: center">邮箱</th>
|
||||
<th width="60rem" style="text-align: center">手机</th>
|
||||
<th width="150rem" style="text-align: center">想采购的产品</th>
|
||||
<th wwidth="100rem" style="text-align: center">提交时间</th>
|
||||
<th wwidth="35rem" style="text-align: center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<th class="text-center">{$vv.company}</th>
|
||||
<th class="text-center">{$vv.first_name} {$vv.last_name}</th>
|
||||
<th class="text-center">{$vv.email}</th>
|
||||
<th class="text-center">{$vv.phone}</th>
|
||||
<th class="text-center">{$vv.interest}</th>
|
||||
<th class="text-center">{$vv.createtime}</th>
|
||||
<th class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/bulk_inquiry/view',['id'=>$vv['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/bulk_inquiry/delete');?>" data-cod="dowarn">删除</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/bulk_inquiry/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
160
app/admin/view/bulk_inquiry/view.html
Executable file
160
app/admin/view/bulk_inquiry/view.html
Executable file
@@ -0,0 +1,160 @@
|
||||
<!-- 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/bulk_inquiry/lists');?>"> 批量采购询盘列表</a></li>
|
||||
<li class="active"> 批量采购询盘详情</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">批量采购询盘详情</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/bulk_inquiry/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">公司名称</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.company}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Company Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">姓名</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.first_name} {$data.last_name}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Your Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">邮箱</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.email}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Email)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">手机</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.phone}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Phone Number)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">想采购的产品</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.interest} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Products you are interested in?)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">询盘内容</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.message}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Message)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">申请时间</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.createtime}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<hr>
|
||||
<div class="tab-pane form-horizontal" id="tabfirst">
|
||||
|
||||
|
||||
<div class="col-sm-12 control-label" style="text-align: left;padding: 10px 25px;">访问监控信息</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">来源设备</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">
|
||||
{$data.drvice}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">设备信息</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.user_agent}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问落地页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.url}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问来源页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.refer}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">IP定位</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.ip} {$data.city} {$data.province} {$data.state}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
127
app/admin/view/country/add.html
Executable file
127
app/admin/view/country/add.html
Executable file
@@ -0,0 +1,127 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/country/lists');?>"> 国家列表</a></li>
|
||||
<li class="active"> 国家</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/country/create');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">基本信息</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-toggle="tab" href="#tabsecond">详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<div class="form-group">
|
||||
<label for="country_name" class="col-sm-2 control-label">国家名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country_name" id="country_name">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="code" class="col-sm-2 control-label">国家标记码<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="code" id="code">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家标记码)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">链接<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="url" id="url">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(链接)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">状态<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="0"> 启用
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="1"> 禁用
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabsecond">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图标<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" data-folder="country" class="img-thumbnail"><img class="img-responsive" /></a>
|
||||
<input type="hidden" name="icon" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
127
app/admin/view/country/edit.html
Executable file
127
app/admin/view/country/edit.html
Executable file
@@ -0,0 +1,127 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/country/lists');?>"> 国家列表</a></li>
|
||||
<li class="active"> 国家</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/country/update');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">基本信息</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-toggle="tab" href="#tabsecond">详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<div class="form-group">
|
||||
<label for="country_name" class="col-sm-2 control-label">国家名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country_name" id="country_name" value="<?php echo $country['country_name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="code" class="col-sm-2 control-label">国家标记码<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="code" id="code" value="<?php echo $country['code'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家标记码)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">链接<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="url" id="url" value="<?php echo $country['url'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(链接)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $country['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">状态<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="0" <?php if(!$country['stat']):?>checked<?php endif;?>> 启用
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="1" <?php if($country['stat']):?>checked<?php endif;?>> 禁用
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabsecond">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图标<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" data-folder="country" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($country['icon'])?'/uploads/nopic.jpg':$country['icon'];?>"/></a>
|
||||
<input type="hidden" name="icon" value="<?php echo $country['icon'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input type="hidden" name="id" value="<?php echo $country['id'];?>">
|
||||
<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>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
110
app/admin/view/country/lists.html
Executable file
110
app/admin/view/country/lists.html
Executable file
@@ -0,0 +1,110 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/country/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">
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th>ID</th>
|
||||
<th>国家名称</th>
|
||||
<th class="text-center">国家标记码</th>
|
||||
<th class="text-center">链接</th>
|
||||
<th class="text-center">排序</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<?php if (!empty($list)): ?>
|
||||
<?php foreach($list as $key => $value):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" value="<?php echo $value['id'];?>"></td>
|
||||
<td><?php echo $value['id'];?></td>
|
||||
<td><a href="<?php echo url('/admin/country/edit',['id'=>$value['id']]);?>"><?php echo $value['country_name'];?></a></td>
|
||||
<td class="text-center"><?php echo $value['code'];?></td>
|
||||
<td class="text-center"><?php echo $value['url'];?></td>
|
||||
<td class="text-center"><?php echo $value['sort'];?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('1' => '<label style="color:blue;">禁用</label>', '0' => '<label style="color:green;">启用</label>'),$value['stat']);?></td>
|
||||
<td class="text-center"><?php echo $value['create_time'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/country/edit',['id'=>$value['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/country/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/country/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/country/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>
|
||||
456
app/admin/view/customer/add.html
Executable file
456
app/admin/view/customer/add.html
Executable file
@@ -0,0 +1,456 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/customer/lists');?>"> 会员列表</a></li>
|
||||
<li class="active"> 会员</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/customer/create');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">基本信息</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-toggle="tab" href="#tabsecond">会员头像</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="group_id" class="col-sm-2 control-label">会员组</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="group_id" id="group_id">
|
||||
<option value="0" selected="">请选择所属组</option>
|
||||
<?php echo $groupOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员组)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">电子邮箱</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="email" id="email" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(电子邮箱)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="telephone" class="col-sm-2 control-label">电话</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="telephone" id="telephone" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(电话)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firstname" class="col-sm-2 control-label">会员名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="firstname" id="firstname" required>
|
||||
<input type="hidden" name="lastname" id="lastname">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-2 control-label">会员密码</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="password" id="password" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员密码不能少于6位)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="repassword" class="col-sm-2 control-label">确认密码</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="repassword" id="repassword" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员密码不能少于6位)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newsletter" class="col-sm-2 control-label">性别</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="sex" value="男" checked> 男
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="sex" value="女"> 女
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(性别)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qq" class="col-sm-2 control-label">QQ</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="qq" value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(QQ)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="birthday" class="col-sm-2 control-label">生日</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="date" class="form-control" name="birthday" value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(生日)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="hangye" class="col-sm-2 control-label">行业</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="hangye">
|
||||
<?php foreach ($hangye as $hy): ?>
|
||||
<option value="<?php echo $hy; ?>"><?php echo $hy; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(行业)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="zhiye" class="col-sm-2 control-label">职业</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="zhiye">
|
||||
<?php foreach ($zhiye as $zy): ?>
|
||||
<option value="<?php echo $zy; ?>"><?php echo $zy; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(职业)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="0" checked> 启用
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="1"> 禁用
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="safe" class="col-sm-2 control-label">安全</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="safe" value="1" checked> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="safe" value="0"> 否
|
||||
</label>
|
||||
</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="item" checked="checked"> 服务条款
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabsecond">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">头像</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="tabthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公司</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="company">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(公司)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">网址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="website">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(网址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">跟踪码</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tracking">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(用以跟踪推荐者的跟踪码。)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">佣金比例 (%)</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="commission">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(每个订单推广会员获得的百分比佣金。)</span>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="text-blue smaller">支付详情</h5>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">税号</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tax">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(税号)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="payment" class="col-sm-2 control-label">支付方式</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="payment" value="cheque" checked> 支票
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="payment" value="paypal"> PayPal
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="payment" value="bank"> 银行转账
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(支付方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="payment-cheque" class="payment">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">支票受益人</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="cheque">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(支票受益人)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="payment-paypal" class="payment">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">PayPal 电邮账户</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="paypal">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(PayPal 电邮账户)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="payment-bank" class="payment">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">银行名称</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="bank_name">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(银行名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">ABA/BSB 号码 (支行号码)</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="bank_branch_number">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(ABA/BSB 号码 (支行号码))</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">SWIFT 代码</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="bank_swift_code">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SWIFT 代码)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">开户人</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="bank_account_name">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(开户人)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">账号</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="bank_account_number">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(账号)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="affiliate" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="affiliate" value="1"> 启用
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="affiliate" value="0" checked> 禁用
|
||||
</label>
|
||||
</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">
|
||||
<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>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('input[name=\'payment\']').on('change', function() {
|
||||
$('.payment').hide();
|
||||
$('#payment-' + this.value).show();
|
||||
});
|
||||
$('input[name=\'payment\']:checked').trigger('change');
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var groupIDObj = document.getElementById('group_id');
|
||||
if (isNaN(groupIDObj.value) || parseInt(groupIDObj.value) < 1) {
|
||||
alert('组值无效');
|
||||
groupIDObj.focus();
|
||||
return false;
|
||||
}
|
||||
var emailObj = document.getElementById('email');
|
||||
if (!validEmail(emailObj.value)) {
|
||||
alert('电子邮箱格式不正确');
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
var telephoneObj = document.getElementById('telephone');
|
||||
if (!isTelephone(telephoneObj.value)) {
|
||||
alert('电话格式不正确');
|
||||
telephoneObj.focus();
|
||||
return false;
|
||||
}
|
||||
var nameObj = document.getElementById('firstname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var passwordObj = document.getElementById('password');
|
||||
if (isNull(passwordObj.value) || passwordObj.value.length < 6) {
|
||||
alert('用户密码不能少于6位');
|
||||
passwordObj.focus();
|
||||
return false;
|
||||
}
|
||||
var repasswordObj = document.getElementById('repassword');
|
||||
if (isNull(repasswordObj.value) || repasswordObj.value.length < 6) {
|
||||
alert('确认密码不能少于6位');
|
||||
repasswordObj.focus();
|
||||
return false;
|
||||
}
|
||||
if (repasswordObj.value !== passwordObj.value) {
|
||||
repasswordObj.focus();
|
||||
alert('用户密码和确认密码不相同');
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("Submit prevented");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
264
app/admin/view/customer/edit.html
Executable file
264
app/admin/view/customer/edit.html
Executable file
@@ -0,0 +1,264 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/customer/lists');?>"> 会员列表</a></li>
|
||||
<li class="active"> 会员</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/customer/update');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">基本信息</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-toggle="tab" href="#tabsecond">会员头像</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="group_id" class="col-sm-2 control-label">会员组</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="group_id" id="group_id">
|
||||
<option value="0">请选择所属组</option>
|
||||
<?php echo $groupOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员组)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">电子邮箱</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="email" id="email" required value="<?php echo $customer['email'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(电子邮箱)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="telephone" class="col-sm-2 control-label">电话</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="telephone" id="telephone" required value="<?php echo $customer['telephone'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(电话)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firstname" class="col-sm-2 control-label">会员名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="firstname" id="firstname" required value="<?php echo $customer['firstname'];?>">
|
||||
<input type="hidden" name="lastname" id="lastname" value="<?php echo $customer['lastname'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newsletter" class="col-sm-2 control-label">性别</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="sex" value="男" <?php if($customer['sex']=='男'):?>checked<?php endif;?>> 男
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="sex" value="女" <?php if($customer['sex']=='女'):?>checked<?php endif;?>> 女
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(性别)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qq" class="col-sm-2 control-label">QQ</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="qq" value="<?php echo $customer['qq']; ?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(QQ)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="birthday" class="col-sm-2 control-label">生日</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="date" class="form-control" name="birthday" value="<?php echo $customer['birthday']; ?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(生日)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="hangye" class="col-sm-2 control-label">行业</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="hangye">
|
||||
<?php foreach ($hangye as $hy): ?>
|
||||
<option value="<?php echo $hy; ?>" <?php if ($hy == $customer['hangye']): ?>selected="selected"<?php endif; ?>><?php echo $hy; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(行业)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="zhiye" class="col-sm-2 control-label">职业</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="zhiye">
|
||||
<?php foreach ($zhiye as $zy): ?>
|
||||
<option value="<?php echo $zy; ?>" <?php if ($zy == $customer['zhiye']): ?>selected="selected"<?php endif; ?>><?php echo $zy; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(职业)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="0" <?php if(!$customer['stat']):?>checked<?php endif;?>> 启用
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="stat" value="1" <?php if($customer['stat']):?>checked<?php endif;?>> 禁用
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="safe" class="col-sm-2 control-label">安全</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="safe" value="1" <?php if($customer['safe']):?>checked<?php endif;?>> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="safe" value="0" <?php if(!$customer['safe']):?>checked<?php endif;?>> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(安全)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tabsecond">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">头像</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" data-folder="user" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($customer['picture'])?'/uploads/nopic.jpg':$customer['picture'];?>"/></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $customer['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input type="hidden" name="id" value="<?php echo $customer['id'];?>">
|
||||
<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>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var groupIDObj = document.getElementById('group_id');
|
||||
if (isNaN(groupIDObj.value) || parseInt(groupIDObj.value) < 1) {
|
||||
alert('组值无效');
|
||||
groupIDObj.focus();
|
||||
return false;
|
||||
}
|
||||
var emailObj = document.getElementById('email');
|
||||
if (!validEmail(emailObj.value)) {
|
||||
alert('电子邮箱格式不正确');
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
var telephoneObj = document.getElementById('telephone');
|
||||
if (!isTelephone(telephoneObj.value)) {
|
||||
alert('电话格式不正确');
|
||||
telephoneObj.focus();
|
||||
return false;
|
||||
}
|
||||
var nameObj = document.getElementById('firstname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var passwordObj = document.getElementById('password');
|
||||
if (isNull(passwordObj.value) || passwordObj.value.length < 6) {
|
||||
alert('用户密码不能少于6位');
|
||||
passwordObj.focus();
|
||||
return false;
|
||||
}
|
||||
var repasswordObj = document.getElementById('repassword');
|
||||
if (isNull(repasswordObj.value) || repasswordObj.value.length < 6) {
|
||||
alert('确认密码不能少于6位');
|
||||
repasswordObj.focus();
|
||||
return false;
|
||||
}
|
||||
if (repasswordObj.value !== passwordObj.value) {
|
||||
repasswordObj.focus();
|
||||
alert('用户密码和确认密码不相同');
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("Submit prevented");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
111
app/admin/view/customer/lists.html
Executable file
111
app/admin/view/customer/lists.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/customer/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>ID</th>
|
||||
<th>会员姓名</th>
|
||||
<th class="text-center">邮箱</th>
|
||||
<th class="text-center">电话</th>
|
||||
<th class="text-center">会员组</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">安全性</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$customer):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" value="<?php echo $customer['id'];?>"></td>
|
||||
<td><?php echo $customer['id'];?></td>
|
||||
<td><a href="<?php echo url('/admin/customer/edit',['id'=>$customer['id']]);?>"><?php echo $customer['firstname'];?></a></td>
|
||||
<td class="text-center"><?php echo $customer['email'];?></td>
|
||||
<td class="text-center"><?php echo $customer['telephone'];?></td>
|
||||
<td class="text-center"><?php echo $customer['group_name'];?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('-2' => '<label style="color:red;">删除</label>', '-1' => '<label style="color:blue;">禁用</label>', '0' => '<label style="color:green;">启用</label>','1' => '未审核'),$customer['stat']);?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('0' => '<label style="color:red;">否</label>', '1' => '<label style="color:green;">是</label>'),$customer['safe']);?></td>
|
||||
<td class="text-center"><?php echo date('Y-m-d H:i:s',$customer['addtime']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/customer/edit',['id'=>$customer['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $customer['id'];?>" data-url="<?php echo url('/admin/customer/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/customer/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/customer/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>
|
||||
110
app/admin/view/customer_group/add.html
Executable file
110
app/admin/view/customer_group/add.html
Executable file
@@ -0,0 +1,110 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/customer_group/lists');?>"> 会员组列表</a></li>
|
||||
<li class="active"> 会员组</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增会员组</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/customer_group/create');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">会员组名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员组名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">会员组排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(会员组排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">会员组描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"></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 class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var agree = $("input[name='agree']", this).prop('checked');
|
||||
if (agree) {
|
||||
//alert("Submitted");
|
||||
//e.preventDefault();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
alert("Submit prevented");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
111
app/admin/view/customer_group/edit.html
Executable file
111
app/admin/view/customer_group/edit.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/customer_group/lists');?>"> 会员组列表</a></li>
|
||||
<li class="active"> 会员组</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑会员组</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/customer_group/update');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">会员组名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $customer_group['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(会员组名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">产品排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $customer_group['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(产品排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">会员组描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"><?php echo $customer_group['description'];?></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 class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $customer_group['id'];?>">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var agree = $("input[name='agree']", this).prop('checked');
|
||||
if (agree) {
|
||||
//alert("Submitted");
|
||||
//e.preventDefault();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
alert("Submit prevented");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
108
app/admin/view/customer_group/lists.html
Executable file
108
app/admin/view/customer_group/lists.html
Executable file
@@ -0,0 +1,108 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/customer_group/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="has-feedback">
|
||||
<input type="text" class="form-control input-sm" id="list_search" placeholder="Search Name" value="<?php echo $search['skeyword'];?>">
|
||||
<span class="glyphicon glyphicon-search form-control-feedback"></span>
|
||||
</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-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>排序</th>
|
||||
<th>描述</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$customer_group):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" value="<?php echo $customer_group['id'];?>"></td>
|
||||
<td><?php echo $customer_group['id'];?></td>
|
||||
<td><a href="<?php echo url('/admin/customer_group/edit',['id'=>$customer_group['id']]);?>"><?php echo $customer_group['name'];?></a></td>
|
||||
<td><?php echo $customer_group['sort'];?></td>
|
||||
<td><?php echo $customer_group['description'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/customer_group/edit',['id'=>$customer_group['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $customer_group['id'];?>" data-url="<?php echo url('/admin/customer_group/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-3">
|
||||
<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/customer_group/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/customer_group/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<!-- <div class="col-sm-3">
|
||||
<div class="form-inline input-group">
|
||||
<span class="input-group-addon">会员组</span>
|
||||
<select name="groupid" id="groupid" class="form-control input-sm">
|
||||
<option value="0">默认值</option>
|
||||
<?php //echo $groupOption;?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-info btn-sm" id="move_archive">选择</button>
|
||||
</span>
|
||||
</div>
|
||||
</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 -->
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
124
app/admin/view/dbmanager/databaklist.html
Executable file
124
app/admin/view/dbmanager/databaklist.html
Executable file
@@ -0,0 +1,124 @@
|
||||
<div class="content-wrapper" id="pjax-container">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
数据备份
|
||||
<small>已备份数据</small>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<button type="button" class="btn btn-primary btn-sm" data-cod="refresh"> 刷新</button>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive no-padding lists-table">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th class="text-center">时间</th>
|
||||
<th class="text-center">卷</th>
|
||||
<th class="text-center">占用空间</th>
|
||||
<th class="text-center">压缩</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($databaklist as $k=>$bak):?>
|
||||
<tr>
|
||||
<td class="text-center"><?php echo $k;?></td>
|
||||
<td class="text-center"><?php echo $bak['part'];?></td>
|
||||
<td class="text-center"><?php echo format_bytes($bak['size'], '', 2);?></td>
|
||||
<td class="text-center"><?php echo $bak['compress'];?></td>
|
||||
<td class="text-center">
|
||||
<a href="<?php echo url('/admin/dbmanager/download',['tablename'=>$bak['time']]);?>" target="_blank" class="btn btn-success btn-sm">下载</a>
|
||||
<button type="button" class="btn btn-info btn-sm btn-restore" data-table="<?php echo $bak['time'];?>">恢复</button>
|
||||
<button type="button" class="btn btn-info btn-sm btn-delete" data-table="<?php echo $bak['time'];?>">删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer clearfix">
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
//Uncheck all checkboxes
|
||||
//Check all checkboxes
|
||||
$.each($(".lists-table input[name='ids[]']"), function() {
|
||||
//$(this).attr("checked", flag);
|
||||
$(this).prop("checked", !clicks);
|
||||
});
|
||||
if (clicks) {
|
||||
//$(".lists-table input[name='ids[]']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//$(".lists-table input[name='ids[]']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
$(".btn-restore").bind("click", function(event) {
|
||||
var that = this;
|
||||
var tablename = $(this).data('table');
|
||||
$(this).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(this).tooltip('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo url('/admin/dbmanager/restore');?>",
|
||||
data: {'tablename': tablename, 'flag': 0},
|
||||
dataType: 'json',
|
||||
success: function(data, status, xhr) {
|
||||
if (data.code) {
|
||||
//$(that).parent().parent().remove();
|
||||
alert(data.msg);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(".btn-delete").bind("click", function(event) {
|
||||
var that = this;
|
||||
var tablename = $(this).data('table');
|
||||
$(this).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(this).tooltip('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo url('/admin/dbmanager/delete');?>",
|
||||
data: {'tablename': tablename, 'flag': 0},
|
||||
dataType: 'json',
|
||||
success: function(data, status, xhr) {
|
||||
if (data.code) {
|
||||
$(that).parent().parent().remove();
|
||||
alert(data.msg);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
175
app/admin/view/dbmanager/index.html
Executable file
175
app/admin/view/dbmanager/index.html
Executable file
@@ -0,0 +1,175 @@
|
||||
<!-- 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/dbmanager/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="" method="post" id="sqlqueryform">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-cog text-green"></i> 命令行工具</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="querytype" class="col-sm-2 control-label">查询类型</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="querytype" value="1" checked> 单行命令(支持简单SELECT查询)
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="querytype" value="2"> 其他命令(返回执行的结果信息)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sqlquery" class="col-sm-2 control-label">运行SQL命令行</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="sqlquery" name="sqlquery" rows="6"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(不支持删除记录和表的操作)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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="button" 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/dbmanager/lists');?>" class="btn btn-block btn-primary">数据库表</a>
|
||||
<a href="<?php echo url('/admin/dbmanager/databaklist');?>" class="btn btn-block btn-primary">备份列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-sql" tabindex="-1">
|
||||
<div class="modal-dialog" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue" id="modal-title">执行结果</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="ajaxcontent"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(event) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$('#submit-btn').click(function(event) {
|
||||
var that = this;
|
||||
var options = {
|
||||
url: "<?php echo url('admin/dbmanager/sqlquery');?>",
|
||||
type: "post",
|
||||
cache: false,
|
||||
dataType: "json",
|
||||
data: $("#sqlqueryform").serialize(),
|
||||
beforeSend: function() {
|
||||
$(that).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(that).tooltip('show');
|
||||
},
|
||||
success: function(data) {
|
||||
//alert(data);
|
||||
console.log(data);
|
||||
if (data.code > 0) {
|
||||
switch (data.code) {
|
||||
case 1:
|
||||
$("#ajaxcontent").html('<p>' + data.msg + '</p>' + getTempContent(data.data));
|
||||
$('#modal-sql').modal({show: true, backdrop: 'static'});
|
||||
break;
|
||||
case 2:
|
||||
$("#ajaxcontent").html('<p>' + data.msg + '</p>');
|
||||
$('#modal-sql').modal({show: true, backdrop: 'static'});
|
||||
break;
|
||||
default:
|
||||
alert(data.msg);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
};
|
||||
$.ajax(options);
|
||||
});
|
||||
function getTempContent(data) {
|
||||
var html = '<div class="table-responsive"><table class="table table-hover table-bordered text-center">',
|
||||
len = data.length, i, row, p;
|
||||
row = data[0];
|
||||
html += '<tr>';
|
||||
for (p in row) {
|
||||
html += '<th>' + p + '</th>';
|
||||
}
|
||||
html += '</tr>';
|
||||
for (i = 0; i < len; i++) {
|
||||
row = data[i];
|
||||
html += '<tr>';
|
||||
for (p in row) {
|
||||
html += '<td>' + row[p] + '</td>';
|
||||
}
|
||||
html += '</tr>';
|
||||
}
|
||||
html += '</table></div>';
|
||||
return html;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
161
app/admin/view/dbmanager/lists.html
Executable file
161
app/admin/view/dbmanager/lists.html
Executable file
@@ -0,0 +1,161 @@
|
||||
<div class="content-wrapper" id="pjax-container">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
数据库
|
||||
<small>数据库中共有<?php echo $tablenums;?>张表,共计<?php echo $total;?></small>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<button type="button" class="btn btn-primary btn-sm" data-cod="refresh"> 刷新</button>
|
||||
<button type="button" class="btn btn-sm btn-primary btn-backupall"><i class="fa fa-download"></i> 全表备份</button>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive no-padding lists-table">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th>ID</th>
|
||||
<th>数据库表</th>
|
||||
<th class="text-center">记录条数</th>
|
||||
<th class="text-center">占用空间</th>
|
||||
<th class="text-center">编码</th>
|
||||
<th class="text-center">创建时间</th>
|
||||
<th class="text-center">说明</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$table):?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="ids[]" value="<?php echo $table['name'];?>"/></td>
|
||||
<td><?php echo $k;?></td>
|
||||
<td><?php echo $table['name'];?></td>
|
||||
<td class="text-center"><?php echo $table['rows'];?></td>
|
||||
<td class="text-center"><?php echo $table['size'];?></td>
|
||||
<td class="text-center"><?php echo $table['collation'];?></td>
|
||||
<td class="text-center"><?php echo $table['create_time'];?></td>
|
||||
<td class="text-center"><?php echo $table['comment'];?></td>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-success btn-sm btn-optimize" data-table="<?php echo $table['name'];?>">优化</button>
|
||||
<button type="button" class="btn btn-info btn-sm btn-repair" data-table="<?php echo $table['name'];?>">修复</button>
|
||||
<button type="button" class="btn btn-info btn-sm btn-backup" data-table="<?php echo $table['name'];?>">备份</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer clearfix">
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$(".btn-backupall").bind("click", function(event) {
|
||||
var that = this;
|
||||
$(this).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(this).tooltip('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo url('/admin/dbmanager/backupall');?>",
|
||||
dataType: 'json',
|
||||
success: function(data, status, xhr) {
|
||||
if (data.code) {
|
||||
alert(data.msg);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(".btn-optimize").bind("click", function(event) {
|
||||
var that = this;
|
||||
var tablename = $(this).data('table');
|
||||
$(this).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(this).tooltip('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo url('/admin/dbmanager/optimize');?>",
|
||||
data: {'tablename': tablename, 'flag': 0},
|
||||
dataType: 'json',
|
||||
success: function(data, status, xhr) {
|
||||
if (data.code) {
|
||||
alert(data.msg);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(".btn-repair").bind("click", function(event) {
|
||||
var that = this;
|
||||
var tablename = $(this).data('table');
|
||||
$(this).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(this).tooltip('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo url('/admin/dbmanager/repair');?>",
|
||||
data: {'tablename': tablename, 'flag': 0},
|
||||
dataType: 'json',
|
||||
success: function(data, status, xhr) {
|
||||
if (data.code) {
|
||||
alert(data.msg);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(".btn-backup").bind("click", function(event) {
|
||||
var that = this;
|
||||
var tablename = $(this).data('table');
|
||||
$(this).tooltip({trigger: 'manual', placement: 'top', html: 'true', title: '<i class="fa fa-spinner fa-spin"></i> 提示!正在处理中...'});
|
||||
$(this).tooltip('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo url('/admin/dbmanager/backup');?>",
|
||||
data: {'tablename': tablename, 'flag': 0},
|
||||
dataType: 'json',
|
||||
success: function(data, status, xhr) {
|
||||
if (data.code) {
|
||||
alert(data.msg);
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
setTimeout(function() {
|
||||
$(that).tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
322
app/admin/view/dept/add.html
Executable file
322
app/admin/view/dept/add.html
Executable file
@@ -0,0 +1,322 @@
|
||||
<!-- 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/dept/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/dept/create');?>" 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">菜单名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(菜单名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">上级菜单</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $deptOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(上级菜单)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">菜单排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(菜单排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="hidden" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="hidden" value="0" checked> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="hidden" value="1"> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="selModule" class="col-sm-2 control-label">所属模块</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="module" id="selModule" onchange="moduleChanged(this, 'selCtrl', 'selAction')">
|
||||
<option value="" selected="">默认值</option>
|
||||
<option value="admin">admin</option>
|
||||
<option value="index">index</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属模块)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">菜单MCA</label>
|
||||
<div class="col-sm-2"><!--onblur="ctrlChanged(this, 'selAction')"-->
|
||||
<select class="form-control" name="ctrl" id="selCtrl" onchange="ctrlChanged(this, 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="form-control" name="action" id="selAction">
|
||||
<option value="">默认值</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-danger" onclick="addURL();">添加</button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(菜单MCA)</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" id="url" required>
|
||||
<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="query" class="col-sm-2 control-label">查询参数</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="query">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(查询参数)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">菜单类型</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="functype" value="0" checked> 目录
|
||||
</label>
|
||||
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="functype" value="1"> 内部链接
|
||||
</label>
|
||||
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="functype" value="2"> 外部链接
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="icon" class="col-sm-2 control-label">图标</label>
|
||||
<div class="col-sm-3 has-feedback">
|
||||
<input type="text" class="form-control" id="icon" name="icon" placeholder="图标">
|
||||
<span id="icon_i" class=""></span>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" id="selectIcon" class="btn btn-primary" onclick="showIcon();">
|
||||
<i class="fa fa-hand-pointer-o"> 选择图标</i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(图标)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">菜单说明</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="description" name="description"></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">
|
||||
<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/dept/lists');?>" class="btn btn-block btn-primary">菜单列表</a>
|
||||
<a href="<?php echo url('/admin/dept/add');?>" 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">
|
||||
function showIcon() {
|
||||
var iconName;
|
||||
if ($("#icon").val())
|
||||
iconName = encodeURIComponent($("#icon").val());
|
||||
$('#modal-icon').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/icon');?>?iconName=" + iconName,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-icon" class="modal fade">' + html + '</div>');
|
||||
$('#modal-icon').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
}
|
||||
//类型changed事件
|
||||
function moduleChanged(obj, target, target2) {
|
||||
var module_val = obj.options[obj.selectedIndex].value;
|
||||
if (module_val && target && target2) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxctrl');?>",
|
||||
dataType: 'html',
|
||||
data: {"module": module_val},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
$('#' + target2).html('<option value="">默认值</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html('<option value="">默认值</option>' + html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//控制器changed事件
|
||||
function ctrlChanged(obj, target) {
|
||||
var ctrl_val = obj.options[obj.selectedIndex].value;
|
||||
if (ctrl_val && target) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxaction');?>",
|
||||
dataType: 'html',
|
||||
data: {"controller": ctrl_val, "module": 'admin'},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html(html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function addURL() {
|
||||
var module = $('#selModule').val();
|
||||
var ctrl = $('#selCtrl').val();
|
||||
var action = $('#selAction').val();
|
||||
ctrl = ctrl.slice(0, 1).toLowerCase() + ctrl.slice(1).replace(/([A-Z])/g, "_$1").toLowerCase();
|
||||
action = action.slice(0, 1).toLowerCase() + action.slice(1).replace(/([A-Z])/g, "_$1").toLowerCase();
|
||||
var urlObj = document.getElementById('url');
|
||||
if (module !== '' && ctrl !== '' && action !== '') {
|
||||
urlObj.value = module + '/' + ctrl + '/' + action;
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var moduleObj = document.getElementById('selModule');
|
||||
if (isNull(moduleObj.value)) {
|
||||
alert('所属模块值无效');
|
||||
moduleObj.focus();
|
||||
return false;
|
||||
}
|
||||
var urlObj = document.getElementById('url');
|
||||
if (isNull(urlObj.value)) {
|
||||
alert('URL必须填写');
|
||||
urlObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
328
app/admin/view/dept/edit.html
Executable file
328
app/admin/view/dept/edit.html
Executable file
@@ -0,0 +1,328 @@
|
||||
<!-- 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/dept/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/dept/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">菜单名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $dept['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(菜单名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">上级菜单</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="hidden" name="oldpid" value="<?php echo $dept['pid'];?>">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $deptOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(上级菜单)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">菜单排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $dept['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(菜单排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="hidden" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="hidden" value="0" <?php if(!$dept['hidden']):?>checked=""<?php endif;?>> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="hidden" value="1" <?php if($dept['hidden']):?>checked=""<?php endif;?>> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="selModule" class="col-sm-2 control-label">所属模块</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="module" id="selModule" onchange="moduleChanged(this, 'selCtrl', 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
<option value="admin" <?php if($dept['module']=='admin'):?>selected<?php endif;?>>admin</option>
|
||||
<option value="index" <?php if($dept['module']=='index'):?>selected<?php endif;?>>index</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属模块)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">菜单MCA</label>
|
||||
<div class="col-sm-2"><!--onblur="ctrlChanged(this, 'selAction')"-->
|
||||
<select class="form-control" name="ctrl" id="selCtrl" onchange="ctrlChanged(this, 'selAction')">
|
||||
<option value="">默认值</option>
|
||||
<option value="<?php echo $dept['ctrl'];?>" selected><?php echo $dept['ctrl'];?></option>
|
||||
<?php echo $ctrlOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="form-control" name="action" id="selAction">
|
||||
<option value="">默认值</option>
|
||||
<option value="<?php echo $dept['action'];?>" selected><?php echo $dept['action'];?></option>
|
||||
<?php echo $actionOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-danger" onclick="addURL();">添加</button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(菜单MCA)</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" id="url" required value="<?php echo $dept['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="query" class="col-sm-2 control-label">查询参数</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="query" value="<?php echo $dept['query'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(查询参数)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">菜单类型</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="functype" value="0" <?php if(!$dept['functype']):?>checked=""<?php endif;?>> 目录
|
||||
</label>
|
||||
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="functype" value="1" <?php if($dept['functype']==1):?>checked=""<?php endif;?>> 内部链接
|
||||
</label>
|
||||
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="functype" value="2" <?php if($dept['functype']==2):?>checked=""<?php endif;?>> 外部链接
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="icon" class="col-sm-2 control-label">图标</label>
|
||||
<div class="col-sm-3 has-feedback">
|
||||
<input type="text" class="form-control" id="icon" name="icon" value="<?php echo $dept['icon'];?>">
|
||||
<span id="icon_i" class="form-control-feedback <?php echo $dept['icon'];?>"></span>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" id="selectIcon" class="btn btn-primary" onclick="showIcon();">
|
||||
<i class="fa fa-hand-pointer-o"> 选择图标</i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(图标)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">菜单说明</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $dept['description'];?></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 type="hidden" name="id" value="<?php echo $dept['id'];?>">
|
||||
<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/dept/lists');?>" class="btn btn-block btn-primary">菜单列表</a>
|
||||
<a href="<?php echo url('/admin/dept/add');?>" 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">
|
||||
function showIcon() {
|
||||
var iconName;
|
||||
if ($("#icon").val())
|
||||
iconName = encodeURIComponent($("#icon").val());
|
||||
$('#modal-icon').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/icon');?>?iconName=" + iconName,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-icon" class="modal fade">' + html + '</div>');
|
||||
$('#modal-icon').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
}
|
||||
//类型changed事件
|
||||
function moduleChanged(obj, target, target2) {
|
||||
var module_val = obj.options[obj.selectedIndex].value;
|
||||
if (module_val && target && target2) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxctrl');?>",
|
||||
dataType: 'html',
|
||||
data: {"module": module_val},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
$('#' + target2).html('<option value="">默认值</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html('<option value="">默认值</option>' + html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//控制器changed事件
|
||||
function ctrlChanged(obj, target) {
|
||||
var ctrl_val = obj.options[obj.selectedIndex].value;
|
||||
if (ctrl_val && target) {
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/tool/getajaxaction');?>",
|
||||
dataType: 'html',
|
||||
data: {"controller": ctrl_val, "module": 'admin'},
|
||||
beforeSend: function(XMLHttpRequest) {
|
||||
$('#' + target).html('<option value="">加载中...</option>');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#' + target).html(html);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("上传失败,请检查网络后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function addURL() {
|
||||
var module = $('#selModule').val();
|
||||
var ctrl = $('#selCtrl').val();
|
||||
var action = $('#selAction').val();
|
||||
var urlObj = document.getElementById('url');
|
||||
ctrl = ctrl.slice(0, 1).toLowerCase() + ctrl.slice(1).replace(/([A-Z])/g, "_$1").toLowerCase();
|
||||
action = action.slice(0, 1).toLowerCase() + action.slice(1).replace(/([A-Z])/g, "_$1").toLowerCase();
|
||||
if (module !== '' && ctrl !== '' && action !== '') {
|
||||
urlObj.value = module + '/' + ctrl + '/' + action;
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var moduleObj = document.getElementById('selModule');
|
||||
if (isNull(moduleObj.value)) {
|
||||
alert('所属模块值无效');
|
||||
moduleObj.focus();
|
||||
return false;
|
||||
}
|
||||
var urlObj = document.getElementById('url');
|
||||
if (isNull(urlObj.value)) {
|
||||
alert('URL必须填写');
|
||||
urlObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
111
app/admin/view/dept/lists.html
Executable file
111
app/admin/view/dept/lists.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- 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/dept/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="70rem" class="text-center">ID</th>
|
||||
<th width="45rem" class="text-center">图标</th>
|
||||
<th>菜单名称</th>
|
||||
<th class="text-center">菜单URL</th>
|
||||
<th class="text-center">查询参数</th>
|
||||
<th width="75rem" class="text-center">菜单排序</th>
|
||||
<th width="75rem" class="text-center">是否显示</th>
|
||||
<th width="170rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$dept):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $dept['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $dept['id'];?></td>
|
||||
<td class="text-center"><span class="<?php echo empty($dept['icon'])?'fa fa-ban':$dept['icon'];?>"></sapn></td>
|
||||
<td>
|
||||
<?php if ($dept['level']) echo str_repeat('|---', $dept['level']); ?><a href="<?php echo url('/admin/dept/edit',['id'=>$dept['id']]);?>"><?php echo $dept['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><?php echo $dept['url'];?></td>
|
||||
<td class="text-center"><?php echo $dept['query'];?></td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $dept['sort'];?>" type="text" data-id="<?php echo $dept['id'];?>" data-url="<?php echo url('/admin/dept/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if(!$dept['hidden']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $dept['id'];?>" data-url="<?php echo url('/admin/dept/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/dept/add',['pid'=>$dept['id']]);?>">添加子菜单</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/dept/edit',['id'=>$dept['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $dept['id'];?>" data-url="<?php echo url('/admin/dept/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">
|
||||
<!-- Check all button -->
|
||||
<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-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/dept/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
367
app/admin/view/download/add.html
Executable file
367
app/admin/view/download/add.html
Executable file
@@ -0,0 +1,367 @@
|
||||
<!-- 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/download/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/download/create');?>" 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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
|
||||
<li><a href="#navthird" data-toggle="tab">文件信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</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">下载名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(下载名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="cid" id="cid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">下载排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(下载排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="downloadcount" class="col-sm-2 control-label">下载数量<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="downloadcount" id="downloadcount">
|
||||
<input type="hidden" name="viewcount" value="10">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(下载数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="headline" class="col-sm-2 control-label">首页推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="headline" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="headline" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(首页推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ishot" class="col-sm-2 control-label">热门推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="ishot" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="ishot" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(热门推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">下载标签</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(下载标签,多个用英文逗号分隔)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">下载描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<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 class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">下载图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="download-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="app_model" class="col-sm-2 control-label">适合型号</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="app_model">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(适合型号)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="support_os" class="col-sm-2 control-label">支持系统</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="support_os">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(支持系统)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="format" class="col-sm-2 control-label">文件格式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="format">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文件格式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">下载文件</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table id="dls" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left" width="50%">文件</td>
|
||||
<td class="text-left" width="40%">按钮名称</td>
|
||||
<td class="text-left" width="10%">操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="dl-row0">
|
||||
<td class="text-left"><div class="input-group"><input class="form-control" name="downloadpath[0]" value="" id="input-dl0" type="text"><span class="input-group-btn"><button class="btn btn-primary" type="button" onclick="webuploader_modal('input-dl0', '', 'download', 'file', 'file_call_back')"><i class="fa fa-fw fa-download"></i></button></span></div></td>
|
||||
<td class="text-left"><input name="downloadpath64[0]" value="" placeholder="按钮名称" class="form-control" size="2" type="text"></td>
|
||||
<td class="text-left"><button type="button" onclick="$('#dl-row0').remove();" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
<td class="text-left"><button type="button" onclick="addDl();" title="添加下载" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/download/lists');?>" class="btn btn-block btn-primary">下载列表</a>
|
||||
<a href="<?php echo url('/admin/download_category/lists');?>" class="btn btn-block btn-primary">下载分类</a>
|
||||
<a href="<?php echo url('/admin/download/add');?>" 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 -->
|
||||
<?php echo editor('#content');?>
|
||||
<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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var cidObj = document.getElementById('cid');
|
||||
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
cidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var downloadcountObj = document.getElementById('downloadcount');
|
||||
if (isNaN(downloadcountObj.value)) {
|
||||
alert('下载数量值必须是数字');
|
||||
downloadcountObj.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">
|
||||
var dl_row = "<?php echo '1';?>";
|
||||
function addDl() {
|
||||
var html = '<tr id="dl-row' + dl_row + '">';
|
||||
html += ' <td class="text-left"><div class="input-group"><input type="text" class="form-control" name="downloadpath[' + dl_row + ']" value="" id="input-dl' + dl_row + '"><span class="input-group-btn"><button class="btn btn-primary" type="button" onclick="webuploader_modal(\'input-dl' + dl_row + '\', \'\', \'download\', \'file\', \'file_call_back\')"><i class="fa fa-fw fa-download"></i></button></span></div></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="downloadpath64[' + dl_row + ']" value="" placeholder="按钮名称" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#dl-row' + dl_row + '\').remove();" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#dls tbody').append(html);
|
||||
dl_row++;
|
||||
}
|
||||
</script>
|
||||
12
app/admin/view/download/content.html
Executable file
12
app/admin/view/download/content.html
Executable file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<base target='_blank'>
|
||||
<title>下载内容</title>
|
||||
</head>
|
||||
<body>
|
||||
<div><?php echo $download['content'];?></div>
|
||||
</body>
|
||||
</html>
|
||||
375
app/admin/view/download/edit.html
Executable file
375
app/admin/view/download/edit.html
Executable file
@@ -0,0 +1,375 @@
|
||||
<!-- 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/download/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/download/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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
|
||||
<li><a href="#navthird" data-toggle="tab">文件信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</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">下载名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $download['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(下载名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="cid" id="cid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">下载排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $download['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(数字越小越靠前)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="downloadcount" class="col-sm-2 control-label">下载数量<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="downloadcount" id="downloadcount" value="<?php echo $download['downloadcount'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(下载数量)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="headline" class="col-sm-2 control-label">首页推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="headline" type="radio" value="1" <?php if($download['headline']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="headline" type="radio" value="0" <?php if(!$download['headline']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(首页推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ishot" class="col-sm-2 control-label">热门推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="ishot" type="radio" value="1" <?php if($download['ishot']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="ishot" type="radio" value="0" <?php if(!$download['ishot']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(热门推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($download['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$download['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tags" class="col-sm-2 control-label">下载标签</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="tags" value="<?php echo $download['tags'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(下载标签,多个用英文逗号分隔)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">下载描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $download['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<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 class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."><?php echo $download['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">下载图片<br>尺寸:320X320</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="download-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($download['picture'])?'/uploads/nopic.jpg':$download['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $download['picture'];?>" id="input-download-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="app_model" class="col-sm-2 control-label">适合型号</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="app_model" value="<?php echo $download['app_model'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(适合型号)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="support_os" class="col-sm-2 control-label">支持系统</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="support_os" value="<?php echo $download['support_os'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(支持系统)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="format" class="col-sm-2 control-label">文件格式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="format" value="<?php echo $download['format'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(文件格式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">下载文件</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table id="dls" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left" width="50%">文件</td>
|
||||
<td class="text-left" width="40%">按钮名称</td>
|
||||
<td class="text-left" width="10%">操作</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $dl_row = 0;
|
||||
$downloadpath=explode(',',$download['downloadpath']);
|
||||
$downloadpath64=explode(',',$download['downloadpath64']);
|
||||
foreach ($downloadpath as $k => $dl):
|
||||
$dl_row=$k;
|
||||
$dlname=empty($downloadpath64[$k])?'':$downloadpath64[$k];
|
||||
?>
|
||||
<tr id="dl-row<?php echo $dl_row; ?>">
|
||||
<td class="text-left"><div class="input-group"><input type="text" class="form-control" name="downloadpath[<?php echo $dl_row; ?>]" value="<?php echo $dl; ?>" id="input-dl<?php echo $dl_row; ?>"><span class="input-group-btn"><button class="btn btn-primary" type="button" onclick="webuploader_modal('input-dl<?php echo $dl_row; ?>', '', 'download', 'file', 'file_call_back')"><i class="fa fa-fw fa-download"></i></button></span></div></td>
|
||||
<td class="text-left"><input name="downloadpath64[<?php echo $dl_row; ?>]" value="<?php echo $dlname; ?>" placeholder="按钮名称" class="form-control" size="2" type="text"></td>
|
||||
<td class="text-left"><button type="button" onclick="$('#dl-row<?php echo $dl_row; ?>').remove();" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
<?php endforeach;$dl_row++;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
<td class="text-left"><button type="button" onclick="addDl();" title="添加下载" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $download['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $download['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"><?php echo $download['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input type="hidden" name="id" value="<?php echo $download['id'];?>">
|
||||
<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/download/lists');?>" class="btn btn-block btn-primary">下载列表</a>
|
||||
<a href="<?php echo url('/admin/download_category/lists');?>" class="btn btn-block btn-primary">下载分类</a>
|
||||
<a href="<?php echo url('/admin/download/add');?>" 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 -->
|
||||
<?php echo editor('#content');?>
|
||||
<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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var cidObj = document.getElementById('cid');
|
||||
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
cidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var downloadcountObj = document.getElementById('downloadcount');
|
||||
if (isNaN(downloadcountObj.value)) {
|
||||
alert('下载数量值必须是数字');
|
||||
downloadcountObj.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">
|
||||
var dl_row = "<?php echo $dl_row;?>";
|
||||
function addDl() {
|
||||
var html = '<tr id="dl-row' + dl_row + '">';
|
||||
html += ' <td class="text-left"><div class="input-group"><input type="text" class="form-control" name="downloadpath[' + dl_row + ']" value="" id="input-dl' + dl_row + '"><span class="input-group-btn"><button class="btn btn-primary" type="button" onclick="webuploader_modal(\'input-dl' + dl_row + '\', \'\', \'download\', \'file\', \'file_call_back\')"><i class="fa fa-fw fa-download"></i></button></span></div></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="downloadpath64[' + dl_row + ']" value="" placeholder="按钮名称" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#dl-row' + dl_row + '\').remove();" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#dls tbody').append(html);
|
||||
dl_row++;
|
||||
}
|
||||
</script>
|
||||
206
app/admin/view/download/lists.html
Executable file
206
app/admin/view/download/lists.html
Executable file
@@ -0,0 +1,206 @@
|
||||
<!-- 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/download/lists');?>"> 下载</a></li>
|
||||
<li class="active"> 下载列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/download/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标签</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="tags" class="form-control" value="<?php echo $search['tags']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">添加时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="cid" class="form-control"><!-- class="col-xs-10 col-sm-4" -->
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="reset" class="btn btn-info btn-sm" ><i class="fa fa-fw fa-undo"></i>重置</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">下载列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</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">图片</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th>下载名称</th>
|
||||
<th class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">下载排序</th>
|
||||
<th width="75rem" class="text-center">首页推荐</th>
|
||||
<th width="75rem" class="text-center">热门推荐</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th width="60rem" class="text-center">状态</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$download):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $download['id'];?>"></td>
|
||||
<td><img src="<?php echo getImage($download['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $download['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="text-center"><?php echo $download['id'];?></td>
|
||||
<td class="text-left">
|
||||
<a href="<?php echo url('/admin/download/edit',['id'=>$download['id']]);?>"><?php echo $download['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="<?php echo url('/admin/download/lists',['cid'=>$download['cid']]);?>"><?php echo $download['categoryname'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $download['sort'];?>" type="text" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download['headline']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/toggleheadline');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download['ishot']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/toggleishot');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$download['createtime']);?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('-2' => '<span class="label label-warning">已删除</span>','-1' => '<span class="label label-danger">删除</span>', '0' => '<span class="label label-success">启用</span>', '1' => '<span class="label label-info">已审核</span>'),$download['stat']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download/edit',['id'=>$download['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/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-3">
|
||||
<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/download/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/download/recommends');?>" 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/download/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-inline input-group">
|
||||
<span class="input-group-addon">分类</span>
|
||||
<select name="cid" id="move_cid" class="form-control input-sm">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-info btn-sm" data-url="<?php echo url('/admin/download/movecategory');?>" data-cod="move">移动</button>
|
||||
</span>
|
||||
</div>
|
||||
</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>
|
||||
139
app/admin/view/download/recycle.html
Executable file
139
app/admin/view/download/recycle.html
Executable file
@@ -0,0 +1,139 @@
|
||||
<!-- 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/download/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">图片</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th>下载名称</th>
|
||||
<th class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">下载排序</th>
|
||||
<th width="75rem" class="text-center">首页推荐</th>
|
||||
<th width="75rem" class="text-center">热门推荐</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th width="60rem" class="text-center">状态</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$download):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $download['id'];?>"></td>
|
||||
<td><img src="<?php echo getImage($download['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $download['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="text-center"><?php echo $download['id'];?></td>
|
||||
<td class="text-left">
|
||||
<?php echo $download['name'];?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php echo $download['categoryname'];?>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $download['sort'];?>" type="text" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download['headline']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/toggleheadline');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download['ishot']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/toggleishot');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$download['createtime']);?></td>
|
||||
<td class="text-center"><?php echo array_switch(array('-2' => '<span class="label label-warning">已删除</span>','-1' => '<span class="label label-danger">删除</span>', '0' => '<span class="label label-success">启用</span>', '1' => '<span class="label label-info">已审核</span>'),$download['stat']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/destroy');?>" data-cod="dowarn">删除</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $download['id'];?>" data-url="<?php echo url('/admin/download/recovery');?>" 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-3">
|
||||
<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/download/destroys');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/download/recommends');?>" data-cod="batch">推荐</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/download/recoverys');?>" 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/download/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-inline input-group">
|
||||
<span class="input-group-addon">分类</span>
|
||||
<select name="cid" id="move_cid" class="form-control input-sm">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-info btn-sm" data-url="<?php echo url('/admin/download/movecategory');?>" data-cod="move">移动</button>
|
||||
</span>
|
||||
</div>
|
||||
</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>
|
||||
368
app/admin/view/download_category/add.html
Executable file
368
app/admin/view/download_category/add.html
Executable file
@@ -0,0 +1,368 @@
|
||||
<!-- 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/download_category/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/download_category/create');?>" 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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
<!-- <li><a href="#navfifth" data-toggle="tab">高级选项</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">分类名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(分类名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">分类排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(分类排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" checked> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0"> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">分类描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(分类描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="download-category-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfifth">
|
||||
<?php if($administrator):?>
|
||||
<div class="form-group">
|
||||
<label for="tempindex" class="col-sm-2 control-label">封面页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempindex" id="tempindex">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempindex">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(封面页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="templist" class="col-sm-2 control-label">列表页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="templist" id="templist">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="templist">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(列表页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tempdetail" class="col-sm-2 control-label">内容页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempdetail" id="tempdetail">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempdetail">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="form-group">
|
||||
<label for="classtype" class="col-sm-2 control-label">栏目类型</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="1"> 封面
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="2" checked> 列表
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="3"> 外部链接
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(栏目属性)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">链接地址</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="url" id="url-input">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="url-btn"><i class="fa fa-globe"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(链接地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/download/lists');?>" class="btn btn-block btn-primary">下载列表</a>
|
||||
<a href="<?php echo url('/admin/download_category/lists');?>" class="btn btn-block btn-primary">下载分类</a>
|
||||
<a href="<?php echo url('/admin/download_category/add');?>" class="btn btn-block btn-primary">添加分类</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-url" tabindex="0">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">外部链接内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="urliframe" style="width:100%;height:400px;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#url-btn").click(function(e) {
|
||||
var urlObj = document.getElementById('url-input');
|
||||
var frameSrc = urlObj.value;
|
||||
if (isUrl(frameSrc)) {
|
||||
$("#urliframe").attr("src", frameSrc);
|
||||
$('#modal-url').modal({show: true, backdrop: 'static'});
|
||||
} else {
|
||||
alert('链接内容有误');
|
||||
urlObj.focus();
|
||||
}
|
||||
|
||||
});
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.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">
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
51
app/admin/view/download_category/childcat.html
Executable file
51
app/admin/view/download_category/childcat.html
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php if(!empty($list)):?>
|
||||
<table class="table table-hover table-bordered margin-bottom-none">
|
||||
<tbody>
|
||||
<?php foreach($list as $k=>$download_category):?>
|
||||
<tr>
|
||||
<td class="tcell1"><input type="checkbox" name="ids[]" value="<?php echo $download_category['id'];?>"></td>
|
||||
<td class="tcell2"><?php echo $download_category['id'];?></td>
|
||||
<td class="tcell3">
|
||||
<?php echo str_repeat('|---', $level); ?> <span class="fa fa-fw fa-plus-square" data-id="<?php echo $download_category['id'];?>" data-level="<?php echo $level;?>" data-cod="getchild"></span> <a href="<?php echo url('/admin/download_category/lists',['pid'=>$download_category['id']]);?>"><?php echo $download_category['name'];?></a>
|
||||
</td>
|
||||
<td class="tcell4"><input size="3" maxlength="7" value="<?php echo $download_category['sort'];?>" type="text" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="tcell5">
|
||||
<span class="fa <?php if($download_category['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell6">
|
||||
<span class="fa <?php if($download_category['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell7"><img src="<?php echo getImage($download_category['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $download_category['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="tcell8">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download_category/add',['pid'=>$download_category['id']]);?>">添加子分类</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download/add',['cid'=>$download_category['id']]);?>">添加下载</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download_category/edit',['id'=>$download_category['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td id="catsun<?php echo $download_category['id'];?>" colspan="8" class="table-responsive no-padding" style="display: none;"></td></tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("[data-cod='sort']", "#catsun<?php echo $pid;?>").keyup(ajaxsort);
|
||||
$("[data-cod='dowarn']", "#catsun<?php echo $pid;?>").click(ajaxdowarn);
|
||||
$("[data-cod='state']", "#catsun<?php echo $pid;?>").click(togglestate);
|
||||
$("[data-cod='getchild']", "#catsun<?php echo $pid;?>").click(ajaxgetchild);
|
||||
$("[data-toggle='preview-image']", "#catsun<?php echo $pid;?>").each(function() {
|
||||
var element = $(this);
|
||||
element.popover({
|
||||
content: function() {
|
||||
return '<img src="' + element.attr('data-image') + '" style="max-width:200px;"/>';
|
||||
},
|
||||
placement: 'auto',
|
||||
trigger: 'click',
|
||||
html: true,
|
||||
container: 'body',
|
||||
delay: {show: 5, hide: 10}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif;?>
|
||||
371
app/admin/view/download_category/edit.html
Executable file
371
app/admin/view/download_category/edit.html
Executable file
@@ -0,0 +1,371 @@
|
||||
<!-- 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/download_category/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/download_category/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>
|
||||
<!-- <li><a href="#navsecond" data-toggle="tab">详细内容</a></li> -->
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
<!-- <li><a href="#navfifth" data-toggle="tab">高级选项</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">分类名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $download_category['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(分类名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属分类<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $categoryOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">分类排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $download_category['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(分类排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" <?php if($download_category['isshow']):?>checked=""<?php endif;?>/> 显示
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0" <?php if(!$download_category['isshow']):?>checked=""<?php endif;?>/> 隐藏
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($download_category['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$download_category['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">分类描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $download_category['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(分类描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80"><?php echo $download_category['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分类图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="download-category-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($download_category['picture'])?'/uploads/nopic.jpg':$download_category['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $download_category['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $download_category['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $download_category['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"><?php echo $download_category['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfifth">
|
||||
<?php if($administrator):?>
|
||||
<div class="form-group">
|
||||
<label for="tempindex" class="col-sm-2 control-label">封面页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempindex" id="tempindex" value="<?php echo $download_category['tempindex'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempindex">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(封面页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="templist" class="col-sm-2 control-label">列表页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="templist" id="templist" value="<?php echo $download_category['templist'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="templist">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(列表页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tempdetail" class="col-sm-2 control-label">内容页模板</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><a href="javascript:void(0);"><i class="fa fa-fw fa-file"></i></a></span>
|
||||
<input type="text" class="form-control" name="tempdetail" id="tempdetail" value="<?php echo $download_category['tempdetail'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" data-cod="tempdetail">模板</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(内容页模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="form-group">
|
||||
<label for="classtype" class="col-sm-2 control-label">栏目类型</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="1" <?php if($download_category['classtype']==1):?>checked=""<?php endif;?>> 封面
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="2" <?php if($download_category['classtype']==2):?>checked=""<?php endif;?>> 列表
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="classtype" value="3" <?php if($download_category['classtype']==3):?>checked=""<?php endif;?>> 外部链接
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(栏目属性)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">链接地址</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="url" id="url-input" value="<?php echo $download_category['url'];?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" id="url-btn"><i class="fa fa-globe"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(链接地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input type="hidden" name="id" value="<?php echo $download_category['id'];?>">
|
||||
<input type="hidden" name="oldpid" value="<?php echo $download_category['pid'];?>">
|
||||
<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/download/lists');?>" class="btn btn-block btn-primary">下载列表</a>
|
||||
<a href="<?php echo url('/admin/download_category/lists');?>" class="btn btn-block btn-primary">下载分类</a>
|
||||
<a href="<?php echo url('/admin/download_category/add');?>" class="btn btn-block btn-primary">添加分类</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-url" tabindex="0">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">外部链接内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="urliframe" style="width:100%;height:400px;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#url-btn").click(function(e) {
|
||||
var urlObj = document.getElementById('url-input');
|
||||
var frameSrc = urlObj.value;
|
||||
if (isUrl(frameSrc)) {
|
||||
$("#urliframe").attr("src", frameSrc);
|
||||
$('#modal-url').modal({show: true, backdrop: 'static'});
|
||||
} else {
|
||||
alert('链接内容有误');
|
||||
urlObj.focus();
|
||||
}
|
||||
|
||||
});
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.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">
|
||||
var image_row = "<?php echo '0';?>";
|
||||
function addImage() {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left"><a href="" id="thumb-image' + image_row + '"data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg" alt="" title="" data-placeholder="/uploads/nopic.jpg" /></a><input type="hidden" name="product_image[' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="product_image[' + image_row + '][sort_order]" value="" placeholder="排序" class="form-control" size="2"/></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + '\').remove();" data-toggle="tooltip" title="删除" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
$('#images tbody').append(html);
|
||||
image_row++;
|
||||
}
|
||||
</script>
|
||||
149
app/admin/view/download_category/listcategory.html
Executable file
149
app/admin/view/download_category/listcategory.html
Executable file
@@ -0,0 +1,149 @@
|
||||
<!-- 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/download_category/lists');?>"> 分类</a></li>
|
||||
<?php if($breadcrumb):foreach($breadcrumb as $k=>$bc):?>
|
||||
<?php if($pid==$bc['id']):?>
|
||||
<li class="active"> <?php echo $bc['name'];?></li>
|
||||
<?php else:?>
|
||||
<li><a href="<?php echo url('/admin/download_category/lists',['pid'=>$bc['id']]);?>"> <?php echo $bc['name'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php endforeach;endif;?>
|
||||
</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">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</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 class="tcell1"> </th>
|
||||
<th class="tcell2">ID</th>
|
||||
<th class="tcell3">分类名称</th>
|
||||
<th class="tcell4">分类排序</th>
|
||||
<th class="tcell5">是否显示</th>
|
||||
<th class="tcell6">是否推荐</th>
|
||||
<th class="tcell7">图片</th>
|
||||
<th class="tcell8">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$download_category):?>
|
||||
<tr>
|
||||
<td class="tcell1"><input type="checkbox" name="ids[]" value="<?php echo $download_category['id'];?>"></td>
|
||||
<td class="tcell2"><?php echo $download_category['id'];?></td>
|
||||
<td class="tcell3">
|
||||
<span class="fa fa-fw fa-plus-square" data-id="<?php echo $download_category['id'];?>" data-level="<?php echo $level;?>" data-cod="getchild"></span> <a href="<?php echo url('/admin/download_category/lists',['pid'=>$download_category['id']]);?>"><?php echo $download_category['name'];?></a>
|
||||
</td>
|
||||
<td class="tcell4"><input size="3" maxlength="7" value="<?php echo $download_category['sort'];?>" type="text" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="tcell5">
|
||||
<span class="fa <?php if($download_category['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell6">
|
||||
<span class="fa <?php if($download_category['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell7"><img src="<?php echo getImage($download_category['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $download_category['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="tcell8">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download_category/add',['pid'=>$download_category['id']]);?>">添加子分类</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download/add',['cid'=>$download_category['id']]);?>">添加下载</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download_category/edit',['id'=>$download_category['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td id="catsun<?php echo $download_category['id'];?>" colspan="8" class="table-responsive no-padding" style="display: none;"></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">
|
||||
<!-- Check all button -->
|
||||
<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-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/download_category/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table .tcell1{width:3.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell2{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell3{text-align: left;vertical-align: middle;}
|
||||
.table-responsive .table .tcell4{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell5{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell6{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell7{width:6rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell8{width:16.5rem;text-align:center;vertical-align: middle;}
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("[data-cod='getchild']").click(ajaxgetchild);
|
||||
});
|
||||
function ajaxgetchild(event) {
|
||||
event = event ? event : window.event;
|
||||
var obj = event.srcElement ? event.srcElement : event.target;
|
||||
var val = (obj.className.match(/fa-plus-square/i)) ? 1 : 0;
|
||||
//var method = obj.getAttribute('data-method');
|
||||
//var url = obj.getAttribute('data-url');
|
||||
var id = obj.getAttribute('data-id');
|
||||
obj.className = val ? 'fa fa-fw fa-minus-square' : 'fa fa-fw fa-plus-square';
|
||||
var childcat = $('#catsun' + id);
|
||||
if (childcat.html().length < 10) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
data: {'pid': id, level: obj.getAttribute("data-level")},
|
||||
url: "<?php echo url('/admin/download_category/childcat');?>",
|
||||
dataType: 'html',
|
||||
success: function(data, status, xhr) {
|
||||
childcat.html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (val) {
|
||||
childcat.css('display', 'table-cell');
|
||||
} else {
|
||||
childcat.css('display', 'none');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
111
app/admin/view/download_category/lists.html
Executable file
111
app/admin/view/download_category/lists.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- 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/download_category/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="70rem" class="text-center">ID</th>
|
||||
<th>分类名称</th>
|
||||
<th width="75rem" class="text-center">分类排序</th>
|
||||
<th width="75rem" class="text-center">是否显示</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="60rem" class="text-center">图片</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$download_category):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $download_category['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $download_category['id'];?></td>
|
||||
<td>
|
||||
<?php if ($download_category['level']) echo str_repeat('|---', $download_category['level']); ?><a href="<?php echo url('/admin/download_category/edit',['id'=>$download_category['id']]);?>"><?php echo $download_category['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $download_category['sort'];?>" type="text" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download_category['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($download_category['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td><img src="<?php echo getImage($download_category['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $download_category['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download_category/add',['pid'=>$download_category['id']]);?>">添加子分类</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download/add',['cid'=>$download_category['id']]);?>">添加下载</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/download_category/edit',['id'=>$download_category['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $download_category['id'];?>" data-url="<?php echo url('/admin/download_category/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">
|
||||
<!-- Check all button -->
|
||||
<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" id="pagerefresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/download_category/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
83
app/admin/view/download_category/subcolumn.html
Executable file
83
app/admin/view/download_category/subcolumn.html
Executable file
@@ -0,0 +1,83 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">副分类选择框</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="row">
|
||||
<?php foreach($list as $k=>$category1):?>
|
||||
<div class="col-xs-12">
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category1['id'];?>" <?php echo in_array($category1['id'], $columns) ? 'checked' : '';?>> <?php echo $category1['name'];?></label>
|
||||
<?php if($category1['haschild']):?>
|
||||
<div class="row">
|
||||
<?php foreach($category1['child'] as $k=>$category2):?>
|
||||
<div class="col-xs-11 col-xs-offset-1">
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category2['id'];?>" <?php echo in_array($category2['id'], $columns) ? 'checked' : '';?>> <?php echo $category2['name'];?></label>
|
||||
<?php if($category2['haschild']):?>
|
||||
<div class="row">
|
||||
<?php foreach($category2['child'] as $k=>$category3):?>
|
||||
<div class="col-xs-10 col-xs-offset-2">
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category3['id'];?>" <?php echo in_array($category3['id'], $columns) ? 'checked' : '';?>> <?php echo $category3['name'];?></label>
|
||||
<?php if($category3['haschild']):?>
|
||||
<div class="row">
|
||||
<div class="col-xs-9 col-xs-offset-3">
|
||||
<?php foreach($category3['child'] as $k=>$category4):?>
|
||||
<label class="checkbox-inline"><input type="checkbox" value="<?php echo $category4['id'];?>" <?php echo in_array($category4['id'], $columns) ? 'checked' : '';?>> <?php echo $category4['name'];?></label>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<!-- <button type="button" class="btn btn-default btn-sm pull-left" id="checkbox-suball">全选</button>-->
|
||||
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="checkbox-subcolumn">确定</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
<script type="text/javascript">
|
||||
$('#checkbox-subcolumn').click(function() {
|
||||
var state = false;
|
||||
var ids = new Array();
|
||||
var titles = new Array();
|
||||
$('#modal-subcolumn input[type=checkbox]').each(function(i) {
|
||||
if ($(this).prop("checked")) {
|
||||
state = true;
|
||||
ids.push($(this).val());
|
||||
titles.push($(this).parent().text());
|
||||
//titles.push($(this).data('title'));
|
||||
}
|
||||
});
|
||||
if (state == true) {
|
||||
$('#subcid').val(ids.join(','));
|
||||
console.log(titles.join(' '));
|
||||
//$('#adtitle').val(titles.join(' '));
|
||||
$('#modal-subcolumn').modal('hide');
|
||||
} else {
|
||||
if (confirm('确认清空此值吗?')) {
|
||||
$('#subcid').val('');
|
||||
//$('#adtitle').val('');
|
||||
$('#modal-subcolumn').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#checkbox-suball').click(function() {
|
||||
$('#modal-subcolumn input[type=checkbox]').each(function(i) {
|
||||
$(this).prop("checked", true);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
321
app/admin/view/filemanager/show.html
Executable file
321
app/admin/view/filemanager/show.html
Executable file
@@ -0,0 +1,321 @@
|
||||
<div id="filemanager" class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">模板管理器</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
<a href="<?php echo $parent; ?>" data-toggle="tooltip" title="上一级" id="button-parent" class="btn btn-info"><i class="glyphicon glyphicon-level-up"></i></a>
|
||||
<a href="<?php echo $refresh; ?>" data-toggle="tooltip" title="刷新" id="button-refresh" class="btn btn-info"><i class="glyphicon glyphicon-refresh"></i></a>
|
||||
<a href="<?php echo $webuploader; ?>" data-toggle="tooltip" title="上传文件" id="button-webuploader" class="btn btn-info"><i class="glyphicon glyphicon-cloud-upload"></i></a>
|
||||
<button type="button" data-toggle="tooltip" title="直接上传" id="button-upload" class="btn btn-primary"><i class="glyphicon glyphicon-upload"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="新目录" id="button-folder" class="btn btn-info"><i class="glyphicon glyphicon-folder-close"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="删除" id="button-delete" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="重命名" id="button-rename" class="btn btn-danger"><i class="glyphicon glyphicon-transfer"></i></button>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="input-group">
|
||||
<input type="text" name="search" value="<?php echo $filter_name; ?>" placeholder="检索中....." class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" data-toggle="tooltip" title="检索" id="button-search" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<?php foreach (array_chunk($images, 4) as $image4) { ?>
|
||||
<div class="row">
|
||||
<?php foreach ($image4 as $image) { ?>
|
||||
<div class="col-sm-3 col-xs-6 text-center">
|
||||
<?php switch($image['type']):
|
||||
case 'directory':?>
|
||||
<div class="text-center"><a href="<?php echo $image['href']; ?>" class="directory" style="vertical-align: middle;"><i class="fa fa-fw fa-folder fa-5x"></i></a></div>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="<?php echo $image['path']; ?>" />
|
||||
<?php echo $image['name']; ?>
|
||||
</label>
|
||||
<?php break;
|
||||
case 'image':?>
|
||||
<a href="<?php echo $image['href']; ?>" class="thumbnail"><img src="<?php echo $image['thumb']; ?>" alt="<?php echo $image['name']; ?>" title="<?php echo $image['name']; ?>" /></a>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="<?php echo $image['path']; ?>" />
|
||||
<?php echo $image['name']; ?>
|
||||
</label>
|
||||
<?php break;
|
||||
case 'text':?>
|
||||
<div class="text-center"><a href="<?php echo $image['href']; ?>" class="iconfile" style="vertical-align: middle;"><i class="fa fa-fw fa-file-text fa-5x"></i></a></div>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="<?php echo $image['path']; ?>" />
|
||||
<?php echo $image['name']; ?>
|
||||
</label>
|
||||
<?php break;
|
||||
case 'archive':?>
|
||||
<div class="text-center"><a href="<?php echo $image['href']; ?>" class="iconfile" style="vertical-align: middle;"><i class="fa fa-fw fa-file-archive-o fa-5x"></i></a></div>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="<?php echo $image['path']; ?>" />
|
||||
<?php echo $image['name']; ?>
|
||||
</label>
|
||||
<?php break;
|
||||
case 'video':?>
|
||||
<div class="text-center"><a href="<?php echo $image['href']; ?>" class="iconfile" style="vertical-align: middle;"><i class="fa fa-fw fa-file-video-o fa-5x"></i></a></div>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="<?php echo $image['path']; ?>" />
|
||||
<?php echo $image['name']; ?>
|
||||
</label>
|
||||
<?php break;
|
||||
default:?>
|
||||
<div class="text-center"><a href="<?php echo $image['href']; ?>" class="iconfile" style="vertical-align: middle;"><i class="fa fa-fw fa-file fa-5x"></i></a></div>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="<?php echo $image['path']; ?>" />
|
||||
<?php echo $image['name']; ?>
|
||||
</label>
|
||||
<?php endswitch;?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<br />
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="modal-footer"><?php echo $pagination; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#modal-image a.thumbnail').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var target = "<?php echo $target; ?>";
|
||||
var thumb = "<?php echo $thumb; ?>";
|
||||
var callback = "<?php echo $func;?>";
|
||||
if (callback != "undefined") {
|
||||
var fileurl_tmp = $(this).find('img').attr('src');
|
||||
eval('window.parent.' + callback + '(fileurl_tmp,target,thumb);');
|
||||
$('#modal-image').modal('hide');
|
||||
return;
|
||||
}
|
||||
if (thumb) {
|
||||
$('#' + thumb).find('img').attr('src', $(this).find('img').attr('src'));
|
||||
}
|
||||
if (target) {
|
||||
$('#' + target).val($(this).parent().find('input').val());
|
||||
}
|
||||
$('#modal-image').modal('hide');
|
||||
});
|
||||
$('#modal-image a.iconfile').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var target = "<?php echo $target; ?>";
|
||||
var thumb = "<?php echo $thumb; ?>";
|
||||
var callback = "<?php echo $func;?>";
|
||||
if (callback != "undefined") {
|
||||
var fileurl_tmp = $(this).parent().parent().find('input').val();
|
||||
eval('window.parent.' + callback + '(fileurl_tmp,target,thumb);');
|
||||
$('#modal-image').modal('hide');
|
||||
return;
|
||||
}
|
||||
// if (thumb) {
|
||||
// $('#' + thumb).find('img').attr('src', $(this).find('img').attr('src'));
|
||||
// }
|
||||
if (target) {
|
||||
//console.log($(this).parent().parent().find('input').val());
|
||||
$('#' + target).val($(this).parent().parent().find('input').val());
|
||||
}
|
||||
$('#modal-image').modal('hide');
|
||||
});
|
||||
$('#modal-image a.directory').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
$('#modal-image .pagination a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
$('#button-parent').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
$('#button-refresh').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
$('#button-webuploader').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
$('#modal-image input[name=\'search\']').on('keydown', function(e) {
|
||||
if (e.which == 13) {
|
||||
$('#button-search').trigger('click');
|
||||
}
|
||||
});
|
||||
$('#button-search').on('click', function(e) {
|
||||
var url = '<?php echo url("/admin/webuploader/show",array_filter(["target"=>$target,"thumb"=>$thumb,"type"=>$type,"func"=>$func,"num"=>$num,"directory"=>$directory])); ?>';
|
||||
var filter_name = $('#modal-image input[name=\'search\']').val();
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
$('#modal-image').load(url);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-upload').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file[]" value="" multiple="multiple"/></form>');
|
||||
$('#form-upload input[name=\'file[]\']').trigger('click');
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
timer = setInterval(function() {
|
||||
if ($('#form-upload input[name=\'file[]\']').val() != '') {
|
||||
clearInterval(timer);
|
||||
$.ajax({
|
||||
url: '<?php echo url("/admin/webuploader/upload",["directory"=>$directory,"type"=>$type]); ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#button-upload i').replaceWith('<i class="glyphicon glyphicon-hourglass"></i>');
|
||||
$('#button-upload').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-upload i').replaceWith('<i class="glyphicon glyphicon-upload"></i>');
|
||||
$('#button-upload').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$('#button-folder').popover({
|
||||
html: true,
|
||||
placement: 'bottom',
|
||||
trigger: 'click',
|
||||
title: '文件夹名称',
|
||||
content: function() {
|
||||
var html = '<div class="input-group">';
|
||||
html += ' <input type="text" name="folder" value="" placeholder="文件夹名称,仅支持字母数字下划线" class="form-control">';
|
||||
html += ' <span class="input-group-btn"><button type="button" title="新目录" id="button-create" class="btn btn-primary"><i class="glyphicon glyphicon-plus-sign"></i></button></span>';
|
||||
html += '</div>';
|
||||
return html;
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-folder').on('shown.bs.popover', function() {
|
||||
$('#button-create').on('click', function() {
|
||||
$.ajax({
|
||||
url: '<?php echo url("/admin/webuploader/folder",["directory"=>$directory]); ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'folder=' + encodeURIComponent($('input[name=\'folder\']').val()),
|
||||
beforeSend: function() {
|
||||
$('#button-create').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-create').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#button-rename').popover({
|
||||
html: true,
|
||||
placement: 'bottom',
|
||||
trigger: 'click',
|
||||
title: '文件名称',
|
||||
content: function() {
|
||||
var html = '<div class="input-group">';
|
||||
html += ' <input type="text" name="filenewname" value="" placeholder="文件名称,仅支持字母数字下划线" class="form-control">';
|
||||
html += ' <span class="input-group-btn"><button type="button" title="文件名" id="button-newname" class="btn btn-primary"><i class="glyphicon glyphicon-check"></i></button></span>';
|
||||
html += '</div>';
|
||||
return html;
|
||||
}
|
||||
});
|
||||
$('#button-rename').on('shown.bs.popover', function() {
|
||||
$('#button-newname').on('click', function() {
|
||||
//console.log($('input[name^=\'path\']:checked').val());
|
||||
var path = $('input[name^=\'path\']:checked').val();
|
||||
var filenewname = $('input[name=\'filenewname\']').val();
|
||||
if (path && /^[a-zA-Z0-9_-]+$/.test(filenewname)) {
|
||||
$.ajax({
|
||||
url: '<?php echo url("/admin/webuploader/rename",["directory"=>$directory]); ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {filenewname: encodeURIComponent(filenewname), path: encodeURIComponent(path)},
|
||||
beforeSend: function() {
|
||||
$('#button-newname').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-newname').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('未选择文件或文件名为不是由字母数字下划线组成');
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#modal-image #button-delete').on('click', function(e) {
|
||||
if (confirm('确定删除吗?')) {
|
||||
$.ajax({
|
||||
url: '<?php echo url("/admin/webuploader/delete",["directory"=>$directory]); ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: $('input[name^=\'path\']:checked'),
|
||||
beforeSend: function() {
|
||||
$('#button-delete').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-delete').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
195
app/admin/view/flink/add.html
Executable file
195
app/admin/view/flink/add.html
Executable file
@@ -0,0 +1,195 @@
|
||||
<!-- 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/flink/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/flink/create');?>" 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>
|
||||
<li><a href="#navsecond" data-toggle="tab">图片信息</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">友链名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(友链名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid" id="typeid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">友链排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(友链排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</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">
|
||||
<span class="fa fa-globe form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(其他链接)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">友链图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
<div class="form-group">
|
||||
<label for="alt" class="col-sm-2 control-label">图片描述</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="alt">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(图片描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/flink/lists');?>" class="btn btn-block btn-primary">友链列表</a>
|
||||
<a href="<?php echo url('/admin/flink/typelists');?>" class="btn btn-block btn-primary">友链类别</a>
|
||||
<a href="<?php echo url('/admin/flink/add');?>" 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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var typeidObj = document.getElementById('typeid');
|
||||
if (isNaN(typeidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
typeidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
196
app/admin/view/flink/edit.html
Executable file
196
app/admin/view/flink/edit.html
Executable file
@@ -0,0 +1,196 @@
|
||||
<!-- 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/flink/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/flink/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>
|
||||
<li><a href="#navsecond" data-toggle="tab">图片信息</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">友链名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $flink['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(友链名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="typeid" class="col-sm-2 control-label">所属类别<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="typeid" id="typeid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $typeOption;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">友链排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $flink['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(友链排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($flink['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$flink['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</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 $flink['url'];?>">
|
||||
<span class="fa fa-globe form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(其他链接)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">友链图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($flink['picture'])?'/uploads/nopic.jpg':$flink['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $flink['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
<div class="form-group">
|
||||
<label for="alt" class="col-sm-2 control-label">图片描述</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="alt" value="<?php echo $flink['alt'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(图片描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $flink['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/flink/lists');?>" class="btn btn-block btn-primary">友链列表</a>
|
||||
<a href="<?php echo url('/admin/flink/typelists');?>" class="btn btn-block btn-primary">友链类别</a>
|
||||
<a href="<?php echo url('/admin/flink/add');?>" 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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var typeidObj = document.getElementById('typeid');
|
||||
if (isNaN(typeidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
typeidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
116
app/admin/view/flink/lists.html
Executable file
116
app/admin/view/flink/lists.html
Executable file
@@ -0,0 +1,116 @@
|
||||
<!-- 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/flink/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">图片</th>
|
||||
<th width="60rem" class="text-center">ID</th>
|
||||
<th>友链名称</th>
|
||||
<th class="text-center">分类</th>
|
||||
<th width="75rem" class="text-center">友链排序</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$flink):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $flink['id'];?>"></td>
|
||||
<td><img src="<?php echo getImage($flink['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $flink['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="text-center"><?php echo $flink['id'];?></td>
|
||||
<td class="text-left">
|
||||
<a href="<?php echo url('/admin/flink/edit',['id'=>$flink['id']]);?>"><?php echo $flink['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php echo $flink['typename'];?>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $flink['sort'];?>" type="text" data-id="<?php echo $flink['id'];?>" data-url="<?php echo url('/admin/flink/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($flink['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $flink['id'];?>" data-url="<?php echo url('/admin/flink/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$flink['createtime']);?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/flink/edit',['id'=>$flink['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $flink['id'];?>" data-url="<?php echo url('/admin/flink/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/flink/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/flink/recommends');?>" 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/flink/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>
|
||||
95
app/admin/view/flink/typeadd.html
Executable file
95
app/admin/view/flink/typeadd.html
Executable file
@@ -0,0 +1,95 @@
|
||||
<!-- 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/flink/typelists');?>"> 类别列表</a></li>
|
||||
<li class="active"> 类别</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增类别</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/flink/typecreate');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">类别名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">类别描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"></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 class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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>
|
||||
96
app/admin/view/flink/typeedit.html
Executable file
96
app/admin/view/flink/typeedit.html
Executable file
@@ -0,0 +1,96 @@
|
||||
<!-- 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/flink/typelists');?>"> 类别列表</a></li>
|
||||
<li class="active"> 类别</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">新增类别</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/flink/typeupdate');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">类别名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $flinktype['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(类别名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">类别描述</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" name="description"><?php echo $flinktype['description'];?></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 class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $flinktype['id'];?>"/>
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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>
|
||||
102
app/admin/view/flink/typelists.html
Executable file
102
app/admin/view/flink/typelists.html
Executable file
@@ -0,0 +1,102 @@
|
||||
<!-- 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/flink/typelists');?>"> 类别</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="70rem" class="text-center">ID</th>
|
||||
<th class="text-center">类别名称</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th class="text-center">描述</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$flinktype):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $flinktype['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $flinktype['id'];?></td>
|
||||
<td class="text-center"><?php echo $flinktype['name'];?></td>
|
||||
<td class="text-center"><?php echo date('Y-m-d',$flinktype['createtime']);?></td>
|
||||
<td class="text-center"><?php echo $flinktype['description'];?></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/flink/add',['typeid'=>$flinktype['id']]);?>">添加友链</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/flink/typeedit',['id'=>$flinktype['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $flinktype['id'];?>" data-url="<?php echo url('/admin/flink/typedelete');?>" 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">
|
||||
<!-- Check all button -->
|
||||
<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/flink/typedeletes');?>" 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/flink/typeadd');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
147
app/admin/view/fq/add.html
Executable file
147
app/admin/view/fq/add.html
Executable file
@@ -0,0 +1,147 @@
|
||||
<!-- 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/fq/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/fq/create');?>" 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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="fq" class="col-sm-2 control-label">问题名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">问题内容<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="contenet" name="content" rows="8"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图片<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-list-bk-img" data-toggle="image" data-folder="fq" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-picture" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="is_home" class="col-sm-2 control-label">是否首页显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_home" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_home" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否首页显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/fq/lists');?>" class="btn btn-block btn-primary">列表</a>
|
||||
<a href="<?php echo url('/admin/fq/add');?>" 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 -->
|
||||
<?php echo editor('#content');?>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#btn-product-qas").click(function(e) {
|
||||
//var callback = $(this).data('callback');
|
||||
var $element = $(this).parent().parent();
|
||||
$('#modal-product').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/product/modallists');?>?inputid=" + $element.find('input[type=hidden]').attr('id') + '&titleid=' + $element.find('input[type=text]').attr('id'),
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
|
||||
$('#modal-product').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
147
app/admin/view/fq/edit.html
Executable file
147
app/admin/view/fq/edit.html
Executable file
@@ -0,0 +1,147 @@
|
||||
<!-- 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/fq/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/fq/update');?>" method="post">
|
||||
<input type="text" name="id" value="<?php echo $fq['id']; ?> " hidden>
|
||||
<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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="fq" class="col-sm-2 control-label">问题名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" value="<?php echo $fq['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">问题内容<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="contenet" name="content" rows="8"><?php echo $fq['content']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图片<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-list-bk-img" data-toggle="image" data-folder="fq" class="img-thumbnail"><img class="img-responsive" src="<?php echo $fq['picture']; ?>"/></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $fq['picture']; ?>" id="input-picture" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="is_home" class="col-sm-2 control-label">是否首页显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_home" value="1"<?php if($fq['is_home'] ==1):?>checked=""<?php endif;?>> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_home" value="0" <?php if($fq['is_home']==0):?>checked=""<?php endif;?>> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否首页显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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/fq/lists');?>" class="btn btn-block btn-primary">列表</a>
|
||||
<a href="<?php echo url('/admin/fq/update');?>" 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 -->
|
||||
<?php echo editor('#content');?>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#btn-product-qas").click(function(e) {
|
||||
//var callback = $(this).data('callback');
|
||||
var $element = $(this).parent().parent();
|
||||
$('#modal-product').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/product/modallists');?>?inputid=" + $element.find('input[type=hidden]').attr('id') + '&titleid=' + $element.find('input[type=text]').attr('id'),
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
|
||||
$('#modal-product').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
113
app/admin/view/fq/lists.html
Executable file
113
app/admin/view/fq/lists.html
Executable file
@@ -0,0 +1,113 @@
|
||||
<!-- 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/fq/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">
|
||||
<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="300rem">名称</th>
|
||||
<!-- <th width="75rem" class="text-center">描述</th> -->
|
||||
<th width="135rem" class="text-center">图片</th>
|
||||
<th width="75rem" class="text-center">排序</th>
|
||||
<th width="75rem" class="text-center">首页显示</th>
|
||||
<th width="200rem" class="text-center">添加时间</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php if(!empty($list)):?>
|
||||
<?php foreach($list as $key => $value):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $value['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $value['id'];?></td>
|
||||
<td class="text-center">
|
||||
<a href="<?php echo url('/admin/fq/edit',['id'=>$value['id']]);?>"><?php echo $value['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><img src="<?php echo getImage($value['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $value['picture'];?>" data-toggle="preview-image"></td>
|
||||
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $value['sort'];?>" type="text" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/fq/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($value['is_home']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/fq/updatestate');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center"><?php echo $value['create_time'];?></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/fq/edit',['id'=>$value['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/fq/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<!-- /.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/fq/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/fq/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>
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
166
app/admin/view/index/index.html
Executable file
166
app/admin/view/index/index.html
Executable file
@@ -0,0 +1,166 @@
|
||||
<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 class="active">首页</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-bullhorn"></i> 信息</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> 欢迎!</h4>
|
||||
欢迎来到首页!
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">快速进入</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered text-center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/product/lists'); ?>" >产品列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/product/create'); ?>">添加产品</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/product_category/lists'); ?>">产品分类列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/product_category/add'); ?>">添加产品分类</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/download/lists'); ?>" >下载列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/download/add'); ?>" >添加下载</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/download_category/lists'); ?>" >下载分类列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/download_category/add'); ?>" >添加下载分类</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/article/lists'); ?>" >文章列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/article/add'); ?>" >添加文章</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/article_category/lists'); ?>" >文章分类列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/article_category/add'); ?>" >添加文章分类</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/video/lists'); ?>" >视频列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/video/add'); ?>" >添加视频</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/video_category/lists'); ?>" >视频分类列表</a></td>
|
||||
<td><a class="btn btn-primary" href="<?php echo url('/admin/video_category/add'); ?>" >添加视频分类</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding"></div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-cog"></i> 系统信息</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive">
|
||||
<table class="table table-hover table-bordered text-center">
|
||||
<tr>
|
||||
<td>操作系统</td>
|
||||
<td><?php echo $sys_info['OPERATING_SYSTEM'];?></td>
|
||||
<td>运行环境</td>
|
||||
<td><?php echo $sys_info['OPERATING_ENVIRONMENT'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PHP版本</td>
|
||||
<td><?php echo $sys_info['PHP_VERSION'];?></td>
|
||||
<td>文件上传限制</td>
|
||||
<td><?php echo $sys_info['UPLOAD_MAX_FILESIZE'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MYSQL版本</td>
|
||||
<td><?php echo $sys_info['MYSQL_VERSION'];?></td>
|
||||
<td>最大执行时间</td>
|
||||
<td><?php echo $sys_info['MAX_EXECUTION_TIME'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GD版本</td>
|
||||
<td><?php echo $sys_info['GD_VERSION'];?></td>
|
||||
<td>最大占用内存</td>
|
||||
<td><?php echo $sys_info['MEMORY_LIMIT'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>当前时间</td>
|
||||
<td><?php echo date('Y-m-d H:i:s');?></td>
|
||||
<td>服务器时区</td>
|
||||
<td><?php echo $sys_info['TIMEZONE'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>安全模式</td>
|
||||
<td><?php echo $sys_info['SAFE_MODE'];?></td>
|
||||
<td>允许打开远程连接</td>
|
||||
<td><?php echo $sys_info['ALLOW_URL_FOPEN'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Curl支持</td>
|
||||
<td><?php echo $sys_info['PHP_CURL'];?></td>
|
||||
<td>Zlib支持</td>
|
||||
<td><?php echo $sys_info['ZLIB'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>自身版本</td>
|
||||
<td><?php echo $sys_info['SELF_VERSION'];?></td>
|
||||
<td>服务器域名/IP</td>
|
||||
<td><?php echo $sys_info['HTTP_HOST'];?>[<?php echo $sys_info['IPv4_ADDRESS'];?>]</td>
|
||||
</tr>
|
||||
<!--<tr>
|
||||
<td>Register Globals</td>
|
||||
<td><?php //echo $sys_info['Register_Globals'];?></td>
|
||||
<td>Magic_Quotes_Gpc</td>
|
||||
<td><?php //echo $sys_info['Magic_Quotes_Gpc'];?></td>
|
||||
</tr>-->
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
136
app/admin/view/inquiry/add.html
Executable file
136
app/admin/view/inquiry/add.html
Executable file
@@ -0,0 +1,136 @@
|
||||
<!-- 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/shopselle/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 添加经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">添加经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/creat');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
150
app/admin/view/inquiry/edit.html
Executable file
150
app/admin/view/inquiry/edit.html
Executable file
@@ -0,0 +1,150 @@
|
||||
<!-- 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/agent/index');?>"> 经销商列表</a></li>
|
||||
<li class="active"> 编辑经销商</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑经销商</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/agent/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商名字</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" required value="{$data.name}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商名字)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商地址</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="address" required value="{$data.address}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">经销商联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="phone" required value="{$data.phone}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经销商联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="country" required value="{$data.country}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(国家)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">省</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="province" required value="{$data.province}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(省)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">市</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="city" required value="{$data.city}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(市)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">区</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="area" required value="{$data.area}">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(区)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">是否启用</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="0" {if $data.stat==0}checked=''{/if}/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="stat" type="radio" value="1" {if $data.stat==1}checked=''{/if}/> 否
|
||||
</label>
|
||||
</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">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
161
app/admin/view/inquiry/lists.html
Executable file
161
app/admin/view/inquiry/lists.html
Executable file
@@ -0,0 +1,161 @@
|
||||
<!-- 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/Inquiry/lists');?>"> 产品询盘</a></li>
|
||||
<li class="active"> 产品询盘列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/Inquiry/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" placeholder="申请人、手机" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">产品询盘列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="60rem" style="text-align: center">姓名</th>
|
||||
<th width="160rem"style="text-align: center">公司名称</th>
|
||||
<th width="60rem" style="text-align: center">邮箱</th>
|
||||
<th width="60rem" style="text-align: center">手机</th>
|
||||
<th width="120rem" style="text-align: center">所在国家</th>
|
||||
<th class="text-center" style="margin: auto">询盘来源页</th>
|
||||
<th wwidth="100rem" style="text-align: center">提交时间</th>
|
||||
<th wwidth="35rem" style="text-align: center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<th class="text-center">{$vv.first_name} {$vv.last_name}</th>
|
||||
<th class="text-center">{$vv.company}</th>
|
||||
<th class="text-center">{$vv.email}</th>
|
||||
<th class="text-center">{$vv.phone}</th>
|
||||
<th class="text-center">{$vv.country}</th>
|
||||
<th class="text-center"><a href="{$vv.murl}" target="_blank">{$vv.murl}</a></th>
|
||||
<th class="text-center">{$vv.createtime}</th>
|
||||
<th class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/inquiry/view',['id'=>$vv['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/inquiry/delete');?>" data-cod="dowarn">删除</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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/inquiry/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</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>
|
||||
179
app/admin/view/inquiry/view.html
Executable file
179
app/admin/view/inquiry/view.html
Executable file
@@ -0,0 +1,179 @@
|
||||
<!-- 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/inquiry/lists');?>"> 产品询盘列表</a></li>
|
||||
<li class="active"> 产品询盘详情</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">产品询盘详情</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/inquiry/save');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">公司名称</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.company}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Company Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">姓名</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.first_name} {$data.last_name}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Your Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">邮箱</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.email}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Email)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">手机</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.phone}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Phone Number)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.country} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Country)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">行业</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.industry} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Industry)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">兴趣产品</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.interested} </div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Interested Product)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">询盘来源页</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.murl}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Product)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">询盘内容</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.inquiry}</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Inquiry)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stat" class="col-sm-2 control-label">申请时间</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">{$data.createtime}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<hr>
|
||||
<div class="tab-pane form-horizontal" id="tabfirst">
|
||||
|
||||
|
||||
<div class="col-sm-12 control-label" style="text-align: left;padding: 10px 25px;">访问监控信息</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">来源设备</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">
|
||||
{$data.drvice}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">设备信息</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.user_agent}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问落地页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.murl}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问来源页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.refer}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">IP定位</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$data.ip} {$data.city} {$data.province} {$data.state}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
302
app/admin/view/job/add.html
Executable file
302
app/admin/view/job/add.html
Executable file
@@ -0,0 +1,302 @@
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="__PUBLIC__/adminlte/bower_components/select2/dist/css/select2.min.css">
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #d2d6de;
|
||||
border-radius: 0;
|
||||
}
|
||||
.select2-container .select2-selection--single{height:34px;}
|
||||
</style>
|
||||
<!-- Select2 -->
|
||||
<script src="__PUBLIC__/adminlte/bower_components/select2/dist/js/select2.full.min.js"></script>
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/job/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/job/create');?>" method="post" name="productform">
|
||||
<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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细信息</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="department" class="col-sm-2 control-label">部门<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="department" id="department" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(部门)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="job_name" class="col-sm-2 control-label">招聘岗位<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="job_name" id="job_name" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(岗位名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="count" class="col-sm-2 control-label">招聘人数<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="count" id="count" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(招聘人数)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="experience_requirement" class="col-sm-2 control-label">经验要求<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="experience_requirement" id="experience_requirement">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经验要求)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="education" class="col-sm-2 control-label">学历要求<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="education" id="education">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(学历要求)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="job_address" class="col-sm-2 control-label">工作地址<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="job_address" id="job_address">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(工作地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="salary" class="col-sm-2 control-label">薪资待遇<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="salary" id="salary">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(薪资待遇)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="workfare" class="col-sm-2 control-label">福利<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="workfare" id="workfare">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(福利)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="publish_time" class="col-sm-2 control-label">发布日期<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="publish_time" id="publish_time" onclick="laydate_datetime('#publish_time')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#publish_time')">选择日期</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(发布日期)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="end_time" class="col-sm-2 control-label">截止日期<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="end_time" id="end_time" onclick="laydate_datetime('#end_time')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#end_time')">选择日期</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(截止日期)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<div class="table-responsive">
|
||||
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">详情</h3>
|
||||
<!-- tools box -->
|
||||
<div class="form-group">
|
||||
<label for="job_responsibility" class="col-sm-2 control-label">岗位职责<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="job_responsibility" name="job_responsibility" rows="20"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-2">
|
||||
<span class="help-block">(岗位职责,每行一项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="job_requirement" class="col-sm-2 control-label">岗位要求<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="job_requirement" name="job_requirement" rows="20"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-2">
|
||||
<span class="help-block">(岗位要求,每行一项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
function parseInt_value(ele) {
|
||||
elementObj = document.forms['productform'].elements[ele];
|
||||
elementObj.value = parseInt(elementObj.value);
|
||||
}
|
||||
function mathRound_value(ele) {
|
||||
elementObj = document.forms['productform'].elements[ele];
|
||||
elementObj.value = Math.round(elementObj.value); //Math.floor() Math.ceil()
|
||||
}
|
||||
function toFixed_value(ele) {
|
||||
elementObj = document.forms['productform'].elements[ele];
|
||||
elementObj.value = elementObj.value.toFixed(2);
|
||||
}
|
||||
function addSpec(obj) {
|
||||
var trObj = obj.parentNode.parentNode;
|
||||
var idx = trObj.rowIndex;
|
||||
var tableObj = document.getElementById('type_attr_table');
|
||||
var row = tableObj.insertRow(idx + 1);
|
||||
var cell1 = row.insertCell(-1);
|
||||
var cell2 = row.insertCell(-1);
|
||||
var cell3 = row.insertCell(-1);
|
||||
cell1.innerHTML = trObj.childNodes[0].innerHTML;
|
||||
cell2.innerHTML = trObj.childNodes[1].innerHTML.replace(/readOnly([^\s|>]*)/i, '');
|
||||
cell3.innerHTML = trObj.childNodes[2].innerHTML.replace(/(.*)(addSpec)(.*)(fa-plus-circle)/i, "$1removeSpec$3fa-minus-circle");
|
||||
}
|
||||
|
||||
function removeSpec(obj) {
|
||||
var trObj = obj.parentNode.parentNode;
|
||||
var idx = trObj.rowIndex;
|
||||
var tableObj = document.getElementById('type_attr_table');
|
||||
tableObj.deleteRow(idx);
|
||||
}
|
||||
|
||||
</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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var cidObj = document.getElementById('cid');
|
||||
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
cidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("Submit prevented"); // }
|
||||
});
|
||||
$("[data-cod='related']").click(function(event) {
|
||||
var param = {};
|
||||
param.callback = $(this).data('callback');
|
||||
//var $element = $(this).parent().parent();
|
||||
//param.inputid = $element.find('input[type=hidden]').attr('id');
|
||||
//param.titleid = $element.find('input[type=text]').attr('id');
|
||||
$('#modal-product').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/product/modallists');?>",
|
||||
data: param,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
|
||||
$('#modal-product').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
//Initialize Select2 Elements
|
||||
$('.select2').select2();
|
||||
});
|
||||
</script>
|
||||
303
app/admin/view/job/edit.html
Executable file
303
app/admin/view/job/edit.html
Executable file
@@ -0,0 +1,303 @@
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="__PUBLIC__/adminlte/bower_components/select2/dist/css/select2.min.css">
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #d2d6de;
|
||||
border-radius: 0;
|
||||
}
|
||||
.select2-container .select2-selection--single{height:34px;}
|
||||
</style>
|
||||
<!-- Select2 -->
|
||||
<script src="__PUBLIC__/adminlte/bower_components/select2/dist/js/select2.full.min.js"></script>
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/job/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/job/update');?>" method="post" name="productform">
|
||||
<input type="hidden" name="id" value="<?php echo $job['id']; ?>">
|
||||
<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>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细信息</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="department" class="col-sm-2 control-label">部门<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['department']; ?>" class="form-control" name="department" id="department" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(部门)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="job_name" class="col-sm-2 control-label">招聘岗位<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['job_name']; ?>" class="form-control" name="job_name" id="job_name" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(岗位名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="count" class="col-sm-2 control-label">招聘人数<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['count']; ?>" class="form-control" name="count" id="count" required value="">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(招聘人数)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="experience_requirement" class="col-sm-2 control-label">经验要求<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['experience_requirement']; ?>" class="form-control" name="experience_requirement" id="experience_requirement">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(经验要求)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="education" class="col-sm-2 control-label">学历要求<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['education']; ?>" class="form-control" name="education" id="education">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(学历要求)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="job_address" class="col-sm-2 control-label">工作地址<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['job_address']; ?>" class="form-control" name="job_address" id="job_address">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(工作地址)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="salary" class="col-sm-2 control-label">薪资待遇<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['salary']; ?>" class="form-control" name="salary" id="salary">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(薪资待遇)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="workfare" class="col-sm-2 control-label">福利<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" value="<?php echo $job['workfare']; ?>" class="form-control" name="workfare" id="workfare">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(福利)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $job['sort']; ?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="publish_time" class="col-sm-2 control-label">发布日期<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="publish_time" id="publish_time" value="<?php echo date('Y-m-d H:i:s', strtotime($job['publish_time'])); ?>" onclick="laydate_datetime('#publish_time')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#publish_time')">选择日期</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(发布日期)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="end_time" class="col-sm-2 control-label">截止日期<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="end_time" id="end_time" value="<?php echo date('Y-m-d H:i:s', strtotime($job['end_time'])); ?>" onclick="laydate_datetime('#end_time')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#end_time')">选择日期</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(截止日期)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<div class="table-responsive">
|
||||
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">详情</h3>
|
||||
<!-- tools box -->
|
||||
<div class="form-group">
|
||||
<label for="job_responsibility" class="col-sm-2 control-label">岗位职责<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="job_responsibility" name="job_responsibility" rows="20"><?php echo $job['job_responsibility']; ?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-2">
|
||||
<span class="help-block">(岗位职责,每行一项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="job_requirement" class="col-sm-2 control-label">岗位要求<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" id="job_requirement" name="job_requirement" rows="20"><?php echo $job['job_requirement']; ?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-2">
|
||||
<span class="help-block">(岗位要求,每行一项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<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>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
function parseInt_value(ele) {
|
||||
elementObj = document.forms['productform'].elements[ele];
|
||||
elementObj.value = parseInt(elementObj.value);
|
||||
}
|
||||
function mathRound_value(ele) {
|
||||
elementObj = document.forms['productform'].elements[ele];
|
||||
elementObj.value = Math.round(elementObj.value); //Math.floor() Math.ceil()
|
||||
}
|
||||
function toFixed_value(ele) {
|
||||
elementObj = document.forms['productform'].elements[ele];
|
||||
elementObj.value = elementObj.value.toFixed(2);
|
||||
}
|
||||
function addSpec(obj) {
|
||||
var trObj = obj.parentNode.parentNode;
|
||||
var idx = trObj.rowIndex;
|
||||
var tableObj = document.getElementById('type_attr_table');
|
||||
var row = tableObj.insertRow(idx + 1);
|
||||
var cell1 = row.insertCell(-1);
|
||||
var cell2 = row.insertCell(-1);
|
||||
var cell3 = row.insertCell(-1);
|
||||
cell1.innerHTML = trObj.childNodes[0].innerHTML;
|
||||
cell2.innerHTML = trObj.childNodes[1].innerHTML.replace(/readOnly([^\s|>]*)/i, '');
|
||||
cell3.innerHTML = trObj.childNodes[2].innerHTML.replace(/(.*)(addSpec)(.*)(fa-plus-circle)/i, "$1removeSpec$3fa-minus-circle");
|
||||
}
|
||||
|
||||
function removeSpec(obj) {
|
||||
var trObj = obj.parentNode.parentNode;
|
||||
var idx = trObj.rowIndex;
|
||||
var tableObj = document.getElementById('type_attr_table');
|
||||
tableObj.deleteRow(idx);
|
||||
}
|
||||
|
||||
</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('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
var cidObj = document.getElementById('cid');
|
||||
if (isNaN(cidObj.value) || !parseInt(cidObj.value)) {
|
||||
alert('所属分类值无效');
|
||||
cidObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("Submit prevented"); // }
|
||||
});
|
||||
$("[data-cod='related']").click(function(event) {
|
||||
var param = {};
|
||||
param.callback = $(this).data('callback');
|
||||
//var $element = $(this).parent().parent();
|
||||
//param.inputid = $element.find('input[type=hidden]').attr('id');
|
||||
//param.titleid = $element.find('input[type=text]').attr('id');
|
||||
$('#modal-product').remove();
|
||||
$.ajax({
|
||||
url: "<?php echo url('/admin/product/modallists');?>",
|
||||
data: param,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-product" class="modal fade">' + html + '</div>');
|
||||
$('#modal-product').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
//Initialize Select2 Elements
|
||||
$('.select2').select2();
|
||||
});
|
||||
</script>
|
||||
128
app/admin/view/job/lists.html
Executable file
128
app/admin/view/job/lists.html
Executable file
@@ -0,0 +1,128 @@
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/job/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">
|
||||
<a href="<?php echo url('/admin/job/add');?>" class="btn btn-block btn-primary">添加招聘信息</a>
|
||||
</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="60rem" class="text-center">ID</th>
|
||||
<th width="100rem" class="text-center">部门</th>
|
||||
<th width="180rem" class="text-center">招聘岗位</th>
|
||||
<th width="80rem" class="text-center">招聘人数</th>
|
||||
<th width="200rem" class="text-center">经验要求</th>
|
||||
<th width="80rem" class="text-center">学历要求</th>
|
||||
<th width="150rem" class="text-center">发布时间</th>
|
||||
<th width="150rem" class="text-center">截止时间</th>
|
||||
<th width="45rem" class="text-center">排序</th>
|
||||
<th width="45rem" class="text-center">状态</th>
|
||||
<th width="150rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $key => $value):?>
|
||||
<tr>
|
||||
<td class="text-center"><?php echo $value['id'];?></td>
|
||||
<td class="text-center"><?php echo $value['department'];?></td>
|
||||
<td class="text-center"><a href=""><?php echo $value['job_name'];?></a></td>
|
||||
<td class="text-center"><?php echo $value['count'];?></td>
|
||||
<td class="text-center"><?php echo $value['experience_requirement'];?></td>
|
||||
<td class="text-center"><?php echo $value['education'];?></td>
|
||||
<td class="text-center"><?php echo $value['publish_time'];?></td>
|
||||
<td class="text-center"><?php echo $value['end_time'];?></td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $value['sort'];?>" type="text" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/job/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center"><?php echo array_switch(array('1' => '<span class="label label-warning">已删除</span>', '0' => '<span class="label label-success">启用</span>'),$value['stat']);?></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-xs btn-info" onclick="qiyong(<?php echo $value['id']; ?>)">启用</a>
|
||||
|
||||
<a class="btn btn-xs btn-info" href="/admin/job/edit/id/<?php echo $value['id']; ?>">编辑</a>
|
||||
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/job/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">
|
||||
<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() {
|
||||
|
||||
});
|
||||
|
||||
function qiyong(id)
|
||||
{
|
||||
var url = '/admin/job/qiyong';
|
||||
var data = {
|
||||
id: id
|
||||
}
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(res) {
|
||||
if (res.code < 0)
|
||||
{
|
||||
alert(res.msg);
|
||||
}
|
||||
else if (res.code == 200)
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
166
app/admin/view/msgform/edit.html
Executable file
166
app/admin/view/msgform/edit.html
Executable file
@@ -0,0 +1,166 @@
|
||||
<!-- 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/msgform/lists');?>"> 反馈列表</a></li>
|
||||
<li class="active"> 反馈</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">编辑反馈</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/msgform/update');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="checked" class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="1" <?php if($msgform['display']):?>checked=""<?php endif;?>> 已审核
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="display" value="0" <?php if(!$msgform['display']):?>checked=""<?php endif;?>> 未审核
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(状态)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="feedback_type" class="col-sm-2 control-label">反馈类型</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="feedback_type" id="feedback_type">
|
||||
<?php foreach($feedback_type as $ka=>$val):?>
|
||||
<?php if($msgform['feedback_type']==$val):?>
|
||||
<option value="<?php echo $val;?>" selected=""><?php echo $val;?></option>
|
||||
<?php else:?>
|
||||
<option value="<?php echo $val;?>"><?php echo $val;?></option>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(反馈类型)</span>
|
||||
</div>
|
||||
</div>
|
||||
<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="name" value="<?php echo $msgform['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(称呼)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">反馈主题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="subject" value="<?php echo $msgform['subject'];?>">
|
||||
</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 $msgform['content'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(反馈内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="way" class="col-sm-2 control-label">联系方法</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="way" id="byway">
|
||||
<option value="E-MAIL" selected="">E-MAIL</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(联系方法)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="contact" class="col-sm-2 control-label">联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="contact" value="<?php echo $msgform['contact'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addtime" class="col-sm-2 control-label">反馈时间</label>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="addtime" value="<?php echo $msgform['addtime'];?>" id="laydate_addtime" onclick="laydate_datetime('#laydate_addtime')" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#laydate_addtime')">选择时间</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(反馈时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="id" value="<?php echo $msgform['id'];?>">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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>
|
||||
126
app/admin/view/msgform/lists.html
Executable file
126
app/admin/view/msgform/lists.html
Executable file
@@ -0,0 +1,126 @@
|
||||
<!-- 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/msgform/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 class="text-center" width="60rem">ID</th>
|
||||
<th class="text-center">称呼</th>
|
||||
<th class="text-center">订单</th>
|
||||
<th class="text-center">渠道</th>
|
||||
<th class="text-center">反馈主题</th>
|
||||
<th class="text-center">联系方法</th>
|
||||
<th class="text-center">联系方式</th>
|
||||
<th class="text-center">反馈类型</th>
|
||||
<th width="75rem" class="text-center">添加时间</th>
|
||||
<th width="135rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$msgform):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $msgform['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $msgform['id'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['name'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['order_id'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['channel'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['subject'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['way'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['contact'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['feedback_type'];?></td>
|
||||
<td class="text-center"><?php echo $msgform['addtime'];?></td>
|
||||
<td>
|
||||
<!-- <a class="btn btn-xs btn-info" data-id="<?php echo $msgform['id'];?>" data-url="<?php echo url('/admin/msgform/modalview');?>" data-cod="doview">查看</a> -->
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/msgform/view',['id'=>$msgform['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $msgform['id'];?>" data-url="<?php echo url('/admin/msgform/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/msgform/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
<?php if($page):
|
||||
echo $page;
|
||||
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() {
|
||||
$("[data-cod='doview']").click(function(event) {
|
||||
var param = {}, url = $(this).data('url');
|
||||
param.id = $(this).data('id');
|
||||
$('#modal-doview').remove();
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: param,
|
||||
dataType: 'html',
|
||||
success: function(html) {
|
||||
$('body').append('<div id="modal-doview" class="modal fade">' + html + '</div>');
|
||||
$('#modal-doview').modal({show: true, backdrop: 'static'});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
73
app/admin/view/msgform/modalview.html
Executable file
73
app/admin/view/msgform/modalview.html
Executable file
@@ -0,0 +1,73 @@
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">反馈</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row margin">
|
||||
<?php if(empty($msgform)):?>
|
||||
<p>暂无内容</p>
|
||||
<?php else:?>
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="feedback_type" class="col-sm-2 control-label">反馈类型</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['feedback_type'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">称呼</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['name'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">反馈主题</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['subject'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">反馈内容</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['content'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="way" class="col-sm-2 control-label">联系方法</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['way'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="contact" class="col-sm-2 control-label">联系方式</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['contact'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addtime" class="col-sm-2 control-label">反馈时间</label>
|
||||
<div class="col-sm-10">
|
||||
<p><?php echo $msgform['addtime'];?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="col-sm-12 col-xs-12">
|
||||
<button type="button" class="btn btn-primary btn-sm" data-dismiss="modal">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
221
app/admin/view/msgform/view.html
Executable file
221
app/admin/view/msgform/view.html
Executable file
@@ -0,0 +1,221 @@
|
||||
<!-- 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/msgform/lists');?>"> 反馈列表</a></li>
|
||||
<li class="active"> 反馈</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">查看反馈</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="feedback_type" class="col-sm-2 control-label">反馈类型</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['feedback_type'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(反馈类型)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">称呼</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['name'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(称呼)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">反馈主题</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['subject'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(反馈主题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">订单号</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['order_id'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Order ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">国家</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['country'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Country)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">渠道</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['channel'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Where did you buy from?)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">反馈内容</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['content'];?></p>
|
||||
</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">
|
||||
<p><?php echo $msgform['operation_system'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Operating System)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="way" class="col-sm-2 control-label">联系方法</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['way'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(联系方法)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="contact" class="col-sm-2 control-label">联系方式</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['contact'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(联系方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addtime" class="col-sm-2 control-label">反馈时间</label>
|
||||
<div class="col-sm-5">
|
||||
<p><?php echo $msgform['addtime'];?></p>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(反馈时间)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addtime" class="col-sm-2 control-label">附件</label>
|
||||
<div class="col-sm-5">
|
||||
<?php if(!empty($attachment)):?>
|
||||
<?php foreach($attachment as $k=>$att):?>
|
||||
<?php if ($att['type'] == 'jpeg' || $att['type'] == 'jpg' || $att['type'] == 'png' || $att['type'] == 'gif' || $att['type'] == 'webp' || $att['type'] == 'bmp'): ?>
|
||||
<img src="<?php echo getImage($att['attr_url'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $att['attr_url'];?>" data-toggle="preview-image">
|
||||
<?php endif;?>
|
||||
<?php if ($att['type'] == 'mp4' || $att['type'] == 'mp3' || $att['type'] == 'wmv' || $att['type'] == '3gp'|| $att['type'] == 'm4v'): ?>
|
||||
<video src="<?php echo $att['attr_url'];?>" controls="controls"></video>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(附件)</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<hr>
|
||||
<div class="tab-pane form-horizontal" id="tabfirst">
|
||||
|
||||
|
||||
<div class="col-sm-12 control-label" style="text-align: left;padding: 10px 25px;">访问监控信息</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">来源设备</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">
|
||||
{$msgform.drvice}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">设备信息</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$msgform.user_agent}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问落地页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$msgform.url}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">访问来源页</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$msgform.refer}</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">IP定位</label>
|
||||
<div class="col-sm-10" style="margin-top:8px;">{$msgform.ip} {$msgform.city} {$msgform.province} {$msgform.state}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
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>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user