Skip to content
Browse files

SQLBuddy Openshift Quickstart

  • Loading branch information...
0 parents commit 293ca16cb733b8e9749f097cc1b507290fcf4a7c @gshipley committed Aug 16, 2011
Showing with 9,343 additions and 0 deletions.
  1. +4 −0 .openshift/action_hooks/build
  2. +35 −0 README
  3. +35 −0 README.md
  4. 0 libs/.gitkeep
  5. 0 misc/.gitkeep
  6. +3 −0 php/health_check.php
  7. +298 −0 php/index.php
  8. +19 −0 php/sqlbuddy/LICENSE
  9. +51 −0 php/sqlbuddy/README
  10. +37 −0 php/sqlbuddy/ajaxcreatetable.php
  11. +64 −0 php/sqlbuddy/ajaxfulltext.php
  12. +170 −0 php/sqlbuddy/ajaximportfile.php
  13. +37 −0 php/sqlbuddy/ajaxquery.php
  14. +38 −0 php/sqlbuddy/ajaxsavecolumnedit.php
  15. +128 −0 php/sqlbuddy/ajaxsaveedit.php
  16. +130 −0 php/sqlbuddy/ajaxsaveuseredit.php
  17. +70 −0 php/sqlbuddy/browse.php
  18. +64 −0 php/sqlbuddy/config.php
  19. +888 −0 php/sqlbuddy/css/common.css
  20. +94 −0 php/sqlbuddy/css/navigation.css
  21. +27 −0 php/sqlbuddy/css/print.css
  22. +577 −0 php/sqlbuddy/dboverview.php
  23. +210 −0 php/sqlbuddy/edit.php
  24. +189 −0 php/sqlbuddy/editcolumn.php
  25. +254 −0 php/sqlbuddy/edituser.php
  26. +677 −0 php/sqlbuddy/export.php
  27. +568 −0 php/sqlbuddy/functions.php
  28. +311 −0 php/sqlbuddy/home.php
  29. BIN php/sqlbuddy/images/button.png
  30. BIN php/sqlbuddy/images/close.png
  31. BIN php/sqlbuddy/images/closeHover.png
  32. BIN php/sqlbuddy/images/closedArrow.png
  33. BIN php/sqlbuddy/images/goto.png
  34. BIN php/sqlbuddy/images/info.png
  35. BIN php/sqlbuddy/images/infoHover.png
  36. BIN php/sqlbuddy/images/initLoad.png
  37. BIN php/sqlbuddy/images/loading.gif
  38. BIN php/sqlbuddy/images/logo.png
  39. BIN php/sqlbuddy/images/openArrow.png
  40. BIN php/sqlbuddy/images/schemaHeader.png
  41. BIN php/sqlbuddy/images/sortasc.gif
  42. BIN php/sqlbuddy/images/sortdesc.gif
  43. BIN php/sqlbuddy/images/transparent.png
  44. BIN php/sqlbuddy/images/window-button.png
  45. BIN php/sqlbuddy/images/window-center.png
  46. BIN php/sqlbuddy/images/window-close.png
  47. BIN php/sqlbuddy/images/window-header-center.png
  48. BIN php/sqlbuddy/images/window-header-left.png
  49. BIN php/sqlbuddy/images/window-header-right.png
  50. BIN php/sqlbuddy/images/window-resize.png
  51. BIN php/sqlbuddy/images/window-shadow-bottom-left.png
  52. BIN php/sqlbuddy/images/window-shadow-bottom-right.png
  53. BIN php/sqlbuddy/images/window-shadow-bottom.png
  54. BIN php/sqlbuddy/images/window-shadow-left.png
  55. BIN php/sqlbuddy/images/window-shadow-right.png
  56. +88 −0 php/sqlbuddy/import.php
  57. +402 −0 php/sqlbuddy/includes/browse.php
  58. +78 −0 php/sqlbuddy/includes/class/GetTextReader.php
  59. +424 −0 php/sqlbuddy/includes/class/Sql-php4.php
  60. +495 −0 php/sqlbuddy/includes/class/Sql.php
  61. +80 −0 php/sqlbuddy/includes/types.php
  62. +22 −0 php/sqlbuddy/index.php
  63. +249 −0 php/sqlbuddy/insert.php
  64. +839 −0 php/sqlbuddy/js/core.js
  65. +1,240 −0 php/sqlbuddy/js/helpers.js
  66. +242 −0 php/sqlbuddy/js/mootools-1.2-core.js
  67. +206 −0 php/sqlbuddy/js/movement.js
