You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

277 lines
11 KiB

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="style/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="style/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="style/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="style/lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link href="style/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
{literal}
<script type="text/javascript">
function check(f){
if(Trim(f.news_title.value) == "" ){
alert('新闻标题不能为空!');
return false;
}
if(Trim(f.news_class.value) == 0 ){
alert('请选择新闻类别!');
return false;
}
}
</script>
{/literal}
<title>发布新闻</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe616;</i> 新闻管理 <span class="c-gray en">&gt;</span> 新闻列表管理 <span class="c-gray en">&gt;</span> 发布新闻 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="#" onclick="location.href='index.php?module=newslist';" title="关闭" ><i class="Hui-iconfont">&#xe6a6;</i></a></nav>
<div class="pd-20">
<form name="form1" action="index.php?module=newslist&action=add" class="form form-horizontal" method="post" onsubmit="return check(this);" enctype="multipart/form-data" >
<div class="row cl">
<label class="form-label col-2"><span class="c-red"></span>新闻标题:</label>
<div class="formControls col-10">
<input type="text" class="input-text" value="" placeholder="" id="" name="news_title">
</div>
</div>
<div class="row cl">
<label class="form-label col-2"><span class="c-red"></span>新闻类别:</label>
<div class="formControls col-2"> <span class="select-box">
<select name="news_class" class="select">
<option selected="selected" value="0">请选择类别</option>
{foreach from=$ctype item=item name=f1}
<option value="{$item->cat_id}">{$item->cat_name}</option>
{/foreach}
</select>
</span>
</div>
</div>
<div class="row cl">
<label class="form-label col-2"><span class="c-red"></span>作者:</label>
<div class="formControls col-2">
<input type="text" class="input-text" placeholder="" id="" name="author">
</div>
</div>
<div class="row cl">
<label class="form-label col-2">排序号:</label>
<div class="formControls col-2">
<input type="text" class="input-text" value="100" placeholder="" id="" name="sort">
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">新闻图片:</label>
<div class="formControls col-xs-8 col-sm-4">
<img id="thumb_url0" src='../LKT/images/nopic.jpg' style="height:100px;width:150">
<input type="hidden" id="picurl0" name="imgurl" datatype="*" nullmsg="请选择图片"/>
<input type="hidden" name="oldpic0" >
<button class="btn btn-success" id="image0" type="button" >选择图片</button>
</div>
<div class="col-4"> </div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">推广二维码图片:</label>
<div class="formControls col-xs-8 col-sm-4">
<img id="thumb_url1" src='../LKT/images/nopic.jpg' style="height:100px;width:150">
<input type="hidden" id="picurl1" name="t_link" datatype="*" nullmsg="请选择图片"/>
<input type="hidden" name="oldpic1" >
<button class="btn btn-success" id="image1" type="button" >选择图片</button>
</div>
<div class="col-4"> </div>
</div>
<div class="row cl">
<label class="form-label col-2">新闻内容:</label>
<div class="formControls col-10">
<script id="editor" type="text/plain" style="width:100%;height:400px;" name="content"></script>
</div>
</div>
<div class="row cl">
<div class="col-10 col-offset-2">
<button class="btn btn-primary radius" type="submit" name="Submit"><i class="Hui-iconfont">&#xe632;</i> 提 交</button>
<button class="btn btn-secondary radius" type="reset" name="reset"><i class="Hui-iconfont">&#xe632;</i> 重 写</button>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="modpub/js/check.js" > </script>
<script type="text/javascript" src="style/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="style/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="style/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="style/lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="style/lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="style/lib/webuploader/0.1.5/webuploader.min.js"></script>
<script type="text/javascript" src="style/lib/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="style/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
<script type="text/javascript" src="style/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="style/js/H-ui.js"></script>
<script type="text/javascript" src="style/js/H-ui.admin.js"></script>
<!-- 新增编辑器引入文件 -->
<link rel="stylesheet" href="style/kindeditor/themes/default/default.css" />
<script src="style/kindeditor/kindeditor-min.js"></script>
<script src="style/kindeditor/lang/zh_CN.js"></script>
{literal}
<script type="text/javascript">
$(function(){
$('.skin-minimal input').iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue',
increaseArea: '20%'
});
$list = $("#fileList"),
$btn = $("#btn-star"), // id名称
state = "pending",
uploader;
var uploader = WebUploader.create({
auto: true,
swf: 'style/lib/webuploader/0.1.5/Uploader.swf',
//
server: 'http://lib.h-ui.net/webuploader/0.1.5/server/fileupload.php',
//
// input元素flash.
pick: '#filePicker',
// image, jpeg
resize: false,
//
accept: {
title: 'Images',
extensions: 'gif,jpg,jpeg,bmp,png',
mimeTypes: 'image/*'
}
});
uploader.on( 'fileQueued', function( file ) {
var $li = $(
'<div id="' + file.id + '" class="item">' +
'<div class="pic-box"><img></div>'+
'<div class="info">' + file.name + '</div>' +
'<p class="state">等待上传...</p>'+
'</div>'
),
$img = $li.find('img');
$list.append( $li );
//
//
// thumbnailWidth x thumbnailHeight 100 x 100
uploader.makeThumb( file, function( error, src ) {
if ( error ) {
$img.replaceWith('<span>不能预览</span>');
return;
}
$img.attr( 'src', src );
}, thumbnailWidth, thumbnailHeight );
});
//
uploader.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress-box .sr-only');
//
if ( !$percent.length ) {
$percent = $('<div class="progress-box"><span class="progress-bar radius"><span class="sr-only" style="width:0%"></span></span></div>').appendTo( $li ).find('.sr-only');
}
$li.find(".state").text("上传中");
$percent.css( 'width', percentage * 100 + '%' );
});
// item添加成功class,
uploader.on( 'uploadSuccess', function( file ) {
$( '#'+file.id ).addClass('upload-state-success').find(".state").text("已上传");
});
//
uploader.on( 'uploadError', function( file ) {
$( '#'+file.id ).addClass('upload-state-error').find(".state").text("上传出错");
});
//
uploader.on( 'uploadComplete', function( file ) {
$( '#'+file.id ).find('.progress-box').fadeOut();
});
uploader.on('all', function (type) {
if (type === 'startUpload') {
state = 'uploading';
} else if (type === 'stopUpload') {
state = 'paused';
} else if (type === 'uploadFinished') {
state = 'done';
}
if (state === 'uploading') {
$btn.text('暂停上传');
} else {
$btn.text('开始上传');
}
});
$btn.on('click', function () {
if (state === 'uploading') {
uploader.stop();
} else {
uploader.upload();
}
});
var ue = UE.getEditor('editor');
});
function mobanxuanze(){
}
</script>
<script>
KindEditor.ready(function(K) {
var editor = K.editor({
allowFileManager : true,
uploadJson : "index.php?module=system&action=uploadImg", //
fileManagerJson : 'kindeditor/php/file_manager_json.php', //
});
//
K('#image0').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
//showRemote : false, //
//showLocal : false, //
imageUrl : K('#picurl0').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picurl0').val(url);
$('#thumb_url0').attr("src",url);
editor.hideDialog();
}
});
});
});
//
K('#image1').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
//showRemote : false, //
//showLocal : false, //
imageUrl : K('#picurl1').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picurl1').val(url);
$('#thumb_url1').attr("src",url);
editor.hideDialog();
}
});
});
});
});
</script>
{/literal}
</body>
</html>