function get_coldef_definition($idx, $title, $rowspan, $collate = FALSE) { global $s_coldefs, $tb_strings, $s_domains; $coldefs = isset($s_coldefs[$idx]) ? $s_coldefs[$idx] : array(); $domain_names = array_keys($s_domains); $rowspan = !empty($domain_names) ? $rowspan - 1 : $rowspan; // preselect values for the form elements $domain_pre = isset($coldefs['domain']) ? $coldefs['domain'] : NULL; $comp_value = isset($coldefs['comp']) ? $coldefs['comp'] : ''; $default_value = isset($coldefs['default']) ? $coldefs['default'] : ''; $check_value = isset($coldefs['check']) ? $coldefs['check'] : ''; $ehandler_str = ' onClick="checkColConstraint(' . 'document.' . get_form_name($idx) . ", this.name, '" . $idx . "')"; $html = get_datatype_definition($idx, $title, $rowspan, $collate) . " <tr>\n" . " <td colspan=\"4\">\n"; if (!empty($domain_names)) { $html .= ' <b>' . $tb_strings['Domain'] . "</b><br>\n" . ' ' . get_selectlist('cd_def_domain' . $idx, $domain_names, $domain_pre, TRUE); } else { $html .= " \n"; } $html .= " </td>\n" . " <td colspan=\"2\" align=\"center\">\n" . ' <b>' . $tb_strings['NotNull'] . "</b><br>\n" . ' <input type="checkbox" name="cd_def_notnull' . $idx . '"' . $ehandler_str . '"' . (!empty($coldefs['notnull']) ? ' checked' : '') . ">\n" . " </td>\n" . " <td align=\"center\">\n" . ' <b>' . $tb_strings['Unique'] . "</b><br>\n" . ' <input type="checkbox" name="cd_def_unique' . $idx . '"' . $ehandler_str . '"' . (!empty($coldefs['unique']) ? ' checked' : '') . ">\n" . " </td>\n" . " <td align=\"center\">\n" . ' <b>' . $tb_strings['Primary'] . "</b><br>\n" . ' <input type="checkbox" name="cd_def_primary' . $idx . '"' . $ehandler_str . '"' . (!empty($coldefs['primary']) ? ' checked' : '') . ">\n" . " </td>\n" . " </tr>\n" . " <tr>\n" . " <td colspan=\"2\">\n" . ' <b>' . $tb_strings['CompBy'] . "</b><br>\n" . ' ' . get_textfield('cd_def_comp' . $idx, 27, 512, $comp_value) . " </td>\n" . " <td colspan=\"2\">\n" . ' <b>' . $tb_strings['Default'] . "</b><br>\n" . ' ' . get_textfield('cd_def_default' . $idx, 27, 256, $default_value) . " </td>\n" . " <td colspan=\"4\">\n" . ' <b>' . $tb_strings['Check'] . "</b><br>\n" . ' ' . get_textfield('cd_def_check' . $idx, 27, 256, $check_value) . " </td>\n" . " </tr>\n" . get_column_constraint_definition($coldefs, $idx); return $html; }
" class="bgrp"> <input type="submit" name="acc_dom_create_cancel" value="<?php echo $button_strings['Cancel']; ?> " class="bgrp"> </form> <?php } elseif (isset($dom_mod_flag)) { ?> <form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?> " name="acc_moddom_form"> <table class="table table-bordered" cellpadding="5"> <?php echo get_datatype_definition('dom', sprintf($acc_strings['ModDomain'], $s_mod_domain)); echo get_domain_constraint($s_coldefs['dom'], FALSE); ?> </table> <input type="submit" name="acc_moddom_doit" value="<?php echo $button_strings['Save']; ?> " class="bgrp"> <input type="reset" name="acc_dommod_clear" value="<?php echo $button_strings['Reset']; ?> " class="bgrp"> <input type="submit" name="acc_moddom_cancel" value="<?php echo $button_strings['Cancel']; ?> " class="bgrp">
" class="bgrp"> <input type="submit" class="btn btn-danger" name="tb_modadd_cancel" value="<?php echo $button_strings['Cancel']; ?> " class="bgrp"> </form> <?php } elseif (isset($col_mod_flag)) { ?> <form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?> " name="tb_modcol_form"> <table class="table table-bordered"> <?php echo get_datatype_definition('mod', 'Change the Definitions for Column ' . $s_modify_col, 2); echo get_column_constraint_definition($s_coldefs['mod'], 'mod'); ?> </table> <input type="submit" class="btn btn-success" name="tb_modcol_doit" value="<?php echo $button_strings['Save']; ?> " class="bgrp"> <input type="reset" class="btn btn-default" name="tb_modcol_clear" value="<?php echo $button_strings['Reset']; ?> " class="bgrp"> <input type="submit" class="btn btn-danger" name="tb_modcol_cancel" value="<?php echo $button_strings['Cancel']; ?> " class="bgrp">