colly_wyx
2018-04-08 7bceb97206d71add2ff3a1dd82284629a2e2aaa4
application/modules/Article/views/manager/edit.phtml
@@ -1,83 +1,54 @@
    <section class="content-header">
      <h1>
        用户管理
        文章管理
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Forms</a></li>
        <li class="active">General Elements</li>
        <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">
     <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>
              <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>
                  <p><?php echo $user['phone']?></p>
                  <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>
                  <input type="password" class="form-control" id="password" name="password" placeholder="密码为空,则不修改密码">
                </div>
                <div class="form-group">
                  <label >昵称</label>
                  <input type="text" class="form-control" id="nickname" name="nickname" value="<?php echo $user['nickname']?>" placeholder="昵称">
                </div>
                <div class="form-group">
                  <label >用户组</label>
                  <label >文章分类</label>
                  <div class="form-group">
                    <select class="form-control" name="role">
                      <option value="0">请选择用户组</option>
                      <?php foreach ($roles as $role):?>
                      <option <?php echo isset($user['role']) && $user['role'] == $role['_id']?'selected':'';?> value="<?php echo $role['_id']?>"><?php echo $role['name']?></option>
                      <?php endforeach;?>
                    <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>
                  <input type="text" class="form-control" id="refresh_frequency" name="refresh_frequency" value="<?php echo $user['refresh_frequency']?>" placeholder="刷新频率">
                  <label >文章内容</label>
                  <textarea id="content" name="content" style="height: 500px;" placeholder="文章内容"><?php echo $article['content']?></textarea>
                </div>
                <div class="form-group">
                  <label >是否上报</label>
                  <label >是否发布</label>
                  <div class="form-group">
                    <label>
                      <input type="radio" name="is_open_upload"  value="0" <?php echo $user['is_open_upload'] == 0?'checked':'';?>>否
                      <input type="radio" name="is_publish" value="0" <?php echo $article['is_publish'] == 0?'checked':'';?>>否
                    </label>
                    <label>
                      <input type="radio" name="is_open_upload" checked="checked" value="1" <?php echo $user['is_open_upload'] == 1?'checked':'';?>>是
                    </label>
                  </div>
                </div>
                <div class="form-group">
                  <label >铃音</label>
                  <div class="form-group">
                    <label>
                      <input type="radio" name="video" checked="checked" value="1" <?php echo $user['is_open_upload'] == 1?'checked':'';?>>铃音1
                    </label>
                    <label>
                      <input type="radio" name="video" value="2" <?php echo $user['is_open_upload'] == 2?'checked':'';?>>铃音2
                    </label>
                  </div>
                </div>
                <div class="form-group">
                  <label >是否冻结帐号</label>
                  <div class="form-group">
                    <label>
                      <input type="radio" name="is_lock"  value="1" <?php echo $user['is_lock'] == 1?'checked':'';?>>是
                    </label>
                    <label>
                      <input type="radio" name="is_lock" value="0" <?php echo $user['is_lock'] == 0?'checked':'';?>>否
                      <input type="radio" name="is_publish" value="1" <?php echo $article['is_publish'] == 1?'checked':'';?>>是
                    </label>
                  </div>
                </div>
@@ -92,8 +63,13 @@
    </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 $user['_id']?>'
  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>