function get_exception_select($name, $sel = NULL, $empty = TRUE, $tags = array()) { global $s_exceptions; $enames = array_keys($s_exceptions); sort($enames); return get_selectlist($name, $enames, $sel, $empty, $tags); }
function get_udf_select($name, $sel = NULL, $empty = TRUE, $tags = array()) { global $s_udfs; $unames = array_keys($s_udfs); sort($unames); $unames['-=ALL_DEFINED_UDFS=-'] = '-=ALL_DEFINED_UDFS=-'; return get_selectlist($name, $unames, $sel, $empty, $tags); }
require './inc/script_start.inc.php'; if ($_SERVER['REQUEST_METHOD'] == 'GET') { $table = get_request_data('table', 'GET'); $col = get_request_data('col', 'GET'); $where = get_request_data('where', 'GET'); } else { $table = get_request_data('table'); $col = get_request_data('col'); $where = get_request_data('where'); $s_wt['blob_as'][$col] = get_request_data('blobtype'); } $imageurl = 'showimage.php?where=' . urlencode($where) . '&table=' . $table . '&col=' . $col; $imageurl .= '&' . uniqid('UNIQ_'); $blob = get_blob_content(sprintf('SELECT %s FROM %s %s', $col, $table, $where)); $title = build_title(sprintf('Blob from %s %s', $table, $where), FALSE); echo html_head($title) . '<body bgcolor="' . $s_cust['color']['area'] . "\">\n" . js_window_resize(BLOB_WINDOW_WIDTH, BLOB_WINDOW_HEIGHT) . '<form method="post" action="' . url_session($_SERVER['PHP_SELF']) . '" name="showblob_form">' . "\n" . hidden_field('table', htmlentities($table)) . hidden_field('col', htmlentities($col)) . hidden_field('where', htmlentities($where)) . "<table>\n<tr>\n<td>\n" . get_selectlist('blobtype', $blob_types, $s_wt['blob_as'][$col], TRUE) . "</td>\n<td>\n" . '<input type="submit" name="change_blobtype" value="Change Type">' . "\n" . "</td>\n<td width=\"50\">\n</td>\n<td>\n" . '<input type="button" value="Close" onClick="self.close()">' . "\n" . "</td>\n</tr>\n<table>\n" . "</form>\n"; $blobas = isset($s_wt['blob_as'][$col]) && $s_wt['blob_as'][$col] != '' ? $s_wt['blob_as'][$col] : 'hex'; switch ($blobas) { case 'png': case 'jpg': case 'gif': echo '<img src="' . $imageurl . "\">\n"; break; case 'text': echo '<pre align="left">' . htmlspecialchars($blob) . "</pre>\n"; break; case 'html': echo $blob; break; case 'hex': echo hex_view($blob);
</td> </tr> </table> </td> <td> <table class="table table-bordered"> <tr> <th align="left" colspan="3"><?php echo $adm_strings['UseSpace']; ?> </th> </tr> <tr> <td> <?php echo get_selectlist('adm_use_space', array($adm_strings['SmallFull'], $adm_strings['Reserve']), $s_gfix['use_space'], TRUE); ?> <input type="submit" class="btn btn-default" name="adm_gfix_use_space" value="<?php echo $button_strings['Set']; ?> "> </td> </tr> </table> </td> </tr> </table> <br> <table class="table table-bordered"> <tr>
// see file LICENCE for details // Variables $s_system_table: name of the selected system table if ($s_connected === TRUE) { ?> <form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?> " name="db_systable_form"> <table class="table table-bordered"> <tr> <td><b><?php echo $db_strings['SysTables']; ?> </b><br> <?php echo get_selectlist('db_systable', get_system_tables(SERVER_FAMILY, SERVER_VERSION), $s_systable['table'], TRUE, array('onChange' => "getFilterFields(selectedElement(this))", 'id' => 'db_systable_list')); ?> </td> <td align="center"> <b><?php echo $db_strings['SysData']; ?> </b><br> <input type="checkbox" name="db_sysdata" <?php if ($s_systable['sysdata'] == TRUE) { echo 'checked'; } ?> > </td> <td> </td>
function systable_value_select($table, $field, $value = NULL) { global $dbhandle, $db_strings; $sql = 'SELECT DISTINCT ' . $field . ' AS FNAME FROM ' . $table; $res = fbird_query($dbhandle, $sql) or ib_error(__FILE__, __LINE__, $sql); $values = array(); while ($row = fbird_fetch_object($res)) { $values[] = trim($row->FNAME); } fbird_free_result($res); return '<b>' . $db_strings['FValue'] . "</b><br>\n" . get_selectlist('db_sysvalue', $values, $value, TRUE); }
function watchtable_column_options($table, $show_cols, $sort_col, $bloblinks, $blobas) { global $sql_strings; echo "<table class=\"table table-bordered\">\n"; echo '<tr><th>' . $sql_strings['Column'] . '</th>' . '<th>' . $sql_strings['Show'] . '</th>' . '<th>' . $sql_strings['Sort'] . '</th>' . '<th>' . $sql_strings['BlobLink'] . '</th>' . '<th>' . $sql_strings['BlobType'] . '</th>' . "</tr>\n"; foreach ($GLOBALS['s_fields'][$table] as $field) { echo "<tr>\n"; // column names echo '<td>' . $field['name'] . "</td>\n"; // 'Show' checkboxes echo '<td align="center"><input type="checkbox" name="columns[]" value="' . $field['name'] . '"'; if (in_array($field['name'], $show_cols)) { echo ' checked'; } echo "></td>\n"; // 'Sort' radioboxes echo '<td align="center"><input type="radio" name="radiobox" value="' . $field['name'] . '"'; if ($field['name'] == $sort_col) { echo ' checked'; } echo "></td>\n"; // 'Blob as Link' checkboxes echo '<td align="center">'; if ($field['type'] == 'BLOB') { echo '<input type="checkbox" name="bloblinks[]" value="' . $field['name'] . '"'; if (in_array($field['name'], $bloblinks)) { echo ' checked'; } echo '>'; } else { echo ' '; } echo "</td>\n"; // 'Blob Type' select lists echo '<td align="center">'; if ($field['type'] == 'BLOB') { $sel = isset($blobas[$field['name']]) ? $blobas[$field['name']] : NULL; echo get_selectlist('blobas[' . $field['name'] . ']', $GLOBALS['blob_types'], $sel, TRUE); } else { echo ' '; } echo "</td>\n"; echo "</tr>\n"; } echo "</table>\n"; }
<tr> <td align="center"> <input type="text" size="4" maxlength="4" name="tb_watch_rows" value="<?php echo $s_wt['rows']; ?> "> </td> <td align="center"> <input type="text" size="8" maxlength="8" name="tb_watch_start" value="<?php echo $s_wt['start']; ?> "> </td> <td align="center"> <?php echo get_selectlist('tb_watch_direction', array($sql_strings['Asc'], $sql_strings['Desc']), $s_wt['direction'] == 'ASC' ? $sql_strings['Asc'] : $sql_strings['Desc']); ?> </td> <td align="center"> <?php echo get_yesno_selectlist('tb_watch_edit', $s_wt['edit'] ? 'Yes' : 'No'); ?> </td> <td align="center"> <?php echo get_yesno_selectlist('tb_watch_del', $s_wt['delete'] ? 'Yes' : 'No'); ?> </td> </tr> </table> <table class="table table-bordered">
function get_table_selectlist($name, $restrictions = array(), $sel = NULL, $empty = FALSE, $tags = array(), $size = 1) { global $s_tables, $s_login; $rights = array('S' => 'select', 'I' => 'insert', 'U' => 'update', 'D' => 'delete', 'R' => 'reference'); $tables = array(); foreach ($s_tables as $tablename => $tarr) { if (in_array('noviews', $restrictions) && $tarr['is_view'] == TRUE) { continue; } if (in_array('views', $restrictions) && $tarr['is_view'] == FALSE) { continue; } if ($s_login['user'] != 'SYSDBA') { if (in_array('owner', $restrictions) && $s_login['user'] != $tarr['owner']) { continue; } foreach ($rights as $code => $val) { if (in_array($val, $restrictions) && !in_array($code, $tarr['privileges']) && $s_login['user'] != $tarr['owner']) { continue 2; } } } $tables[] = $tablename; } return get_selectlist($name, $tables, $sel, $empty, $tags, $size); }
?> </td> <td><b><?php echo $db_strings['Dialect']; ?> </b><br> <?php echo get_selectlist('db_login_dialect', array(1, 3), $s_login['dialect'], TRUE); ?> </td> <td><b><?php echo $db_strings['Server']; ?> </b><br> <?php echo get_selectlist('db_login_server', $server_types, $s_login['server'], TRUE); ?> </td> </tr> <tr> <td> <input class="btn btn-default" type="submit" name="db_login_doit" value="<?php echo $button_strings['Login']; ?> "> </td> <td colspan="3"> <?php if ($s_connected == TRUE) { echo ' <input class="btn btn-default" type="submit" name="db_logout_doit" value="' . $button_strings['Logout'] . "\">\n"; } else {
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; }
?> </b><br> <input type="password" class="form-control" size="35" maxlength="32" name="db_create_password" value="<?php echo password_stars($s_create_pw); ?> "> </td> </tr> <tr> <td> <b><?php echo $db_strings['PageSize']; ?> </b><br> <?php echo get_selectlist('db_create_pagesize', $pagesizes, $s_create_pagesize, TRUE); ?> </td> <td> <b><?php echo $db_strings['Charset']; ?> </b><br> <?php echo get_charset_select('db_create_charset', $s_create_charset); ?> </td> </tr> </table> <input type="submit" class="btn btn-success" name="db_create_doit" value="<?php echo $button_strings['Create'];
<select class="form-control" name="usr_role_removename"> <?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
<table class="table table-bordered"> <tr> <td><b><?php echo $db_strings['DelDB']; ?> </b><br> <?php if (count($dbfiles) == 0) { ?> <input type="text" class="form-control" size="35" maxlength="255" name="db_delete_database" value="<?php echo $s_delete_db['database']; ?> "> <?php } else { echo get_selectlist('db_delete_database', $dbfiles, $s_delete_db['database'], TRUE); } ?> </td> <td> <b><?php echo $db_strings['Host']; ?> </b><br> <input type="text" class="form-control" size="35" maxlength="255" name="db_delete_host" value="<?php echo $s_delete_db['host']; ?> "> </td> </tr>
</td> <td align="left"> <input type="submit" name="acc_proc_mod" value="<?php echo $button_strings['Modify']; ?> "> </td> </tr> <tr> <td> <b><?php echo $acc_strings['SelProcDel']; ?> </b> </td> <td> <?php echo get_selectlist('acc_proc_del_name', array_keys($s_procedures), NULL, TRUE); ?> </td> <td align="left"> <input type="submit" name="acc_proc_del" value="<?php echo $button_strings['Delete']; ?> "> </td> </tr> </table> </form> <?php }
</tr> </table> <table class="table table-bordered"> <tr> <th colspan="2" align="left"><?php echo $usr_strings['Attitude']; ?> </th> </tr> <tr> <td><?php echo $usr_strings['AskDel']; ?> </td> <td align="right"><?php echo get_selectlist('usr_cust_askdel', array($usr_strings['Yes'], $usr_strings['No']), $s_cust['askdel'] == 1 ? $usr_strings['Yes'] : $usr_strings['No']); ?> </td> </tr> </table> </td> </tr> </table> <table class="table table-bordered"> <tr> <td> <input type="submit" class="btn btn-success" name="usr_cust_save" value="<?php echo $button_strings['Save']; ?> "> </td>
</td> <td align="left"> <input type="submit" name="acc_trigger_mod" value="<?php echo $button_strings['Modify']; ?> "> </td> </tr> <tr> <td> <b><?php echo $acc_strings['SelTrigDel']; ?> </b> </td> <td> <?php echo get_selectlist('acc_trigger_del_name', array_keys($s_triggers), NULL, TRUE); ?> </td> <td align="left"> <input type="submit" name="acc_trigger_del" value="<?php echo $button_strings['Delete']; ?> "> </td> </tr> </table> </form> <?php }
function get_triggertype_selectlist($name, $sel = NULL, $empty = FALSE) { $types = array('insert', 'update', 'delete'); $html = ''; if (SERVER_FAMILY == 'FB' && SERVER_VERSION >= 15) { if (!is_array($sel)) { $sel = array($sel); } $html = '<select name="' . $name . "[]\" size=\"3\" multiple>\n"; foreach ($types as $type) { $html .= '<option value="' . $type . '"'; if (in_array($type, $sel)) { $html .= ' selected'; } $html .= '>' . $type . "</option>\n"; } $html .= "</select>\n"; } else { $html = get_selectlist($name . '[]', $types, pos($sel), $empty); } return $html; }
</td> <td align="left"> <input type="submit" name="acc_domain_mod" value="<?php echo $button_strings['Modify']; ?> "> </td> </tr> <tr> <td> <b><?php echo $acc_strings['SelDomDel']; ?> </b> </td> <td> <?php echo get_selectlist('acc_domain_dname', array_keys($s_domains), NULL, TRUE); ?> </td> <td align="left"> <input type="submit" name="acc_domain_del" value="<?php echo $button_strings['Delete']; ?> "> </td> </tr> </table> </form> <?php }