[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/sitemgr/modules/ -> class.module_validator.inc.php (source)

   1  <?php
   2      /**************************************************************************\
   3      * eGroupWare SiteMgr - Web Content Management                              *
   4      * http://www.egroupware.org                                                *
   5      * --------------------------------------------                             *
   6      *  This program is free software; you can redistribute it and/or modify it *
   7      *  under the terms of the GNU General Public License as published by the   *
   8      *  Free Software Foundation; either version 2 of the License, or (at your  *
   9      *  option) any later version.                                              *
  10      \**************************************************************************/
  11  
  12      /* $Id: class.module_validator.inc.php 20295 2006-02-15 12:31:25Z  $ */
  13  
  14  class module_validator extends Module
  15  {
  16  	function module_validator()
  17      {
  18          $this->arguments = array(
  19              'validator_type' => array(
  20                  'type' => 'select',
  21                  'label' => lang('Choose the VALID HTML type (note: not all icons are available):'),
  22                  'options' =>array(
  23                      '1'=>'XHTML 1.1',
  24                      '2'=>'XHTML Basic 1.0',
  25                      '3'=>'XHTML 1.0 Strict',
  26                      '4'=>'XHTML 1.0 Transitional',
  27                      '5'=>'XHTML 1.0 Frameset',
  28                      '6'=>'ISO/IEC 15445:2000 (ISO-HTML)',
  29                      '7'=>'HTML 4.01 Strict',
  30                      '8'=>'HTML 4.01 Transitional',
  31                      '9'=>'HTML 4.01 Frameset',
  32                      '10'=>'HTML 3.2',
  33                      '11'=>'HTML 2.0'
  34                  )
  35              )
  36          );
  37          $this->properties = array();
  38          $this->title = lang('Validator');
  39          $this->description = lang('Helps you respect HTML/XHTML standards.');
  40      }
  41  
  42  	function get_content(&$arguments,$properties)
  43      {
  44          $icons=array(
  45                      '1'=>'valid-xhtml11',
  46                      '2'=>'valid-xhtml10',
  47                      '3'=>'valid-xhtml10',
  48                      '4'=>'valid-xhtml10',
  49                      '5'=>'valid-xhtml10',
  50                      '6'=>'valid-html401',
  51                      '7'=>'valid-html401',
  52                      '8'=>'valid-html401',
  53                      '9'=>'valid-html40',
  54                      '10'=>'valid-html32',
  55                      '11'=>'valid-html32'
  56          );
  57                      
  58          $content = '    <p>'."\n";
  59          $content .= '      <a href="http://validator.w3.org/check?uri=referer"><img border="0"'."\n";
  60          $content .= '          src="http://www.w3.org/Icons/'.
  61              $icons[$arguments["validator_type"]].'"'."\n";
  62          $content .= '          alt="Valid '.
  63              $this->arguments['validator_type']['options'].'!" height="31" width="88"></a>'."\n";
  64          $content .= '    </p>'."\n";
  65  
  66          return $content;
  67      }
  68  }


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7