formating;
XHTML compliance; improved IE compatibility;
This commit is contained in:
@@ -77,7 +77,7 @@ function MouseDown(e)
|
|||||||
cur_click.style.zIndex = 2;
|
cur_click.style.zIndex = 2;
|
||||||
}
|
}
|
||||||
if (layer_menu_cur_click) {
|
if (layer_menu_cur_click) {
|
||||||
offsetx = isIE ? event.clientX + document.body.scrollLeft: e.pageX;
|
offsetx = isIE ? event.clientX + document.body.scrollLeft : e.pageX;
|
||||||
dx = offsetx - parseInt(document.getElementById("layer_menu").style.width);
|
dx = offsetx - parseInt(document.getElementById("layer_menu").style.width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,18 +86,17 @@ function MouseMove(e)
|
|||||||
{
|
{
|
||||||
//Glob_X = e.pageX;
|
//Glob_X = e.pageX;
|
||||||
//Glob_Y = e.pageY;
|
//Glob_Y = e.pageY;
|
||||||
Glob_X = isIE ? event.clientX + document.body.scrollLeft: e.pageX;
|
Glob_X = isIE ? event.clientX + document.body.scrollLeft : e.pageX;
|
||||||
Glob_Y = isIE ? event.clientY + document.body.scrollTop: e.pageY;
|
Glob_Y = isIE ? event.clientY + document.body.scrollTop : e.pageY;
|
||||||
|
|
||||||
//mouseX = (bw.ns4||bw.ns6)? e.pageX: bw.ie&&bw.win&&!bw.ie4? (event.clientX-2)+document.body.scrollLeft : event.clientX+document.body.scrollLeft;
|
//mouseX = (bw.ns4||bw.ns6)? e.pageX: bw.ie&&bw.win&&!bw.ie4? (event.clientX-2)+document.body.scrollLeft : event.clientX+document.body.scrollLeft;
|
||||||
//mouseY = (bw.ns4||bw.ns6)? e.pageY: bw.ie&&bw.win&&!bw.ie4? (event.clientY-2)+document.body.scrollTop : event.clientY+document.body.scrollTop;
|
//mouseY = (bw.ns4||bw.ns6)? e.pageY: bw.ie&&bw.win&&!bw.ie4? (event.clientY-2)+document.body.scrollTop : event.clientY+document.body.scrollTop;
|
||||||
|
|
||||||
//window.status = "X = "+ Glob_X + " Y = "+ Glob_Y;
|
//window.status = "X = "+ Glob_X + " Y = "+ Glob_Y;
|
||||||
|
|
||||||
var mGx, mGy;
|
|
||||||
if (cur_click != null) {
|
if (cur_click != null) {
|
||||||
mGx = Glob_X - dx;
|
var mGx = Glob_X - dx;
|
||||||
mGy = Glob_Y - dy;
|
var mGy = Glob_Y - dy;
|
||||||
mGx = mGx > 0 ? mGx : 0;
|
mGx = mGx > 0 ? mGx : 0;
|
||||||
mGy = mGy > 0 ? mGy : 0;
|
mGy = mGy > 0 ? mGy : 0;
|
||||||
|
|
||||||
@@ -106,17 +105,17 @@ function MouseMove(e)
|
|||||||
mGy = mGy % step < step / 2 ? mGy - mGy % step : mGy - mGy % step + step;
|
mGy = mGy % step < step / 2 ? mGy - mGy % step : mGy - mGy % step + step;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_click.style.left = mGx;
|
cur_click.style.left = mGx + 'px';
|
||||||
cur_click.style.top = mGy;
|
cur_click.style.top = mGy + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ON_relation || ON_display_field) {
|
if (ON_relation || ON_display_field) {
|
||||||
document.getElementById('hint').style.left = Glob_X + 20;
|
document.getElementById('hint').style.left = (Glob_X + 20) + 'px';
|
||||||
document.getElementById('hint').style.top = Glob_Y + 20;
|
document.getElementById('hint').style.top = (Glob_Y + 20) + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layer_menu_cur_click) {
|
if (layer_menu_cur_click) {
|
||||||
document.getElementById("layer_menu").style.width = Glob_X - dx>=150?Glob_X - dx:150;
|
document.getElementById("layer_menu").style.width = ((Glob_X - dx) >= 150 ? Glob_X - dx : 150) + 'px';
|
||||||
//document.getElementById("layer_menu").style.height = Glob_Y - dy>=200?Glob_Y - dy:200;
|
//document.getElementById("layer_menu").style.height = Glob_Y - dy>=200?Glob_Y - dy:200;
|
||||||
//document.getElementById("id_scroll_tab").style.height = Glob_Y - dy2;
|
//document.getElementById("id_scroll_tab").style.height = Glob_Y - dy2;
|
||||||
}
|
}
|
||||||
@@ -149,8 +148,8 @@ function Canvas_pos()
|
|||||||
canvas_height = document.getElementById('canvas').height = osn_tab_height - 3;
|
canvas_height = document.getElementById('canvas').height = osn_tab_height - 3;
|
||||||
|
|
||||||
if (isIE) {
|
if (isIE) {
|
||||||
document.getElementById('canvas').style.width = (osn_tab_width - 3)?(osn_tab_width - 3):0;
|
document.getElementById('canvas').style.width = ((osn_tab_width - 3)?(osn_tab_width - 3):0) + 'px';
|
||||||
document.getElementById('canvas').style.height = (osn_tab_height - 3)?(osn_tab_height - 3):0;
|
document.getElementById('canvas').style.height = ((osn_tab_height - 3)?(osn_tab_height - 3):0) + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +169,7 @@ function Main()
|
|||||||
document.getElementById('layer_menu').style.position = 'absolute';
|
document.getElementById('layer_menu').style.position = 'absolute';
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("layer_menu").style.top = -1000; //fast scroll
|
document.getElementById("layer_menu").style.top = -1000 + 'px'; //fast scroll
|
||||||
sm_x += document.getElementById('osn_tab').offsetLeft;
|
sm_x += document.getElementById('osn_tab').offsetLeft;
|
||||||
sm_y += document.getElementById('osn_tab').offsetTop;
|
sm_y += document.getElementById('osn_tab').offsetTop;
|
||||||
Osn_tab_pos();
|
Osn_tab_pos();
|
||||||
@@ -195,15 +194,18 @@ function Rezize_osn_tab()
|
|||||||
max_X = max_X < k_x ? k_x : max_X;
|
max_X = max_X < k_x ? k_x : max_X;
|
||||||
max_Y = max_Y < k_y ? k_y : max_Y;
|
max_Y = max_Y < k_y ? k_y : max_Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
osn_tab_width = max_X + 50;
|
osn_tab_width = max_X + 50;
|
||||||
osn_tab_height = max_Y + 50;
|
osn_tab_height = max_Y + 50;
|
||||||
Canvas_pos();
|
Canvas_pos();
|
||||||
document.getElementById('osn_tab').style.width = osn_tab_width;
|
document.getElementById('osn_tab').style.width = osn_tab_width + 'px';
|
||||||
document.getElementById('osn_tab').style.height = osn_tab_height;
|
document.getElementById('osn_tab').style.height = osn_tab_height + 'px';
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* refreshes display, must be called after state changes
|
||||||
|
*/
|
||||||
function Re_load()
|
function Re_load()
|
||||||
{
|
{
|
||||||
Rezize_osn_tab();
|
Rezize_osn_tab();
|
||||||
@@ -217,8 +219,11 @@ function Re_load()
|
|||||||
for (key2 in contr[K][key]) // table name
|
for (key2 in contr[K][key]) // table name
|
||||||
for (key3 in contr[K][key][key2]) // field name
|
for (key3 in contr[K][key][key2]) // field name
|
||||||
{
|
{
|
||||||
if (!document.getElementById("check_vis_"+key2).checked ||
|
if (!document.getElementById("check_vis_" + key2).checked ||
|
||||||
!document.getElementById("check_vis_"+contr[K][key][key2][key3][0]).checked) continue; // if hide
|
!document.getElementById("check_vis_" + contr[K][key][key2][key3][0]).checked) {
|
||||||
|
// if hide
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var x1_left = document.getElementById(key2).offsetLeft+1;
|
var x1_left = document.getElementById(key2).offsetLeft+1;
|
||||||
var x1_right = x1_left + document.getElementById(key2).offsetWidth;
|
var x1_right = x1_left + document.getElementById(key2).offsetWidth;
|
||||||
var x2_left = document.getElementById(contr[K][key][key2][key3][0]).offsetLeft;
|
var x2_left = document.getElementById(contr[K][key][key2][key3][0]).offsetLeft;
|
||||||
@@ -230,7 +235,7 @@ function Re_load()
|
|||||||
n = s_left = s_right = 0;
|
n = s_left = s_right = 0;
|
||||||
for (var i = 1; i < 4; i++) {
|
for (var i = 1; i < 4; i++) {
|
||||||
if (a[n] > a[i]) {
|
if (a[n] > a[i]) {
|
||||||
n=i;
|
n = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
@@ -257,15 +262,43 @@ function Re_load()
|
|||||||
x2 = x2_left - sm_s;
|
x2 = x2_left - sm_s;
|
||||||
s_left = 1;
|
s_left = 1;
|
||||||
}
|
}
|
||||||
//alert(key2+"."+key3);
|
//alert(key2 + "." + key3);
|
||||||
var y1 = document.getElementById(key2).offsetTop + document.getElementById(key2 + "." + key3).offsetTop + height_field;
|
|
||||||
|
var row_offset_top = 0;
|
||||||
|
//alert('id_tbody_' + key2);
|
||||||
|
//alert(document.getElementById('id_hide_tbody_' + key2));
|
||||||
|
var tab_hide_button = document.getElementById('id_hide_tbody_' + key2);
|
||||||
|
|
||||||
|
//alert(tab_hide_button.innerHTML);
|
||||||
|
if (tab_hide_button.innerHTML == 'v') {
|
||||||
|
row_offset_top = document.getElementById(key2 + "." + key3).offsetTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
var y1 = document.getElementById(key2).offsetTop
|
||||||
|
+ row_offset_top
|
||||||
|
+ height_field;
|
||||||
//alert(1);
|
//alert(1);
|
||||||
var y2 = document.getElementById(contr[K][key][key2][key3][0]).offsetTop +
|
|
||||||
document.getElementById(contr[K][key][key2][key3][0] + "." + contr[K][key][key2][key3][1]).offsetTop + height_field;
|
row_offset_top = 0;
|
||||||
|
var tab_hide_button = document.getElementById('id_hide_tbody_' + contr[K][key][key2][key3][0]);
|
||||||
|
if (tab_hide_button.innerHTML == 'v') {
|
||||||
|
row_offset_top = document.getElementById(contr[K][key][key2][key3][0]
|
||||||
|
+ '.' + contr[K][key][key2][key3][1]).offsetTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
var y2 =
|
||||||
|
document.getElementById(contr[K][key][key2][key3][0]).offsetTop
|
||||||
|
+ row_offset_top
|
||||||
|
+ height_field;
|
||||||
|
|
||||||
|
//alert(y1 + ' - ' + key2 + "." + key3);
|
||||||
Line0(x1 - sm_x, y1 - sm_y, x2 - sm_x, y2 - sm_y, "rgba(0,100,150,1)");
|
Line0(x1 - sm_x, y1 - sm_y, x2 - sm_x, y2 - sm_y, "rgba(0,100,150,1)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* draws a line from x1:y1 to x2:y2 with color
|
||||||
|
*/
|
||||||
function Line(x1, y1, x2, y2, color_line)
|
function Line(x1, y1, x2, y2, color_line)
|
||||||
{
|
{
|
||||||
var canvas = document.getElementById("canvas");
|
var canvas = document.getElementById("canvas");
|
||||||
@@ -278,8 +311,14 @@ function Line(x1, y1, x2, y2, color_line)
|
|||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* draws a relation/constraint line, whether angular or not
|
||||||
|
*/
|
||||||
function Line0(x1, y1, x2, y2, color_line)
|
function Line0(x1, y1, x2, y2, color_line)
|
||||||
{
|
{
|
||||||
|
Circle(x1, y1, 3, 3, "rgba(0,0,255,1)");
|
||||||
|
Rect(x2 - 1, y2 - 2, 4, 4, "rgba(0,0,255,1)");
|
||||||
|
|
||||||
if (ON_angular_direct) {
|
if (ON_angular_direct) {
|
||||||
Line2(x1, y1, x2, y2, color_line);
|
Line2(x1, y1, x2, y2, color_line);
|
||||||
} else {
|
} else {
|
||||||
@@ -287,14 +326,14 @@ function Line0(x1, y1, x2, y2, color_line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* draws a angualr relation/constraint line
|
||||||
|
*/
|
||||||
function Line2(x1, y1, x2, y2, color_line)
|
function Line2(x1, y1, x2, y2, color_line)
|
||||||
{
|
{
|
||||||
var x1_ = x1;
|
var x1_ = x1;
|
||||||
var x2_ = x2;
|
var x2_ = x2;
|
||||||
|
|
||||||
Circle(x1, y1, 3, 3, "rgba(0,0,255,1)");
|
|
||||||
Rect(x2 - 1, y2 - 2, 4, 4, "rgba(0,0,255,1)");
|
|
||||||
|
|
||||||
if (s_right) {
|
if (s_right) {
|
||||||
x1_ += sm_add;
|
x1_ += sm_add;
|
||||||
x2_ += sm_add;
|
x2_ += sm_add;
|
||||||
@@ -314,14 +353,14 @@ function Line2(x1, y1, x2, y2, color_line)
|
|||||||
Line(x1_, y1, x2_, y2, color_line);
|
Line(x1_, y1, x2_, y2, color_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* draws a relation/constraint line
|
||||||
|
*/
|
||||||
function Line3(x1, y1, x2, y2, color_line)
|
function Line3(x1, y1, x2, y2, color_line)
|
||||||
{
|
{
|
||||||
var x1_ = x1;
|
var x1_ = x1;
|
||||||
var x2_ = x2;
|
var x2_ = x2;
|
||||||
Circle(x1, y1, 3, 3, "rgba(0,0,255,1)");
|
|
||||||
Rect(x2 - 1, y2 - 2, 4, 4, "rgba(0,0,255,1)");
|
|
||||||
|
|
||||||
var x_s = (x1 + x2) / 2;
|
|
||||||
if (s_right) {
|
if (s_right) {
|
||||||
if (x1 < x2) {
|
if (x1 < x2) {
|
||||||
x1_ += x2 - x1 + sm_add;
|
x1_ += x2 - x1 + sm_add;
|
||||||
@@ -334,7 +373,7 @@ function Line3(x1, y1, x2, y2, color_line)
|
|||||||
Line(x1, y1, x1_, y1, color_line);
|
Line(x1, y1, x1_, y1, color_line);
|
||||||
Line(x2, y2, x2_, y2, color_line);
|
Line(x2, y2, x2_, y2, color_line);
|
||||||
Line(x1_, y1, x2_, y2, color_line);
|
Line(x1_, y1, x2_, y2, color_line);
|
||||||
return; //0
|
return;
|
||||||
}
|
}
|
||||||
if (s_left) {
|
if (s_left) {
|
||||||
if (x1 < x2) {
|
if (x1 < x2) {
|
||||||
@@ -348,14 +387,13 @@ function Line3(x1, y1, x2, y2, color_line)
|
|||||||
Line(x1, y1, x1_, y1, color_line);
|
Line(x1, y1, x1_, y1, color_line);
|
||||||
Line(x2, y2, x2_, y2, color_line);
|
Line(x2, y2, x2_, y2, color_line);
|
||||||
Line(x1_, y1, x2_, y2, color_line);
|
Line(x1_, y1, x2_, y2, color_line);
|
||||||
return; //0
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var x_s = (x1 + x2) / 2;
|
||||||
Line(x1, y1, x_s, y1, color_line);
|
Line(x1, y1, x_s, y1, color_line);
|
||||||
Line(x_s, y2, x2, y2, color_line);
|
Line(x_s, y2, x2, y2, color_line);
|
||||||
Line(x_s, y1, x_s, y2, color_line);
|
Line(x_s, y1, x_s, y2, color_line);
|
||||||
|
|
||||||
//return ???
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Circle(x, y, r, w, color)
|
function Circle(x, y, r, w, color)
|
||||||
@@ -387,10 +425,10 @@ function Rect(x1, y1, w, h, color)
|
|||||||
function Save(url) // (del?) no for pdf
|
function Save(url) // (del?) no for pdf
|
||||||
{
|
{
|
||||||
for (key in j_tabs) {
|
for (key in j_tabs) {
|
||||||
document.getElementById('t_x['+key+']').value=parseInt(document.getElementById(key).style.left);
|
document.getElementById('t_x_' + key + '_').value = parseInt(document.getElementById(key).style.left);
|
||||||
document.getElementById('t_y['+key+']').value=parseInt(document.getElementById(key).style.top);
|
document.getElementById('t_y_' + key + '_').value = parseInt(document.getElementById(key).style.top);
|
||||||
document.getElementById('t_v['+key+']').value=document.getElementById('_|_tbody_'+key).style.display == 'none' ? 0 : 1;
|
document.getElementById('t_v_' + key + '_').value = document.getElementById('id_tbody_' + key).style.display == 'none' ? 0 : 1;
|
||||||
document.getElementById('t_h['+key+']').value=document.getElementById('check_vis_'+key).checked ? 1 : 0;
|
document.getElementById('t_h_' + key + '_').value = document.getElementById('check_vis_' + key).checked ? 1 : 0;
|
||||||
}
|
}
|
||||||
document.form1.action = url;
|
document.form1.action = url;
|
||||||
document.form1.submit();
|
document.form1.submit();
|
||||||
@@ -400,10 +438,10 @@ function Get_url_pos()
|
|||||||
{
|
{
|
||||||
var poststr = '';
|
var poststr = '';
|
||||||
for (key in j_tabs) {
|
for (key in j_tabs) {
|
||||||
poststr += '&t_x['+key+']=' + parseInt(document.getElementById(key).style.left);
|
poststr += '&t_x[' + key + ']=' + parseInt(document.getElementById(key).style.left);
|
||||||
poststr += '&t_y['+key+']=' + parseInt(document.getElementById(key).style.top);
|
poststr += '&t_y[' + key + ']=' + parseInt(document.getElementById(key).style.top);
|
||||||
poststr += '&t_v['+key+']=' + (document.getElementById('_|_tbody_'+key).style.display == 'none' ? 0 : 1);
|
poststr += '&t_v[' + key + ']=' + (document.getElementById('id_tbody_' + key).style.display == 'none' ? 0 : 1);
|
||||||
poststr += '&t_h['+key+']=' + (document.getElementById('check_vis_'+key).checked ? 1 : 0);
|
poststr += '&t_h[' + key + ']=' + (document.getElementById('check_vis_' + key).checked ? 1 : 0);
|
||||||
}
|
}
|
||||||
return poststr;
|
return poststr;
|
||||||
}
|
}
|
||||||
@@ -417,13 +455,9 @@ function Save2()
|
|||||||
|
|
||||||
function Grid()
|
function Grid()
|
||||||
{
|
{
|
||||||
if (!ON_grid ) {
|
if (!ON_grid) {
|
||||||
ON_grid = 1;
|
ON_grid = 1;
|
||||||
document.getElementById('grid_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA
|
document.getElementById('grid_button').className = 'M_butt_Selected_down';
|
||||||
|
|
||||||
if (isIE) { // correct for IE
|
|
||||||
document.getElementById('grid_button').className = 'M_butt_Selected_down_IE';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('grid_button').className = 'M_butt';
|
document.getElementById('grid_button').className = 'M_butt';
|
||||||
ON_grid = 0;
|
ON_grid = 0;
|
||||||
@@ -432,13 +466,9 @@ function Grid()
|
|||||||
|
|
||||||
function Angular_direct()
|
function Angular_direct()
|
||||||
{
|
{
|
||||||
if (ON_angular_direct ) {
|
if (ON_angular_direct) {
|
||||||
ON_angular_direct = 0;
|
ON_angular_direct = 0;
|
||||||
document.getElementById('angular_direct_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA
|
document.getElementById('angular_direct_button').className = 'M_butt_Selected_down';
|
||||||
|
|
||||||
if (isIE) { // correct for IE
|
|
||||||
document.getElementById('angular_direct_button').className = 'M_butt_Selected_down_IE';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ON_angular_direct = 1;
|
ON_angular_direct = 1;
|
||||||
document.getElementById('angular_direct_button').className = 'M_butt';
|
document.getElementById('angular_direct_button').className = 'M_butt';
|
||||||
@@ -457,11 +487,7 @@ function Start_relation()
|
|||||||
ON_relation = 1;
|
ON_relation = 1;
|
||||||
document.getElementById('hint').innerHTML = LangSelectReferencedKey;
|
document.getElementById('hint').innerHTML = LangSelectReferencedKey;
|
||||||
document.getElementById('hint').style.visibility = "visible";
|
document.getElementById('hint').style.visibility = "visible";
|
||||||
document.getElementById('rel_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA
|
document.getElementById('rel_button').className = 'M_butt_Selected_down';
|
||||||
|
|
||||||
if (isIE) { // correct for IE
|
|
||||||
document.getElementById('rel_button').className = 'M_butt_Selected_down_IE';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('hint').innerHTML = "";
|
document.getElementById('hint').innerHTML = "";
|
||||||
document.getElementById('hint').style.visibility = "hidden";
|
document.getElementById('hint').style.visibility = "hidden";
|
||||||
@@ -491,8 +517,10 @@ function Click_field(T, f, PK) // table field
|
|||||||
if (j_tabs[db + '.' + T] != 'INNODB' || !PK) {
|
if (j_tabs[db + '.' + T] != 'INNODB' || !PK) {
|
||||||
document.getElementById('InnoDB_relation').style.display = 'none';
|
document.getElementById('InnoDB_relation').style.display = 'none';
|
||||||
}
|
}
|
||||||
document.getElementById('layer_new_relation').style.left = Glob_X - (document.getElementById('layer_new_relation').offsetWidth>>1);
|
var left = Glob_X - (document.getElementById('layer_new_relation').offsetWidth>>1);
|
||||||
document.getElementById('layer_new_relation').style.top = Glob_Y - document.getElementById('layer_new_relation').offsetHeight - 10;
|
document.getElementById('layer_new_relation').style.left = left + 'px';
|
||||||
|
var top = Glob_Y - document.getElementById('layer_new_relation').offsetHeight - 10;
|
||||||
|
document.getElementById('layer_new_relation').style.top = top + 'px';
|
||||||
document.getElementById('layer_new_relation').style.visibility = "visible";
|
document.getElementById('layer_new_relation').style.visibility = "visible";
|
||||||
link_relation += '&T2=' + T + '&F2=' + f;
|
link_relation += '&T2=' + T + '&F2=' + f;
|
||||||
}
|
}
|
||||||
@@ -511,7 +539,7 @@ function Click_field(T, f, PK) // table field
|
|||||||
} else {
|
} else {
|
||||||
old_class = 'tab_field_3';
|
old_class = 'tab_field_3';
|
||||||
if (display_field[T]) {
|
if (display_field[T]) {
|
||||||
document.getElementById('_|_tr_' + T + '.' + display_field[T]).className = 'tab_field';
|
document.getElementById('id_tr_' + T + '.' + display_field[T]).className = 'tab_field';
|
||||||
//display_field.splice(T, 1);
|
//display_field.splice(T, 1);
|
||||||
delete display_field[T];
|
delete display_field[T];
|
||||||
}
|
}
|
||||||
@@ -551,13 +579,9 @@ function Start_tab_upd(table)
|
|||||||
|
|
||||||
function Small_tab_all(id_this) // max/min all tables
|
function Small_tab_all(id_this) // max/min all tables
|
||||||
{
|
{
|
||||||
if (isIE) {
|
|
||||||
alert(LangIEnotSupport);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (id_this.alt == "v") {
|
if (id_this.alt == "v") {
|
||||||
for (key in j_tabs) {
|
for (key in j_tabs) {
|
||||||
if (document.getElementById('_|_hide_tbody_'+key).innerHTML == "v") {
|
if (document.getElementById('id_hide_tbody_'+key).innerHTML == "v") {
|
||||||
Small_tab(key, 0);
|
Small_tab(key, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -565,7 +589,7 @@ function Small_tab_all(id_this) // max/min all tables
|
|||||||
id_this.src = "pmd/images/rightarrow1.png";
|
id_this.src = "pmd/images/rightarrow1.png";
|
||||||
} else {
|
} else {
|
||||||
for (key in j_tabs) {
|
for (key in j_tabs) {
|
||||||
if (document.getElementById('_|_hide_tbody_'+key).innerHTML != "v") {
|
if (document.getElementById('id_hide_tbody_'+key).innerHTML != "v") {
|
||||||
Small_tab(key, 0);
|
Small_tab(key, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -577,10 +601,6 @@ function Small_tab_all(id_this) // max/min all tables
|
|||||||
|
|
||||||
function Small_tab_invert() // invert max/min all tables
|
function Small_tab_invert() // invert max/min all tables
|
||||||
{
|
{
|
||||||
if (isIE) {
|
|
||||||
alert(LangIEnotSupport);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (key in j_tabs) {
|
for (key in j_tabs) {
|
||||||
Small_tab(key, 0);
|
Small_tab(key, 0);
|
||||||
}
|
}
|
||||||
@@ -590,7 +610,7 @@ function Small_tab_invert() // invert max/min all tables
|
|||||||
function Small_tab_refresh()
|
function Small_tab_refresh()
|
||||||
{
|
{
|
||||||
for (key in j_tabs) {
|
for (key in j_tabs) {
|
||||||
if(document.getElementById('_|_hide_tbody_'+key).innerHTML != "v") {
|
if(document.getElementById('id_hide_tbody_'+key).innerHTML != "v") {
|
||||||
Small_tab(key, 0);
|
Small_tab(key, 0);
|
||||||
Small_tab(key, 0);
|
Small_tab(key, 0);
|
||||||
}
|
}
|
||||||
@@ -599,16 +619,13 @@ function Small_tab_refresh()
|
|||||||
|
|
||||||
function Small_tab(t, re_load)
|
function Small_tab(t, re_load)
|
||||||
{
|
{
|
||||||
var id = document.getElementById('_|_tbody_' + t);
|
var id = document.getElementById('id_tbody_' + t);
|
||||||
var id_this = document.getElementById('_|_hide_tbody_' + t);
|
var id_this = document.getElementById('id_hide_tbody_' + t);
|
||||||
var id_t = document.getElementById(t);
|
var id_t = document.getElementById(t);
|
||||||
|
|
||||||
id_t.style.width = id_t.offsetWidth;
|
id_t.style.width = id_t.offsetWidth + 'px';
|
||||||
if (id_this.innerHTML == "v") {
|
if (id_this.innerHTML == "v") {
|
||||||
//---CROSS
|
//---CROSS
|
||||||
if (isIE) {
|
|
||||||
return; //IE not supported
|
|
||||||
}
|
|
||||||
id.style.display = 'none';
|
id.style.display = 'none';
|
||||||
id_this.innerHTML = '>';
|
id_this.innerHTML = '>';
|
||||||
} else {
|
} else {
|
||||||
@@ -622,17 +639,17 @@ function Small_tab(t, re_load)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function Select_tab(t)
|
function Select_tab(t)
|
||||||
{
|
{
|
||||||
var id_zag = document.getElementById('_|_zag_' + t);
|
var id_zag = document.getElementById('id_zag_' + t);
|
||||||
if (id_zag.className != 'tab_zag_3') {
|
if (id_zag.className != 'tab_zag_3') {
|
||||||
document.getElementById('_|_zag_' + t).className = 'tab_zag_2';
|
document.getElementById('id_zag_' + t).className = 'tab_zag_2';
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('_|_zag_' + t).className = 'tab_zag';
|
document.getElementById('id_zag_' + t).className = 'tab_zag';
|
||||||
}
|
}
|
||||||
//----------
|
//----------
|
||||||
var id_t = document.getElementById(t);
|
var id_t = document.getElementById(t);
|
||||||
window.scrollTo(parseInt(id_t.style.left) - 300, parseInt(id_t.style.top) - 300);
|
window.scrollTo(parseInt(id_t.style.left) - 300, parseInt(id_t.style.top) - 300);
|
||||||
|
|
||||||
setTimeout(function(){document.getElementById('_|_zag_' + t).className = 'tab_zag';}, 800);
|
setTimeout(function(){document.getElementById('id_zag_' + t).className = 'tab_zag';}, 800);
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -707,8 +724,10 @@ function Canvas_click(id)
|
|||||||
if (selected) {
|
if (selected) {
|
||||||
// select relations
|
// select relations
|
||||||
//alert(Key0+' - '+Key1+' - '+Key2+' - '+Key3);
|
//alert(Key0+' - '+Key1+' - '+Key2+' - '+Key3);
|
||||||
document.getElementById('layer_upd_relation').style.left = Glob_X - (document.getElementById('layer_upd_relation').offsetWidth>>1);
|
var left = Glob_X - (document.getElementById('layer_upd_relation').offsetWidth>>1);
|
||||||
document.getElementById('layer_upd_relation').style.top = Glob_Y - document.getElementById('layer_upd_relation').offsetHeight - 10;
|
document.getElementById('layer_upd_relation').style.left = left + 'px';
|
||||||
|
var top = Glob_Y - document.getElementById('layer_upd_relation').offsetHeight - 10;
|
||||||
|
document.getElementById('layer_upd_relation').style.top = top + 'px';
|
||||||
document.getElementById('layer_upd_relation').style.visibility = 'visible';
|
document.getElementById('layer_upd_relation').style.visibility = 'visible';
|
||||||
link_relation = 'T1=' + Key0 + '&F1=' + Key1 + '&T2=' + Key2 + '&F2=' + Key3 + '&K=' + Key;
|
link_relation = 'T1=' + Key0 + '&F1=' + Key1 + '&T2=' + Key2 + '&F2=' + Key3 + '&K=' + Key;
|
||||||
}
|
}
|
||||||
@@ -828,10 +847,10 @@ function General_scroll()
|
|||||||
(
|
(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
document.getElementById('top_menu').style.left = document.body.scrollLeft;
|
document.getElementById('top_menu').style.left = document.body.scrollLeft + 'px';
|
||||||
document.getElementById('top_menu').style.top = document.body.scrollTop;
|
document.getElementById('top_menu').style.top = document.body.scrollTop + 'px';
|
||||||
document.getElementById('layer_menu').style.left = document.body.scrollLeft;
|
document.getElementById('layer_menu').style.left = document.body.scrollLeft + 'px';
|
||||||
document.getElementById('layer_menu').style.top = document.body.scrollTop + document.getElementById('top_menu').offsetHeight;
|
document.getElementById('layer_menu').style.top = (document.body.scrollTop + document.getElementById('top_menu').offsetHeight) + 'px';
|
||||||
}
|
}
|
||||||
,200
|
,200
|
||||||
);
|
);
|
||||||
@@ -853,7 +872,7 @@ function General_scroll_end()
|
|||||||
function Show_left_menu(id_this) // max/min all tables
|
function Show_left_menu(id_this) // max/min all tables
|
||||||
{
|
{
|
||||||
if (id_this.alt == "v") {
|
if (id_this.alt == "v") {
|
||||||
document.getElementById("layer_menu").style.top = document.getElementById('top_menu').offsetHeight;
|
document.getElementById("layer_menu").style.top = document.getElementById('top_menu').offsetHeight + 'px';
|
||||||
document.getElementById("layer_menu").style.visibility = 'visible';
|
document.getElementById("layer_menu").style.visibility = 'visible';
|
||||||
id_this.alt = ">";
|
id_this.alt = ">";
|
||||||
id_this.src = "pmd/images/uparrow2_m.png";
|
id_this.src = "pmd/images/uparrow2_m.png";
|
||||||
@@ -861,7 +880,7 @@ function Show_left_menu(id_this) // max/min all tables
|
|||||||
General_scroll();
|
General_scroll();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("layer_menu").style.top = -1000; //fast scroll
|
document.getElementById("layer_menu").style.top = -1000 + 'px'; //fast scroll
|
||||||
document.getElementById("layer_menu").style.visibility = 'hidden';
|
document.getElementById("layer_menu").style.visibility = 'hidden';
|
||||||
id_this.alt = "v";
|
id_this.alt = "v";
|
||||||
id_this.src = "pmd/images/downarrow2_m.png";
|
id_this.src = "pmd/images/downarrow2_m.png";
|
||||||
@@ -871,7 +890,7 @@ function Show_left_menu(id_this) // max/min all tables
|
|||||||
function Top_menu_right(id_this)
|
function Top_menu_right(id_this)
|
||||||
{
|
{
|
||||||
if (id_this.alt == ">") {
|
if (id_this.alt == ">") {
|
||||||
document.getElementById('top_menu').style.marginLeft = document.getElementById('top_menu').offsetWidth; // = 350
|
document.getElementById('top_menu').style.marginLeft = document.getElementById('top_menu').offsetWidth + 'px'; // = 350
|
||||||
id_this.alt = "<";
|
id_this.alt = "<";
|
||||||
id_this.src = "pmd/images/2leftarrow_m.png";
|
id_this.src = "pmd/images/2leftarrow_m.png";
|
||||||
} else {
|
} else {
|
||||||
|
@@ -11,6 +11,10 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.input_tab {
|
.input_tab {
|
||||||
background-color: #A6C7E1;
|
background-color: #A6C7E1;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
@@ -100,7 +104,7 @@ form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scroll_tab {
|
.scroll_tab {
|
||||||
overflow: scroll;
|
overflow: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
@@ -196,7 +200,7 @@ input, select, textarea {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#butt {
|
.butt {
|
||||||
border: #4477aa solid 1px;
|
border: #4477aa solid 1px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -233,35 +237,35 @@ input, select, textarea {
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams1 {
|
.frams1 {
|
||||||
background: url(images/1.png) no-repeat right bottom;
|
background: url(images/1.png) no-repeat right bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams2 {
|
.frams2 {
|
||||||
background: url(images/2.png) no-repeat left bottom;
|
background: url(images/2.png) no-repeat left bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams3 {
|
.frams3 {
|
||||||
background: url(images/3.png) no-repeat left top;
|
background: url(images/3.png) no-repeat left top;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams4 {
|
.frams4 {
|
||||||
background: url(images/4.png) no-repeat right top;
|
background: url(images/4.png) no-repeat right top;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams5 {
|
.frams5 {
|
||||||
background: url(images/5.png) repeat-x center bottom;
|
background: url(images/5.png) repeat-x center bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams6 {
|
.frams6 {
|
||||||
background: url(images/6.png) repeat-y left;
|
background: url(images/6.png) repeat-y left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams7 {
|
.frams7 {
|
||||||
background: url(images/7.png) repeat-x top;
|
background: url(images/7.png) repeat-x top;
|
||||||
}
|
}
|
||||||
|
|
||||||
#frams8 {
|
.frams8 {
|
||||||
background: url(images/8.png) repeat-y right;
|
background: url(images/8.png) repeat-y right;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,8 +275,8 @@ input, select, textarea {
|
|||||||
border: #A9A9A9 solid 1px;
|
border: #A9A9A9 solid 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.header {
|
.header {
|
||||||
width: 350px;
|
/* width: 350px; */
|
||||||
background-color: #EAEEF0;
|
background-color: #EAEEF0;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -287,66 +291,90 @@ ul.header {
|
|||||||
background-position: top;
|
background-position: top;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
border-right: #999999 solid 1px;
|
border-right: #999999 solid 1px;
|
||||||
/*border-bottom:#999999 solid 1px;*/
|
/* border-bottom:#999999 solid 1px;*/
|
||||||
border-left: #999999 solid 1px;
|
border-left: #999999 solid 1px;
|
||||||
|
height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button CSS rules */
|
.header a {
|
||||||
a.M_butt img,a.M_butt_Selected_down img {
|
display: block;
|
||||||
width: 20px;
|
float: left;
|
||||||
|
margin: 3px 1px 4px 1px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
cursor: default;
|
border: 1px dotted #ffffff;
|
||||||
margin-top: 3px;
|
|
||||||
margin-left: 1px;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.M_butt img {
|
.header .M_bord {
|
||||||
border: 1px dotted #F0F0EE !important;
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin: 4px;
|
||||||
|
height: 20px;
|
||||||
|
width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.M_butt_Selected_down img {
|
.header a.first {
|
||||||
border: 1px solid #C0C0BB !important;
|
margin-right: 1em;
|
||||||
background-color: #99FF99;
|
|
||||||
color: #000000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.M_butt img:hover {
|
.header a.last {
|
||||||
border: 1px solid #0099CC !important;
|
margin-left: 1em;
|
||||||
cursor: default;
|
|
||||||
background-color: #FFEE99;
|
|
||||||
color: #000000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for IE */
|
a.M_butt_Selected_down_IE,
|
||||||
* html a.M_butt img,a.M_butt_Selected_down_IE {
|
a.M_butt_Selected_down {
|
||||||
border: 0 !important;
|
|
||||||
margin-top: 4px;
|
|
||||||
margin-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html a.M_butt {
|
|
||||||
/*border: 1px dotted #F0F0EE;*/
|
|
||||||
border: 1px dotted #FFFFFF;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.M_butt_Selected_down_IE {
|
|
||||||
border: 1px solid #C0C0BB;
|
border: 1px solid #C0C0BB;
|
||||||
background-color: #99FF99;
|
background-color: #99FF99;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
* html a.M_butt:hover {
|
a.M_butt_Selected_down_IE:hover,
|
||||||
|
a.M_butt_Selected_down:hover,
|
||||||
|
a.M_butt:hover {
|
||||||
border: 1px solid #0099CC;
|
border: 1px solid #0099CC;
|
||||||
cursor: default;
|
|
||||||
background-color: #FFEE99;
|
background-color: #FFEE99;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.M_bord {
|
#layer_menu {
|
||||||
border: 0;
|
left: 0;
|
||||||
margin-left: 2px;
|
top: 28px;
|
||||||
margin-right: 2px;
|
width: 150px;
|
||||||
margin-bottom: 4px;
|
position: fixed;
|
||||||
|
z-index: 1000;
|
||||||
|
background-color: #EAEEF0;
|
||||||
|
border: #999999 solid 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer_action {
|
||||||
|
position: absolute;
|
||||||
|
left: 638px;
|
||||||
|
top: 52px;
|
||||||
|
z-index: 1000;
|
||||||
|
background-color: #CCFF99;
|
||||||
|
padding: 3px;
|
||||||
|
border: #009933 solid 1px;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer_upd_relation {
|
||||||
|
position: absolute;
|
||||||
|
left: 637px;
|
||||||
|
top: 224px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer_new_relation {
|
||||||
|
position: absolute;
|
||||||
|
left: 636px;
|
||||||
|
top: 85px;
|
||||||
|
z-index: 1000;
|
||||||
|
width: 153px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layer_menu_sizer {
|
||||||
|
background-image: url(../../images/resize.png);
|
||||||
|
cursor: nw-resize;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
}
|
}
|
596
pmd_general.php
596
pmd_general.php
@@ -9,7 +9,7 @@
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
include_once "./pmd_common.php";
|
require_once "./pmd_common.php";
|
||||||
|
|
||||||
$tab_column = get_tab_info();
|
$tab_column = get_tab_info();
|
||||||
$script_tabs = get_script_tabs();
|
$script_tabs = get_script_tabs();
|
||||||
@@ -20,278 +20,388 @@ $tables_all_keys = get_all_keys();
|
|||||||
$hidden = "hidden";
|
$hidden = "hidden";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html xmlns:v="urn:schemas-microsoft-com:vml">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
|
||||||
<head>
|
<head>
|
||||||
<link rel="SHORTCUT ICON" href="pmd/images/favicon.ico" />
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
|
||||||
<?php if(0){ ?>
|
<link rel="icon" href="pmd/images/favicon.ico" type="image/x-icon" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
|
<link rel="shortcut icon" href="pmd/images/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="stylesheet" type="text/css" href="pmd/styles/default/style1.css">
|
<link rel="stylesheet" type="text/css" href="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'] ?>/style1.css" />
|
||||||
<?php } ?>
|
<title>Designer</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
|
<script type="text/javascript">
|
||||||
<link rel="stylesheet" type="text/css" href="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'] ?>/style1.css">
|
// <![CDATA[
|
||||||
|
|
||||||
<title>Designer</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo '
|
echo '
|
||||||
<script>
|
var db = "' . PMA_escapeJsString($db) . '";
|
||||||
var db = "' . $db . '";
|
var token = "' . PMA_escapeJsString($token) . '";
|
||||||
var token = "' . $token . '";
|
var LangSelectReferencedKey = "' . PMA_escapeJsString($strSelectReferencedKey) . '";
|
||||||
var LangSelectReferencedKey = "' . $strSelectReferencedKey . '";
|
var LangSelectForeignKey = "' . PMA_escapeJsString($strSelectForeignKey) . '";
|
||||||
var LangSelectForeignKey = "' . $strSelectForeignKey . '";
|
var LangPleaseSelectPrimaryOrUniqueKey = "' . PMA_escapeJsString($strPleaseSelectPrimaryOrUniqueKey) . '";
|
||||||
var LangPleaseSelectPrimaryOrUniqueKey = "' . $strPleaseSelectPrimaryOrUniqueKey . '";
|
var LangIEnotSupport = "' . PMA_escapeJsString($strIEUnsupported) . '";
|
||||||
var LangIEnotSupport = "' . $strIEUnsupported . '";
|
var LangChangeDisplay = "' . PMA_escapeJsString($strChangeDisplay) . '";
|
||||||
var LangChangeDisplay = "' . $strChangeDisplay . '";
|
|
||||||
|
|
||||||
var strLang = Array();
|
var strLang = Array();
|
||||||
strLang["strModifications"] = "' . $strModifications . '";
|
strLang["strModifications"] = "' . PMA_escapeJsString($strModifications) . '";
|
||||||
strLang["strRelationDeleted"] = "' . $strRelationDeleted . '";
|
strLang["strRelationDeleted"] = "' . PMA_escapeJsString($strRelationDeleted) . '";
|
||||||
strLang["strInnoDBRelationAdded"] = "' . $strInnoDBRelationAdded . '";
|
strLang["strInnoDBRelationAdded"] = "' . PMA_escapeJsString($strInnoDBRelationAdded ). '";
|
||||||
strLang["strGeneralRelationFeat:strDisabled"] = "' . $strGeneralRelationFeat . ' : ' . $strDisabled . '";
|
strLang["strGeneralRelationFeat:strDisabled"] = "' . PMA_escapeJsString($strGeneralRelationFeat . ' : ' . $strDisabled) . '";
|
||||||
strLang["strInternalRelationAdded"] = "' . $strInternalRelationAdded . '";
|
strLang["strInternalRelationAdded"] = "' . PMA_escapeJsString($strInternalRelationAdded) . '";
|
||||||
strLang["strErrorRelationAdded"] = "' . $strErrorRelationAdded . '";
|
strLang["strErrorRelationAdded"] = "' . PMA_escapeJsString($strErrorRelationAdded) . '";
|
||||||
strLang["strErrorRelationExists"] = "' . $strErrorRelationExists . '";
|
strLang["strErrorRelationExists"] = "' . PMA_escapeJsString($strErrorRelationExists) . '";
|
||||||
strLang["strErrorSaveTable"] = "' . $strErrorSaveTable . '";
|
strLang["strErrorSaveTable"] = "' . PMA_escapeJsString($strErrorSaveTable) . '";';
|
||||||
</script>';
|
|
||||||
?>
|
?>
|
||||||
<script language=javascript src="pmd/scripts/ajax.js" type=text/javascript></script>
|
|
||||||
<script language=javascript src="pmd/scripts/move.js" type=text/javascript></script>
|
|
||||||
<!--[if IE]><script type="text/javascript" src="pmd/scripts/iecanvas.js"></script><![endif]-->
|
|
||||||
|
|
||||||
|
// ]]>
|
||||||
|
</script>
|
||||||
|
<script src="pmd/scripts/ajax.js" type="text/javascript"></script>
|
||||||
|
<script src="pmd/scripts/move.js" type="text/javascript"></script>
|
||||||
|
<!--[if IE]>
|
||||||
|
<script src="pmd/scripts/iecanvas.js" type="text/javascript"></script>
|
||||||
|
<![endif]-->
|
||||||
<?php
|
<?php
|
||||||
echo $script_tabs . $script_contr . $script_display_field;
|
echo $script_tabs . $script_contr . $script_display_field;
|
||||||
?>
|
?>
|
||||||
<body onLoad="Main()" class="general_body" marginheight="0" marginwidth="0">
|
|
||||||
<ul class="header" id="top_menu"><table width="100%" border="0" cellpadding="0" cellspacing="0">
|
</head>
|
||||||
<tr>
|
<body onload="Main()" class="general_body" id="pmd_body">
|
||||||
<td width="10%" align="left"><a
|
|
||||||
href="javascript:Show_left_menu(document.getElementById('key_Show_left_menu'));" onMouseDown="return false;" class="M_butt" target="_self"><img id='key_Show_left_menu' title="<?php echo $strShowHideLeftMenu; ?>" alt="v" src="pmd/images/downarrow2_m.png" ></a></td>
|
<div class="header" id="top_menu">
|
||||||
<td width="80%" align="center" nowrap><a
|
<a href="javascript:Show_left_menu(document.getElementById('key_Show_left_menu'));"
|
||||||
href="javascript:Save2();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strSavePosition ?>" src="pmd/images/save.png"></a><a
|
onmousedown="return false;" class="M_butt first" target="_self">
|
||||||
href="javascript:Start_table_new();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strCreateTable ?>" src="pmd/images/table.png"></a><a
|
<img id='key_Show_left_menu' title="<?php echo $strShowHideLeftMenu; ?>"
|
||||||
href="javascript:Start_relation();" onMouseDown="return false;" class="M_butt" id="rel_button" target="_self"><img title="<?php echo $strCreateRelation ?>" src="pmd/images/relation.png"></a><a
|
alt="v" src="pmd/images/downarrow2_m.png" /></a>
|
||||||
href="javascript:Start_display_field();" onMouseDown="return false;" class="M_butt" id="display_field_button" target="_self"><img title="<?php echo $strChangeDisplay ?>" src="pmd/images/display_field.png"></a><a
|
<a href="javascript:Save2();" onmousedown="return false;"
|
||||||
href="javascript:location.reload();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strReload; ?>" src="pmd/images/reload.png"></a><a
|
class="M_butt" target="_self"
|
||||||
href="javascript:Help();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strHelp; ?>" src="pmd/images/help.png"></a><img class="M_bord" src="pmd/images/bord.png"><a
|
><img title="<?php echo $strSavePosition ?>" src="pmd/images/save.png" alt=""
|
||||||
href="javascript:Angular_direct();" onMouseDown="return false;" class="M_butt" id="angular_direct_button" target="_self"><img title="<?php echo $strAngularLinks.' / '.$strDirectLinks; ?>" src="pmd/images/ang_direct.png"></a><a
|
/></a><a href="javascript:Start_table_new();" onmousedown="return false;"
|
||||||
href="javascript:Grid();" onMouseDown="return false;" class="M_butt" id="grid_button" target="_self"><img title="<?php echo $strSnapToGrid ?>" src="pmd/images/grid.png"></a><img class="M_bord" src="pmd/images/bord.png"><a
|
class="M_butt" target="_self"
|
||||||
href="javascript:Small_tab_all(document.getElementById('key_SB_all'));" onMouseDown="return false;" class="M_butt" target="_self"><img id='key_SB_all' title="<?php echo $strSmallBigAll; ?>" alt="v" src="pmd/images/downarrow1.png" ></a><a
|
><img title="<?php echo $strCreateTable ?>" src="pmd/images/table.png" alt=""
|
||||||
href="javascript:Small_tab_invert();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strToggleSmallBig; ?>" alt="key" src="pmd/images/bottom.png" ></a><img class="M_bord" src="pmd/images/bord.png"><a
|
/></a><a href="javascript:Start_relation();" onmousedown="return false;"
|
||||||
href="javascript:PDF_save();" onMouseDown="return false;" class="M_butt" target="_self"><img src="pmd/images/pdf.png" alt="key" width="20" height="20" title="<?php echo $strImportExportCoords; ?>"></a></td>
|
class="M_butt" id="rel_button" target="_self"
|
||||||
<td width="10%" align="right"><a
|
><img title="<?php echo $strCreateRelation ?>" src="pmd/images/relation.png" alt=""
|
||||||
href="javascript:Top_menu_right(document.getElementById('key_Left_Right'));" onMouseDown="return false;" class="M_butt" target="_self"><img src="pmd/images/2rightarrow_m.png" id="key_Left_Right" alt=">" title="<?php echo $strMoveMenu; ?>"></a></td>
|
/></a><a href="javascript:Start_display_field();" onmousedown="return false;"
|
||||||
</tr>
|
class="M_butt" id="display_field_button" target="_self"
|
||||||
</table></ul>
|
><img title="<?php echo $strChangeDisplay ?>" src="pmd/images/display_field.png" alt=""
|
||||||
|
/></a><a href="javascript:location.reload();" onmousedown="return false;"
|
||||||
|
class="M_butt" target="_self"
|
||||||
|
><img title="<?php echo $strReload; ?>" src="pmd/images/reload.png" alt=""
|
||||||
|
/></a><a href="javascript:Help();" onmousedown="return false;"
|
||||||
|
class="M_butt" target="_self"
|
||||||
|
><img title="<?php echo $strHelp; ?>" src="pmd/images/help.png" alt=""
|
||||||
|
/></a><img class="M_bord" src="pmd/images/bord.png" alt=""
|
||||||
|
/><a href="javascript:Angular_direct();" onmousedown="return false;"
|
||||||
|
class="M_butt" id="angular_direct_button" target="_self"
|
||||||
|
><img title="<?php echo $strAngularLinks . ' / ' . $strDirectLinks; ?>"
|
||||||
|
src="pmd/images/ang_direct.png" alt=""
|
||||||
|
/></a><a href="javascript:Grid();" onmousedown="return false;"
|
||||||
|
class="M_butt" id="grid_button" target="_self"
|
||||||
|
><img title="<?php echo $strSnapToGrid ?>" src="pmd/images/grid.png" alt=""
|
||||||
|
/></a><img class="M_bord" src="pmd/images/bord.png" alt=""
|
||||||
|
/><a href="javascript:Small_tab_all(document.getElementById('key_SB_all'));"
|
||||||
|
onmousedown="return false;" class="M_butt" target="_self"
|
||||||
|
><img id='key_SB_all' title="<?php echo $strSmallBigAll; ?>" alt="v"
|
||||||
|
src="pmd/images/downarrow1.png"
|
||||||
|
/></a><a href="javascript:Small_tab_invert();" onmousedown="return false;"
|
||||||
|
class="M_butt" target="_self"
|
||||||
|
><img title="<?php echo $strToggleSmallBig; ?>" alt="key" src="pmd/images/bottom.png"
|
||||||
|
/></a><img class="M_bord" src="pmd/images/bord.png" alt=""
|
||||||
|
/><a href="javascript:PDF_save();" onmousedown="return false;"
|
||||||
|
class="M_butt" target="_self"
|
||||||
|
><img src="pmd/images/pdf.png" alt="key" width="20" height="20"
|
||||||
|
title="<?php echo $strImportExportCoords; ?>" /></a>
|
||||||
|
<a href="javascript:Top_menu_right(document.getElementById('key_Left_Right'));"
|
||||||
|
onmousedown="return false;" class="M_butt last" target="_self">
|
||||||
|
<img src="pmd/images/2rightarrow_m.png" id="key_Left_Right" alt=">"
|
||||||
|
title="<?php echo $strMoveMenu; ?>" /></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="osn_tab">
|
<div id="osn_tab">
|
||||||
<CANVAS id="canvas" width="100" height="100" onClick="Canvas_click(this)"></CANVAS>
|
<CANVAS id="canvas" width="100" height="100" onclick="Canvas_click(this)"></CANVAS>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="" method="post" name="form1">
|
<form action="" method="post" name="form1">
|
||||||
<div id="layer_menu" style="left:0px; top:28px; width:150px; visibility:<?PHP echo $hidden ?>; position:fixed; z-index:1000; background-color:#EAEEF0; border:#999999 solid 1px;">
|
<div id="layer_menu" style="visibility:<?php echo $hidden ?>;">
|
||||||
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
|
<div align="center" style="padding-top:5px;">
|
||||||
<tr>
|
<a href="javascript:Hide_tab_all(document.getElementById('key_HS_all'));"
|
||||||
<td height="1px">
|
onmousedown="return false;" class="M_butt" target="_self">
|
||||||
|
<img title="<?php echo $strHideShowAll; ?>" alt="v"
|
||||||
<div align="center" style="padding-top:5px">
|
src="pmd/images/downarrow1.png" id='key_HS_all' /></a>
|
||||||
<a
|
<a href="javascript:No_have_constr(document.getElementById('key_HS'));"
|
||||||
href="javascript:Hide_tab_all(document.getElementById('key_HS_all'));" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strHideShowAll; ?>" alt="v" src="pmd/images/downarrow1.png" id='key_HS_all' ></a><a
|
onmousedown="return false;" class="M_butt" target="_self">
|
||||||
href="javascript:No_have_constr(document.getElementById('key_HS'));" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strHideShowNoRelation; ?>" alt="v" src="pmd/images/downarrow2.png" id='key_HS'></a>
|
<img title="<?php echo $strHideShowNoRelation; ?>" alt="v"
|
||||||
</div>
|
src="pmd/images/downarrow2.png" id='key_HS' /></a>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div id="id_scroll_tab" class="scroll_tab">
|
|
||||||
<table width="100%" style="padding-left:3px;">
|
|
||||||
<?php
|
|
||||||
for ( $i=0; $i < sizeof( $GLOBALS['PMD']['TABLE_NAME'] ); $i++ )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td title="<?php echo $strStructure; ?>" width="1px" onMouseOver="this.className='L_butt2_2'" onMouseOut="this.className='L_butt2_1'" ><img onClick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');" src="pmd/images/exec.png"></td>
|
|
||||||
<td width="1px"><input onClick="VisibleTab(this,'<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>')" title="<?php echo $strHide ?>" id="check_vis_<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>" style="margin:0px;" type="checkbox" value="<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>" <?php if( isset($tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]]) ) echo $tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]]["H"]?"checked":""; else echo "checked"; ?>></td>
|
|
||||||
<td class="Tabs" onMouseOver="this.className='Tabs2'" onMouseOut="this.className='Tabs'" onClick="Select_tab('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>');"><?php echo $GLOBALS['PMD_OUT']["TABLE_NAME"][$i]; ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td height="1px">
|
|
||||||
<div align="center"><?php echo $strNumberOfTables ?>: <?php echo sizeof( $GLOBALS['PMD']['TABLE_NAME'] ) ?></div>
|
|
||||||
<div align="right"><div style=" background-image:url(pmd/images/resize.png); cursor:nw-resize; width:16px; height:16px; " onMouseDown="layer_menu_cur_click=1" onMouseUp="layer_menu_cur_click=0"></div></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
for ( $i=0; $i < sizeof( $GLOBALS['PMD']["TABLE_NAME"] ); $i++ )
|
|
||||||
{
|
|
||||||
$t_n = $GLOBALS['PMD']["TABLE_NAME"][$i];
|
|
||||||
$t_n_url = $GLOBALS['PMD_URL']["TABLE_NAME"][$i];
|
|
||||||
?>
|
|
||||||
<input name="t_x[<?php echo $t_n_url ?>]" type="hidden" id="t_x[<?php echo $t_n_url ?>]">
|
|
||||||
<input name="t_y[<?php echo $t_n_url ?>]" type="hidden" id="t_y[<?php echo $t_n_url ?>]">
|
|
||||||
<input name="t_v[<?php echo $t_n_url ?>]" type="hidden" id="t_v[<?php echo $t_n_url ?>]">
|
|
||||||
<input name="t_h[<?php echo $t_n_url ?>]" type="hidden" id="t_h[<?php echo $t_n_url ?>]">
|
|
||||||
|
|
||||||
<table id="<?php echo $t_n_url ?>" cellpadding="0" cellspacing="0" class="tab"
|
<div id="id_scroll_tab" class="scroll_tab">
|
||||||
style="position:absolute;
|
<table width="100%" style="padding-left: 3px;">
|
||||||
left: <?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["X"]; else echo rand(180,800); ?>;
|
<?php
|
||||||
top: <?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["Y"]; else echo rand(30,500); ?>;
|
for ($i = 0; $i < count($GLOBALS['PMD']['TABLE_NAME']); $i++) {
|
||||||
visibility: <?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["H"]?"visible":"hidden"; ?>;
|
?>
|
||||||
">
|
<tr><td title="<?php echo $strStructure; ?>" width="1px"
|
||||||
<tr>
|
onmouseover="this.className='L_butt2_2'"
|
||||||
<td class="small_tab" onMouseOver="this.className='small_tab2';" onMouseOut="this.className='small_tab';" id="_|_hide_tbody_<?php echo $t_n_url ?>" onClick="Small_tab('<?php echo $t_n_url ?>',1)"><?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["V"]?"v":">";else echo "v"; ?></td>
|
onmouseout="this.className='L_butt2_1'">
|
||||||
<td class="small_tab_pref" onMouseOver="this.className='small_tab_pref2';" onMouseOut="this.className='small_tab_pref';" onClick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');"><img src="pmd/images/exec_small.png"></td>
|
<img onclick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');"
|
||||||
<td nowrap id="_|_zag_<?php echo $t_n_url ?>" class="tab_zag" onMouseDown="cur_click=document.getElementById('<?php echo $t_n_url ?>');"
|
src="pmd/images/exec.png" alt="" /></td>
|
||||||
onMouseOver="this.className = 'tab_zag_2'" onMouseOut="this.className = 'tab_zag'"
|
<td width="1px">
|
||||||
><?php echo "<span class='owner'>".strtolower($GLOBALS['PMD_OUT']["OWNER"][$i]).".</span>".$GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i]; ?></td>
|
<input onclick="VisibleTab(this,'<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>')"
|
||||||
</tr>
|
title="<?php echo $strHide ?>"
|
||||||
<tbody id="_|_tbody_<?php echo $t_n_url ?>"
|
id="check_vis_<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
|
||||||
<?php if (! isset($tab_pos[$t_n])) echo 'style="display: none;"'; ?>>
|
style="margin:0px;" type="checkbox"
|
||||||
<?php
|
value="<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
|
||||||
$display_field = PMA_getDisplayField($db, $GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]);
|
<?php
|
||||||
for ( $j=0; $j < sizeof( $tab_column[$t_n]["COLUMN_ID"] ); $j++ )
|
if (isset($tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]])) {
|
||||||
{
|
echo $tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]]["H"] ? 'checked="checked"' : '';
|
||||||
?>
|
} else {
|
||||||
<tr id = "_|_tr_<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i].'.'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>"
|
echo 'checked="checked"';
|
||||||
<?php if($display_field == $tab_column[$t_n]["COLUMN_NAME"][$j]) echo ' class="tab_field_3" '; else echo ' class="tab_field" '; ?>
|
}
|
||||||
onMouseOver="old_class = this.className; this.className = 'tab_field_2';" onMouseOut="this.className = old_class;"
|
?> /></td>
|
||||||
onMouseDown="Click_field('<?php
|
<td class="Tabs" onmouseover="this.className='Tabs2'"
|
||||||
echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]."','".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j])."',";
|
onmouseout="this.className='Tabs'"
|
||||||
if ($GLOBALS['PMD']['TABLE_TYPE'][$i] != 'INNODB') {
|
onclick="Select_tab('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>');">
|
||||||
echo (isset( $tables_pk_or_unique_keys[ $t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j] ] ) ? 1 : 0);
|
<?php echo $GLOBALS['PMD_OUT']["TABLE_NAME"][$i]; ?></td>
|
||||||
} else {
|
|
||||||
// if this is an InnoDB table, it's not necessary that the
|
|
||||||
// index is a primary key
|
|
||||||
echo (isset( $tables_all_keys[ $t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j] ] ) ? 1 : 0);
|
|
||||||
}
|
|
||||||
?>)">
|
|
||||||
<td width="10px" colspan="3" id="<?php echo $t_n_url.".".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>"
|
|
||||||
><div style="white-space:nowrap">
|
|
||||||
<?php
|
|
||||||
if(isset($tables_pk_or_unique_keys[$t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j]])) {
|
|
||||||
?>
|
|
||||||
<img src="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE']
|
|
||||||
?>/images/FieldKey_small.png" alt="*"><?php
|
|
||||||
} else {
|
|
||||||
?><img src="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE']?>/images/Field_small<?php
|
|
||||||
if(strstr($tab_column[$t_n]["TYPE"][$j],'char')
|
|
||||||
|| strstr($tab_column[$t_n]["TYPE"][$j],'text') ) echo '_char';
|
|
||||||
elseif(strstr($tab_column[$t_n]["TYPE"][$j],'int')
|
|
||||||
|| strstr($tab_column[$t_n]["TYPE"][$j],'float')
|
|
||||||
|| strstr($tab_column[$t_n]["TYPE"][$j],'double')
|
|
||||||
|| strstr($tab_column[$t_n]["TYPE"][$j],'decimal') ) echo '_int';
|
|
||||||
elseif(strstr($tab_column[$t_n]["TYPE"][$j],'date')
|
|
||||||
|| strstr($tab_column[$t_n]["TYPE"][$j],'time')
|
|
||||||
|| strstr($tab_column[$t_n]["TYPE"][$j],'year') ) echo '_date';
|
|
||||||
?>.png" alt="*"><?php } ?>
|
|
||||||
<?php echo htmlspecialchars($tab_column[$t_n]["COLUMN_NAME"][$j]." : ".$tab_column[$t_n]["TYPE"][$j], ENT_QUOTES); ?>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<?php echo $strNumberOfTables ?>: <?php echo count($GLOBALS['PMD']['TABLE_NAME']) ?>
|
||||||
|
</div>
|
||||||
|
<div align="right">
|
||||||
|
<div id="layer_menu_sizer" onmousedown="layer_menu_cur_click=1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
|
||||||
|
$t_n = $GLOBALS['PMD']["TABLE_NAME"][$i];
|
||||||
|
$t_n_url = $GLOBALS['PMD_URL']["TABLE_NAME"][$i];
|
||||||
|
|
||||||
|
?>
|
||||||
|
<input name="t_x[<?php echo $t_n_url ?>]" type="hidden" id="t_x_<?php echo $t_n_url ?>_" />
|
||||||
|
<input name="t_y[<?php echo $t_n_url ?>]" type="hidden" id="t_y_<?php echo $t_n_url ?>_" />
|
||||||
|
<input name="t_v[<?php echo $t_n_url ?>]" type="hidden" id="t_v_<?php echo $t_n_url ?>_" />
|
||||||
|
<input name="t_h[<?php echo $t_n_url ?>]" type="hidden" id="t_h_<?php echo $t_n_url ?>_" />
|
||||||
|
|
||||||
|
<table id="<?php echo $t_n_url ?>" cellpadding="0" cellspacing="0" class="tab"
|
||||||
|
style="position: absolute;
|
||||||
|
left: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["X"]; else echo rand(180, 800); ?>px;
|
||||||
|
top: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["Y"]; else echo rand(30, 500); ?>px;
|
||||||
|
visibility: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["H"] ? "visible" : "hidden"; ?>;
|
||||||
|
">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td class="small_tab" onmouseover="this.className='small_tab2';"
|
||||||
|
onmouseout="this.className='small_tab';"
|
||||||
|
id="id_hide_tbody_<?php echo $t_n_url ?>"
|
||||||
|
onclick="Small_tab('<?php echo $t_n_url ?>', 1)"><?php
|
||||||
|
// no space alloawd here, between tags and content !!!
|
||||||
|
// JavaScript function does require this
|
||||||
|
if (! isset($tab_pos[$t_n]) || ! empty($tab_pos[$t_n]["V"])) {
|
||||||
|
echo 'v';
|
||||||
|
} else {
|
||||||
|
echo '>';
|
||||||
|
}
|
||||||
|
?></td>
|
||||||
|
<td class="small_tab_pref" onmouseover="this.className='small_tab_pref2';"
|
||||||
|
onmouseout="this.className='small_tab_pref';"
|
||||||
|
onclick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');">
|
||||||
|
<img src="pmd/images/exec_small.png" alt="" /></td>
|
||||||
|
<td nowrap="nowrap" id="id_zag_<?php echo $t_n_url ?>" class="tab_zag"
|
||||||
|
onmousedown="cur_click=document.getElementById('<?php echo $t_n_url ?>');"
|
||||||
|
onmouseover="this.className = 'tab_zag_2'"
|
||||||
|
onmouseout="this.className = 'tab_zag'">
|
||||||
|
<span class='owner'>
|
||||||
|
<?php
|
||||||
|
echo $GLOBALS['PMD_OUT']["OWNER"][$i];
|
||||||
|
echo '.</span>';
|
||||||
|
echo $GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i];
|
||||||
|
?></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="id_tbody_<?php echo $t_n_url ?>"
|
||||||
|
<?php if (! isset($tab_pos[$t_n])) echo 'style="display: none;"'; ?>>
|
||||||
|
<?php
|
||||||
|
$display_field = PMA_getDisplayField($db, $GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]);
|
||||||
|
for ($j = 0; $j < count($tab_column[$t_n]["COLUMN_ID"]); $j++) {
|
||||||
|
?>
|
||||||
|
<tr id="id_tr_<?php
|
||||||
|
echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i] . '.'
|
||||||
|
. urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>"
|
||||||
|
<?php
|
||||||
|
if ($display_field == $tab_column[$t_n]["COLUMN_NAME"][$j]) {
|
||||||
|
echo ' class="tab_field_3" ';
|
||||||
|
} else {
|
||||||
|
echo ' class="tab_field" ';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
onmouseover="old_class = this.className; this.className = 'tab_field_2';"
|
||||||
|
onmouseout="this.className = old_class;"
|
||||||
|
onmousedown="Click_field('
|
||||||
|
<?php
|
||||||
|
echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]."','".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j])."',";
|
||||||
|
if ($GLOBALS['PMD']['TABLE_TYPE'][$i] != 'INNODB') {
|
||||||
|
echo (isset($tables_pk_or_unique_keys[$t_n . "." . $tab_column[$t_n]["COLUMN_NAME"][$j]]) ? 1 : 0);
|
||||||
|
} else {
|
||||||
|
// if this is an InnoDB table, it's not necessary that the
|
||||||
|
// index is a primary key
|
||||||
|
echo (isset($tables_all_keys[$t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j]]) ? 1 : 0);
|
||||||
|
}
|
||||||
|
?>)">
|
||||||
|
<td width="10px" colspan="3"
|
||||||
|
id="<?php echo $t_n_url.".".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>">
|
||||||
|
<div style="white-space:nowrap">
|
||||||
|
<?php
|
||||||
|
if (isset($tables_pk_or_unique_keys[$t_n.".".$tab_column[$t_n]["COLUMN_NAME"][$j]])) {
|
||||||
|
?>
|
||||||
|
<img src="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'];?>/images/FieldKey_small.png"
|
||||||
|
alt="*" />
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<img src="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE']?>/images/Field_small<?php
|
||||||
|
if (strstr($tab_column[$t_n]["TYPE"][$j],'char')
|
||||||
|
|| strstr($tab_column[$t_n]["TYPE"][$j],'text')) {
|
||||||
|
echo '_char';
|
||||||
|
} elseif (strstr($tab_column[$t_n]["TYPE"][$j],'int')
|
||||||
|
|| strstr($tab_column[$t_n]["TYPE"][$j],'float')
|
||||||
|
|| strstr($tab_column[$t_n]["TYPE"][$j],'double')
|
||||||
|
|| strstr($tab_column[$t_n]["TYPE"][$j],'decimal')) {
|
||||||
|
echo '_int';
|
||||||
|
} elseif (strstr($tab_column[$t_n]["TYPE"][$j],'date')
|
||||||
|
|| strstr($tab_column[$t_n]["TYPE"][$j],'time')
|
||||||
|
|| strstr($tab_column[$t_n]["TYPE"][$j],'year')) {
|
||||||
|
echo '_date';
|
||||||
|
}
|
||||||
|
?>.png" alt="*" />
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo htmlspecialchars($tab_column[$t_n]["COLUMN_NAME"][$j]
|
||||||
|
. " : " . $tab_column[$t_n]["TYPE"][$j], ENT_QUOTES);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
<div id="hint"></div>
|
<div id="hint"></div>
|
||||||
<div id='layer_action' style="position:absolute; left:638px; top:52px; z-index:1000;
|
<div id='layer_action' style="visibility:<?php echo $hidden ?>;">Load...</div>
|
||||||
visibility:<?PHP echo $hidden ?>; background-color:#CCFF99; padding:3px; border:#009933 solid 1px; white-space:nowrap; font-weight:bold">Load...</div>
|
|
||||||
|
|
||||||
<table id="layer_new_relation" style="visibility:<?PHP echo $hidden ?>; position:absolute; left:636px; top:85px; z-index:1000; width: 153px;" width="5%" border="0" cellpadding="0" cellspacing="0">
|
<table id="layer_new_relation" style="visibility:<?php echo $hidden ?>;"
|
||||||
<tr>
|
width="5%" border="0" cellpadding="0" cellspacing="0">
|
||||||
<td id="frams1" width="10px"></td>
|
<tbody>
|
||||||
<td width="99%" id="frams5"></td>
|
<tr>
|
||||||
<td width="10px" id="frams2"><div class="bor"></div></td>
|
<td class="frams1" width="10px"></td>
|
||||||
</tr>
|
<td class="frams5" width="99%" ></td>
|
||||||
<tr>
|
<td class="frams2" width="10px"><div class="bor"></div></td>
|
||||||
<td id="frams8"></td>
|
</tr>
|
||||||
<td class="input_tab"><table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
|
<tr>
|
||||||
<tr>
|
<td class="frams8"></td>
|
||||||
<td colspan="2" align="center" nowrap><b><?php echo $strCreateRelation; ?></b></td>
|
<td class="input_tab">
|
||||||
</tr>
|
<table width="168" border="0" align="center" cellpadding="2" cellspacing="0">
|
||||||
<tbody id="InnoDB_relation">
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" align="center" nowrap><b>InnoDB</b></td>
|
<td colspan="2" align="center" nowrap="nowrap"><b><?php echo $strCreateRelation; ?></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
</thead>
|
||||||
<td width="58" nowrap>on delete</td>
|
<tbody id="InnoDB_relation">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align="center" nowrap="nowrap"><b>InnoDB</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="58" nowrap="nowrap">on delete</td>
|
||||||
<td width="102"><select name="on_delete" id="on_delete">
|
<td width="102"><select name="on_delete" id="on_delete">
|
||||||
<option value="nix" selected="selected">--</option>
|
<option value="nix" selected="selected">--</option>
|
||||||
<option value="CASCADE">CASCADE</option>
|
<option value="CASCADE">CASCADE</option>
|
||||||
<option value="SET NULL">SET NULL</option>
|
<option value="SET NULL">SET NULL</option>
|
||||||
<option value="NO ACTION">NO ACTION</option>
|
<option value="NO ACTION">NO ACTION</option>
|
||||||
<option value="RESTRICT">RESTRICT</option>
|
<option value="RESTRICT">RESTRICT</option>
|
||||||
</select> </td>
|
</select>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td nowrap>on update</td>
|
<tr>
|
||||||
|
<td nowrap="nowrap">on update</td>
|
||||||
<td><select name="on_update" id="on_update">
|
<td><select name="on_update" id="on_update">
|
||||||
<option value="nix" selected="selected">--</option>
|
<option value="nix" selected="selected">--</option>
|
||||||
<option value="CASCADE">CASCADE</option>
|
<option value="CASCADE">CASCADE</option>
|
||||||
<option value="SET NULL">SET NULL</option>
|
<option value="SET NULL">SET NULL</option>
|
||||||
<option value="NO ACTION">NO ACTION</option>
|
<option value="NO ACTION">NO ACTION</option>
|
||||||
<option value="RESTRICT">RESTRICT</option>
|
<option value="RESTRICT">RESTRICT</option>
|
||||||
</select> </td>
|
</select>
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center" nowrap>
|
|
||||||
<input type="button" id="butt" name="Button" value="<?php echo $strOK; ?>" onClick="New_relation()" >
|
|
||||||
<input type="button" id="butt" name="Button" value="<?php echo $strCancel; ?>" onClick="document.getElementById('layer_new_relation').style.visibility = 'hidden';">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</tbody>
|
||||||
<td id="frams6"></td>
|
<tbody>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td colspan="2" align="center" nowrap="nowrap">
|
||||||
<td id="frams4"><div class="bor"></div></td>
|
<input type="button" class="butt" name="Button"
|
||||||
<td id="frams7"></td>
|
value="<?php echo $strOK; ?>" onclick="New_relation()" />
|
||||||
<td id="frams3"></td>
|
<input type="button" class="butt" name="Button"
|
||||||
</tr>
|
value="<?php echo $strCancel; ?>"
|
||||||
|
onclick="document.getElementById('layer_new_relation').style.visibility = 'hidden';" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="frams6"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="frams4"><div class="bor"></div></td>
|
||||||
|
<td class="frams7"></td>
|
||||||
|
<td class="frams3"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<table id="layer_upd_relation" style="visibility:<?PHP echo $hidden ?>; position:absolute; left:637px; top:224px; z-index:1000;" width="5%" border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
<table id="layer_upd_relation" style="visibility:<?PHP echo $hidden ?>;"
|
||||||
<td id="frams1" width="10px"></td>
|
width="5%" border="0" cellpadding="0" cellspacing="0">
|
||||||
<td width="99%" id="frams5"></td>
|
<tbody>
|
||||||
<td width="10px" id="frams2"><div class="bor"></div></td>
|
<tr>
|
||||||
</tr>
|
<td class="frams1" width="10px"></td>
|
||||||
<tr>
|
<td class="frams5" width="99%"></td>
|
||||||
<td id="frams8"></td>
|
<td class="frams2" width="10px"><div class="bor"></div></td>
|
||||||
<td class="input_tab"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" align="center" nowrap><b><?php echo $strDeleteRelation; ?></b></td>
|
<td class="frams8"></td>
|
||||||
</tr>
|
<td class="input_tab">
|
||||||
<tr>
|
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
|
||||||
<td colspan="3" align="center" nowrap>
|
<tr>
|
||||||
<input name="Button" type="button" id="butt" onClick="Upd_relation()" value="<?php echo $strDelete; ?>" >
|
<td colspan="3" align="center" nowrap="nowrap"><b><?php echo $strDeleteRelation; ?></b></td>
|
||||||
<input type="button" id="butt" name="Button" value="<?php echo $strCancel; ?>" onClick="document.getElementById('layer_upd_relation').style.visibility = 'hidden'; Re_load();">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" align="center" nowrap="nowrap">
|
||||||
|
<input name="Button" type="button" class="butt"
|
||||||
|
onclick="Upd_relation()" value="<?php echo $strDelete; ?>" />
|
||||||
|
<input type="button" class="butt" name="Button"
|
||||||
|
value="<?php echo $strCancel; ?>"
|
||||||
|
onclick="document.getElementById('layer_upd_relation').style.visibility = 'hidden'; Re_load();" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
<td id="frams6"></td>
|
<td class="frams6"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="frams4"><div class="bor"></div></td>
|
<td class="frams4"><div class="bor"></div></td>
|
||||||
<td id="frams7"></td>
|
<td class="frams7"></td>
|
||||||
<td id="frams3"></td>
|
<td class="frams3"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<!-- cache images -->
|
<!-- cache images -->
|
||||||
<img src="pmd/images/2leftarrow_m.png" width="0" height="0">
|
<img src="pmd/images/2leftarrow_m.png" width="0" height="0" alt="" />
|
||||||
<img src="pmd/images/rightarrow1.png" width="0" height="0">
|
<img src="pmd/images/rightarrow1.png" width="0" height="0" alt="" />
|
||||||
<img src="pmd/images/rightarrow2.png" width="0" height="0">
|
<img src="pmd/images/rightarrow2.png" width="0" height="0" alt="" />
|
||||||
<img src="pmd/images/uparrow2_m.png" width="0" height="0">
|
<img src="pmd/images/uparrow2_m.png" width="0" height="0" alt="" />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user