Source for file function.checkbox_list.php

Documentation is available at function.checkbox_list.php

  1. <?php
  2. /**
  3.  *  smarty function:チェックボックスフィルタ関数(配列対応)
  4.  *
  5.  *  @param  string  $form   チェックボックスに渡されたフォーム値
  6.  *  @param  string  $key    評価対象の配列インデックス
  7.  *  @param  string  $value  評価値
  8.  *  @deprecated
  9.  */
  10. function smarty_function_checkbox_list($params&$smarty)
  11. {
  12.     extract($params);
  13.  
  14.     if (isset($key== false{
  15.         $key null;
  16.     }
  17.     if (isset($value== false{
  18.         $value null;
  19.     }
  20.     if (isset($checked== false{
  21.         $checked "checked";
  22.     }
  23.  
  24.     if (is_null($key== false{
  25.         if (isset($form[$key])) {
  26.             if (is_null($value)) {
  27.                 print $checked;
  28.             else {
  29.                 if (strcmp($form[$key]$value== 0{
  30.                     print $checked;
  31.                 }
  32.             }
  33.         }
  34.     else if (is_null($value== false{
  35.         if (is_array($form)) {
  36.             if (in_array($value$form)) {
  37.                 print $checked;
  38.             }
  39.         else {
  40.             if (strcmp($value$form== 0{
  41.                 print $checked;
  42.             }
  43.         }
  44.     }
  45. }

Documentation generated on Fri, 11 Nov 2011 03:58:09 +0900 by phpDocumentor 1.4.3