211 lines
11 KiB
HTML
211 lines
11 KiB
HTML
<include file="Inc:header"/>
|
||
<style>
|
||
.div-li{ width: 25%; float: left; height: 40px; line-height 40px;}
|
||
</style>
|
||
<div class="container-fluid">
|
||
<div class="main_head">
|
||
|
||
</div>
|
||
|
||
<div style="text-align:right; float:right"></div>
|
||
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="widget-box">
|
||
<div class="widget-title"> <span class="icon"> <i class=" icon-align-justify"></i> </span>
|
||
|
||
<ul class="sub-nav">
|
||
<li>{$pagetitle}</li>
|
||
<li>SEO设置</li>
|
||
</ul>
|
||
|
||
</div>
|
||
<div class="widget-content nopadding">
|
||
<form action="{:U('page_add')}" method="post" class="form-horizontal" onsubmit="return this_submit(this,function(){location.href='{:U('page')}'});" >
|
||
<input type="hidden" name="pubid" value="{$pubid}">
|
||
<!--基本信息开始-->
|
||
<div class="sub-nav-tab" style="display:block">
|
||
<div class="control-group">
|
||
<label class="control-label">页面名称</label>
|
||
<div class="controls">
|
||
<input type="text" name="name" autocomplete="off"/>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">页面标题</label>
|
||
<div class="controls">
|
||
<input type="text" name="title" autocomplete="off" class="span6"/>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
if(C('LANG_SWITCH_ON')){
|
||
?>
|
||
<div class="control-group">
|
||
<label class="control-label">语言</label>
|
||
<div class="controls">
|
||
<select name="lang">
|
||
<option value="">请选择语言</option>
|
||
<foreach name="LANG_OPT" item="v">
|
||
<option value="{$key}" {$admin_lang==$key?'selected':''}>{$v}</option>
|
||
</foreach>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
<div class="control-group">
|
||
<label class="control-label">URL<span></span></label>
|
||
<div class="controls">
|
||
<select name="path_type" class="path_type" onchange="checkpath_type()">
|
||
<option value="static">静态页:/page/pagename.html</option>
|
||
<option value="rewrite">伪静态:/page/1.html</option>
|
||
<option value="dynamic">动态页:index.php?m=home&c=page&a=index&page_id=1</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="control-group control-classpath">
|
||
<label class="control-label">保存路径<span>仅支持:英文,字母,下划线</span></label>
|
||
<div class="controls">
|
||
<input type="text" placeholder="" name="classpath" value="/page/name.html"/>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">页面模式</label>
|
||
<div class="controls" style="margin-top:4px;">
|
||
<label class="label-radio"><input type="radio" name="pagemod" value="1" {$_GET['pagemod']!=2?"checked":""} onclick="location.href='{:U('page_add',array('pagemod'=>1))}'"/>直接页面式 </label>
|
||
<label class="label-radio"><input type="radio" name="pagemod" value="2" {$_GET['pagemod']==2?"checked":""} onclick="location.href='{:U('page_add',array('pagemod'=>2))}'"/>采用模板式</label>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
if($_GET[pagemod]==2){
|
||
?>
|
||
<div class="control-group">
|
||
<label class="control-label">使用的模板</label>
|
||
<div class="controls">
|
||
<select name="template_id">
|
||
<foreach name="pagetemplate" item="v">
|
||
<option value="{$v.template_id}">{$v.name}</option>
|
||
</foreach>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
<div class="control-group">
|
||
<label class="control-label">缩略图</label>
|
||
<div class="controls">
|
||
<input type="text" name="thumb" id="thumb" class="span6 modelform_thumb"/> <button type="button" onClick="selectfile('thumb','','img')">选择图片</button>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
if($_GET[pagemod]==2){
|
||
?>
|
||
<div class="control-group newstext_control control-group-editor">
|
||
<label class="control-label">文章介绍</label>
|
||
<div class="controls">
|
||
<div class="news_editor" editor_name="pagetext" editor_width="" editor_height=""><script id="pagetext" name="pagetext" type="text/plain"></script></div>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
}else{
|
||
?>
|
||
<div class="control-group control-group-textarea">
|
||
<label class="control-label">页面内容</label>
|
||
<div class="controls">
|
||
<textarea name="pagetext" id="template_editor" class="span11" style="height:500px;"></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">变量说明</label>
|
||
<div class="controls">
|
||
<div class="div-li"><input type="text" class="span6" value="[!--sitename--]">:网站名称</div>
|
||
<div class="div-li"><input type="text" class="span6" value="[!--thumb--]">:缩略图</div>
|
||
<div class="div-li"><input type="text" class="span6" value="[!--pagetitle--]">:网页名称</div>
|
||
<div class="div-li"><input type="text" class="span6" value="[!--pagekey--]">:页面关键字</div>
|
||
<div class="div-li"><input type="text" class="span6" value="[!--pagedes--]">:页面描述</div>
|
||
<div class="div-li"><input type="text" class="span6" value="[!--pagetext--]">:网页内容</div>
|
||
<div class="div-li"><input type="text" class="span6" value="<literal>{$page.xxx}</literal>">:页面变量</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
</div>
|
||
<!--基本信息结束-->
|
||
<!--SEO字段开始-->
|
||
<div class="sub-nav-tab">
|
||
<div class="control-group">
|
||
<label class="control-label">网页标题</label>
|
||
<div class="controls">
|
||
<input type="text" name="pagetitle" autocomplete="off" placeholder="不填写默认调用标题"/>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">网页关键词</label>
|
||
<div class="controls">
|
||
<input type="text" name="pagekey" autocomplete="off" placeholder="多个用半角的逗号隔开"/>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">网页描述</label>
|
||
<div class="controls">
|
||
<textarea class="span6" name="pagedes" style="height:100px;"></textarea>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!--SEO字段结束-->
|
||
<div class="form-actions">
|
||
<button type="submit" class="btn btn-success form_submit">提交</button>
|
||
<a href="{:U('page')}" class="btn btn-danger">返回</a>
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<include file="Inc/footer"/>
|
||
<include file="Inc/info_js"/>
|
||
<!--代码编辑器插件-->
|
||
<link rel="stylesheet" type="text/css" href="/Public/Admin/codemirror/lib/codemirror.css">
|
||
<script src="/Public/Admin/codemirror/lib/codemirror.js"></script>
|
||
<link rel="stylesheet" href="/Public/Admin/codemirror/theme/abcdef.css">
|
||
<script>
|
||
var editor = CodeMirror.fromTextArea(document.getElementById("template_editor"), {
|
||
lineNumbers: true,
|
||
styleActiveLine: true,
|
||
matchBrackets: true,
|
||
theme:"abcdef",
|
||
});
|
||
function this_submit(obj,fun){
|
||
<?php
|
||
if($_GET[pagemod]==1){
|
||
?>
|
||
$("#template_editor").val(editor.getValue());
|
||
<?php
|
||
}
|
||
?>
|
||
//这里为什么要延时的原因:因为editor.getValue()这个方法获取到代码需要时间计算的,如果不延时的话提交的是一个空值
|
||
setTimeout(function(){
|
||
save_form(obj,fun);
|
||
},200);
|
||
return false;
|
||
}
|
||
function checkpath_type(){
|
||
var path_type=$(".path_type").val();
|
||
if(path_type=="static"){
|
||
$(".control-classpath").show();
|
||
}else{
|
||
$(".control-classpath").hide();
|
||
$("input[name='classpath']").val("");
|
||
}
|
||
}
|
||
checkpath_type();
|
||
</script> |