phpDocumentor table
[ class tree: table ] [ index: table ] [ all elements ]

Source for file CssTable.php

Documentation is available at CssTable.php

  1. <?
  2. /**
  3. * @package table
  4. * @filesource
  5. * @see HTML_TABLE_PAGE_PATH.'/CssTable.php'
  6. * @copyright (c) http://Finn-Rasmussen.com
  7. * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
  8. * @author http://Finn-Rasmussen.com
  9. * @version 1.9
  10. * @since 21-oct-2005
  11. */
  12.  
  13. /**
  14. * The required files
  15. */
  16. require_once(HTML_BASE_PAGE_PATH.'/Css.php');
  17.  
  18. /**
  19. * Generates the Table CSS
  20. * <code>
  21. * Usage:
  22. * $css = new CssTable($href);
  23. * print $css->getHtml();
  24. * Or:
  25. * CssTable::display($href);
  26. * </code>
  27. * @package table
  28. */
  29.  
  30. class CssTable extends Css {
  31. /**
  32. * Constructor
  33. * @param String $href The url to the css filename (i.e. /css/my.css)
  34. */
  35. function CssTable($href='') {
  36. $this->Css($href!=''?$href:CSS_FILE_NAME_TABLE);
  37. }
  38.  
  39. /**
  40. * Returns the css Table components
  41. * @return String the complete css
  42. */
  43. function getCustom() {
  44. $html = '';
  45. $html .= $this->getHeader($this->getClassName());
  46. $html .= $this->getComponent('.'.CSS_SKELETON_LEFT ,CSS_SKELETON_LEFT_COLOR ,CSS_SKELETON_LEFT_BACKGROUND,'','','',CSS_SKELETON_WIDTH_LEFT);
  47. $html .= $this->getComponent('.'.CSS_SKELETON_CENTER,CSS_SKELETON_CENTER_COLOR,CSS_SKELETON_CENTER_BACKGROUND);
  48. $html .= $this->getComponent('.'.CSS_SKELETON_RIGHT ,CSS_SKELETON_RIGHT_COLOR ,CSS_SKELETON_RIGHT_BACKGROUND,'','','',CSS_SKELETON_WIDTH_RIGHT);
  49.  
  50. $html .= $this->getBorderSingle('.'.CSS_BORDER_LEFT ,'left' ,'',CSS_1PX,CSS_BORDER_STYLE_SOLID);
  51. $html .= $this->getBorderSingle('.'.CSS_BORDER_RIGHT ,'right' ,'',CSS_1PX,CSS_BORDER_STYLE_SOLID);
  52. $html .= $this->getBorderSingle('.'.CSS_BORDER_TOP ,'top' ,'',CSS_1PX,CSS_BORDER_STYLE_SOLID);
  53. $html .= $this->getBorderSingle('.'.CSS_BORDER_BOTTOM ,'bottom' ,'',CSS_1PX,CSS_BORDER_STYLE_SOLID);
  54. // Different Views
  55. //$html .= $this->getClass('.'.CSS_BASKET_VIEW, CSS_BASKET_VIEW_COLOR ,CSS_BASKET_VIEW_BACKGROUND);
  56. //$html .= $this->getClass('.'.CSS_PAGE_VIEW, CSS_PAGE_VIEW_COLOR ,CSS_PAGE_VIEW_BACKGROUND);
  57. $html .= $this->getClass('.'.CSS_LIST_VIEW, CSS_LIST_VIEW_COLOR ,CSS_LIST_VIEW_BACKGROUND);
  58. //$html .= $this->getClass('.'.CSS_INVOICE_VIEW, CSS_INVOICE_VIEW_COLOR ,CSS_INVOICE_VIEW_BACKGROUND);
  59. //$html .= $this->getClass('.'.CSS_SHOW_VIEW, CSS_SHOW_VIEW_COLOR ,CSS_SHOW_VIEW_BACKGROUND);
  60. //$html .= $this->getClass('.'.CSS_FORM_VIEW, CSS_FORM_VIEW_COLOR ,CSS_FORM_VIEW_BACKGROUND);
  61. //$html .= $this->getClass('.'.CSS_SEARCH_VIEW, CSS_SEARCH_VIEW_COLOR ,CSS_SEARCH_VIEW_BACKGROUND);
  62. return $html;
  63. }
  64.  
  65. /**
  66. * Display html
  67. * <code>
  68. * Usage:
  69. * CssTable::display($href);
  70. * </code>
  71. * @static
  72. * @param String $href The url to the css file (i.e. /css/my.css)
  73. */
  74. function display($href='') {
  75. $html = new CssTable($href);
  76. $html->addHtml();
  77. }
  78. }
  79. ?>

Documentation generated on Thu, 22 Dec 2005 17:05:09 +0100 by phpDocumentor 1.3.0RC3