block_line.php 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: block_line.php 23608 2011-07-27 08:10:07Z cnteacher $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. require_once libfile('commonblock_html', 'class/block/html');
  12. class block_line extends commonblock_html {
  13. function block_line() {}
  14. function name() {
  15. return lang('blockclass', 'blockclass_html_script_line');
  16. }
  17. function getsetting() {
  18. global $_G;
  19. $settings = array(
  20. 'style' => array(
  21. 'title' => 'line_style',
  22. 'type' => 'mradio',
  23. 'value' => array(
  24. array('dash', 'line_style_dash'),
  25. array('line', 'line_style_line'),
  26. ),
  27. 'default' => 'dash'
  28. )
  29. );
  30. return $settings;
  31. }
  32. function getdata($style, $parameter) {
  33. $class = $parameter['style'] == 'line' ? 'l' : 'da';
  34. $return = "<hr class='$class' />";
  35. return array('html' => $return, 'data' => null);
  36. }
  37. }
  38. ?>