- <?
- /**
- * @package form
- * @filesource
- * @see HTML_FORM_PAGE_PATH.'/CssForm.php'
- * @copyright (c) http://Finn-Rasmussen.com
- * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
- * @author http://Finn-Rasmussen.com
- * @version 1.9
- * @since 21-oct-2005
- */
-
- /**
- * The required files
- */
- require_once(HTML_BASE_PAGE_PATH.'/Css.php');
-
- /**
- * Generates the Form CSS
- * <code>
- * Usage:
- * $css = new CssForm($href);
- * print $css->getHtml();
- * Or:
- * CssForm::display($href);
- * </code>
- * @package form
- */
-
- class CssForm extends Css {
- /**
- * Constructor
- * @param String $href The url to the css filename (i.e. /css/my.css)
- */
- function CssForm($href='') {
- $this->Css($href!=''?$href:CSS_FILE_NAME_FORM);
- }
-
- /**
- * Returns the css Form components
- * @return String the complete css
- */
- function getCustom() {
- $html = '';
- $html .= $this->getHeader($this->getClassName());
- // input tag
- $html .= $this->getTag('input,select,option,textarea',CSS_BODY_COLOR,CSS_BODY_BACKGROUND, CSS_FONT_FAMILY, CSS_FONT_SIZE, CSS_TEXT_ALIGN);
-
- // The width of the html elements
- $html .= $this->getWidth('.'.CSS_XXX_SMALL,CSS_WIDTH_XXX_SMALL);
- $html .= $this->getWidth('.'.CSS_XX_SMALL ,CSS_WIDTH_XX_SMALL);
- $html .= $this->getWidth('.'.CSS_X_SMALL ,CSS_WIDTH_X_SMALL);
- $html .= $this->getWidth('.'.CSS_SMALL ,CSS_WIDTH_SMALL);
- $html .= $this->getWidth('.'.CSS_MEDIUM ,CSS_WIDTH_MEDIUM);
- $html .= $this->getWidth('.'.CSS_LARGE ,CSS_WIDTH_LARGE);
- $html .= $this->getWidth('.'.CSS_X_LARGE ,CSS_WIDTH_X_LARGE);
- $html .= $this->getWidth('.'.CSS_XX_LARGE ,CSS_WIDTH_XX_LARGE);
- $html .= $this->getWidth('.'.CSS_XXX_LARGE,CSS_WIDTH_XXX_LARGE);
- //
- // Buttons
- $html .= $this->getButton('.'.CSS_BUTTON.','.
- '.'.CSS_BUTTON_DELETE.','.
- '.'.CSS_BUTTON_BGN.','.
- '.'.CSS_BUTTON_DBN.','.
- '.'.CSS_BUTTON_DANKORT.','.
- '.'.CSS_BUTTON_BEE.','.
- '.'.CSS_BUTTON_SMS,
- CSS_BUTTON_COLOR,CSS_BUTTON_BACKGROUND);
- // Border
- $html .= $this->getBorder('.'.CSS_BUTTON.','.
- '.'.CSS_BUTTON_DELETE.','.
- '.'.CSS_BUTTON_BGN.','.
- '.'.CSS_BUTTON_DBN.','.
- '.'.CSS_BUTTON_DANKORT.','.
- '.'.CSS_BUTTON_BEE.','.
- '.'.CSS_BUTTON_SMS);
- //
- $css_path = CSS_PATH.CSS_IMAGES; //
- $ButtonBackgroundImage = "bar3.gif";
- $deleteBackgroundImage = "delete.gif";
- $bgbankBackgroundImage = "payment/bgbank.gif";
- $danskebankBackgroundImage = "payment/danskebank.gif";
- $dankortBackgroundImage = "payment/dankort.gif";
- $aniBeeBackgroundImage = "aniBee.gif";
- $searchxBackgroundImage = "searchx.gif";
- //
- $html .= $this->getImage ('.'.CSS_BUTTON,"$css_path/$ButtonBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage ('.'.CSS_BUTTON_DELETE,"$css_path/$deleteBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage ('.'.CSS_BUTTON_BGN,"$css_path/$bgbankBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage ('.'.CSS_BUTTON_DBN,"$css_path/$danskebankBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage ('.'.CSS_BUTTON_DANKORT,"$css_path/$dankortBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage ('.'.CSS_BUTTON_BEE,"$css_path/$aniBeeBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage ('.'.CSS_BUTTON_SMS,"$css_path/$searchxBackgroundImage",CSS_NO_REPEAT);
- $html .= $this->getImage('.'.CSS_SEARCH_SUBMIT,"$css_path/$searchxBackgroundImage",CSS_NO_REPEAT);
- return $html;
- }
-
- /**
- * Display html
- * <code>
- * Usage:
- * CssForm::display($href);
- * </code>
- * @static
- * @param String $href The url to the css file (i.e. /css/my.css)
- */
- function display($href='') {
- $html = new CssForm($href);
- $html->addHtml();
- }
- }
- ?>