diff --git a/backend/php-blank/index.php b/backend/php-blank/index.php new file mode 100644 index 0000000..7777f32 --- /dev/null +++ b/backend/php-blank/index.php @@ -0,0 +1,3 @@ + diff --git a/backend/php-file/data/default b/backend/php-file/data/default new file mode 100644 index 0000000..a6de8b9 --- /dev/null +++ b/backend/php-file/data/default @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +INTEGERVARCHAR(100)NULLid
INTEGERVARCHAR(100)NULLid
INTEGERINTEGERVARCHAR(100)id
INTEGERINTEGERINTEGERTIMESTAMPid
\ No newline at end of file diff --git a/backend/php-file/index.php b/backend/php-file/index.php new file mode 100644 index 0000000..054ce47 --- /dev/null +++ b/backend/php-file/index.php @@ -0,0 +1,35 @@ + diff --git a/backend/php-mysql/database.sql b/backend/php-mysql/database.sql new file mode 100644 index 0000000..9bdf1d6 --- /dev/null +++ b/backend/php-mysql/database.sql @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS `wwwsqldesigner`; + +CREATE TABLE `wwwsqldesigner` ( + `keyword` varchar(30) NOT NULL default '', + `data` text, + `dt` timestamp, + PRIMARY KEY (`keyword`) +); diff --git a/backend/php-mysql/index.php b/backend/php-mysql/index.php new file mode 100644 index 0000000..7675ef1 --- /dev/null +++ b/backend/php-mysql/index.php @@ -0,0 +1,192 @@ +'; + for ($i=1;$i'; + $comment = (isset($row["TABLE_COMMENT"]) ? $row["TABLE_COMMENT"] : ""); + if ($comment) { $xml .= ''.$comment.''; } + + $q = "SELECT * FROM COLUMNS WHERE TABLE_NAME = '".$table."' AND TABLE_SCHEMA = '".$db."'"; + $result2 = mysql_query($q); + while ($row = mysql_fetch_array($result2)) { + $name = $row["COLUMN_NAME"]; + $type = $row["COLUMN_TYPE"]; + $comment = (isset($row["COLUMN_COMMENT"]) ? $row["COLUMN_COMMENT"] : ""); + $null = ($row["IS_NULLABLE"] == "YES" ? "0" : "1"); + $def = $row["COLUMN_DEFAULT"]; + $ai = (preg_match("/auto_increment/i",$row["EXTRA"]) ? "1" : "0"); + if ($def == "NULL") { $def = ""; } + $xml .= ''; + $xml .= ''.strtoupper($type).''; + $xml .= ''.$def.''; + if ($comment) { $xml .= ''.$comment.''; } + + /* fk constraints */ + $q = "SELECT + REFERENCED_TABLE_NAME AS 'table', REFERENCED_COLUMN_NAME AS 'column' + FROM KEY_COLUMN_USAGE k + LEFT JOIN TABLE_CONSTRAINTS c + ON k.CONSTRAINT_NAME = c.CONSTRAINT_NAME + WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' + AND c.TABLE_SCHEMA = '".$db."' AND c.TABLE_NAME = '".$table."' + AND k.COLUMN_NAME = '".$name."'"; + $result3 = mysql_query($q); + + while ($row = mysql_fetch_array($result3)) { + $xml .= ''; + } + + $xml .= ''; + } + + /* keys */ + $q = "SELECT * FROM STATISTICS WHERE TABLE_NAME = '".$table."' AND TABLE_SCHEMA = '".$db."' ORDER BY SEQ_IN_INDEX ASC"; + $result2 = mysql_query($q); + $idx = array(); + + while ($row = mysql_fetch_array($result2)) { + $name = $row["INDEX_NAME"]; + if (array_key_exists($name, $idx)) { + $obj = $idx[$name]; + } else { + $type = $row["INDEX_TYPE"]; + $t = "INDEX"; + if ($type == "FULLTEXT") { $t = $type; } + if ($row["NON_UNIQUE"] == "0") { $t = "UNIQUE"; } + if ($name == "PRIMARY") { $t = "PRIMARY"; } + + $obj = array( + "columns" => array(), + "type" => $t + ); + } + + $obj["columns"][] = $row["COLUMN_NAME"]; + $idx[$name] = $obj; + } + + foreach ($idx as $name=>$obj) { + $xml .= ''; + for ($i=0;$i'; + } + $xml .= ''; + } + $xml .= ""; + } + $arr[] = $xml; + $arr[] = ''; + return implode("\n",$arr); + } + + $a = (isset($_GET["action"]) ? $_GET["action"] : false); + switch ($a) { + case "list": + setup_saveloadlist(); + if (!connect()) { + header("HTTP/1.0 503 Service Unavailable"); + break; + } + $result = mysql_query("SELECT keyword FROM ".TABLE." ORDER BY dt DESC"); + while ($row = mysql_fetch_assoc($result)) { + echo $row["keyword"]."\n"; + } + break; + case "save": + setup_saveloadlist(); + if (!connect()) { + header("HTTP/1.0 503 Service Unavailable"); + break; + } + $keyword = (isset($_GET["keyword"]) ? $_GET["keyword"] : ""); + $keyword = mysql_real_escape_string($keyword); + $data = file_get_contents("php://input"); + if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) { + $data = stripslashes($data); + } + $data = mysql_real_escape_string($data); + $r = mysql_query("SELECT * FROM ".TABLE." WHERE keyword = '".$keyword."'"); + if (mysql_num_rows($r) > 0) { + $res = mysql_query("UPDATE ".TABLE." SET data = '".$data."' WHERE keyword = '".$keyword."'"); + } else { + $res = mysql_query("INSERT INTO ".TABLE." (keyword, data) VALUES ('".$keyword."', '".$data."')"); + } + if (!$res) { + header("HTTP/1.0 500 Internal Server Error"); + } else { + header("HTTP/1.0 201 Created"); + } + break; + case "load": + setup_saveloadlist(); + if (!connect()) { + header("HTTP/1.0 503 Service Unavailable"); + break; + } + $keyword = (isset($_GET["keyword"]) ? $_GET["keyword"] : ""); + $keyword = mysql_real_escape_string($keyword); + $result = mysql_query("SELECT `data` FROM ".TABLE." WHERE keyword = '".$keyword."'"); + $row = mysql_fetch_assoc($result); + if (!$row) { + header("HTTP/1.0 404 Not Found"); + } else { + header("Content-type: text/xml"); + echo $row["data"]; + } + break; + case "import": + setup_import(); + if (!connect()) { + header("HTTP/1.0 503 Service Unavailable"); + break; + } + + header("Content-type: text/xml"); + echo import(); + break; + default: header("HTTP/1.0 501 Not Implemented"); + } + + + /* + list: 501/200 + load: 501/200/404 + save: 501/201 + import: 501/200 + */ +?> \ No newline at end of file diff --git a/backend/php-sqlite/index.php b/backend/php-sqlite/index.php new file mode 100644 index 0000000..fa12fed --- /dev/null +++ b/backend/php-sqlite/index.php @@ -0,0 +1,103 @@ +0 ) { + while( $row = sqlite_fetch_array( $result ) ) { + echo $row['keyword']."\n"; + } + } else { + echo "--No Designs Saved"; + } + break; + case 'save' : + setup_saveloadlist(); + if( !connect() ) { + header( 'HTTP/1.0 503 Service Unavailable' ); + break; + } + $keyword = ( isset( $_GET['keyword'] ) ? $_GET['keyword'] : '' ); + $keyword = sqlite_escape_string( $keyword ); + $data = file_get_contents( "php://input" ); + if( get_magic_quotes_gpc() + || get_magic_quotes_runtime() ) { + $data = stripslashes( $data ); + } + $data = sqlite_escape_string( $data ); + $r = sqlite_query( "SELECT * FROM ".TABLE." WHERE keyword = '$keyword'" , $GLOBALS['sqlConnect'] ); + if( sqlite_num_rows($r)>0 ) { + $res = sqlite_query( "UPDATE ".TABLE." SET data = '$data' WHERE keyword = '$keyword'" , $GLOBALS['sqlConnect'] ); + } else { + $res = sqlite_query( "INSERT INTO ".TABLE." (keyword, data) VALUES ('$keyword', '$data')" , $GLOBALS['sqlConnect'] ); + } + if( !$res ) { + header( 'HTTP/1.0 500 Internal Server Error' ); + } else { + header( 'HTTP/1.0 201 Created' ); + } + break; + case 'load' : + setup_saveloadlist(); + if ( !connect() ) { + header( 'HTTP/1.0 503 Service Unavailable' ); + break; + } + $keyword = ( isset( $_GET['keyword'] ) ? $_GET['keyword'] : '' ); + $keyword = sqlite_escape_string( $keyword ); + $result = sqlite_query( "SELECT `data` FROM ".TABLE." WHERE keyword = '$keyword'" , $GLOBALS['sqlConnect'] ); + $row = sqlite_fetch_array( $result ); + if( !$row ) { + header( 'HTTP/1.0 404 Not Found' ); + } else { + header( 'Content-type: text/xml' ); + echo $row['data']; + } + break; + case 'import' : + setup_import(); + default: + header( 'HTTP/1.0 501 Not Implemented' ); + } + + + /* + list: 501/200 + load: 501/200/404 + save: 501/201 + import: 501/200 + */ +?> \ No newline at end of file diff --git a/backend/php-sqlite/wwwsqldesigner.sqlite b/backend/php-sqlite/wwwsqldesigner.sqlite new file mode 100644 index 0000000..4ac1255 Binary files /dev/null and b/backend/php-sqlite/wwwsqldesigner.sqlite differ diff --git a/db/mssql/datatypes.xml b/db/mssql/datatypes.xml new file mode 100644 index 0000000..6dddbe5 --- /dev/null +++ b/db/mssql/datatypes.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/db/mssql/output.xsl b/db/mssql/output.xsl new file mode 100644 index 0000000..6be4953 --- /dev/null +++ b/db/mssql/output.xsl @@ -0,0 +1,55 @@ + + + + + + + + + CREATE TABLE [ + + ] ( + + + [ + + ] + + + + + + NOT NULL + + + + IDENTITY (1, 1) + + + + , + + + + -- + + + + + + + + + +) ON [PRIMARY] +GO + + + + + + \ No newline at end of file diff --git a/db/mysql/datatypes.xml b/db/mysql/datatypes.xml new file mode 100644 index 0000000..ea0600a --- /dev/null +++ b/db/mysql/datatypes.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/db/mysql/output.xsl b/db/mysql/output.xsl new file mode 100644 index 0000000..b0c3e59 --- /dev/null +++ b/db/mysql/output.xsl @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CREATE TABLE ` + + ` ( + + + ` + + ` + + + + + + NOT NULL + + + + AUTO_INCREMENT + + + + DEFAULT + + + + + + COMMENT ' + + + + + + ' + + + + , + + + + + + + , + + + PRIMARY KEY ( + FULLTEXT KEY ( + UNIQUE KEY ( + KEY ( + + + + `` + + , + + + ) + + + + +) + + + COMMENT ' + + + + + + ' + + + ; + + + + + + + + + + ALTER TABLE ` + + ` ADD FOREIGN KEY ( + + ) REFERENCES ` + + ` (` + + `); + + + + + + + \ No newline at end of file diff --git a/db/postgresql/datatypes.xml b/db/postgresql/datatypes.xml new file mode 100644 index 0000000..138fce7 --- /dev/null +++ b/db/postgresql/datatypes.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/db/postgresql/output.xsl b/db/postgresql/output.xsl new file mode 100644 index 0000000..0b7828e --- /dev/null +++ b/db/postgresql/output.xsl @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CREATE TABLE " + + " ( + + + " + + " + + + + + + NOT NULL + + + + DEFAULT + + + + + + /* COMMENT ' + + + + + + ' */ + + + + , + + + + + + + , + + + PRIMARY KEY ( + UNIQUE ( + KEY ( + + + + "" + + , + + + ) + + + + +) + + + /* + + + + + + */ + + + ; + + + + + + + + + + ALTER TABLE " + + " ADD FOREIGN KEY ( + + ) REFERENCES " + + " (" + + "); + + + + + + + diff --git a/db/sqlite/datatypes.xml b/db/sqlite/datatypes.xml new file mode 100644 index 0000000..5079b3c --- /dev/null +++ b/db/sqlite/datatypes.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/db/sqlite/output.xsl b/db/sqlite/output.xsl new file mode 100644 index 0000000..7a2857d --- /dev/null +++ b/db/sqlite/output.xsl @@ -0,0 +1,88 @@ + + + + + + + + CREATE TABLE + + ( + + + + + + + + + + NOT NULL + + + + AUTOINCREMENT + + + + DEFAULT + + + + + , + + + + + + + + , + + + PRIMARY KEY ( + UNIQUE ( + + + + + + , + + + ) + + + + + +); + + + + + + + + + + CREATE INDEX + + ON + + ( + + + + , + + + ); + + + + + + + \ No newline at end of file diff --git a/db/web2py/datatypes.xml b/db/web2py/datatypes.xml new file mode 100644 index 0000000..22f2252 --- /dev/null +++ b/db/web2py/datatypes.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/db/web2py/output.xsl b/db/web2py/output.xsl new file mode 100644 index 0000000..a94ed99 --- /dev/null +++ b/db/web2py/output.xsl @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + """ +just copy paste this code into your model and replace dbOBJECT to something +you prefer or what is used in your code, another thing that should be known is that +this code still cannot distinguish what exactly should be in reference title - name +when you use generic appadmin so please remove all fiealds you don't need not require +""" +""" +database class object creation +""" +dbOBJECT = SQLDB("sqlite://dbOBJECT.db") + + + +""" +Table definition +""" +dbOBJECT.define_table(" + + ", + + + + + SQLField(" + + + + ", + + + + " + + ", length= + + + + , + + + " + + ", + + + + notnull=True, + + + + default=' + + ' + + + default=None + + + + + + ", dbOBJECT. + + + + + + + + + ) + + + + , + + + + + + + + unique=True + + + ) + + + + + + +""" +Relations between tables (remove fields you don't need from requires) +""" + + + + + + + dbOBJECT. + + . + + .requires=IS_IN_DB( + dbOBJECT, ' + + .id + + + + + ',' + + . + + + + + + ') + + + + + + \ No newline at end of file diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..179c0c9 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,344 @@ + + + + + + WWW SQL Designer - Documentation + + +

WWW SQL Designer - Documentation

+ +

Table of contents

+ + + +
+ +

Usage

+

Hello and welcome to WWW SQL Designer documentation. This page will hopefully help you with understanding +how WWW SQL Desginer works and how can it be tailored to suit your needs.

+ +

Browsers

+ +

WWW SQL Designer was tested in the following browsers:

+ + + +

Konqueror is the only browser (from this list) which lacks support for Smooth connectors and XSLT +transformations (generation of SQL scripts).

+ +

Basics

+ +

The application allows you to:

+ +
    +
  1. Draw E-R designs
  2. +
  3. Edit tables and rows
  4. +
  5. Manage keys
  6. +
  7. Create relations (FK constraints)
  8. +
  9. Save & Load designs
  10. +
  11. Import DB schemas
  12. +
+ +

Most commands are intuitively available from the right sidebar. Some tasks are described below.

+ +

To drag a table, press mouse button while pointing at table header. You can then move the +table around the canvas.

+ +

To edit table properties, either double-click its heading, or select it and +then press 'Edit table' button in sidebar.

+ +

To edit field properties, either double-click it, or select it and +then press 'Edit field' button in sidebar.

+ +

To manage keys for a table, select a table and press 'Edit keys' button in sidebar.

+ +

To draw a connector (relation), first select a field which forms a Primary Key. Then click 'Create foreign key' button +in sidebar and click target table's heading. New field and relation will be created.

+ +

To perform any kind of save/load/export/import task, press the 'Save/Load' button in sidebar. +A dialog window will appear, allowing you to perform clientside or serverside tasks.

+ +
+ +

Installation

+

You will need to install WWW SQL Designer if you want to:

+ + +

Just download and unpack latest application archive. There are generally no requirements, but to use +server-side storage, one should have a working webserver.

+ +
+ +

Customization

+ +

Many aspects of WWW SQL Designer can be customized and enhanced. +If you manage to create a new locale / db / backend, feel free to send it to me. I will include your feature +in a distribution archive.

+ +

CSS

+ +

Visual properties of the application can be tuned by editing files in css/ subdirectory.

+ +

Locale

+ +

Locales can be edited and added in locale/ subdirectory. New locales must be also registered in +js/config.js.

+ +

Databases

+ +

Supported databases (their datatypes and XSLT template) are stored in db/ subdirectory. +Each database has a datatype definition file (datatypes.xml) and a XSL transformation +(output.xsl). New databases must be also registered in +js/config.js.

+ +

Backends

+ +

Serverside backends allow you to save, load, list and import DB designs. They are written in a serverside +scripting language and communicate via HTTP requests. Backends are stored in backend/ subdirectory. +A brief summary of backend API follows:

+ + + +

For every action mentioned, the backend may also return HTTP/501 Not Implemented, meaning that this action is not supported by the backend.

+
+ +

Contact

+ +

This tool was created by Ondrej Zara, © 2005-2008. +It is released under GNU GPL licence.

+ +
+ +

Changelog

+ + + diff --git a/gpl.txt b/gpl.txt new file mode 100644 index 0000000..3912109 --- /dev/null +++ b/gpl.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/images/back.gif b/images/back.gif new file mode 100644 index 0000000..0e93eaa Binary files /dev/null and b/images/back.gif differ diff --git a/images/bar_bottom.png b/images/bar_bottom.png new file mode 100644 index 0000000..bb361ee Binary files /dev/null and b/images/bar_bottom.png differ diff --git a/images/bar_corner.png b/images/bar_corner.png new file mode 100644 index 0000000..807c65c Binary files /dev/null and b/images/bar_corner.png differ diff --git a/images/bar_left.png b/images/bar_left.png new file mode 100644 index 0000000..ec7f34b Binary files /dev/null and b/images/bar_left.png differ diff --git a/images/table_bottom.png b/images/table_bottom.png new file mode 100644 index 0000000..0890c8e Binary files /dev/null and b/images/table_bottom.png differ diff --git a/images/table_corner.png b/images/table_corner.png new file mode 100644 index 0000000..e5e86de Binary files /dev/null and b/images/table_corner.png differ diff --git a/images/table_right.png b/images/table_right.png new file mode 100644 index 0000000..0f4600f Binary files /dev/null and b/images/table_right.png differ diff --git a/images/throbber.gif b/images/throbber.gif new file mode 100644 index 0000000..cce32f2 Binary files /dev/null and b/images/throbber.gif differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..01e7d8a --- /dev/null +++ b/index.html @@ -0,0 +1,232 @@ + + + + + WWW SQL Designer + + + + + + + + + + + +
+
+
+
+
+ + + +
+ + + + + + + + +
+ + + + + + + +
+ + + +
+ +
+ +
+ +
+
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ * + + +
+ * + + +
+ + + + +
+ + + + +
+ + + +
+ * + + +
+ +
+ + * +
+ +
+ + + + + + + + + + +
+
+ + + +
+ +
+
+
+ + +
+ + + + +
+
+
+ + +
+
+
+ +
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + +
+ + + + + +

+
+ +
+
+
+
+
+ +
+
+
+ +
+ + + + + + + + + + + +
+ + + +
+ + + +
+
+ + + + diff --git a/js/config.js b/js/config.js new file mode 100644 index 0000000..6149d69 --- /dev/null +++ b/js/config.js @@ -0,0 +1,13 @@ +var CONFIG = { + AVAILABLE_DBS:["mysql","sqlite","web2py","mssql","postgresql"], + DEFAULT_DB:"mysql", + + AVAILABLE_LOCALES:["en","fr","de","cs","pl","pt_BR","es"], + DEFAULT_LOCALE:"en", + + AVAILABLE_BACKENDS:["php-mysql","php-blank","php-file","php-sqlite"], + DEFAULT_BACKEND:["php-mysql"], + + RELATION_THICKNESS:2, + RELATION_SPACING:15 +} diff --git a/js/oz.js b/js/oz.js new file mode 100644 index 0000000..e3a567c --- /dev/null +++ b/js/oz.js @@ -0,0 +1,315 @@ +/* (c) 2008 Ondrej Zara, 1.1 */ +var OZ = { + $:function(x) { return typeof(x) == "string" ? document.getElementById(x) : x; }, + opera:!!window.opera, + ie:!!document.attachEvent && !window.opera, + gecko:!!document.getAnonymousElementByAttribute, + webkit:!!navigator.userAgent.match(/webkit/i), + khtml:!!navigator.userAgent.match(/khtml/i) || !!navigator.userAgent.match(/konqueror/i), + Event:{ + _id:0, + _cache:{}, + _standard:["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","keypress","keydown","keyup", + "load","unload","abort","error","resize","scroll","select","change","submit","reset","focus","blur"], + add:function(elm,event,cb) { + var id = OZ.Event._id++; + var element = OZ.$(elm); + var fnc = cb; + if (OZ.Event._standard.indexOf(event) != -1) { + if (document.addEventListener) { + element.addEventListener(event,fnc,false); + } else if (document.attachEvent) { + fnc = function() { return cb.apply(elm,arguments); } + element.attachEvent("on"+event,fnc); + } else { return false; } + } + OZ.Event._cache[id] = [element,event,fnc]; + return id; + }, + remove:function(id) { + var e = OZ.Event._cache[id]; + if (!e) { return; } + if (OZ.Event._standard.indexOf(e[1]) != -1) { + if (document.removeEventListener) { + e[0].removeEventListener(e[1],e[2],false); + } else if (document.detachEvent) { + e[0].detachEvent("on"+e[1],e[2]); + } + } + delete OZ.Event._cache[id]; + }, + stop:function(e) { e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; }, + prevent:function(e) { e.preventDefault ? e.preventDefault() : e.returnValue = false; }, + target:function(e) { return e.target || e.srcElement; } + }, + Class:function() { + var c = function() { + var init = arguments.callee.prototype.init; + if (init) { init.apply(this,arguments); } + }; + c.inherit = function(parent) { + for (var p in parent.prototype) { this.prototype[p] = parent.prototype[p]; } + return this; + }; + c.extend = function(parent) { + var tmp = function(){}; + tmp.prototype = parent.prototype; + this.prototype = new tmp(); + return this; + }; + c.prototype.bind = function(fnc) { + var obj = this; + return function() { + return fnc.apply(obj,arguments); + } + }; + c.prototype.dispatch = function(type, data) { + var obj = { + type:type, + target:this, + timeStamp:(new Date()).getTime(), + data:data + } + var tocall = []; + for (var p in OZ.Event._cache) { + var item = OZ.Event._cache[p]; + if (item[1] == type && (!item[0] || item[0] == this)) { tocall.push(item[2]); } + } + var len = tocall.length; + for (var i=0;i-1;i--) { + if (i in this && this[i] === item) { return i; } + } + return -1; + } +} +if (!Array.lastIndexOf) { + Array.lastIndexOf = function(obj, item, from) { return Array.prototype.lastIndexOf.call(obj, item, from); } +} + +if (!Array.prototype.forEach) { + Array.prototype.forEach = function(cb, _this) { + var len = this.length; + for (var i=0;i'; + + var elm = this.getDataType(); + var t = elm.getAttribute("sql"); + if (elm.getAttribute("length") == "1" && this.data.size) { t += "("+this.data.size+")"; } + xml += ""+t+""; + + if (this.data.def) { + var q = elm.getAttribute("quote"); + var d = this.data.def || ""; + if (d != "NULL" && d != "null" && d != "CURRENT_TIMESTAMP") { d = q+d+q; } + xml += ""+d+""; + } + + for (var i=0;i'; + } + + if (this.data.comment) { + var escaped = this.data.comment.replace(/&/g, "&").replace(/>/g, ">").replace(/"; + } + + xml += ""; + return xml; +} + +SQL.Row.prototype.fromXML = function(node) { + var name = node.getAttribute("name"); + this.setTitle(name); + + var obj = { type:0, size:null }; + obj.nll = (node.getAttribute("null") == "1"); + obj.ai = (node.getAttribute("autoincrement") == "1"); + + var cs = node.getElementsByTagName("comment"); + if (cs.length && cs[0].firstChild) { obj.comment = cs[0].firstChild.nodeValue; } + + var d = node.getElementsByTagName("datatype"); + if (d.length && d[0].firstChild) { + var s = d[0].firstChild.nodeValue; + var r = s.match(/^([^\(]+)(\((.*)\))?.*$/); + var type = r[1]; + if (r[3]) { obj.size = r[3]; } + var types = window.DATATYPES.getElementsByTagName("type"); + for (var i=0;i'; + for (var i=0;i/g, ">").replace(/"; + } + xml += ""; + return xml; +} + +SQL.Table.prototype.fromXML = function(node) { + var name = node.getAttribute("name"); + this.setTitle(name); + var x = parseInt(node.getAttribute("x")) || 0; + var y = parseInt(node.getAttribute("y")) || 0; + this.moveTo(x, y); + var rows = node.getElementsByTagName("row"); + for (var i=0;i'; + for (var i=0;i'; + } + xml += ''; + return xml; +} + +SQL.Key.prototype.fromXML = function(node) { + this.setType(node.getAttribute("type")); + this.setName(node.getAttribute("name")); + var parts = node.getElementsByTagName("part"); + for (var i=0;i this.width) { dx = this.width - 4 - this.l - this.w; } + if (this.t + this.h + 4 + dy > this.height) { dy = this.height - 4 - this.t - this.h; } + + + this.x += dx; + this.y += dy; + + this.l += dx; + this.t += dy; + + var coefX = this.width / this.owner.width; + var coefY = this.height / this.owner.height; + var left = this.l / coefX; + var top = this.t / coefY; + document.documentElement.scrollLeft = Math.round(left); + document.documentElement.scrollTop = Math.round(top); + + this.redraw(); +} + +SQL.Map.prototype.up = function(e) { /* mouseup */ + this.flag = false; + this.dom.container.style.cursor = ""; +} + +SQL.Map.prototype.sync = function() { /* when window changes, adjust map */ + var dims = OZ.DOM.win(); + var scroll = OZ.DOM.scroll(); + var scaleX = this.width / this.owner.width; + var scaleY = this.height / this.owner.height; + + var w = dims[0] * scaleX - 4 - 0; + var h = dims[1] * scaleY - 4 - 0; + var x = scroll[0] * scaleX; + var y = scroll[1] * scaleY; + + this.w = Math.round(w); + this.h = Math.round(h); + this.l = Math.round(x); + this.t = Math.round(y); + + this.redraw(); +} + +SQL.Map.prototype.redraw = function() { + this.dom.port.style.width = this.w+"px"; + this.dom.port.style.height = this.h+"px"; + this.dom.port.style.left = this.l+"px"; + this.dom.port.style.top = this.t+"px"; +} + +/* --------------------- io ------------ */ + +SQL.IO = OZ.Class(); + +SQL.IO.prototype.init = function(owner) { + this.owner = owner; + this.dom = { + container:OZ.$("io") + }; + + var ids = ["saveload","clientsave","clientload","clientsql","serversave","serverload","serverlist","serverimport"]; + for (var i=0;i 1) { this.dom.title.removeChild(this.dom.title.childNodes[1]) } + + var txt = OZ.DOM.text(title); + this.dom.title.appendChild(txt); + this.dom.background.style.visibility = "visible"; + OZ.DOM.clear(this.dom.content); + this.dom.content.appendChild(content); + + var win = OZ.DOM.win(); + var scroll = OZ.DOM.scroll(); + this.dom.container.style.left = Math.round(scroll[0] + (win[0] - this.dom.container.offsetWidth)/2)+"px"; + this.dom.container.style.top = Math.round(scroll[1] + (win[1] - this.dom.container.offsetHeight)/2)+"px"; + + this.dom.cancel.style.visibility = (this.callback ? "" : "hidden"); + this.dom.container.style.visibility = "visible"; + + var formElements = ["input","select","textarea"]; + var all = this.dom.container.getElementsByTagName("*"); + for (var i=0;i max) { max = z; } + } + return max; +} + +SQL.Designer.prototype.addTable = function(name, x, y) { + var max = this.getMaxZ(); + var t = new SQL.Table(this, name, x, y, max+1); + this.tables.push(t); + this.dom.content.appendChild(t.dom.container); + t.redraw(); + return t; +} + +SQL.Designer.prototype.removeTable = function(t) { + this.tableManager.select(false); + this.rowManager.select(false); + var idx = this.tables.indexOf(t); + if (idx == -1) { return; } + t.destroy(); + this.tables.splice(idx,1); +} + +SQL.Designer.prototype.addRelation = function(row1, row2) { + var r = new SQL.Relation(this, row1, row2); + this.relations.push(r); + return r; +} + +SQL.Designer.prototype.removeRelation = function(r) { + var idx = this.relations.indexOf(r); + if (idx == -1) { return; } + r.destroy(); + this.relations.splice(idx,1); +} + +SQL.Designer.prototype.getCookie = function() { + var c = document.cookie; + var obj = {}; + var parts = c.split(";"); + for (var i=0;i old) { t.setZ(t.getZ()-1); } + } + var m = table.dom.mini; + m.parentNode.appendChild(m); +} + +SQL.Designer.prototype.clearTables = function() { + while (this.tables.length) { this.removeTable(this.tables[0]); } + this.setTitle(false); +} + +SQL.Designer.prototype.alignTables = function() { + var win = OZ.DOM.win(); + var avail = win[0] - OZ.$("bar").offsetWidth; + var x = 10; + var y = 10; + var max = 0; + + this.tables.sort(function(a,b){ + return b.getRelations().length - a.getRelations().length; + }); + + for (var i=0;i avail) { + x = 10; + y += 10 + max; + max = 0; + } + t.moveTo(x,y); + x += 10 + w; + if (h > max) { max = h; } + } +} + +SQL.Designer.prototype.findNamedTable = function(name) { /* find row specified as table(row) */ + for (var i=0;i + + + Přidat tabulku + Upravit tabulku + Smazat tabulku + Srovnat tabulky + Zrušit tabulky + Opravdu zrušit všechny tabulky + nová tabulka + umístit tabulku + Jméno + Komentář + + + Přidat položku + Upravit položku + Smazat položku + Nahoru + Dolů + nová položk + Vyrobit cizí klíč + klikni na cílovou tabulku + Opravdu smazat tabulku + Opravdu smazat položku + + + Jméno + Typ + Velikost + Výchozí + NOT NULL + Autoincrement + Upravit komentář + VLožte komentář pro tuto položku + + + OK + Storno + Prosím čekejte... + Nastavení + Jazyk + Databáze pro nová schémata + Některá nastavení se projeví až po znovunačtení stránky. Aby nastavení fungovala, je nutné mít zapnuté cookies. + Vzdálenost přichytávání tabulek + V pixelech, 0 = bez přichytávání + Vzor pro cizí jména + %T = primární tabulka, %R = primární klíč, %t = cizí tabulka + Schovat spojovníky při tažení tabulkou? + Vykreslovat oblé spojovníky (pakliže to prohlížeč podporuje)? + + + + Klíče + Klíče v tabulce "%s" + Typ: + Název: + Položky v klíči + Dostupné položky + Upravit klíč + Přidat klíč + Smazat klíč + + + Uložit / Načíst + Prosím vložte XML data do textového pole níže. + Klient + Server + Vstup / Výstup + Uložit XML + Načíst XML + Generovat SQL + Server backend: + Uložit + Načíst + Vypsat položky + Importovat z databáze + Zadejte označení, pod kterým bylo vaše schéma uloženo: + Zadejte označení, pod kterým bude vaše schéma uloženo: + Zadejte název databáze k importu: + Odpověď od serveru + Uloženo + Neexistuje + Vnitřní chyba serveru + Není implementováno + Služba není dostupná + + + XML chyba + Dokumentace + + diff --git a/locale/de.xml b/locale/de.xml new file mode 100644 index 0000000..ff60cb1 --- /dev/null +++ b/locale/de.xml @@ -0,0 +1,92 @@ + + + + Tabelle hinzufügen + Tabelle bearbeiten + Tabelle entfernen + Tabellen ausrichten + Tabellen löschen + Wirklich alle Tabellen löschen + Neue Tabelle + Tabelle plazieren + Name + Kommentar + + + Feld hinzufügen + Feld bearbeiten + Feld entfernen + Hoch + Runter + Neues Feld + Fremdschlüssel erstellen + Ziel-Tabelle wählen + Tabelle wirklich löschen + Feld wirklich löschen + + + Name + Typ + Größe + Default + NOT NULL + Autoincrement + Kommentar bearbeiten + Kommentar zu diesem Feld eintragen: + + + OK + Abbrechen + Bitte warten... + Einstellungen + Sprache + Datenbank für neue Diagramme + Einige Optionen werden erst nach einem erneutem Seitenaufruf wirksam. Cookies müssen aktiviert sein. + Tabellen Ausrichtungsabstand + in Pixel, 0 = einrasten deaktivieren + Format für die Namen der Fremdschlüssel + %T = Primärtabelle, %R = Primärschlüssel, %t = Fremdtabelle + Verstecke Verbindungslinien beim bewegen von Tabellen? + Zeichne gegrümmte Verbindungslinien (Browser abhängig)? + + + + Schlüssel + Schlüssel in Tabelle "%s" + Typ: + Name: + Felder im Schlüssel + Verfügbare Felder + Schlüssel bearbeiten + Schlüssel hinzufügen + Schlüssel entfernen + + + Speichern / Laden + Bitte fügen Sie die XML-Daten in das untere Textfeld ein und versuchen es erneut. + Client + Server + Eingabe / Ausgabe + XML speichern + XML laden + SQL erzeugen + Server Basis: + Speichern + Laden + Einträge listen + Import aus DB + Geben Sie das Stichwort ihres Diagramms ein, unter dem es gespeichert wurde: + Geben Sie das Stichwort ihres Diagramms ein, unter dem es gespeichert werden soll: + Geben Sie den Namen der zuimportierenden Datenbank ein: + Server Antwort + gespeichert + Nicht gefunden + Interner Server Fehler + Nicht implementiert + Dienst nicht erreichbar + + + XML Fehler + Dokumentation + + diff --git a/locale/en.xml b/locale/en.xml new file mode 100644 index 0000000..2286fb3 --- /dev/null +++ b/locale/en.xml @@ -0,0 +1,92 @@ + + + + Add table + Edit table + Remove table + Align tables + Clear tables + Really delete all tables + new table + place table + Name + Comment + + + Add field + Edit field + Remove field + Up + Down + new field + Create foreign key + click target table + Really delete table + Really delete field + + + Name + Type + Size + Default + NOT NULL + Autoincrement + Edit comment + Enter comment for this field + + + OK + Cancel + Please wait... + Options + Language + Database for new designs + Some options are applied only after full page reload. Cookies must be enabled for options to work. + Table snap distance + In pixels, 0 = disable snapping + Pattern for foreign names + %T = primary table, %R = primary key, %t = foreign table + Hide connectors on table drag? + Draw smooth connectors (if supported by browser)? + + + + Keys + Keys in table "%s" + Type: + Name: + Fields in key + Available fields + Edit key + Add key + Remove key + + + Save / Load + Please paste XML data into the text area below and try again. + Client + Server + Input / Output + Save XML + Load XML + Generate SQL + Server backend: + Save + Load + List items + Import from DB + Enter keyword under which your design was saved: + Enter keyword under which your design will be saved: + Enter name of database to be imported: + Server response + Saved + Not Found + Internal Server Error + Not Implemented + Service Unavailable + + + XML error + Documentation + + diff --git a/locale/es.xml b/locale/es.xml new file mode 100644 index 0000000..214a8d7 --- /dev/null +++ b/locale/es.xml @@ -0,0 +1,92 @@ + + + + Agregar tabla + Editar tabla + Remover tabla + Alinear tablas + Limpiar tablas + Realmente borrar todas las tablas + nueva tabla + posicionar tabla + Nombre + Comentario + + + Agregar campo + Editar campo + Remover campo + Arriba + Abajo + nuevo campo + Crear llave foranea + hacer clic en la tabla + Realmente borrar tabla + Realmente borrar campo + + + Nombre + Tipo + Tamaño + Valor por predeterminado + NOT NULL + Autoincremento + Editar comentario + Entrar comentario para este campo + + + OK + Cancelar + Por favor esperar... + Optiones + Lenguaje + Base de datos para nuevos diseños + Algunas optiones son aplicadas solo despues de recargar totalmente la pagina. Las Cookies deben estar habilidas para optiones de trabajo. + Tabla acceso remoto + En pixeles, 0 = deshabilitar acceso remoto + Patron para nombres foraneos + %T = tabla primaria, %R = llave primaria, %t = tabla foranea + Esconder conectores en la tabla al arrastrar? + Dibujar conectores suave (si son soportados por el navegador)? + + + + Llaves + Llaves en la tabla "%s" + Tipo: + Nombre: + Campos en la llave + Campos disponibles + Editar llave + Agregar llave + Remover llave + + + Guardar / Cargar + Favor de pegar el XML dentro del area de texto siguiente e intentar nuevamente. + Cliente + Servidor + Entrada / Salida + Guardar XML + Cargar XML + Generar SQL + Servidor backend: + Guardar + Cargar + Lista de articulos + Importar desde BD + Entrar palabra bajo la cual tu diseño fue guardado: + Entrar palabra bajo la cual tu diseño va a ser guardado: + Entrar nombre de base de datos a ser importada: + Respuesta del servidor + Guardado + No Encontrado + Error Interno del Servidor + No Implementado + Servicio No Disponible + + + XML error + Documentacion + + diff --git a/locale/fr.xml b/locale/fr.xml new file mode 100644 index 0000000..da6b38b --- /dev/null +++ b/locale/fr.xml @@ -0,0 +1,91 @@ + + + Ajouter une table + Éditer la table + Supprimer la table + Aligner les tables + Supprimer les tables + Vraiment supprimer toutes les tables + nouvelle table + positionner la table + Nom + Commentaire + + + Ajouter un champ + Éditer un champ + Supprimer le champ + Remonter + Descendre + Éditer un champ + Créer une clé étrangère + Cliquez la destination + Voulez-vous vraiment supprimer cette table ? + Voulez-vous vraiment supprimer ce champ ? + + + Nom + Type + Taille + Défaut + NON NUL + Auto-incrémental + Éditer le commentaire + Saisir un commentaire à propos de ce champ + + + OK + Annuler + Veuillez patienter... + Options + Langue + Format des nouvelles base de données + Ces options ne seront appliquées qu'après le rafraichissement complet de la page. Les cookies doivent être autorisés. + Magnétisme des tables + En pixels, 0 = magnétisme désactivé + Motif pour les noms de clés étrangères + %T = table primaire, %R = clé primaire, %t = table étrangère + Cacher les connecteurs lors du déplacement des tables ? + Dessiner des connecteurs « adoucis » (si le navigateur le supporte) ? + + + + Clés + Clés dans la table « %s » + Type : + Nom : + Champs de clé + Champs disponibles + Éditer la clé + Ajouter une clé + Supprimer la clé + + + Enregistrer / Charger + Merci de coller les données XML dans le champs prévu avant de ré-essayer. + Client + Serveur + Entrée / Sortie + Enregistrer XML + Charger XML + Génerer SQL + Méthode du serveur : + Enregistrer + Charger + Éléments disponibles + Importer d'une base de données + Saisir le mot-clé de votre schéma : + Saisir un mot-clé pour sauvegarder votre schéma : + Saisir le nom de la base de données à importer : + Réponse du serveur + Sauvegardé + Introuvable + Erreur interne du serveur + Non Implementé + Service indisponible + + + Erreur XML + Documentation + + diff --git a/locale/pl.xml b/locale/pl.xml new file mode 100644 index 0000000..ff85b7a --- /dev/null +++ b/locale/pl.xml @@ -0,0 +1,92 @@ + + + + Dodaj tabelę + Edytuj tabelę + Usuń tabelę + Wyrównaj tabele + Wyczyść tabele + Czy na pewno usunąć wszystkie tabele + nowa tabela + miejsce tabeli + Nazwa + Komentarz + + + Dodaj pole + Edytuj pole + Usuń pole + W górę + W dół + nowe pole + Utwórz klucz zewnętrzny + kliknij w docelową tabelę + Czy na pewno usunąć tabelę + Czy na pewno usunąć pole + + + Nazwa + Typ + Rozmiar + Domyślnie + NOT NULL + Autoincrement + Edytuj komentarz + Wpisz komentarz dla tego pola + + + OK + Anuluj + Proszę czekać... + Opcje + Język + Bazy danych dla nowych projektów + Niektóre opcje są zatwierdzane wyłącznie po kompletnym przeładowaniu strony. Ciasteczka muszą być akceptowane dla działania opcji. + Ustalana odległość tabel + W pikselach, 0 = wyłącznie ustalania + Wzorzec dla zewnętrznych nazw + %T = główna tabela, %R = klucz główny, %t = zewnętrzna tabela + Ukryć złącza w tabeli podczas przeciągania? + Rysuj pływające złącza (jesli wsperane jest przez przeglądarkę)? + + + + Klucze + Klucze w tabeli "%s" + Typ: + Nazwa: + Pola w kluczu + Dostępne pola + Edytuj klucz + Dodaj klucz + Usuń klucz + + + Zapisz / Otwórz + Proszę wklej kod XML w poniższe pole tekstowe i spróbuj ponownie. + Klient + Serwer + Wejście / Wyjście + Zapisz XML + Załaduj XML + Generuj SQL + Serwer wejściowy: + Zapisz + Załaduj + Lista pozycji + Importuj z DB + Wpisz słowo kluczowe pod którym twój projekt został zapisany: + Wpisz słowo kluczowe pod którym twój projekt ma zostać zapisany: + Wpisz nazwę bazy danych do zaimportowania: + Odpowiedź serwera + Zapisano + Nie znaleniono + Wewnętrzny błąd serwera + Nie zaimplementowane + Serwer niedostępny + + + XML error + Dokumentacja + + diff --git a/locale/pt_BR.xml b/locale/pt_BR.xml new file mode 100644 index 0000000..e490ef8 --- /dev/null +++ b/locale/pt_BR.xml @@ -0,0 +1,92 @@ + + + + Adicionar tabela + Editar tabela + Remover tabela + Alinhar tabelas + Limpar tabelas + Realmente excluir todas as tabelas + Nova tabela + Clique p/ adicionar + Nome + Comentário + + + Adicionar campo + Editar campo + Remover campo + Para cima + Para baixo + Novo campo + Criar chave estrangeira + Selecione a tabela alvo(destino) + Deseja realmente deletar a tabela + Deseja realmente deletar o campo + + + Nome + Tipo + Tamanho + Default + NOT NULL + Auto incrementar + Editar comentário + Digite o comentário para este campo + + + OK + Cancelar + Por favor espere... + Opções + Linguagem + Base de Dados para os novos designs + Algumas opções serão aplicadas somente depois da página totalmente regarrecada. Cookies devem ser ativados para as opções funcionarem. + Distância entre as tabelas + Em pixels, 0 = desativar snapping + Padrão p/ nomes estrangeiros + %T = tabela primária, %R = chave primária, %t = tabela estrangeira + Esconder connectores na tela? + Desenhar conectores suaves (se suportado pelo navegador)? + + + + Chaves + Chaves na tabela "%s" + Tipo: + Nome: + Campos na chave + Campos disponíveis + Editar chave + Adicionar chave + Remover chave + + + Salvar / Carregar + Por favor cole os dados XML na área de texto abaixo e tente novamente. + Cliente + Servidor + Entrada / Saída + Salvar XML + Carregar XML + Gerar SQL + Parâmetros do Servidor: + Salvar + Carregar + Listar itens + Importar do BD + Digite o nome o qual seu design foi salvo: + Digite o nome com qual seu design será salvo: + Digite o nome da base de dados à ser importada: + Resposta do servidor + Salvo + Não Encontrado + Erro Interno do Servidor + Não Implementado + Serviço Indisponível + + + Erro de XML + Documentação + + diff --git a/styles/doc.css b/styles/doc.css new file mode 100644 index 0000000..97d2025 --- /dev/null +++ b/styles/doc.css @@ -0,0 +1,19 @@ +body { + font-family: verdana; + font-size: 80%; +} + +ul#changelog li { + font-weight: bold; + list-style-type: none; + margin-bottom: 1em; +} + +ul#changelog li li { + font-weight: normal; + margin-bottom: 0em; +} + +code { + font-size: 120%; +} diff --git a/styles/ie6.css b/styles/ie6.css new file mode 100644 index 0000000..03de786 --- /dev/null +++ b/styles/ie6.css @@ -0,0 +1,58 @@ +v\:* { + behavior:url(#default#VML); +} + +#bar { + position: absolute; + right: auto; + left: expression(eval(document.documentElement.scrollLeft)+document.documentElement.clientWidth-eval(this.offsetWidth)); + top: expression(eval(document.documentElement.scrollTop)); +} + +#bar .shadow-corner { + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bar_corner.png',sizingMethod='crop'); + overflow: hidden; +} + +#bar .shadow-left { + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bar_left.png',sizingMethod='crop'); + height: expression(eval(this.parentNode.offsetHeight)); + overflow: hidden; +} + +#bar .shadow-bottom { + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/bar_bottom.png',sizingMethod='crop'); + width: expression(eval(this.parentNode.offsetWidth)); + overflow: hidden; +} + +.table .shadow-corner { + background-image: none; +} + +.table .shadow-right { + background-image: none; +} + +.table .shadow-bottom { + background-image: none; +} + +#minimap { + filter: alpha(opacity=90); + position: absolute; + right: auto; + left: expression(eval(document.documentElement.scrollLeft)+document.documentElement.clientWidth-eval(this.offsetWidth)); + top: expression(eval(document.documentElement.scrollTop)+document.documentElement.clientHeight-eval(this.offsetHeight)); +} + +#background { + filter: alpha(opacity=50); +} + +#keys, #opts { + width: expression(eval(document.documentElement.clientWidth)/2); +} diff --git a/styles/ie7.css b/styles/ie7.css new file mode 100644 index 0000000..b333f0f --- /dev/null +++ b/styles/ie7.css @@ -0,0 +1,15 @@ +v\:* { + behavior:url(#default#VML); +} + +#minimap { + filter: alpha(opacity=90); +} + +#background { + filter: alpha(opacity=50); +} + +#keys, #opts { + width: expression(eval(document.documentElement.clientWidth)/2); +} diff --git a/styles/print.css b/styles/print.css new file mode 100644 index 0000000..d14052f --- /dev/null +++ b/styles/print.css @@ -0,0 +1,3 @@ +#bar, #background { + display: none; +} \ No newline at end of file diff --git a/styles/style.css b/styles/style.css new file mode 100644 index 0000000..032c51a --- /dev/null +++ b/styles/style.css @@ -0,0 +1,229 @@ +body { + font-family: verdana, sans serif; + font-size: small; + padding: 0px; + margin: 0px; + background: url(../images/back.gif) fixed; + visibility: hidden; +} + +#area { + z-index: 1; + width: 2000px; + height: 2000px; +} + +#bar { + z-index: 100; + text-align: center; + background-color: #ccc; + position: fixed; + top: 0px; + right: 0px; + width: 150px; + padding: 5px; +} + +#bar .shadow-corner { + width: 8px; + height: 8px; + position: absolute; + left: -8px; + bottom: -8px; + background-image: url(../images/bar_corner.png); +} + +#bar .shadow-left { + width: 8px; + height: 100%; + position: absolute; + left: -8px; + top: 0px; + background-image: url(../images/bar_left.png); +} + +#bar .shadow-bottom { + width: 100%; + height: 8px; + position: absolute; + left: 0px; + bottom: -8px; + background-image: url(../images/bar_bottom.png); +} + +#bar input { + display: block; + width: 90%; + margin: auto; +} + +#bar input.small { + width: 45%; + display: inline; +} + +#minimap { + z-index: 100; + position: fixed; + width: 100px; + height: 100px; + right: 0px; + bottom: 0px; + background-color: #fff; + border: 1px solid #000; + opacity: 0.9; + overflow: hidden; +} + +.mini { + position: absolute; + border: 1px solid #000; + background-color: #eea; + font-size: 1px; + line-height: 1px; +} + +.mini_selected { + background-color: #f85; +} + +.port { + position: absolute; + border: 2px solid #f00; +} + +.table { + position: absolute; + border: 1px solid #000; + background-color: #ddd; + cursor: pointer; + z-index: 10; +} + +.table .shadow-corner { + width: 8px; + height: 8px; + position: absolute; + right: -8px; + bottom: -8px; + background-image: url(../images/table_corner.png); +} + +.table .shadow-right { + width: 8px; + height: 100%; + position: absolute; + right: -8px; + top: 0px; + background-image: url(../images/table_right.png); +} + +.table .shadow-bottom { + width: 100%; + height: 8px; + position: absolute; + left: 0px; + bottom: -8px; + background-image: url(../images/table_bottom.png); +} + + +.table_selected { + border: 2px solid #000; +} + +.table_title { + margin: 0px 30px; + text-align: center; + padding: 3px 0px; +} + +.row { + border-top: 1px dotted #888; + padding: 3px; +} + +.row_selected { + font-weight: bold; + color: #f00; + float: left; +} + +.primary { + font-weight: bold; +} + +.comment { + font-size: 80%; + font-weight: normal; + margin-right: 0.5em; +} + +.adding { + cursor: crosshair; +} + +.relation { + background-color: #000; + overflow: hidden; +} + +#background { + position: absolute; + background-color: #000; + opacity: 0.5; + visibility: hidden; + z-index: 102; +} + +#window { + position: absolute; + visibility: hidden; + z-index: 103; + background-color: #fff; + border: 6px double #333; +} + +#windowtitle { + border-bottom: 2px solid #333; + padding: 2px; + padding-left: 1em; + font-weight: bold; + background-color: rgb(238, 238, 170); +} + +#windowcontent { + padding: 1em; +} + +#windowok, #windowcancel { + margin: 0em 1em 1em; +} + +.small { + font-size: 85%; +} + +#textarea { + width: 500px; + height: 100px; +} + +#keys { + white-space: nowrap; + text-align: center; +} + +legend { + font-weight: bold; +} + +label, input, select { + vertical-align: middle; +} + +#throbber { + position: absolute; + top: 2px; + right: 3px; +} \ No newline at end of file