column_definitions_form.phtml
7.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<form method="post"
action="<?php echo $action; ?>"
class="<?php echo ($action == 'tbl_create.php' ? 'create_table' : 'append_fields'); ?>_form ajax lock-page">
<?php echo PMA_URL_getHiddenInputs($form_params); ?>
<input type="hidden"
name="primary_indexes"
value="<?php if (! empty($_REQUEST['primary_indexes'])) {
// happens when an index has been set on a column,
// and a column is added to the table creation dialog
//
// this contains a JSON-encoded string
echo htmlspecialchars($_REQUEST['primary_indexes']);
} else echo '[]'; ?>">
<input type="hidden"
name="unique_indexes"
value="<?php if (! empty($_REQUEST['unique_indexes'])) {
echo htmlspecialchars($_REQUEST['unique_indexes']);
} else echo '[]'; ?>">
<input type="hidden"
name="indexes"
value="<?php if (! empty($_REQUEST['indexes'])) {
echo htmlspecialchars($_REQUEST['indexes']);
} else echo '[]'; ?>">
<input type="hidden"
name="fulltext_indexes"
value="<?php if (! empty($_REQUEST['fulltext_indexes'])) {
echo htmlspecialchars($_REQUEST['fulltext_indexes']);
} else echo '[]'; ?>">
<input type="hidden"
name="spatial_indexes"
value="<?php if (! empty($_REQUEST['spatial_indexes'])) {
echo htmlspecialchars($_REQUEST['spatial_indexes']);
} else echo '[]'; ?>">
<?php if ($action == 'tbl_create.php'): ?>
<div id="table_name_col_no_outer">
<table id="table_name_col_no">
<tr class="vmiddle floatleft">
<td><?php echo __('Table name'); ?>:
<input type="text"
name="table"
size="40"
maxlength="64"
value="<?php echo (isset($_REQUEST['table']) ? htmlspecialchars($_REQUEST['table']) : ''); ?>"
class="textfield" autofocus required />
</td>
<td>
Add
<input type="number"
id="added_fields"
name="added_fields"
size="2"
value="1"
min="1"
onfocus="this.select()" />
column(s)
<input type="button"
name="submit_num_fields"
value="<?php echo __('Go'); ?>" />
</td>
</tr>
</table>
</div>
<?php endif; ?>
<?php if (is_array($content_cells)): ?>
<?php echo PMA\Template::get(
'columns_definitions/table_fields_definitions'
)->render(array(
'is_backup' => $is_backup,
'fields_meta' => $fields_meta,
'mimework' => $mimework,
'content_cells' => $content_cells
)); ?>
<?php endif; ?>
<?php if ($action == 'tbl_create.php'): ?>
<table>
<tr class="vtop">
<th>
<?php echo __('Table comments:'); ?>
</th>
<td width="25"> </td>
<th>
<?php echo __('Collation:'); ?>
</th>
<td width="25"> </td>
<th>
<?php echo __('Storage Engine:'); ?>
<?php echo PMA_Util::showMySQLDocu('Storage_engines'); ?>
</th>
<td width="25"> </td>
<th>
<?php echo __('Connection:'); ?>
<?php echo PMA_Util::showMySQLDocu('federated-create-connection'); ?>
</th>
</tr>
<tr>
<td>
<input type="text"
name="comment"
size="40"
maxlength="60"
value="<?php echo (isset($_REQUEST['comment']) ? htmlspecialchars($_REQUEST['comment']): ''); ?>"
class="textfield" />
</td>
<td width="25"> </td>
<td>
<?php echo PMA_generateCharsetDropdownBox(
PMA_CSDROPDOWN_COLLATION,
'tbl_collation',
null,
isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null,
false
); ?>
</td>
<td width="25"> </td>
<td>
<?php echo PMA_StorageEngine::getHtmlSelect(
'tbl_storage_engine',
null,
(isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null)
); ?>
</td>
<td width="25"> </td>
<td>
<input type="text"
name="connection"
size="40"
value="<?php echo (isset($_REQUEST['connection']) ? htmlspecialchars($_REQUEST['connection']) : ''); ?>"
placeholder="scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name"
class="textfield"
required="required" />
</td>
</tr>
<?php if (PMA_Partition::havePartitioning()): ?>
<tr class="vtop">
<th>
<?php echo __('PARTITION definition:'); ?>
<?php echo PMA_Util::showMySQLDocu('Partitioning'); ?>
</th>
</tr>
<tr>
<td>
<textarea name="partition_definition"
id="partitiondefinition"
cols="<?php echo $GLOBALS['cfg']['TextareaCols']; ?>"
rows="<?php echo $GLOBALS['cfg']['TextareaRows']; ?>"
dir="<?php echo $GLOBALS['text_dir']; ?>">
<?php echo (isset($_REQUEST['partition_definition']) ? htmlspecialchars($_REQUEST['partition_definition']) : ''); ?>
</textarea>
</td>
</tr>
<?php endif; ?>
</table>
<br />
<?php endif; ?>
<fieldset class="tblFooters">
<input type="button"
class="preview_sql"
value="<?php echo __('Preview SQL') ?>" />
<input type="submit"
name="do_save_data"
value="<?php echo __('Save'); ?>" />
</fieldset>
<div id="properties_message">
</div>
</form>