article.php 618 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * @copyright (c) 2011 aircheng.com
  4. * @file article.php
  5. * @brief 关于文章管理
  6. * @author chendeshan
  7. * @date 2011-02-14
  8. * @version 0.6
  9. */
  10. /**
  11. * @class article
  12. * @brief 文章管理模块
  13. */
  14. class Article
  15. {
  16. //显示标题
  17. public static function showTitle($title,$color=null,$fontStyle=null)
  18. {
  19. $str='<span style="';
  20. if($color!=null) $str.='color:'.$color.';';
  21. if($fontStyle!=null)
  22. {
  23. switch($fontStyle)
  24. {
  25. case "1":
  26. $str.='font-weight:bold;';
  27. break;
  28. case "2":
  29. $str.='font-style:oblique;';
  30. break;
  31. }
  32. }
  33. $str.='">'.$title.'</span>';
  34. return $str;
  35. }
  36. }