Line 223... |
Line 223... |
223 |
* 'checked' -- boolean (or 0/1) saying whether this has a check
|
223 |
* 'checked' -- boolean (or 0/1) saying whether this has a check
|
224 |
*
|
224 |
*
|
225 |
* of $parameters['data'] is not set and $parameters['query'] is set
|
225 |
* of $parameters['data'] is not set and $parameters['query'] is set
|
226 |
* the query will be run. It MUST contain the column names listed above.
|
226 |
* the query will be run. It MUST contain the column names listed above.
|
227 |
*
|
227 |
*
|
- |
|
228 |
* If $parameters['template'] is set, that template will be used. If it
|
- |
|
229 |
* is not set, a template will be defaulted to.
|
- |
|
230 |
*
|
- |
|
231 |
* If $paramters['arrayName'] is set, the form of the template will be
|
- |
|
232 |
* name='arrayname[name]'
|
- |
|
233 |
*
|
228 |
* Processing will then continue
|
234 |
* Processing will then continue
|
229 |
*/
|
235 |
*/
|
230 |
|
236 |
|
231 |
function htmlCheckBoxes ( $parameters ) {
|
237 |
function htmlCheckBoxes ( $parameters ) {
|
232 |
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'] ) ) {
|
233 |
$parameters['template'] = "<input type='checkbox' id='~~id~~' name='~~name~~' ~~checked~~>\n<label for='~~id~~'>~~name~~</label>\n";
|
240 |
$parameters['template'] = "<input type='checkbox' id='~~id~~' name='~~id~~' ~~checked~~>\n<label for='~~id~~'>~~name~~</label>\n";
|
- |
|
241 |
} else {
|
- |
|
242 |
$parameters['template'] = "<input type='checkbox' id='$parameters[arrayName]~~id~~' name='$parameters[arrayName][~~id~~]' ~~checked~~>\n<label for='~~id~~'>~~name~~</label>\n";
|
- |
|
243 |
}
|
234 |
}
|
244 |
}
|
235 |
//print "<pre>" . print_r($parameters, true) . "</pre>"; die;
|
245 |
//print "<pre>" . print_r($parameters, true) . "</pre>"; die;
|
236 |
if ( empty( $parameters['data'] ) ) {
|
246 |
if ( empty( $parameters['data'] ) ) {
|
237 |
if ( empty( $parameters['query'] ) )
|
247 |
if ( empty( $parameters['query'] ) )
|
238 |
return '';
|
248 |
return '';
|