colly_wyx
2018-05-29 d479d9fbcb37f8b861031c94a83d0e37761210c5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
 
    <section class="content-header">
      <h1>
        文章管理
      </h1>
      <ol class="breadcrumb">
        <li><a href="/admin/index/index"><i class="fa fa-dashboard"></i> 平台首页</a></li>
        <li><a href="/article/manager/list">文章管理</a></li>
        <li class="active">修改文章</li>
      </ol>
    </section>
    <!-- Main content -->
     <section class="content">
        <div class="box-body pad">
          <!-- general form elements -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">添加文章</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form role="form" id="validateform">
              <div class="box-body">
                <div class="form-group">
                  <label >文章标题</label>
                  <input type="text" class="form-control" id="name" name="name" placeholder="文章标题" value="<?php echo $article['name'];?>">
                </div>
                <div class="form-group">
                  <label >文章分类</label>
                  <div class="form-group">
                    <select class="form-control" name="category">
                      <option value="0">请选择文章分类</option>
                      <option value="1" <?php echo $article['category'] == 1?'selected':'';?>>平台通知</option>
                      <option value="2" <?php echo $article['category'] == 2?'selected':'';?>>行业资讯</option>
                      <option value="3" <?php echo $article['category'] == 3?'selected':'';?>>防辐射知识</option>
                      <option value="4" <?php echo $article['category'] == 4?'selected':'';?>>母婴知识</option>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label >文章内容</label>
                  <textarea id="content" name="content" style="height: 500px;" placeholder="文章内容"><?php echo $article['content']?></textarea>
                </div>
                <div class="form-group">
                  <label >是否发布</label>
                  <div class="form-group">
                    <label>
                      <input type="radio" name="is_publish" value="0" <?php echo $article['is_publish'] == 0?'checked':'';?>>否
                    </label>
                    <label>
                      <input type="radio" name="is_publish" value="1" <?php echo $article['is_publish'] == 1?'checked':'';?>>是
                    </label>
                  </div>
                </div>
              </div>
              <!-- /.box-body -->
 
              <div class="box-footer">
                <button type="submit" class="btn btn-primary" id="dosubmit">保存</button>
              </div>
            </form>
          </div>
    </div>
  </section>
  <script src="/themes/AdminLTE/bootstrap/js/bootstrapValidator.min.js"></script>
    <script src="/themes/ueditor/ueditor.config.js"></script>
  <script src="/themes/ueditor/ueditor.all.min.js"></script>
  <script src="/themes/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
  var SITE_URL = '<?php echo Yaf_Registry::get('var')['site_url']; ?>';
  var ID = '<?php echo $article['_id']?>'
  var ue = UE.getEditor('content');
  //ue.setContent();
</script>
<script src="/static/<?php echo $route['module']?>/<?php echo $route['controller']?>/js/<?php echo $route['action']?>.js"></script>