Skip to content

Commit

Permalink
Update sqlbuddy
Browse files Browse the repository at this point in the history
  • Loading branch information
mrysav committed Nov 26, 2024
1 parent 79d1c37 commit b5af308
Show file tree
Hide file tree
Showing 91 changed files with 43,027 additions and 36,163 deletions.
36 changes: 18 additions & 18 deletions htdocs/sqlbuddy/LICENSE
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Copyright (c) 2008 Calvin Lough
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
Copyright (c) 2008 Calvin Lough

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
68 changes: 68 additions & 0 deletions htdocs/sqlbuddy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
| :warning:   SQL Buddy is no longer actively maintained. |
|-------------------------------------------------------------------|

This software is still free to use under the license provided below, but users should be aware
that it is not currently maintained. No additional releases, including security releases, will
be made available. Caveat emptor.


SQL Buddy
===========

SQL Buddy is a phpMyAdmin alternative with a focus on usability.

![Screenshot 1](https://raw.github.com/calvinlough/sqlbuddy/gh-pages/images/screenshot1.png)
![Screenshot 2](https://raw.github.com/calvinlough/sqlbuddy/gh-pages/images/screenshot2.png)
![Screenshot 3](https://raw.github.com/calvinlough/sqlbuddy/gh-pages/images/screenshot3.png)

## Features

* Create and drop databases and tables
* View, edit, insert and delete table rows
* Execute custom SQL and view the output
* Import and export databases and tables to SQL and CSV formats
* Add, edit and delete MySQL users
* Ships with 47 translations (including Esperanto!)

## Download

**[Download v1.3.3](https://github.com/calvinlough/sqlbuddy/raw/gh-pages/sqlbuddy.zip)**

## Installation

* Download the file above and unzip it
* Upload the sqlbuddy folder to your web server
* Point your browser to the sqlbuddy folder
* Log in using your existing MySQL credentials

## Requirements

* PHP 4.3+
* MySQL 4+

## Help

If you need help, a forum is available at http://groups.google.com/group/sql-buddy/topics

## License

Copyright &copy; 2013 Calvin Lough <http://calv.in>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72 changes: 36 additions & 36 deletions htdocs/sqlbuddy/ajaxcreatetable.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<?php
/*
SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/
ajaxcreatetable.php
- called from dboverview.php to create a new table
MIT license
2008 Calvin Lough <http://calv.in>
*/

include "functions.php";

loginCheck();

if (isset($db))
$conn->selectDB($db);

if (isset($_POST['query'])) {

$queryList = splitQueryText($_POST['query']);

foreach ($queryList as $query) {
$sql = $conn->query($query) or ($dbError = $conn->error());
}

if (isset($dbError)) {
echo $dbError;
}

}

<?php
/*
SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/
ajaxcreatetable.php
- called from dboverview.php to create a new table
MIT license
2008 Calvin Lough <http://calv.in>
*/

include "functions.php";

loginCheck();

if (isset($db))
$conn->selectDB($db);

if (isset($_POST['query'])) {

$queryList = splitQueryText($_POST['query']);

foreach ($queryList as $query) {
$sql = $conn->query($query) or ($dbError = $conn->error());
}

if (isset($dbError)) {
echo $dbError;
}

}

?>
126 changes: 63 additions & 63 deletions htdocs/sqlbuddy/ajaxfulltext.php
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
<?php
/*
SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/
ajaxfulltext.php
- fetches full text for browse tab
MIT license
2008 Calvin Lough <http://calv.in>
*/

include "functions.php";

loginCheck();

if (isset($db))
$conn->selectDB($db);

if (isset($_POST['query'])) {

$queryList = splitQueryText($_POST['query']);

foreach ($queryList as $query) {
$sql = $conn->query($query);
}
}

if ($conn->getAdapter() == "mysql") {
$structureSql = $conn->describeTable($table);

while ($structureRow = $conn->fetchAssoc($structureSql)) {
$types[$structureRow['Field']] = $structureRow['Type'];
}
}

if ($conn->isResultSet($sql)) {

$row = $conn->fetchAssoc($sql);

foreach ($row as $key => $value) {
echo "<div class=\"fulltexttitle\">" . $key . "</div>";
echo "<div class=\"fulltextbody\">";

$curtype = $types[$key];

if (strpos(" ", $curtype) > 0) {
$curtype = substr($curtype, 0, strpos(" ", $curtype));
}

if ($value && isset($binaryDTs) && in_array($curtype, $binaryDTs)) {
echo '<span class="binary">(' . __("binary data") . ')</span>';
} else {
echo nl2br(htmlentities($value, ENT_QUOTES, 'UTF-8'));
}

echo "</div>";
}
}

<?php
/*
SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/
ajaxfulltext.php
- fetches full text for browse tab
MIT license
2008 Calvin Lough <http://calv.in>
*/

include "functions.php";

loginCheck();

if (isset($db))
$conn->selectDB($db);

if (isset($_POST['query'])) {

$queryList = splitQueryText($_POST['query']);

foreach ($queryList as $query) {
$sql = $conn->query($query);
}
}

if ($conn->getAdapter() == "mysql") {
$structureSql = $conn->describeTable($table);

while ($structureRow = $conn->fetchAssoc($structureSql)) {
$types[$structureRow['Field']] = $structureRow['Type'];
}
}

if ($conn->isResultSet($sql)) {

$row = $conn->fetchAssoc($sql);

foreach ($row as $key => $value) {
echo "<div class=\"fulltexttitle\">" . $key . "</div>";
echo "<div class=\"fulltextbody\">";

$curtype = $types[$key];

if (strpos(" ", $curtype) > 0) {
$curtype = substr($curtype, 0, strpos(" ", $curtype));
}

if ($value && isset($binaryDTs) && in_array($curtype, $binaryDTs)) {
echo '<span class="binary">(' . __("binary data") . ')</span>';
} else {
echo nl2br(htmlentities($value, ENT_QUOTES, 'UTF-8'));
}

echo "</div>";
}
}

?>
Loading

0 comments on commit b5af308

Please sign in to comment.