4 files added
4 files modified
| | |
| | | * 查看新闻 |
| | | * @param [type] $id [description] |
| | | */ |
| | | public function LookAction(){ |
| | | $id = $this->get('id'); |
| | | if(!empty($id)){ |
| | | $article = $this->article_service->getArticleInfo(array('_id' => $id)); |
| | | if($article){ |
| | | $this->getView()->assign('article', $article); |
| | | } |
| | | else{ |
| | | $this->redirect('/error/show/type/no_data'); |
| | | } |
| | | public function LookAction($id){ |
| | | $article_service = new Service_Article(); |
| | | $article = $article_service->getArticleInfo(array('_id' => $id)); |
| | | if($article){ |
| | | $this->getView()->assign('article', $article); |
| | | } |
| | | else{ |
| | | $this->redirect('/error/show/type/not_found'); |
| | | } |
| | | $this->redirect('/error/show/type/no_data'); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | <li class="item">
|
| | | <i class="fa fa-file-text-o">
|
| | | </i>
|
| | | <a href="/admin/index/look/id/<?php echo $system_new['_id']?>">
|
| | | <?php echo $system_new['name']?>
|
| | | <span class=" pull-right">[<?php echo $system_new['create_time']?>]</span>
|
| | | </a>
|
| | | </li>
|
| | |
|
| | | <?php endforeach;?>
|
| | |
| | | <li class="item">
|
| | | <i class="fa fa-file-text-o">
|
| | | </i>
|
| | | <a href="/admin/index/look/id/<?php echo $system_new['_id']?>">
|
| | | <?php echo $industry_new['name']?>
|
| | | <span class=" pull-right">[<?php echo $industry_new['create_time']?>]</span>
|
| | | </a>
|
| | | </li>
|
| | |
|
| | | <?php endforeach;?>
|
| | |
| | | <li class="item">
|
| | | <i class="fa fa-file-text-o">
|
| | | </i>
|
| | | <a href="/admin/index/look/id/<?php echo $system_new['_id']?>">
|
| | | <?php echo $ffs_new['name']?>
|
| | | <span class=" pull-right">[<?php echo $ffs_new['create_time']?>]</span>
|
| | | </a>
|
| | | </li>
|
| | |
|
| | | <?php endforeach;?>
|
| | |
| | | <li class="item">
|
| | | <i class="fa fa-file-text-o">
|
| | | </i>
|
| | | <a href="/admin/index/look/id/<?php echo $system_new['_id']?>">
|
| | | <?php echo $my_new['name']?>
|
| | | <span class=" pull-right">[<?php echo $my_new['create_time']?>]</span>
|
| | | </a>
|
| | | </li>
|
| | |
|
| | | <?php endforeach;?>
|
| | |
| | | <h3 class="box-title">文章详情</h3> |
| | | |
| | | <div class="box-tools pull-right"> |
| | | <a href="#" class="btn btn-box-tool" data-toggle="tooltip" title="Previous"><i class="fa fa-chevron-left">返回</i></a> |
| | | <a href="javascript:history.go(-1);" class="btn btn-box-tool" data-toggle="tooltip" title="Previous"><i class="fa fa-chevron-left">返回</i></a> |
| | | </div> |
| | | </div> |
| | | <!-- /.box-header --> |
| | | <div class="box-body no-padding"> |
| | | <div class="mailbox-read-info"> |
| | | <h3>Message Subject Is Placed Here</h3> |
| | | <h5>From: help@example.com |
| | | <span class="mailbox-read-time pull-right">15 Feb. 2016 11:03 PM</span></h5> |
| | | <h3 style="text-align: center;"><?php echo $article['name']?></h3> |
| | | <h5 style="text-align: center; padding-top: 20px;">发布者: [管理员] 发布时间: [<?php echo $article['create_time']?>]</span></h5> |
| | | </div> |
| | | <!-- /.mailbox-controls --> |
| | | <div class="mailbox-read-message"> |
| | | <p>Hello John,</p> |
| | | |
| | | <p>Keffiyeh blog actually fashion axe vegan, irony biodiesel. Cold-pressed hoodie chillwave put a bird |
| | | on it aesthetic, bitters brunch meggings vegan iPhone. Dreamcatcher vegan scenester mlkshk. Ethical |
| | | master cleanse Bushwick, occupy Thundercats banjo cliche ennui farm-to-table mlkshk fanny pack |
| | | gluten-free. Marfa butcher vegan quinoa, bicycle rights disrupt tofu scenester chillwave 3 wolf moon |
| | | asymmetrical taxidermy pour-over. Quinoa tote bag fashion axe, Godard disrupt migas church-key tofu |
| | | blog locavore. Thundercats cronut polaroid Neutra tousled, meh food truck selfies narwhal American |
| | | Apparel.</p> |
| | | |
| | | <p>Raw denim McSweeney's bicycle rights, iPhone trust fund quinoa Neutra VHS kale chips vegan PBR&B |
| | | literally Thundercats +1. Forage tilde four dollar toast, banjo health goth paleo butcher. Four dollar |
| | | toast Brooklyn pour-over American Apparel sustainable, lumbersexual listicle gluten-free health goth |
| | | umami hoodie. Synth Echo Park bicycle rights DIY farm-to-table, retro kogi sriracha dreamcatcher PBR&B |
| | | flannel hashtag irony Wes Anderson. Lumbersexual Williamsburg Helvetica next level. Cold-pressed |
| | | slow-carb pop-up normcore Thundercats Portland, cardigan literally meditation lumbersexual crucifix. |
| | | Wayfarers raw denim paleo Bushwick, keytar Helvetica scenester keffiyeh 8-bit irony mumblecore |
| | | whatever viral Truffaut.</p> |
| | | |
| | | <p>Post-ironic shabby chic VHS, Marfa keytar flannel lomo try-hard keffiyeh cray. Actually fap fanny |
| | | pack yr artisan trust fund. High Life dreamcatcher church-key gentrify. Tumblr stumptown four dollar |
| | | toast vinyl, cold-pressed try-hard blog authentic keffiyeh Helvetica lo-fi tilde Intelligentsia. Lomo |
| | | locavore salvia bespoke, twee fixie paleo cliche brunch Schlitz blog McSweeney's messenger bag swag |
| | | slow-carb. Odd Future photo booth pork belly, you probably haven't heard of them actually tofu ennui |
| | | keffiyeh lo-fi Truffaut health goth. Narwhal sustainable retro disrupt.</p> |
| | | |
| | | <p>Skateboard artisan letterpress before they sold out High Life messenger bag. Bitters chambray |
| | | leggings listicle, drinking vinegar chillwave synth. Fanny pack hoodie American Apparel twee. American |
| | | Apparel PBR listicle, salvia aesthetic occupy sustainable Neutra kogi. Organic synth Tumblr viral |
| | | plaid, shabby chic single-origin coffee Etsy 3 wolf moon slow-carb Schlitz roof party tousled squid |
| | | vinyl. Readymade next level literally trust fund. Distillery master cleanse migas, Vice sriracha |
| | | flannel chambray chia cronut.</p> |
| | | <p>Hello John,</p> |
| | | |
| | | <p>Keffiyeh blog actually fashion axe vegan, irony biodiesel. Cold-pressed hoodie chillwave put a bird |
| | | on it aesthetic, bitters brunch meggings vegan iPhone. Dreamcatcher vegan scenester mlkshk. Ethical |
| | | master cleanse Bushwick, occupy Thundercats banjo cliche ennui farm-to-table mlkshk fanny pack |
| | | gluten-free. Marfa butcher vegan quinoa, bicycle rights disrupt tofu scenester chillwave 3 wolf moon |
| | | asymmetrical taxidermy pour-over. Quinoa tote bag fashion axe, Godard disrupt migas church-key tofu |
| | | blog locavore. Thundercats cronut polaroid Neutra tousled, meh food truck selfies narwhal American |
| | | Apparel.</p> |
| | | |
| | | <p>Raw denim McSweeney's bicycle rights, iPhone trust fund quinoa Neutra VHS kale chips vegan PBR&B |
| | | literally Thundercats +1. Forage tilde four dollar toast, banjo health goth paleo butcher. Four dollar |
| | | toast Brooklyn pour-over American Apparel sustainable, lumbersexual listicle gluten-free health goth |
| | | umami hoodie. Synth Echo Park bicycle rights DIY farm-to-table, retro kogi sriracha dreamcatcher PBR&B |
| | | flannel hashtag irony Wes Anderson. Lumbersexual Williamsburg Helvetica next level. Cold-pressed |
| | | slow-carb pop-up normcore Thundercats Portland, cardigan literally meditation lumbersexual crucifix. |
| | | Wayfarers raw denim paleo Bushwick, keytar Helvetica scenester keffiyeh 8-bit irony mumblecore |
| | | whatever viral Truffaut.</p> |
| | | |
| | | <p>Post-ironic shabby chic VHS, Marfa keytar flannel lomo try-hard keffiyeh cray. Actually fap fanny |
| | | pack yr artisan trust fund. High Life dreamcatcher church-key gentrify. Tumblr stumptown four dollar |
| | | toast vinyl, cold-pressed try-hard blog authentic keffiyeh Helvetica lo-fi tilde Intelligentsia. Lomo |
| | | locavore salvia bespoke, twee fixie paleo cliche brunch Schlitz blog McSweeney's messenger bag swag |
| | | slow-carb. Odd Future photo booth pork belly, you probably haven't heard of them actually tofu ennui |
| | | keffiyeh lo-fi Truffaut health goth. Narwhal sustainable retro disrupt.</p> |
| | | |
| | | <p>Skateboard artisan letterpress before they sold out High Life messenger bag. Bitters chambray |
| | | leggings listicle, drinking vinegar chillwave synth. Fanny pack hoodie American Apparel twee. American |
| | | Apparel PBR listicle, salvia aesthetic occupy sustainable Neutra kogi. Organic synth Tumblr viral |
| | | plaid, shabby chic single-origin coffee Etsy 3 wolf moon slow-carb Schlitz roof party tousled squid |
| | | vinyl. Readymade next level literally trust fund. Distillery master cleanse migas, Vice sriracha |
| | | flannel chambray chia cronut.</p> |
| | | |
| | | <p>Thanks,<br>Jane</p> |
| | | <?php echo $article['content']?> |
| | | </div> |
| | | <!-- /.mailbox-read-message --> |
| | | </div> |
| | | <!-- /.box-footer --> |
| | | <div class="box-footer"> |
| | | <div class="pull-right"> |
| | | <button type="button" class="btn btn-default"><i class="fa fa-reply"></i> 返回</button> |
| | | <a href="javascript:history.go(-1);"><button type="button" class="btn btn-default"><i class="fa fa-reply"></i> 返回</button></a> |
| | | </div> |
| | | </div> |
| | | <!-- /.box-footer --> |
| | |
| | | <!-- User Account: style can be found in dropdown.less --> |
| | | <li class="dropdown user user-menu"> |
| | | <a href="#" class="dropdown-toggle" data-toggle="dropdown"> |
| | | <img src="/themes/AdminLTE/dist/img/user2-160x160.jpg" class="user-image" alt="User Image"> |
| | | <img src="/themes/AdminLTE/dist/img/avatar.jpg" class="user-image" alt="User Image"> |
| | | <?php $session = Yaf_Session::getInstance();?> |
| | | <span class="hidden-xs"><?php echo $session['user']['nickname']?></span> |
| | | </a> |
| | | <ul class="dropdown-menu"> |
| | | <!-- User image --> |
| | | <li class="user-header"> |
| | | <img src="/themes/AdminLTE/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image"> |
| | | <img src="/themes/AdminLTE/dist/img/avatar.jpg" class="img-circle" alt="User Image"> |
| | | |
| | | <p> |
| | | <?php echo $session['user']['nickname']?> - <?php echo $session['user']['role_name']?> |
New file |
| | |
| | | var validator_config = { |
| | | message: '输入框内容不能为空', |
| | | feedbackIcons: { |
| | | valid: 'glyphicon glyphicon-ok', |
| | | invalid: 'glyphicon glyphicon-remove', |
| | | validating: 'glyphicon glyphicon-refresh' |
| | | }, |
| | | fields:{ |
| | | name:{ |
| | | validators:{ |
| | | notEmpty: { |
| | | message: '文章标题不能为空', |
| | | }, |
| | | } |
| | | }, |
| | | category: { |
| | | validators: { |
| | | callback: { |
| | | message: '请选择文章类别', |
| | | callback: function(value, validator){ |
| | | if(value == 0){ |
| | | return false; |
| | | } |
| | | else{ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | content: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请填写文章内容', |
| | | } |
| | | } |
| | | }, |
| | | is_publish: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择是否发布文章' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | var ue = UE.getEditor('content'); |
| | | |
| | | $('#validateform').bootstrapValidator(validator_config).on('success.form.bv', function(e) { |
| | | e.preventDefault(); |
| | | |
| | | $("#dosubmit").attr("disabled","disabled"); |
| | | $.scojs_message('请稍候...', $.scojs_message.TYPE_WAIT); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: SITE_URL+"/article/manager/add", |
| | | data: $("#validateform").serialize(), |
| | | success:function(response){ |
| | | var dataObj=jQuery.parseJSON(response); |
| | | if(dataObj.code == 200) |
| | | { |
| | | $.scojs_message('操作成功,3秒后将返回列表页...', $.scojs_message.TYPE_OK); |
| | | setTimeout(function(){window.location.href = SITE_URL+'/article/manager/list';}, 1800); |
| | | }else |
| | | { |
| | | $.scojs_message(dataObj.content, $.scojs_message.TYPE_ERROR); |
| | | $("#dosubmit").removeAttr("disabled"); |
| | | } |
| | | }, |
| | | error: function (request, status, error) { |
| | | $.scojs_message(request.responseText, $.scojs_message.TYPE_ERROR); |
| | | $("#dosubmit").removeAttr("disabled"); |
| | | } |
| | | }); |
| | | |
| | | }).on('error.form.bv',function(e){ $.scojs_message('登录中遇到错误,请按照提示修改', $.scojs_message.TYPE_ERROR);$("#dosubmit").removeAttr("disabled");}); |
New file |
| | |
| | | var validator_config = { |
| | | message: '输入框内容不能为空', |
| | | feedbackIcons: { |
| | | valid: 'glyphicon glyphicon-ok', |
| | | invalid: 'glyphicon glyphicon-remove', |
| | | validating: 'glyphicon glyphicon-refresh' |
| | | }, |
| | | fields:{ |
| | | name:{ |
| | | validators:{ |
| | | notEmpty: { |
| | | message: '文章标题不能为空', |
| | | }, |
| | | } |
| | | }, |
| | | category: { |
| | | validators: { |
| | | callback: { |
| | | message: '请选择文章类别', |
| | | callback: function(value, validator){ |
| | | if(value == 0){ |
| | | return false; |
| | | } |
| | | else{ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | content: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请填写文章内容', |
| | | } |
| | | } |
| | | }, |
| | | is_publish: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择是否发布文章' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | $('#validateform').bootstrapValidator(validator_config).on('success.form.bv', function(e) { |
| | | e.preventDefault(); |
| | | |
| | | $("#dosubmit").attr("disabled","disabled"); |
| | | $.scojs_message('请稍候...', $.scojs_message.TYPE_WAIT); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: SITE_URL+"/article/manager/edit/id/"+ID, |
| | | data: $("#validateform").serialize(), |
| | | success:function(response){ |
| | | var dataObj=jQuery.parseJSON(response); |
| | | if(dataObj.code == 200) |
| | | { |
| | | $.scojs_message('操作成功,3秒后将返回列表页...', $.scojs_message.TYPE_OK); |
| | | setTimeout(function(){window.location.href = SITE_URL+'/article/manager/list';}, 1800); |
| | | }else |
| | | { |
| | | $.scojs_message(dataObj.content, $.scojs_message.TYPE_ERROR); |
| | | $("#dosubmit").removeAttr("disabled"); |
| | | } |
| | | }, |
| | | error: function (request, status, error) { |
| | | $.scojs_message(request.responseText, $.scojs_message.TYPE_ERROR); |
| | | $("#dosubmit").removeAttr("disabled"); |
| | | } |
| | | }); |
| | | |
| | | }).on('error.form.bv',function(e){ $.scojs_message('登录中遇到错误,请按照提示修改', $.scojs_message.TYPE_ERROR);$("#dosubmit").removeAttr("disabled");}); |
New file |
| | |
| | | var validator_config = { |
| | | message: '输入框内容不能为空', |
| | | feedbackIcons: { |
| | | valid: 'glyphicon glyphicon-ok', |
| | | invalid: 'glyphicon glyphicon-remove', |
| | | validating: 'glyphicon glyphicon-refresh' |
| | | }, |
| | | fields:{ |
| | | nickname: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请输入用户昵称' |
| | | } |
| | | } |
| | | }, |
| | | refresh_frequency: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请输入刷新频率' |
| | | } |
| | | } |
| | | }, |
| | | is_open_upload: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择是否上传数据' |
| | | } |
| | | } |
| | | }, |
| | | video: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择手机铃音' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | $('#validateform').bootstrapValidator(validator_config).on('success.form.bv', function(e) { |
| | | e.preventDefault(); |
| | | |
| | | $("#dosubmit").attr("disabled","disabled"); |
| | | $.scojs_message('请稍候...', $.scojs_message.TYPE_WAIT); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: SITE_URL+"/user/user/my/", |
| | | data: $("#validateform").serialize(), |
| | | success:function(response){ |
| | | var dataObj=jQuery.parseJSON(response); |
| | | if(dataObj.code == 200) |
| | | { |
| | | $.scojs_message('操作成功,3秒后将重新登录', $.scojs_message.TYPE_OK); |
| | | setTimeout(function(){window.location.href = SITE_URL+'/public/user/logout';}, 1800); |
| | | }else |
| | | { |
| | | $.scojs_message(dataObj.content, $.scojs_message.TYPE_ERROR); |
| | | $("#dosubmit").removeAttr("disabled"); |
| | | } |
| | | }, |
| | | error: function (request, status, error) { |
| | | $.scojs_message(request.responseText, $.scojs_message.TYPE_ERROR); |
| | | $("#dosubmit").removeAttr("disabled"); |
| | | } |
| | | }); |
| | | |
| | | }).on('error.form.bv',function(e){ $.scojs_message('登录中遇到错误,请按照提示修改', $.scojs_message.TYPE_ERROR);$("#dosubmit").removeAttr("disabled");}); |