2011-09-23 07:34:40 +00:00
|
|
|
|
<?php
|
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
|
$this->headTitle('后台管理');
|
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
2012-04-12 04:04:23 +00:00
|
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
2012-03-27 07:02:36 +00:00
|
|
|
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
2014-09-13 02:18:32 +00:00
|
|
|
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
2012-03-27 07:02:36 +00:00
|
|
|
|
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
|
|
|
|
|
$this->breadcrumb('栏目添加');
|
2011-09-23 07:34:40 +00:00
|
|
|
|
?>
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<div class="row">
|
2014-09-13 02:18:32 +00:00
|
|
|
|
<div class="hidden-sm hidden-xs col-md-2">
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<?= $this->partial('news/left.phtml'); ?>
|
|
|
|
|
</div>
|
2014-09-13 02:18:32 +00:00
|
|
|
|
<div class="col-md-10 col-sm-12">
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<?php if (!empty($this->error)) :?>
|
2014-09-13 02:18:32 +00:00
|
|
|
|
<div id="message" class="alert alert-info">
|
|
|
|
|
<?php echo $this->error;?>
|
|
|
|
|
</div>
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if(empty($this->msg)) {?>
|
2014-09-13 02:18:32 +00:00
|
|
|
|
<h4>栏目添加</h4>
|
|
|
|
|
<hr />
|
|
|
|
|
<form id="sampleform" method="post" action="#" class="form-horizontal">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="ctitle" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目标题:</label>
|
|
|
|
|
<div class="col-md-4 col-sm-4 col-xs-4">
|
|
|
|
|
<input type="text" id="ctitle" class="half form-control" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="ptype" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目类型:</label>
|
|
|
|
|
<div class="col-md-4 col-sm-4 col-xs-4">
|
|
|
|
|
<select name="ptype" class="form-control">
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<?php if(!empty($this->ptype)) :?>
|
|
|
|
|
<?php foreach($this->ptype as $k=>$v) : ?>
|
|
|
|
|
<?php if(empty($this->info['ptype'])) {?>
|
|
|
|
|
<option value="<?= $v ?>"><?= $k ?></option>
|
|
|
|
|
<?php }else{
|
|
|
|
|
if($this->info['ptype'] == $v)
|
|
|
|
|
{ ?>
|
|
|
|
|
<option value="<?= $v ?>" selected="selected"><?= $k ?></option>
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
<option value="<?= $v ?>"><?= $k ?></option>
|
|
|
|
|
<?php }
|
|
|
|
|
}?>
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</select>
|
2014-09-13 02:18:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="fid" class="required col-md-2 col-sm-2 col-xs-2 control-label">父级栏目:</label>
|
|
|
|
|
<div class="col-md-4 col-sm-4 col-xs-4">
|
|
|
|
|
<select name="fid" class="form-control" >
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<option value="0">无</option>
|
|
|
|
|
<?php if(!empty($this->categories)) :?>
|
|
|
|
|
<?php foreach($this->categories as $v) : ?>
|
|
|
|
|
<?php if(empty($this->info['fid'])) {?>
|
|
|
|
|
<option value="<?= $v['id'];?>">
|
|
|
|
|
<?php if(!empty($v[$this->deepField])) {echo str_repeat('-',$v[$this->deepField]);} ?>
|
|
|
|
|
<?=$v['title'];?>
|
2012-11-28 09:27:53 +00:00
|
|
|
|
</option>
|
2013-06-06 02:30:09 +00:00
|
|
|
|
<?php }else{
|
|
|
|
|
if($this->info['fid'] == $v['id'])
|
|
|
|
|
{ ?>
|
|
|
|
|
<option value="<?= $v['id'];?>" selected="selected">
|
|
|
|
|
<?php if(!empty($v[$this->deepField])) {echo str_repeat('-',$v[$this->deepField]);} ?>
|
|
|
|
|
<?= $v['title'];?>
|
|
|
|
|
</option>
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
<option value="<?= $v['id'];?>"><?= $v['title'];?></option>
|
|
|
|
|
<?php }
|
|
|
|
|
}?>
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</select>
|
2014-09-13 02:18:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="code" class="required col-md-2 col-sm-2 col-xs-2 control-label">栏目URL:</label>
|
|
|
|
|
<div class="col-md-4 col-sm-4 col-xs-4">
|
|
|
|
|
<input type="text" id="code" class="half form-control" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>
|
|
|
|
|
<h5>(仅小写英文字母与数字)</h5>
|
|
|
|
|
<h5><small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small></h5>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="title_en" class="required col-md-2 col-sm-2 col-xs-2 control-label">英文标题:</label>
|
|
|
|
|
<div class="col-md-4 col-sm-4 col-xs-4">
|
|
|
|
|
<input type="text" id="title_en" class="half form-control" value="<?php if(!empty($this->info['title_en'])) echo $this->info['title_en'];?>" name="title_en" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="" class="required col-md-2 col-sm-2 col-xs-2 control-label"></label>
|
|
|
|
|
<div class="col-md-4 col-sm-4 col-xs-4">
|
|
|
|
|
<input type="hidden" name="submit" value="1" />
|
|
|
|
|
<input type="submit" class="btn btn-primary" value="提交"/>
|
|
|
|
|
<input type="reset" class="btn btn-danger" value="重置"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2013-06-06 02:30:09 +00:00
|
|
|
|
</form>
|
|
|
|
|
<?php }else{ ?>
|
|
|
|
|
<div class="alert alert-success">
|
|
|
|
|
<a data-dismiss="alert" class="close">×</a>
|
|
|
|
|
<?php echo $this->msg ?>
|
|
|
|
|
</div>
|
|
|
|
|
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</div>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
</div>
|