2011-09-23 07:34:40 +00:00
|
|
|
|
<?php
|
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
|
$this->headTitle('后台管理');
|
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
2012-03-27 07:02:36 +00:00
|
|
|
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
2012-08-23 08:01:19 +00:00
|
|
|
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
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>');
|
|
|
|
|
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
|
|
|
|
|
$this->breadcrumb('栏目添加');
|
2011-09-23 07:34:40 +00:00
|
|
|
|
?>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<div id="leftPanel">
|
|
|
|
|
<?= $this->partial('news/left.phtml'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="rightPanel">
|
2012-11-06 03:19:24 +00:00
|
|
|
|
|
|
|
|
|
<?php if (!empty($this->error)) :?>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<div id="message">
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<?php echo $this->error;?>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
</div>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if(empty($this->msg)) {?>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<form id="sampleform" method="post" action="#">
|
2011-09-23 07:34:40 +00:00
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<fieldset>
|
2012-04-09 07:50:57 +00:00
|
|
|
|
<legend>栏目添加</legend>
|
2011-09-23 07:34:40 +00:00
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<p>
|
|
|
|
|
<label class="required" for="ctitle">栏目标题:</label><br/>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<input type="text" id="ctitle" class="half" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
</p>
|
|
|
|
|
|
2012-08-23 08:01:19 +00:00
|
|
|
|
<p>
|
|
|
|
|
<label>父级栏目</label><br />
|
|
|
|
|
<select name="fid">
|
|
|
|
|
<option value="0">无</option>
|
|
|
|
|
<?php if(!empty($this->categories)) :?>
|
|
|
|
|
<?php foreach($this->categories as $v) : ?>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<?php if(empty($this->info['fid'])) {?>
|
2012-08-23 08:01:19 +00:00
|
|
|
|
<option value="<?= $v['id'];?>"><?= $v['title'];?></option>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<?php }else{
|
|
|
|
|
if($this->info['fid'] == $v['id'])
|
|
|
|
|
{ ?>
|
|
|
|
|
<option value="<?= $v['id'];?>" selected="selected"><?= $v['title'];?></option>
|
|
|
|
|
<?php }else{?>
|
|
|
|
|
<option value="<?= $v['id'];?>"><?= $v['title'];?></option>
|
|
|
|
|
<?php }
|
|
|
|
|
}?>
|
2012-08-23 08:01:19 +00:00
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</p>
|
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<p>
|
|
|
|
|
<label class="required" for="ctitle">栏目URL:</label><br/>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<input type="text" id="url" class="half" value="<?php if(!empty($this->info['url'])) echo $this->info['url'];?>" name="url"/>(仅小写英文字母与数字)
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </small>
|
|
|
|
|
</p>
|
2011-09-23 07:34:40 +00:00
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<p>
|
|
|
|
|
<label class="required" for="keyword">关键字:</label><br/>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<input type="text" id="keyword" class="half" value="<?php if(!empty($this->info['keywords'])) echo $this->info['keywords'];?>" name="keyword"/>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<small>e.g. 高程,气象,地理</small>
|
|
|
|
|
</p>
|
2011-09-23 07:34:40 +00:00
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<p>
|
|
|
|
|
<label class="required" for="discript">描述:</label><br/>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<textarea id="discript" class="medium half" name="description">
|
|
|
|
|
<?php if(!empty($this->info['description'])) echo $this->info['description'];?>
|
|
|
|
|
</textarea>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
<small>80个汉字以内,不能使用折行</small>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<input type="hidden" name="submit" value="1" />
|
|
|
|
|
|
|
|
|
|
<p class="box"><input type="submit" class="btn btn-green big" value="提交"/> or <input type="reset" class="btn" value="重置"/></p>
|
2011-09-23 07:34:40 +00:00
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
</fieldset>
|
2011-09-23 07:34:40 +00:00
|
|
|
|
|
2012-03-27 07:02:36 +00:00
|
|
|
|
</form>
|
2012-11-06 03:19:24 +00:00
|
|
|
|
<?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 } ?>
|
2012-03-27 07:02:36 +00:00
|
|
|
|
</div>
|