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; }
</th> </tr> <tr> <td> <?php echo $adm_strings['FDName']; ?> </td> <td> <?php if (defined('BACKUP_DIR') && BACKUP_DIR !== '') { echo BACKUP_DIR . '<br>'; } ?> <?php echo get_textfield('adm_bu_target', 50, 256, $s_backup['target']); ?> </td> </tr> </table> <table class="table table-bordered"> <tr> <th colspan="2" align="left"><?php echo $adm_strings['Options']; ?> </th> </tr> <tr> <td> <input type="checkbox" name="adm_bu_mdonly" value="1"<?php
</td> <td> <input type="radio" name="adm_shutdown" value="force"<?php if ($s_gfix['shutdown'] == 'force') { echo ' checked'; } ?> > <?php echo $adm_strings['Force']; ?> </td> <td width="20"> </td> <td> <?php echo $adm_strings['ForSeconds'] . ' ' . get_textfield('adm_shut_secs', 5, 4, $s_gfix['shutdown_seconds']); ?> <td width="20"> </td> <td> <input type="submit" class="btn btn-default" name="adm_gfix_shutdown" value="<?php echo $button_strings['Execute']; ?> "> </td> </tr> <tr> <td colspan="5" align="right"> <?php echo $adm_strings['Rescind']; ?>
function sql_format_options_table($export) { global $dt_strings; return ' <table class="table table-bordered"> <tr> <th align="left" colspan="2">' . $dt_strings['SqlOpts'] . '</th> </tr> <tr> <td> <table class="table table-bordered"> <tr> <td> ' . $dt_strings['SqlCNames'] . ' </td> <td> ' . get_checkbox('dt_export_sql_cnames', '1', $export['sql']['cnames']) . ' </td> </tr> <tr> <td> ' . $dt_strings['SqlQNames'] . ' </td> <td> ' . get_checkbox('dt_export_sql_qnames', '1', $export['sql']['qnames']) . ' </td> </tr> <tr> <td> ' . $dt_strings['SqlCField'] . ' </td> <td> ' . get_checkbox('dt_export_sql_cfields', '1', $export['sql']['cfields']) . ' </td> </tr> <tr> <td> ' . $dt_strings['SqlInfo'] . ' </td> <td> ' . get_checkbox('dt_export_sql_info', '1', $export['sql']['info']) . ' </td> </tr> <tr> <td> ' . $dt_strings['SqlLE'] . ' </td> <td> ' . get_textfield('dt_export_sql_lineend', 2, 5, $export['sql']['lineend']) . ' </td> </tr> <tr> <td> ' . $dt_strings['SqlTTab'] . ' </td> <td> ' . get_textfield('dt_export_sql_ttable', 15, 31, $export['sql']['ttable']) . ' </td> </tr> </table> </td> </tr> </table>'; }
</tr> <tr> <td><b><?php echo $db_strings['Role']; ?> </b><br> <?php echo get_textfield('db_login_role', 28, 32, $s_login['role']); ?> </td> <td><b><?php echo $db_strings['Cache']; ?> </b><br> <?php echo get_textfield('db_login_cache', 5, 5, $s_login['cache']); ?> </td> <td><b><?php echo $db_strings['Charset']; ?> </b><br> <?php echo get_charset_select('db_login_charset', $s_login['charset']); ?> </td> <td><b><?php echo $db_strings['Dialect']; ?> </b><br> <?php
/** * <pre>skip_text( $name, $args );</pre> * * Adding a Textfield. * * <b>Default Usage</b> * <code> * skip\textfield( 'name' ); * </code> * This will create an automated saved textfield. * * <b>Parameters</b> * * <code> * $name // (string) (required) The name of the field. * $args // (array/string) (optional) Values for further settings. * </code> * * <b>$args Settings</b> * * <ul> * <li>id (string) ID if the HTML Element.</li> * <li>label (string) Label for Element.</li> * <li>default (string) Default Value if no Value is set before.</li> * <li>classes (string) Name of CSS Classes which will be inserted into HTML seperated by empty space.</li> * <li>before_element (string) Content before the element.</li> * <li>after_element (string) Content after the element.</li> * </ul> * * <b>Example</b> * * Creating a labeled Textfield in an automatic saved form. * <code> * skip\form_start( 'myformname' ); * skip\textfield( 'name', 'labelname' ); * skip\form_end(); * </code> * * Getting back the saved data. * <code> * $value= skip\value( 'myformname', 'name' ); * </code> * * @package Skip\Forms * @since 1.0.0 * @param string $name Name of field. * @param string $label Label of field. * @param string $description Description of field which is shown under element * @see get_textfield() */ function textfield($name, $label = FALSE, $description = FALSE) { echo get_textfield($name, $label, $description); }
function table_columns_selectlist($table, $ename, $restriction) { $columns = array(); if (is_array($GLOBALS['s_fields'][$table])) { foreach ($GLOBALS['s_fields'][$table] as $field) { if ($restriction == 'fk' && !isset($field['primary']) && !isset($field['unique'])) { continue; } $columns[] = $field['name']; } } if (count($columns) > 0) { $html = get_selectlist($ename, $columns, NULL, TRUE); } else { $html = get_textfield($ename, 20, 31); } header('Content-Type: text/html;charset=' . $GLOBALS['charset']); echo $html; }
<?php $selected = isset($_POST['usr_role_removename']) ? $_POST['usr_role_removename'] : ''; build_roles_options($roles, $selected); ?> </select> </td> <td> <strong><?php echo $usr_strings['User']; ?> </strong><br> <?php $pre = !empty($_POST['usr_role_removeuser']) ? $_POST['usr_role_removeuser'] : NULL; if (!empty($users)) { echo get_selectlist('usr_role_removeuser', $user_options, $pre, TRUE); } else { echo get_textfield('usr_role_removeuser', 20, 80, $pre); } ?> </td> <td> <input type="submit" class="btn btn-danger" name="usr_role_remove" value="<?php echo $button_strings['Remove']; ?> "> </td> </tr> </table> </form> <?php }
</td> <td> <?php echo get_textfield('dt_export_date', 10, 255, $s_export['general']['date']); ?> </td> </tr> <tr> <td> <?php echo $dt_strings['TFormat'] . "\n"; ?> </td> <td> <?php echo get_textfield('dt_export_time', 10, 255, $s_export['general']['time']); ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td> <input type="submit" class="btn btn-default" name="dt_export_doit" value="<?php echo $button_strings['Export']; ?> ">
<table class="table table-bordered"> <tr> <th colspan="2" align="left"><?php echo $adm_strings['RTarget']; ?> </th> </tr> <tr> <td> <?php echo $adm_strings['TargetDB']; ?> </td> <td> <?php echo get_textfield('adm_re_target', 50, 256, $s_restore['target']); ?> </td> </tr> <tr> <td> <input type="radio" name="adm_re_overwrite" value="0"<?php if ($s_restore['overwrite'] == FALSE) { echo ' checked'; } ?> > <?php echo $adm_strings['NewFile']; ?> </td>
<td><b><?php echo $tb_strings['TbName']; ?> </b><br> <?php $value = isset($s_create_table) ? $s_create_table : ''; echo get_textfield('tb_create_table', 30, 31, $value); ?> </td> <td><b><?php echo $tb_strings['Fields']; ?> </b><br> <?php $value = isset($s_create_num) ? $s_create_num : ''; echo get_textfield('tb_create_num', 4, 4, $value); ?> </td> </tr> </table> <input type="submit" class="btn btn-success" name="tb_create_doit" value="<?php echo $button_strings['Create']; ?> "> </form> <?php } elseif ($s_connected && $s_create_num > 0) { // $s_create_num > 0 js_checkColConstraint(); ?> <form method="post" action="<?php