Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Delisle <marc@infomarc.info>2007-01-02 17:39:22 +0300
committerMarc Delisle <marc@infomarc.info>2007-01-02 17:39:22 +0300
commitaf31d1e079a34e628213040b7c8e19b7fbe1c6f8 (patch)
tree15652a337e0327d07fb77ea5a1ffc6ca8ad31323 /pmd_general.php
parent6ac319f1594e5163398ad5c60efec0801c3aefad (diff)
designer: support for MSIE 6 and various fixes
Diffstat (limited to 'pmd_general.php')
-rw-r--r--pmd_general.php103
1 files changed, 64 insertions, 39 deletions
diff --git a/pmd_general.php b/pmd_general.php
index 9667e27c45..cd8e451814 100644
--- a/pmd_general.php
+++ b/pmd_general.php
@@ -16,7 +16,7 @@ $tables_all_keys = get_all_keys();
$hidden = "hidden";
?>
-<html>
+<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<link rel="SHORTCUT ICON" href="pmd/images/favicon.ico" />
<?php if(0){ ?>
@@ -38,40 +38,49 @@ var token = '".$token."';
var LangSelectReferencedKey = '$strSelectReferencedKey';
var LangSelectForeignKey = '$strSelectForeignKey';
var LangPleaseSelectPrimaryOrUniqueKey = '$strPleaseSelectPrimaryOrUniqueKey';
-</script>";
+var LangIEnotSupport = 'Internet Explorer not support!';
+//---
+var strLang = Array();
+strLang['strModifications'] = '$strModifications';
+strLang['strRelationDeleted'] = '$strRelationDeleted';
+strLang['strInnoDBRelationAdded'] = '$strInnoDBRelationAdded';
+strLang['strGeneralRelationFeat:strDisabled'] = '$strGeneralRelationFeat : $strDisabled';
+strLang['strInternalRelationAdded'] = '$strInternalRelationAdded';
+strLang['strErrorRelationAdded'] = 'ERROR : Relation not added!!!';
+strLang['strErrorRelationExists'] = 'ERROR : Relation already exists!';
+strLang['strErrorSaveTable'] = 'Problem on table " . $GLOBALS['cfgRelation']['designer_coords'] . "';
+</script>";
+// need $strErrorRelationAdded strErrorRelationExists strErrorSaveTable
+
?>
<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]-->
+
<?php
-echo $script_tabs.$script_contr;
+echo $script_tabs . $script_contr;
?>
<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">
+ <ul class="header" id="top_menu"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%">
- <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><a
- href="javascript:Small_tab_invert();" onMouseDown="return false;" class="M_butt" target="_self"></a></td>
- <td width="80%" align="center" nowrap>
- <a
+ <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>
+ <td width="80%" align="center" nowrap><a
href="javascript:Save2();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strSavePosition ?>" src="pmd/images/save.png"></a><a
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
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
href="javascript:location.reload();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strReload; ?>" src="pmd/images/reload.png"></a><a
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
- 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: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>
- <td width="10%" align="right">
- <a
- 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>
+ 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"><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></td>
+ <td width="10%" align="right"><a
+ 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>
</tr>
- </table>
- </ul>
+ </table></ul>
<div id="osn_tab">
- <CANVAS id="canvas" onClick="Canvas_click(this)">Your browser does not support &lt;canvas&gt;</CANVAS>
+ <CANVAS id="canvas" width="100" height="100" onClick="Canvas_click(this)"></CANVAS>
</div>
<form action="" method="post" name="form1">
@@ -86,7 +95,6 @@ echo $script_tabs.$script_contr;
</select>
</div>
<div align="center">
- <label title="<?php echo $strDisableForFasterScrolling; ?>"><input name="checkbox" type="checkbox" id='show_relation_olways' value="checkbox" checked><?php echo $strAlwaysShowLinks; ?></label>
</div>
<div align="center" style="padding-top:5px">
<a
@@ -104,9 +112,9 @@ echo $script_tabs.$script_contr;
{
?>
<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']["TABLE_NAME_SMALL"][$i]; ?>');" src="pmd/images/exec.png"></td>
- <td width="1px"><input onChange="VisibleTab(this,'<?php echo $GLOBALS['PMD']["TABLE_NAME"][$i]; ?>')" title="<?php echo $strHide ?>" id="check_vis_<?php echo $GLOBALS['PMD']["TABLE_NAME"][$i]; ?>" style="margin:0px;" type="checkbox" value="<?php echo $GLOBALS['PMD']["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']["TABLE_NAME"][$i]; ?>');"><?php echo $GLOBALS['PMD']["TABLE_NAME"][$i]; ?></td>
+ <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
}
@@ -127,33 +135,34 @@ echo $script_tabs.$script_contr;
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 ?>]" type="hidden" id="t_x[<?php echo $t_n ?>]">
-<input name="t_y[<?php echo $t_n ?>]" type="hidden" id="t_y[<?php echo $t_n ?>]">
-<input name="t_v[<?php echo $t_n ?>]" type="hidden" id="t_v[<?php echo $t_n ?>]">
-<input name="t_h[<?php echo $t_n ?>]" type="hidden" id="t_h[<?php echo $t_n ?>]">
+<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 ?>" cellpadding="0" cellspacing="0" class="tab"
+<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); ?>;
top: <?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["Y"]; else echo rand(30,500); ?>;
- visibility: <?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["H"]?"visible":"hidden"; ?>
+ visibility: <?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["H"]?"visible":"hidden"; ?>;
">
<tr>
- <td class="small_tab" onMouseOver="this.className='small_tab2';" onMouseOut="this.className='small_tab';" id="_|_hide_tbody_<?php echo $t_n ?>" onClick="Small_tab('<?php echo $t_n ?>',1)"><?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["V"]?"v":">";else echo "v"; ?></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']["TABLE_NAME_SMALL"][$i]; ?>');"><img src="pmd/images/exec_small.png"></td>
- <td nowrap id="_|_zag_<?php echo $t_n ?>" class="tab_zag" onMouseDown="cur_click=document.getElementById('<?php echo $t_n ?>');"
+ <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>
+ <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>
+ <td nowrap 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'"
- ><?php echo "<span class='owner'>".strtolower($GLOBALS['PMD']["OWNER"][$i]).".</span>".$GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]; ?></td>
+ ><?php echo "<span class='owner'>".strtolower($GLOBALS['PMD_OUT']["OWNER"][$i]).".</span>".$GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i]; ?></td>
</tr>
- <tbody id="_|_tbody_<?php echo $t_n ?>"
+ <tbody id="_|_tbody_<?php echo $t_n_url ?>"
style="display:<?php if( isset($tab_pos[$t_n]) ) echo $tab_pos[$t_n]["V"]?"":"none"; ?>;">
<?php
for ( $j=0; $j < sizeof( $tab_column[$t_n]["COLUMN_ID"] ); $j++ )
{
?>
<tr onMouseOver="this.id = 'tab_field_2'" onMouseOut="this.id = 'tab_field'" onMouseDown="Click_field('<?php
- echo $GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]."','".$tab_column[$t_n]["COLUMN_NAME"][$j]."',";
+ 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 {
@@ -162,10 +171,26 @@ for ( $i=0; $i < sizeof( $GLOBALS['PMD']["TABLE_NAME"] ); $i++ )
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.".".$tab_column[$t_n]["COLUMN_NAME"][$j] ?>"
+ <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.png" alt="*"><?php } ?>
- <?php echo $tab_column[$t_n]["COLUMN_NAME"][$j]." : ".$tab_column[$t_n]["TYPE"][$j] ?>
+ <?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<?
+ 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>