Sorry, we could not display the entire diff because it was too big.
4 .openshift/action_hooks/build
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This is a simple build script, place your post-deploy but pre-start commands
+# in this script. This script gets executed directly, so it could be python,
+# php, ruby, etc.
35 README
@@ -0,0 +1,35 @@
+SQLBuddy on OpenShift
+=========================
+
+SQLBuddy PHP application for openshift.
+
+Running on OpenShift
+--------------------
+
+Create an account at http://openshift.redhat.com/
+
+Create a php application
+
+ rhc-create-app -a sqlbuddy -t php-5.3
+
+Add mysql support to your application
+
+ rhc-ctl-app -a sqlbuddy -e add-mysql-5.1
+Make a note of the username, password, and host name as you will need to use these to login to the mysql database
+
+Add this upstream rails quickstart repo
+
+ cd sqlbuddy
+ git remote add upstream -m master git://github.com/gshipley/sqlbuddy-openshift-quickstart.git
+ git pull -s recursive -X theirs upstream master
+
+Then push the repo upstream
+
+ git push
+
+That's it, you can now checkout your application at:
+
+ http://sqlbuddy-$yourlogin.rhcloud.com/sqlbuddy
+
+
+
35 README.md
@@ -0,0 +1,35 @@
+SQLBuddy on OpenShift
+=========================
+
+SQLBuddy PHP application for openshift.
+
+Running on OpenShift
+--------------------
+
+Create an account at http://openshift.redhat.com/
+
+Create a php application
+
+ rhc-create-app -a sqlbuddy -t php-5.3
+
+Add mysql support to your application
+
+ rhc-ctl-app -a sqlbuddy -e add-mysql-5.1
+Make a note of the username, password, and host name as you will need to use these to login to the mysql database
+
+Add this upstream rails quickstart repo
+
+ cd sqlbuddy
+ git remote add upstream -m master git://github.com/gshipley/sqlbuddy-openshift-quickstart.git
+ git pull -s recursive -X theirs upstream master
+
+Then push the repo upstream
+
+ git push
+
+That's it, you can now checkout your application at:
+
+ http://sqlbuddy-$yourlogin.rhcloud.com/sqlbuddy
+
+
+
0 libs/.gitkeep
No changes.
0 misc/.gitkeep
No changes.
3 php/health_check.php
@@ -0,0 +1,3 @@
+<?php
+print 1;
+?>
298 php/index.php
@@ -0,0 +1,298 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>Welcome to OpenShift</title>
+ <style>
+ html { background: black; }
+ body {
+ background: #333;
+ background: -webkit-linear-gradient(top, black, #666);
+ background: -o-linear-gradient(top, black, #666);
+ background: -moz-linear-gradient(top, black, #666);
+ background: linear-gradient(top, black, #666);
+ color: white;
+ font-family: 'Liberation Sans', Verdana, Arial, Sans-serif;
+ width: 40em;
+ margin: 0 auto;
+ padding: 3em;
+ }
+ a {
+ color: #bfdce8;
+ }
+
+ h1 {
+ text-transform: uppercase;
+ -moz-text-shadow: 2px 2px 2px black;
+ -webkit-text-shadow: 2px 2px 2px black;
+ text-shadow: 2px 2px 2px black;
+ background: #c00;
+ width: 22.5em;
+ margin: .5em -2em;
+ padding: .3em 0 .3em 1.5em;
+ position: relative;
+ }
+ h1:before {
+ content: '';
+ width: 0;
+ height: 0;
+ border: .5em solid #900;
+ border-left-color: transparent;
+ border-bottom-color: transparent;
+ position: absolute;
+ bottom: -1em;
+ left: 0;
+ z-index: -1000;
+ }
+ h1:after {
+ content: '';
+ width: 0;
+ height: 0;
+ border: .5em solid #900;
+ border-right-color: transparent;
+ border-bottom-color: transparent;
+ position: absolute;
+ bottom: -1em;
+ right: 0;
+ z-index: -1000;
+ }
+ h2 {
+ text-transform: uppercase;
+ margin: 2em 0 .5em;
+ }
+
+ pre {
+ background: black;
+ padding: 1em 0 0;
+ -webkit-border-radius: 1em;
+ -moz-border-radius: 1em;
+ border-radius: 1em;
+ color: #9cf;
+ }
+
+ ul { margin: 0; padding: 0; }
+ li {
+ list-style-type: none;
+ padding: .5em 0;
+ }
+ </style>
+</head>
+<body>
+ <img
+ alt="OpenShift logo"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABKCAYAAACVbQIxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
+AAAWcQAAFnEBAJr2QQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURB
+VHic7Z15nBxVtce/p7pnsj4IZOkJyQwhPSQhQCQJSIILnbCjsigh74kooIAgKoqiggooCj71RXyK
+CrI8FQUSEAIYiEmmQYQgJGFLIMlUMllnKgEC2WZ6uuue90dVJT09PTO9BYip7+dTn5m6deucW9XV
+53fXalFVQt47/tHYMvgj9TWb3+tyhISEhBSL9V4X4N+BpO1cW+q5RjiikmUJCQkJebfYJwXkqVXO
+kU+uajmmgiavTTa2nFPa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JbAQQesVxZ0BbVHdXG6rGTvgBmAU/5i/HexltbkC0G
+9wPzkrazDW9x70Q61p6r8Lpmv5C0nSRel0k9cEkPfkcDTydt51/AZ4DfJeKxXa9KSsRjryVtZyfg
+drUgsStyWiF/8Wvr3wWeSdrOEryAeTaeSH3LP+2HwBP+osgNwPA8pkvhL8AtvjD3wVuzov6GPwlh
+NXBX0naaEvFYl8sXEvFYxp/t9ljSdk7E63L7MN7nkncMG/g93rWuTtrOQ3gz0ObntEjvwVtLcjre
+VOO+eFOZA64HHkzazvF4LZJaAHk3xgVCQkLeO5K2cyzwViIeW9lNnoF44xWteDXWDwArg1Xc/hqA
+U/GCxzy8we6lwSC8X3ue4J+3FK/10WVw8Wv3abyxgON8X/Py5LvHt/XrHq5xMtCciMeastJ6+2VO
+BmtHkrbTHy+Y9sUbxH8ux86heAPGq/EWR34MeCwRj3Vq6SVtZygwJhGPNeSk9wemJOKxR7LSRuBN
+W16LN5ZzKl4QD6YYj8FrAbyciMc6Vcry+O6PJxwj8MYzlgSTBZLeyvYTcvwLXqujHu9zS+axGQM+
+jrcq3gYOyVkvcjjwUWA53iD6KaGAhISEvC/xg+QaYFQiHivqXVAh7w7hLxKGhIS8XzkHeCoUj/cv
+/w+9BQu2G5s85QAAAABJRU5ErkJggg==">
+ <h1>
+ Welcome to OpenShift
+ </h1>
+ <p>
+ Place your application here
+ </p>
+ <p>
+ In order to commit to your new project, go to your projects git repo (created with the rhc-create-app command). Make your changes, then run:
+ </p>
+ <pre>
+ git commit -a -m 'Some commit message'
+ git push
+ </pre>
+ <p>
+ Then reload this page.
+ </p>
+
+ <h2>
+ What's next?
+ </h2>
+ <ul>
+ <li>
+ Why not visit us at <a href="http://openshift.redhat.com">http://openshift.redhat.com</a>, or
+ </li>
+ <li>
+ You could get help in the <a href="http://www.redhat.com/openshift">OpenShift forums</a>, or
+ </li>
+ <li>
+ You're welcome to come chat with us in our IRC channel at #openshift on freenode.net
+ </li>
+ </ul>
+</body>
+</html>
19 php/sqlbuddy/LICENSE
@@ -0,0 +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
+THE SOFTWARE.
51 php/sqlbuddy/README
@@ -0,0 +1,51 @@
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+2008 Calvin Lough <http://calv.in>
+
+INTRODUCTION
+
+SQL Buddy is open source! Use of the application is governed by
+a MIT license - see LICENSE file for details.
+
+CHANGELOG
+
+A list of changes made in this version is available online
+at http://www.sqlbuddy.com/releasenotes/
+
+INSTALLATION
+
+To start using SQL Buddy take the folder of unzipped files and
+ftp them to your server. I would recommend placing them in a
+folder such as http://www.yourserver.com/sqlbuddy/. But in
+reality, it shouldn't matter where you put them or what you call
+the folder.
+
+If you are interested, there is a few variables in config.php that you
+can change if you want to customize your installation. It is totally
+optional, and your setup will work just fine if you leave the values at
+their defaults.
+
+UPGRADING
+
+To upgrade SQL Buddy, its probably best to delete the old version then
+unzip the new version in its place.
+
+KEYBOARD SHORTCUTS
+
+There is a bunch of keyboard shortcuts available to speed up things like
+navigating through results, editing rows, etc. A list of shortcuts is
+available on the home tab after you login. If you find the shortcuts
+annoying and would like to disable them, there is a line in main.js that you
+can disable. Its about 50 lines down, and I have left a comment indicating
+which line you need to comment out.
+
+HELP
+
+If you need help, first check http://www.sqlbuddy.com/help/
+
+A forum is also available at http://groups.google.com/group/sql-buddy/topics
+
+Thanks for your support,
+
+Calvin
37 php/sqlbuddy/ajaxcreatetable.php
@@ -0,0 +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;
+ }
+
+}
+
+?>
64 php/sqlbuddy/ajaxfulltext.php
@@ -0,0 +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>";
+ }
+}
+
+?>
170 php/sqlbuddy/ajaximportfile.php
@@ -0,0 +1,170 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+ajaximportfile.php
+- import from file - called from import.php
+
+MIT license
+
+2008 Calvin Lough <http://calv.in>
+
+*/
+
+include "functions.php";
+
+loginCheck();
+
+if (isset($db))
+ $conn->selectDB($db);
+
+function stripCommentLines($in) {
+ if (substr($in, 0, 2) == "--")
+ $in = '';
+
+ return $in;
+}
+
+if (isset($_POST) || isset($_FILES)) {
+
+ if (isset($_FILES['INPUTFILE']['tmp_name']))
+ $file = $_FILES['INPUTFILE']['tmp_name'];
+
+ if (isset($_POST['FORMAT']))
+ $format = $_POST['FORMAT'];
+
+ if (!(isset($format) && $format == "CSV"))
+ $format = "SQL";
+
+ if (isset($_POST['IGNOREFIRST']))
+ $ignoreFirst = $_POST['IGNOREFIRST'];
+
+ $first = true;
+
+ // for csv
+ if (isset($format) && $format == "CSV" && isset($table)) {
+ $columnCount = 0;
+
+ $structureSQL = $conn->describeTable($table);
+
+ if ($conn->isResultSet($structureSQL)) {
+ while ($structureRow = $conn->fetchAssoc($structureSQL)) {
+ $columnCount++;
+ }
+ }
+ }
+
+ $insertCount = 0;
+ $skipCount = 0;
+
+ if (isset($file) && is_uploaded_file($file)) {
+ if (isset($format) && $format == "SQL") {
+ $lines = file($file);
+
+ // the file() function doesn't handle mac line endings correctly
+ if (sizeof($lines) == 1 && strpos($lines[0], "\r") > 0) {
+ $lines = explode("\r", $lines[0]);
+ }
+
+ $commentFree = array_map("stripCommentLines", $lines);
+
+ $contents = trim(implode('', $commentFree));
+
+ $statements = splitQueryText($contents);
+ } else {
+ $statements = file($file);
+
+ // see previous comment
+ if (sizeof($statements) == 1 && strpos($statements[0], "\r") > 0) {
+ $statements = explode("\r", $statements[0]);
+ }
+ }
+
+ foreach ($statements as $statement) {
+ $statement = trim($statement);
+
+ if ($statement) {
+ if (isset($format) && $format == "SQL") {
+ $importQuery = $conn->query($statement) or ($dbErrors[] = $conn->error());
+
+ $affected = (int)($conn->affectedRows($importQuery));
+ $insertCount += $affected;
+ } else if (isset($format) && $format == "CSV" && isset($table)) {
+ if (!(isset($ignoreFirst) && $first)) {
+ preg_match_all('/"(([^"]|"")*)"/i', $statement, $matches);
+
+ $rawValues = $matches[1];
+
+ for ($i=0; $i<sizeof($rawValues); $i++) {
+ $rawValues[$i] = str_replace('""', '"', $rawValues[$i]);
+ $rawValues[$i] = $conn->escapeString($rawValues[$i]);
+ }
+
+ $values = implode("','", $rawValues);
+
+ // make sure that the counts match up
+ if (sizeof($rawValues) == $columnCount) {
+
+ if ($conn->getAdapter() == "sqlite")
+ $importQuery = $conn->query("INSERT INTO '$table' VALUES ('$values')") or ($dbErrors[] = $conn->error());
+ else
+ $importQuery = $conn->query("INSERT INTO `$table` VALUES ('$values')") or ($dbErrors[] = $conn->error());
+
+ $affected = (int)($conn->affectedRows($importQuery));
+
+ $insertCount += $affected;
+ } else {
+ $skipCount++;
+ }
+ }
+ $first = false;
+ }
+ }
+ }
+ }
+
+ $message = "";
+
+ if (!isset($statements)) {
+ $message .= __("Either the file could not be read or it was empty") . "<br />";
+ } else if ($format == "SQL") {
+ $message .= sprintf(__p("%d statement was executed from the file", "%d statements were executed from the file", $insertCount), $insertCount) . ".<br />";
+ } else if ($format == "CSV") {
+ if (isset($insertCount) && $insertCount > 0) {
+ $message .= sprintf(__p("%d row was inserted into the database from the file", "%d rows were inserted into the database from the file", $insertCount), $insertCount) . ".<br />";
+ }
+ if (isset($skipCount) && $skipCount > 0) {
+ $message .= sprintf(__p("%d row had to be skipped because the number of values was incorrect", "%d rows had to be skipped because the number of values was incorrect", $skipCount), $skipCount) . ".<br />";
+ }
+ }
+
+ if (isset($dbErrors)) {
+ $message .= __("The following errors were reported") . ":<br />";
+ foreach ($dbErrors as $merr) {
+ $message .= " - " . $merr . "<br />";
+ }
+ }
+
+ ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/REC-html40/strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
+<head>
+</head>
+<body>
+ <script type="text/javascript">
+
+ parent.updateAfterImport("<?php echo trim(addslashes(nl2br($message))); ?>");
+ parent.refreshRowCount();
+
+ </script>
+</body>
+</html>
+
+ <?php
+
+}
+
+?>
37 php/sqlbuddy/ajaxquery.php
@@ -0,0 +1,37 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+ajaxquery.php
+- used for a variety of ajax functionality - runs a background query
+
+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);
+ }
+}
+
+//return the first field from the first row
+if (!isset($_POST['silent']) && $conn->isResultSet($sql)) {
+ $row = $conn->fetchArray($sql);
+ echo nl2br(htmlentities($row[0], ENT_QUOTES, 'UTF-8'));
+}
+
+?>
38 php/sqlbuddy/ajaxsavecolumnedit.php
@@ -0,0 +1,38 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+ajaxsavecolumnedit.php
+- saves the details of a table column
+
+MIT license
+
+2008 Calvin Lough <http://calv.in>
+
+*/
+
+include "functions.php";
+
+loginCheck();
+
+if (isset($db))
+ $conn->selectDB($db);
+
+if (isset($_POST['runQuery'])) {
+ $query = $_POST['runQuery'];
+
+ $conn->query($query) or ($dbError = $conn->error());
+
+ echo "{\n";
+ echo " \"formupdate\": \"" . $_GET['form'] . "\",\n";
+ echo " \"errormess\": \"";
+ if (isset($dbError))
+ echo $dbError;
+ echo "\"\n";
+ echo '}';
+
+}
+
+?>
128 php/sqlbuddy/ajaxsaveedit.php
@@ -0,0 +1,128 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+ajaxsaveedit.php
+- saves data to the database
+
+MIT license
+
+2008 Calvin Lough <http://calv.in>
+
+*/
+
+include "functions.php";
+
+loginCheck();
+
+if (isset($db))
+ $conn->selectDB($db);
+
+if ($_POST && isset($table)) {
+
+ $insertChoice = "";
+
+ if (isset($_POST['SB_INSERT_CHOICE'])) {
+ $insertChoice = $_POST['SB_INSERT_CHOICE'];
+ }
+
+ $structureSql = $conn->describeTable($table);
+
+ if ($conn->getAdapter() == "mysql") {
+ while ($structureRow = $conn->fetchAssoc($structureSql)) {
+ $pairs[$structureRow['Field']] = '';
+ $types[$structureRow['Field']] = $structureRow['Type'];
+ $nulls[$structureRow['Field']] = (isset($structureRow['Null'])) ? $structureRow['Null'] : "YES";
+ }
+ } else if ($conn->getAdapter() == "sqlite") {
+ foreach ($structureRow as $column) {
+ $pairs[$column[0]] = '';
+ }
+ }
+
+ foreach ($_POST as $key=>$value) {
+ if ($key != "SB_INSERT_CHOICE") {
+ if (is_array($value)) {
+ $value = implode(",", $value);
+ }
+
+ $pairs[$key] = $conn->escapeString($value);
+ }
+ }
+
+ if (isset($pairs)) {
+
+ if ($insertChoice != "INSERT") {
+ $updates = "";
+
+ foreach ($pairs as $keyname=>$value) {
+ if ($conn->getAdapter() == "mysql") {
+ if (isset($types) && substr($value, 0, 2) == "0x" && isset($binaryDTs) && in_array($types[$keyname], $binaryDTs)) {
+ $updates .= "`" . $keyname . "`=" . $value . ",";
+ } else if (!$value && !($value != '' && (int)$value == 0) && $nulls[$keyname] == "YES") {
+ $updates .= "`" . $keyname . "`=NULL,";
+ } else {
+ $updates .= "`" . $keyname . "`='" . $value . "',";
+ }
+ }
+ }
+
+ $updates = substr($updates, 0, -1);
+
+ if (isset($_GET['queryPart']))
+ $queryPart = $_GET['queryPart'];
+ else
+ $queryPart = "";
+
+ if ($conn->getAdapter() == "mysql") {
+ $query = "UPDATE `$table` SET " . $updates . " " . $queryPart;
+ } else if ($conn->getAdapter() == "sqlite") {
+ $query = "UPDATE '$table' SET " . $updates . " " . $queryPart;
+ }
+
+ } else {
+ $columns = "";
+ $values = "";
+
+ foreach ($pairs as $keyname=>$value) {
+
+ if ($conn->getAdapter() == "mysql") {
+ $columns .= "`" . $keyname . "`,";
+ } else if ($conn->getAdapter() == "sqlite") {
+ $columns .= "'" . $keyname . "',";
+ }
+
+ if (isset($types) && substr($value, 0, 2) == "0x" && isset($binaryDTs) && in_array($types[$keyname], $binaryDTs)) {
+ $values .= $value . ",";
+ } else {
+ $values .= "'" . $value . "',";
+ }
+
+ }
+
+ $columns = substr($columns, 0, -1);
+ $values = substr($values, 0, -1);
+
+ if ($conn->getAdapter() == "mysql") {
+ $query = "INSERT INTO `$table` ($columns) VALUES ($values)";
+ } else if ($conn->getAdapter() == "sqlite") {
+ $query = "INSERT INTO '$table' ($columns) VALUES ($values)";
+ }
+ }
+
+ $conn->query($query) or ($dbError = $conn->error());
+
+ echo "{\n";
+ echo " \"formupdate\": \"" . $_GET['form'] . "\",\n";
+ echo " \"errormess\": \"";
+ if (isset($dbError))
+ echo $dbError;
+ echo "\"\n";
+ echo '}';
+
+ }
+}
+
+?>
130 php/sqlbuddy/ajaxsaveuseredit.php
@@ -0,0 +1,130 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+ajaxsavecolumnedit.php
+- saves the details of a table column
+
+MIT license
+
+2008 Calvin Lough <http://calv.in>
+
+*/
+
+include "functions.php";
+
+loginCheck();
+
+$conn->selectDB("mysql");
+
+function removeAdminPrivs($priv) {
+ if ($priv == "FILE" || $priv == "PROCESS" || $priv == "RELOAD" || $priv == "SHUTDOWN" || $priv == "SUPER")
+ return false;
+ else
+ return true;
+}
+
+if (isset($_GET['user']))
+ $user = $_GET['user'];
+
+if (isset($_POST['NEWPASS']))
+ $newPass = $_POST['NEWPASS'];
+
+if (isset($_POST['CHOICE']))
+ $choice = $_POST['CHOICE'];
+
+if (isset($_POST['ACCESSLEVEL']))
+ $accessLevel = $_POST['ACCESSLEVEL'];
+else
+ $accessLevel = "GLOBAL";
+
+if ($accessLevel != "LIMITED")
+ $accessLevel = "GLOBAL";
+
+if (isset($_POST['DBLIST']))
+ $dbList = $_POST['DBLIST'];
+else
+ $dbList = array();
+
+if (isset($_POST['PRIVILEGES']))
+ $privileges = $_POST['PRIVILEGES'];
+else
+ $privileges = array();
+
+if (isset($_POST['GRANTOPTION']))
+ $grantOption = $_POST['GRANTOPTION'];
+
+if (isset($user) && ($accessLevel == "GLOBAL" || ($accessLevel == "LIMITED" && sizeof($dbList) > 0))) {
+
+ if ($choice == "ALL") {
+ $privList = "ALL";
+ } else {
+ if (isset($privileges) && count($privileges) > 0)
+ $privList = implode(", ", $privileges);
+ else
+ $privList = "USAGE";
+
+ if (sizeof($privileges) > 0) {
+ if ($accessLevel == "LIMITED") {
+ $privileges = array_filter($privileges, "removeAdminPrivs");
+ }
+
+ $privList = implode(", ", $privileges);
+ } else {
+ $privList = "USAGE";
+ }
+
+ }
+
+ $split = explode("@", $user);
+
+ if (isset($split[0]))
+ $name = $split[0];
+
+ if (isset($split[1]))
+ $host = $split[1];
+
+ if (isset($name) && isset($host)) {
+ $user = "'" . $name . "'@'" . $host . "'";
+
+ if ($accessLevel == "LIMITED") {
+ $conn->query("DELETE FROM `db` WHERE `User`='$name' AND `Host`='$host'");
+
+ foreach ($dbList as $theDb) {
+ $query = "GRANT " . $privList . " ON `$theDb`.* TO " . $user;
+
+ if (isset($grantOption))
+ $query .= " WITH GRANT OPTION";
+
+ $conn->query($query) or ($dbError = $conn->error());
+ }
+ } else {
+ $conn->query("REVOKE ALL PRIVILEGES ON *.* FROM " . $user);
+ $conn->query("REVOKE GRANT OPTION ON *.* FROM " . $user);
+
+ $query = "GRANT " . $privList . " ON *.* TO " . $user;
+
+ if (isset($grantOption))
+ $query .= " WITH GRANT OPTION";
+
+ $conn->query($query) or ($dbError = $conn->error());
+ }
+
+ if (isset($newPass))
+ $conn->query("SET PASSWORD FOR '$name'@'$host' = PASSWORD('$newPass')") or ($dbError = $conn->error());
+
+ $conn->query("FLUSH PRIVILEGES") or ($dbError = $conn->error());
+
+ echo "{\n";
+ echo " \"formupdate\": \"" . $_GET['form'] . "\",\n";
+ echo " \"errormess\": \"";
+ if (isset($dbError))
+ echo $dbError;
+ echo "\"\n";
+ echo '}';
+ }
+}
+
+?>
70 php/sqlbuddy/browse.php
@@ -0,0 +1,70 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+browse.php
+- browse table - just grabs variables and passes them to include_browse.php
+
+MIT license
+
+2008 Calvin Lough <http://calv.in>
+
+*/
+
+include "functions.php";
+
+loginCheck();
+
+requireDatabaseAndTableBeDefined();
+
+if (isset($db))
+ $conn->selectDB($db);
+
+//run delete queries
+
+if (isset($_POST['runQuery'])) {
+ $runQuery = $_POST['runQuery'];
+
+ $queryList = splitQueryText($runQuery);
+ foreach ($queryList as $query) {
+ $conn->query($query);
+ }
+}
+
+if ($conn->getAdapter() == "sqlite") {
+ $query = "SELECT * FROM '$table'";
+} else {
+ $query = "SELECT * FROM `$table`";
+}
+
+$queryTable = $table;
+
+if (isset($_POST['s']))
+ $start = (int)($_POST['s']);
+else
+ $start = 0;
+
+if (isset($_POST['sortKey']))
+ $sortKey = $_POST['sortKey'];
+
+if (isset($_POST['sortDir']))
+ $sortDir = $_POST['sortDir'];
+else if (isset($sortKey))
+ $sortDir = "ASC";
+
+if (isset($_POST['view']) && $_POST['view'] == "1")
+ $view = 1;
+else
+ $view = 0;
+
+if (isset($sortKey) && $sortKey != "" && isset($sortDir) && $sortDir != "") {
+ $sort = "ORDER BY `" . $sortKey . "` " . $sortDir;
+} else {
+ $sort = "";
+}
+
+require "includes/browse.php";
+
+?>
64 php/sqlbuddy/config.php
@@ -0,0 +1,64 @@
+<?php
+/*
+
+SQL Buddy - Web based MySQL administration
+http://www.sqlbuddy.com/
+
+config.php
+- options for customizing sql buddy
+
+MIT license
+
+2008 Calvin Lough <http://calv.in>
+
+*/
+
+
+/* The values below are for the login.php page */
+
+$sbconfig['DefaultAdapter'] = "mysql";
+$sbconfig['DefaultHost'] = "localhost";
+$sbconfig['DefaultUser'] = "root";
+
+/*
+* If you want to enable automatic login, you can include your password below. To
+* automatically connect to SQLite, include the filename of the database instead.
+* Note: This is generally not recommended because it means that anyone with the
+* proper url will have access to your data. It should only be used on machines
+* that are not accessible from the internet (local testing boxes) or if you have
+* set up some other form of authentication. Use as your own discretion.
+*/
+
+// MySQL
+// $sbconfig['DefaultPass'] = "";
+
+// SQLite
+// $sbconfig['DefaultDatabase'] = "";
+
+/*
+* By default, when you view the homepage of your SQL Buddy installation, a check is
+* performed to see if a newer version of the application is available. No personal
+* information is sent about your installation and the response from the server is sent
+* as plain text. If, for some reason, you want to disable this behaviour, set this option
+* to true to disable automatic checking for updates. To learn about new versions, you can
+* always check the projects website at http://www.sqlbuddy.com/
+*/
+
+$sbconfig['EnableUpdateCheck'] = true;
+
+/*
+* This controls how many rows are displayed at once on the browse tab. If you are on a local
+* machine or have a fast internet connection, you could increase this value.
+*/
+
+$sbconfig['RowsPerPage'] = 100;
+
+/*
+* When set to true, the server will attempt to compress all content before it is sent to the
+* browser. Although unlikely, there is a chance that using gzip will cause issues on certain setups.
+* If you are having trouble getting pages to load properly, you could try disabling gzip.
+*/
+
+$sbconfig['EnableGzip'] = true;
+
+?>
888 php/sqlbuddy/css/common.css
@@ -0,0 +1,888 @@
+body {
+text-align: center;
+background: url(../images/initLoad.png) no-repeat 50% 125px;
+font: 12px/17px arial, sans-serif;
+color: rgb(50, 50, 50);
+}
+
+* {
+margin: 0; padding: 0;
+}
+
+table {
+border-spacing: 0;
+}
+
+a {
+text-decoration: none;
+color: #3A6D96;
+cursor: pointer;
+}
+a:hover {
+color: rgb(60, 60, 60);
+}
+a img {
+border: 0;
+display: block;
+}
+
+p {
+margin: 3px 0 5px;
+}
+
+h3 {
+font-size: 13px;
+}
+h4 {
+font-size: 13px;
+margin: 0 0 5px 0;
+border-bottom: 1px solid rgb(220, 220, 220);
+}
+
+ul {
+padding-left: 20px;
+}
+
+li {
+list-style-type: square;
+}
+
+input, textarea, select {
+font-family: arial, sans-serif;
+color: rgb(50, 50, 50);
+}
+.text, textarea {
+padding: 1px;
+font-size: 13px;
+width: 175px;
+}
+textarea {
+height: 80px;
+line-height: 15px;
+}
+select {
+font-size: 12px;
+}
+select[multiple] {
+border-color: rgb(195, 195, 195) rgb(235, 235, 235) rgb(225, 225, 225) rgb(215, 215, 215);
+border-width: 1px;
+border-style: solid;
+}
+option {
+padding: 1px 5px;
+}
+label {
+margin: 0 5px 0 0;
+vertical-align: middle;
+}
+label input {
+margin: 0 5px 2px 0;
+vertical-align: middle;
+}
+.inputbutton {
+background: url(../images/button.png);
+padding: 2px 5px 4px;
+font-size: 12px;
+line-height: 18px;
+width: 60px;
+height: 22px;
+border: 0;
+color: rgb(60, 60, 60);
+outline-width: thin;
+}
+.inputbutton:active {
+background: url(../images/button.png) 0 22px;
+color: rgb(80, 80, 80);
+}
+
+#headerlogo {
+width: 161px;
+padding: 10px 15px 2px;
+float: left;
+}
+#headerlogo a {
+outline: none;
+}
+#headerlogo img {
+display: inline;
+}
+#headerinfo {
+padding: 7px 18px 0;
+width: 175px;
+text-align: right;
+float: right;
+color: white;
+}
+#headerinfo a {
+margin-left: 10px;
+outline: none;
+}
+
+#load {
+color: rgb(190, 190, 190);
+}
+
+#container {
+width: 100%;
+line-height: 18px;
+text-align: left;
+}
+
+#bottom {
+width: 100%;
+opacity: 0;
+clear: left;
+padding-top: 6px;
+min-height: 350px;
+}
+#leftside {
+vertical-align: top;
+width: 180px;
+float: left;
+}
+#rightside {
+vertical-align: top;
+margin-left: 180px;
+padding: 0 6px 5px 0;
+}
+#sidemenu {
+display: block;
+padding: 10px 0 0 5px;
+}
+
+#content {
+width: 100%;
+}
+#innercontent {
+padding: 8px 10px 10px;
+}
+
+.grid {
+border-width: 1px;
+border-style: solid;
+border-color: rgb(225, 225, 225) rgb(210, 210, 210) rgb(210, 210, 210) rgb(210, 210, 210);
+background: url(../images/schemaHeader.png) top repeat-x;
+}
+
+.gridheader {
+height: 18px;
+border-bottom: 1px solid rgb(150, 150, 150);
+border-right: 1px solid #fff;
+overflow: hidden;
+}
+.gridheaderinner {
+padding-left: 1px;
+}
+
+.headertitle {
+background: #EEEEEE url(../images/schemaHeader.png) top;
+padding: 0 5px 0 6px;
+width: 200px;
+cursor: pointer;
+overflow: hidden;
+display: block;
+float: left;
+color: rgb(90, 90, 90);
+}
+
+.columnresizer {
+border-right: 1px solid rgb(255, 255, 255);
+border-left: 1px solid rgb(185, 185, 185);
+width: 0;
+height: 18px;
+cursor: ew-resize;
+}
+
+.emptyvoid {
+background: #EEEEEE url(../images/schemaHeader.png) top;
+height: 16px;
+width: 14px;
+padding: 1px 4px;
+float: left;
+border-bottom: 1px solid rgb(150, 150, 150);
+border-right: 1px solid rgb(205, 205, 205);
+}
+
+.impotent .headertitle, .impotent .columnresizer {
+cursor: default;
+}
+.nosort .headertitle {
+cursor: default;
+}
+
+.browse {
+line-height: 17px;
+min-width: 100%;
+width: 100%;
+}
+.browse table td {
+border-right: 1px solid rgb(200, 200, 200);
+vertical-align: top;
+}
+
+.item {
+padding: 2px 6px;
+width: 200px;
+overflow: hidden;
+max-height: 16px;
+}
+.longtext {
+width: 300px;
+}
+.numeric {
+width: 150px;
+}
+.binary {
+font-style: italic;
+color: #AAAA8F;
+}
+.structure .headertitle, .structure .item, .dboverview .headertitle, .dboverview .item {
+width: 150px;
+}
+
+.leftchecks {
+width: 22px;
+position: absolute;
+overflow: hidden;
+border-right: 1px solid rgb(185, 185, 185);
+}
+.manip {
+padding-top: 1px;
+vertical-align: top;
+height: 19px;
+}
+.manip:last-child {
+border-bottom: 0 !important;
+}
+.manip dt {
+width: 15px;
+padding: 0 1px 0 5px;
+float: left;
+}
+.manip dd {
+width: 15px;
+padding: 2px 0 0 0;
+float: left;
+}
+.manip dd a {
+background: url(../images/info.png) no-repeat;
+width: 13px;
+height: 13px;
+display: block;
+cursor: default;
+}
+.manip dd a:hover {
+background: url(../images/infoHover.png) no-repeat;
+}
+.browsetab .leftchecks {
+width: 38px;
+}
+
+.withchecks {
+margin-left: 22px;
+border-left: 1px solid rgb(240, 240, 240);
+}
+.withinfo {
+margin-left: 39px;
+}
+
+.sort {
+color: steelblue;
+}
+.sortasc {
+background: url(../images/sortasc.gif) no-repeat right 6px;
+margin-right: 1px;
+}
+.sortdesc {
+background: url(../images/sortdesc.gif) no-repeat right 5px;
+margin-right: 1px;
+}
+
+.alternator {
+border-bottom: 1px solid #f0f0ff;
+}
+.alternator2 {
+background: #f0f0ff;
+border-bottom: 1px solid transparent;
+}
+.highlighted {
+background: #F5F5B8 !important;
+border-bottom: 1px solid #E5E6AD !important;
+}
+
+.gridscroll {
+overflow: auto;
+min-height: 21px;
+}
+
+.gridscroll .browse:last-child {
+border-bottom: 0 !important;
+}
+
+.browsenav {
+width: 100%;
+padding: 2px 0 3px;
+}
+.browsenav td {
+color: rgb(125, 125, 125);
+}
+.browsenav a {
+outline: none;
+}
+.browsenav .options {
+padding-left: 7px;
+}
+.browsenav .options a {
+margin: 0 1px;
+}
+.browsenav .right {
+padding-right: 8px;
+text-align: right;
+}
+.browsenav .right a {
+padding-left: 10px;
+}
+.browsenav .paginator {
+padding: 0 3px 0 5px;
+}
+.browsenav .paginator a {
+color: rgb(125, 125, 125);
+padding-left: 5px;
+}
+.browsenav .paginator a.selected {
+font-weight: bold;
+color: rgb(150, 150, 150);
+}
+
+.insert {
+margin: 8px 6px;
+width: 350px;
+}
+.insert td {
+padding: 1px 6px 0;
+}
+.insert .inputarea {
+padding-bottom: 8px;
+}
+.insert .text {
+width: 325px;
+}
+.insert textarea {
+width: 325px;
+}
+.insertseperator {
+width: 348px;
+margin: 12px 5px;
+border-bottom: 2px solid #ccc;
+}
+.insertmessage {
+margin: 1px 4px;
+padding: 4px 8px;
+color: rgb(75, 75, 75);
+width: 332px;
+}
+
+.edit {
+border-bottom: 1px solid rgb(175, 175, 175);
+margin-bottom: 17px;
+}
+form:last-child .edit {
+border-bottom: 0 !important;
+}
+
+.fieldheader {
+color: rgb(110, 110, 110);
+}
+.fieldheader .fieldheadertitle {
+width: 345px;
+display: block;
+float: left;
+}
+.fieldheader a.fieldclose {
+width: 14px;
+height: 16px;
+padding-right: 4px;
+display: block;
+float: right;
+background: url(../images/close.png) no-repeat 0 1px;
+}
+.fieldheader a.fieldclose:hover {
+background: url(../images/closeHover.png) no-repeat 0 1px;
+}
+.secondaryheader {
+color: rgb(100, 100, 100);
+padding-right: 8px !important;
+vertical-align: top;
+}
+.secondaryheader a {
+color: rgb(100, 100, 100);
+}
+
+#fieldlist .fieldbox:first-child .fieldclose {
+display: none;
+}
+
+.structure .inputbox {
+width: 500px;
+margin-top: 15px;
+}
+.structure .secondaryheader {
+width: 65px;
+}
+.structure .grid {
+margin-bottom: 15px;
+}
+
+.columnheader {
+color: rgb(125, 125, 125);
+padding: 3px 0 0 7px;
+cursor: pointer;
+}
+.column .text {
+font-size: 12px;
+}
+
+.paneheader {
+margin: 7px 0 0;
+color: rgb(115, 115, 115);
+}
+.paneheader a {
+color: rgb(115, 115, 115);
+}
+
+.dboverview .column1 {
+width: 200px;
+}
+.dboverview .inputbox {
+width: 500px;
+}
+.dboverview .inputbox .secondaryheader {
+width: 80px;
+}
+
+.overview {
+margin: 0px 0 5px 0;
+border-bottom: 1px solid rgb(220, 220, 220);
+padding: 0 0 3px 0;
+}
+.inputbox .overview td {
+padding: 7px 0 3px;
+}
+.overview .fieldheader {
+border-bottom: 1px solid rgb(220, 220, 220);
+padding-bottom: 2px;
+}
+.overview .text, .overview select, .overview option {
+width: 135px;
+}
+
+.editcolumn {
+margin-left: 4px;
+padding: 12px 0;
+width: 430px;
+}
+.editcolumn table {
+width: 100%;
+}
+.editcolumn td {
+padding: 1px 6px 0;
+}
+.editcolumn .inputarea {
+padding-bottom: 8px;
+}
+.editcolumn .text {
+width: 325px;
+font-size: 12px !important;
+}
+
+.edituser {
+margin: 0 0 4px 13px;
+padding: 12px 0;
+width: 335px;
+border-bottom: 1px solid rgb(175, 175, 175);
+}
+form:last-child .edituser {
+border-bottom: 0 !important;
+}
+.edituser .edit {
+border-bottom: 0;
+margin-bottom: 0;
+}
+.edituser .secondaryheader {
+width: 110px;
+}
+
+.users {
+padding: 5px 7px 7px;
+width: 550px;
+}
+.users .inputbox {
+width: 335px;
+}
+.users .secondaryheader {
+width: 110px;
+}
+.privpane {
+background: rgb(240, 240, 240);
+padding: 1px 0px 8px 12px;
+margin-top: 5px;
+}
+#dbaccesspane {
+padding-top: 5px !important;
+}
+.privpane td {
+padding: 1px 0 !important;
+}
+
+.export {
+padding: 7px 7px 5px 14px;
+width: 375px;
+}
+.export h4 {
+padding-bottom: 3px;
+}
+.export .secondaryheader {
+width: 110px;
+}
+.export .message {
+color: rgb(100, 100, 100);
+line-height: 14px;
+}
+.export table {
+width: 100%;
+}
+.export td {
+padding: 5px 0;
+}
+.export select {
+width: 100%;
+}
+.export .text {
+font-size: 12px;
+width: 100px;
+}
+.exportseperator {
+margin: 7px 0;
+border-bottom: 1px solid rgb(210, 210, 210);
+}
+#EXPORTWRAPPER {
+padding: 7px;
+}
+#EXPORTWRAPPER strong {
+color: #646464;
+}
+#EXPORTRESULTS {
+width: 100%;
+max-width: 100%;
+height: 250px;
+font-size: 12px;
+margin-top: 3px;
+}
+
+.import {
+padding: 7px 7px 5px 14px;
+width: 350px;
+}
+.import h4 {
+padding-bottom: 3px;
+}
+.import .secondaryheader {
+width: 80px;
+}
+.import table {
+width: 100%;
+}
+.import td {
+padding: 5px 0;
+}
+.import .text {
+font-size: 12px;
+width: 100px;
+}
+
+.inputbox {
+padding: 0 7px 5px;
+}
+.inputbox h4 {
+margin-bottom: 5px;
+padding-bottom: 2px;
+}
+.inputbox table {
+width: 100%;
+}
+.inputbox td {
+padding: 5px 0;
+}
+.inputbox .text, .inputbox textarea, .inputbox select[multiple] {
+font-size: 12px;
+}
+
+.fulltextwin {
+position: absolute;
+text-align: left;
+color: rgb(240, 240, 240);
+width: 475px;
+}
+.fulltextheader {
+height: 21px;
+}
+.fulltextheader td {
+padding: 2px 0;
+}
+.headertl {
+width: 19px;
+background: url(../images/window-header-left.png) no-repeat;
+}
+.headertr {
+width: 19px;
+background: url(../images/window-header-right.png) no-repeat;
+}
+.headercenter {
+background: url(../images/window-header-center.png) repeat-x;
+}
+
+.fulltextheader p {
+margin: 0 !important;
+padding-left: 2px;
+}
+.fulltextheader img {
+margin-top: 1px;
+}
+.mainl {
+width: 13px;
+background: url(../images/window-shadow-left.png) repeat-y;
+}
+.maincenter {
+background: url(../images/window-center.png);
+padding: 5px 5px 0 8px;
+}
+.fulltextcontent {
+overflow: auto;
+min-height: 100px;
+padding-right: 5px;
+}
+.mainr {
+width: 13px;
+background: url(../images/window-shadow-right.png) repeat-y;
+}
+.fulltexttitle {
+color: rgb(175, 175, 175);
+font-weight: bold;
+}
+.fulltextbody {
+margin-bottom: 10px;
+line-height: 15px;
+}
+.fulltextfooter {
+width: 100%;
+}
+.fulltextfooter td {
+height: 19px;
+}
+.footerbl {
+width: 15px;
+background: url(../images/window-shadow-bottom-left.png) no-repeat -1px;
+}
+.footerbr {
+width: 15px;
+background: url(../images/window-shadow-bottom-right.png) no-repeat;
+}
+.footermiddle {
+width: auto;
+background: url(../images/window-shadow-bottom.png) repeat-x;
+}
+
+.dialog {
+width: 475px;
+}
+.dialog .fulltextcontent {
+min-height: 25px;
+}
+.dialog .maincenter {
+padding: 5px 2px 0px 8px !important
+}
+.buttons {
+padding: 7px 0 5px;
+}
+.windowbutton {
+background: url(../images/window-button.png);
+padding: 3px 5px 4px;
+width: 60px;
+height: 22px;
+border: 0;
+color: white;
+outline-color: rgb(130, 130, 130);
+outline-width: thin;
+}
+.resizeHandle {
+float: right;
+margin-bottom: -1px;
+}
+
+#QUERY {
+width: 550px;
+font-size: 12px;
+display: block;
+margin: 2px 0 0;
+}
+
+.querybox {
+font-family: "courier new";
+background: rgb(90, 90, 90);
+padding: 4px 6px 2px;
+margin: 10px 0 1px 0;
+max-height: 75px;
+overflow: auto;
+font-weight: normal;
+}
+
+.clearer {
+height: 0;
+line-height: 0;
+clear: both;
+}
+
+#loginform {
+margin: 0 auto;
+width: 330px;
+margin-top: 115px;
+}
+#loginform .loginspacer {
+padding: 13px 18px 13px 14px;
+}
+#loginform table {
+width: 100%;
+}
+.loginheader {
+border-bottom: 1px solid #E1E1E1;
+padding-bottom: 8px !important;
+float: left;
+width: 100%;
+margin-bottom: 10px;
+}
+.loginheader h3 {
+font-size: 13px;
+float: left;
+}
+.loginheader a {
+float: right;
+text-align: right;
+}
+#loginform td {
+padding: 5px 5px;
+line-height: 14px;
+}
+#loginform .field {
+width: 85px;
+text-align: right;
+color: #4A7496;
+}
+#loginform select {
+width: 165px;
+}
+#loginform .text {
+width: 160px;
+color: rgb(70, 70, 70);
+font-size: 13px;
+}
+#loginform .errormess {
+color: #AA3939;
+padding: 0 0 5px;
+text-align: center;
+}
+
+.errormessage {
+background: rgb(255, 245, 245);
+border: 1px solid rgb(230, 210, 210);
+padding: 7px 9px;
+line-height: 15px;
+color: rgb(80, 80, 80);
+}
+.errormessage strong {
+color: #EB4A4A;
+display: block;
+margin-bottom: 3px;
+}
+.errormessage p {
+margin-bottom: 0;
+}
+.statusmessage {
+padding: 4px 0;
+color: rgb(125, 125, 125);
+}
+
+.hometable {
+margin: 7px 0 0 10px;
+width: 475px;
+}
+.hometable p {
+line-height: 15px;
+}
+.hometable table td {
+padding-top: 7px;
+}
+.hometable .text {
+width: 130px;
+}
+.hometable select {
+width: 135px;
+}
+.hometable .inputfield {
+color: rgb(140, 140, 140);
+width: 95px;
+padding-right: 7px;
+text-align: right;
+}
+
+.keyboardtable {
+width: 445px;
+margin-top: 7px;
+border-right: 1px solid rgb(200, 200, 200);
+border-bottom: 1px solid rgb(200, 200, 200);
+}
+.keyboardtable td, .keyboardtable th {
+padding: 1px 10px 1px 5px !important;
+border-left: 1px solid rgb(200, 200, 200);
+border-top: 1px solid rgb(200, 200, 200);
+}
+.keyboardtable th {
+color: rgb(125, 125, 125);
+font-weight: normal;
+text-align: left;
+}
+
+dl.information {
+width: 200px;
+}
+dl.information dt {
+float: left;
+width: 100px;
+clear: left;
+color: rgb(125, 125, 125);
+}
+dl.information dd {
+float: left;
+width: 100px;
+}
+
+.morelink:hover {
+text-decoration: underline;
+}
+
+.errorpage {
+padding: 6px 10px 3px;
+width: 450px;
+}
+.errorpage h4 {
+font-weight: bold;
+}
+
+.goto {
+cursor: pointer;
+margin-top: 2px;
+opacity: 0.7;
+float: right;
+}
+.goto:hover {
+opacity: 1;
+}
94 php/sqlbuddy/css/navigation.css
@@ -0,0 +1,94 @@
+.dblistheader {
+padding: 0px 0px 0px 7px;
+outline: none;
+text-transform: uppercase;
+font-size: 10px;
+color: rgb(175, 175, 175);
+}
+
+.dblist {
+width: 100%;
+line-height: 17px;
+padding-bottom: 6px;
+}
+.dblist ul {
+padding: 0px;
+}
+.dblist ul li {
+list-style-type: none;
+}
+.dblist ul li a {
+display: block;
+outline: none;
+border-width: 1px 0 1px 1px;
+border-style: solid;
+border-color: transparent;
+}
+.dblist ul li a .menutext {
+padding: 1px 6px 0px 0px;
+margin-left: 16px;
+border: 0;
+}
+.dblist ul li a .menutoggler {
+width: 12px;
+height: 14px;
+margin: 3px 4px 0px 2px;
+float: left;
+background: transparent url(../images/closedArrow.png) no-repeat 4px 3px;
+}
+.dblist ul li a .menuicon {
+height: 14px;
+margin: 0px 5px 0px 6px;
+float: left;
+font-size: 10px;
+padding-top: 1px;
+}
+.dblist ul li.expanded a .menutoggler{
+background: transparent url(../images/openArrow.png) no-repeat 3px 3px;
+}
+.dblist ul li.expanded .sublist {
+display: block;
+}
+
+.sublist {
+border: 0px !important;
+overflow: hidden;
+}
+.sublist li a {
+padding: 1px 6px 0px 22px !important;
+margin-left: 7px;
+overflow-x: hidden;
+}
+.sublist li.loading a {
+background: url(../images/loading.gif) no-repeat 0 0 !important;
+}
+.subcount {
+padding-left: 5px;
+font-size: 11px;
+}
+
+#toptabs {
+padding-top: 7px;
+float: left;
+}
+#toptabs ul {
+padding: 0;
+}
+#toptabs ul li {
+list-style-type: none;
+float: left;
+}
+#toptabs ul li a {
+margin: 0 5px 0 15px;
+outline: none;
+}
+#toptabs ul li a .rowcount {
+font-weight: normal;
+padding-left: 3