function build_form_href($array_tree, $ref = '') { $entry_string = ''; if (is_array($array_tree)) { foreach ($array_tree as $key => $entry) { $new_ref = $ref . $key; $entry_string .= '<table border="0" cellpadding="1" cellspacing="1"><tr>' . chr(10); if (isset($entry['children'])) { $entry_string .= '<td><a id="rpt_' . $new_ref . '" href="javascript:Toggle(\'' . $new_ref . '\');">'; $entry_string .= html_icon('status/folder-open.png', TEXT_EXPAND, 'small', $params = 'hspace="0" vspace="0"') . '</a>'; } else { $entry_string .= '<td>' . html_radio_field('id', 'f' . $key, false); } $entry_string .= ' ' . $entry['desc'] . '</td>' . chr(10); $entry_string .= '</tr></table>' . chr(10); if (isset($entry['children'])) { $entry_string .= '<div id="' . $new_ref . '" style="display:none; margin-left:1em;">' . chr(10) . chr(10); $entry_string .= build_form_href($entry['children'], $new_ref) . chr(10); $entry_string .= '</div>' . chr(10); } } } return $entry_string; }
$rr_security[$report_id] = 'u:0;e:0;d:0'; // enable everyone if security not set } if (security_check($rr_security[$report_id])) { if ($definitions->fields['groupname'] == $key && $definitions->fields['standard_report'] == $standard) { echo html_radio_field('id', 'r' . $report_id, false); echo ' ' . stripslashes($definitions->fields['description']) . '<br />' . chr(10); } } $definitions->MoveNext(); } echo '</fieldset>' . chr(10); } echo '</td>' . chr(10); // show form list $temp = build_form_href($form_array[$key]['children'], 'rpt_' . $key); if ($temp) { echo '<td valign="top"><fieldset>' . $temp . '</fieldset></td>' . chr(10); } else { echo '<td valign="top"> </td>' . chr(10); } echo '</tr>' . chr(10); echo '</table></div>' . chr(10); } ?> </td> </tr> </table></td> </tr> </table> </form>