article.php 834 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * 文章
  4. * 好商城V3 - 33HAO.COM
  5. *
  6. **/
  7. defined('InShopNC') or exit('Access Invalid!');
  8. class articleControl extends mobileControl
  9. {
  10. public function __construct() {
  11. parent::__construct();
  12. }
  13. public function showOp()
  14. {
  15. if(!empty($_GET['article_id']) && intval($_GET['article_id']) > 0)
  16. {
  17. $article_model = Model('cms_article');
  18. $article = $article_model->getOne(array('article_id' => intval($_GET['article_id'])));
  19. if (empty($article)) {
  20. return self::outerr(errcode::ErrParamter,'文章不存在');
  21. }
  22. else {
  23. return self::outsuccess(array('article' => $article),'article/show','wap');
  24. }
  25. }
  26. else {
  27. return self::outerr(errcode::ErrParamter,'文章不存在');
  28. }
  29. }
  30. }