选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
printTrail('column'); $misc->printTitle($lang['straltercolumn'], 'pg.column.alter'); $misc->printMsg($msg); echo "
\n"; // Output table header echo "\n"; echo ""; if ($data->hasAlterColumnType()) { echo ""; echo ""; } else { echo ""; } echo ""; $column = $data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']); $column->f['attnotnull'] = $data->phpBool($column->f['attnotnull']); // Upon first drawing the screen, load the existing column information // from the database. if (!isset($_REQUEST['default'])) { $_REQUEST['field'] = $column->f['attname']; $_REQUEST['type'] = $column->f['base_type']; // Check to see if its' an array type... // XXX: HACKY if (substr($column->f['base_type'], strlen($column->f['base_type']) - 2) == '[]') { $_REQUEST['type'] = substr($column->f['base_type'], 0, strlen($column->f['base_type']) - 2); $_REQUEST['array'] = '[]'; } else { $_REQUEST['type'] = $column->f['base_type']; $_REQUEST['array'] = ''; } // To figure out the length, look in the brackets :( // XXX: HACKY if ($column->f['type'] != $column->f['base_type'] && ereg('\\(([0-9, ]*)\\)', $column->f['type'], $bits)) { $_REQUEST['length'] = $bits[1]; } else $_REQUEST['length'] = ''; $_REQUEST['default'] = $_REQUEST['olddefault'] = $column->f['adsrc']; if ($column->f['attnotnull']) $_REQUEST['notnull'] = 'YES'; $_REQUEST['comment'] = $column->f['comment']; } // Column name echo ""; // Column type if ($data->hasAlterColumnType()) { // Fetch all available types $types = $data->getTypes(true, false, true); echo ""; // Output array type selector echo "\n"; echo ""; } else { // Otherwise draw the read-only type name echo ""; } echo "\n"; echo ""; echo ""; echo "
{$lang['strname']}{$lang['strtype']}{$lang['strlength']}{$lang['strtype']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['strcomment']}
", $misc->printVal($data->formatType($column->f['type'], $column->f['atttypmod'])), "
\n"; echo "

\n"; echo "\n"; echo $misc->form; echo "\n"; echo "\n"; echo "\n"; if ($column->f['attnotnull']) echo "\n"; echo "formatType($column->f['type'], $column->f['atttypmod'])), "\" />\n"; // Add hidden variables to suppress error notices if we don't support altering column type if (!$data->hasAlterColumnType()) { echo "\n"; echo "\n"; echo "\n"; } echo "\n"; echo "

\n"; echo "
\n"; break; case 2: global $data, $lang; // Check inputs if (trim($_REQUEST['field']) == '') { $_REQUEST['stage'] = 1; doProperties($lang['strcolneedsname']); return; } $status = $data->alterColumn($_REQUEST['table'], $_REQUEST['column'], $_REQUEST['field'], isset($_REQUEST['notnull']), isset($_REQUEST['oldnotnull']), $_REQUEST['default'], $_REQUEST['olddefault'], $_REQUEST['type'], $_REQUEST['length'], $_REQUEST['array'], $_REQUEST['oldtype'], $_REQUEST['comment']); if ($status == 0) { if ($_REQUEST['column'] != $_REQUEST['field']) { $_REQUEST['column']=$_REQUEST['field']; $_reload_browser = true; } doDefault($lang['strcolumnaltered']); } else { $_REQUEST['stage'] = 1; doProperties($lang['strcolumnalteredbad']); return; } break; default: echo "

{$lang['strinvalidparam']}

\n"; } } /** * Show default list of columns in the table */ function doDefault($msg = '', $isTable = true) { global $data, $conf, $misc, $tableName; global $PHP_SELF, $lang; function attPre(&$rowdata) { global $data; $rowdata->f['+type'] = $data->formatType($rowdata->f['type'], $rowdata->f['atttypmod']); } if (empty($_REQUEST['column'])) $msg.= "
{$lang['strnoobjects']}"; $misc->printTrail('column'); $misc->printTitle($lang['strcolprop']); #$misc->printTabs('column','properties'); $misc->printMsg($msg); if (! empty($_REQUEST['column'])) { // Get table $tdata = $data->getTable($tableName); // Get columns $attrs = $data->getTableAttributes($tableName, $_REQUEST['column']); // Show comment if any if ($attrs->f['comment'] !== null) echo "

", $misc->printVal($attrs->f['comment']), "

\n"; $column = array( 'column' => array( 'title' => $lang['strcolumn'], 'field' => 'attname', ), 'type' => array( 'title' => $lang['strtype'], 'field' => '+type', ) ); if ($isTable) { $column['notnull'] = array( 'title' => $lang['strnotnull'], 'field' => 'attnotnull', 'type' => 'bool', 'params'=> array('true' => 'NOT NULL', 'false' => '') ); $column['default'] = array( 'title' => $lang['strdefault'], 'field' => 'adsrc' ); } $actions=array(); $misc->printTable($attrs, $column, $actions, null, 'attPre'); echo "
\n"; echo "\n"; } } $misc->printHeader($lang['strtables'] . ' - ' . $tableName); $misc->printBody(); if (isset($_REQUEST['view'])) doDefault(null, false); else switch ($action) { case 'properties': if (isset($_POST['cancel'])) doDefault(); else doProperties(); break; default: doDefault(); break; } $misc->printFooter(); ?>