作者 v_bairong06

传承人、地方非遗前后台制作

... ... @@ -8,8 +8,8 @@
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('LocalRemainsProduct/index')}">地方非遗列表</a></li>
<li class="active"><a target="_self">添加地方非遗</a></li>
<li><a href="{:U('LocalRemainsProduct/index',array('lid'=>$lid))}">地方非遗产品列表</a></li>
<li class="active"><a target="_self">添加地方非遗产品</a></li>
</ul>
<form action="{:U('LocalRemainsProduct/add_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
... ... @@ -59,7 +59,7 @@
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">添加</button>
<a class="btn" href="{:U('LocalRemainsProduct/index')}">返回</a>
<a class="btn" href="{:U('LocalRemainsProduct/index',array('lid'=>$lid))}">返回</a>
</div>
</form>
</div>
... ...
... ... @@ -12,7 +12,7 @@
<li><a href="{:U('LocalRemains/add',array('lid'=>$lid))}">添加地方非遗</a></li>
<li class="active"><a target="_self">编辑地方非遗</a></li>
</ul>
<form action="{:U('LocalRemains/edit_post',array('lid'=>$lid))}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<form action="{:U('LocalRemains/edit_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
... ...
... ... @@ -18,7 +18,7 @@
<tr>
<th width="80">分类</th>
<td>
<select style="max-height: 100px;" name="sort_id">{$taxonomys}</select>
<select style="max-height: 100px;" name="post[sort_id]">{$taxonomys}</select>
</td>
</tr>
<tr>
... ... @@ -31,7 +31,7 @@
<tr>
<th width="80">性别</th>
<td>
<select style="max-height: 100px;" name="sex">
<select style="max-height: 100px;" name="post[sex]">
<option value="1"></option>
<option value="2"></option>
</select>
... ... @@ -40,7 +40,7 @@
<tr>
<th width="80">出生日期</th>
<td>
<input type="text" name="post[birth]" class="js-datetime" autocomplete="off">
<input type="text" name="post[birth]" class="js-date" autocomplete="off">
<span class="form-required">*</span>
</td>
</tr>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<admintpl file="header" />
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('Successor/index')}">传承人列表</a></li>
<li><a href="{:U('Successor/add')}" target="_self">添加传承人</a></li>
<li class="active"><a href="javascript:;" target="_self">编辑传承人</a></li>
</ul>
<form action="{:U('Successor/edit_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="80">分类</th>
<td>
<select style="max-height: 100px;" name="post[sort_id]">{$taxonomys}</select>
</td>
</tr>
<tr>
<th width="80">传承人名称</th>
<td>
<input type="text" style="width:400px;" name="post[name]" id="name" value="{$info.name}" required placeholder="请输入传承人名称"/>
<span class="form-required">*</span>
<input type="hidden" name="id" value="{$info.id}"/>
</td>
</tr>
<tr>
<th width="80">性别</th>
<td>
<select style="max-height: 100px;" name="post[sex]">
<option value="1"></option>
<option <if condition="$info['sex'] eq 2">selected</if> value="2">女</option>
</select>
</td>
</tr>
<tr>
<th width="80">出生日期</th>
<td>
<input type="text" name="post[birth]" class="js-date" value="{$info['birth']}" autocomplete="off">
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th width="80">级别</th>
<td>
<select style="max-height: 100px;" name="post[level]">
<volist name="level" id="vo">
<option <if condition="$info['level'] eq $vo">selected</if> value="{$vo}">{$vo}</option>
</volist>
</select>
</td>
</tr>
<tr>
<th width="80">区域</th>
<td>
<select style="max-height: 100px;" name="post[region]">
<volist name="region" id="vo">
<option <if condition="$info['region'] eq $vo['name']">selected</if> value="{$vo.name}">{$vo.name}</option>
</volist>
</select>
</td>
</tr>
<tr>
<th width="80">民族</th>
<td>
<select style="max-height: 100px;" name="post[nation]">
<volist name="nation" id="vo">
<option <if condition="$info['nation'] eq $vo['name']">selected</if> value="{$vo.name}">{$vo.name}</option>
</volist>
</select>
</td>
</tr>
<tr>
<th>详情内容</th>
<td>
<script type="text/plain" id="content" name="post[content]">{$info.content}</script>
</td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<th><b>缩略图</b></th>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="post[thumb]" id="thumb" value="{$info.thumb|default=''}">
<a href="javascript:upload_one_image('图片上传','#thumb');">
<if condition="empty($info['thumb'])">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview" width="135" style="cursor: hand" />
<else />
<img src="{:sp_get_image_preview_url($info['thumb'])}" id="thumb-preview" width="135" style="cursor: hand"/>
</if>
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
<a class="btn" href="{:U('Successor/index')}">返回</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
//编辑器
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
//增加编辑器验证规则
jQuery.validator.addMethod('editorcontent', function() {
try {
editorcontent.sync();
} catch (err) {
}
return editorcontent.hasContents();
});
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser && $.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
var formloading = false;
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'post[name]' : {
required : 1
}
},
//验证未通过提示消息
messages : {
'post[name]' : {
required : '请输入传承人名称'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
if (formloading)
return;
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
formloading = true;
},
success : function(data, statusText, xhr, $form) {
formloading = false;
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续编辑?',
callback : function() {
reloadPage(window);
return true;
},
focus : true
} ]
});
});
} else {
artdialog_alert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -34,6 +34,7 @@
<th width="50">排序</th>
</notempty>
<th width="50">ID</th>
<th>分类名称</th>
<th>传承人名称</th>
<th>性别</th>
<th>出生日期</th>
... ... @@ -51,6 +52,7 @@
<td><input name="listorders[{$vo.id}]" class="input input-order" type="text" size="5" value="{$vo.listorder}"></td>
</notempty>
<td><b>{$vo.id}</b></td>
<td>{$vo.pname}</td>
<td>{$vo.name}</td>
<td><eq name="vo.sex" value="1"></eq><eq name="vo.sex" value="2"></eq></td>
<td>{$vo.birth}</td>
... ... @@ -60,7 +62,7 @@
<td>{:date('Y-m-d H:i',$vo['ctime'])}</td>
<td>
<a href="{:U('Successor/edit',array('id'=>$vo['id']))}">{:L('EDIT')}</a> |
<a href="{:U('Successor/product',array('id'=>$vo['id']))}">作品列表</a> |
<a href="{:U('SuccessorProduct/index',array('sid'=>$vo['id']))}">作品列表</a> |
<a href="{:U('Successor/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
</td>
</tr>
... ... @@ -72,6 +74,7 @@
<th width="50">排序</th>
</notempty>
<th width="50">ID</th>
<th>分类名称</th>
<th>传承人名称</th>
<th>性别</th>
<th>出生日期</th>
... ...
<admintpl file="header" />
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('SuccessorProduct/index',array('sid'=>$sid))}">地方非遗列表</a></li>
<li class="active"><a target="_self">添加地方非遗</a></li>
</ul>
<form action="{:U('SuccessorProduct/add_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="150">名称</th>
<td>
<input type="text" style="width:400px;" name="post[name]" id="name" required placeholder="请输入名称"/>
<span class="form-required">*</span>
<input type="hidden" name="sid" value="{$sid}"/>
</td>
</tr>
<tr>
<th>描述</th>
<td>
<textarea style="width:400px;" name="post[description]" id="description" required placeholder="请输入描述"></textarea>
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th>跳转地址</th>
<td>
<input type="text" style="width:400px;" name="post[href]" id="href" placeholder="请输入跳转地址"/>
</td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<th><b>缩略图</b></th>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="post[thumb]" id="thumb" value="{$images|default=''}">
<a href="javascript:upload_one_image('图片上传','#thumb');">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview" width="135" style="cursor: hand" />
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">添加</button>
<a class="btn" href="{:U('SuccessorProduct/index',array('sid'=>$sid))}">返回</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser && $.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
var formloading = false;
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'post[name]' : {
required : 1
}
},
//验证未通过提示消息
messages : {
'post[name]' : {
required : '请输入名称'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
if (formloading)
return;
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
formloading = true;
},
success : function(data, statusText, xhr, $form) {
formloading = false;
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续添加?',
callback : function() {
reloadPage(window);
return true;
},
focus : true
}, {
name : '返回列表页',
callback : function() {
location = "{:U('SuccessorProduct/index',array('sid'=>$sid))}";
return true;
}
} ]
});
});
} else {
artdialog_alert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
... ...
<admintpl file="header" />
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('SuccessorProduct/index',array('sid'=>$sid))}">地方非遗列表</a></li>
<li><a href="{:U('SuccessorProduct/add',array('sid'=>$sid))}">添加地方非遗</a></li>
<li class="active"><a target="_self">编辑地方非遗</a></li>
</ul>
<form action="{:U('SuccessorProduct/edit_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="150">名称</th>
<td>
<input type="text" style="width:400px;" name="post[name]" id="name" value="{$name}" required placeholder="请输入名称"/>
<span class="form-required">*</span>
<input type="hidden" name="sid" value="{$sid}"/>
<input type="hidden" name="id" value="{$id}"/>
</td>
</tr>
<tr>
<th>描述</th>
<td>
<textarea style="width:400px;" name="post[description]" id="description" required placeholder="请输入描述">{$description}</textarea>
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th>跳转地址</th>
<td>
<input type="text" style="width:400px;" name="post[href]" id="href" value="{$href}" placeholder="请输入跳转地址"/>
</td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<th><b>缩略图</b></th>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="post[thumb]" id="thumb" value="{$thumb|default=''}">
<a href="javascript:upload_one_image('图片上传','#thumb');">
<if condition="empty($thumb)">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview" width="135" style="cursor: hand" />
<else />
<img src="{:sp_get_image_preview_url($thumb)}" id="thumb-preview" width="135" style="cursor: hand"/>
</if>
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">发布</button>
<a class="btn" href="{:U('SuccessorProduct/index',array('sid'=>$sid))}">返回</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser && $.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
var formloading = false;
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'post[name]' : {
required : 1
}
},
//验证未通过提示消息
messages : {
'post[name]' : {
required : '请输入名称'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
if (formloading)
return;
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
formloading = true;
},
success : function(data, statusText, xhr, $form) {
formloading = false;
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续编辑?',
callback : function() {
reloadPage(window);
return true;
},
focus : true
}, {
name : '返回列表页',
callback : function() {
location = "{:U('SuccessorProduct/index',array('sid'=>$sid))}";
return true;
}
} ]
});
});
} else {
artdialog_alert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
... ...
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">传承人产品列表</a></li>
<li><a href="{:U('SuccessorProduct/add',array('sid'=>$sid))}">添加传承人产品</a></li>
</ul>
<form class="well form-search" method="post" action="{:U('SuccessorProduct/index',array('sid'=>$sid))}">
时间:
<input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">-
<input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
关键字:
<input type="text" name="keyword" style="width: 200px;" value="{$keyword|default=''}" placeholder="请输入关键字...">
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:U('SuccessorProduct/index',array('sid'=>$sid))}">清空</a>
</form>
<form class="js-ajax-form" action="" method="post">
<div class="table-actions">
<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('SuccessorProduct/delete',array('sid'=>$sid))}" data-subcheck="true" data-msg="您确定删除吗?">{:L('DELETE')}</button>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">ID</th>
<th>作品名称</th>
<th>作品介绍</th>
<th>跳转地址</th>
<th width="100">提交时间</th>
<th width="70">操作</th>
</tr>
</thead>
<foreach name="list" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td>
<td><b>{$vo.id}</b></td>
<td>{$vo.name}</td>
<td>{$vo.description}</td>
<td>{$vo.href}</td>
<td>{:date('Y-m-d H:i',$vo['ctime'])}</td>
<td>
<a href="{:U('SuccessorProduct/edit',array('id'=>$vo['id'],'sid'=>$sid))}">编辑</a> |
<a href="{:U('SuccessorProduct/delete',array('id'=>$vo['id'],'sid'=>$sid))}" class="js-ajax-delete">删除</a>
</td>
</tr>
</foreach>
<tfoot>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">ID</th>
<th>作品名称</th>
<th>作品介绍</th>
<th>跳转地址</th>
<th>提交时间</th>
<th width="70">操作</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('SuccessorProduct/delete',array('sid'=>$sid))}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button>
</div>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -41,7 +41,7 @@
<tr>
<th>创作时间</th>
<td>
<input type="text" class="js-datetime" style="width:400px;" name="post[createtime]" id="createtime" required placeholder="请输入创作时间" autocomplete="off"/>
<input type="text" class="js-date" style="width:400px;" name="post[createtime]" id="createtime" required placeholder="请输入创作时间" autocomplete="off"/>
<span class="form-required">*</span>
</td>
</tr>
... ...
... ... @@ -42,7 +42,7 @@
<tr>
<th>创作时间</th>
<td>
<input type="text" class="js-datetime" style="width:400px;" name="post[createtime]" value="{$post.createtime}" id="createtime" required placeholder="请输入创作时间" autocomplete="off"/>
<input type="text" class="js-date" style="width:400px;" name="post[createtime]" value="{$post.createtime}" id="createtime" required placeholder="请输入创作时间" autocomplete="off"/>
<span class="form-required">*</span>
</td>
</tr>
... ...
... ... @@ -13,6 +13,7 @@ use Common\Controller\AdminbaseController;
class SuccessorController extends AdminbaseController {
protected $successor_model;
protected $product_model;
function _initialize() {
parent::_initialize();
... ... @@ -26,49 +27,9 @@ class SuccessorController extends AdminbaseController {
$this->display();
}
// 传承人作品列表
public function product(){
if(I('get.id',0,'intval')) {
$this->assign('id', I('get.id'));
$this->assign('product', json_decode($this->successor_model->getProduct(I('get.id'))));
$this->display();
} else {
$this->error("非法操作!");
}
}
// 传承人作品添加
public function add_product_post() {
if (IS_POST) {
$id = I('post.id',0,'intval');
if(!$id) {
$this->error("参数错误");
}
$info['name'] = I('post.name');
$info['thumb'] = I('post.thumb');
$info['description'] = I('post.description');
$info['href'] = I('post.href');
if(!$info['name']) {
$this->error("作品名称必填");
}
if(!$info['thumb']) {
$this->error("作品图片必填");
}
if(!$info['description']) {
$this->error("作品描述必填");
}
$result=$this->exam_model->where(array('id'=>$id))->save($info);
if ($result) {
$this->success("添加成功!");
} else {
$this->error("添加失败!");
}
}
}
// 传承人添加
public function add(){
$this->_getTermTree();
$this->_getProductTree();
$this->assign('sex', array('1'=>'男', '2'=>'女'));
$this->assign('level', array('国家级', '省市级', '地区及', '县级'));
$this->assign('region', M('Region')->select());
... ... @@ -79,28 +40,17 @@ class SuccessorController extends AdminbaseController {
// 传承人添加提交
public function add_post(){
if (IS_POST) {
if(empty($_POST['term'])){
$this->error("请至少选择一个分类!");
if(empty($_POST['post']['sort_id'])){
$this->error("请选择一个分类!");
}
if(!empty($_POST['photos_alt']) && !empty($_POST['photos_url'])){
foreach ($_POST['photos_url'] as $key=>$url){
$photourl=sp_asset_relative_url($url);
$_POST['smeta']['photo'][]=array("url"=>$photourl,"alt"=>$_POST['photos_alt'][$key]);
}
$successor=I("post.post");
$successor['content']=htmlspecialchars_decode($successor['content']);
$successor['ctime'] = time();
if(!$this->successor_model->create($successor)){
$this->error($this->successor_model->getError());
}
$_POST['smeta']['thumb'] = sp_asset_relative_url($_POST['smeta']['thumb']);
$_POST['post']['post_modified']=date("Y-m-d H:i:s",time());
$_POST['post']['post_author']=get_current_admin_id();
$article=I("post.post");
$article['smeta']=json_encode($_POST['smeta']);
$article['post_content']=htmlspecialchars_decode($article['post_content']);
$result=$this->posts_model->add($article);
$result=$this->successor_model->add($successor);
if ($result) {
foreach ($_POST['term'] as $mterm_id){
$this->term_relationships_model->add(array("term_id"=>intval($mterm_id),"object_id"=>$result));
}
$this->success("添加成功!");
} else {
$this->error("添加失败!");
... ... @@ -113,52 +63,38 @@ class SuccessorController extends AdminbaseController {
public function edit(){
$id= I("get.id",0,'intval');
$term_relationship = M('TermRelationships')->where(array("object_id"=>$id,"status"=>1))->getField("term_id",true);
$this->_getTermTree($term_relationship);
$terms=$this->terms_model->select();
$post=$this->posts_model->where("id=$id")->find();
$this->assign("post",$post);
$post=$this->successor_model->where("id=$id")->find();
$product_id = M('Product')->where(array("id"=>$post['sort_id'],"is_del"=>0))->getField("id", true);
$this->_getProductTree($product_id);
$this->assign('info',$post);
$this->assign("smeta",json_decode($post['smeta'],true));
$this->assign("terms",$terms);
$this->assign("term",$term_relationship);
$this->assign('sex', array('1'=>'男', '2'=>'女'));
$this->assign('level', array('国家级', '省市级', '地区及', '县级'));
$this->assign('region', M('Region')->select());
$this->assign('nation', M('Nation')->select());
$this->display();
}
// 传承人编辑提交
public function edit_post(){
if (IS_POST) {
if(empty($_POST['term'])){
if(empty($_POST['post']['sort_id'])){
$this->error("请至少选择一个分类!");
}
$post_id=intval($_POST['post']['id']);
$this->term_relationships_model->where(array("object_id"=>$post_id,"term_id"=>array("not in",implode(",", $_POST['term']))))->delete();
foreach ($_POST['term'] as $mterm_id){
$find_term_relationship=$this->term_relationships_model->where(array("object_id"=>$post_id,"term_id"=>$mterm_id))->count();
if(empty($find_term_relationship)){
$this->term_relationships_model->add(array("term_id"=>intval($mterm_id),"object_id"=>$post_id));
}else{
$this->term_relationships_model->where(array("object_id"=>$post_id,"term_id"=>$mterm_id))->save(array("status"=>1));
}
}
if(!empty($_POST['photos_alt']) && !empty($_POST['photos_url'])){
foreach ($_POST['photos_url'] as $key=>$url){
$photourl=sp_asset_relative_url($url);
$_POST['smeta']['photo'][]=array("url"=>$photourl,"alt"=>$_POST['photos_alt'][$key]);
}
$id=intval(I('post.id'));
$successor=I("post.post");
$successor['content']=htmlspecialchars_decode($successor['content']);
$successor['ctime'] = time();
$successor['utime'] = time();
if(!$this->successor_model->create($successor)){
$this->error($this->successor_model->getError());
}
$_POST['smeta']['thumb'] = sp_asset_relative_url($_POST['smeta']['thumb']);
unset($_POST['post']['post_author']);
$_POST['post']['post_modified']=date("Y-m-d H:i:s",time());
$article=I("post.post");
$article['smeta']=json_encode($_POST['smeta']);
$article['post_content']=htmlspecialchars_decode($article['post_content']);
$result=$this->posts_model->save($article);
if ($result!==false) {
$this->success("保存成功!");
$result=$this->successor_model->where(array('id'=>$id))->save($successor);
if ($result) {
$this->success("修改成功!");
} else {
$this->error("保存失败!");
$this->error("修改失败!");
}
}
}
... ... @@ -201,7 +137,7 @@ class SuccessorController extends AdminbaseController {
$page = $this->page($count, 20);
$posts = $this->successor_model
->field('s.*,p.name')
->field('s.*,p.name as pname')
->alias("s")
->join("__PRODUCT__ p ON s.sort_id = p.id")
->where($where)
... ... @@ -215,7 +151,7 @@ class SuccessorController extends AdminbaseController {
}
// 获取商品分类树结构
private function _getTermTree($term=array()){
private function _getProductTree($product=array()){
$result = $this->product_model->order(array("listorder"=>"asc"))->select();
$tree = new \Tree();
... ... @@ -226,8 +162,8 @@ class SuccessorController extends AdminbaseController {
$r['visit'] = "<a href='#'>访问</a>";
$r['taxonomys'] = $this->taxonomys[$r['taxonomy']];
$r['parentid']=$r['parent'];
$r['selected']=in_array($r['id'], $term)?"selected":"";
$r['checked'] =in_array($r['id'], $term)?"checked":"";
$r['selected']=in_array($r['id'], $product)?"selected":"";
$r['checked'] =in_array($r['id'], $product)?"checked":"";
$array[] = $r;
}
... ...
<?php
/**
* Created by PhpStorm.
* User: 29925
* Date: 2018/5/1
* Time: 10:57
*/
namespace Admin\Controller;
use Common\Controller\AdminbaseController;
class SuccessorProductController extends AdminbaseController {
protected $sid;
protected $successor_model;
protected $successor_product_model;
function _initialize() {
$this->region();
$this->sid = I('request.sid',0,'intval');
if(!$this->sid) {
$this->error('参数错误');
}
$this->assign('sid',$this->sid);
parent::_initialize(); // TODO: Change the autogenerated stub
$this->successor_model = D('Common/Successor');
$this->successor_product_model = D('Common/SuccessorProduct');
}
// 传承人产品列表
public function index() {
$this->assign('list', $this->successor_product_model->getList($this->sid, I('get.p'), I('post.keyword'), strtotime(I('post.start_time')), strtotime(I('post.end_time'))));
$count = $this->successor_product_model->getCount($this->sid, I('post.keyword'), strtotime(I('post.start_time')), strtotime(I('post.end_time')));
$page = $this->page($count, C('MAX_PAGE_NUM'));
$this->assign('page', $page->show('Admin'));
$this->assign('formget', I('post.'));
$this->assign('keyword', I('post.keyword'));
$this->display();
}
// 添加
public function add(){
$this->display();
}
// 添加提交
public function add_post(){
if (IS_POST) {
$info = I('post.post');
$info['sid'] = $this->sid;
$info['content'] = htmlspecialchars_decode($info['content']);
$info['ctime'] = time();
if(!$this->successor_product_model->create($info)) {
$this->error($this->successor_product_model->getError());
}
$result = $this->successor_product_model->add($info);
if ($result) {
$this->success("添加成功!");
} else {
$this->error("添加失败!");
}
}
}
// 编辑
public function edit(){
$id = I("get.id",0,'intval');
$info=$this->successor_product_model->where(array("id" => $id,'lid'=>$this->sid))->find();
$this->assign($info);
$this->display();
}
// 编辑提交
public function edit_post(){
if (IS_POST) {
$info = I('post.post');
$info['sid'] = $this->sid;
$info['content'] = htmlspecialchars_decode($info['content']);
$info['utime'] = time();
if ($this->successor_product_model->create($info)!==false) {
if ($this->successor_product_model->save($info)!==false) {
$this->success("修改成功!");
} else {
$this->error("修改失败!");
}
} else {
$this->error($this->successor_product_model->getError());
}
}
}
// 删除
public function delete(){
if(I('get.id')){
$id = I("get.id",0,'intval');
if ($this->successor_product_model->where(array('id'=>$id))->save(array('is_del'=>1,'dtime'=>time())) !==false) {
$this->success("删除成功!");
} else {
$this->error("删除失败!");
}
}
if(I('post.ids')){
$ids = I('post.ids/a');
if (!$this->successor_product_model->where(array('id'=>array('in',$ids)))->save(array('is_del'=>1,'dtime'=>time()))) {
$this->error("删除失败!");
}
$this->success("删除成功!");
}
}
}
\ No newline at end of file
... ...
... ... @@ -10,6 +10,13 @@ class AppframeController extends Controller {
$this->assign("js_debug",APP_DEBUG?"?v=$time":"");
}
// 民族列表
public function nation() {
$nation = M('Nation')
->select();
$this->assign('nation', $nation);
}
// 地区列表
public function region() {
$region = M('Region')
... ... @@ -17,6 +24,22 @@ class AppframeController extends Controller {
$this->assign('region', $region);
}
// 一级分类列表
public function product() {
$product = M('Product')
->select();
$this->assign('product', $product);
}
// 二级分类列表
public function product_son($id) {
$where['parent'] = $id;
$product_son = M('Product')
->where($where)
->select();
$this->assign('product_son', $product_son);
}
/*
* TP上传操作
* @author ShiO
... ...
... ... @@ -15,14 +15,24 @@ class ChanceApplyModel extends CommonModel {
// 自动验证
protected $_validate = array(
//array(验证字段,验证规则,错误提示,验证条件,附加规则,验证时间)
array('user_id', 'number', '用户ID不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('name', 'require', '投稿人姓名不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('stime', 'require', '活动时间不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('num', 'number', '报名人数不正确', 1, 'regex', CommonModel::MODEL_BOTH),
array('starttime', 'require', '报名开始时间不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('endtime', 'require', '报名结束时间不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('description', 'require', '活动简介不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('thumb', 'require', '缩略图不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('content', 'require', '活动内容不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('province', 'require', '所在省不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('city', 'require', '城市不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('birth', 'require', '出生年份不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('school', 'require', '所在公司或高校不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('sex', array(0,1,2), '性别格式错误', 1, 'in', CommonModel::MODEL_BOTH),
array('major', 'require', '专业不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('mobile', 'require', '手机号码不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('mobile', 'mobile', '手机号码格式错误', 1, 'regex', CommonModel::MODEL_BOTH),
array('classes', 'require', '年级不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('email', 'require', '邮箱不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('email', 'email', '邮箱格式错误', 1, 'regex', CommonModel::MODEL_BOTH),
array('experience', 'require', '相关专业经验不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('product', 'require', '相关创作或获奖作品简要描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('product_description', 'require', '投稿作品创意概述不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('att', 'require', '详细附件不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('images', 'require', '双创项目图片不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
);
// 获取青年文创(投稿)列表
... ...
... ... @@ -17,11 +17,13 @@ class SuccessorModel extends CommonModel {
//array(验证字段,验证规则,错误提示,验证条件,附加规则,验证时间)
array('sort_id', 'number', '产品类别ID不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('name', 'require', '名称不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('sex', array(0,1,2), '性别格式不正确', 1, 'regex', CommonModel::MODEL_BOTH),
array('sex', array(0,1,2), '性别格式不正确', 1, 'in', CommonModel::MODEL_BOTH),
array('birth', 'require', '生日不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('level', 'require', '级别不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('region', 'require', '区域不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('nation', 'require', '民族不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('thumb', 'require', '缩略图不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('content', 'require', '作品介绍不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
);
// 获取传承人列表
... ... @@ -30,14 +32,14 @@ class SuccessorModel extends CommonModel {
if($keyword) {
$where['s.name'] = array('like', '%'.$keyword.'%');
}
return $this->field(array('s.*,p.name'))->alias('s')->join('feiyi_product as p on s.sort_id = p.id')->where($where)->select();
return $this->field(array('s.*,p.name'))->alias('s')->join('__PRODUCT__ as p on s.sort_id = p.id')->where($where)->select();
}
// 获取传承人详情
public function getInfo($id) {
$where['s.is_del'] = 0;
$where['s.id'] = $id;
return $this->field(array('s.*,p.name'))->alias('s')->join('feiyi_product as p on s.sort_id = p,id')->where($where)->find();
return $this->field(array('s.*,p.name'))->alias('s')->join('__PRODUCT__ as p on s.sort_id = p.id')->where($where)->find();
}
// 获取传承人作品
... ...
<?php
/**
* Created by PhpStorm.
* User: 29925
* Date: 2018/5/1
* Time: 15:43
*/
namespace Common\Model;
use Common\Model\CommonModel;
class SuccessorProductModel extends CommonModel {
// 自动验证
protected $_validate = array(
//array(验证字段,验证规则,错误提示,验证条件,附加规则,验证时间)
array('sid', 'number', '传承人id不正确', 1, 'regex', CommonModel::MODEL_BOTH),
array('name', 'require', '作品名称不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('thumb', 'require', '缩略图不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('description', 'require', '作品描述不能为空', 1, 'regex', CommonModel::MODEL_BOTH),
array('href', 'url', '必须为链接地址', 2, 'regex', CommonModel::MODEL_BOTH),
);
// 获取传承人作品列表
public function getList($sid, $page_num, $keyword = null, $start_time = null, $end_time = null) {
$perPage = 25;
$where['is_del'] = 0;
$where['sid'] = $sid;
if($keyword) {
$where['name'] = array('like', '%'.$keyword.'%');
}
if($start_time && $end_time) {
$where['ctime'] = array('between', array($start_time,$end_time));
}
return $this->where($where)
->page($page_num, $perPage)
->select();
}
// 获取传承人作品列表(所有)
public function getAllList($sid) {
$where['is_del'] = 0;
$where['sid'] = $sid;
return $this->where($where)
->select();
}
// 获取传承人作品详情
public function getInfo($id) {
$where['is_del'] = 0;
$where['id'] = $id;
return $this->where($where)->find();
}
/**
* 获取数据总数
* @author Liuzhen
*/
public function getCount($sid, $keyword = null, $start_time = null, $end_time = null) {
$where = array();
$where['sid'] = $sid;
if($keyword) {
$where['name'] = array('like', '%'.$keyword.'%');
}
if($start_time && $end_time) {
$where['ctime'] = array('between', array($start_time,$end_time));
}
$where['is_del'] = 0;
$count = $this->where($where)
->count();
return $count;
}
}
\ No newline at end of file
... ...
... ... @@ -38,7 +38,7 @@ class ChanceArticleController extends HomebaseController {
}
/**
* 青年文创列表处理方法,根据不同条件显示不同的列表
* 列表处理方法,根据不同条件显示不同的列表
* @param array $where 查询条件
*/
private function _lists($where=array()){
... ...
<?php
/**
* Created by PhpStorm.
* User: 29925
* Date: 2018/5/1
* Time: 9:25
*/
namespace Portal\Controller;
use Common\Controller\HomebaseController;
class ChanceController extends HomebaseController {
protected $chance_model;
protected $chance_apply_model;
function _initialize() {
parent::_initialize();
$this->chance_model = D("Common/Chance");
$this->chance_apply_model = D("Common/ChanceApply");
}
// 青年文创列表
public function index(){
$this->_lists(array('is_del'=>0));
$this->display();
}
/**
* 青年文创列表处理方法,根据不同条件显示不同的列表
* @param array $where 查询条件
*/
private function _lists($where=array()){
$this->chance_model
->where($where);
$count = $this->chance_model->count();
$page = $this->page($count, 20);
$posts = $this->chance_model
->where($where)
->limit($page->firstRow , $page->listRows)
->order("ctime DESC")
->select();
$id = I('get.id',0,'intval');
if(!$id) {
$id = $posts[0]['id'];
}
$info = $this->chance_model->where(array('id'=>$id))->find();
$info['pictures'] = json_decode($info['pictures'],true)['photo'];
$this->assign('id',$id);
$this->assign('info',$info);
$this->assign("page", $page->show('Admin'));
$this->assign("formget",array_merge($_GET,$_POST));
$this->assign("posts",$posts);
}
/**
* 青年文创投稿提交
* @param post 提交的申请数据
* @param user_id 用户ID
*/
public function submit() {
if(IS_AJAX) {
$post =I('post.');
$user_id = $post['user_id'] = 1;
// $user_id = $post['user_id'] = sp_get_current_userid();
// if(!$user_id) {
// $this->ajaxReturn(array('status'=>false,'msg'=>'用户未登录'));
// }
$post['images'] = implode(',',I('post.images'));
$post['ctime'] = $post['utime'] = time();
if(!$this->chance_apply_model->create($post)) {
$this->ajaxReturn(array('status'=>false,'msg'=>$this->chance_apply_model->getError()));
}
if(count(I('post.images'))<3 || count(I('post.images'))>5) {
$this->ajaxReturn(array('status'=>false,'msg'=>'图片数量不符'));
}
$will_id = $this->chance_apply_model->add($post);
if(!$will_id) {
$this->ajaxReturn(array('status'=>false,'msg'=>'提交失败'));
}
$this->ajaxReturn(array('status'=>true,'msg'=>'提交成功'));
} else {
$this->error('非法操作');
}
}
//上传图片
public function personalUpload() {
if(IS_POST){
list($status, $info, $link, $attachmentId) = $this->uploadCommon('image', C('UPLOAD_MATERIAL_IMAGE_MAX_SIZE'), 'personal', false);
if ($status) {
echo json_encode(array('status' => true, 'data' => $info, 'file'=>sp_get_image_preview_url($info)));exit;
} else {
echo json_encode(array('status' => false, 'msg'=>$info));exit;
}
} else {
$this->error('非法操作');
}
}
//上传附件
public function personalUploadAtt() {
if(IS_POST){
list($status, $info, $link, $attachmentId) = $this->uploadCommon('file', C('UPLOAD_MAX_SIZE'), 'file', false);
if ($status) {
echo json_encode(array('status' => true, 'data' => $info, 'file'=>sp_get_image_preview_url($info)));exit;
} else {
echo json_encode(array('status' => false, 'msg'=>$info));exit;
}
} else {
$this->error('非法操作');
}
}
}
\ No newline at end of file
... ...
... ... @@ -12,7 +12,63 @@ use Common\Controller\HomebaseController;
class SuccessorController extends HomebaseController {
public function index() {
protected $successor_model;
protected $successor_produce_model;
function _initialize() {
parent::_initialize();
$this->successor_model = D("Common/Successor");
$this->successor_produce_model = D("Common/SuccessorProduct");
}
// 传承人列表
public function index(){
$this->region();
$this->nation();
$this->product();
if(I('get.product',0,'intval')) {
$this->product_son(I('get.product'));
}
$this->assign('sex', array('1'=>'男', '2'=>'女'));
$this->assign('level', array('国家级', '省市级', '地区及', '县级'));
$this->assign('search',I('get.'));
$this->_lists(array('is_del'=>0));
$this->display();
}
// 传承人详情
public function detail(){
$id = I('get.id',0,'intval');
if(!$id) {
$this->error('参数错误');
}
$productList = $this->successor_produce_model->getAllList($id);
$info = $this->successor_model->getInfo($id);
$this->assign($info);
$this->assign('productList',$productList);
$this->display();
}
/**
* 地方非遗列表处理方法,根据不同条件显示不同的列表
* @param array $where 查询条件
*/
private function _lists($where=array()){
$where['is_del'] = 0;
$this->successor_model
->where($where);
$count = $this->successor_model->count();
$page = $this->page($count, 20);
$posts = $this->successor_model
->where($where)
->limit($page->firstRow , $page->listRows)
->order("ctime DESC")
->select();
$this->assign("page", $page->show('Admin'));
$this->assign("posts",$posts);
}
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
<h4>青年文创申请表</h4>
</div>
<div class="modal-body">
<form action="" method="post">
<form action="" method="post" id="chance">
<div class="row">
<div class="row-title">
<h5>个人信息</h5>
... ...
... ... @@ -8,6 +8,25 @@
<link href="__TMPL__Public/assets/css/common.css" rel="stylesheet" type="text/css" />
<link href="__TMPL__Public/assets/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="__TMPL__Public/assets/css/modal.css">
<style>
.img_box{
width:100%;
position: absolute;
top: 0;
left: 0;
z-index:1;
background-color: #FFF;
overflow: hidden;
max-height: 100%;
}
.img_box img{
width: auto;
}
.upload{
z-index: 2;
}
</style>
</head>
<body>
<tc_include file="Public:header"/>
... ... @@ -34,14 +53,9 @@
<div class="wc-in-wrap clearfix">
<div class="wc-sidebar">
<ul class="wc-navbar">
<li class="active"><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<li><a href="">青年文创步摇</a></li>
<volist name="posts" id="vo">
<li class="<if condition='$id eq $vo[id]'>active</if>"><a href="{:U('Chance/index',array('id'=>$vo['id']))}">{$vo.name}</a></li>
</volist>
</ul>
</div>
<div class="wc-main">
... ... @@ -49,53 +63,38 @@
<div class="wc-grid">
<div id="MagnifierWrap2">
<div class="MagnifierMain">
<img class="MagTargetImg" src="images/demo/22.jpg" data-src="images/demo/22.jpg">
<img class="MagTargetImg" src="{:sp_get_asset_upload_path($info['pictures'][0]['url'])}" data-src="{:sp_get_asset_upload_path($info['pictures'][0]['url'])}">
</div>
<span class="spe_leftBtn"></span>
<span class="spe_rightBtn"></span>
<div class="spec-items">
<ul>
<li><img src="images/demo/22.jpg" data-lsrc="images/demo/22.jpg" data-maxSrc="images/demo/22.jpg"></li>
<li><img src="images/demo/33.jpg" data-lsrc="images/demo/33.jpg" data-maxSrc="images/demo/33.jpg"></li>
<li><img src="images/demo/44.jpg" data-lsrc="images/demo/44.jpg" data-maxSrc="images/demo/44.jpg"></li>
<li><img src="images/demo/11.jpg" data-lsrc="images/demo/11.jpg" data-maxSrc="images/demo/11.jpg"></li>
<li><img src="images/demo/22.jpg" data-lsrc="images/demo/22.jpg" data-maxSrc="images/demo/22.jpg"></li>
<volist name="info.pictures" id="vo">
<li><img src="{:sp_get_asset_upload_path($vo['url'])}" data-lsrc="{:sp_get_asset_upload_path($vo['url'])}" data-maxSrc="{:sp_get_asset_upload_path($vo['url'])}"></li>
</volist>
</ul>
</div>
</div>
</div>
<div class="wc-grid-text">
<div class="wc-title">复古发饰步摇</div>
<div class="wc-title">{$info.name}</div>
<div class="wc-text-item">
作 者  青年文创
作 者  {$info.author}
</div>
<div class="wc-text-item">
创作时间  1988-10-05
创作时间  {$info.createtime}
</div>
</div>
</div>
<div class="content">
<p>步摇以金银玉石等质地,宋明以来一直流传的头饰。其形制与质地都是等级与身份的象征。汉代以后,步摇才逐渐被民间百姓所见才有机会在社会上广为流传。在贵族妇女中,还实行过一阵加於冠上的步摇冠。戴在头上较之步摇更富有富贵豪华之感。步摇的概念,见於两汉时期,然而,它从一开始就被置放到一个礼服的范围之内,汉制规定,太皇太后、皇太后的祭服中的首服为“剪氂簂,簪珥,耳璫垂珠,簪瑇 瑁为擿,长一尺,上为凤凰爵,以翡翠为毛羽,下有白珠,垂黄金镊,左右各一,横簪之以安簂结。”又“皇后之服相同,步摇簪珥,惟用假结,步摇以黄金为山 题,贯白珠为桂枝相缪。</p>
<p>一爵九华,熊、虎、赤罴、天禄,辟邪,南山丰大特六兽,诸爵兽皆翡翠为毛羽,金题白珠珰,绕以翡翠为华。”这两段话应该放在一起 看,按《後汉书·乌恒传》所说:如中国之有簂、步摇。步摇,是和簂(即帼)这样的假髻具有同等地位的东西,接着分析皇后首服中步摇的描绘,“以黄金为山题”,就是以黄金为底架,上面饰有白珠。</p>
<p>相类似的形制,比如在辽宁北票四花营子乡出土的两晋十六国时期前燕的金质花树状步摇,底部呈方形,上面为短而宽的树干干上分枝,树身上穿挂桃形叶片,动则 微微颤动,琮琮作响,虽然没有白珠,而是金叶片,但非常符合“桂枝相缪”的特征,这个金叶片更象上文所说的“镊”,镊,在古代是指簪首的饰物。这些实物也为《释名》 中关于步摇的解释,“上有垂珠,步则动摇也”提供了鲜活的范例,再结合《后汉书·后纪》“邓皇后”篇中提到的,邓皇后“赐冯贵人王赤绶,以未有步摇,环 佩,加赐各一具。”步摇的单位以具为准,可见其正式程度,绝非后世所谓的单根簪饰可比。</p>
{$info.content}
</div>
</div>
</div>
</div>
</div>
<!--footer-->
<div class="footer">
<div class="footer-main w1200 clearfix">
<div class="end-logo"><img src="images/flogo.jpg"/></div>
<div class="foot-info">
<div class="tel">400-888-888</div>
<div class="wxhao wx-menu">微信公众号<img src="images/wxcode.png" alt="" /></div>
<div class="wxqun wx-menu">微信交流群<img src="images/wxcode.png" alt="" /></div>
</div>
<div class="copyright">非遗文化传播有限公司版权所有COPYRIGHT2015 网站备案号:津ICP备12007083号-4</div>
</div>
</div>
<tc_include file="Public:footer"/>
<tc_include file="Portal/Chance:apply"/>
<!-- js -->
<script src="__TMPL__Public/assets/js/jquery.min.js"></script>
... ... @@ -182,9 +181,9 @@
$('input[name=submit]').click(function(){
var btn = $(this);
var text = btn.val();
var form = $('#story').serialize();
var form = $('#chance').serialize();
$.ajax({
url:"{:U('Story/submit')}",
url:"{:U('Chance/submit')}",
type:"POST",
data:form,
dateType:"json",
... ... @@ -193,7 +192,6 @@
btn.val('提交中...').attr('disabled', true);
},
success:function (data) {
console.log(data);
if(data.status) {
alert(data.msg);
location.reload();
... ...
... ... @@ -19,7 +19,7 @@
<div class="in-cate-tit">高校文创</div>
<ul class="in-cate-nav">
<li class="active"><a href="{:U('ChanceEvents/index')}">活动赛事</a></li>
<li><a href="">青年文创</a></li>
<li><a href="{:U('Chance/index')}">青年文创</a></li>
<li><a href="{:U('ChanceArticle/inherit',array('sort'=>1))}">传承基地</a></li>
<li><a href="{:U('ChanceArticle/corporate',array('sort'=>2))}">非遗社团</a></li>
</ul>
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>3传承人详情</title>
<link href="__TMPL__Public/assets/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__TMPL__Public/assets/css/common.css" rel="stylesheet" type="text/css" />
<link href="__TMPL__Public/assets/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<tc_include file="Public:header"/>
<tc_include file="Public:nav"/>
<div class="inbanner" style="background-image: url(__TMPL__Public/assets/images/banner/inbanner.jpg);">
<!--分类-->
<div class="catebox">
<div class="in-catebox">
<div class="in-cate-tit" style="margin-right:0;">传承人</div>
</div>
</div>
</div>
<div class="page-container">
<div class="main">
<div class="breadnav">
<div class="breadcrumb">您所在的位置:<a href="">首页</a> > <a href="">传承人</a></div>
</div>
<div class="feiyi-grids">
<div class="feiyi-grids-cell">
<div class="fy-g-pic">
<img src="{:sp_get_image_preview_url($thumb)}"/>
</div>
<div class="fy-g-body">
<div class="fy-g-tit">{$name}</div>
<div class="fy-g-item">性别 <eq name="sex" value="1"></eq><eq name="sex" value="2"></eq></div>
<div class="fy-g-item">民族 {$nation}</div>
<div class="fy-g-item">出生日期 {$birth}</div>
<div class="fy-g-item">所属非遗项目 汉绣</div>
</div>
</div>
<!--杨柳青年画·介绍-->
<div class="feiyi-grids-details">
<div class="fy-dt-tit">{$name}·介绍</div>
<div class="fy-dt-intro">
<div class="fy-part">
{$content}
</div>
<div class="fy-all">
{$content}
</div>
</div>
<div class="fy-more"><span>展开全文</span></div>
</div>
</div>
<!--特色产品-->
<div class="ts-wrap">
<div class="ts-hd">代表作品</div>
<ul class="ts-list">
<volist name="productList" id="vo">
<li>
<a href="<notempty name='vo.href'>{$vo.href}<else/>javascript:;</notempty>" class="ts-box">
<div class="ts-pic scale"><img src="{:sp_get_image_preview_url($vo['thumb'])}"/></div>
<div class="ts-title">
<span>{$vo.name}</span>
</div>
<div class="ts-desc">{$vo.description}</div>
</a>
</li>
</volist>
</ul>
</div>
</div>
</div>
<tc_include file="Public:footer"/>
<!-- js -->
<script src="__TMPL__Public/assets/js/jquery.min.js"></script>
<script src="__TMPL__Public/assets/js/common.js"></script>
</body>
</html>
... ...
... ... @@ -11,11 +11,11 @@
<body>
<tc_include file="Public:header"/>
<tc_include file="Public:nav"/>
<div class="inbanner" style="background-image: url(images/banner/inbanner.jpg);">
<div class="inbanner" style="background-image: url(__TMPL__Public/assets/images/banner/inbanner.jpg);">
<!--分类-->
<div class="catebox">
<div class="in-catebox">
<div class="in-cate-tit">传承人</div>
<div class="in-cate-tit" style="margin-right:0;">传承人</div>
</div>
</div>
</div>
... ... @@ -23,47 +23,42 @@
<div class="main">
<div class="filter-wrap">
<div class="filter-row">
<div class="filter-key">传承人</div>
<div class="filter-key">产品类别</div>
<div class="filter-body">
<div class="filter-v-list">
<ul class="f-valueList">
<li><a href="">全部</a></li>
<li class="active"><a href="">家居陈设</a></li>
<li><a href="">文房文玩</a></li>
<li><a href="">衣冠服饰</a></li>
<li><a href="">文具数码 </a></li>
<li><a href="">珠宝首饰</a></li>
<li><a href="">工艺美术</a></li>
<li><a href="">饮食养生 </a></li>
<li><a href="">乐舞游艺</a></li>
<li><a href="">礼品收藏</a></li>
<li><a href="">书画票务</a></li>
<li class="active"><a href="">全部</a></li>
<volist name="product" id="vo">
<li><a href="">{$vo.name}</a></li>
</volist>
</ul>
</div>
</div>
</div>
<div class="filter-row filter-bg-row">
<div class="filter-key">详细分类</div>
<div class="filter-body">
<div class="filter-v-list">
<ul class="f-valueList">
<li><a href="">全部</a></li>
<li><a href="">家具家居</a></li>
<li><a href="">软装摆件</a></li>
<li><a href="">日用品</a></li>
<li class="active"><a href="">漆器 </a></li>
</ul>
<notempty>
<div class="filter-row filter-bg-row">
<div class="filter-key">详细分类</div>
<div class="filter-body">
<div class="filter-v-list">
<ul class="f-valueList">
<li class="active"><a href="">全部</a></li>
<volist name="product_son" id="vo">
<li><a href="">{$vo.name}</a></li>
</volist>
</ul>
</div>
</div>
</div>
</div>
</notempty>
<div class="filter-row">
<div class="filter-key">性别</div>
<div class="filter-body">
<div class="filter-v-list">
<ul class="f-valueList">
<li class="active"><a href="">全部</a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
<volist name="sex" id="vo">
<li><a href="">{$vo}</a></li>
</volist>
</ul>
</div>
</div>
... ... @@ -73,10 +68,10 @@
<div class="filter-body">
<div class="filter-v-list">
<ul class="f-valueList">
<li class="active"><a href="">国家级</a></li>
<li><a href="">省市级</a></li>
<li><a href="">地区级</a></li>
<li><a href="">县级</a></li>
<li class="active"><a href="">全部</a></li>
<volist name="level" id="vo">
<li><a href="">{$vo}</a></li>
</volist>
</ul>
</div>
</div>
... ... @@ -87,35 +82,9 @@
<div class="filter-v-list">
<ul class="f-valueList">
<li class="active"><a href="">全部</a></li>
<li><a href="">北京 </a></li>
<li><a href="">天津</a></li>
<li><a href="">河北</a></li>
<li><a href="">山西</a></li>
<li><a href="">内蒙古</a></li>
<li><a href="">黑龙江</a></li>
<li><a href="">吉林</a></li>
<li><a href="">辽宁</a></li>
<li><a href="">上海</a></li>
<li><a href="">江苏</a></li>
<li><a href="">浙江</a></li>
<li><a href="">安徽</a></li>
<li><a href="">江西</a></li>
<li><a href="">福建</a></li>
<li><a href="">山东</a></li>
<li><a href="">台湾</a></li>
<li><a href="">河南</a></li>
<li><a href="">湖北</a></li>
<li><a href="">辽宁</a></li>
<li><a href="">上海</a></li>
<li><a href="">江苏</a></li>
<li><a href="">浙江</a></li>
<li><a href="">安徽</a></li>
<li><a href="">江西</a></li>
<li><a href="">福建</a></li>
<li><a href="">山东</a></li>
<li><a href="">台湾</a></li>
<li><a href="">河南</a></li>
<li><a href="">湖北</a></li>
<volist name="region" id="vo">
<li><a href="">{$vo.name}</a></li>
</volist>
</ul>
</div>
</div>
... ... @@ -129,36 +98,9 @@
<div class="filter-v-list">
<ul class="f-valueList">
<li class="active"><a href="">全部</a></li>
<li><a href="">汉族 </a></li>
<li><a href="">蒙古族</a></li>
<li><a href="">回族</a></li>
<li><a href="">藏族</a></li>
<li><a href="">维吾尔族</a></li>
<li><a href="">苗族</a></li>
<li><a href="">彝族</a></li>
<li><a href="">壮族</a></li>
<li><a href="">布依族</a></li>
<li><a href="">朝鲜族</a></li>
<li><a href="">满族</a></li>
<li><a href="">侗族</a></li>
<li><a href="">瑶族</a></li>
<li><a href="">土家族</a></li>
<li><a href="">哈尼族</a></li>
<li><a href="">汉族 </a></li>
<li><a href="">蒙古族</a></li>
<li><a href="">回族</a></li>
<li><a href="">藏族</a></li>
<li><a href="">维吾尔族</a></li>
<li><a href="">苗族</a></li>
<li><a href="">彝族</a></li>
<li><a href="">壮族</a></li>
<li><a href="">布依族</a></li>
<li><a href="">朝鲜族</a></li>
<li><a href="">满族</a></li>
<li><a href="">侗族</a></li>
<li><a href="">瑶族</a></li>
<li><a href="">土家族</a></li>
<li><a href="">哈尼族</a></li>
<volist name="nation" id="vo">
<li><a href="">{$vo.name}</a></li>
</volist>
</ul>
</div>
</div>
... ... @@ -170,54 +112,16 @@
<!--list-->
<div class="cc-people-list">
<ul class="clearfix">
<li>
<a href="#" class="pp-box">
<div class="pp-pic"><img src="__TMPL__Public/assets/images/demo/jiangzaihong-sm.jpg"/></div>
<div class="pp-title">
<span>江再红大师</span>
</div>
</a>
</li>
<li>
<a href="#" class="pp-box">
<div class="pp-pic"><img src="__TMPL__Public/assets/images/demo/jiangzaihong-sm.jpg"/></div>
<div class="pp-title">
<span>江再红大师</span>
</div>
</a>
</li>
<li>
<a href="#" class="pp-box">
<div class="pp-pic"><img src="__TMPL__Public/assets/images/demo/jiangzaihong-sm.jpg"/></div>
<div class="pp-title">
<span>江再红大师</span>
</div>
</a>
</li>
<li>
<a href="#" class="pp-box">
<div class="pp-pic"><img src="__TMPL__Public/assets/images/demo/jiangzaihong-sm.jpg"/></div>
<div class="pp-title">
<span>江再红大师</span>
</div>
</a>
</li>
<li>
<a href="#" class="pp-box">
<div class="pp-pic"><img src="__TMPL__Public/assets/images/demo/jiangzaihong-sm.jpg"/></div>
<div class="pp-title">
<span>江再红大师</span>
</div>
</a>
</li>
<li>
<a href="#" class="pp-box">
<div class="pp-pic"><img src="__TMPL__Public/assets/images/demo/jiangzaihong-sm.jpg"/></div>
<div class="pp-title">
<span>江再红大师</span>
</div>
</a>
</li>
<volist name="posts" id="vo">
<li>
<a href="{:U('detail',array('id'=>$vo['id']))}" class="pp-box">
<div class="pp-pic"><img src="{:sp_get_image_preview_url($vo['thumb'])}"/></div>
<div class="pp-title">
<span>{$vo.name}</span>
</div>
</a>
</li>
</volist>
</ul>
</div>
<!--pages-->
... ...