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