CSS: Top menu items margins and paddings converted to absolute units to prevent chang...
[phpmyadmin-themes.git] / pmd_general.php
blob4363258bfeba52e29a4ae0155e2659e23de7ea2b
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * @package phpMyAdmin-Designer
5 */
7 /**
9 */
10 require_once "./pmd_common.php";
12 $tab_column = get_tab_info();
13 $script_tabs = get_script_tabs();
14 $script_contr = get_script_contr();
15 $tab_pos = get_tab_pos();
16 $tables_pk_or_unique_keys = get_pk_or_unique_keys();
17 $tables_all_keys = get_all_keys();
18 $hidden = "hidden";
21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
22 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
23 <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
24 <head>
25 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
26 <link rel="icon" href="pmd/images/favicon.ico" type="image/x-icon" />
27 <link rel="shortcut icon" href="pmd/images/favicon.ico" type="image/x-icon" />
28 <link rel="stylesheet" type="text/css" href="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'] ?>/style1.css" />
29 <title>Designer</title>
30 <script type="text/javascript">
31 // <![CDATA[
32 <?php
33 echo '
34 var server = "' . PMA_escapeJsString($server) . '";
35 var db = "' . PMA_escapeJsString($db) . '";
36 var token = "' . PMA_escapeJsString($token) . '";';
37 echo "\n";
38 if($_REQUEST['query']) {
39 echo '
40 $(document).ready(function(){
41 $(".trigger").click(function(){
42 $(".panel").toggle("fast");
43 $(this).toggleClass("active");
44 return false;
45 });
46 });';
49 // ]]>
50 </script>
51 <?php
52 $params = array('lang' => $GLOBALS['lang']);
53 if (isset($GLOBALS['db'])) {
54 $params['db'] = $GLOBALS['db'];
56 require_once './libraries/header_scripts.inc.php';
58 <script src="js/messages.php<?php echo PMA_generate_common_url($params); ?>" type="text/javascript"></script>
59 <script src="pmd/scripts/ajax.js" type="text/javascript"></script>
60 <script src="pmd/scripts/history.js" type="text/javascript"></script>
61 <script src="pmd/scripts/move.js" type="text/javascript"></script>
62 <!--[if IE]>
63 <script src="pmd/scripts/iecanvas.js" type="text/javascript"></script>
64 <![endif]-->
65 <?php
66 echo $script_tabs . $script_contr . $script_display_field;
69 </head>
70 <body onload="Main()" class="general_body" id="pmd_body">
72 <div class="header" id="top_menu">
73 <a href="javascript:Show_left_menu(document.getElementById('key_Show_left_menu'));"
74 onmousedown="return false;" class="M_butt first" target="_self">
75 <img id='key_Show_left_menu' title="<?php echo __('Show/Hide left menu'); ?>"
76 alt="v" src="pmd/images/downarrow2_m.png" /></a>
77 <a href="javascript:Save2();" onmousedown="return false;"
78 class="M_butt" target="_self"
79 ><img title="<?php echo __('Save position') ?>" src="pmd/images/save.png" alt=""
80 /></a><a href="javascript:Start_table_new();" onmousedown="return false;"
81 class="M_butt" target="_self"
82 ><img title="<?php echo __('Create table')?>" src="pmd/images/table.png" alt=""
83 /></a><a href="javascript:Start_relation();" onmousedown="return false;"
84 class="M_butt" id="rel_button" target="_self"
85 ><img title="<?php echo __('Create relation') ?>" src="pmd/images/relation.png" alt=""
86 /></a><a href="javascript:Start_display_field();" onmousedown="return false;"
87 class="M_butt" id="display_field_button" target="_self"
88 ><img title="<?php echo __('Choose column to display') ?>" src="pmd/images/display_field.png" alt=""
89 /></a><a href="javascript:location.reload();" onmousedown="return false;"
90 class="M_butt" target="_self"
91 ><img title="<?php echo __('Reload'); ?>" src="pmd/images/reload.png" alt=""
92 /></a><a href="javascript:Help();" onmousedown="return false;"
93 class="M_butt" target="_self"
94 ><img title="<?php echo __('Help'); ?>" src="pmd/images/help.png" alt=""
95 /></a><img class="M_bord" src="pmd/images/bord.png" alt=""
96 /><a href="javascript:Angular_direct();" onmousedown="return false;"
97 class="M_butt" id="angular_direct_button" target="_self"
98 ><img title="<?php echo __('Angular links') . ' / ' . __('Direct links'); ?>"
99 src="pmd/images/ang_direct.png" alt=""
100 /></a><a href="javascript:Grid();" onmousedown="return false;"
101 class="M_butt" id="grid_button" target="_self"
102 ><img title="<?php echo __('Snap to grid') ?>" src="pmd/images/grid.png" alt=""
103 /></a><img class="M_bord" src="pmd/images/bord.png" alt=""
104 /><a href="javascript:Small_tab_all(document.getElementById('key_SB_all'));"
105 onmousedown="return false;" class="M_butt" target="_self"
106 ><img id='key_SB_all' title="<?php echo __('Small/Big All'); ?>" alt="v"
107 src="pmd/images/downarrow1.png"
108 /></a><a href="javascript:Small_tab_invert();" onmousedown="return false;"
109 class="M_butt" target="_self"
110 ><img title="<?php echo __('Toggle small/big'); ?>" alt="key" src="pmd/images/bottom.png"
111 /></a><img class="M_bord" src="pmd/images/bord.png" alt=""
112 /><a href="javascript:PDF_save();" onmousedown="return false;"
113 class="M_butt" target="_self"
114 ><img src="pmd/images/pdf.png" alt="key" width="20" height="20"
115 title="<?php echo __('Import/Export coordinates for PDF schema'); ?>" /></a
117 <?php if($_REQUEST['query']){
118 echo '<a href="#" onClick="build_query(\'SQL Query on Database\', 0)" onmousedown="return false;"
119 class="M_butt" target="_self">';
120 echo '<img src="pmd/images/query_builder.png" alt="key" width="20" height="20" title="';
121 echo __('Build Query');
122 echo '"/></a>'; }?>
123 <a href="javascript:Top_menu_right(document.getElementById('key_Left_Right'));"
124 onmousedown="return false;" class="M_butt last" target="_self">
125 <img src="pmd/images/2rightarrow_m.png" id="key_Left_Right" alt=">"
126 title="<?php echo __('Move Menu'); ?>" /></a>
127 </div>
129 <div id="osn_tab">
130 <CANVAS id="canvas" width="100" height="100" onclick="Canvas_click(this)"></CANVAS>
131 </div>
133 <form action="" method="post" name="form1">
134 <div id="layer_menu" style="visibility:<?php echo $hidden ?>;">
135 <div align="center" style="padding-top:5px;">
136 <a href="javascript:Hide_tab_all(document.getElementById('key_HS_all'));"
137 onmousedown="return false;" class="M_butt" target="_self">
138 <img title="<?php echo __('Hide/Show all'); ?>" alt="v"
139 src="pmd/images/downarrow1.png" id='key_HS_all' /></a>
140 <a href="javascript:No_have_constr(document.getElementById('key_HS'));"
141 onmousedown="return false;" class="M_butt" target="_self">
142 <img title="<?php echo __('Hide/Show Tables with no relation'); ?>" alt="v"
143 src="pmd/images/downarrow2.png" id='key_HS' /></a>
144 </div>
146 <div id="id_scroll_tab" class="scroll_tab">
147 <table width="100%" style="padding-left: 3px;">
148 <?php
149 $name_cnt = count($GLOBALS['PMD']['TABLE_NAME']);
150 for ($i = 0; $i < $name_cnt; $i++) {
152 <tr><td title="<?php echo __('Structure'); ?>" width="1px"
153 onmouseover="this.className='L_butt2_2'"
154 onmouseout="this.className='L_butt2_1'">
155 <img onclick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');"
156 src="pmd/images/exec.png" alt="" /></td>
157 <td width="1px">
158 <input onclick="VisibleTab(this,'<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>')"
159 title="<?php echo __('Hide'); ?>"
160 id="check_vis_<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
161 style="margin:0px;" type="checkbox"
162 value="<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
163 <?php
164 if (isset($tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]])) {
165 echo $tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]]["H"] ? 'checked="checked"' : '';
166 } else {
167 echo 'checked="checked"';
169 ?> /></td>
170 <td class="Tabs" onmouseover="this.className='Tabs2'"
171 onmouseout="this.className='Tabs'"
172 onclick="Select_tab('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>');">
173 <?php echo $GLOBALS['PMD_OUT']["TABLE_NAME"][$i]; ?></td>
174 </tr>
175 <?php
178 </table>
179 </div>
181 <div align="center">
182 <?php echo __('Number of tables') . ': ' . $name_cnt; ?>
183 </div>
184 <div align="right">
185 <div id="layer_menu_sizer" onmousedown="layer_menu_cur_click=1">
186 </div>
187 </div>
188 </div>
189 <?php
190 for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
191 $t_n = $GLOBALS['PMD']["TABLE_NAME"][$i];
192 $t_n_url = $GLOBALS['PMD_URL']["TABLE_NAME"][$i];
195 <input name="t_x[<?php echo $t_n_url ?>]" type="hidden" id="t_x_<?php echo $t_n_url ?>_" />
196 <input name="t_y[<?php echo $t_n_url ?>]" type="hidden" id="t_y_<?php echo $t_n_url ?>_" />
197 <input name="t_v[<?php echo $t_n_url ?>]" type="hidden" id="t_v_<?php echo $t_n_url ?>_" />
198 <input name="t_h[<?php echo $t_n_url ?>]" type="hidden" id="t_h_<?php echo $t_n_url ?>_" />
200 <table id="<?php echo $t_n_url ?>" cellpadding="0" cellspacing="0" class="tab"
201 style="position: absolute;
202 left: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["X"]; else echo rand(180, 800); ?>px;
203 top: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["Y"]; else echo rand(30, 500); ?>px;
204 visibility: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["H"] ? "visible" : "hidden"; ?>;
206 <thead>
207 <tr>
208 <?php
209 if(isset($_REQUEST['query'])) {
210 echo '<td class="select_all">';
211 echo '<input type="checkbox" value="select_all_'.htmlspecialchars($t_n_url).'" style="margin: 0px;" ';
212 echo 'id="select_all_'.htmlspecialchars($t_n_url).'" title="select all" ';
213 echo 'onclick="Select_all(\''. htmlspecialchars($t_n_url) .'\',\''.htmlspecialchars($GLOBALS['PMD_OUT']["OWNER"][$i]).'\')"></td>';
215 <td class="small_tab" onmouseover="this.className='small_tab2';"
216 onmouseout="this.className='small_tab';"
217 id="id_hide_tbody_<?php echo $t_n_url ?>"
218 onclick="Small_tab('<?php echo $t_n_url ?>', 1)"><?php
219 // no space alloawd here, between tags and content !!!
220 // JavaScript function does require this
221 if (! isset($tab_pos[$t_n]) || ! empty($tab_pos[$t_n]["V"])) {
222 echo 'v';
223 } else {
224 echo '&gt;';
226 ?></td>
227 <td class="small_tab_pref" onmouseover="this.className='small_tab_pref2';"
228 onmouseout="this.className='small_tab_pref';"
229 onclick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');">
230 <img src="pmd/images/exec_small.png" alt="" /></td>
231 <td nowrap="nowrap" id="id_zag_<?php echo $t_n_url ?>" class="tab_zag"
232 onmousedown="cur_click=document.getElementById('<?php echo $t_n_url ?>');"/
233 onmouseover="Table_onover('<?php echo $t_n_url ?>',0,<?php echo (isset($_REQUEST['query'])? 1 : 0 )?> )"
234 onmouseout="Table_onover('<?php echo $t_n_url ?>',1,<?php echo (isset($_REQUEST['query']) ? 1 : 0 )?>)">
235 <span class='owner'>
236 <?php
237 echo $GLOBALS['PMD_OUT']["OWNER"][$i];
238 echo '.</span>';
239 echo $GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i];
240 ?></td>
241 <?php
242 if(isset($_REQUEST['query'])) {
243 echo '<td class="tab_zag" onmouseover="Table_onover(\''.htmlspecialchars($t_n_url).'\',0,1)" id="id_zag_'.htmlspecialchars($t_n_url).'_2"';
244 echo 'onmousedown="cur_click=document.getElementById(\''.htmlspecialchars($t_n_url).'\');"';
245 echo 'onmouseout="Table_onover(\''.htmlspecialchars($t_n_url).'\',1,1)">';
247 </tr>
248 </thead>
249 <tbody id="id_tbody_<?php echo $t_n_url ?>"
250 <?php if ( isset($tab_pos[$t_n])) echo 'style="display: none;"'; ?>>
251 <?php
252 $display_field = PMA_getDisplayField($db, $GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]);
253 for ($j = 0, $id_cnt = count($tab_column[$t_n]["COLUMN_ID"]); $j < $id_cnt; $j++) {
255 <tr id="id_tr_<?php
256 echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i] . '.'
257 . urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>"
258 <?php
259 if ($display_field == $tab_column[$t_n]["COLUMN_NAME"][$j]) {
260 echo ' class="tab_field_3" ';
261 } else {
262 echo ' class="tab_field" ';
265 onmouseover="old_class = this.className; this.className = 'tab_field_2';"
266 onmouseout="this.className = old_class;"
267 onmousedown="Click_field('<?php
268 echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]."','".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j])."',";
269 if (! PMA_foreignkey_supported($GLOBALS['PMD']['TABLE_TYPE'][$i])) {
270 echo (isset($tables_pk_or_unique_keys[$t_n . "." . $tab_column[$t_n]["COLUMN_NAME"][$j]]) ? 1 : 0);
271 } else {
272 // if foreign keys are supported, it's not necessary that the
273 // index is a primary key
274 echo (isset($tables_all_keys[$t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j]]) ? 1 : 0);
276 ?>)">
277 <?php
278 if(isset($_REQUEST['query'])) {
279 echo '<td class="select_all">';
280 echo '<input value="'.htmlspecialchars($t_n_url).urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'"';
281 echo 'type="checkbox" id="select_'.htmlspecialchars($t_n_url).'._'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'" ';
282 echo 'style="margin: 0px;" title="select_'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'" ';
283 echo 'onclick="store_column(\''.urlencode($GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i]).'\',\''.htmlspecialchars($GLOBALS['PMD_OUT']["OWNER"][$i]).'\',\''.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'\')"></td>';
285 <td width="10px" colspan="3"
286 id="<?php echo $t_n_url.".".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>">
287 <div style="white-space:nowrap">
288 <?php
289 if (isset($tables_pk_or_unique_keys[$t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j]])) {
291 <img src="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'];?>/images/FieldKey_small.png"
292 alt="*" />
293 <?php
294 } else {
296 <img src="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE']?>/images/Field_small<?php
297 if (strstr($tab_column[$t_n]["TYPE"][$j],'char')
298 || strstr($tab_column[$t_n]["TYPE"][$j],'text')) {
299 echo '_char';
300 } elseif (strstr($tab_column[$t_n]["TYPE"][$j],'int')
301 || strstr($tab_column[$t_n]["TYPE"][$j],'float')
302 || strstr($tab_column[$t_n]["TYPE"][$j],'double')
303 || strstr($tab_column[$t_n]["TYPE"][$j],'decimal')) {
304 echo '_int';
305 } elseif (strstr($tab_column[$t_n]["TYPE"][$j],'date')
306 || strstr($tab_column[$t_n]["TYPE"][$j],'time')
307 || strstr($tab_column[$t_n]["TYPE"][$j],'year')) {
308 echo '_date';
310 ?>.png" alt="*" />
311 <?php
313 echo htmlspecialchars($tab_column[$t_n]["COLUMN_NAME"][$j]
314 . " : " . $tab_column[$t_n]["TYPE"][$j], ENT_QUOTES);
316 </div>
317 </td>
318 <?php
319 if(isset($_REQUEST['query'])) {
320 //$temp = $GLOBALS['PMD_OUT']["OWNER"][$i].'.'.$GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i];
321 echo '<td class="small_tab_pref" onmouseover="this.className=\'small_tab_pref2\';"';
322 echo 'onmouseout="this.className=\'small_tab_pref\';"';
323 echo 'onclick="Click_option(\'pmd_optionse\',\''.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'\',\''.$GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i].'\')" >';
324 echo '<img src="pmd/images/exec_small.png" title="options" alt="" /></td> ';
325 } ?>
326 </tr>
327 <?php
330 </tbody>
331 </table>
332 <?php
335 </form>
336 <div id="hint"></div>
337 <div id='layer_action' style="visibility:<?php echo $hidden ?>;">Load...</div>
339 <table id="layer_new_relation" style="visibility:<?php echo $hidden ?>;"
340 width="5%" border="0" cellpadding="0" cellspacing="0">
341 <tbody>
342 <tr>
343 <td class="frams1" width="10px"></td>
344 <td class="frams5" width="99%" ></td>
345 <td class="frams2" width="10px"><div class="bor"></div></td>
346 </tr>
347 <tr>
348 <td class="frams8"></td>
349 <td class="input_tab">
350 <table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
351 <thead>
352 <tr>
353 <td colspan="2" align="center" nowrap="nowrap"><strong><?php echo __('Create relation'); ?></strong></td>
354 </tr>
355 </thead>
356 <tbody id="foreign_relation">
357 <tr>
358 <td colspan="2" align="center" nowrap="nowrap"><strong>FOREIGN KEY</strong></td>
359 </tr>
360 <tr>
361 <td width="58" nowrap="nowrap">on delete</td>
362 <td width="102"><select name="on_delete" id="on_delete">
363 <option value="nix" selected="selected">--</option>
364 <option value="CASCADE">CASCADE</option>
365 <option value="SET NULL">SET NULL</option>
366 <option value="NO ACTION">NO ACTION</option>
367 <option value="RESTRICT">RESTRICT</option>
368 </select>
369 </td>
370 </tr>
371 <tr>
372 <td nowrap="nowrap">on update</td>
373 <td><select name="on_update" id="on_update">
374 <option value="nix" selected="selected">--</option>
375 <option value="CASCADE">CASCADE</option>
376 <option value="SET NULL">SET NULL</option>
377 <option value="NO ACTION">NO ACTION</option>
378 <option value="RESTRICT">RESTRICT</option>
379 </select>
380 </td>
381 </tr>
382 </tbody>
383 <tbody>
384 <tr>
385 <td colspan="2" align="center" nowrap="nowrap">
386 <input type="button" class="butt" name="Button"
387 value="<?php echo __('OK'); ?>" onclick="New_relation()" />
388 <input type="button" class="butt" name="Button"
389 value="<?php echo __('Cancel'); ?>"
390 onclick="document.getElementById('layer_new_relation').style.visibility = 'hidden';" />
391 </td>
392 </tr>
393 </tbody>
394 </table>
395 </td>
396 <td class="frams6"></td>
397 </tr>
398 <tr>
399 <td class="frams4"><div class="bor"></div></td>
400 <td class="frams7"></td>
401 <td class="frams3"></td>
402 </tr>
403 </tbody>
404 </table>
406 <table id="layer_upd_relation" style="visibility:<?PHP echo $hidden ?>;"
407 width="5%" border="0" cellpadding="0" cellspacing="0">
408 <tbody>
409 <tr>
410 <td class="frams1" width="10px"></td>
411 <td class="frams5" width="99%"></td>
412 <td class="frams2" width="10px"><div class="bor"></div></td>
413 </tr>
414 <tr>
415 <td class="frams8"></td>
416 <td class="input_tab">
417 <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
418 <tr>
419 <td colspan="3" align="center" nowrap="nowrap"><strong><?php echo __('Delete relation'); ?></strong></td>
420 </tr>
421 <tr>
422 <td colspan="3" align="center" nowrap="nowrap">
423 <input name="Button" type="button" class="butt"
424 onclick="Upd_relation()" value="<?php echo __('Delete'); ?>" />
425 <input type="button" class="butt" name="Button"
426 value="<?php echo __('Cancel'); ?>"
427 onclick="document.getElementById('layer_upd_relation').style.visibility = 'hidden'; Re_load();" />
428 </td>
429 </tr>
430 </table></td>
431 <td class="frams6"></td>
432 </tr>
433 <tr>
434 <td class="frams4"><div class="bor"></div></td>
435 <td class="frams7"></td>
436 <td class="frams3"></td>
437 </tr>
438 </tbody>
439 </table>
441 <table id="pmd_optionse" style="visibility:<?php echo $hidden ?>;"
442 width="5%" border="0" cellpadding="0" cellspacing="0">
443 <tbody>
444 <tr>
445 <td class="frams1" width="10px"></td>
446 <td class="frams5" width="99%" ></td>
447 <td class="frams2" width="10px"><div class="bor"></div></td>
448 </tr>
449 <tr>
450 <td class="frams8"></td>
451 <td class="input_tab">
452 <table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
453 <thead>
454 <tr>
455 <td colspan="2" rowspan="2" id="option_col_name" nowrap="nowrap" align="center"></td>
456 </tr>
457 </thead>
458 <tbody id="where">
459 <tr><td align="center" nowrap="nowrap"><b>WHERE</b></td></tr>
460 <tr>
461 <td width="58" nowrap="nowrap"><?php echo __('Relation operator'); ?></td>
462 <td width="102"><select name="rel_opt" id="rel_opt">
463 <option value="--" selected="selected"> -- </option>
464 <option value="=" > = </option>
465 <option value=">"> > </option>
466 <option value="<"> < </option>
467 <option value=">="> >= </option>
468 <option value="<="> <= </option>
469 <option value="NOT"> NOT </option>
470 <option value="IN"> IN </option>
471 <option value="EXCEPT"> <?php echo __('Except'); ?> </option>
472 <option value="NOT IN"> NOT IN </option>
473 </select>
474 </td>
475 </tr>
476 <tr>
477 <td nowrap="nowrap"><?php echo __('Value'); ?>/<br /><?php echo __('subquery'); ?></td>
478 <td><textarea id="Query" value="" cols="18"></textarea>
479 </td>
480 </tr>
481 <tr><td align="center" nowrap="nowrap"><b><?php echo __('Rename to'); ?></b></td></tr>
482 <tr>
483 <td width="58" nowrap="nowrap"><?php echo __('New name'); ?></td>
484 <td width="102"><input type="text" value="" id="new_name"/></td>
485 </tr>
486 <tr><td align="center" nowrap="nowrap"><b><?php echo __('Aggregate'); ?></b></td></tr>
487 <tr>
488 <td width="58" nowrap="nowrap"><?php echo __('Operator'); ?></td>
489 <td width="102"><select name="operator" id="operator">
490 <option value="---" selected="selected">---</option>
491 <option value="sum" > SUM </option>
492 <option value="min"> MIN </option>
493 <option value="max"> MAX </option>
494 <option value="avg"> AVG </option>
495 <option value="count"> COUNT </option>
496 </select>
497 </td></tr>
498 <tr>
499 <td nowrap="nowrap" width="58" align="center"><b>GROUP BY</b></td>
500 <td><input type="checkbox" value="groupby" id="groupby"/></td>
501 </tr>
502 <tr>
503 <td nowrap="nowrap" width="58" align="center"><b>ORDER BY</b></td>
504 <td><input type="checkbox" value="orderby" id="orderby"/></td>
505 </tr>
506 <tr><td align="center" nowrap="nowrap"><b>HAVING</b></td></tr>
507 <tr>
508 <td width="58" nowrap="nowrap"><?php echo __('Operator'); ?></td>
509 <td width="102"><select name="h_operator" id="h_operator">
510 <option value="---" selected="selected">---</option>
511 <option value="None" > <?php echo __('None'); ?> </option>
512 <option value="sum" > SUM </option>
513 <option value="min"> MIN </option>
514 <option value="max"> MAX </option>
515 <option value="avg"> AVG </option>
516 <option value="count"> COUNT </option>
517 </select>
518 </td></tr>
519 <tr>
520 <td width="58" nowrap="nowrap"><?php echo __('Relation operator'); ?></td>
521 <td width="102"><select name="h_rel_opt" id="h_rel_opt">
522 <option value="--" selected="selected"> -- </option>
523 <option value="=" > = </option>
524 <option value=">"> > </option>
525 <option value="<"> < </option>
526 <option value=">="> >= </option>
527 <option value="<="> <= </option>
528 <option value="NOT"> NOT </option>
529 <option value="IN"> IN </option>
530 <option value="EXCEPT"> <?php echo __('Except'); ?> </option>
531 <option value="NOT IN"> NOT IN </option>
532 </select>
533 </td>
534 </tr>
535 <tr>
536 <td width="58" nowrap="nowrap"><?php echo __('Value'); ?>/<br/><?php echo __('subquery'); ?></td>
537 <td width="102"><textarea id="having" value="" cols="18"></textarea></td>
538 </tr>
539 </tbody>
540 <tbody>
541 <tr>
542 <td colspan="2" align="center" nowrap="nowrap">
543 <input type="button" class="butt" name="Button"
544 value="<?php echo __('OK'); ?>" onclick="add_object()" />
545 <input type="button" class="butt" name="Button"
546 value="<?php echo __('Cancel'); ?>"
547 onclick="Close_option()" />
548 </td>
549 </tr>
550 </tbody>
551 </table>
552 </td>
553 <td class="frams6"></td>
554 </tr>
555 <tr>
556 <td class="frams4"><div class="bor"></div></td>
557 <td class="frams7"></td>
558 <td class="frams3"></td>
559 </tr>
560 </tbody>
561 </table>
563 <table id="query_rename_to" style="visibility:<?php echo $hidden ?>;"
564 width="5%" border="0" cellpadding="0" cellspacing="0">
565 <tbody>
566 <tr>
567 <td class="frams1" width="10px"></td>
568 <td class="frams5" width="99%" ></td>
569 <td class="frams2" width="10px"><div class="bor"></div></td>
570 </tr>
571 <tr>
572 <td class="frams8"></td>
573 <td class="input_tab">
574 <table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
575 <thead>
576 <tr>
577 <td colspan="2" align="center" nowrap="nowrap"><strong><?php echo __('Rename to'); ?></strong></td>
578 </tr>
579 </thead>
580 <tbody id="rename_to">
581 <tr>
582 <td width="58" nowrap="nowrap"><?php echo __('New name'); ?></td>
583 <td width="102">
584 <input type="text" value="" id="e_rename"/>
585 </td>
586 </tr>
587 </tbody>
588 <tbody>
589 <tr>
590 <td colspan="2" align="center" nowrap="nowrap">
591 <input type="button" class="butt" name="Button"
592 value="<?php echo __('OK'); ?>" onclick="edit('Rename')" />
593 <input type="button" class="butt" name="Button"
594 value="<?php echo __('Cancel'); ?>"
595 onclick="document.getElementById('query_rename_to').style.visibility = 'hidden';" />
596 </td>
597 </tr>
598 </tbody>
599 </table>
600 </td>
601 <td class="frams6"></td>
602 </tr>
603 <tr>
604 <td class="frams4"><div class="bor"></div></td>
605 <td class="frams7"></td>
606 <td class="frams3"></td>
607 </tr>
608 </tbody>
609 </table>
611 <table id="query_having" style="visibility:<?php echo $hidden ?>;"
612 width="5%" border="0" cellpadding="0" cellspacing="0">
613 <tbody>
614 <tr>
615 <td class="frams1" width="10px"></td>
616 <td class="frams5" width="99%" ></td>
617 <td class="frams2" width="10px"><div class="bor"></div></td>
618 </tr>
619 <tr>
620 <td class="frams8"></td>
621 <td class="input_tab">
622 <table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
623 <thead>
624 <tr>
625 <td colspan="2" align="center" nowrap="nowrap"><strong>HAVING</strong></td>
626 </tr>
627 </thead>
628 <tbody id="rename_to">
629 <tr>
630 <td width="58" nowrap="nowrap"><?php echo __('Operator'); ?></td>
631 <td width="102"><select name="hoperator" id="hoperator">
632 <option value="---" selected="selected">---</option>
633 <option value="None" > None </option>
634 <option value="sum" > SUM </option>
635 <option value="min"> MIN </option>
636 <option value="max"> MAX </option>
637 <option value="avg"> AVG </option>
638 <option value="count"> COUNT </option>
639 </select>
640 </td></tr>
641 <tr>
642 <tr>
643 <td width="58" nowrap="nowrap"><?php echo __('Operator'); ?></td>
644 <td width="102"><select name="hrel_opt" id="hrel_opt">
645 <option value="--" selected="selected"> -- </option>
646 <option value="=" > = </option>
647 <option value=">"> > </option>
648 <option value="<"> < </option>
649 <option value=">="> >= </option>
650 <option value="<="> <= </option>
651 <option value="NOT"> NOT </option>
652 <option value="IN"> IN </option>
653 <option value="EXCEPT"> <?php echo __('Except'); ?> </option>
654 <option value="NOT IN"> NOT IN </option>
655 </select>
656 </td>
657 </tr>
658 <tr>
659 <td nowrap="nowrap"><?php echo __('Value'); ?>/<br /><?php echo __('subquery'); ?></td>
660 <td><textarea id="hQuery" value="" cols="18"></textarea>
661 </td>
662 </tr>
663 </tbody>
664 <tbody>
665 <tr>
666 <td colspan="2" align="center" nowrap="nowrap">
667 <input type="button" class="butt" name="Button"
668 value="<?php echo __('OK'); ?>" onclick="edit('Having')" />
669 <input type="button" class="butt" name="Button"
670 value="<?php echo __('Cancel'); ?>"
671 onclick="document.getElementById('query_having').style.visibility = 'hidden';" />
672 </td>
673 </tr>
674 </tbody>
675 </table>
676 </td>
677 <td class="frams6"></td>
678 </tr>
679 <tr>
680 <td class="frams4"><div class="bor"></div></td>
681 <td class="frams7"></td>
682 <td class="frams3"></td>
683 </tr>
684 </tbody>
685 </table>
687 <table id="query_Aggregate" style="visibility:<?php echo $hidden ?>;"
688 width="5%" border="0" cellpadding="0" cellspacing="0">
689 <tbody>
690 <tr>
691 <td class="frams1" width="10px"></td>
692 <td class="frams5" width="99%" ></td>
693 <td class="frams2" width="10px"><div class="bor"></div></td>
694 </tr>
695 <tr>
696 <td class="frams8"></td>
697 <td class="input_tab">
698 <table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
699 <thead>
700 <tr>
701 <td colspan="2" align="center" nowrap="nowrap"><strong><?php echo __('Aggregate'); ?></strong></td>
702 </tr>
703 </thead>
704 <tbody>
705 <tr>
706 <td width="58" nowrap="nowrap"><?php echo __('Operator'); ?></td>
707 <td width="102">
708 <select name="operator" id="e_operator">
709 <option value="---" selected="selected">---</option>
710 <option value="sum" > SUM </option>
711 <option value="min"> MIN </option>
712 <option value="max"> MAX </option>
713 <option value="avg"> AVG </option>
714 <option value="avg"> COUNT </option>
715 </select>
716 </td></tr>
717 </tbody>
718 <tbody>
719 <tr>
720 <td colspan="2" align="center" nowrap="nowrap">
721 <input type="button" class="butt" name="Button"
722 value="<?php echo __('OK'); ?>" onclick="edit('Aggregate')" />
723 <input type="button" class="butt" name="Button"
724 value="<?php echo __('Cancel'); ?>"
725 onclick="document.getElementById('query_Aggregate').style.visibility = 'hidden';" />
726 </td>
727 </tr>
728 </tbody>
729 </table>
730 </td>
731 <td class="frams6"></td>
732 </tr>
733 <tr>
734 <td class="frams4"><div class="bor"></div></td>
735 <td class="frams7"></td>
736 <td class="frams3"></td>
737 </tr>
738 </tbody>
739 </table>
741 <table id="query_where" style="visibility:<?php echo $hidden ?>;"
742 width="5%" border="0" cellpadding="0" cellspacing="0">
743 <tbody>
744 <tr>
745 <td class="frams1" width="10px"></td>
746 <td class="frams5" width="99%" ></td>
747 <td class="frams2" width="10px"><div class="bor"></div></td>
748 </tr>
749 <tr>
750 <td class="frams8"></td>
751 <td class="input_tab">
752 <table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
753 <thead>
754 <tr>
755 <td colspan="2" align="center" nowrap="nowrap"><strong>WHERE</strong></td>
756 </tr>
757 </thead>
758 <tbody id="rename_to">
759 <tr>
760 <td width="58" nowrap="nowrap"><?php echo __('Operator'); ?></td>
761 <td width="102"><select name="erel_opt" id="erel_opt">
762 <option value="--" selected="selected"> -- </option>
763 <option value="=" > = </option>
764 <option value=">"> > </option>
765 <option value="<"> < </option>
766 <option value=">="> >= </option>
767 <option value="<="> <= </option>
768 <option value="NOT"> NOT </option>
769 <option value="IN"> IN </option>
770 <option value="EXCEPT"> <?php echo __('Except'); ?> </option>
771 <option value="NOT IN"> NOT IN </option>
772 </select>
773 </td>
774 </tr>
775 <tr>
776 <td nowrap="nowrap"><?php echo __('Value'); ?>/<br /><?php echo __('subquery'); ?></td>
777 <td><textarea id="eQuery" value="" cols="18"></textarea>
778 </td>
779 </tr>
780 </tbody>
781 <tbody>
782 <tr>
783 <td colspan="2" align="center" nowrap="nowrap">
784 <input type="button" class="butt" name="Button"
785 value="<?php echo __('OK'); ?>" onclick="edit('Where')" />
786 <input type="button" class="butt" name="Button"
787 value="<?php echo __('Cancel'); ?>"
788 onclick="document.getElementById('query_where').style.visibility = 'hidden';" />
789 </td>
790 </tr>
791 </tbody>
792 </table>
793 </td>
794 <td class="frams6"></td>
795 </tr>
796 <tr>
797 <td class="frams4"><div class="bor"></div></td>
798 <td class="frams7"></td>
799 <td class="frams3"></td>
800 </tr>
801 </tbody>
802 </table>
804 <?php
805 if($_REQUEST['query']) {
806 echo '<div class="panel">';
807 echo '<div style="clear:both;"></div>';
808 echo '<div id="ab"></div>';
809 echo '<div style="clear:both;"></div>';
810 echo '</div>';
811 echo '<a class="trigger" href="#">' . __('Active options') . '</a>';
812 echo '<div id="filter"></div>';
813 echo '<div id="box">';
814 echo '<span id="boxtitle"></span>';
815 echo '<form method="post" action="db_qbe.php" >';
816 echo '<textarea cols="80" name="sql_query" id="textSqlquery" rows="15"></textarea><div id="tblfooter">';
817 echo ' <input type="submit" name="submit_sql" class="btn">';
818 echo ' <input type="button" name="cancel" value="Cancel" onClick="closebox()" class="btn">';
819 echo PMA_generate_common_hidden_inputs($GLOBALS['db']);
820 echo '</div></p>';
821 echo '</form></div>';
823 } ?>
826 <!-- cache images -->
827 <img src="pmd/images/2leftarrow_m.png" width="0" height="0" alt="" />
828 <img src="pmd/images/rightarrow1.png" width="0" height="0" alt="" />
829 <img src="pmd/images/rightarrow2.png" width="0" height="0" alt="" />
830 <img src="pmd/images/uparrow2_m.png" width="0" height="0" alt="" />
831 </body>
832 </html>