westdc-zf1/application/admin/views/scripts/news/category-add.phtml

99 lines
4.5 KiB
PHTML
Raw Normal View History

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>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目添加');
2011-09-23 07:34:40 +00:00
?>
<div class="row">
<div class="span3">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div class="span9">
<?php if (!empty($this->error)) :?>
<div id="message">
<?php echo $this->error;?>
</div>
<?php endif; ?>
<?php if(empty($this->msg)) {?>
<form id="sampleform" method="post" action="#">
<fieldset>
<legend>栏目添加</legend>
2012-11-23 09:54:37 +00:00
<p>
<label class="required" for="ctitle">栏目标题</label><br/>
<input type="text" id="ctitle" class="half" value="<?php if(!empty($this->info['title'])) echo $this->info['title'];?>" name="ctitle"/>
</p>
<p>
<label class="required" for="ptype">栏目类型</label><br/>
<select name="ptype">
<?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>
</p>
<p>
<label>父级栏目</label><br />
<select name="fid">
<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'];?>
</option>
<?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>
</p>
<p>
<label class="required" for="code">栏目URL</label><br/>
<input type="text" id="code" class="half" value="<?php if(!empty($this->info['code'])) echo $this->info['code'];?>" name="code"/>(仅小写英文字母与数字)
<small>如填写: technology 则前台访问地址为: http://westdc.westgis.ac.cn/news/technology </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>
2012-08-23 08:01:19 +00:00
</fieldset>
</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>
</div>