removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / plugins / function.html_checkboxes.php
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.html_checkboxes.php b/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.html_checkboxes.php
deleted file mode 100644 (file)
index 6b32c59..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php\r
-/**\r
- * Smarty plugin\r
- * @package Smarty\r
- * @subpackage plugins\r
- */\r
-\r
-\r
-/**\r
- * Smarty {html_checkboxes} function plugin\r
- *\r
- * File:       function.html_checkboxes.php<br>\r
- * Type:       function<br>\r
- * Name:       html_checkboxes<br>\r
- * Date:       24.Feb.2003<br>\r
- * Purpose:    Prints out a list of checkbox input types<br>\r
- * Input:<br>\r
- *           - name       (optional) - string default "checkbox"\r
- *           - values     (required) - array\r
- *           - options    (optional) - associative array\r
- *           - checked    (optional) - array default not set\r
- *           - separator  (optional) - ie <br> or &nbsp;\r
- *           - output     (optional) - without this one the buttons don't have names\r
- * Examples:\r
- * <pre>\r
- * {html_checkboxes values=$ids output=$names}\r
- * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}\r
- * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}\r
- * </pre>\r
- * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}\r
- *      (Smarty online manual)\r
- * @author     Christopher Kvarme <christopher.kvarme@flashjab.com>\r
- * @author credits to Monte Ohrt <monte@ispi.net>\r
- * @version    1.0\r
- * @param array\r
- * @param Smarty\r
- * @return string\r
- * @uses smarty_function_escape_special_chars()\r
- */\r
-function smarty_function_html_checkboxes($params, &$smarty)\r
-{\r
-   require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');\r
-\r
-   $name = 'checkbox';\r
-   $values = null;\r
-   $options = null;\r
-   $selected = null;\r
-   $separator = '';\r
-   $labels = true;\r
-   $output = null;\r
\r
-   $extra = '';\r
-   \r
-   foreach($params as $_key => $_val) {\r
-      switch($_key) {\r
-      case 'name':\r
-      case 'separator':\r
-         $$_key = $_val;\r
-         break;\r
-\r
-      case 'labels':\r
-         $$_key = (bool)$_val;\r
-         break;\r
-\r
-      case 'options':\r
-         $$_key = (array)$_val;\r
-         break;\r
-\r
-      case 'values':\r
-      case 'output':\r
-         $$_key = array_values((array)$_val);\r
-        break;\r
-\r
-      case 'checked':\r
-      case 'selected':\r
-         $selected = array_values((array)$_val);\r
-         break;\r
-\r
-      case 'checkboxes':\r
-         $smarty->trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);\r
-         $options = (array)$_val;\r
-         break;\r
-\r
-      default:\r
-               if(!is_array($_val)) {\r
-                       $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';\r
-               } else {\r
-                       $smarty->trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);\r
-               }\r
-         break;\r
-      }\r
-   }\r
-\r
-   if (!isset($options) && !isset($values))\r
-      return ''; /* raise error here? */\r
-\r
-   settype($selected, 'array');\r
-   $_html_result = '';\r
-\r
-   if (is_array($options)) {\r
-\r
-      foreach ($options as $_key=>$_val)\r
-         $_html_result .= smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);\r
-\r
-\r
-   } else {\r
-      foreach ($values as $_i=>$_key) {\r
-         $_val = isset($output[$_i]) ? $output[$_i] : '';\r
-         $_html_result .= smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);\r
-      }\r
-\r
-   }\r
-\r
-   return $_html_result;\r
-\r
-}\r
-\r
-function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) {\r
-   $_output = '';\r
-   if ($labels) $_output .= '<label>';\r
-   $_output .= '<input type="checkbox" name="'\r
-      . smarty_function_escape_special_chars($name) . '[]" value="'\r
-      . smarty_function_escape_special_chars($value) . '"';\r
-\r
-   if (in_array($value, $selected)) {\r
-      $_output .= ' checked="checked"';\r
-   }\r
-   $_output .= $extra . ' />' . $output;\r
-   if ($labels) $_output .= '</label>';\r
-   $_output .=  $separator . "\n";\r
-\r
-   return $_output;\r
-}\r
-\r
-?>\r