Subversion Repositories phpLibraryV2

Rev

Rev 39 | Rev 43 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 41
Line 235... Line 235...
235
      */
235
      */
236
   
236
   
237
      function htmlCheckBoxes ( $parameters ) {
237
      function htmlCheckBoxes ( $parameters ) {
238
         if ( empty( $parameters['template'] ) ) { // they did not send us a template
238
         if ( empty( $parameters['template'] ) ) { // they did not send us a template
239
            if ( empty( $parameters['arrayName'] ) ) {
239
            if ( empty( $parameters['arrayName'] ) ) {
240
               $parameters['template'] = "<input type='checkbox' id='~~id~~' name='~~id~~' ~~checked~~>\n<label for='~~id~~'>~~name~~</label>\n";
240
               $parameters['template'] = "<li><input type='checkbox' id='~~id~~' name='~~id~~' ~~checked~~>\n<label for='~~id~~'>~~name~~</label></li>\n";
241
            } else {
241
            } else {
242
               $parameters['template'] = "<input type='checkbox' id='$parameters[arrayName]~~id~~' name='$parameters[arrayName][~~id~~]' ~~checked~~>\n<label for='~~id~~'>~~name~~</label>\n";
242
               $parameters['template'] = "<li><input type='checkbox' id='$parameters[arrayName]~~id~~' name='$parameters[arrayName][~~id~~]' ~~checked~~>\n<label for='~~id~~'>~~name~~</label></li>\n";
243
            }
243
            }
244
         }
244
         }
245
         //print "<pre>" . print_r($parameters, true) . "</pre>"; die;
245
         //print "<pre>" . print_r($parameters, true) . "</pre>"; die;
246
         if ( empty( $parameters['data'] ) ) {
246
         if ( empty( $parameters['data'] ) ) {
247
            if ( empty( $parameters['query'] ) )
247
            if ( empty( $parameters['query'] ) )
Line 262... Line 262...
262
               'name' => $value['name'], 
262
               'name' => $value['name'], 
263
               'checked' => $value['checked'] ? 'checked' : ''
263
               'checked' => $value['checked'] ? 'checked' : ''
264
               );
264
               );
265
            $html[] = $this->templateReplace($parameters['template'],$replacement);
265
            $html[] = $this->templateReplace($parameters['template'],$replacement);
266
         }
266
         }
267
         return implode( '', $html );
267
         return '<ul>' . implode( '', $html ) . '</ul>';
268
      }
268
      }
269
      
269
      
270
      /**
270
      /**
271
       * Replaces instances of replacement strings in string
271
       * Replaces instances of replacement strings in string
272
       * 
272
       *