diff --git a/Source/Disk Start.vbs b/Source/Disk Start.vbs new file mode 100644 index 0000000..e2b4d53 --- /dev/null +++ b/Source/Disk Start.vbs @@ -0,0 +1,30 @@ +' Name: Start MS-DOS File +' Created By: The Uniform Server Development Team +' Edited Last By: Olajide Olaolorun (empirex) +' Comment: Re-Arranged everything to look nicely. +' To Developers: Added the MySQL start option. + +Dim WSHShell, dir, fso, f1 +Set fso = CreateObject("Scripting.FileSystemObject") +Set WSHShell = WScript.CreateObject("WScript.Shell") + +' Uncoment next line to ask about virtual disk for server (useful for CD or USB stick distributions) +s=InputBox("Specify a Disk Drive for the Server to use... (one character please)","Server Disk","W") + +If intDoIt = vbCancel Then + WScript.Quit +End If +s=mid(s,1,1) + +t=MsgBox("Start the MySQL Database Server?", vbYesNo + vbQuestion, "Database Support") +If intDoIt = vbNo Then + m="" +Else + m=" mysql" +End If + +WSHShell.run "Server_Start.bat "&s&m,0,0 +WScript.sleep(1000) + +' --- If you do not want to open default browser at server start - Not needed, Commented +'WSHShell.run "udrive\home\admin\www\redirect.html" \ No newline at end of file diff --git a/Source/Server_Start.bat b/Source/Server_Start.bat new file mode 100644 index 0000000..d103ad6 --- /dev/null +++ b/Source/Server_Start.bat @@ -0,0 +1,64 @@ +: Name: Start Server File +: Created By: The Uniform Server Development Team +: Edited Last By: Olajide Olaolorun (empirex) +: Comment: After start, go to apanel directly. +: To Developers: Implemented %www%, and %apanel% :) + +@echo off + +rem use: start mysql console - to start mysql at server start and display console +rem use: start mysql - to start mysql at server start +rem use: start nomysql console - to display console + +udrive\home\admin\program\pskill.exe Apache.exe + +if errorlevel 2 goto :PAUSE + +if not errorlevel 1 goto :STARTED + +set Disk=%1 + +if "%Disk%"=="" set Disk=w + +rem create the disk +subst %Disk%: "udrive" + +if errorlevel 1 goto :HINT +set apachepath=\usr\local\apache2\ +set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%. +set programit=%Disk%:\home\admin\program\ +set closeit=%programit%close.bat %Disk% + +%Disk%: +cd \usr\local\php +if "%2"=="mysql" start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf +CLS +echo The server is working on the disk %Disk%:\ [http/127.0.0.1/apanel/] +set www=\www\ +set apanel=\home\admin\www\ +start %apanel%\redirect.html + +if "%3"=="console" goto :CONSOLE +start %programit%uniserv.exe "%apacheit%" "%closeit%" +goto :END + +:CONSOLE +%apacheit% +%closeit% +goto :END + +:HINT +CLS +echo The disk %Disk% is busy. Use start.bat [disk letter] +goto :PAUSE + +:STARTED +CLS +echo ERROR!!! +echo One of the instances of Apache server is started. Use stop.bat + +:PAUSE +echo . +pause + +:END \ No newline at end of file diff --git a/Source/Stop.bat b/Source/Stop.bat new file mode 100644 index 0000000..9050a15 --- /dev/null +++ b/Source/Stop.bat @@ -0,0 +1,16 @@ +: Name: Stop Server File +: Created By: The Uniform Server Development Team +: Edited Last By: Olajide Olaolorun (empirex) +: Comment: Tara's new syetm of shutting down the server +: To Developers: Implemented a new system of server shutdown + +@echo off +udrive\home\admin\program\pskill.exe Apache.exe c + +if errorlevel 2 goto :PAUSE + +:PAUSE +echo . +pause + +:END diff --git a/Source/UniController.exe b/Source/UniController.exe new file mode 100644 index 0000000..6f4d6b6 Binary files /dev/null and b/Source/UniController.exe differ diff --git a/Source/udrive/desktop.ini b/Source/udrive/desktop.ini new file mode 100644 index 0000000..6cf1551 --- /dev/null +++ b/Source/udrive/desktop.ini @@ -0,0 +1,4 @@ +[ViewState] +Mode= +Vid= +FolderType=Documents diff --git a/Source/udrive/docs/CHANGE LOG.txt b/Source/udrive/docs/CHANGE LOG.txt new file mode 100644 index 0000000..9a7577c --- /dev/null +++ b/Source/udrive/docs/CHANGE LOG.txt @@ -0,0 +1,216 @@ +------------------------- +Uniform Server Change Log +------------------------- + + +3.4 - phpMyAdmin updated to 2.10.1; + - eAccelerator 0.9.5.1 + Control Panel + - MySQL updated to 5.0.41; + - Apache updated to 2.0.59; + - PHP & PHP Extensions updated to 5.2.3; + - ActivePerl updated to 5.8.8.820; + - phpMyBackupPro updated to - 2.1; + - Admin Panel 2.0 Updated; + - Service Scripts Updated/Bug Fixes; + - Scroller Fixed/Removed + - core server arcitecture/structure updated; + ... + +3.3 - phpMyAdmin updated to 2.6.4-pl4; + - MySQL updated to 5.1.17; + - Apache updated to 2.0.55; + - PHP & PHP Extensions updated to 5.1.1; + - ActivePerl updated to 5.8.7.815; + - phpMyBackupPro Added - 1.7.1; + - New Admin Panel 2.0 - Alpha Release; + - Multilingual; + - SSL PreInstalled; + - Service Scripts Updated/Bug Fix + - New Start Page; + - Plugin System Suitable; + - core server arcitecture/structure updated; + ... + +3.2a - Apache updated to 2.0.54; + - PHP updated to 5.0.4; + - MySQL updated to 4.1.12a; + - ActivePerl updated to 5.8.7.813; + - phpMyAdmin updated to 2.6.3-rc1; + +3.2 - Apache updated to 2.0.50; + - PHP updated to 5.0.0; + - MySQL updated to 4.0.20d; + - ActivePerl updated to 5.8.4.810; + - phpMyAdmin updated to 2.6.0-beta2; + - PHP GD2,mysql and sockets extentions included; + - Script to convert server to NTservices works again; + - Turck MMCache removed; + - core server arcitecture improved; + ... + +3.1 - ActivePerl updated to 5.8.0.809; + - MySQL updated to 4.0.18; + - phpMyAdmin updated to 2.5.6; + - secure.pm allow from 127.0.0.1; + - bugfix in start.bat "subst /D"; + - AddType Application/x-httpd-php-source .phps + +3.0 - ActivePerl updated to 5.8.0.808; + - MySQL updated to 4.0.17; + - phpMyAdmin updated to 2.5.5-RC2; + - Check for old Apache in start.bat. + - perl location changed to \usr\bin; + - \home\unix deleted; + - mod_dav for dav-fs support added; + - many minor and major corrections; + - now it is possible to change the server disk! + - Script to convert server to NTservices temporally disabled; + - very new concept!!! + +2.8a - PHP updated to 4.3.4; + - Turck MMCache 2.4.6 added; + - Kill old Apache in start.bat. + - PHP: go-pear.bat added; + - mod_deflate for output compression added; + - few minor corrections; + +2.8 - Apache updated to 2.0.48; + - PHP updated to 4.3.4RC3; + - phpMyAdmin updated to 2.5.4; + - MySQL updated to 4.0.16; + - 1 second pause in start.vbs. + - PHP Zend Optimizer removed (module may be); + +2.7 - Apache updated to 2.0.47; + - PHP updated to 4.3.3; + - PHP Zend Optimizer v2.1.0 included; + - phpMyAdmin updated to 2.5.3; + - MySQL updated to 4.0.15; + +2.6 - phpMyAdmin updated to 2.5.1; + - PHP updated to 4.3.2; + - AddHandler in httpd.conf resolved; + +2.5 - Apache updated to 2.0.46; + - PHP updated to 4.3.2RC4; + - MySQL updated to 4.0.13; + - phpMyAdmin updated to 2.5.1-rc1; + - ActivePerl updated to 5.8.0.806; + - AddHandler in httpd.conf still not resolved; + + +2.4 - Apache updated to 2.0.45; + - a bug with AddHandler in httpd.conf corrected; + +2.3 - phpMyAdmin updated to 2.4.0; + - MySQL updated to 4.0.12 and included by default; + +2.3a1 - PHP updated to 4.3.1; + - phpMyAdmin updated to 2.4.0-rc2; + - PrcView updated to 3.7.2.5; + - double php.ini removed; + - configuration script corrected; + - Some Perl modules added by default; + +2.2 - Server directory renamed to UniServer_XX for better compatibility; + - phpMyAdmin updated to 2.4.0-rc1; + - by default PHP loads as "Apache 2.0 Filter"; + - in "httpd.conf" one can chouse way in which PHP interacts with Apache; + - the server serves two copies of php.ini see php.ini; + - a patch to correct win98 error applied to Apache 2.0.44; + - my-small.cnf corrected "skip-innodb" by default; + - Start.vbs added options for start of MySQL and browser; + - Start.vbs starts browser by default; + - a lot of minor corrections; + +2.1 - Apache updated to 2.0.44; + - ActivePerl updated to ActivePerl 5.8.0.804; + - Uniconfig.php corrected; + - Start.vbs for hidden start added; + +2.0 - PHP updated to 4.3.0; + - MySQL updated to 3.23.54a; + - phpMyAdmin updated to 2.3.3pl1; + - Few mistakes corrected. + +2b4 - MySQL configuration file created; + - phpMyAdmin updated to 2.3.3; + - MySQL control scripts changed; + - Few minor bugs corrected; + +2b3 - MySQL updated to 3.23.53-max; + - PrcView updated to 3.7.2.4; + - phpMyAdmin updated to 2.3.2; + +2b2 - Apache updated to 2.0.43; + - Added security check in administration scripts; + - In php.ini session.save_path =w:/tmp; + +2b1 - Apache updated to 2.0.42; + - PHP updated to 4.2.3; + - phpMyAdmin updated to 2.3.1; + - Added update script; + - A bug in MySQL control scripts corrected; + +2a2 - MySQL updated to 3.23.52; + - PERl updated to 5.6.1.633; + - Added script to convert server to NTservices; + - Additional futures of PhpMyAdmin preconfigured; + - Added plugis directory; + - A lot of minor and major corrections; + +2a1 - The server combined into one distribution; + - WSH is not required any more; + - "Serveradmin" directory renamed to "admin"; + - administration scripts modified; + - execution of cgi scripts outside of defined aliases restricted; + - phpMyAdmin updated to 2.3.0; + - 7z archive used for is distribution packages; + - Added scripts to control Apache2 as service on windows NT. + +1.10.NT - Uniform server configuration script extended; + - windows to unix script bug corrected; + - phpMyAdmin updated to 2.3.0-rc4 + - start.vbs - starts browser; + - short documentation added; + - Register globals in PHP.ini is on by default!!! + (not most secure but compatible with old scripts); + - A lot of minor corrections; + +1.9.NT - PHP updated to 4.2.2. + +1.8.NT - PHP.ini minor bug corrected; + - unused apache modules deleted; + - The distributions are split for 95, 98 or ME and NT, 2000 or XP; + +1.8 - Design of main page optimized; + - Apache configuration added; + - Administration scripts corrected; + +1.7 - Apache, MySQL, PhpMyadmin - Updated; + - Minor bugfix and optimization; + +1.6.1 - The problem with mysql stop corrected; + +1.6 - Minor bugfix; + - Server temporally directory improved; + - httpd.conf -> LogFormat -> combined; + +1.5 - Major bugfix; + - documentation links added; + +1.4 - Bug fix; + - security update; + - test pages added; + +1.3 - First public release. + + +----------------------------------------------------------- +Copyright 2002-2007 The Uniform Server Development Team +All rights reserved. + +The authors were trying to make the best product so they +cannot be held responsible for any type of damage or +problems caused by using this or another software. + diff --git a/Source/udrive/docs/LICENSE.txt b/Source/udrive/docs/LICENSE.txt new file mode 100644 index 0000000..14ac9e4 --- /dev/null +++ b/Source/udrive/docs/LICENSE.txt @@ -0,0 +1,35 @@ +---------------------- +Uniform Server License +---------------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +----------------------------------------------------------- +Copyright 2002-2007 The Uniform Server Development Team +All rights reserved. + +The authors were trying to make the best product so they +cannot be held responsible for any type of damage or +problems caused by using this or another software. + diff --git a/Source/udrive/docs/READ ME.txt b/Source/udrive/docs/READ ME.txt new file mode 100644 index 0000000..ae72147 --- /dev/null +++ b/Source/udrive/docs/READ ME.txt @@ -0,0 +1,59 @@ +------------ +Read Me File +------------ + +The Uniform Server is a free product and do not contain commercial software! +You can use it for free. + + - No installation required! + + +------------------- +System Requirements +------------------- + + - Windows 95 or 98 or ME or NT or 2000 or XP. + - TCP/IP protocol support. + + +----------------------- +To enable Apache server +----------------------- + + - Switch on TCP/IP network protocol (if you have no network card just install something). + + +------------------- +Starting the server +------------------- + + - Run Server Start.vbs or Start.bat (and you will have by default W:\ disk that is server). + - It should automatically open up a browser that will connect to http://localhost/apanel/ or by IP address http://127.0.0.1/apanel/. + - To start as service on NT run plugins\Services\Run.bat (!!! be sure you know what you are doing). + + +------------------------ +Shutting down the server +------------------------ + + - To correctly shutdown run Stop.bat. + - Admin Panel link also works. + + +-------------------------- +Troubleshooting the server +-------------------------- + + - If Disk W already exists, use Disk Start.vbs + - Make sure you are online to get the news feed if using Admin Panel Pro. + - If Port 80 is already opened, disable the program or whatever it is that is using it. + - If others, go to http://forum.uniformserver.com + + +----------------------------------------------------------- +Copyright 2002-2007 The Uniform Server Development Team +All rights reserved. + +The authors were trying to make the best product so they +cannot be held responsible for any type of damage or +problems caused by using this or another software. diff --git a/Source/udrive/docs/SERVER STRUCTURE.txt b/Source/udrive/docs/SERVER STRUCTURE.txt new file mode 100644 index 0000000..51a8aad --- /dev/null +++ b/Source/udrive/docs/SERVER STRUCTURE.txt @@ -0,0 +1,123 @@ +-------------------- +The Server Structure +-------------------- + +w:\www + Document root (/). + By default: + ReadmeName README.html + HeaderName HEADER.html + server-parsed .shtml .shtm .sht + DirectoryIndex index.html index.shtml index.html.var + index.htm index.php3 index.php index.pl + index.cgi +w:\www\images + Images directory + + +w:\cgi-bin + Script root (/cgi-bin/). + By default: + cgi-script .bat .exe .pl .cgi + + +w:\home + Users home page. + +w:\home\admin + Administration page. +w:\home\admin\Www + Server administration pages root (/apanel/); +w:\home\admin\www/cgi-bin + Server administration script root (/apanel/cgi-bin/); +w:\home\admin\program + Server administration programs; +w:\home\admin\Www\phpMyAdmin + MySQL administrator (/apanel/phpMyAdmin/) +w:\home\admin\Www\plugins + Admin Plugins directory. +w:\home\admin\www\icons + Admin Panel Icons +w:\home\admin\www\images + Admin Panel Images +w:\home\admin\www\rss + RSS Parser + +W:\usr + User Program directory + +w:\usr\bin + PERL folder. +w:\usr\lib + Selected PERL libraries. To have all libraries download "perl_modules" + +w:\usr\local + Program folder. + +w:\usr\local\apache2 + Apache2 folder. +w:\usr\local\apache2\bin + Apache2 binaries. + A copy of php.ini should be placed here for php module! +w:\usr\local\apache2\conf + Apache2 configuration files. (see httpd.conf) +w:\usr\local\apache2\icons + Apache2 icons. +w:\usr\local\apache2\logs + Apache2 logs. +w:\usr\local\apache2\modules + + +w:\usr\local\mysql + MySQL folder. +w:\usr\local\mysql\bin + MySQL binaries. +w:\usr\local\mysql\data + MySQL databases. +w:\usr\local\mysql\share + MySQL share. + +w:\usr\local\php + PHP folder. (see php.ini) + By default: + register_globals = On - But you should do your best to write + your scripts so that they do not require register_globals to be on. + The easy way to use such variables "$step=$HTTP_POST_VARS['Submit'];". + Or "import_request_variables("gP", "st");" - see PHP documentation. +w:\usr\local\php\logs + PHP log files +w:\usr\local\php\extensions + PHP Extensions + + +w:\tmp + Temporally folder. + + +W:\plugins + Server Plugins durectory. +w:\plugins\Services + Uniform Server Sercives Script (For NT) + + +w:\docs + Uniform Server Documentation (/docs/) + + +w:\docs\src + Uniform Server Source Files + + +w:\htpasspwd + Uniform Server HTPASSWD dirctory + By default: + Contains the dir for the htpasswds of admin and www + + +----------------------------------------------------------- +Copyright 2002-2007 The Uniform Server Development Team +All rights reserved. + +The authors were trying to make the best product so they +cannot be held responsible for any type of damage or +problems caused by using this or another software. diff --git a/Source/udrive/docs/SRC/pskill.c b/Source/udrive/docs/SRC/pskill.c new file mode 100644 index 0000000..a31a406 --- /dev/null +++ b/Source/udrive/docs/SRC/pskill.c @@ -0,0 +1,290 @@ +// Copyright 2004 - 2007 The Uniform Server Development Team +// Kills application +// version 1.1 + + +#include +#include +#include +#include +#include + + +enum tagErrorCodes + { + ERROR_SYSTEM = 2, + ERROR_PLATFORM, + ERROR_USAGE + }; + + +/* + * type definition for application-defined callback function + */ +typedef BOOL (CALLBACK *LPCALLBACK)(DWORD, LPTSTR, LPTSTR, LPARAM); + + +/* + * callback function for application-defined logic + * return: TRUE - to continue enumeration + * FALSE - to stop enumeration + */ +BOOL CALLBACK +EnumCallback(DWORD dwProcessID, LPTSTR lpProcessName, + LPTSTR lpTargetName, LPARAM lParam) +{ + if ( _tcsicmp(lpProcessName, lpTargetName) == 0 ) + if ( (BOOL)lParam ) // query only + { + _tprintf(_T("%s is running.\n"), lpProcessName); + return FALSE; + } + else // kill if matched + { + HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, + FALSE, dwProcessID); + if ( hProcess ) + { + TerminateProcess(hProcess, (DWORD) -1); + CloseHandle(hProcess); + } + } + + return TRUE; +} + + +/* + * exit the current process after printing an optional error message + */ +static void +ErrorExit(LPTSTR lpErrMsg, UINT uExitCode) +{ + if ( lpErrMsg ) + switch ( uExitCode ) + { + case ERROR_SYSTEM: + _tprintf(_T("System error: %s\n"), lpErrMsg); + break; + + case ERROR_USAGE: + _tprintf(_T("%s\n\n"), lpErrMsg); // print an extra blank line + break; // above the usage message + + default: + _tprintf(_T("%s\n"), lpErrMsg); + break; + } + + // print usage on usage error regardless of lpErrMsg + if ( uExitCode == ERROR_USAGE ) + _tprintf(_T("%s\n\n%s\n%s\n"), + _T("Usage: pskill [c]"), + _T(" with c - kill the process"), + _T(" without c - query only")); + + ExitProcess(uExitCode); +} + + +/* + * enumerate processes using PSAPI + */ +static int +EnumPSAPI(LPCALLBACK lpCallback, LPTSTR lpTargetName, LPARAM lParam) +{ + typedef BOOL (WINAPI *LPEP)(DWORD *, DWORD, DWORD *); + typedef BOOL (WINAPI *LPEPM)(HANDLE, HMODULE *, DWORD, LPDWORD); + typedef DWORD (WINAPI *LPGMBN)(HANDLE, HMODULE, LPTSTR, DWORD); + + LPEP lpEnumProcesses; + LPEPM lpEnumProcessModules; + LPGMBN lpGetModuleBaseName; + + DWORD aProcesses[1024], cbNeeded, cProcesses, i; + BOOL bContinue; + + HINSTANCE hDLL = LoadLibrary("psapi.dll"); + + if ( !hDLL ) + ErrorExit(_T("LoadLibrary"), ERROR_SYSTEM); + + lpEnumProcesses = (LPEP)GetProcAddress(hDLL, "EnumProcesses"); + lpEnumProcessModules = (LPEPM)GetProcAddress(hDLL, "EnumProcessModules"); + lpGetModuleBaseName = (LPGMBN)GetProcAddress(hDLL, "GetModuleBaseNameA"); + + if ( lpEnumProcesses && lpEnumProcessModules && lpGetModuleBaseName ) + bContinue = lpEnumProcesses(aProcesses, sizeof(aProcesses), &cbNeeded); + else + { + FreeLibrary(hDLL); + ErrorExit(_T("GetProcAddress"), ERROR_SYSTEM); + } + + if ( !bContinue ) + { + FreeLibrary(hDLL); + ErrorExit(_T("EnumProcesses"), ERROR_SYSTEM); + } + + for ( i = 0, cProcesses = cbNeeded / sizeof(DWORD); + i < cProcesses && bContinue; + i++ ) + { + TCHAR szProcessName[MAX_PATH] = ""; + HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, + FALSE, aProcesses[i]); + if ( hProcess ) + { + HMODULE hMod; + DWORD cbModules; + + // get the process name, which is in the 1st module + if ( lpEnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbModules) ) + lpGetModuleBaseName(hProcess, hMod, szProcessName, MAX_PATH); + + CloseHandle(hProcess); + } + + // let the callback function do the application-defined logic + // regardless of the outcome of OpenProcess + bContinue = lpCallback(aProcesses[i], szProcessName, lpTargetName, lParam); + } + + FreeLibrary(hDLL); + return ( bContinue ) ? 1 : 0; +} + + +/* + * enumerate processes using Tool Help + */ +static int +EnumToolHelp(LPCALLBACK lpCallback, LPTSTR lpTargetName, LPARAM lParam) +{ + typedef HANDLE (WINAPI *LPCT32S)(DWORD, DWORD); + typedef BOOL (WINAPI *LPP32F)(HANDLE, PROCESSENTRY32 *); + typedef BOOL (WINAPI *LPP32N)(HANDLE, PROCESSENTRY32 *); + + LPCT32S lpCreateToolhelp32Snapshot; + LPP32F lpProcess32First; + LPP32N lpProcess32Next; + + HANDLE hSnapshot; + PROCESSENTRY32 pe32; + BOOL bContinue; + + HINSTANCE hDLL = GetModuleHandle("Kernel32.dll"); + + if ( !hDLL ) + ErrorExit(_T("GetModuleHandle"), ERROR_SYSTEM); + + lpCreateToolhelp32Snapshot = + (LPCT32S)GetProcAddress(hDLL, "CreateToolhelp32Snapshot"); + lpProcess32First = (LPP32F)GetProcAddress(hDLL, "Process32First"); + lpProcess32Next = (LPP32N)GetProcAddress(hDLL, "Process32Next"); + + if (lpCreateToolhelp32Snapshot && lpProcess32First && lpProcess32Next ) + hSnapshot = lpCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + else + ErrorExit(_T("GetProcAddress"), ERROR_SYSTEM); + + if ( hSnapshot == INVALID_HANDLE_VALUE ) + ErrorExit(_T("CreateToolhelp32Snapshot"), ERROR_SYSTEM); + + pe32.dwSize = sizeof(PROCESSENTRY32); + + if ( !lpProcess32First(hSnapshot, &pe32) ) + { + CloseHandle(hSnapshot); + ErrorExit(_T("Process32First"), ERROR_SYSTEM); + } + + do + { + LPTSTR lpProcessName; + + // check if the value of szExeFile has been written to the structure + if ( pe32.dwSize > offsetof(PROCESSENTRY32, szExeFile) ) + { + lpProcessName = _tcsrchr(pe32.szExeFile, _T('\\')); + + // strip path, if any + if ( lpProcessName ) + lpProcessName++; + else + lpProcessName = pe32.szExeFile; + } + else + lpProcessName = ""; + + // let the callback function do the application-defined logic + // regardless of whether szExeFile can be retrieved or not + bContinue = lpCallback(pe32.th32ProcessID, lpProcessName, + lpTargetName, lParam); + + // reset dwSize as it might have been changed by Process32First/Next + if ( bContinue ) + pe32.dwSize = sizeof(PROCESSENTRY32); + else + break; + } + while ( lpProcess32Next(hSnapshot, &pe32) ); + + CloseHandle(hSnapshot); + return ( bContinue ) ? 1 : 0; +} + + +int +main(int argc, LPTSTR argv[]) +{ + BOOL bQueryOnly; + OSVERSIONINFO osvi; + int nExitCode; + + switch ( argc ) + { + case 1: + ErrorExit(_T("Missing argument(s)."), ERROR_USAGE); + + case 2: + bQueryOnly = TRUE; + break; + + case 3: + if ( _tcsicmp(argv[2], _T("c")) != 0 ) + ErrorExit(_T("Unrecognized option."), ERROR_USAGE); + + bQueryOnly = FALSE; + break; + + default: + ErrorExit(_T("Invalid number of arguments."), ERROR_USAGE); + } + + ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + + if ( !GetVersionEx(&osvi) ) + ErrorExit(_T("GetVersionEx"), ERROR_SYSTEM); + + switch ( osvi.dwPlatformId ) + { + case VER_PLATFORM_WIN32_NT: + nExitCode = EnumPSAPI((LPCALLBACK)EnumCallback, argv[1], bQueryOnly); + break; + + case VER_PLATFORM_WIN32_WINDOWS: + nExitCode = EnumToolHelp((LPCALLBACK)EnumCallback, argv[1], bQueryOnly); + break; + + case VER_PLATFORM_WIN32s: + ErrorExit(_T("Win32s is not supported."), ERROR_PLATFORM); + + default: + ErrorExit(_T("Unknown platform."), ERROR_PLATFORM); + } + + return nExitCode; +} diff --git a/Source/udrive/docs/SRC/unicmd.c b/Source/udrive/docs/SRC/unicmd.c new file mode 100644 index 0000000..282901f --- /dev/null +++ b/Source/udrive/docs/SRC/unicmd.c @@ -0,0 +1,95 @@ +// Copyright 2004 - 2007 The Uniform Server Development Team +// File: unicmd.c +// Author: Deepak Thukral +// Date: 12/20/2006 +// Usage: [FILE].exe start/stop [start options: DRIVE LETTER(char), MY SQL(string = mysql)] +// version 0.1 + +// Include Headers +#include +#include +#include +#include +#include +#include +#include +// End include headers + +// Start Server funtion. Arguments required (drive letter and mysql option) +int startServer(char drive, int opt) +{ + if(tolower(drive) == 'b' || tolower(drive) < 97 || tolower(drive) >122){ + printf("Invalid Drive Letter, plese choose [A-Z] exculding drive B"); + return 1; + } + drive = toupper(drive); + char buff1[100]; + char buff2[100]; + sprintf(buff1, "Server_start.bat %c mysql 0 0", drive); + sprintf(buff2, "Server_start.bat %c", drive); + if(opt) + system(buff1); + else + system(buff2); + return 0; +} + +// Stop Server +int stopServer(int a) +{ + system("Stop.bat"); + return 0; +} + +// Print Usage +void printUsage(int a){ + printf("Usage:\n unicmd.exe start [start options: w(drive letter), mysql]\n e.g\n unicmd.exe start w mysql\n unicmd.exe stop"); + return; +} + +// Main +int main(int argc, char *argv[]) +{ + + //Check arguments + if(argc < 2 || argc > 4) {printUsage(1);return 0;} + if(_tcsicmp(argv[1],"start") && _tcsicmp(argv[1],"stop")){printUsage(1);return 0;} + + //Start is supplied + if(_tcsicmp(argv[1],"start") == 0){ + int excode; + + if(argc == 2){ + excode = startServer('w', 0); + if(!excode)printf("Uniform Server has started successfully."); + return 0; + } + + if(argc == 3){ + excode = startServer(argv[2][0], 0); + if(!excode)printf("Uniform Server has started successfully."); + return 0; + } + + else{ + if(argv[3] == "mysql") + excode = startServer(argv[2][0], 1); + else + excode = startServer(argv[2][0], 0); + } + + if(!excode)printf("Uniform Server has started successfully."); + return 0; + } + + // Stop is supplied + if(_tcsicmp(argv[1],"stop") == 0){ + int excode = stopServer(1); + if(!excode)printf("Uniform Server has stopped successfully."); + return 0; + } + return 0; +} + + + diff --git a/Source/udrive/docs/SRC/unicontroller.c b/Source/udrive/docs/SRC/unicontroller.c new file mode 100644 index 0000000..b44609c --- /dev/null +++ b/Source/udrive/docs/SRC/unicontroller.c @@ -0,0 +1,158 @@ +// Copyright 2004 - 2007 The Uniform Server Development Team +// UniController Application, Starts and Stop server components. +// version 1.1 + +#include +#include +#include +#include +#include +#include +#include "unicontrollerres.h" + + +#define APPNAME "UniController" +#define APPVERSION "1.0Beta" +#define CORENAME "The Uniform Server" //Editted +#define AUTHOR "The Uniform Server Development Team" //Editted +#define URL "http://www.uniformserver.com" //Editted + +#define BTN_STARTSERVER 1 +#define BTN_STOPSERVER 2 +#define EDT_MESSAGE 3 + +#pragma comment(lib,"shell32.lib") + + + +LRESULT CALLBACK WndProc( HWND hWnd , UINT message , WPARAM wParam , LPARAM lParam) +{ + switch(message){ + case WM_COMMAND: + if(LOWORD(wParam)==BTN_STARTSERVER || LOWORD(wParam)==IDM_START){ + char string[256], buff1[256]; + GetDlgItemText(hWnd, EDT_MESSAGE, string, 256); + if(string[0] == 'b' || string[0] == 'B') { + MessageBox(hWnd, "Cannot Start Server: Invalid Drive - B", APPNAME ,MB_OK); + break; + } + if((string[0] >= 'a' && string[0] <= 'z') || (string[0] >= 'A' && string[0] <= 'Z')){ + sprintf(buff1, "Server_start.bat %c mysql 0 0", string[0]); + system(buff1); + MessageBox(hWnd, "Server is running! \nplease visit http://localhost:/", APPNAME ,MB_OK); + } + else { + MessageBox(hWnd, "Cannot Start Server: Invalid Drive", APPNAME ,MB_OK); + break; + } + } + if(LOWORD(wParam)==BTN_STOPSERVER || LOWORD(wParam)==IDM_STOP){ + system("Stop.bat"); + MessageBox(hWnd, "Server has been stopped", APPNAME ,MB_OK); + } + if(LOWORD(wParam)==IDM_EXIT){ + PostQuitMessage(WM_QUIT); + } + if(LOWORD(wParam)==IDM_ABOUT){ + char str[1024]; + sprintf(str, "%s - %s \n\n%s \n%s \n%s", APPNAME, APPVERSION, CORENAME, AUTHOR, URL); + MessageBox(hWnd, str, APPNAME ,MB_OK); + } + if(LOWORD(wParam)==IDM_UNICENTER){ + ShellExecute(NULL, "open", "http://center.uniformserver.com/?_r=menu", "", "", SW_SHOWNORMAL); + } + if(LOWORD(wParam)==IDM_HOME){ + ShellExecute(NULL, "open", "http://www.uniformserver.com/?_r=menu", "", "", SW_SHOWNORMAL); + } + //Newly Added + if(LOWORD(wParam)==IDM_FORUM){ + ShellExecute(NULL, "open", "http://forum.uniformserver.com/?_r=menu", "", "", SW_SHOWNORMAL); + } + if(LOWORD(wParam)==IDM_WIKI){ + ShellExecute(NULL, "open", "http://wiki.uniformserver.com/?_r=menu", "", "", SW_SHOWNORMAL); + } + //End + if(LOWORD(wParam)==IDM_BUG){ + ShellExecute(NULL, "open", "http://sourceforge.net/tracker/?group_id=53691&atid=471253", "", "", SW_SHOWNORMAL); + } + break; + } + return DefWindowProc(hWnd,message,wParam,lParam); +} + +INT WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, + LPSTR lpCmdLine, INT nCmdShow) +{ + + // Create A Window Class Structure + WNDCLASSEX wc; + wc.cbClsExtra = 0; + wc.cbSize = sizeof(wc); + wc.cbWndExtra = 0; + wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE); + wc.hCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)); + wc.hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_ASTERISK)); + wc.hIconSm = LoadIcon(NULL, MAKEINTRESOURCE(IDI_ASTERISK)); + wc.hInstance = GetModuleHandle(NULL); + wc.lpfnWndProc = WndProc; + wc.lpszClassName = "Uni"; + wc.lpszMenuName = MAKEINTRESOURCE(IDMAINMENU);; + wc.style = CS_VREDRAW|CS_HREDRAW|CS_OWNDC; + + // Register Window Class + RegisterClassEx(&wc); + + // Create a Window + HWND hWnd = CreateWindowEx(0, + "Uni", "UniController 1.0Beta", + WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX, 100,100,400,200, + NULL,NULL,wc.hInstance,0); + + // Create a label + HWND text = CreateWindowEx(0, + "STATIC", "Welcome to UniController!", + WS_CHILD|WS_VISIBLE, 10,10,250,20, + hWnd,NULL,NULL,0); + + // Create a label + HWND lblDrive = CreateWindowEx(0, + "STATIC", "Drive Letter [A Or C-Z]", + WS_CHILD|WS_VISIBLE, 10,40,170,40, + hWnd,NULL,NULL,0); + + HWND editDrive = CreateWindowEx(0, + "EDIT", "W", + WS_CHILD|WS_VISIBLE|WS_BORDER, 220,40,100,20, + hWnd,(HMENU)EDT_MESSAGE,NULL,0); + + // Create a label + HWND lblServer = CreateWindowEx(0, + "STATIC", "Uniform Server Core", + WS_CHILD|WS_VISIBLE, 10,80,70,40, + hWnd,NULL,NULL,0); + + //Editted Start to Server Start + HWND btnStart = CreateWindowEx(0, + "BUTTON", "Server Start", + WS_CHILD|WS_VISIBLE, 100,80,100,20, + hWnd,(HMENU)BTN_STARTSERVER,NULL,0); + + //Editted Stop to Server Stop + HWND btnStop = CreateWindowEx(0, + "BUTTON", "Server Stop", + WS_CHILD|WS_VISIBLE, 220,80,100,20, + hWnd,(HMENU)BTN_STOPSERVER,NULL,0); + + ShowWindow(hWnd,SW_SHOW); + + // Message Loop + MSG msg; + while(GetMessage(&msg,hWnd,0,0)>0){ + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + return 0; +} + + diff --git a/Source/udrive/docs/SRC/unicontroller.rc b/Source/udrive/docs/SRC/unicontroller.rc new file mode 100644 index 0000000..16bbffb --- /dev/null +++ b/Source/udrive/docs/SRC/unicontroller.rc @@ -0,0 +1,73 @@ +// Copyright 2004 - 2007 The Uniform Server Development Team +// UniController Application, Starts and Stop server components. +// version 1.1 + +#include +#include "unicontrollerres.h" +/* --- The following code comes from K:\lcc\lib\wizard\default.rc. */ +IDMAINMENU MENU +BEGIN + POPUP "&Commands" + BEGIN + //MENUITEM "&Configure",IDM_CONFIG + MENUITEM "&Server Start",IDM_START + MENUITEM "&Server S&top",IDM_STOP + MENUITEM "&E&xit",IDM_EXIT + END + POPUP "&WWW" + BEGIN + MENUITEM "&Uniform Server > Home", IDM_HOME //Look + MENUITEM "&Uniform Server > Forum", IDM_FORUM //Look + MENUITEM "&Uniform Server > Wiki", IDM_WIKI //Look + MENUITEM "&Uniform Server > UniCenter", IDM_UNICENTER //Look + MENUITEM "&Uniform Server > Bug Report", IDM_BUG //Look + END + POPUP "&Help" + BEGIN + MENUITEM "&About",IDM_ABOUT + END +END +IDACCEL ACCELERATORS +BEGIN + "Q", IDM_EXIT,VIRTKEY,CONTROL +END +/* --- The following code comes from K:\lcc\lib\wizard\menustr.tpl. */ +// This tables contains the explanation strings to be shown in the status +// bar when the uses moves the mouse in an open menu. +// Organization: +// For each popup menu, there is the identifier of the popup itself, followed +// by the strings for all items in that menu. The ID of each string is its +// command #define. +// +STRINGTABLE DISCARDABLE +BEGIN + IDM_START "Start Uniform Server" + IDM_STOP "Stop Uniform Server" + //IDM_CONFIG "Configure Uniform Server settings" + //IDS_FILEMENU "Create, open, save, or print documents" + //IDM_NEW "Creates a new document" + //IDM_OPEN "Opens an existing document" + //IDM_SAVE "Saves the active document" + //IDM_SAVEAS "Saves the active document under a different name" + //IDM_CLOSE "Closes the active document" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDM_EXIT "Quits this application" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_HELPMENU "Get help" + IDM_UNICENTER "Visit online resource center" + IDM_ABOUT "Displays information about this application" +END +/* --- The following code comes from K:\lcc\lib\wizard\aboutdlgrc.tpl. */ +IDD_ABOUT DIALOG 6, 18, 180, 180 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "UniController is a small application used to control core Uniform Server systems." +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Close", IDOK, 129, 156, 40, 14 +END diff --git a/Source/udrive/docs/SRC/unicontrollerres.h b/Source/udrive/docs/SRC/unicontrollerres.h new file mode 100644 index 0000000..0903467 --- /dev/null +++ b/Source/udrive/docs/SRC/unicontrollerres.h @@ -0,0 +1,31 @@ +// Copyright 2004 - 2007 The Uniform Server Development Team +/* --- The following code comes from K:\lcc\lib\wizard\stddef.tpl */ +// This are the definitions for all symbols used in menus or string +// version 1.1 + +#define IDACCEL 10000 +#define IDM_NEW 200 +#define IDM_OPEN 210 +#define IDM_SAVE 220 +#define IDM_SAVEAS 230 +#define IDM_CLOSE 240 +#define IDM_PRINT 250 +#define IDM_PAGESETUP 260 +#define IDM_EXIT 300 +#define IDM_ABOUT 510 +#define IDMAINMENU 600 +#define IDAPPLICON 710 +#define IDAPPLCURSOR 810 +#define IDS_FILEMENU 2000 +#define IDS_HELPMENU 2010 +#define IDS_SYSMENU 2030 +#define IDM_STATUSBAR 3000 +#define IDD_ABOUT 100 +#define IDM_UNICENTER 500 +#define IDM_CONFIG 270 +#define IDM_START 280 +#define IDM_STOP 290 +#define IDM_BUG 520 +#define IDM_HOME 530 +#define IDM_FORUM 540 //New ~Ola +#define IDM_WIKI 550 //New ~Ola \ No newline at end of file diff --git a/Source/udrive/docs/SRC/uniserv.c b/Source/udrive/docs/SRC/uniserv.c new file mode 100644 index 0000000..131b54e --- /dev/null +++ b/Source/udrive/docs/SRC/uniserv.c @@ -0,0 +1,43 @@ +// Copyright 2004 - 2007 The Uniform Server Development Team +// Runs a hidden process. Waits till it ends then next one. [windows application] +// Compile with lcc-win32 +// version 1.1 + +#include +#include + +int main( int argc, char *argv[] ) +{ + STARTUPINFO si; + PROCESS_INFORMATION pi; + + if (argc>1) { + memset(&si, 0, sizeof(si)); +// ZeroMemory( &si, sizeof(si) ); + si.cb = sizeof(si); + si.wShowWindow = SW_HIDE; + si.dwFlags = STARTF_USESHOWWINDOW; + ZeroMemory( &pi, sizeof(pi) ); + + // Start the child process. + CreateProcess( NULL, // No module name (use command line). + TEXT(argv[1]), // Command line. + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. + 0, // No creation flags. + NULL, // Use parent's environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi ); // Pointer to PROCESS_INFORMATION structure. + // Wait until child process exits. + if (argc>2) { + WaitForSingleObject( pi.hProcess, INFINITE ); + CreateProcess( NULL, TEXT(argv[2]), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); + } + // Close process and thread handles. + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + } + return 0; +} diff --git a/Source/udrive/docs/desktop.ini b/Source/udrive/docs/desktop.ini new file mode 100644 index 0000000..6cf1551 --- /dev/null +++ b/Source/udrive/docs/desktop.ini @@ -0,0 +1,4 @@ +[ViewState] +Mode= +Vid= +FolderType=Documents diff --git a/Source/udrive/home/admin/program/Close.bat b/Source/udrive/home/admin/program/Close.bat new file mode 100644 index 0000000..875cea7 --- /dev/null +++ b/Source/udrive/home/admin/program/Close.bat @@ -0,0 +1,8 @@ +@echo off +set Disk=%1 +IF "%Disk%"=="" set Disk=w +%Disk%:\home\admin\program\pskill.exe mysqld-opt.exe +IF ERRORLEVEL 1 goto nomysql +%Disk%:\usr\local\mysql\bin\mysqladmin.exe --character-sets-dir="/usr/local/mysql/share/charsets/" --user=root --password=root shutdown +:nomysql +subst %Disk%: /D \ No newline at end of file diff --git a/Source/udrive/home/admin/program/pskill.exe b/Source/udrive/home/admin/program/pskill.exe new file mode 100644 index 0000000..c83a8bf Binary files /dev/null and b/Source/udrive/home/admin/program/pskill.exe differ diff --git a/Source/udrive/home/admin/program/uniserv.exe b/Source/udrive/home/admin/program/uniserv.exe new file mode 100644 index 0000000..e40c9e2 Binary files /dev/null and b/Source/udrive/home/admin/program/uniserv.exe differ diff --git a/Source/udrive/home/admin/www/.htaccess b/Source/udrive/home/admin/www/.htaccess new file mode 100644 index 0000000..7141519 --- /dev/null +++ b/Source/udrive/home/admin/www/.htaccess @@ -0,0 +1,22 @@ +# This file provides security to the server limiting access to the localhost only. +# Comment to deactivate. + +Order Deny,Allow +Deny from all +Allow from 127.0.0.1 + +# To disallow execution of cgi scripts in this directory comment next two lines. + +AddHandler cgi-script .bat .exe .pl .cgi +Options +ExecCGI + +#-- +# Activate this to use the Admin Panel Feature! +#-- +# To lock Admin Panel, uncomment the next 4 lines. +# Defaults: Username - root; Password - root + +#AuthName "Uniform Server - Admin Panel 2.0" +#AuthType Basic +#AuthUserFile /htpasswd/home/admin/www/.htpasswd +#Require valid-user diff --git a/Source/udrive/home/admin/www/aconfig.php b/Source/udrive/home/admin/www/aconfig.php new file mode 100644 index 0000000..c863816 --- /dev/null +++ b/Source/udrive/home/admin/www/aconfig.php @@ -0,0 +1,163 @@ + + +
+

»

+

+Var_Name =array ("ServerName","ServerAdmin","DirectoryIndex","AddHandler server-parsed","ServerSignature","Listen"); +$apache->Var_Text =array ( +"".$US['aconfig-sname']."","".$US['aconfig-wemail']."","".$US['aconfig-difiles']."", +"".$US['aconfig-ssi']."","".$US['aconfig-ssig']."","".$US['aconfig-listen'].""); +$apache->Var_Help =array ( +"http://httpd.apache.org/docs/mod/core.html#servername", +"http://httpd.apache.org/docs/mod/core.html#serveradmin", +"http://httpd.apache.org/docs/mod/mod_dir.html#directoryindex", +"http://httpd.apache.org/docs/mod/mod_include.html", +"http://httpd.apache.org/docs/mod/core.html#serversignature", +"http://httpd.apache.org/docs/2.0/bind.html"); + + +// import_request_variables("gP", "st"); +$step=$HTTP_POST_VARS['Submit']; +if ($step == "next") { + echo "

".$US['aconfig-text-0']."

"; +} + +else { + if ($step == "Save") { + $apache->replace_values ($HTTP_POST_VARS); + echo "

".$US['aconfig-text-1']."

"; + } +?> + +

"; + $apache->echo_values (); +?> +
+ +
+
+".$US['aconfig-module']."

"; + } + + else { + echo "

".$US['aconfig-cgi']."

"; + } +} + +//-------------------------------------------------------------------- +class Config +{ +var $contents; +var $name; +var $comments; +var $Var_Name; +var $Var_Text; +var $Var_Help; +var $classnum; + +function Config ($file_name, $comments) +{ + $this->comments=$comments; + $this->name=$file_name; + $fd = fopen ($this->name, "r"); + $this->contents = fread ($fd, filesize ($file_name)); + fclose ($fd); + $this->classnumber=$GLOBALS["$Configclassnumber"]=$GLOBALS["$Configclassnumber"]+1; +} + +function f_write () +{ + $fd = fopen ($this->name, "w"); + $ok = fwrite ($fd, $this->contents); + fclose ($fd); +} + +function echo_values () +{ + include "includes/lang/".file_get_contents("includes/.lang").".php"; + echo ""; + $item=0; + + foreach ($this->Var_Name as $loop){ + $Var_ID="C".$this->classnumber."i".$item; + $Var_Name=$this->Var_Name[$item]; + $Var_Text=$this->Var_Text[$item]; + $Var_Help=$this->Var_Help[$item]; + $comments=$this->comments; + preg_match("/\n\s*$Var_Name\s+([^$comments^\n]+)/i", $this->contents, $tag); + echo " + + + "; + echo ""; + $item=$item+1; + } + + echo "

$Var_Text:

+

"; + if ($Var_Help != "") {echo "".$US['aconfig-help']."";}; + echo "

"; + echo "
"; +} + +function replace_values ($HTTP_POST_VARS) +{ + $item=0; + + foreach ($this->Var_Name as $loop){ + $Var_ID="C".$this->classnumber."i".$item; + $data=$HTTP_POST_VARS[$Var_ID]; + $comments=$this->comments; + $this->contents=preg_replace("/\n(\s*$loop)\s+([^$comments]+)/i", "\n\\1 $data\n\n", $this->contents, 1); + $item=$item+1; + } + + $this->f_write (); +} +} +?> +
+ + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/apsetup.php b/Source/udrive/home/admin/www/apsetup.php new file mode 100644 index 0000000..523587d --- /dev/null +++ b/Source/udrive/home/admin/www/apsetup.php @@ -0,0 +1,94 @@ + + +
+

»

+

+

+ +
+
+ : +
+ : +

+
+ + + +
+

»

+

+ +

+
+ + + + + + + + + +
+

+
+ +
+

+
+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/cgienv.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/cgienv.cgi new file mode 100644 index 0000000..7acb9d4 --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/cgienv.cgi @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +sub urldecode{ + local($val)=@_; + $val=~s/\+/ /g; + $val=~s/%([0-9A-H]{2})/pack('C',hex($1))/ge; + return $val; +} + +require header; + +print " +
+

» CGI Enviroment

+

Displaying CGI Environment

"; + +foreach $env_var (keys %ENV){ + print "

$env_var = $ENV{$env_var}

\n"; +} + +print "
"; + +require footer; diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/dserver.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/dserver.cgi new file mode 100644 index 0000000..5cc099a --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/dserver.cgi @@ -0,0 +1,71 @@ +#!/usr/bin/perl + +require header; +require secure; + +if ($ENV{'QUERY_STRING'}eq"F"){ + print " +
+

» Cleaning Server

+

Cleaned /www/ Directory

+

+ Server has been cleaned! +

+
"; + + deletex ("/www"); + coppy("/home/admin/www/images/logo.jpg","/www/images/logo.jpg"); + coppy("/home/admin/www/favicon.ico","/www/images/favicon.ico"); + coppy("/home/admin/redirect.html","/www/index.html"); +} + +else { + print " +
+

» Clean Server

+

Clean /www/ Directory

+

+ This will delete contents of \\www\\ folder +
+ Are you sure: Yes, Continue +

+
"; +ENDDD +} + +require footer; +exit; + +# usege deletex (path); +sub deletex { + my @names; + my $name; + my ($path)=$_[0] ; + opendir DIR,"$path"; + $name=readdir DIR; + $name=readdir DIR; + @names=readdir DIR; + closedir DIR; + + foreach $name (@names){ + if (-d "$path/$name"){deletex ("$path/$name"); rmdir ("$path/$name");}; + + @namess=split(/\./, $name); + + if (!(-d "$path/$name")&&(!($skip=~ /@namess[$namess+1]/)||(@namess[$namess+1]eq''))){ + unlink "$path/$name"; + } + } +} + +sub coppy { + open (FILE,"$_[0]"); + binmode FILE; + @lines=; + close (FILE); + open (FILE,">$_[1]"); + binmode FILE; + print FILE @lines; + close (FILE); +} + diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/elog.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/elog.cgi new file mode 100644 index 0000000..f10178c --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/elog.cgi @@ -0,0 +1,35 @@ +#!/usr/bin/perl + +##### ERROR LOG FILE LOCATION ##### +# +$logfile = "/usr/local/apache2/logs/error.log"; +# +################################### + +require header; +require secure; + +print " +
+

» Error Log Viewer

+

Viewing Error Log File

+

"; + +open (LOG, "$logfile")|| die "Can't open data file!\n"; +@log = ; +close (LOG); + +@log=reverse(@log); +splice @log, 4096; + +foreach $logs (@log) { + print "- $logs
"; +} + +print " +

+
"; + +require footer; + +exit; diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/footer.pm b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/footer.pm new file mode 100644 index 0000000..41ca14c --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/footer.pm @@ -0,0 +1,9 @@ +package footer; + +print" +

+Admin Panel 2.0.2 | © 2007 The Uniform Server Development Team +

+ + +"; \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/header.pm b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/header.pm new file mode 100644 index 0000000..449e9ee --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/header.pm @@ -0,0 +1,25 @@ +package header; + +print "Content-type: text/html\n\n"; +print " + + + +The Uniform Server + + + + + + + + + + + + + + + + +"; \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/rmysql.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/rmysql.cgi new file mode 100644 index 0000000..79f6e39 --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/rmysql.cgi @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +require header; +require secure; + +print " +
+

» Start MySQL

+

Starting MySQL

+

"; + +&check_mysql; +if ($run) { + if ($ENV{'QUERY_STRING'}eq"F"){ + &start_mysql; + print "MySQL server was forced to start."; + print "
"; + } + + else { + print < + But if you think that it is mistake click on this link +
+

+
+ENDDD + } +} + +else { + print < + +ENDDD + require footer; + &start_mysql; +} + +require footer; + +exit; + +sub check_mysql(){ + $res = system "\\home\\admin\\program\\pskill.exe", "mysqld-opt.exe"; + if ($res == 0){$run=1} + else {$run=0} +} + +sub start_mysql(){ + exec "/usr/local/mysql/bin/mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf\""; +} \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/rserver.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/rserver.cgi new file mode 100644 index 0000000..0726b0e --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/rserver.cgi @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +require header; +require secure; + +print " +
+

» Restart Server

+

Restarting...

+

"; + +if ($ENV{'QUERY_STRING'}eq"M"){ + $res=`net top mysql`; + $res=`net start mysql`; + + print "

The MySQL service was restarted.

"; +} + +if ($ENV{'QUERY_STRING'}ne""){ + print < + + +

+
+ENDDD +} + +if ($ENV{'QUERY_STRING'}eq"A"){ + print "

The Apache service was restarted.

"; + + $res=`net stop Apache2`; + exec "net start Apache2"; + exit; +} + +print < +It may take some time. +
+
+I am sure: Restart Apache2 Service +
+I am sure: Restart MySQL Service +

+ +ENDDD + +require footer; + +exit; \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/secure.pm b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/secure.pm new file mode 100644 index 0000000..db27125 --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/secure.pm @@ -0,0 +1,23 @@ +package secure; + +# If you want to disable security check - comment the following lines with #. + +if (($ENV{HTTP_REFERER}!~/^http[s]?:\/\/localhost\/apanel/)&&($ENV{HTTP_REFERER}!~/^http[s]?:\/\/127\.0\.0\.\d+\/apanel/)){ + print " +
+

» Security Alert!

+

Possible Attack

+

+ HTTP_REFERER is not localhost, but '".$ENV{HTTP_REFERER}."'. +
+
+ To disable this warning go: /home/admin/www/cgi-bin/secure.pm +

+

"; + +require footer; + +exit; +}; + +return 1; \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/smysql.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/smysql.cgi new file mode 100644 index 0000000..f08b3f2 --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/smysql.cgi @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +require header; +require secure; + +print " +
+

» Stop MySQL

+

Stopping MySQL

+

"; + +&check_mysql; +if ($run) { + &stop_mysql; + print "MySQL server stopped.
"; +} + +else { + if ($ENV{'QUERY_STRING'}eq"F"){ + &stop_mysql; + print "MySQL server was forced to stop."; + print "
"; + } + + else { + print < + But if you think that it is a mistake click on this link +
+ENDDD + } +} + +print < +

+ENDDD + +require footer; + +exit; + +sub check_mysql(){ + $res = system "\\home\\admin\\program\\pskill.exe", "mysqld-opt.exe"; + if ($res == 0){$run=1} + else {$run=0} +} +sub stop_mysql(){ + open (PASS,"../../../../mysql_password"); + $password=; + close (PASS); + system "/home/admin/program/uniserv.exe \"\\usr\\local\\mysql\\bin\\mysqladmin.exe --user=root --password=$password shutdown\""; +} \ No newline at end of file diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/sserver.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/sserver.cgi new file mode 100644 index 0000000..3a43d21 --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/sserver.cgi @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +require header; +require secure; + +print < +

» Shutdown Server

+

Shutting Down Server

+

+The server is shutting down. +
+
+Thank you for using The Uniform Server.
+
+

+ +ENDDD + +$res = system "\\home\\admin\\program\\pskill.exe", "mysqld-opt.exe"; + +if ($res == 0){ + open (PASS,"../../../../mysql_password"); + $password=; + close (PASS); + system "/home/admin/program/uniserv.exe \"\\usr\\local\\mysql\\bin\\mysqladmin.exe --user=root --password=$password shutdown\""; +} + +exec "\\home\\admin\\program\\pskill Apache.exe c"; + +require footer; +exit; diff --git a/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/u2w.cgi b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/u2w.cgi new file mode 100644 index 0000000..ebb9b97 --- /dev/null +++ b/Source/udrive/home/admin/www/cgi-bin/includes/lang/en/u2w.cgi @@ -0,0 +1,126 @@ +#!/usr/bin/perl + +$skip = (" gif jpg bmp pcx tif zip gz rar tar cab ha exe com bat dll hlp xls doc pdf ps dbf htaccess old "); +$wwwdocs = (" html htm shtml php shtm phtm phtml "); + +require header; +require secure; + +parseform(); + +if ($FORM{'act'}eq''){ + &showwelcome; +} + +elsif($FORM{'act'}eq'Convert'){ + convert ("/cgi-bin","/cgi-bin"); + print " +
+

» Windows to Unix Converter

+

Converted Windows Perl Files

+

+ Converted! +

+
"; + +require footer; + } + +exit; + +# usege convert (path,path1); +sub convert { + my @names; + my $name; + my ($path)=$_[0] ; + my ($path1)=$_[1] ; + opendir DIR,"$path"; + $name=readdir DIR; + $name=readdir DIR; + + @names=readdir DIR; + closedir DIR; + foreach $name (@names){ + if (-d "$path/$name"){mkdir ("$path1/$name"); convert ("$path/$name","$path1/$name")}; + + @namess=split(/\./, $name); + + if (!(-d "$path/$name")&&(!($skip=~ /@namess[$namess+1]/)||(@namess[$namess+1]eq''))){ + open (FILE,"$path/$name"); + binmode FILE; + @lines=; + close (FILE); + + if (@lines[0]=~ /\#\!.+perl/i) {@lines[0]="\#\!/usr/bin/perl\n";}; + + foreach(@lines){ + s/\r//g; + } + + open (FILE,">$path1/$name"); + binmode FILE; + print FILE @lines; + close (FILE); + print "$path/$name - converted.
"; + } + + else { + open (FILE,"$path/$name"); + binmode FILE; + @lines=; + close (FILE); + open (FILE,">$path1/$name"); + binmode FILE; + print FILE @lines; + close (FILE); + print "$path/$name - transferred.
"; + } + } + } + +sub showwelcome { + +require header; + + print < +

» Windows to Unix Converter

+

Convert Windows Perl Files

+

+ If you have problems to executing your cgi scripts on Unix this program will convert cgi scripts from Windows to Unix format (#10#13=>#13). +
+
+ Instruction: +
+ After execution you can pick up the scripts ready to execution on a Unix machine from the \\cgi-bin\\ directory. +
+
+

+ +
+

+ +ENDDD + +require footer; +} + +sub parseform() { + if($ENV{'REQUEST_METHOD'} eq 'GET'){ + $buffer=$ENV{'QUERY_STRING'}; + } + + elsif($ENV{'REQUEST_METHOD'} eq 'POST'){ + read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); + } + + @pairs = split(/&/, $buffer); + + foreach $pair (@pairs) { + ($name, $value) = split(/=/, $pair); + $value =~ tr/+/ /; + $value =~s/%([a-fA-F0-9][a-fA-F0-9])/pack("c",hex($1))/eg; + $FORM{$name} = $value; + } +} + diff --git a/Source/udrive/home/admin/www/css/main.css b/Source/udrive/home/admin/www/css/main.css new file mode 100644 index 0000000..895c455 --- /dev/null +++ b/Source/udrive/home/admin/www/css/main.css @@ -0,0 +1,152 @@ +/* +#################################################### +# Name: The Uniform Server Admin Panel 2.0 CSS 1.0 +# Developed By: The Uniform Server Development Team +# Modified Last By: Olajide Olaolorun (empirex) +# Web: http://www.uniformserver.com +#################################################### +*/ + +a { + color:#FF9933; + text-decoration:none; +} + +a.current { + color:#999999; +} + +a:hover { + text-decoration:underline; +} + +acronym { + color:#000000; + cursor:help; +} + +body { + font-family: verdana, tahoma, helvetica, arial, sans-serif; + font-size: 100%; + margin: 1em; + background-color:#F8F8F8; +} + +h2 { + color:#000000; + font-size:90%; + font-weight:bold; + padding-bottom:0.5em; + +} + +h3 { + color:#4F4F97; + font-size:70%; + font-weight:bold; + padding-bottom:0.5em; + border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color:#4F4F97; +} + +p { + text-align:left; + color:#000000; + font-size: 60%; + line-height: 2em; +} + +ul { + font-size:60%; + color:#666666; + line-height: 2em; + list-style: none; +} + +img { + border: 0px; +} + +#main { + background-color:#FFFFFF; + margin: 0em 0em 0.8em 0em; + padding: 0em 0.8em 0.8em 0.8em; + border-style:solid; + border-width:1px; + border-color:#E5E5E5; +} + +#resolve { + background-color:#FFFFFF; + margin: 0em 0em 0.0em 0em; + padding: 0em 0.8em 0.8em 0.8em; + border-style:solid; + border-width:1px; + border-color:#E5E5E5; +} + +h3.sub { + color:#CCCCCC; + border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color:#E5E5E5; +} + +#navbar { + width: 10em; + float: left; + clear: left; + background-color:#FFFFFF; + padding: 0.8em 0.8em 0.8em 0.8em; + border-style:solid; + border-width:1px; + border-color: #E5E5E5; + margin-bottom: 0.8em; +} + +#loginbox { + width: 10em; + float: right; + clear: right; + background-color:#FFFFFF; + padding: 0.8em 0.8em 0.8em 0.8em; + border-style:solid; + border-width:1px; + border-color:#E5E5E5; +} + +.textbox { + border-style:solid; + border-width:1px; + border-color:#CCCCCC; + font-size:60%; + margin-bottom:0.5em; + color:#B8CDE8; + +} + +.button { + border-style:solid; + border-width:1px; + border-color:#CCCCCC; + font-size:60%; + color:#B8CDE8; + background-color: #FFFFFF; +} + +.name { + font-weight:bold; +} + +#navbar a { + display:block; + position:relative; + line-height: 2em; + font-size: 60%; +} + +.copyright { + text-align:center; + font-size:55%; +} \ No newline at end of file diff --git a/Source/udrive/home/admin/www/downloads.php b/Source/udrive/home/admin/www/downloads.php new file mode 100644 index 0000000..db8ba88 --- /dev/null +++ b/Source/udrive/home/admin/www/downloads.php @@ -0,0 +1,27 @@ + + +
+

»

+

+

+
+ + diff --git a/Source/udrive/home/admin/www/favicon.ico b/Source/udrive/home/admin/www/favicon.ico new file mode 100644 index 0000000..25e3cc5 Binary files /dev/null and b/Source/udrive/home/admin/www/favicon.ico differ diff --git a/Source/udrive/home/admin/www/header.php b/Source/udrive/home/admin/www/header.php new file mode 100644 index 0000000..d76ab61 --- /dev/null +++ b/Source/udrive/home/admin/www/header.php @@ -0,0 +1,43 @@ + + + + + +<?=$US['title']?> <? include('includes/.version'); ?> + + + + + + + + + + + + + + + + + + +
+<?=$US['title']?> <?include(" /> +
+ + + diff --git a/Source/udrive/home/admin/www/images/Thumbs.db b/Source/udrive/home/admin/www/images/Thumbs.db new file mode 100644 index 0000000..6af9e3d Binary files /dev/null and b/Source/udrive/home/admin/www/images/Thumbs.db differ diff --git a/Source/udrive/home/admin/www/images/logo.jpg b/Source/udrive/home/admin/www/images/logo.jpg new file mode 100644 index 0000000..b11fa35 Binary files /dev/null and b/Source/udrive/home/admin/www/images/logo.jpg differ diff --git a/Source/udrive/home/admin/www/includes/.lang b/Source/udrive/home/admin/www/includes/.lang new file mode 100644 index 0000000..2c4c454 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/.lang @@ -0,0 +1 @@ +en \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/.version b/Source/udrive/home/admin/www/includes/.version new file mode 100644 index 0000000..ee20d5f --- /dev/null +++ b/Source/udrive/home/admin/www/includes/.version @@ -0,0 +1 @@ +3.4-Sluger \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/basic.inc b/Source/udrive/home/admin/www/includes/basic.inc new file mode 100644 index 0000000..f8fb943 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/basic.inc @@ -0,0 +1,8 @@ +

+ + + +/cgienv.cgi"> + + + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/code.php b/Source/udrive/home/admin/www/includes/code.php new file mode 100644 index 0000000..f1fea80 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/code.php @@ -0,0 +1,27 @@ +'.$US['code-show'].''; + } + + else { + echo '

 

'; + if($file=="")$file=$_SERVER['PHP_SELF']; + $uscode=htmlentities(file_get_contents(basename($file))); + echo "

".$US['code-source']." | ".$US['code-back']."

"; + echo "
"; + } +} +?> diff --git a/Source/udrive/home/admin/www/includes/config.inc b/Source/udrive/home/admin/www/includes/config.inc new file mode 100644 index 0000000..7b2fd3f --- /dev/null +++ b/Source/udrive/home/admin/www/includes/config.inc @@ -0,0 +1,7 @@ +

+ + + + + + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/config.inc.php b/Source/udrive/home/admin/www/includes/config.inc.php new file mode 100644 index 0000000..e04a43c --- /dev/null +++ b/Source/udrive/home/admin/www/includes/config.inc.php @@ -0,0 +1,48 @@ + diff --git a/Source/udrive/home/admin/www/includes/doc.inc b/Source/udrive/home/admin/www/includes/doc.inc new file mode 100644 index 0000000..df39ac7 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/doc.inc @@ -0,0 +1,7 @@ +

+ + + + + + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/footer.php b/Source/udrive/home/admin/www/includes/footer.php new file mode 100644 index 0000000..4014995 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/footer.php @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/header.php b/Source/udrive/home/admin/www/includes/header.php new file mode 100644 index 0000000..b6cb9d0 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/header.php @@ -0,0 +1,37 @@ + + + + + +<?=$US['title']?> <? include('.version'); ?> + + + + + + + + + + + + + + + + + + diff --git a/Source/udrive/home/admin/www/includes/java.inc b/Source/udrive/home/admin/www/includes/java.inc new file mode 100644 index 0000000..e69de29 diff --git a/Source/udrive/home/admin/www/includes/lang.inc b/Source/udrive/home/admin/www/includes/lang.inc new file mode 100644 index 0000000..62755df --- /dev/null +++ b/Source/udrive/home/admin/www/includes/lang.inc @@ -0,0 +1,3 @@ +

+English + diff --git a/Source/udrive/home/admin/www/includes/lang/en.php b/Source/udrive/home/admin/www/includes/lang/en.php new file mode 100644 index 0000000..c9baf8b --- /dev/null +++ b/Source/udrive/home/admin/www/includes/lang/en.php @@ -0,0 +1,323 @@ + 'Uniform Server', + 'apanel' => 'Admin Panel', + 'dev-team' => 'The Uniform Server Development Team', + + //-------------------------------------------------------------------------------------------- + // Source Code + //-------------------------------------------------------------------------------------------- + + 'code-show' => 'View Source Code', + 'code-source' => 'Viewing Source Code', + 'code-back' => 'Close View', + + //-------------------------------------------------------------------------------------------- + // Navigation + //-------------------------------------------------------------------------------------------- + + // Basic + 'nav-home' => 'Home', + 'nav-web' => 'Uniform Server Website', + 'nav-secure' => 'Server Security', + 'nav-phpinfo' => 'phpinfo()', + 'nav-cgienv' => 'Perl Envirnonment', + 'nav-status' => 'Apache Status', + 'nav-info' => 'Apache Info', + 'nav-update' => 'Version Check', + // Start + 'nav-start' => 'Server Control', + 'nav-sserver' => 'Shutdown Server', + 'nav-rmysql' => 'Run MySQL', + 'nav-smysql' => 'Stop MySQL', + 'nav-rserver' => 'Restart Services', + // Configurations + 'nav-config' => 'Configurations', + 'nav-aconfig' => 'Apache Configuration', + 'nav-pconfig' => 'PHP Configuration', + 'nav-vhost' => 'Admin Virtual Host', + 'nav-apsetup' => 'Admin Panel Configuration', + 'nav-psetup' => 'Private Server Configuration', + 'nav-mqsetup' => 'MySQL Server Configuration', + // Tools Navigation + 'nav-tools' => 'Tools', + 'nav-pma' => 'phpMyAdmin', + 'nav-pmbp' => 'phpMyBackupPro', + 'nav-elog' => 'Error Log Viewer', + 'nav-u2w' => 'Win - Unix Converter', + 'nav-del' => 'Clean Server', + 'nav-down' => 'Download Manager', + 'nav-smig' => 'Server Migration', + // Plugins Navigation + 'nav-plugins' => 'Plugin Manager', + 'nav-pear' => 'Install Pear', + 'nav-eaccelerator' => 'eAccelerator cPanel', + // Misc Navigation + 'nav-misc' => 'Miscellaneous', + 'nav-sup' => 'Online Support', + // Documentation + 'nav-docs' => 'Documentation', + 'nav-udoc' => 'Uniform Server User Guide', + 'nav-ucen' => 'UniCenter', + 'nav-sdoc' => 'Server Documentation', + 'nav-phdoc' => 'PHP Documentation', + 'nav-mydoc' => 'MySQL Documentation', + 'nav-pedoc' => 'Perl Documentation', + // Languages + 'nav-langs' => 'Languages', + + //-------------------------------------------------------------------------------------------- + // Home + //-------------------------------------------------------------------------------------------- + + 'main-head' => 'Admin Panel '. $version .'', + 'main-text' => ' + Welcome to Uniform Server '. $uniserver .'!. This is the administration section of the server and + you can control your server from this Admin Panel. + Though this is still the ALPHA version of this panel, it is fully useable + and also complete. It is also easy to use and very user friendly. +
+ You can also translate this Admin Panel into your own language easily, and if you will like to + do so, please upload a copy to our + SourceForge Translation Tracking System for others to download. +
+ The translations for older versions of this Admin Panel will not work! Click the link on top to download the new version. +
+ Also, new things have been added and some taken out and some functions may not + work if the required plugin is not installed or available. +
+ Please report all bugs and errors on our forum. +
+
+ Thanks +
+ The Uniform Server Development Team', + 'main-secure' => 'Security Checklist', + 'main-text-0' => 'Change the username/password for the Admin Panel here', + 'main-text-1' => 'Change the username/password for the server here', + 'main-text-2' => 'Change the root password for mysql by editing here', + 'main-text-3' => 'Run the Security Console and see if everything is OK.', + + //-------------------------------------------------------------------------------------------- + // Update + //-------------------------------------------------------------------------------------------- + + 'update-head' => 'Uniform Server Version Check', + 'update-check' => 'Checking Version...', + 'update-true' => ' + Installed version of the Uniform Server is the latest one. +
+ You don\'t need to update it. +
', + 'update-false' => 'A Newer version of the Uniform Server is available!', + 'update-new' => 'New Version', + 'update-yours' => 'Installed Version', + 'update-get' => 'You can get the newer version from our website by clicking the link below.', + + //-------------------------------------------------------------------------------------------- + // Server Shutdown + //-------------------------------------------------------------------------------------------- + + 'stop-head' => 'Server Shutdown', + 'stop-shut' => 'Verify Shutdown', + 'stop-killing' => 'Click on Shutdown! and the server will be automatically shut down.', + 'stop-stop' => 'Shutdown!', + + //-------------------------------------------------------------------------------------------- + // Downlaod Manager + //-------------------------------------------------------------------------------------------- + + 'down-head' => 'Download Manager', + 'down-aval' => 'Download available updates, plugins, and addons.', + 'down-text' => ' + This feature is still in development and when it comes out you will be able to download plugins, + addons, and patches for your server. Some features will also have a installer that allows you to + automatically install them and some are going to be installed manually by you.', + + //-------------------------------------------------------------------------------------------- + // Apache Configuration + //-------------------------------------------------------------------------------------------- + + 'aconfig-head' => 'Apache Configuration', + 'aconfig-conf' => 'Configure Apache', + 'aconfig-sname' => 'Server Name', + 'aconfig-wemail' => 'Server Admin Email', + 'aconfig-difiles' => 'Directory Index Files', + 'aconfig-ssi' => 'Server Side Includes', + 'aconfig-ssig' => 'Server Signature', + 'aconfig-listen' => 'Listen', + 'aconfig-text-0' => 'something', + 'aconfig-text-1' => ' + The changes have been successfully saved.
Changes will take effect after server restart!', + 'aconfig-save' => 'Save', + 'aconfig-module' => 'At the moment PHP is loaded as Apache module.', + 'aconfig-cgi' => 'At the moment PHP scripts are executed though Apache CGI interface.', + 'aconfig-help' => '?', + + //-------------------------------------------------------------------------------------------- + // PHP Configuration + //-------------------------------------------------------------------------------------------- + + 'pconfig-head' => 'PHP Configuration', + 'pconfig-conf' => 'Configure PHP', + 'pconfig-smode' => 'Safe Mode', + 'pconfig-rg' => 'Register Globals', + 'pconfig-mtexec' => 'Maximum Script Execute Time (s.)', + 'pconfig-mmexec' => 'Maximum Memory Amount (MB)', + 'pconfig-ssig' => 'Show PHP In Server Signature', + 'pconfig-perror' => 'Print Errors', + 'pconfig-mpsize' => 'Maximum Post Size', + 'pconfig-musize' => 'Maximum Upload Size', + 'pconfig-text-0' => 'something', + 'pconfig-text-1' => ' + The changes have been successfully saved.
Changes will take effect after server restart!', + 'pconfig-save' => 'Save', + 'pconfig-module' => 'At the moment PHP is loaded as Apache module.', + 'pconfig-cgi' => 'At the moment PHP scripts are executed though Apache CGI interface.', + 'pconfig-help' => '?', + + //-------------------------------------------------------------------------------------------- + // VHost Manager + //-------------------------------------------------------------------------------------------- + + 'vhost-head' => 'Virtual Host', + 'vhost-setup' => 'Virtual Host Setup', + 'vhost-settings' => 'Virtual Host Settings', + 'vhost-text-0' => 'You have', + 'vhost-text-1' => 'hosts in your httpd.conf file:', + 'vhost-text-2' => 'Error in hosts file:', + 'vhost-text-3' => 'All hostnames exist in hosts file!', + 'vhost-new' => ' + Use this new and cool tool to add more virtual hosts to your server without having to edit + the httpd.conf file yourself.', + 'vhost-new-ex' => '(ex. newhost.localhost)', + 'vhost-name' => 'Name:', + 'vhost-path' => 'Path to DocumentRoot:', + 'vhost-path-ex' => '(ex. c:/www/newhost)', + 'vhost-opt' => 'Optional additions:', + 'vhost-opt-ex' => '(ex. error_log etc.)', + 'vhost-dne' => 'does not exist', + 'vhost-make' => 'Create VHost', + 'vhost-error-1' => 'Error in path to your hosts-file!', + 'vhost-error-2' => 'Error in path to your httpd.conf!', + 'vhost-text-4' => 'Safe_mode is On, so restart Apache manually!', + 'vhost-credit' => 'Script By Sukos', + + //-------------------------------------------------------------------------------------------- + // Server Migration + //-------------------------------------------------------------------------------------------- + + 'smig-head' => 'Server Migration', + 'smig-sub' => 'Migration Tool [BETA FEATURE]', + 'smig-text-0' => 'The Server Migration tool helps you move from one server to another. + It allows you to migrate from another server to this server. It also allows you to migrate an old + Uniform Server installation to this. +
+ This script must be run via localhost for best result', + 'smig-text-1' => 'The following is for the WWW [htdocs] location of the server you are trying to migrate. + You can choose to migrate only a file or a directory.', + 'smig-text-2' => 'This will migrate your MySQL database from the old servers to this server. + Before using this part of the script, please note that problems can occur if you have the same + database name in the old installations and in this one.', + 'smig-success' => 'The migration was successful! Please go and check to make sure now.', + 'smig-www' => 'WWW [htdocs] Location', + 'smig-mysql' => 'MySQL Data Directory', + + //-------------------------------------------------------------------------------------------- + // Server Security Console + //-------------------------------------------------------------------------------------------- + + 'secure1-head' => 'Security Alert!', + 'secure1-sub' => 'Possible Attack', + 'secure1-text-0' => 'IP ADDRESS is not 127.0.0.1, but', + 'secure1-text-1' => 'Note: HTTP_REFERER is', + 'secure1-text-2' => 'To disable this warning set $unisecure to 0 in: /home/admin/www/includes/config.inc.php', + + //-------------------------------------------------------------------------------------------- + // Admin Panel Setup + //-------------------------------------------------------------------------------------------- + + 'apsetup-head' => 'Admin Panel Configuration', + 'apsetup-sub-0' => 'User Management', + 'apsetup-text-0' => 'Setup the username and password for the Admin Panel here. Please note that you might have + to activate this feature in the /home/admin/www/.htaccess file.', + 'apsetup-user' => 'Username', + 'apsetup-pass' => 'Password', + 'apsetup-change' => 'Change', + 'apsetup-success' => 'The Admin Panel username/password has been changed to the new values:', + + //-------------------------------------------------------------------------------------------- + // Private Server Setup + //-------------------------------------------------------------------------------------------- + + 'psetup-head' => 'Private Server Configuration', + 'psetup-sub-0' => 'User Management', + 'psetup-text-0' => 'Setup the username and password for your Private Server here. Please note that you might have + to activate this feature in the /www/.htaccess file.', + 'psetup-user' => 'Username', + 'psetup-pass' => 'Password', + 'psetup-change' => 'Change', + 'psetup-success' => 'Your Private Server username/password has been changed to the new values:', + + //-------------------------------------------------------------------------------------------- + // MySQL Setup + //-------------------------------------------------------------------------------------------- + + 'mqsetup-head' => 'MySQL Server Configuration', + 'mqsetup-sub-0' => 'User Management', + 'mqsetup-text-0' => 'Setup the MySQL password here. After changing the MySQL password, please note that you + must shutdown the server using the Stop.bat file and then start the server over again.', + 'mqsetup-pass' => 'MySQL Password', + 'mqsetup-change' => 'Change', + 'mqsetup-success' => 'Your MySQL password has been changed to the new value:', + + //-------------------------------------------------------------------------------------------- + // Server Security Center + //-------------------------------------------------------------------------------------------- + + 'secure-head' => 'Security Center', + 'secure-sub-0' => 'User Management Security', + 'secure-sub-1' => 'Server Security', + 'secure-text-0' => 'This part of the security center will check all user management settings to make sure that + everything is set. It will tell you if something needs to be changed.', + 'secure-text-1' => 'SECURITY MSG', + 'secure-text-2' => 'STATUS', + 'secure-text-3' => 'Admin Panel', + 'secure-text-X' => 'If the username/password is still set to root, then you probably need to change this + by clicking the UNSECURE link.', + 'secure-secure' => 'SECURE', + 'secure-unsecure' => 'UNSECURE', + 'secure-text-7' => 'If the password is still set to root, then you probably need to change this by clicking the UNSECURE link.', + 'secure-text-8' => 'This part of the security center will check and make sure the server settings are appropriate and set corectly.', + 'secure-text-9' => 'PHP Safe Mode', + 'secure-text-10' => 'This checks to see if PHP is running in SAFE MODE. Now, PHP does not have to run in SAFE MODE, but + if you want the extra security, you can set it by clicking on the UNSECURE link.', + 'secure-text-p' => 'Personal Server', + 'secure-text-s' => 'MySQL Server', + 'secure-text-11' => 'Admin Panel Access', + 'secure-text-12' => 'Server Access', + 'secure-text-13' => 'While this is another feature that is not throughly important as other features are in place against + outside access to the Admin Panel, this checks to see if your Admin Panel is secured using the Auth method. Please change this + by editing the '.$apanel_path.'/.htaccess file.', + 'secure-text-14' => 'If you are running your server in Production Mode, Skip this one. If not and you would like to + add more security to the server by blocking it using the Auth method, then change this in by editing the '.$server_path.'/.htaccess file.', + 'secure-view' => 'Local View', + 'secure-look' => 'Due to the fact that some PC\'s have a different hostname set rather than localhost, we use the IP method here. This + checks to make sure that you are viewing the Admin Panel (this) from local.', +); + +# Beta Feature, Currently For Debugging Only +#array2table($US, true); +?> \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/misc.inc b/Source/udrive/home/admin/www/includes/misc.inc new file mode 100644 index 0000000..14f2e01 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/misc.inc @@ -0,0 +1,2 @@ +

+ \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/plugin.inc b/Source/udrive/home/admin/www/includes/plugin.inc new file mode 100644 index 0000000..b36c399 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/plugin.inc @@ -0,0 +1,3 @@ +

+ + diff --git a/Source/udrive/home/admin/www/includes/python.inc b/Source/udrive/home/admin/www/includes/python.inc new file mode 100644 index 0000000..e69de29 diff --git a/Source/udrive/home/admin/www/includes/secure.php b/Source/udrive/home/admin/www/includes/secure.php new file mode 100644 index 0000000..3bb9e9a --- /dev/null +++ b/Source/udrive/home/admin/www/includes/secure.php @@ -0,0 +1,34 @@ + +

» ".$US['secure1-head']."

+

".$US['secure1-sub']."

+

+ ".$US['secure1-text-0']." '".$usip."'. +
+ ".$US['secure1-text-1']." '".$hname."'. +
+
+ ".$US['secure1-text-2']." +

+ "; + + require "footer.php"; + + exit; + } +} +?> diff --git a/Source/udrive/home/admin/www/includes/server.inc b/Source/udrive/home/admin/www/includes/server.inc new file mode 100644 index 0000000..56cc5f9 --- /dev/null +++ b/Source/udrive/home/admin/www/includes/server.inc @@ -0,0 +1,5 @@ +

+ +/rserver.cgi"> +/rmysql.cgi"> +/smysql.cgi"> \ No newline at end of file diff --git a/Source/udrive/home/admin/www/includes/tool.inc b/Source/udrive/home/admin/www/includes/tool.inc new file mode 100644 index 0000000..0fea6dc --- /dev/null +++ b/Source/udrive/home/admin/www/includes/tool.inc @@ -0,0 +1,8 @@ +

+ + + +/elog.cgi"> +/u2w.cgi"> +/dserver.cgi"> + diff --git a/Source/udrive/home/admin/www/index.php b/Source/udrive/home/admin/www/index.php new file mode 100644 index 0000000..20f6135 --- /dev/null +++ b/Source/udrive/home/admin/www/index.php @@ -0,0 +1,56 @@ + + + + + +<?=$US['title']?> <? include('includes/.version'); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +<body bgcolor="#4F4F97"> +<h1>Frame Support Needed</h1> +</body> + + diff --git a/Source/udrive/home/admin/www/js/main.js b/Source/udrive/home/admin/www/js/main.js new file mode 100644 index 0000000..7a0dee6 --- /dev/null +++ b/Source/udrive/home/admin/www/js/main.js @@ -0,0 +1,19 @@ +/* +#################################################### +# Name: The Uniform Server JS 1.0 +# Developed By: The Uniform Server Development Team +# Modified Last By: Olajide Olaolorun (empirex) +# Web: http://www.uniformserver.com +#################################################### +*/ + +function h(t) +{ + if(typeof last == "undefined") + last=document.anchors[0]; + + last.className='n'; + t.className='nh'; + t.blur(); + last=t; +} diff --git a/Source/udrive/home/admin/www/lang.php b/Source/udrive/home/admin/www/lang.php new file mode 100644 index 0000000..4edab0f --- /dev/null +++ b/Source/udrive/home/admin/www/lang.php @@ -0,0 +1,15 @@ + diff --git a/Source/udrive/home/admin/www/migrate.php b/Source/udrive/home/admin/www/migrate.php new file mode 100644 index 0000000..bcc9cd3 --- /dev/null +++ b/Source/udrive/home/admin/www/migrate.php @@ -0,0 +1,99 @@ +read()) { + // Skip pointers + if ($entry == '.' || $entry == '..' || $entry == 'Thumbs.db') { + continue; + } + + // Deep copy directories + if ($dest !== "$source/$entry") { + copyr("$source/$entry", "$dest/$entry"); + } + } + + // Clean up + $dir->close(); + return true; + } + + $source1 = $_POST['getlocate']; + $dest1 = $_POST['destination']; + + //copyr($source1, $dest1); +?> + +
+

»

+

+


+
+ + + +
+

»

+

+

+ +

+
+ +

+ +
+ +

+ +
+ +

+
+ +

+ +
+ +

+ +
+
+ \ No newline at end of file diff --git a/Source/udrive/home/admin/www/mqsetup.php b/Source/udrive/home/admin/www/mqsetup.php new file mode 100644 index 0000000..ccc7126 --- /dev/null +++ b/Source/udrive/home/admin/www/mqsetup.php @@ -0,0 +1,82 @@ + + +
+

»

+

+

+ +
+
+ : +

+
+ + + +
+

»

+

+ +

+
+ + + + + +
+

+
+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/mysql_password b/Source/udrive/home/admin/www/mysql_password new file mode 100644 index 0000000..93ca142 --- /dev/null +++ b/Source/udrive/home/admin/www/mysql_password @@ -0,0 +1 @@ +root \ No newline at end of file diff --git a/Source/udrive/home/admin/www/navigation.php b/Source/udrive/home/admin/www/navigation.php new file mode 100644 index 0000000..2070982 --- /dev/null +++ b/Source/udrive/home/admin/www/navigation.php @@ -0,0 +1,32 @@ + + + + + + + diff --git a/Source/udrive/home/admin/www/pconfig.php b/Source/udrive/home/admin/www/pconfig.php new file mode 100644 index 0000000..4d7f065 --- /dev/null +++ b/Source/udrive/home/admin/www/pconfig.php @@ -0,0 +1,168 @@ + + +
+

»

+

+Var_Name =array ("safe_mode =","expose_php =", "register_globals =", "max_execution_time =", +"memory_limit =", "display_errors =", "post_max_size =", "upload_max_filesize ="); +$PHP->Var_Text =array ( +"".$US['pconfig-smode']."","".$US['pconfig-ssig']."", "".$US['pconfig-rg']."", +"".$US['pconfig-mtexec']."","".$US['pconfig-mmexec']."","".$US['pconfig-perror']."", +"".$US['pconfig-mpsize']."","".$US['pconfig-musize'].""); +$PHP->Var_Help =array ( +"http://php.benscom.com/manual/en/features.safe-mode.php", +"http://www.php.net/manual/en/security.hiding.php#security.hiding", +"http://www.php.net/release_4_1_0.php", +"http://www.php.net/manual/en/configuration.php#ini.max-execution-time", +"http://www.php.net/manual/en/configuration.php#ini.memory-limit", +"http://www.php.net/manual/en/configuration.php#ini.display-errors", +"http://www.php.net/manual/en/features.file-upload.php#features.file-upload.post-method", +"http://www.php.net/manual/en/configuration.php#ini.upload-max-filesize"); + +//-------------------------------------------------------------------- + +// import_request_variables("gP", "st"); +$step=$HTTP_POST_VARS['Submit']; +if ($step == "next") { + echo "

".$US['pconfig-text-0']."

"; +} + +else { + if ($step == "Save") { + $PHP->replace_values ($HTTP_POST_VARS); + echo "

".$US['pconfig-text-1']."

"; + } +?> + +
"; + $PHP->echo_values (); +?> +
+ +
+
+".$US['aconfig-module']."

"; + } + + else { + echo "

".$US['aconfig-cgi']."

"; + } +} + +//-------------------------------------------------------------------- +class Config +{ +var $contents; +var $name; +var $comments; +var $Var_Name; +var $Var_Text; +var $Var_Help; +var $classnum; + +function Config ($file_name, $comments) +{ + $this->comments=$comments; + $this->name=$file_name; + $fd = fopen ($this->name, "r"); + $this->contents = fread ($fd, filesize ($file_name)); + fclose ($fd); + $this->classnumber=$GLOBALS["$Configclassnumber"]=$GLOBALS["$Configclassnumber"]+1; +} + +function f_write () +{ + $fd = fopen ($this->name, "w"); + $ok = fwrite ($fd, $this->contents); + fclose ($fd); +} + +function echo_values () +{ + include "includes/lang/".file_get_contents("includes/.lang").".php"; + echo ""; + $item=0; + + foreach ($this->Var_Name as $loop){ + $Var_ID="C".$this->classnumber."i".$item; + $Var_Name=$this->Var_Name[$item]; + $Var_Text=$this->Var_Text[$item]; + $Var_Help=$this->Var_Help[$item]; + $comments=$this->comments; + preg_match("/\n\s*$Var_Name\s+([^$comments^\n]+)/i", $this->contents, $tag); + echo " + + + "; + echo ""; + $item=$item+1; + } + + echo "

$Var_Text:

+

"; + if ($Var_Help != "") {echo "".$US['pconfig-help']."";}; + echo "

"; + echo "
"; +} + +function replace_values ($HTTP_POST_VARS) +{ + $item=0; + + foreach ($this->Var_Name as $loop){ + $Var_ID="C".$this->classnumber."i".$item; + $data=$HTTP_POST_VARS[$Var_ID]; + $comments=$this->comments; + $this->contents=preg_replace("/\n(\s*$loop)\s+([^$comments]+)/i", "\n\\1 $data\n\n", $this->contents, 1); + $item=$item+1; + } + + $this->f_write (); +} +} +?> +
+ + \ No newline at end of file diff --git a/Source/udrive/home/admin/www/phpMyAdmin/Documentation.txt b/Source/udrive/home/admin/www/phpMyAdmin/Documentation.txt new file mode 100644 index 0000000..83c329b --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/Documentation.txt @@ -0,0 +1,3276 @@ + * Top + * Requirements + * Introduction + * Installation + * Setup script + * Configuration + * Transformations + * FAQ + * Developers + * Credits + * Translators + * Glossary + +phpMyAdmin 2.10.1 Documentation + + * phpMyAdmin homepage + * SourceForge phpMyAdmin project page + * Official phpMyAdmin wiki + * Local documents: + + Version history: ChangeLog + + General notes: README + + License: LICENSE + * Documentation version: $Id: Documentation.html 10319 2007-04-24 04:04:17Z + lem9 $ + +Requirements + + * PHP + + You need PHP 4.1.0 or newer, with session support (see FAQ 1.31) + + You need GD2 support in PHP to display inline thumbnails of JPEGs + ("image/jpeg: inline") with their original aspect ratio + + You need PHP 4.3.0 or newer to use the "text/plain: external" + MIME-based transformation + * MySQL 3.23.32 or newer (details); + * Not really a requirement but a strong suggestion: if you are using the + "cookie" authentication method, having the mcrypt PHP extension on your web + server accelerates not only the login phase but every other action that you + do in phpMyAdmin. + * Web browser with cookies enabled. + +Introduction + +phpMyAdmin can manage a whole MySQL server (needs a super-user) as well as a +single database. To accomplish the latter you'll need a properly set up MySQL +user who can read/write only the desired database. It's up to you to look up +the appropriate part in the MySQL manual. + +Currently phpMyAdmin can: + + * browse and drop databases, tables, views, fields and indexes + * create, copy, drop, rename and alter databases, tables, fields and indexes + * maintenance server, databases and tables, with proposals on server + configuration + * execute, edit and bookmark any SQL-statement, even batch-queries + * load text files into tables + * create^1 and read dumps of tables + * export^1 data to various formats: CSV, XML, PDF, ISO/IEC 26300 - + OpenDocument Text and Spreadsheet, Word, Excel and L^AT[E]X formats + * administer multiple servers + * manage MySQL users and privileges + * check referential integrity in MyISAM tables + * using Query-by-example (QBE), create complex queries automatically + connecting required tables + * create PDF graphics of your Database layout + * search globally in a database or a subset of it + * transform stored data into any format using a set of predefined functions, + like displaying BLOB-data as image or download-link + * support InnoDB tables and foreign keys (see FAQ 3.6) + * support mysqli, the improved MySQL extension (see FAQ 1.17) + * communicate in 50 different languages + +A word about users: + +Many people have difficulty understanding the concept of user management with +regards to phpMyAdmin. When a user logs in to phpMyAdmin, that username and +password are passed directly to MySQL. phpMyAdmin does no account management on +its own (other than allowing one to manipulate the MySQL user account +information); all users must be valid MySQL users. + +^1) phpMyAdmin can compress (Zip, GZip -RFC 1952- or Bzip2 formats) dumps and +CSV exports if you use PHP with Zlib support (--with-zlib) and/or Bzip2 support +(--with-bz2). Proper support may also need changes in php.ini. + +Installation + + 1. Quick Install + 2. Setup script usage + 3. Linked-tables infrastructure + 4. Upgrading from an older version + 5. Using authentication modes + +phpMyAdmin does not apply any special security methods to the MySQL database +server. It is still the system administrator's job to grant permissions on the +MySQL databases properly. phpMyAdmin's "Privileges" page can be used for this. + +Warning for Mac users: +if you are on a Mac OS version before OS X, StuffIt unstuffs with Mac formats. +So you'll have to resave as in BBEdit to Unix style ALL phpMyAdmin scripts +before uploading them to your server, as PHP seems not to like Mac-style end of +lines character ("\r"). + +Quick Install + + 1. Choose an appropriate distribution kit from the phpmyadmin.net Downloads + page. Some kits contain only the English messages, others contain all + languages in UTF-8 format (this should be fine in most situations), others + contain all languages and all character sets. We'll assume you chose a kit + whose name looks like phpMyAdmin-x.x.x-all-languages.tar.gz. + 2. Untar or unzip the distribution (be sure to unzip the subdirectories): tar + -xzvf phpMyAdmin_x.x.x-all-languages.tar.gz in your webserver's document + root. If you don't have direct access to your document root, put the files + in a directory on your local machine, and, after step 4, transfer the + directory on your web server using, for example, ftp. + 3. Ensure that all the scripts have the appropriate owner (if PHP is running + in safe mode, having some scripts with an owner different from the owner of + other scripts will be a problem). See FAQ 4.2 and FAQ 1.26 for suggestions. + 4. Now you must configure your installation. There are two methods that can be + used. Traditionally, users have hand-edited a copy of config.inc.php, but + now a wizard-style setup script is provided for those who prefer a + graphical installation. Creating a config.inc.php is still a quick way to + get started and needed for some advanced features. + + To manually create the file, simply use your text editor to create the + file config.inc.php (you can copy config.sample.inc.php to get minimal + configuration file) in the main (top-level) phpMyAdmin directory (the + one that contains index.php). phpMyAdmin first loads libraries/ + config.default.php and then overrides those values with anything found + in config.inc.php. If the default value is okay for a particular + setting, there is no need to include it in config.inc.php. You'll need + a few directives to get going, a simple configuration may look like + this: + + + + Or, if you prefer to not be prompted every time you log in: + + + + For a full explanation of possible configuration values, see the + Configuration Section of this document. + + Instead of manually editing config.inc.php, you can use the Setup + Script. First you must manually create a folder config in the + phpMyAdmin directory. This is a security measure. On a Linux/Unix + system you can use the following commands: + + cd phpMyAdmin + mkdir config # create directory for saving + chmod o+rw config # give it world writable permissions + + And to edit an existing configuration, copy it over first: + + cp config.inc.php config/ # copy current configuration for editing + chmod o+w config/config.inc.php # give it world writable permissions + + On other platforms, simply create the folder and ensure that your web + server has read and write access to it. FAQ 1.26 can help with this. + + Next, open scripts/setup.php in your browser. Note that changes are not + saved to disk until explicitly choose Save from the Configuration area + of the screen. Normally the script saves the new config.inc.php to the + config/ directory, but if the webserver does not have the proper + permissions you may see the error "Cannot load or save configuration." + Ensure that the config/ directory exists and has the proper permissions + - or use the Download link to save the config file locally and upload + (via FTP or some similar means) to the proper location. + + Once the file has been saved, it must be moved out of the config/ + directory and the permissions must be reset, again as a security + measure: + + mv config/config.inc.php . # move file to current directory + chmod o-rw config.inc.php # remove world read and write permissions + + Now the file is ready to be used. You can choose to review or edit the + file with your favorite editor, if you prefer to set some advanced + options which the setup script does not provide. + 5. If you are using the auth_type "config", it is suggested that you protect + the phpMyAdmin installation directory because using config does not require + a user to enter a password to access the phpMyAdmin installation. Use of an + alternate authentication method is recommended, for example with HTTP?AUTH + in a .htaccess file or switch to using auth_type cookie or http. See the + multi?user sub?section of this FAQ for additional information, especially + FAQ 4.4. + 6. Open the main phpMyAdmin directory in your browser. phpMyAdmin should now + display a welcome screen and your databases, or a login dialog if using + HTTP or cookie authentication mode. + 7. You should deny access to the ./libraries subfolder in your webserver + configuration. For Apache you can use supplied .htaccess file in that + folder, for other webservers, you should configure this yourself. Such + configuration prevents from possible path exposure and cross side scripting + vulnerabilities that might happen to be found in that code. + +Linked-tables infrastructure + +For a whole set of new features (bookmarks, comments, SQL-history, +PDF-generation, field contents transformation, etc.) you need to create a set +of special tables. Those tables can be located in your own database, or in a +central database for a multi-user installation (this database would then be +accessed by the controluser, so no other user should have rights to it). + +Please look at your ./scripts/ directory, where you should find a file called +create_tables.sql. (If you are using a Windows server, pay special attention to +FAQ 1.23). + +If your MySQL server's version is 4.1.2 or later, please use ./scripts/ +create_tables_mysql_4_1_2+.sql instead, for a new installation. + +If you already had this infrastructure and upgraded to MySQL 4.1.2 or later, +please use ./scripts/upgrade_tables_mysql_4_1_2+.sql. + +You can use your phpMyAdmin to create the tables for you. Please be aware that +you may need special (administrator) privileges to create the database and +tables, and that the script may need some tuning, depending on the database +name. + +After having imported the ./scripts/create_tables.sql file, you should specify +the table names in your ./config.inc.php file. The directives used for that can +be found in the Configuration section. You will also need to have a controluser +with the proper rights to those tables (see section Using authentication modes +below). + +Upgrading from an older version + +Simply copy ./config.inc.php from your previous installation into the newly +unpacked one. Configuration files from very old versions (2.3.0 or older) may +require some tweaking as some options have been changed or removed. + +You should not copy libraries/config.default.php over config.inc.php because +the default configuration file is version-specific. + +If you have upgraded your MySQL server from a version older than 4.1.2 to +version 4.1.2 or newer and if you use the pmadb/linked table infrastructure, +you should run the SQL script found in scripts/upgrade_tables_mysql_4_1_2+.sql. + +Using authentication modes + + * HTTP and cookie authentication modes are recommended in a multi-user + environment where you want to give users access to their own database and + don't want them to play around with others. + Nevertheless be aware that MS Internet Explorer seems to be really buggy + about cookies, at least till version 6, and PHP 4.1.1 is also a bit buggy + in this area! + Even in a single-user environment, you might prefer to use HTTP or cookie + mode so that your user/password pair are not in clear in the configuration + file. + * HTTP and cookie authentication modes are more secure: the MySQL login + information does not need to be set in the phpMyAdmin configuration file + (except possibly for the controluser). + However, keep in mind that the password travels in plain text, unless you + are using the HTTPS protocol. + In cookie mode, the password is stored, encrypted with the blowfish + algorithm, in a temporary cookie. + * Note: starting with phpMyAdmin 2.6.1, this section is only applicable if + your MySQL server is older than 4.1.2, or is running with + --skip-show-database. + + For 'HTTP' and 'cookie' modes, phpMyAdmin needs a controluser that has only + the SELECT privilege on the `mysql`.`user` (all columns except `Password`), + `mysql`.`db` (all columns), `mysql`.`host` (all columns) and `mysql`. + `tables_priv` (all columns except `Grantor` and `Timestamp`) tables. + You must specify the details for the controluser in the config.inc.php file + under the $cfg['Servers'][$i]['controluser'] and $cfg['Servers'][$i] + ['controlpass'] settings. + The following example assumes you want to use pma as the controluser and + pmapass as the controlpass, but this is only an example: use something else + in your file! Input these statements from the phpMyAdmin SQL Query window + or mysql command?line client. + Of course you have to replace localhost with the webserver's host if it's + not the same as the MySQL server's one. + + GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass'; + GRANT SELECT ( + Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, + Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, + File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, + Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, + Execute_priv, Repl_slave_priv, Repl_client_priv + ) ON mysql.user TO 'pma'@'localhost'; + GRANT SELECT ON mysql.db TO 'pma'@'localhost'; + GRANT SELECT ON mysql.host TO 'pma'@'localhost'; + GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) + ON mysql.tables_priv TO 'pma'@'localhost'; + + If you are using an old MySQL version (below 4.0.2), please replace the + first GRANT SELECT query by this one: + + GRANT SELECT ( + Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, + Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, + File_priv, Grant_priv, References_priv, Index_priv, Alter_priv + ) ON mysql.user TO 'pma'@'localhost'; + + ... and if you want to use the many new relation and bookmark features: + + GRANT SELECT, INSERT, UPDATE, DELETE ON .* TO 'pma'@'localhost'; + + (this of course requires that your linked-tables infrastructure be set up). + Of course, the above queries only work if your MySQL version supports the + GRANT command. This is the case since 3.22.11. + * Then each of the true users should be granted a set of privileges on a set + of particular databases. Normally you shouldn't give global privileges to + an ordinary user, unless you understand the impact of those privileges (for + example, you are creating a superuser). + For example, to grant the user real_user with all privileges on the + database user_base: + + GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password'; + + What the user may now do is controlled entirely by the MySQL user + management system. + With HTTP or cookie authentication mode, you don't need to fill the user/ + password fields inside the $cfg['Servers'] array. + +'HTTP' authentication mode + + * Uses HTTP Basic authentication method and allows you to log in as any valid + MySQL user. + * Is supported with most PHP configurations. For IIS (ISAPI) support using + CGI PHP see FAQ 1.32, for using with Apache CGI see FAQ 1.35. + * See also FAQ 4.4 about not using the .htaccess mechanism along with 'HTTP' + authentication mode. + +'cookie' authentication mode + + * You can use this method as a replacement for the HTTP authentication (for + example, if you're running IIS). + * Obviously, the user must enable cookies in the browser, but this is now a + requirement for all authentication modes. + * With this mode, the user can truly log out of phpMyAdmin and log in back + with the same username. + * If you want to log in to arbitrary server see $cfg['AllowArbitraryServer'] + directive. + * As mentioned in the requirements section, having the mcrypt extension will + speed up access considerably, but is not required. + +'config' authentication mode + + * This mode is the less secure one because it requires you to fill the $cfg + ['Servers'][$i]['user'] and $cfg['Servers'][$i]['password'] fields (and as + a result, anyone who can read your config.inc.php can discover your + username and password). + But you don't need to setup a "controluser" here: using the $cfg['Servers'] + [$i]['only_db'] might be enough. + * In the ISP FAQ section, there is an entry explaining how to protect your + configuration file. + * For additional security in this mode, you may wish to consider the Host + authentication $cfg['Servers'][$i]['AllowDeny']['order'] and $cfg + ['Servers'][$i]['AllowDeny']['rules'] configuration directives. + * Unlike cookie and http, does not require a user to log in when first + loading the phpMyAdmin site. This is by design but could allow any user to + access your installation. Use of some restriction method is suggested, + perhaps a .htaccess file with the HTTP-AUTH directive or disallowing + incoming HTTP requests at one?s router or firewall will suffice (both of + which are beyond the scope of this manual but easily searchable with + Google). + +Configuration + +Warning for Mac users: PHP does not seem to like Mac end of lines character ("\ +r"). So ensure you choose the option that allows to use the *nix end of line +character ("\n") in your text editor before saving a script you have modified. + +Configuration note: Almost all configurable data is placed in config.inc.php. +If this file does not exist, please refer to the Quick install section to +create one. This file only needs to contain the parameters you want to change +from their corresponding default value in libraries/config.default.php. + +The parameters which relate to design (like colors) are placed in themes/ +themename/layout.inc.php. You might also want to create config.footer.inc.php +and config.header.inc.php files to add your site specific code to be included +on start and end of each page. + +$cfg['PmaAbsoluteUri'] string + Sets here the complete URL (with full path) to your phpMyAdmin + installation's directory. E.g. http://www.your_web.net/ + path_to_your_phpMyAdmin_directory/. Note also that the URL on some web + servers are case?sensitive. Don?t forget the trailing slash at the end. + + Starting with version 2.3.0, it is advisable to try leaving this blank. In + most cases phpMyAdmin automatically detects the proper setting. Users of + port forwarding will need to set PmaAbsoluteUri (more info). A good test is + to browse a table, edit a row and save it. There should be an error message + if phpMyAdmin is having trouble auto?detecting the correct value. If you + get an error that this must be set or if the autodetect code fails to + detect your path, please post a bug report on our bug tracker so we can + improve the code. +$cfg['PmaNoRelation_DisableWarning'] boolean + Starting with version 2.3.0 phpMyAdmin offers a lot of features to work + with master / foreign ? tables (see $cfg['Servers'][$i]['pmadb']). + If you tried to set this up and it does not work for you, have a look on + the "Structure" page of one database where you would like to use it. You + will find a link that will analyze why those features have been disabled. + If you do not want to use those features set this variable to TRUE to stop + this message from appearing. +$cfg['blowfish_secret'] string + The "cookie" auth_type uses blowfish algorithm to encrypt the password. + If you are using the "cookie" auth_type, enter here a random passphrase of + your choice. It will be used internally by the blowfish algorithm: you + won?t be prompted for this passphrase. The maximum number of characters for + this parameter seems to be 46. +$cfg['Servers'] array + Since version 1.4.2, phpMyAdmin supports the administration of multiple + MySQL servers. Therefore, a $cfg['Servers']-array has been added which + contains the login information for the different servers. The first $cfg + ['Servers'][$i]['host'] contains the hostname of the first server, the + second $cfg['Servers'][$i]['host'] the hostname of the second server, etc. + In ./libraries/config.default.php, there is only one section for server + definition, however you can put as many as you need in ./config.inc.php, + copy that block or needed parts (you don't have to define all settings, + just those you need to change). +$cfg['Servers'][$i]['host'] string + The hostname or IP address of your $i-th MySQL-server. E.g. localhost. +$cfg['Servers'][$i]['port'] string + The port-number of your $i-th MySQL-server. Default is 3306 (leave blank). + If you use "localhost" as the hostname, MySQL ignores this port number and + connects with the socket, so if you want to connect to a port different + from the default port, use "127.0.0.1" or the real hostname in $cfg + ['Servers'][$i]['host']. +$cfg['Servers'][$i]['socket'] string + The path to the socket to use. Leave blank for default. + To determine the correct socket, check your MySQL configuration or, using + the mysql command?line client, issue the status command. Among the + resulting information displayed will be the socket used. +$cfg['Servers'][$i]['ssl'] boolean + Whether to enable SSL for connection to MySQL server. +$cfg['Servers'][$i]['connect_type'] string + What type connection to use with the MySQL server. Your options are + 'socket' and 'tcp'. It defaults to 'tcp' as that is nearly guaranteed to be + available on all MySQL servers, while sockets are not supported on some + platforms. + + To use the socket mode, your MySQL server must be on the same machine as + the Web server. +$cfg['Servers'][$i]['extension'] string + What php MySQL extension to use for the connection. Valid options are: + + mysql : The classic MySQL extension. This is the recommended and default + method at this time. + + mysqli : The improved MySQL extension. This extension became available with + php 5.0.0 and is the recommended way to connect to a server running MySQL + 4.1.x. +$cfg['Servers'][$i]['compress'] boolean + Whether to use a compressed protocol for the MySQL server connection or not + (experimental). + This feature requires PHP >= 4.3.0. +$cfg['Servers'][$i]['controluser'] string + $cfg['Servers'][$i]['controlpass'] string + This special account is used for 2 distinct purposes: to make possible all + relational features (see $cfg['Servers'][$i]['pmadb']) and, for a MySQL + server older than 4.1.2 or running with --skip-show-database, to enable a + multi-user installation (HTTP or cookie authentication mode). + + When using HTTP or cookie authentication modes (or 'config' authentication + mode since phpMyAdmin 2.2.1), you need to supply the details of a MySQL + account that has SELECT privilege on the mysql.user (all columns except + "Password"), mysql.db (all columns) and mysql.tables_priv (all columns + except "Grantor" and "Timestamp") tables. This account is used to check + what databases the user will see at login. + Please see the install section on "Using authentication modes" for more + information. + + In phpMyAdmin versions before 2.2.5, those were called "stduser/stdpass". +$cfg['Servers'][$i]['auth_type'] string ['HTTP'|'http'|'cookie'|'config'| + 'signon'] + Whether config or cookie or HTTP or signon authentication should be used + for this server. + + 'config' authentication ($auth_type = 'config') is the plain old way: + username and password are stored in config.inc.php. + + 'cookie' authentication mode ($auth_type = 'cookie') as introduced in + 2.2.3 allows you to log in as any valid MySQL user with the help of + cookies. Username and password are stored in cookies during the session + and password is deleted when it ends. This can also allow you to log in + in arbitrary server if $cfg['AllowArbitraryServer'] enabled. + + 'HTTP' authentication (was called 'advanced' in older versions and can + be written also as 'http') ($auth_type = 'HTTP') as introduced in 1.3.0 + allows you to log in as any valid MySQL user via HTTP-Auth. + + 'signon' authentication mode ($auth_type = 'signon') as introduced in + 2.10.0 allows you to log in from prepared PHP session data. This is + useful for implementing single signon from another application. Sample + way how to seed session is in signon example: scripts/signon.php. You + need to configure session name and signon URL to use this + authentication method. + Please see the install section on "Using authentication modes" for more + information. +$cfg['Servers'][$i]['user'] string + $cfg['Servers'][$i]['password'] string + When using auth_type = 'config', this is the user/password-pair which + phpMyAdmin will use to connect to the MySQL server. This user/password pair + is not needed when HTTP or cookie authentication is used and should be + empty. +$cfg['Servers'][$i]['nopassword'] boolean + Allow attempt to log in without password when a login with password fails. + This can be used together with http authentication, when authentication is + done some other way and phpMyAdmin gets user name from auth and uses empty + password for connecting to MySQL. Password login is still tried first, but + as fallback, no password method is tried. +$cfg['Servers'][$i]['only_db'] string or array + If set to a (an array of) database name(s), only this (these) database(s) + will be shown to the user. Since phpMyAdmin 2.2.1, this/these database(s) + name(s) may contain MySQL wildcards characters ("_" and "%"): if you want + to use literal instances of these characters, escape them (I.E. use 'my\ + _db' and not 'my_db'). + This setting is an efficient way to lower the server load since the latter + does not need to send MySQL requests to build the available database list. + But it does not replace the privileges rules of the MySQL database server. + If set, it just means only these databases will be displayed but not that + all other databases can't be used. + + An example of using more that one database: $cfg['Servers'][$i]['only_db'] + = array('db1', 'db2'); + + As of phpMyAdmin 2.5.5 the order inside the array is used for sorting the + databases in the left frame, so that you can individually arrange your + databases. + If you want to have certain databases at the top, but don't care about the + others, you do not need to specify all other databases. Use: $cfg + ['Servers'][$i]['only_db'] = array('db3', 'db4', '*'); instead to tell + phpMyAdmin that it should display db3 and db4 on top, and the rest in + alphabetic order. +$cfg['Servers'][$i]['hide_db'] string + Regular expression for hiding some databases. This only hides them from + listing, but a user is still able to access them (using, for example, the + SQL query area). To limit access, use the MySQL privilege system. + + For example, to hide all databases starting with the letter "a", use + + $cfg['Servers'][$i]['hide_db'] = '^a'; + + and to hide both "db1" and "db2" use + + $cfg['Servers'][$i]['hide_db'] = '(db1|db2)'; + + More information on regular expressions can be found in the PCRE pattern + syntax portion of the PHP reference manual. +$cfg['Servers'][$i]['verbose'] string + Only useful when using phpMyAdmin with multiple server entries. If set, + this string will be displayed instead of the hostname in the pull-down menu + on the main page. This can be useful if you want to show only certain + databases on your system, for example. +$cfg['Servers'][$i]['pmadb'] string + The name of the database containing the linked-tables infrastructure. + + See the Linked-tables infrastructure section in this document to see the + benefits of this infrastructure, and for a quick way of creating this + database and the needed tables. + + If you are the only user of this phpMyAdmin installation, you can use your + current database to store those special tables; in this case, just put your + current database name in $cfg['Servers'][$i]['pmadb']. For a multi-user + installation, set this parameter to the name of your central database + containing the linked-tables infrastructure. +$cfg['Servers'][$i]['bookmarktable'] string + Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This can + be useful for queries you often run. + + To allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + enter the table name in $cfg['Servers'][$i]['bookmarktable'] +$cfg['Servers'][$i]['relation'] string + Since release 2.2.4 you can describe, in a special 'relation' table, which + field is a key in another table (a foreign key). phpMyAdmin currently uses + this to + + make clickable, when you browse the master table, the data values that + point to the foreign table; + + display in an optional tool-tip the "display field" when browsing the + master table, if you move the mouse to a column containing a foreign + key (use also the 'table_info' table); + (see FAQ 6.7) + + in edit/insert mode, display a drop-down list of possible foreign keys + (key value and "display field" are shown) + (see FAQ 6.21) + + display links on the table properties page, to check referential + integrity (display missing foreign keys) for each described key; + + in query-by-example, create automatic joins (see FAQ 6.6) + + enable you to get a PDF schema of your database (also uses the + table_coords table). + The keys can be numeric or character. + + To allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + put the relation table name in $cfg['Servers'][$i]['relation'] + + now as normal user open phpMyAdmin and for each one of your tables + where you want to use this feature, click "Structure/Relation view/" + and choose foreign fields. + Please note that in the current version, master_db must be the same as + foreign_db. Those fields have been put in future development of the + cross-db relations. +$cfg['Servers'][$i]['table_info'] string + Since release 2.3.0 you can describe, in a special 'table_info' table, + which field is to be displayed as a tool-tip when moving the cursor over + the corresponding key. + This configuration variable will hold the name of this special table. To + allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + put the table name in $cfg['Servers'][$i]['table_info'] + + then for each table where you want to use this feature, click + "Structure/Relation view/Choose field to display" to choose the field. + Usage tip: Display field. +$cfg['Servers'][$i]['table_coords'] string + $cfg['Servers'][$i]['pdf_pages'] string + Since release 2.3.0 you can have phpMyAdmin create PDF pages showing the + relations between your tables. To do this it needs two tables "pdf_pages" + (storing information about the available PDF pages) and "table_coords" + (storing coordinates where each table will be placed on a PDF schema + output). + + You must be using the "relation" feature. + + To allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + put the correct table names in $cfg['Servers'][$i]['table_coords'] and + $cfg['Servers'][$i]['pdf_pages'] + Usage tips: PDF output. +$cfg['Servers'][$i]['column_info'] string + Since release 2.3.0 you can store comments to describe each column for each + table. These will then be shown on the "printview". + + Starting with release 2.5.0, comments are consequently used on the table + property pages and table browse view, showing up as tool-tips above the + column name (properties page) or embedded within the header of table in + browse view. They can also be shown in a table dump. Please see the + relevant configuration directives later on. + + Also new in release 2.5.0 is a MIME-transformation system which is also + based on the following table structure. See Transformations for further + information. To use the MIME-transformation system, your column_info table + has to have the three new fields 'mimetype', 'transformation', + 'transformation_options'. + + To allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + put the table name in $cfg['Servers'][$i]['column_info'] + + to update your PRE-2.5.0 Column_comments Table use this: + + ALTER TABLE `pma_column_comments` + ADD `mimetype` VARCHAR( 255 ) NOT NULL, + ADD `transformation` VARCHAR( 255 ) NOT NULL, + ADD `transformation_options` VARCHAR( 255 ) NOT NULL; + + and remember that the Variable in config.inc.php has been renamed from + $cfg['Servers'][$i]['column_comments'] to $cfg['Servers'][$i] + ['column_info'] +$cfg['Servers'][$i]['history'] string + Since release 2.5.0 you can store your SQL history, which means all queries + you entered manually into the phpMyAdmin interface. If you don't want to + use a table-based history, you can use the JavaScript-based history. Using + that, all your history items are deleted when closing the window. + + Using $cfg['QueryHistoryMax'] you can specify an amount of history items + you want to have on hold. On every login, this list gets cut to the maximum + amount. + + The query history is only available if JavaScript is enabled in your + browser. + + To allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + put the table name in $cfg['Servers'][$i]['history'] +$cfg['Servers'][$i]['designer_coords'] string + Since release 2.10.0 a Designer interface is available; it permits to + visually manage the relations. + + To allow the usage of this functionality: + + set up pmadb and the linked-tables infrastructure + + put the table name in $cfg['Servers'][$i]['designer_coords'] +$cfg['Servers'][$i]['verbose_check'] boolean + Because release 2.5.0 introduced the new MIME-transformation support, the + column_info table got enhanced with three new fields. If the above variable + is set to TRUE (default) phpMyAdmin will check if you have the latest table + structure available. If not, it will emit a warning to the superuser. + + You can disable this checking behavior by setting the variable to false, + which should offer a performance increase. + + Recommended to set to FALSE, when you are sure, your table structure is up + to date. +$cfg['Servers'][$i]['AllowRoot'] boolean + Whether to allow root access. This is just simplification of rules below. +$cfg['Servers'][$i]['AllowDeny']['order'] string + If your rule order is empty, then IP authentication is disabled. + + If your rule order is set to 'deny,allow' then the system applies all deny + rules followed by allow rules. Access is allowed by default. Any client + which does not match a Deny command or does match an Allow command will be + allowed access to the server. + + If your rule order is set to 'allow,deny' then the system applies all allow + rules followed by deny rules. Access is denied by default. Any client which + does not match an Allow directive or does match a Deny directive will be + denied access to the server. + + If your rule order is set to 'explicit', the authentication is performed in + a similar fashion to rule order 'deny,allow', with the added restriction + that your host/username combination must be listed in the allow rules, and + not listed in the deny rules. This is the most secure means of using Allow/ + Deny rules, and was available in Apache by specifying allow and deny rules + without setting any order. + + Please also see $cfg['TrustedProxies'] for detecting IP address behind + proxies. +$cfg['Servers'][$i]['AllowDeny']['rules'] array of strings + The general format for the rules is as such: + + <'allow' | 'deny'> [from] + + If you wish to match all users, it is possible to use a '%' as a wildcard + in the username field. + There are a few shortcuts you can use in the ipmask field as well (please + note that those containing SERVER_ADDRESS might not be available on all + webservers): + + 'all' -> 0.0.0.0/0 + 'localhost' -> 127.0.0.1/8 + 'localnetA' -> SERVER_ADDRESS/8 + 'localnetB' -> SERVER_ADDRESS/16 + 'localnetC' -> SERVER_ADDRESS/24 + + Having an empty rule list is equivalent to either using 'allow % from all' + if your rule order is set to 'deny,allow' or 'deny % from all' if your rule + order is set to 'allow,deny' or 'explicit'. + + For the IP matching system, the following work: + xxx.xxx.xxx.xxx (an exact IP address) + xxx.xxx.xxx.[yyy-zzz] (an IP address range) + xxx.xxx.xxx.xxx/nn (CIDR, Classless Inter-Domain Routing type IP addresses) + But the following does not work: + xxx.xxx.xxx.xx[yyy-zzz] (partial IP address range) +$cfg['Servers'][$i]['SignonSession'] string + Name of session which will be used for signon authentication method. +$cfg['Servers'][$i]['SignonURL'] string + URL where user will be redirected to log in for signon authentication + method. Should be absolute including protocol. +$cfg['Servers'][$i]['LogoutURL'] string + URL where user will be redirected after logout (doesn't affect config + authentication method). Should be absolute including protocol. +$cfg['ServerDefault'] integer + If you have more than one server configured, you can set $cfg + ['ServerDefault'] to any one of them to autoconnect to that server when + phpMyAdmin is started, or set it to 0 to be given a list of servers without + logging in. + If you have only one server configured, $cfg['ServerDefault'] MUST be set + to that server. +$cfg['OBGzip'] string/boolean + Defines whether to use GZip output buffering for increased speed in HTTP + transfers. + Set to true/false for enabling/disabling. When set to 'auto' (string), + phpMyAdmin tries to enable output buffering and will automatically disable + it if your browser has some problems with buffering. IE6 with a certain + patch is known to cause data corruption when having enabled buffering. +$cfg['PersistentConnections'] boolean + Whether persistent connections should be used or not (mysql_connect or + mysql_pconnect). +$cfg['ForceSSL'] boolean + Whether to force using https while accessing phpMyAdmin. +$cfg['ExecTimeLimit'] integer [number of seconds] + Set the number of seconds a script is allowed to run. If seconds is set to + zero, no time limit is imposed. + This setting is used while importing/exporting dump files but has no effect + when PHP is running in safe mode. +$cfg['MemoryLimit'] integer [number of bytes] + Set the number of bytes a script is allowed to allocate. If number set to + zero, no limit is imposed. + This setting is used while importing/exporting dump files but has no effect + when PHP is running in safe mode. + You can also use any string as in php.ini, eg. '16M'. +$cfg['SkipLockedTables'] boolean + Mark used tables and make it possible to show databases with locked tables + (since MySQL 3.23.30). +$cfg['ShowSQL'] boolean + Defines whether SQL queries generated by phpMyAdmin should be displayed or + not. +$cfg['AllowUserDropDatabase'] boolean + Defines whether normal users (non-administrator) are allowed to delete + their own database or not. If set as FALSE, the link "Drop Database" will + not be shown, and even a "DROP DATABASE mydatabase" will be rejected. Quite + practical for ISP's with many customers. + Please note that this limitation of SQL queries is not as strict as when + using MySQL privileges. This is due to nature of SQL queries which might be + quite complicated. So this choice should be viewed as help to avoid + accidental dropping rather than strict privilege limitation. +$cfg['Confirm'] boolean + Whether a warning ("Are your really sure...") should be displayed when + you're about to lose data. +$cfg['LoginCookieRecall'] boolean + Define whether the previous login should be recalled or not in cookie + authentication mode. +$cfg['LoginCookieValidity'] integer [number of seconds] + Define how long is login cookie valid. +$cfg['LoginCookieStore'] integer [number of seconds] + Define how long is login cookie should be stored in browser. Default 0 + means that it will be kept for existing session. This is recommended for + not trusted environments. +$cfg['LoginCookieDeleteAll'] boolean + If enabled (default), logout deletes cookies for all servers, otherwise + only for current one. Setting this to false makes it easy to forget to log + out from other server, when you are using more of them. +$cfg['UseDbSearch'] boolean + Define whether the "search string inside database" is enabled or not. +$cfg['IgnoreMultiSubmitErrors'] boolean + Define whether phpMyAdmin will continue executing a multi-query statement + if one of the queries fails. Default is to abort execution. +$cfg['VerboseMultiSubmit'] boolean + Define whether phpMyAdmin will output the results of each query of a + multi-query statement embedded into the SQL output as inline comments. + Defaults to TRUE. +$cfg['AllowArbitraryServer'] boolean + If enabled allows you to log in to arbitrary servers using cookie auth. + + NOTE: Please use this carefully, as this may allow users access to MySQL + servers behind the firewall where your HTTP server is placed. +$cfg['LeftFrameLight'] boolean + Defines whether to use a select-based menu and display only the current + tables in the left frame (smaller page). Only in Non-Lightmode you can use + the feature to display nested folders using $cfg['LeftFrameTableSeparator'] +$cfg['LeftFrameDBTree'] boolean + In light mode, defines whether to display the names of databases (in the + selector) using a tree, see also $cfg['LeftFrameDBSeparator']. +$cfg['LeftFrameDBSeparator'] string + The string used to separate the parts of the database name when showing + them in a tree. +$cfg['LeftFrameTableSeparator'] string + Defines a string to be used to nest table spaces. Defaults to '__'. This + means if you have tables like 'first__second__third' this will be shown as + a three-level hierarchy like: first > second > third. If set to FALSE or + empty, the feature is disabled. NOTE: You should not use this separator at + the beginning or end of a table name or multiple times after another + without any other characters in between. +$cfg['LeftFrameTableLevel'] string + Defines how many sublevels should be displayed when splitting up tables by + the above separator. +$cfg['ShowTooltip'] boolean + Defines whether to display table comment as tool-tip in left frame or not. +$cfg['ShowTooltipAliasDB'] boolean + If tool-tips are enabled and a DB comment is set, this will flip the + comment and the real name. That means that if you have a table called + 'user0001' and add the comment 'MyName' on it, you will see the name + 'MyName' used consequently in the left frame and the tool-tip shows the + real name of the DB. +$cfg['ShowTooltipAliasTB'] boolean/string + Same as $cfg['ShowTooltipAliasDB'], except this works for table names. When + setting this to 'nested', the Alias of the Tablename is only used to split/ + nest the tables according to the $cfg['LeftFrameTableSeparator'] directive. + So only the folder is called like the Alias, the tablename itself stays the + real tablename. +$cfg['LeftDisplayLogo'] boolean + Defines whether or not to display the phpMyAdmin logo at the top of the + left frame. Defaults to TRUE. +$cfg['LeftLogoLink'] string + Enter URL where logo in the navigation frame will point to. For use + especially with self made theme which changes this. The default value for + this is main.php. +$cfg['LeftLogoLinkWindow'] string + Whether to open the linked page in the main window (main) or in a new one + (new). +$cfg['LeftDisplayServers'] boolean + Defines whether or not to display a server choice at the top of the left + frame. Defaults to FALSE. +$cfg['DisplayServersList'] boolean + Defines whether to display this server choice as links instead of in a + drop-down. Defaults to FALSE (drop-down). +$cfg['DisplayDatabasesList'] boolean + Defines whether to display database choice in light navigation frame as + links instead of in a drop-down. Defaults to FALSE (drop-down). +$cfg['ShowStats'] boolean + Defines whether or not to display space usage and statistics about + databases and tables. + Note that statistics requires at least MySQL 3.23.3 and that, at this date, + MySQL doesn't return such information for Berkeley DB tables. +$cfg['ShowServerInfo'] boolean + Defines whether to display detailed server information on main page. You + can additionally hide more information by using $cfg['Servers'][$i] + ['verbose']. +$cfg['ShowPhpInfo'] boolean + $cfg['ShowChgPassword'] boolean + $cfg['ShowCreateDb'] boolean + Defines whether to display the "PHP information" and "Change password " + links and form for creating database or not at the starting main (right) + frame. This setting does not check MySQL commands entered directly. + + Please note that to block the usage of phpinfo() in scripts, you have to + put this in your php.ini: + + disable_functions = phpinfo() + + Also note that enabling the "Change password " link has no effect with + "config" authentication mode: because of the hard coded password value in + the configuration file, end users can't be allowed to change their + passwords. +$cfg['SuggestDBName'] boolean + Defines whether to suggest a database name on the "Create Database" form or + to keep the textfield empty. +$cfg['ShowBlob'] boolean + Defines whether or not BLOB fields are shown when browsing a table's + content. +$cfg['NavigationBarIconic'] string + Defines whether navigation bar buttons and the right panel top menu contain + text or symbols only. A value of TRUE displays icons, FALSE displays text + and 'both' displays both icons and text. +$cfg['ShowAll'] boolean + Defines whether a user should be displayed a "show all (records)" button in + browse mode or not. +$cfg['MaxRows'] integer + Number of rows displayed when browsing a result set. If the result set + contains more rows, "Previous" and "Next" links will be shown. +$cfg['Order'] string [DESC|ASC|SMART] + Defines whether fields are displayed in ascending (ASC) order, in + descending (DESC) order or in a "smart" (SMART) order - I.E. descending + order for fields of type TIME, DATE, DATETIME and TIMESTAMP, ascending + order else- by default. +$cfg['ProtectBinary'] boolean or string + Defines whether BLOB or BINARY fields are protected from editing when + browsing a table's content. Valid values are: + + FALSE to allow editing of all fields; + + 'blob' to allow editing of all fields except BLOBS; + + 'all' to disallow editing of all BINARY or BLOB fields. +$cfg['ShowFunctionFields'] boolean + Defines whether or not MySQL functions fields should be initially displayed + in edit/insert mode. Since version 2.10, the user can toggle this setting + from the interface. +$cfg['CharEditing'] string + Defines which type of editing controls should be used for CHAR and VARCHAR + fields. Possible values are: + + input - this allows to limit size of text to size of field in MySQL, + but has problems with newlines in fields + + textarea - no problems with newlines in fields, but also no length + limitations + Default is old behavior so input. +$cfg['InsertRows'] integer + Defines the maximum number of concurrent entries for the Insert page. +$cfg['ForeignKeyMaxLimit'] integer + If there are fewer items than this in the set of foreign keys, then a + drop-down box of foreign keys is presented, in the style described by the + $cfg['ForeignKeyDropdownOrder'] setting. +$cfg['ForeignKeyDropdownOrder'] array + For the foreign key drop-down fields, there are several methods of display, + offering both the key and value data. The contents of the array should be + one or both of the following strings: 'content-id', 'id-content'. +$cfg['ZipDump'] boolean + $cfg['GZipDump'] boolean + $cfg['BZipDump'] boolean + Defines whether to allow the use of zip/GZip/BZip2 compression when + creating a dump file +$cfg['CompressOnFly'] boolean + Defines whether to allow on the fly compression for GZip/BZip2 compressed + exports. This doesn't affect smaller dumps and allows users to create + larger dumps that won't otherwise fit in memory due to php memory limit. + Produced files contain more GZip/BZip2 headers, but all normal programs + handle this correctly. +$cfg['LightTabs'] boolean + If set to TRUE, use less graphically intense tabs on the top of the + mainframe. +$cfg['PropertiesIconic'] string + If set to TRUE, will display icons instead of text for db and table + properties links (like 'Browse', 'Select', 'Insert', ...). + Can be set to 'both' if you want icons AND text. + When set to FALSE, will only show text. +$cfg['PropertiesNumColumns'] integer + How many columns will be utilized to display the tables on the database + property view? Default is 1 column. When setting this to a value larger + than 1, the type of the database will be omitted for more display space. +$cfg['DefaultTabServer'] string + Defines the tab displayed by default on server view. Possible values: + "main.php" (recommended for multi-user setups), "server_databases.php", + "server_status.php", "server_variables.php", "server_privileges.php" or + "server_processlist.php". +$cfg['DefaultTabDatabase'] string + Defines the tab displayed by default on database view. Possible values: + "db_structure.php", "db_sql.php" or "db_search.php". +$cfg['DefaultTabTable'] string + Defines the tab displayed by default on table view. Possible values: + "tbl_structure.php", "tbl_sql.php", "tbl_select.php", "tbl_change.php" or + "sql.php". +$cfg['MySQLManualBase'] string + If set to an URL which points to the MySQL documentation (type depends on + $cfg['MySQLManualType']), appropriate help links are generated. + See MySQL Documentation page for more information about MySQL manuals and + their types. +$cfg['MySQLManualType'] string + Type of MySQL documentation: + + viewable - "viewable online", current one used on MySQL website + + searchable - "Searchable, with user comments" + + chapters - "HTML, one page per chapter" + + big - "HTML, all on one page" + + none - do not show documentation links +$cfg['DefaultLang'] string + Defines the default language to use, if not browser-defined or + user-defined. + See the select_lang.lib.php script to know the valid values for this + setting. +$cfg['DefaultConnectionCollation'] string + Defines the default connection collation to use, if not user-defined. + See the MySQL documentation for list of possible values. +$cfg['Lang'] string + Force: always use this language (must be defined in the select_lang.lib.php + script). +$cfg['FilterLanguages'] string + Limit list of available languages to those matching the given regular + expression. For example if you want only Czech and English, you should set + filter to '^(cs|en)'. +$cfg['DefaultCharset'] string + Default character set to use for recoding of MySQL queries. This must be + enabled and it's described by $cfg['AllowAnywhereRecoding'] option. + You can give here any character set which is in $cfg['AvailableCharsets'] + array and this is just default choice, user can select any of them. +$cfg['AllowAnywhereRecoding'] boolean + Allow character set recoding of MySQL queries. You need recode or iconv + support (compiled in or module) in PHP to allow MySQL queries recoding and + used language file must have it enabled (by default only these which are in + Unicode, just to avoid losing some characters). + + Setting this to TRUE also activates a pull-down menu in the Export page, to + choose the character set when exporting a file. +$cfg['RecodingEngine'] string + You can select here which functions will be used for character set + conversion. Possible values are: + + auto - automatically use available one (first is tested iconv, then + recode) + + iconv - use iconv or libiconv functions + + recode - use recode_string function + Default is auto. +$cfg['IconvExtraParams'] string + Specify some parameters for iconv used in charset conversion. See iconv + documentation for details. By default //TRANSLIT is used, so that invalid + characters will be transliterated. +$cfg['AvailableCharsets'] array + Available character sets for MySQL conversion. You can add your own (any of + supported by recode/iconv) or remove these which you don't use. Character + sets will be shown in same order as here listed, so if you frequently use + some of these move them to the top. +$cfg['TrustedProxies'] array + Lists proxies and HTTP headers which are trusted for IP Allow/Deny. This + list is by default empty, you need to fill in some trusted proxy servers if + you want to use rules for IP addresses behind proxy. + + The following example specifies that phpMyAdmin should trust a + HTTP_X_FORWARDED_FOR (X-Forwarded-For) header coming from the proxy + 1.2.3.4: + + $cfg['TrustedProxies'] = + array('1.2.3.4' => 'HTTP_X_FORWARDED_FOR'); + + The $cfg['Servers'][$i]['AllowDeny']['rules'] directive uses the client's + IP address as usual. +$cfg['GD2Available'] string + Specifies whether GD >= 2 is available. If yes it can be used for MIME + transformations. + Possible values are: + + auto - automatically detect, this is a bit expensive operation for php + < 4.3.0 so it is preferred to change this according to your server real + possibilities + + yes - GD 2 functions can be used + + no - GD 2 function cannot be used + Default is auto. +$cfg['NaviWidth'] integer + Navi frame width in pixels. See themes/themename/layout.inc.php. +$cfg['NaviBackground'] string [valid css code for background] + $cfg['MainBackground'] string [valid css code for background] + The background styles used for both the frames. See themes/themename/ + layout.inc.php. +$cfg['NaviPointerBackground'] string [valid css code for background] + $cfg['NaviPointerColor'] string [valid css color] + The style used for the pointer in the navi frame. See themes/themename/ + layout.inc.php. +$cfg['LeftPointerEnable'] boolean + A value of TRUE activates the navi pointer (when LeftFrameLight is FALSE). +$cfg['Border'] integer + The size of a table's border. See themes/themename/layout.inc.php. +$cfg['ThBackground'] string [valid css code for background] + $cfg['ThColor'] string [valid css color] + The style used for table headers. See themes/themename/layout.inc.php. +$cfg['BgOne'] string [HTML color] + The color (HTML) #1 for table rows. See themes/themename/layout.inc.php. +$cfg['BgTwo'] string [HTML color] + The color (HTML) #2 for table rows. See themes/themename/layout.inc.php. +$cfg['BrowsePointerBackground'] string [HTML color] + $cfg['BrowsePointerColor'] string [HTML color] + $cfg['BrowseMarkerBackground'] string [HTML color] + $cfg['BrowseMarkerColor'] string [HTML color] + The colors (HTML) uses for the pointer and the marker in browse mode. + The former feature highlights the row over which your mouse is passing and + the latter lets you visually mark/unmark rows by clicking on them. + See themes/themename/layout.inc.php. +$cfg['FontFamily'] string + You put here a valid CSS font family value, for example arial, sans-serif. + See themes/themename/layout.inc.php. +$cfg['FontFamilyFixed'] string + You put here a valid CSS font family value, for example monospace. This one + is used in textarea. + See themes/themename/layout.inc.php. +$cfg['BrowsePointerEnable'] boolean + Whether to activate the browse pointer or not. +$cfg['BrowseMarkerEnable'] boolean + Whether to activate the browse marker or not. +$cfg['TextareaCols'] integer + $cfg['TextareaRows'] integer + $cfg['CharTextareaCols'] integer + $cfg['CharTextareaRows'] integer + Number of columns and rows for the textareas. + This value will be emphasized (*2) for SQL query textareas and (*1.25) for + SQL textareas inside the query window. + The Char* values are used for CHAR and VARCHAR editing (if configured via + $cfg['CharEditing']). +$cfg['LongtextDoubleTextarea'] boolean + Defines whether textarea for LONGTEXT fields should have double size. +$cfg['TextareaAutoSelect'] boolean + Defines if the whole textarea of the query box will be selected on click. +$cfg['CtrlArrowsMoving'] boolean + Enable Ctrl+Arrows (Option+Arrows in Safari) moving between fields when + editing. +$cfg['LimitChars'] integer + Maximum number of characters showen in any non-numeric field on browse + view. Can be turned off by a toggle button on the browse page. +$cfg['ModifyDeleteAtLeft'] boolean $cfg['ModifyDeleteAtRight'] boolean + Defines the place where modify and delete links would be put when tables + contents are displayed (you may have them displayed both at the left and at + the right). "Left" and "right" are parsed as "top" and "bottom" with + vertical display mode. +$cfg['DefaultDisplay'] string $cfg['HeaderFlipType'] string + There are 3 display modes: horizontal, horizontalflipped and vertical. + Define which one is displayed by default. The first mode displays each row + on a horizontal line, the second rotates the headers by 90 degrees, so you + can use descriptive headers even though fields only contain small values + and still print them out. The vertical mode sorts each row on a vertical + lineup. + + The HeaderFlipType can be set to 'css' or 'fake'. When using 'css' the + rotation of the header for horizontalflipped is done via CSS. If set to + 'fake' PHP does the transformation for you, but of course this does not + look as good as CSS. +$cfg['DefaultPropDisplay'] string or integer + When editing/creating new columns in a table all fields normally get lined + up one field a line. (default: 'horizontal'). If you set this to 'vertical' + you can have each field lined up vertically beneath each other. You can + save up a lot of place on the horizontal direction and no longer have to + scroll. If you set this to integer, editing of fewer columns will appear in + 'vertical' mode, while editing of more fields still in 'horizontal' mode. + This way you can still effectively edit large number of fields, while + having full view on few of them. +$cfg['ShowBrowseComments'] boolean + $cfg['ShowPropertyComments'] boolean + By setting the corresponding variable to TRUE you can enable the display of + column comments in Browse or Property display. In browse mode, the comments + are shown inside the header. In property mode, comments are displayed using + a CSS-formatted dashed-line below the name of the field. The comment is + shown as a tool-tip for that field. +$cfg['SQLQuery']['Edit'] boolean + Whether to display an edit link to change a query in any SQL Query box. +$cfg['SQLQuery']['Explain'] boolean + Whether to display a link to explain a SELECT query in any SQL Query box. +$cfg['SQLQuery']['ShowAsPHP'] boolean + Whether to display a link to wrap a query in PHP code in any SQL Query box. +$cfg['SQLQuery']['Validate'] boolean + Whether to display a link to validate a query in any SQL Query box. See + also $cfg_SQLValidator. +$cfg['SQLQuery']['Refresh'] boolean + Whether to display a link to refresh a query in any SQL Query box. +$cfg['UploadDir'] string + The name of the directory where +$cfg['UploadDir'] string + The name of the directory where SQL files have been uploaded by other means + than phpMyAdmin (for example, ftp). Those files are available under a + drop-down box when you click the database name, then the SQL tab. + + If you want different directory for each user, %u will be replaced with + username. + + Please note that the file names must have the suffix ".sql" (or ".sql.bz2" + or ".sql.gz" if support for compressed formats is enabled). + + This feature is useful when your file is too big to be uploaded via HTTP, + or when file uploads are disabled in PHP. + + Please note that if PHP is running in safe mode, this directory must be + owned by the same user as the owner of the phpMyAdmin scripts. + + See also FAQ 1.16 for alternatives. +$cfg['SaveDir'] string + The name of the directory where dumps can be saved. + + If you want different directory for each user, %u will be replaced with + username. + + Please note that the directory has to be writable for user running + webserver. + + Please note that if PHP is running in safe mode, this directory must be + owned by the same user as the owner of the phpMyAdmin scripts. +$cfg['TempDir'] string + The name of the directory where temporary files can be stored. + + This is needed for native MS Excel export, see FAQ 6.23 +$cfg['Export'] array + In this array are defined default parameters for export, names of items are + similar to texts seen on export page, so you can easily identify what they + mean. +$cfg['Import'] array + In this array are defined default parameters for import, names of items are + similar to texts seen on import page, so you can easily identify what they + mean. +$cfg['RepeatCells'] integer + Repeat the headers every X cells, or 0 to deactivate. +$cfg['EditInWindow'] boolean + $cfg['QueryWindowWidth'] integer + $cfg['QueryWindowHeight'] integer + $cfg['QueryHistoryDB'] boolean + $cfg['QueryWindowDefTab'] string + $cfg['QueryHistoryMax'] integer + All those variables affect the query window feature. A SQL link or icon is + always displayed on the left panel. If JavaScript is enabled in your + browser, a click on this opens a distinct query window, which is a direct + interface to enter SQL queries. Otherwise, the right panel changes to + display a query box. + + The size of this query window can be customized with $cfg + ['QueryWindowWidth'] and $cfg['QueryWindowWidth'] - both integers for the + size in pixels. Note that normally, those parameters will be modified in + layout.inc.php for the theme you are using. + + If $cfg['EditInWindow'] is set to true, a click on [Edit] from the results + page (in the "Showing Rows" section) opens the query window and puts the + current query inside it. If set to false, clicking on the link puts the SQL + query in the right panel's query box. + + The usage of the JavaScript query window is recommended if you have a + JavaScript enabled browser. Basic functions are used to exchange quite a + few variables, so most 4th generation browsers should be capable to use + that feature. It currently is only tested with Internet Explorer 6 and + Mozilla 1.x. + + If $cfg['QueryHistoryDB'] is set to TRUE, all your Queries are logged to a + table, which has to be created by you (see $cfg['Servers'][$i]['history']). + If set to FALSE, all your queries will be appended to the form, but only as + long as your window is opened they remain saved. + + When using the JavaScript based query window, it will always get updated + when you click on a new table/db to browse and will focus if you click on + "Edit SQL" after using a query. You can suppress updating the query window + by checking the box "Do not overwrite this query from outside the window" + below the query textarea. Then you can browse tables/databases in the + background without losing the contents of the textarea, so this is + especially useful when composing a query with tables you first have to look + in. The checkbox will get automatically checked whenever you change the + contents of the textarea. Please uncheck the button whenever you definitely + want the query window to get updated even though you have made alterations. + + If $cfg['QueryHistoryDB'] is set to TRUE you can specify the amount of + saved history items using $cfg['QueryHistoryMax']. + + The query window also has a custom tabbed look to group the features. Using + the variable $cfg['QueryWindowDefTab'] you can specify the default tab to + be used when opening the query window. It can be set to either 'sql', + 'files', 'history' or 'full'. +$cfg['BrowseMIME'] boolean + Enable MIME-transformations. +$cfg['MaxExactCount'] integer + For InnoDB tables, determines for how large tables phpMyAdmin should get + the exact row count using SELECT COUNT. If the approximate row count as + returned by SHOW TABLE STATUS is smaller than this value, SELECT COUNT will + be used, otherwise the approximate count will be used. +$cfg['MaxExactCountViews'] integer + For VIEWs, since obtaining the exact count could have an impact on + performance, this value is the maximum to be displayed, using a SELECT + COUNT ... LIMIT. The default value of 0 bypasses any row counting. +$cfg['WYSIWYG-PDF'] boolean + Utilizes a WYSIWYG editing control to easily place elements of a PDF page. + By clicking on the button 'toggle scratchboard' on the page where you edit + x/y coordinates of those elements you can activate a scratchboard where all + your elements are placed. By clicking on an element, you can move them + around in the pre-defined area and the x/y coordinates will get updated + dynamically. Likewise, when entering a new position directly into the input + field, the new position in the scratchboard changes after your cursor + leaves the input field. + You have to click on the 'OK'-button below the tables to save the new + positions. If you want to place a new element, first add it to the table of + elements and then you can drag the new element around. + By changing the paper size and the orientation you can change the size of + the scratchboard as well. You can do so by just changing the dropdown field + below, and the scratchboard will resize automatically, without interfering + with the current placement of the elements. + If ever an element gets out of range you can either enlarge the paper size + or click on the 'reset' button to place all elements below each other. + NOTE: You have to use a recent browser like IE6 or Mozilla to get this + control to work. The basic Drag&Drop script functionality was kindly + borrowed from www.youngpup.net and is underlying so specific license. +$cfg['NaturalOrder'] boolean + Sorts database and table names according to natural order (for example, t1, + t2, t10). Currently implemented in the left panel (Light mode) and in + Database view, for the table list. +$cfg['TitleTable'] string +$cfg['TitleDatabase'] string +$cfg['TitleServer'] string +$cfg['TitleDefault'] string + Allows you to specify window's title bar. Following magic string can be + used to get special values: + + @HTTP_HOST@ + HTTP host that runs phpMyAdmin + @SERVER@ + MySQL server name + @VERBOSE@ + Verbose MySQL server name as defined in server configuration + @VSERVER@ + Verbose MySQL server name if set, otherwise normal + @DATABASE@ + Currently opened database + @TABLE@ + Currently opened table + @PHPMYADMIN@ + phpMyAdmin with version + +$cfg['ErrorIconic'] boolean + Uses icons for warnings, errors and informations. +$cfg['MainPageIconic'] boolean + Uses icons on main page in lists and menu tabs. +$cfg['ReplaceHelpImg'] boolean + Shows a help button instead of the "Documentation" message. +$cfg['ThemePath'] string + If theme manager is active, use this as the path of the subdirectory + containing all the themes. +$cfg['ThemeManager'] boolean + Enables user-selectable themes. See FAQ 2.7. +$cfg['ThemeDefault'] string + The default theme (a subdirectory under cfg['ThemePath']). +$cfg['ThemePerServer'] boolean + Whether to allow different theme for each server. +$cfg['DefaultQueryTable'] string + $cfg['DefaultQueryDatabase'] string + Default queries that will be displayed in query boxes when user didn't + specify any. Use %d for database name, %t for table name and %f for a comma + separated list of field names. Note that %t and %f are only applicable to + $cfg['DefaultQueryTable']. +$cfg['SQP']['fmtType'] string [html|none] + The main use of the new SQL Parser is to pretty-print SQL queries. By + default we use HTML to format the query, but you can disable this by + setting this variable to 'none'. +$cfg['SQP']['fmtInd'] float + $cfg['SQP']['fmtIndUnit'] string [em|px|pt|ex] + For the pretty-printing of SQL queries, under some cases the part of a + query inside a bracket is indented. By changing $cfg['SQP']['fmtInd'] you + can change the amount of this indent. + Related in purpose is $cfg['SQP']['fmtIndUnit'] which specifies the units + of the indent amount that you specified. This is used via stylesheets. +$cfg['SQP']['fmtColor'] array of string tuples + This array is used to define the colours for each type of element of the + pretty-printed SQL queries. The tuple format is + class => [HTML colour code | empty string] + If you specify an empty string for the color of a class, it is ignored in + creating the stylesheet. You should not alter the class names, only the + colour strings. + Class name key: + + comment Applies to all comment sub-classes + + comment_mysql Comments as "#...\n" + + comment_ansi Comments as "-- ...\n" + + comment_c Comments as "/*...*/" + + digit Applies to all digit sub-classes + + digit_hex Hexadecimal numbers + + digit_integer Integer numbers + + digit_float Floating point numbers + + punct Applies to all punctuation sub-classes + + punct_bracket_open_round Opening brackets"(" + + punct_bracket_close_round Closing brackets ")" + + punct_listsep List item Separator "," + + punct_qualifier Table/Column Qualifier "." + + punct_queryend End of query marker ";" + + alpha Applies to all alphabetic classes + + alpha_columnType Identifiers matching a column type + + alpha_columnAttrib Identifiers matching a database/table/column + attribute + + alpha_functionName Identifiers matching a MySQL function name + + alpha_reservedWord Identifiers matching any other reserved word + + alpha_variable Identifiers matching a SQL variable "@foo" + + alpha_identifier All other identifiers + + quote Applies to all quotation mark classes + + quote_double Double quotes " + + quote_single Single quotes ' + + quote_backtick Backtick quotes ` +$cfg['SQLValidator'] boolean + + $cfg['SQLValidator']['use'] boolean + phpMyAdmin now supports use of the Mimer SQL Validator service, as + originally published on Slashdot. + For help in setting up your system to use the service, see the FAQ 6.14 + . + $cfg['SQLValidator']['username'] string + $cfg['SQLValidator']['password'] string + The SOAP service allows you to log in with anonymous and any password, + so we use those by default. Instead, if you have an account with them, + you can put your login details here, and it will be used in place of + the anonymous login. + +$cfg['DBG'] + DEVELOPERS ONLY! +$cfg['DBG']['enable'] boolean + DEVELOPERS ONLY! + Enable the DBG extension for debugging phpMyAdmin. Required for profiling + the code. + For help in setting up your system to this, see the Developers section. +$cfg['DBG']['profile']['enable'] boolean + DEVELOPERS ONLY! + Enable profiling support for phpMyAdmin. This will append a chunk of data + to the end of every page displayed in the main window with profiling + statistics for that page. + You may need to increase the maximum execution time for this to complete + successfully.Profiling was removed from the code for version 2.9.0 due to + licensing issues. +$cfg['DBG']['profile']['threshold'] float (units in milliseconds) + DEVELOPERS ONLY! + When profiling data is displayed, this variable controls the threshold of + display for any profiling data, based on the average time each time has + taken. If it is over the threshold it is displayed, otherwise it is not + displayed. This takes a value in milliseconds. In most cases you don't need + to edit this. +$cfg['ColumnTypes'] array + All possible types of a MySQL column. In most cases you don't need to edit + this. +$cfg['AttributeTypes'] array + Possible attributes for fields. In most cases you don't need to edit this. +$cfg['Functions'] array + A list of functions MySQL supports. In most cases you don't need to edit + this. +$cfg['RestrictColumnTypes'] array + Mapping of column types to meta types used for preferring displayed + functions. In most cases you don't need to edit this. +$cfg['RestrictFunctions'] array + Functions preferred for column meta types as defined in $cfg + ['RestrictColumnTypes']. In most cases you don't need to edit this. +$cfg['DefaultFunctions'] array + Functions selected by default when inserting/changing row, Functions are + defined for meta types from $cfg['RestrictColumnTypes'] and for + first_timestamp, which is used for first timestamp column in table. +$cfg['NumOperators'] array + Operators available for search operations on numeric and date fields. +$cfg['TextOperators'] array + Operators available for search operations on character fields. Note that we + put LIKE by default instead of LIKE %...%, to avoid unintended performance + problems in case of huge tables. +$cfg['EnumOperators'] array + Operators available for search operations on enum fields. +$cfg['NullOperators'] array + Additional operators available for search operations when the field can be + null. + +Transformations + + 1. Introduction + 2. Usage + 3. File structure + +1. Introduction + +To enable transformations, you have to setup the column_info table and the +proper directives. Please see the Configuration section on how to do so. + +You can apply different transformations to the contents of each field. The +transformation will take the content of each field and transform it with +certain rules defined in the selected transformation. + +Say you have a field 'filename' which contains a filename. Normally you would +see in phpMyAdmin only this filename. Using transformations you can transform +that filename into a HTML link, so you can click inside of the phpMyAdmin +structure on the field's link and will see the file displayed in a new browser +window. Using transformation options you can also specify strings to append/ +prepend to a string or the format you want the output stored in. + +For a general overview of all available transformations and their options, you +can consult your // +transformation_overview.php installation. + +For a tutorial on how to effectively use transformations, see our Link section +on the official phpMyAdmin homepage. + +2. Usage + +Go to your tbl_structure.php page (i.e. reached through clicking on the +'Structure' link for a table). There click on "Change" (or change icon) and +there you will see three new fields at the end of the line. They are called +'MIME-type', 'Browser transformation' and 'Transformation options'. + + * The field 'MIME-type' is a dropdown field. You have the options to leave + that field empty or to use 'auto' [this feature is not yet available]. + Please note that transformations are inactive as long as no MIME-type is + selected. + * The field 'Browser transformation' is a drop-down field. You can choose + from a hopefully growing amount of pre-defined transformations. See below + for information on how to build your own transformation. + There are global transformations and mimetype-bound transformations. Global + transformations can be used for any mimetype. They will take the mimetype, + if necessary, into regard. Mimetype-bound transformations usually only + operate on a certain mimetype. There are transformations which operate on + the main mimetype (like 'image'), which will most likely take the subtype + into regard, and those who only operate on a specific subtype (like 'image/ + jpeg'). + You can use transformations on mimetypes for which the function was not + defined for. There is no security check for you selected the right + transformation, so take care of what the output will be like. + * The field 'Transformation options' is a free-type textfield. You have to + enter transform-function specific options here. Usually the transforms can + operate with default options, but it is generally a good idea to look up + the overview to see which options are necessary. + Much like the ENUM/SET-Fields, you have to split up several options using + the format 'a','b','c',...(NOTE THE MISSING BLANKS). This is because + internally the options will be parsed as an array, leaving the first value + the first element in the array, and so forth. + If you want to specify a MIME character set you can define it in the + transformation_options. You have to put that outside of the pre-defined + options of the specific mime-transform, as the last value of the set. Use + the format "'; charset=XXX'". If you use a transform, for which you can + specify 2 options and you want to append a character set, enter "'first + parameter','second parameter','charset=us-ascii'". You can, however use the + defaults for the parameters: "'','','charset=us-ascii'". + +3. File structure + +All mimetypes and their transformations are defined through single files in the +directory 'libraries/transformations/'. + +They are stored in files to ease up customization and easy adding of new +transformations. + +Because the user cannot enter own mimetypes, it is kept sure that +transformations always work. It makes no sense to apply a transformation to a +mimetype, the transform-function doesn't know to handle. + +One can, however, use empty mime-types and global transformations which should +work for many mimetypes. You can also use transforms on a different mimetype +they where built for, but pay attention to option usage as well as what the +transformation does to your field. + +There is a basic file called 'global.inc.php'. This function can be included by +any other transform function and provides some basic functions. + +There are 5 possible file names: + + 1. A mimetype+subtype transform: + + [mimetype]_[subtype]__[transform].inc.php + + Please not that mimetype and subtype are separated via '_', which shall not + be contained in their names. The transform function/filename may contain + only characters which cause no problems in the file system as well as the + PHP function naming convention. + + The transform function will the be called 'PMA_transform_[mimetype]_ + [subtype]__[transform]()'. + + Example: + + text_html__formatted.inc.php + PMA_transform_text_html__formatted() + 2. A mimetype (w/o subtype) transform: + + [mimetype]__[transform].inc.php + + Please note that there are no single '_' characters. The transform function + /filename may contain only characters which cause no problems in the file + system as well as the PHP function naming convention. + + The transform function will the be called 'PMA_transform_[mimetype]__ + [transform]()'. + + Example: + + text__formatted.inc.php + PMA_transform_text__formatted() + 3. A mimetype+subtype without specific transform function + + [mimetype]_[subtype].inc.php + + Please note that there are no '__' characters in the filename. Do not use + special characters in the filename causing problems with the file system. + + No transformation function is defined in the file itself. + + Example: + + text_plain.inc.php + (No function) + 4. A mimetype (w/o subtype) without specific transform function + + [mimetype].inc.php + + Please note that there are no '_' characters in the filename. Do not use + special characters in the filename causing problems with the file system. + + No transformation function is defined in the file itself. + + Example: + + text.inc.php + (No function) + 5. A global transform function with no specific mimetype + + global__[transform].inc.php + + The transform function will the be called 'PMA_transform_global__ + [transform]()'. + + Example: + + global__formatted + PMA_transform_global__formatted() + +So generally use '_' to split up mimetype and subtype, and '__' to provide a +transform function. + +All filenames containing no '__' in themselves are not shown as valid transform +functions in the dropdown. + +Please see the libraries/transformations/TEMPLATE file for adding your own +transform function. See the libraries/transformations/TEMPLATE_MIMETYPE for +adding a mimetype without a transform function. Also note the introduction of a +function description in the language files. For each function a +$strTransformation_[filename without .inc.php] has to exist. + +You can use the template generator to generate new functions and entries in the +language file. + +To create a new transform function please see libraries/transformations/ +template_generator.sh. To create a new, empty mimetype please see libraries/ +transformations/template_generator_mimetype.sh. + +A transform function always gets passed three variables: + + 1. $buffer - Contains the text inside of the column. This is the text, you + want to transform. + 2. $options - Contains any user-passed options to a transform function as an + array. + 3. $meta - Contains an object with field information to your column. The data + is drawn from the output of the mysql_fetch_field() function. This means, + all object properties described on the manual page are available in this + variable and can be used to transform a field accordingly to unsigned/ + zerofill/not_null/... properties. + The $meta->mimetype variable contains the original MIME-type of the field + (i.e. 'text/plain', 'image/jpeg' etc.) + +FAQ - Frequently Asked Questions + + 1. Server + 2. Configuration + 3. Known limitations + 4. ISPs, multi-user installations + 5. Browsers or client OS + 6. Using phpMyAdmin + 7. phpMyAdmin project + 8. Security + +Please have a look at our Link section on the official phpMyAdmin homepage for +in-depth coverage of phpMyAdmin's features and or interface. + +Server + +1.1 I'm running PHP 4+ and my server is crashing each time a specific action is +required or phpMyAdmin sends a blank page or a page full of cryptic characters +to my browser, what can I do? + +There are some known PHP bugs with output buffering and compression. +Try to set the $cfg['OBGzip'] directive to FALSE in your config.inc.php file +and the zlib.output_compression directive to Off in your php configuration +file. +Furthermore, we know about such problems connected to the release candidates of +PHP 4.2.0 (tested with PHP 4.2.0 RC1 to RC4) together with MS Internet +Explorer. Please upgrade to the release version PHP 4.2.0. + +1.2 My Apache server crashes when using phpMyAdmin. + +You should first try the latest versions of Apache (and possibly MySQL). +See also the FAQ 1.1 entry about PHP bugs with output buffering. +If your server keeps crashing, please ask for help in the various Apache +support groups. + +1.3 I'm running phpMyAdmin with "cookie" authentication mode under PHP 4.2.0 or +4.2.1 loaded as an Apache 2 module but can't enter the script: I'm always +displayed the login screen. + +This is a known PHP bug (see this bug report) from the official PHP bug +database. It means there is and won't be any phpMyAdmin fix against it because +there is no way to code a fix. + +1.4 Using phpMyAdmin on IIS, I'm displayed the error message: "The specified +CGI application misbehaved by not returning a complete set of HTTP headers +...". + +You just forgot to read the install.txt file from the php distribution. Have a +look at the last message in this bug report from the official PHP bug database. + +1.5 Using phpMyAdmin on IIS, I'm facing crashes and/or many error messages with +the HTTP or advanced authentication mode. + +This is a known problem with the PHP ISAPI filter: it's not so stable. Please +use instead the cookie authentication mode. + +1.6 I can't use phpMyAdmin on PWS: nothing is displayed! + +This seems to be a PWS bug. Filippo Simoncini found a workaround (at this time +there is no better fix): remove or comment the DOCTYPE declarations (2 lines) +from the scripts libraries/header.inc.php, libraries/header_printview.inc.php, +index.php, navigation.php and libraries/common.lib.php. + +1.7 How can I GZip or Bzip a dump or a CSV export? It does not seem to work. + +These features are based on the gzencode() and bzcompress() PHP functions to be +more independent of the platform (Unix/Windows, Safe Mode or not, and so on). +So, you must have PHP4 >= 4.0.4 and Zlib/Bzip2 support (--with-zlib and +--with-bz2). +We faced PHP crashes when trying to download a dump with MS Internet Explorer +when phpMyAdmin is run with a release candidate of PHP 4.2.0. In this case you +should switch to the release version of PHP 4.2.0. + +1.8 I cannot insert a text file in a table, and I get an error about safe mode +being in effect. + +Your uploaded file is saved by PHP in the "upload dir", as defined in php.ini +by the variable upload_tmp_dir (usually the system default is /tmp). +We recommend the following setup for Apache servers running in safe mode, to +enable uploads of files while being reasonably secure: + + * create a separate directory for uploads: mkdir /tmp/php + * give ownership to the Apache server's user.group: chown apache.apache /tmp/ + php + * give proper permission: chmod 600 /tmp/php + * put upload_tmp_dir = /tmp/php in php.ini + * restart Apache + +1.9 I'm having troubles when uploading files. In general file uploads don't +work on my system and uploaded files have a Content-Type: header in the first +line. + +It's not really phpMyAdmin related but RedHat 7.0. You have a RedHat 7.0 and +you updated your PHP RPM to php-4.0.4pl1-3.i386.rpm, didn't you? +So the problem is that this package has a serious bug that was corrected ages +ago in PHP (2001-01-28: see PHP's bug tracking system for more details). The +problem is that the bugged package is still available though it was corrected +(see RedHat's BugZilla for more details). +So please download the fixed package (4.0.4pl1-9) and the problem should go +away. +And that fixes the \r\n problem with file uploads! + +1.10 I'm having troubles when uploading files with phpMyAdmin running on a +secure server. My browser is Internet Explorer and I'm using the Apache server. + +As suggested by "Rob M" in the phpWizard forum, add this line to your +httpd.conf: + +SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown + +It seems to clear up many problems between Internet Explorer and SSL. + +1.11 I get an 'open_basedir restriction' while uploading a file from the query +box. + +Since version 2.2.4, phpMyAdmin supports servers with open_basedir +restrictions. Assuming that the restriction allows you to open files in the +current directory ('.'), all you have to do is create a 'tmp' directory under +the phpMyAdmin install directory, with permissions 777 and the same owner as +the owner of your phpMyAdmin directory. The uploaded files will be moved there, +and after execution of your SQL commands, removed. + +1.12 I have lost my MySQL root password, what can I do? + +The MySQL manual explains how to reset the permissions. + +1.13 I get an error 'No SQL query' when trying to execute a bookmark. + +If PHP does not have read/write access to its upload_tmp_dir, it cannot access +the uploaded query. + +1.14 I get an error 'No SQL query' when trying to submit a query from the +convenient text area. + +Check the post_max_size directive from your PHP configuration file and try to +increase it. + +1.15 I have problems with mysql.user field names. + +In older MySQL versions, the User and Password fields were named user and +password. Please modify your field names to align with current standards. + +1.16 I cannot upload big dump files (memory, HTTP or timeout problems). + +Starting with version 2.7.0, the import engine has been re?written and these +problems should not occur. If possible, upgrade your phpMyAdmin to the latest +version to take advantage of the new import features. + +The first things to check (or ask your host provider to check) are the values +of upload_max_filesize, memory_limit and post_max_size in the php.ini +configuration file. All of these three settings limit the maximum size of data +that can be submitted and handled by PHP. One user also said that post_max_size +and memory_limit need to be larger than upload_max_filesize. + +There exist several workarounds if your upload is too big or your hosting +provider is unwilling to change the settings: + + * Look at the $cfg['UploadDir'] feature. This allows one to upload a file to + the server via scp, ftp, or your favorite file transfer method. PhpMyAdmin + is then able to import the files from the temporary directory. More + information is available in the Configuration section of this document. + * Using a utility (such as BigDump) to split the files before uploading. We + cannot support this or any third party applications, but are aware of users + having success with it. + * If you have shell (command line) access, use MySQL to import the files + directly. You can do this by issuing the "source" command from within + MySQL: source filename.sql. + +1.17 Which MySQL versions does phpMyAdmin support? + +All MySQL versions from 3.23.32 till 5.0 (except for 4.1.0 and 4.1.1) are fully +supported. Please note that the older your MySQL version is, the more +limitations you will have to face. +phpMyAdmin may connect to your MySQL server using php's classic MySQL extension +as well as the improved MySQL extension (MySQLi) that is available in php 5.0. +Either way, the developers of both extensions recommend to use the classic +extension for MySQL 4.0 and below and MySQLi for MySQL 4.1 and newer. +When compiling php, we strongly recommend that you manually link the MySQL +extension of your choice to a MySQL client library of at least the same minor +version since the one that is bundled with some php distributions is rather old +and might cause problems (see FAQ 1.17a). If your webserver is running on a +windows system, you might want to try MySQL's Connector/PHP instead of the +MySQL / MySQLi extensions that are bundled with the official php Win32 builds. +MySQL 5.1 is not yet supported. + +1.17a I cannot connect to the MySQL server. It always returns the error +message, "Client does not support authentication protocol requested by server; +consider upgrading MySQL client" + +You tried to access MySQL with an old MySQL client library. The version of your +MySQL client library can be checked in your phpinfo() output. In general, it +should have at least the same minor version as your server - as mentioned in +FAQ 1.17. + +This problem is generally caused by using MySQL version 4.1 or newer. MySQL +changed the authentication hash and your PHP is trying to use the old method. +The proper solution is to use the mysqli extension with the proper client +library to match your MySQL installation. Your chosen extension is specified in +$cfg['Servers'][$i]['extension']. More information (and several workarounds) +are located in the MySQL Documentation. + +1.18 I'm running MySQL <= 4.0.1 having lower_case_table_names set to 1. If I +create a new table with a capital letter in its name it is changed to lowercase +as it should. But if I try to DROP this table MySQL is unable to find the +corresponding file. + +This is a bug of MySQL <= 4.0.1. Please upgrade to at least MySQL 4.0.2 or turn +off your lower_case_table_names directive. + +1.19 I can't run the "display relations" feature because the script seems not +to know the font face I'm using! + +The "FPDF" library we're using for this feature requires some special files to +use font faces. +Please refers to the FPDF manual to build these files. + +1.20 I receive the error "cannot load MySQL extension, please check PHP +Configuration". + +To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL +extension". This extension may be part of the PHP distribution (compiled-in), +otherwise it needs to be loaded dynamically. Its name is probably mysql.so or +php_mysql.dll. phpMyAdmin tried to load the extension but failed. + +Usually, the problem is solved by installing a software package called +"PHP-MySQL" or something similar. + +1.21 I am running the CGI version of PHP under Unix, and I cannot log in using +cookie auth. + +In php.ini, set mysql.max_links higher than 1. + +1.22 I don't see the "Location of text file" field, so I cannot upload. + +This is most likely because in php.ini, your file_uploads parameter is not set +to "on". + +1.23 I'm running MySQL on a Win32 machine. Each time I create a new table the +table and field names are changed to lowercase! + +This happens because the MySQL directive lower_case_table_names defaults to 1 +(ON) in the Win32 version of MySQL. You can change this behavior by simply +changing the directive to 0 (OFF): +Just edit your my.ini file that should be located in your Windows directory and +add the following line to the group [mysqld]: + +set-variable = lower_case_table_names=0 + +Next, save the file and restart the MySQL service. You can always check the +value of this directive using the query + +SHOW VARIABLES LIKE 'lower_case_table_names'; + +1.24 Some characters are being truncated in my queries, or I get characters +randomly added. I am running PHP 4.2.3. + +This is a PHP 4.2.3 bug. + +1.25 I am running Apache with mod_gzip-1.3.26.1a on Windows XP, and I get +problems, such as undefined variables when I run a SQL query. + +A tip from Jose Fandos: put a comment on the following two lines in httpd.conf, +like this: + +# mod_gzip_item_include file \.php$ +# mod_gzip_item_include mime "application/x-httpd-php.*" + +as this version of mod_gzip on Apache (Windows) has problems handling PHP +scripts. Of course you have to restart Apache. + +1.26 I just installed phpMyAdmin in my document root of IIS but I get the error +"No input file specified" when trying to run phpMyAdmin. + +This is a permission problem. Right-click on the phpmyadmin folder and choose +properties. Under the tab Security, click on "Add" and select the user +"IUSR_machine" from the list. Now set his permissions and it should work. + +1.27 I get empty page when I want to view huge page (eg. db_structure.php with +plenty of tables). + +This is a PHP bug that occur when GZIP output buffering is enabled. If you turn +off it (by $cfg['OBGzip'] = false in config.inc.php), it should work. This bug +will be fixed in PHP 5.0.0. + +1.28 My MySQL server sometimes refuses queries and returns the message +'Errorcode: 13'. What does this mean? + +This can happen due to a MySQL bug when having database / table names with +upper case characters although lower_case_table_names is set to 1. To fix this, +turn off this directive, convert all database and table names to lower case and +turn it on again. Alternatively, there's a bug-fix available starting with +MySQL 3.23.56 / 4.0.11-gamma. + +1.29 When I create a table or modify a field, I get an error and the fields are +duplicated. + +It is possible to configure Apache in such a way that PHP has problems +interpreting .php files. + +The problems occur when two different (and conflicting) set of directives are +used: + +SetOutputFilter PHP +SetInputFilter PHP + +and + +AddType application/x-httpd-php .php + +In the case we saw, one set of directives was in /etc/httpd/conf/httpd.conf, +while the other set was in /etc/httpd/conf/addon-modules/php.conf. +The recommended way is with AddType, so just comment out the first set of lines +and restart Apache: + +#SetOutputFilter PHP +#SetInputFilter PHP + +1.30 I get the error "navigation.php: Missing hash". + +This problem is known to happen when the server is running Turck MMCache but +upgrading MMCache to version 2.3.21 solves the problem. + +1.31 Does phpMyAdmin support php5? + +Yes. +However, phpMyAdmin needs to be backwards compatible to php4. This is why +phpMyAdmin disables the E_STRICT error_level in error_reporting settings. + +1.32 Can I use HTTP authentication with IIS? + +Yes. This procedure was tested with phpMyAdmin 2.6.1, PHP 4.3.9 in ISAPI mode +under IIS 5.1. + + 1. In your php.ini file, set cgi.rfc2616_headers = 0 + 2. In Web Site Properties -> File/Directory Security -> Anonymous Access + dialog box, check the Anonymous access checkbox and uncheck any other + checkboxes (i.e. uncheck Basic authentication, Integrated Windows + authentication, and Digest if it's enabled.) Click OK. + 3. In Custom Errors, select the range of 401;1 through 401;5 and click the Set + to Default button. + +1.33 Is there a problem with the mysqli extension when running PHP 5.0.4 on +64-bit systems? + +Yes. This problem affects phpMyAdmin ("Call to undefined function +pma_reloadnavigation"), so upgrade your PHP to the next version. + +1.34 Can I access directly to database or table pages? + +Yes. Out of the box, you can use URLs like http://server/phpMyAdmin/index.php? +db=database&table=table&target=script. Table and script parts are optional. If +you want http://server/phpMyAdmin/database[/table][/script] URLs, you need to +do some configuration. Following lines apply only for Apache web server. First +make sure, that you have enabled some features within global configuration. You +need Options FollowSymLinks and AllowOverride FileInfo enabled for directory +where phpMyAdmin is installed and you need mod_rewrite to be enabled. Then you +just need to create following .htaccess file in root folder of phpMyAdmin +installation (don't forget to change directory name inside of it): + +RewriteEngine On +RewriteBase /path_to_phpMyAdmin +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&table=$2&target=$3 [R] +RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R] +RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R] + +1.35 Can I use HTTP authentication with Apache CGI? + +Yes. However you need to pass authentication variable to CGI using following +rewrite rule: + +RewriteEngine On +RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L] + +1.36 I get an error "500 Internal Server Error". + +There can be many explanations to this and a look at your server's error log +file might give a clue. + +1.37 I run phpMyAdmin on cluster of different machines and password encryption +in cookie auth doesn't work. + +If your cluster consist of different architectures, PHP code used for +encryption/decryption won't work correct. This is caused by use of pack/unpack +functions in code. Only solution is to use mcrypt extension which works fine in +this case. + +Configuration + +2.1 The error message "Warning: Cannot add header information - headers already +sent by ..." is displayed, what's the problem? + +Edit your config.inc.php file and ensure there is nothing (I.E. no blank lines, +no spaces, no characters...) neither before the tag at the end. + +2.2 phpMyAdmin can't connect to MySQL. What's wrong? + +Either there is an error with your PHP setup or your username/password is +wrong. Try to make a small script which uses mysql_connect and see if it works. +If it doesn't, it may be you haven't even compiled MySQL support into PHP. + +2.3 The error message "Warning: MySQL Connection Failed: Can't connect to local +MySQL server through socket '/tmp/mysql.sock' (111) ..." is displayed. What can +I do? + +For RedHat users, Harald Legner suggests this on the mailing list: + +On my RedHat-Box the socket of MySQL is /var/lib/mysql/mysql.sock. In your +php.ini you will find a line + +mysql.default_socket = /tmp/mysql.sock + +change it to + +mysql.default_socket = /var/lib/mysql/mysql.sock + +Then restart apache and it will work. + +Here is a fix suggested by Brad Ummer: + + * First, you need to determine what socket is being used by MySQL. + To do this, telnet to your server and go to the MySQL bin directory. In + this directory there should be a file named mysqladmin. Type ./mysqladmin + variables, and this should give you a bunch of info about your MySQL + server, including the socket (/tmp/mysql.sock, for example). + * Then, you need to tell PHP to use this socket. + To do this in phpMyAdmin, you need to complete the socket information in + the config.inc.php. + For example: $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock'; + + Please also make sure that the permissions of this file allow to be + readable by your webserver (i.e. '0755'). + +Have also a look at the corresponding section of the MySQL documentation. + +2.4 Nothing is displayed by my browser when I try to run phpMyAdmin, what can I +do? + +Try to set the $cfg['OBGZip'] directive to FALSE in the phpMyAdmin +configuration file. It helps sometime. +Also have a look at your PHP version number: if it contains "4.0b..." it means +you're running a beta version of PHP. That's not a so good idea, please upgrade +to a plain revision. + +2.5 Each time I want to insert or change a record or drop a database or a +table, an error 404 (page not found) is displayed or, with HTTP or cookie +authentication, I'm asked to log in again. What's wrong? + +Check the value you set for the $cfg['PmaAbsoluteUri'] directive in the +phpMyAdmin configuration file. + +2.6 I get an "Access denied for user: 'root@localhost' (Using password: YES) +"-error when trying to access a MySQL-Server on a host which is port-forwarded +for my localhost. + +When you are using a port on your localhost, which you redirect via +port-forwarding to another host, MySQL is not resolving the localhost as +expected. +Erik Wasser explains: The solution is: if your host is "localhost" MySQL (the +commandline tool 'mysql' as well) always tries to use the socket connection for +speeding up things. And that doesn't work in this configuration with port +forwarding. +If you enter "127.0.0.1" as hostname, everything is right and MySQL uses the +TCP connection. + +2.7 Using and creating themes + +Themes are configured with $cfg['ThemePath'], $cfg['ThemeManager'] and $cfg +['ThemeDefault']. + +Under $cfg['ThemePath'], you should not delete the directory "original" or its +underlying structure, because this is the system theme used by phpMyAdmin. +"original" contains all images and styles, for backwards compatibility and for +all themes that would not include images or css-files. + +If $cfg['ThemeManager'] is enabled, you can select your favorite theme on the +main page. Your selected theme will be stored in a cookie. + + +To create a theme: + + * make a new subdirectory (for example "your_theme_name") under $cfg + ['ThemePath'] (by default themes) + * copy the files and directories from "original" to "your_theme_name" + * edit the css-files in "your_theme_name/css" + * put your new images in "your_theme_name/img" + * edit layout.inc.php in "your_theme_name" + * edit info.inc.php in "your_theme_name" to contain your chosen theme name, + that will be visible in user interface + * make a new screenshot of your theme and save it under "your_theme_name/ + screen.png" + +In theme directory there is file info.inc.php which contains theme verbose +name, theme generation and theme version. These versions and generations are +enumerated from 1 and do not have any direct dependence on phpMyAdmin version. +Themes within same generation should be backwards compatible - theme with +version 2 should work in phpMyAdmin requiring version 1. Themes with different +generation are incompatible. + +If you do not want to use your own symbols and buttons, remove the directory +"img" in "your_theme_name". phpMyAdmin will use the default icons and buttons +(from the system-theme "original"). + +2.8 I get "Missing parameters" errors, what can I do? + +Here are a few points to check: + + * In config.inc.php, try to leave the $cfg['PmaAbsoluteUri'] directive empty. + See also FAQ 4.7. + * Maybe you have a broken PHP installation or you need to upgrade your Zend + Optimizer. See http://bugs.php.net/bug.php?id=31134. + * If you are using Hardened PHP with the ini directive + varfilter.max_request_variables set to the default (200) or another low + value, you could get this error if your table has a high number of columns. + Adjust this setting accordingly. (Thanks to Klaus Dorninger for the hint). + * In the php.ini directive arg_separator.input, a value of ";" will cause + this error. Replace it with "&;". + * If you are using Hardened-PHP, you might want to increase request limits. + * The directory specified in the php.ini directive session.save_path does not + exist or is read-only. + +Known limitations + +3.1 When using HTTP authentication, an user who logged out can not log in again +in with the same nick. + +This is related to the authentication mechanism (protocol) used by phpMyAdmin. +To bypass this problem: just close all the opened browser windows and then go +back to phpMyAdmin. You should be able to log in again. + +3.2 When dumping a large table in compressed mode, I get a memory limit error +or a time limit error. + +Compressed dumps are built in memory and because of this are limited to php's +memory limit. For GZip/BZip2 exports this can be overcome since 2.5.4 using +$cfg['CompressOnFly'] (enabled by default). Zip exports can not be handled this +way, so if you need Zip files for larger dump, you have to use another way. + +3.3 With InnoDB tables, I lose foreign key relationships when I rename or alter +a table. + +This seems to be a InnoDB bug (fixed in MySQL 3.23.50?). + +3.4 I am unable to import dumps I created with the mysqldump tool bundled with +the MySQL server distribution. + +The problem is that older versions of mysqldump created invalid comments like +this: + +-- MySQL dump 8.22 +-- +-- Host: localhost Database: database +--------------------------------------------------------- +-- Server version 3.23.54 + +The invalid part of the code is the horizontal line made of dashes that appears +once in every dump created with mysqldump. If you want to run your dump you +have to turn it into valid MySQL. This means, you have to add a whitespace +after the first two dashes of the line or add a # before it: +-- ------------------------------------------------------- +or +#--------------------------------------------------------- + +3.5 When using nested folders there are some multiple hierarchies displayed in +a wrong manner?! ($cfg['LeftFrameTableSeparator']) + +Please note that you should not use the separating string multiple times +without any characters between them, or at the beginning/end of your table +name. If you have to, think about using another TableSeparator or disabling +that feature + +3.6 What is currently not supported in phpMyAdmin about InnoDB? + +In Relation view, being able to choose a table in another database, or having +more than one index field in the foreign key. + +In Query-by-example (Query), automatic generation of the query LEFT JOIN from +the foreign table. + + +3.7 I have table with many (100+) fields and when I try to browse table I get +series of errors like "Warning: unable to parse url". How can this be fixed? + +Your table neither have a primary key nor an unique one, so we must use a long +expression to identify this row. This causes problems to parse_url function. +The workaround is to create a primary or unique key. + +3.8 I cannot use (clickable) HTML-forms in fields where I put a +MIME-Transformation onto! + +Due to a surrounding form-container (for multi-row delete checkboxes), no +nested forms can be put inside the table where phpMyAdmin displays the results. +You can, however, use any form inside of a table if keep the parent +form-container with the target to tbl_row_delete.php and just put your own +input-elements inside. If you use a custom submit input field, the form will +submit itself to the displaying page again, where you can validate the +$HTTP_POST_VARS in a transformation. For a tutorial on how to effectively use +transformations, see our Link section on the official phpMyAdmin-homepage. + +3.9 I get error messages when using "--sql_mode=ANSI" for the MySQL server + +When MySQL is running in ANSI-compatibility mode, there are some major +differences in how SQL is structured (see http://dev.mysql.com/doc/mysql/en/ +ANSI_mode.html). Most important of all, the quote-character (") is interpreted +as an identifier quote character and not as a string quote character, which +makes many internal phpMyAdmin operations into invalid SQL statements. There is +no workaround to this behaviour. News to this item will be posted in Bug report +#816858 + +3.10 Homonyms and no primary key: When the results of a SELECT display more +that one column with the same value (for example SELECT lastname from employees +where firstname like 'A%' and two "Smith" values are displayed), if I click +Edit I cannot be sure that I am editing the intended row. + +Please make sure that your table has a primary key, so that phpMyAdmin can use +it for the Edit and Delete links. + +3.11 The number of records for InnoDB tables is not correct. + +phpMyAdmin uses a quick method to get the row count, and this method only +returns an approximate count in the case of InnoDB tables. See $cfg +['MaxExactCount'] for a way to modify those results, but this could have a +serious impact on performance. + +3.12 What are the phpMyAdmin limitations for MySQL 3? + +The number of records in queries containing COUNT and GROUP BY is not correctly +calculated. Also, sorting results of a query like "SELECT * from table GROUP +BY" ... is problematic. + +3.13 I get an error when entering USE followed by a db name containing an +hyphen. + +The tests I have made with current MySQL 4.1.11 API shows that the API does not +accept this syntax for the USE command. Enclosing the db name with backquotes +works. For further confusion, no backquotes are needed with command-line mysql. + +ISPs, multi-user installations + +4.1 I'm an ISP. Can I setup one central copy of phpMyAdmin or do I need to +install it for each customer. + +Since version 2.0.3, you can setup a central copy of phpMyAdmin for all your +users. The development of this feature was kindly sponsored by NetCologne GmbH. +This requires a properly setup MySQL user management and phpMyAdmin HTTP or +cookie authentication. See the install section on "Using HTTP authentication". + +4.2 What's the preferred way of making phpMyAdmin secure against evil access. + +This depends on your system. +If you're running a server which cannot be accessed by other people, it's +sufficient to use the directory protection bundled with your webserver (with +Apache you can use .htaccess files, for example). +If other people have telnet access to your server, you should use phpMyAdmin's +HTTP or cookie authentication features. + +Suggestions: + + * Your config.inc.php file should be chmod 660. + * All your phpMyAdmin files should be chown -R phpmy.apache, where phpmy is a + user whose password is only known to you, and apache is the group under + which Apache runs. + * You should use PHP safe mode, to protect from other users that try to + include your config.inc.php in their scripts. + +4.3 I get errors about not being able to include a file in /lang or in / +libraries. + +Check php.ini, or ask your sysadmin to check it. The include_path must contain +"." somewhere in it, and open_basedir, if used, must contain "." and "./lang" +to allow normal operation of phpMyAdmin. + +4.4 phpMyAdmin always gives "Access denied" when using HTTP authentication. + +This could happen for several reasons: + + * $cfg['Servers'][$i]['controluser'] and/or $cfg['Servers'][$i] + ['controlpass'] are wrong. + * The username/password you specify in the login dialog are invalid. + * You have already setup a security mechanism for the phpMyAdmin-directory, + eg. a .htaccess file. This would interfere with phpMyAdmin's + authentication, so remove it. + +4.5 Is it possible to let users create their own databases? + +Starting with 2.2.5, in the user management page, you can enter a wildcard +database name for a user (for example "joe%"), and put the privileges you want. +For example, adding SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER +would let a user create/manage his/her database(s). + +4.6 How can I use the Host-based authentication additions? + +If you have existing rules from an old .htaccess file, you can take them and +add a username between the 'deny'/'allow' and 'from' strings. Using the +username wildcard of '%' would be a major benefit here if your installation is +suited to using it. Then you can just add those updated lines into the $cfg +['Servers'][$i]['AllowDeny']['rules'] array. + +If you want a pre-made sample, you can try this fragment. It stops the 'root' +user from logging in from any networks other than the private network IP +blocks. + +//block root from logging in except from the private networks +$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow'; +$cfg['Servers'][$i]['AllowDeny']['rules'] = array( + 'deny root from all', + 'allow root from localhost', + 'allow root from 10.0.0.0/8', + 'allow root from 192.168.0.0/16', + 'allow root from 172.16.0.0/12', + ); + +4.7 Authentication window is displayed more than once, why? + +This happens if you are using a URL to start phpMyAdmin which is different than +the one set in your $cfg['PmaAbsoluteUri']. For example, a missing "www", or +entering with an IP address while a domain name is defined in the config file. + +4.8 Which parameters can I use in the URL that starts phpMyAdmin? + +When starting phpMyAdmin, you can use the db, pma_username, pma_password and +server parameters. This last one can contain either the numeric host index +(from $i of the configuration file) or one of the host names present in the +configuration file. Using pma_username and pma_password has been tested along +with the usage of 'cookie' auth_type. + +Browsers or client OS + +5.1 I get an out of memory error, and my controls are non-functional, when +trying to create a table with more than 14 fields. + +We could reproduce this problem only under Win98/98SE. Testing under WinNT4 or +Win2K, we could easily create more than 60 fields. +A workaround is to create a smaller number of fields, then come back to your +table properties and add the other fields. + +5.2 With Xitami 2.5b4, phpMyAdmin won't process form fields. + +This is not a phpMyAdmin problem but a Xitami known bug: you'll face it with +each script/website that use forms. +Upgrade or downgrade your Xitami server. + +5.3 I have problems dumping tables with Konqueror (phpMyAdmin 2.2.2). + +With Konqueror 2.1.1: plain dumps, zip and GZip dumps work ok, except that the +proposed file name for the dump is always 'tbl_dump.php'. Bzip2 dumps don't +seem to work. +With Konqueror 2.2.1: plain dumps work; zip dumps are placed into the user's +temporary directory, so they must be moved before closing Konqueror, or else +they disappear. GZip dumps give an error message. +Testing needs to be done for Konqueror 2.2.2. + +5.4 I can't use the cookie authentication mode because Internet Explorer never +stores the cookies. + +MS Internet Explorer seems to be really buggy about cookies, at least till +version 6. And thanks to Andrew Zivolup we've traced also a PHP 4.1.1 bug in +this area! +Then, if you're running PHP 4.1.1, try to upgrade or downgrade... it may work! + +5.5 In Internet Explorer 5.0, I get JavaScript errors when browsing my rows. + +Upgrade to at least Internet Explorer 5.5 SP2. + +5.6 In Internet Explorer 5.0, 5.5 or 6.0, I get an error (like "Page not +found") when trying to modify a row in a table with many fields, or with a text +field + +Your table neither have a primary key nor an unique one, so we must use a long +URL to identify this row. There is a limit on the length of the URL in those +browsers, and this not happen in Netscape, for example. The workaround is to +create a primary or unique key, or use another browser. + +5.7 I refresh (reload) my browser, and come back to the welcome page. + +Some browsers support right-clicking into the frame you want to refresh, just +do this in the right frame. + +5.8 With Mozilla 0.9.7 I have problems sending a query modified in the query +box. + +Looks like a Mozilla bug: 0.9.6 was OK. We will keep an eye on future Mozilla +versions. + +5.9 With Mozilla 0.9.? to 1.0 and Netscape 7.0-PR1 I can't type a whitespace in +the SQL-Query edit area: the page scrolls down. + +This is a Mozilla bug (see bug #26882 at BugZilla). + +5.10 With Netscape 4.75 I get empty rows between each row of data in a CSV +exported file. + +This is a known Netscape 4.75 bug: it adds some line feeds when exporting data +in octet-stream mode. Since we can't detect the specific Netscape version, we +cannot workaround this bug. + +5.11 Extended-ASCII characters like German umlauts are displayed wrong. + +Please ensure that you have set your browser's character set to the one of the +language file you have selected on phpMyAdmin's start page. Alternatively, you +can try the auto detection mode that is supported by the recent versions of the +most browsers. + +5.12 Mac OS X: Safari browser changes special characters to "?". + +This issue has been reported by a OS X user, who adds that Chimera, Netscape +and Mozilla do not have this problem. + +5.13 With Internet Explorer 5.5 or 6, and HTTP authentication type, I cannot +manage two servers: I log in to the first one, then the other one, but if I +switch back to the first, I have to log in on each operation. + +This is a bug in Internet Explorer, other browsers do not behave this way. + +5.14 Using Opera6, I can manage to get to the authentication, but nothing +happens after that, only a blank screen. + +Having $cfg['QueryFrameJS'] set o TRUE, this leads to a bug in Opera6, because +it is not able to interpret frameset definitions written by JavaScript. Please +upgrade your phpMyAdmin installtion or to Opera7 at least. + +5.15 I have display problems with Safari. + +Please upgrade to at least version 1.2.3. + +5.16 With Internet Explorer, I get "Access is denied" Javascript errors. Or I +cannot make phpMyAdmin work under Windows. + +Please check the following points: + + * Maybe you have defined your PmaAbsoluteUri setting in config.inc.php to an + IP address and you are starting phpMyAdmin with a URL containing a domain + name, or the reverse situation. + * Security settings in IE and/or Microsoft Security Center are too high, thus + blocking scripts execution. + * The Windows Firewall is blocking Apache and MySQL. You must allow HTTP + ports (80 or 443) and MySQL port (usually 3306) in the "in" and "out" + directions. + +5.17 With Firefox, I cannot delete rows of data or drop a database. + +Many users have confirmed that the Tabbrowser Extensions plugin they installed +in their Firefox is causing the problem. + +Using phpMyAdmin + +6.1 I can't insert new rows into a table / I can't create a table - MySQL +brings up a SQL-error. + +Examine the SQL error with care. Often the problem is caused by specifying a +wrong field-type. +Common errors include: + + * Using VARCHAR without a size argument + * Using TEXT or BLOB with a size argument + +Also, look at the syntax chapter in the MySQL manual to confirm that your +syntax is correct. + +6.2 When I create a table, I click the Index checkbox for 2 fields and +phpMyAdmin generates only one index with those 2 fields. + +In phpMyAdmin 2.2.0 and 2.2.1, this is the way to create a multi-fields index. +If you want two indexes, create the first one when creating the table, save, +then display the table properties and click the Index link to create the other +index. + +6.3 How can I insert a null value into my table? + +Since version 2.2.3, you have a checkbox for each field that can be null. +Before 2.2.3, you had to enter "null", without the quotes, as the field's +value. Since version 2.5.5, you have to use the checkbox to get a real NULL +value, so if you enter "NULL" this means you want a literal NULL in the field, +and not a NULL value (this works in PHP4). + +6.4 How can I backup my database or table? + +Click on a database or table name in the left frame, the properties will be +displayed. Then on the menu, click "Export", you can dump the structure, the +data, or both. This will generate standard SQL statements that can be used to +recreate your database/table. + +You will need to choose "Save as file", so that phpMyAdmin can transmit the +resulting dump to your station. Depending on your PHP configuration, you will +see options to compress the dump. See also the $cfg['ExecTimeLimit'] +configuration variable. + +For additional help on this subject, look for the word "dump" in this document. + +6.5 How can I restore (upload) my database or table using a dump? How can I run +a ".sql" file? + +Click on a database name in the left frame, the properties will be displayed. +Select "Import" from the list of tabs in the right?hand frame (or "SQL" if your +phpMyAdmin version is older than 2.7.0). In the "Location of the text file" +section, type in the path to your dump filename, or use the Browse button. Then +click Go. + +With version 2.7.0, the import engine has been re?written, if possible it is +suggested that you upgrade to take advantage of the new features. + +For additional help on this subject, look for the word "upload" in this +document. + +6.6 How can I use the relation table in Query-by-example? + +Here is an example with the tables persons, towns and countries, all located in +the database mydb. If you don't have a pma_relation table, create it as +explained in the configuration section. Then create the example tables: + +CREATE TABLE REL_countries ( + country_code char(1) NOT NULL default '', + description varchar(10) NOT NULL default '', + PRIMARY KEY (country_code) +) TYPE=MyISAM; + +INSERT INTO REL_countries VALUES ('C', 'Canada'); + +CREATE TABLE REL_persons ( + id tinyint(4) NOT NULL auto_increment, + person_name varchar(32) NOT NULL default '', + town_code varchar(5) default '0', + country_code char(1) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +INSERT INTO REL_persons VALUES (11, 'Marc', 'S', ''); +INSERT INTO REL_persons VALUES (15, 'Paul', 'S', 'C'); + +CREATE TABLE REL_towns ( + town_code varchar(5) NOT NULL default '0', + description varchar(30) NOT NULL default '', + PRIMARY KEY (town_code) +) TYPE=MyISAM; + +INSERT INTO REL_towns VALUES ('S', 'Sherbrooke'); +INSERT INTO REL_towns VALUES ('M', 'Montr?al'); + +To setup appropriate links and display information: + + * on table "REL_persons" click Structure, then Relation view + * in Links, for "town_code" choose "REL_towns->code" + * in Links, for "country_code" choose "REL_countries->country_code" + * on table "REL_towns" click Structure, then Relation view + * in "Choose field to display", choose "description" + * repeat the two previous steps for table "REL_countries" + +Then test like this: + + * Click on your db name in the left frame + * Choose "Query" + * Use tables: persons, towns, countries + * Click "Update query" + * In the fields row, choose persons.person_name and click the "Show" tickbox + * Do the same for towns.description and countries.descriptions in the other 2 + columns + * Click "Update query" and you will see in the query box that the correct + joins have been generated + * Click "Submit query" + +6.7 How can I use the "display field" feature? + +Starting from the previous example, create the pma_table_info as explained in +the configuration section, then browse your persons table, and move the mouse +over a town code or country code. + +See also FAQ 6.21 for an additional feature that "display field" enables: +drop-down list of possible values. + +6.8 How can I produce a PDF schema of my database? + +First the configuration variables "relation", "table_coords" and "pdf_pages" +have to be filled in. + +Then you need to think about your schema layout. Which tables will go on which +pages? + + * Select your database in the left frame. + * Choose "Operations" in the navigation bar at the top. + * Choose "Edit PDF Pages" near the bottom of the page. + * Enter a name for the first PDF page and click Go. If you like, you can use + the "automatic layout," which will put all your linked tables onto the new + page. + * Select the name of the new page (making sure the Edit radio button is + selected) and click Go. + * Select a table from the list, enter its coordinates and click Save. + Coordinates are relative; your diagram will be automatically scaled to fit + the page. When initially placing tables on the page, just pick any + coordinates -- say, 50x50. After clicking Save, you can then use the + graphical editor to position the element correctly. + * When you'd like to look at your PDF, first be sure to click the Save button + beneath the list of tables and coordinates, to save any changes you made + there. Then scroll all the way down, select the PDF options you want, and + click Go. + * Internet Explorer for Windows may suggest an incorrect filename when you + try to save a generated PDF. When saving a generated PDF, be sure that the + filename ends in ".pdf", for example "schema.pdf". Browsers on other + operating systems, and other browsers on Windows, do not have this problem. + +6.9 phpMyAdmin is changing the type of one of my columns! + +No, it's MySQL that is doing silent column type changing. + +6.10 When creating a privilege, what happens with underscores in the database +name? + +If you do not put a backslash before the underscore, this is a wildcard grant, +and the underscore means "any character". So, if the database name is +"john_db", the user would get rights to john1db, john2db ... + +If you put a backslash before the underscore, it means that the database name +will have a real underscore. + +6.11 What is the curious symbol ? in the statistics pages? + +It means "average". + +6.12 I want to understand some Export options. + +Structure: + + * "Add DROP TABLE" will add a line telling MySQL to drop the table, if it + already exists during the import. It does NOT drop the table after your + export, it only affects the import file. + * "If Not Exists" will only create the table if it doesn't exist. Otherwise, + you may get an error if the table name exists but has a different + structure. + * "Add AUTO_INCREMENT value" ensures that AUTO_INCREMENT value (if any) will + be included in backup. + * "Enclose table and field names with backquotes" ensures that field and + table names formed with special characters are protected. + * "Add into comments" includes column comments, relations, and MIME types set + in the pmadb in the dump as SQL comments (/* xxx */). + +Data: + + * "Complete inserts" adds the column names on every INSERT command, for + better documentation (but resulting file is bigger). + * "Extended inserts" provides a shorter dump file by using only once the + INSERT verb and the table name. + * "Delayed inserts" are best explained in the MySQL manual. + * "Ignore inserts" treats errors as a warning instead. Again, more info is + provided in the MySQL manual, but basically with this selected, invalid + values are adjusted and inserted rather than causing the entire statement + to fail. + +6.13 I would like to create a database with a dot in its name. + +This is a bad idea, because in MySQL the syntax "database.table" is the normal +way to reference a database and table name. Worse, MySQL will usually let you +create a database with a dot, but then you cannot work with it, nor delete it. + +6.14 How do I set up the SQL Validator? + +To use it, you need a very recent version of PHP, 4.3.0 recommended, with XML, +PCRE and PEAR support. On your system command line, run "pear install +Net_Socket Net_URL HTTP_Request Mail_Mime Net_DIME SOAP" to get the necessary +PEAR modules for usage. +On a more recent pear version, I had problems with the state of Net_DIME being +beta, so this single command "pear -d preferred_state=beta install -a SOAP" +installed all the needed modules. +If you use the Validator, you should be aware that any SQL statement you submit +will be stored anonymously (database/table/column names, strings, numbers +replaced with generic values). The Mimer SQL Validator itself, is ? 2001 +Upright Database Technology. We utilize it as free SOAP service. + +6.15 I want to add a BLOB field and put an index on it, but MySQL says "BLOB +column '...' used in key specification without a key length". + +The right way to do this, is to create the field without any indexes, then +display the table structure and use the "Create an index" dialog. On this page, +you will be able to choose your BLOB field, and set a size to the index, which +is the condition to create an index on a BLOB field. + +6.16 How can I simply move in page with plenty editing fields? + +You can use Ctrl+arrows (Option+Arrows in Safari) for moving on most pages with +many editing fields (table structure changes, row editing, etc.) (must be +enabled in configuration - see. $cfg['CtrlArrowsMoving']). You can also have a +look at the directive $cfg['DefaultPropDisplay'] ('vertical') and see if this +eases up editing for you. + +6.17 Transformations: I can't enter my own mimetype! WTF is this feature then +useful for? + +Slow down :). Defining mimetypes is of no use, if you can't put transformations +on them. Otherwise you could just put a comment on the field. Because entering +your own mimetype will cause serious syntax checking issues and validation, +this introduces a high-risk false-user-input situation. Instead you have to +initialize mimetypes using functions or empty mimetype definitions. +Plus, you have a whole overview of available mimetypes. Who knows all those +mimetypes by heart so he/she can enter it at will? + +6.18 Bookmarks: Where can I store bookmarks? Why can't I see any bookmarks +below the query box? What is this variable for? + +Any query you have executed can be stored as a bookmark on the page where the +results are displayed. You will find a button labeled 'Bookmark this query' +just at the end of the page. +As soon as you have stored a bookmark, it is related to the database you run +the query on. You can now access a bookmark dropdown on each page, the query +box appears on for that database. + +Since phpMyAdmin 2.5.0 you are also able to store variables for the bookmarks. +Just use the string /*[VARIABLE]*/ anywhere in your query. Everything which is +put into the value input box on the query box page will replace the string "/* +[VARIABLE]*/" in your stored query. Just be aware of that you HAVE to create a +valid query, otherwise your query won't be even able to be stored in the +database. +Also remember, that everything else inside the /*[VARIABLE]*/ string for your +query will remain the way it is, but will be stripped of the /**/ chars. So you +can use: + +/*, [VARIABLE] AS myname */ + +which will be expanded to + +, VARIABLE as myname + +in your query, where VARIABLE is the string you entered in the input box. If an +empty string is provided, no replacements are made. + +A more complex example. Say you have stored this query: + +SELECT Name, Address FROM addresses WHERE 1 /* AND Name LIKE '%[VARIABLE]%' */ + +Say, you now enter "phpMyAdmin" as the variable for the stored query, the full +query will be: + +SELECT Name, Address FROM addresses WHERE 1 AND Name LIKE '%phpMyAdmin%' + +You can use multiple occurrences of /*[VARIABLE]*/ in a single query. +NOTE THE ABSENCE OF SPACES inside the "/**/" construct. Any spaces inserted +there will be later also inserted as spaces in your query and may lead to +unexpected results especially when using the variable expansion inside of a +"LIKE ''" expression. +Your initial query which is going to be stored as a bookmark has to yield at +least one result row so you can store the bookmark. You may have that to work +around using well positioned "/**/" comments. + +6.19 How can I create simple L^AT[E]X document to include exported table? + +You can simply include table in your L^AT[E]X documents, minimal sample +document should look like following one (assuming you have table exported in +file table.tex): + +\documentclass{article} % or any class you want +\usepackage{longtable} % for displaying table +\begin{document} % start of document +\include{table} % including exported table +\end{document} % end of document + +6.20 In MySQL 4, I see a lot of databases which are not mine, and cannot access +them. + +Upgrading to MySQL 4 usually gives users those global privileges: CREATE +TEMPORARY TABLES, SHOW DATABASES, LOCK TABLES. Those privileges also enable +users to see all the database names. See this bug report. + +So if your users do not need those privileges, you can remove them and their +databases list will shorten. + +6.21 In edit/insert mode, how can I see a list of possible values for a field, +based on some foreign table? + +You have to setup appropriate links between the tables, and also setup the +"display field" in the foreign table. See FAQ 6.6 for an example. Then, if +there are 200 values or less in the foreign table, a drop-down list of values +will be available. You will see two lists of values, the first list containing +the key and the display field, the second list containing the display field and +the key. The reason for this is to be able to type the first letter of either +the key or the display field. + +For 200 values or more, a distinct window will appear, to browse foreign key +values and choose one. + +6.22 Bookmarks: Can I execute a default bookmark automatically when entering +Browse mode for a table? + +Yes. If a bookmark has the same label as a table name, it will be executed. + +6.23 Export: I heard phpMyAdmin can export Microsoft Excel files, how can I +enable that? + +Current version does support direct export to Microsoft Excel and Word versions +2000 and newer. If you need export older versions, you can use CSV suitable for +Microsoft Excel, which works out of the box or you can try native experimental +MS Excel exporter. This export has several problems, most important are +limitation of cell content to 255 chars and no support for charsets, so think +carefully whether you want to enable this.. For enabling this you need to set +$cfg['TempDir'] to place where web server user can write (for example './tmp') +and install PEAR module Spreadsheet_Excel_Writer into php include path. The +installation can be done by following command: + +pear -d preferred_state=beta install -a Spreadsheet_Excel_Writer + +First part of switches set we want to install beta version of that module (no +stable version available yet) and then we tell pear we want to satisfy +dependencies. + +If you are running in PHP safe mode, you will have to set in php.ini the +safe_mode_include_dir to the directory where your PEAR modules are located, for +example: + +safe_mode_include_dir = /usr/local/lib/php + +To create the temporary directory on a UNIX-based system, you can do: + +cd phpMyAdmin +mkdir tmp +chmod o+rwx tmp + +6.24 Now that phpMyAdmin supports native MySQL 4.1.x column comments, what +happens to my column comments stored in pmadb? + +Automatic migration of a table's pmadb-style column comments to the native ones +is done whenever you enter Structure page for this table. + +phpMyAdmin project + +7.1 I have found a bug. How do I inform developers? + +Our Bug Tracker is located at http://sf.net/projects/phpmyadmin/ under the Bugs +section. + +But please first discuss your bug with other users: +http://sf.net/projects/phpmyadmin/ (and choose Forums) + +7.2 I want to translate the messages to a new language or upgrade an existing +language, where do I start? + +Always use the current SVN version of your language file. For a new language, +start from english-iso-8859-1.inc.php. If you don't know how to get the SVN +version, please ask one of the developers. +Please note that we try not to use HTML entities like é in the +translations, since we define the right character set in the file. With HTML +entities, the text on JavaScript messages would not display correctly. However +there are some entities that need to be there, for quotes ,non-breakable +spaces, ampersands, less than, greater than. +You can then put your translations, as a zip file to avoid losing special +characters, on the sourceforge.net translation tracker. +It would be a good idea to subscribe to the phpmyadmin-translators mailing +list, because this is where we ask for translations of new messages. + +7.3 I would like to help out with the development of phpMyAdmin. How should I +proceed? + +The following method is preferred for new developers: + + 1. fetch the current SVN tree over anonymous SVN: + svn co https://svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin + 2. add your stuff + 3. generate patch with your changes: svn diff + 4. put the patch inside the patch tracker of the phpMyAdmin project. + +Write access to the SVN tree is granted only to experienced developers who have +already contributed something useful to phpMyAdmin. +Also, have a look at the Developers section. + +Security + +8.1 Where can I get information about the security alerts issued for +phpMyAdmin? + +Please refer to http://www.phpmyadmin.net/home_page/security.php + +Developers Information + +phpMyAdmin is Open Source, so you're invited to contribute to it. Many great +features have been written by other people and you too can help to make +phpMyAdmin a useful tool. + +If you're planning to contribute source, please read the following information: + + * All files include libraries/header.inc.php (layout),. libraries/ + common.lib.php (common functions) and config.inc.php. + Only configuration data should go in config.inc.php. Please keep it free + from other code. + Commonly used functions should be added to libraries/common.lib.php and + more specific ones may be added within a library stored into the libraries + sub-directory. + * Obviously, you're free to use whatever coding style you want. But please + try to keep your code as simple as possible: beginners are using phpMyAdmin + as an example application. + As far as possible, we want the scripts to be XHTML1.0 and CSS2 compliant + on one hand, they fit the PEAR coding standards on the other hand. Please + pay attention to this. + * Please try to keep up the file-naming conventions. Table-related stuff goes + to tbl_*.php, db-related code to db_*.php, server-related tools to + server_*.php and so on. + * Please don't use verbose strings in your code, instead add the string (at + least) to english-iso-8859-1.inc.php and print() it out. + * If you want to be really helpful, write an entry for the ChangeLog. + * The DBG extension (PHP Debugger DBG) is now supported by phpMyAdmin for + developers to better debug and profile their code. + Please see the $cfg['DBG']* configuration options for more information. + This is in memoriam of the Space Shuttle Columbia (STS-107) which was lost + during its re-entry into Earth's atmosphere and in memory of the brave men + and women who gave their lives for the people of Earth. + +Credits + +phpMyAdmin - Credits +==================== + +CREDITS, in chronological order +------------------------------- + +- Tobias Ratschiller + * creator of the phpmyadmin project + * maintainer from 1998 to summer 2000 + +- Marc Delisle + * multi-language version + * various fixes and improvements + * SQL analyser (most of it) + * current project maintainer + +- Olivier M?ller + * started SourceForge phpMyAdmin project in March 2001 + * sync'ed different existing CVS trees with new features and bugfixes + * multi-language improvements, dynamic language selection + * current project maintainer + * many bugfixes and improvements + +- Lo?c Chapeaux + * rewrote and optimized javascript, DHTML and DOM stuff + * rewrote the scripts so they fit the PEAR coding standards and + generate XHTML1.0 and CSS2 compliant codes + * improved the language detection system + * many bugfixes and improvements + +- Robin Johnson + * database maintenance controls + * table type code + * Host authentication IP Allow/Deny + * DB-based configuration (Not completed) + * SQL parser and pretty-printer + * SQL validator + * many bugfixes and improvements + +- Armel Fauveau + * bookmarks feature + * multiple dump feature + * gzip dump feature + * zip dump feature + +- Geert Lund + * various fixes + * moderator of the phpMyAdmin former users forum at phpwizard.net + +- Korakot Chaovavanich + * "insert as new row" feature + +- Pete Kelly + * rewrote and fix dump code + * bugfixes + +- Steve Alberty + * rewrote dump code for PHP4 + * mySQL table statistics + * bugfixes + +- Benjamin Gandon + * main author of the version 2.1.0.1 + * bugfixes + +- Alexander M. Turek + * MySQL 4.0 / 4.1 / 5.0 compatibility + * abstract database interface (PMA_DBI) with MySQLi support + * privileges administration + * XML exports + * various features and fixes + * German language file updates + +- Mike Beck + * automatic joins in QBE + * links column in printview + * Relation view + +- Michal ?iha? + * enhanced index creation/display feature + * feature to use a different charset for HTML than for MySQL + * improvements of export feature + * various features and fixes + * Czech language file updates + +- Christophe Gesch? from the "MySQL Form Generator for PHPMyAdmin" + (http://sf.net/projects/phpmysqlformgen/) + * suggested the patch for multiple table printviews + +- Garvin Hicking + * built the patch for vertical display of table rows + * built the Javascript based Query window + SQL history + * Improvement of column/db comments + * (MIME)-Transformations for columns + * Use custom alias names for Databases in left frame + * hierarchical/nested table display + * PDF-scratchboard for WYSIWYG-distribution of PDF relations + * new icon sets + * vertical display of column properties page + * some bugfixes, features, support, German language additions + +- Yukihiro Kawada + * japanese kanji encoding conversion feature + +- Piotr Roszatycki and Dan Wilson + * the Cookie authentication mode + +- Axel Sander + * table relation-links feature + +- Maxime Delorme + * PDF schema output, thanks also to Olivier Plathey for the + "FPDF" library (see http://www.fpdf.org/) and Steven Wittens + for the "UFPDF" library (see http://www.acko.net/node/56). + +- Olof Edlund + * SQL validator server + +- Ivan R. Lanin + * phpMyAdmin logo (until June 2004) + +- Mike Cochrane + * blowfish library from the Horde project + +- Marcel Tschopp + * mysqli support + * many bugfixes and improvements + +- Michael Keck + * redesign for 2.6.0 + * phpMyAdmin sailboat logo (June 2004) + +- Mathias Landh?u?er + * Representation at conferences + +- Sebastian Mendel + * interface improvements + * various bugfixes + +- Ivan A Kirillov + * new relations Designer + +And also to the following people who have contributed minor changes, +enhancements, bugfixes or support for a new language since version 2.1.0: + +Bora Alioglu, Ricardo ?, Sven-Erik Andersen, Alessandro Astarita, +P?ter Bakondy, Borges Botelho, Olivier Bussier, Neil Darlow, +Mats Engstrom, Ian Davidson, Laurent Dhima, Kristof Hamann, Thomas Kl?ger, +Lubos Klokner, Martin Marconcini, Girish Nair, David Nordenberg, Andreas Pauley, +Bernard M. Piller, Laurent Haas, "Sakamoto", Yuval Sarna, +www.securereality.com.au, Alexis Soulard, Alvar Soome, Siu Sun, Peter Svec, +Michael Tacelosky, Rachim Tamsjadi, Kositer Uros, +Lu?s V., Martijn W. van der Lee, +Algis Vainauskas, Daniel Villanueva, Vinay, Ignacio Vazquez-Abrams, Chee Wai, +Jakub Wilk, Thomas Michael Winningham, Vilius Zigmantas, "Manuzhai". + + +Original Credits of Version 2.1.0 +--------------------------------- + + This work is based on Peter Kuppelwieser's MySQL-Webadmin. It was his idea + to create a web-based interface to MySQL using PHP3. Although I have not + used any of his source-code, there are some concepts I've borrowed from + him. phpMyAdmin was created because Peter told me he wasn't going to + further develop his (great) tool. + Thanks go to + - Amalesh Kempf who contributed the + code for the check when dropping a table or database. He also suggested + that you should be able to specify the primary key on tbl_create.php3. To + version 1.1.1 he contributed the ldi_*.php3-set (Import text-files) as + well as a bug-report. Plus many smaller improvements. + - Jan Legenhausen : He made many of the changes that + were introduced in 1.3.0 (including quite significant ones like the + authentication). For 1.4.1 he enhanced the table-dump feature. Plus + bug-fixes and help. + - Marc Delisle made phpMyAdmin + language-independent by outsourcing the strings to a separate file. He + also contributed the French translation. + - Alexandr Bravo who contributed + tbl_select.php3, a feature to display only some fields from a table. + - Chris Jackson added support for MySQL + functions in tbl_change.php3. He also added the + "Query by Example" feature in 2.0. + - Dave Walton added support for multiple + servers and is a regular contributor for bug-fixes. + - Gabriel Ash contributed the random access + features for 2.0.6. + The following people have contributed minor changes, enhancements, bugfixes + or support for a new language: + Jim Kraai, Jordi Bruguera, Miquel Obrador, Geert Lund, Thomas Kleemann, + Alexander Leidinger, Kiko Albiol, Daniel C. Chao, Pavel Piankov, + Sascha Kettler, Joe Pruett, Renato Lins, Mark Kronsbein, Jannis Hermanns, + G. Wieggers. + + And thanks to everyone else who sent me email with suggestions, bug-reports + and or just some feedback. + +Glossary + +From Wikipedia, the free encyclopedia + + * .htaccess - the default name of Apache's directory-level configuration + file. + * Blowfish - a keyed, symmetric block cipher, designed in 1993 by Bruce + Schneier. + * Browser (Web Browser) - a software application that enables a user to + display and interact with text, images, and other information typically + located on a web page at a website on the World Wide Web. + * bzip2 - a free software/open source data compression algorithm and program + developed by Julian Seward. + * CGI (Common Gateway Interface) - an important World Wide Web technology + that enables a client web browser to request data from a program executed + on the Web server. + * Changelog - a log or record of changes made to a project. + * Client - a computer system that accesses a (remote) service on another + computer by some kind of network. + * column - a set of data values of a particular simple type, one for each row + of the table. + * Cookie - a packet of information sent by a server to a World Wide Web + browser and then sent back by the browser each time it accesses that + server. + * CSV - Comma-seperated values + * DB - look at Database. + * database - an organized collection of data. + * Engine - look at Storage Engines. + * extension - a PHP module that extends PHP with additional functionality. + * FAQ (Frequently Asked Questions) - a list of commonly asked question and + there answers. + * Field - one part of divided data/columns. + * foreign key - a field or group of fields in a database record that point to + a key field or group of fields forming a key of another database record in + some (usually different) table. + * FPDF (FreePDF) - the free PDF library + * GD Graphics Library - a library by Thomas Boutell and others for + dynamically manipulating images. + * GD2 - look at GD Graphics Library. + * gzip - gzip is short for GNU zip, a GNU free software file compression + program. + * host - any machine connected to a computer network, a node that has a + hostname. + * hostname - the unique name by which a network attached device is known on a + network. + * HTTP (HyperText Transfer Protocol) - the primary method used to transfer or + convey information on the World Wide Web. + * https - a HTTP-connection with additional security measures. + * IIS (Internet Information Services) - a set of Internet-based services for + servers using Microsoft Windows. + * Index - a feature that allows quick access to the rows in a table. + * IP (Internet Protocol) - a data-oriented protocol used by source and + destination hosts for communicating data across a packet-switched + internetwork. + * IP Address - a unique number that devices use in order to identify and + communicate with each other on a network utilizing the Internet Protocol + standard. + * ISAPI (Internet Server Application Programming Interface) - the API of + Internet Information Services (IIS). + * ISP (Internet service provider) - a business or organization that offers + users access to the Internet and related services. + * JPEG - a most commonly used standard method of lossy compression for + photographic images. + * JPG - look at JPEG. + * Key - look at index. + * L^AT[E]X - a document preparation system for the T[E]X typesetting program. + * Mac (Apple Macintosh) - line of personal computers is designed, developed, + manufactured, and marketed by Apple Computer. + * Mac OS X - the operating system which is included with all currently + shipping Apple Macintosh computers in the consumer and professional + markets. + * MCrypt - a cryptographic library. + * mcrypt - the MCrypt PHP extension. + * MIME (Multipurpose Internet Mail Extensions) - an Internet Standard for the + format of e-mail. + * module - some sort of extension for the Apache Webserver. + * MySQL - a multithreaded, multi-user, SQL (Structured Query Language) + Database Management System (DBMS). + * mysqli - the improved MySQL client PHP extension. + * mysql - the MySQL client PHP extension. + * OpenDocument - open standard for office documents. + * OS X - look at Mac OS X. + * PDF (Portable Document Format) - a file format developed by Adobe Systems + for representing two dimensional documents in a device independent and + resolution independent format. + * PEAR - the PHP Extension and Application Repository. + * PCRE (Perl Compatible Regular Expressions) - the perl-compatible regular + expression functions for PHP + * PHP - short for "PHP: Hypertext Preprocessor", is an open-source, + reflective programming language used mainly for developing server-side + applications and dynamic web content, and more recently, a broader range of + software applications. + * port - a connection through which data is sent and received. + * RFC - Request for Comments (RFC) documents are a series of memoranda + encompassing new research, innovations, and methodologies applicable to + Internet technologies. + * RFC 1952 - GZIP file format specification version 4.3 + * Row (record, tulpel) - represents a single, implicitly structured data item + in a table. + * Server - a computer system that provides services to other computing + systems over a network. + * Storage Engines - handlers for different table types + * socket - a form of inter-process communication. + * SSL (Secure Sockets Layer) - a cryptographic protocol which provides secure + communication on the Internet. + * SQL - Structured Query Language + * table - a set of data elements (cells) that is organized, defined and + stored as horizontal rows and vertical columns where each item can be + uniquely identified by a label or key or by it?s position in relation to + other items. + * Table type + * tar - a type of archive file format: the Tape ARchive format. + * TCP (Transmission Control Protocol) - one of the core protocols of the + Internet protocol suite. + * UFPDF - Unicode/UTF-8 extension for FPDF + * URL (Uniform Resource Locator) - a sequence of characters, conforming to a + standardized format, that is used for referring to resources, such as + documents and images on the Internet, by their location. + * Webserver - A computer (program) that is responsible for accepting HTTP + requests from clients and serving them Web pages. + * XML (Extensible Markup Language) - a W3C-recommended general-purpose markup + language for creating special-purpose markup languages, capable of + describing many different kinds of data. + * ZIP - a popular data compression and archival format. + * zlib - an open-source, cross-platform data compression library by Jean-loup + Gailly and Mark Adler. + +Valid XHTML 1.1 Valid CSS! + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/browse_foreigners.php b/Source/udrive/home/admin/www/phpMyAdmin/browse_foreigners.php new file mode 100644 index 0000000..5dc55ec --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/browse_foreigners.php @@ -0,0 +1,309 @@ + + + $per_page) ) { + $showall = ''; + } + + $session_max_rows = $per_page; + $pageNow = @floor($pos / $session_max_rows) + 1; + $nbTotalPage = @ceil($the_total / $session_max_rows); + + if ( $the_total > $per_page ) { + $gotopage = PMA_pageselector( + 'browse_foreigners.php?field=' . urlencode($field) . + '&' . PMA_generate_common_url($db, $table) + . $pk_uri . + '&fieldkey=' . (isset($fieldkey) ? $fieldkey : '') . + '&foreign_filter=' . (isset($foreign_filter) ? htmlspecialchars($foreign_filter) : '') . + '&', + $session_max_rows, + $pageNow, + $nbTotalPage + ); + } +} +?> + + + + + phpMyAdmin + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + '; + + echo '' . $header . '' . "\n" + .'' . $header . '' . "\n" + .'' . "\n"; + + $values = array(); + $keys = array(); + foreach ( $disp_row as $relrow ) { + if ($foreign_display != FALSE) { + $values[] = $relrow[$foreign_display]; + } else { + $values[] = ''; + } + + $keys[] = $relrow[$foreign_field]; + } + + asort( $keys ); + + $hcount = 0; + $odd_row = true; + $val_ordered_current_row = 0; + $val_ordered_current_equals_data = false; + $key_ordered_current_equals_data = false; + foreach ( $keys as $key_ordered_current_row => $value ) { + //for ( $i = 0; $i < $count; $i++ ) { + $hcount++; + + if ($cfg['RepeatCells'] > 0 && $hcount > $cfg['RepeatCells']) { + echo $header; + $hcount = 0; + $odd_row = true; + } + + $key_ordered_current_key = $keys[$key_ordered_current_row]; + $key_ordered_current_val = $values[$key_ordered_current_row]; + + $val_ordered_current_key = $keys[$val_ordered_current_row]; + $val_ordered_current_val = $values[$val_ordered_current_row]; + + $val_ordered_current_row++; + + if (PMA_strlen( $val_ordered_current_val ) <= $cfg['LimitChars']) { + $val_ordered_current_val = htmlspecialchars($val_ordered_current_val); + $val_ordered_current_val_title = ''; + } else { + $val_ordered_current_val_title = + htmlspecialchars( $val_ordered_current_val ); + $val_ordered_current_val = + htmlspecialchars( PMA_substr( $val_ordered_current_val, 0, + $cfg['LimitChars'] ) . '...' ); + } + if (PMA_strlen( $key_ordered_current_val ) <= $cfg['LimitChars']) { + $key_ordered_current_val = htmlspecialchars($key_ordered_current_val); + $key_ordered_current_val_title = ''; + } else { + $key_ordered_current_val_title = + htmlspecialchars( $key_ordered_current_val ); + $key_ordered_current_val = + htmlspecialchars( PMA_substr( $key_ordered_current_val, 0, + $cfg['LimitChars'] ) . '...' ); + } + + if ( ! empty( $data ) ) { + $val_ordered_current_equals_data = $val_ordered_current_key == $data; + $key_ordered_current_equals_data = $key_ordered_current_key == $data; + } + + ?> + + + + + + + + + + +
' . $strKeyname . '' . $strDescription . '' . $strDescription . '' . $strKeyname . '
+ ' : '') + .'' + .htmlspecialchars($key_ordered_current_key) . '' . ($key_ordered_current_equals_data ? '' : ''); + ?> + ' : '') + . '' + . $key_ordered_current_val . '' . ($key_ordered_current_equals_data ? '' : ''); + ?> + + ' : '') + . '' + . $val_ordered_current_val . '' . ($val_ordered_current_equals_data ? '' : ''); + ?> + ' : '') . '' . htmlspecialchars($val_ordered_current_key) + . '' . ($val_ordered_current_equals_data ? '' : ''); + ?>
+ + + + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/calendar.php b/Source/udrive/home/admin/www/phpMyAdmin/calendar.php new file mode 100644 index 0000000..8737b75 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/calendar.php @@ -0,0 +1,22 @@ + + + + + +
+
+ + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/changelog.php b/Source/udrive/home/admin/www/phpMyAdmin/changelog.php new file mode 100644 index 0000000..19804e9 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/changelog.php @@ -0,0 +1,87 @@ + '\\1', + + // sourceforge users + '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +<(.*)@users.sourceforge.net>/i' + => '\\1 \\2', + '/thanks to ([^\(\r\n]+) \(([-\w]+)\)/i' + => 'thanks to \\1', + '/thanks to ([^\(\r\n]+) -\s+([-\w]+)/i' + => 'thanks to \\1', + + // mail adresse + '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +<(.*@.*)>/i' + => '\\1 \\2', + + // linking patches + '/patch\s*#?([0-9]{6,})/i' + => 'patch #\\1', + + // linking RFE + '/(?:rfe|feature)\s*#?([0-9]{6,})/i' + => 'RFE #\\1', + + // linking files + '/(\s+)([\\/a-z_0-9\.]+\.(?:php3?|html|pl|js|sh))/i' + => '\\1\\2', + + // FAQ entries + '/FAQ ([0-9]+)\.([0-9a-z]+)/i' + => 'FAQ \\1.\\2', + + // linking bugs + '/bug\s*#?([0-9]{6,})/i' + => 'bug #\\1', + + // all other 6+ digit numbers are treated as bugs + '/(? ' bug #\\1', + + // CVE/CAN entries + '/((CAN|CVE)-[0-9]+-[0-9]+)/' + => '\\1', + + // Highlight releases (with links) + '/(( ### )(([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+) (.*)))/' + => '\\2\\4.\\5.\\6.\\7 \\8', + '/(( ### )(([0-9]+)\.([0-9]+)\.([0-9]+) (.*)))/' + => '\\2\\4.\\5.\\6 \\7', + + // Highlight releases (not linkable) + '/( ### )(.*)/' + => '\\1\\2', + +); + +header('Content-type: text/html; charset=utf-8'); +echo ''; +?> + + + + + +phpMyAdmin - ChangeLog + + + +

phpMyAdmin - ChangeLog

+'; +echo preg_replace(array_keys($replaces), $replaces, $changelog); +echo ''; +?> + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/chk_rel.php b/Source/udrive/home/admin/www/phpMyAdmin/chk_rel.php new file mode 100644 index 0000000..9e246f1 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/chk_rel.php @@ -0,0 +1,24 @@ + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/config.inc.php b/Source/udrive/home/admin/www/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..d363b3f --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/config.inc.php @@ -0,0 +1,713 @@ += 4.3.0) +$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings + // (this user must have read-only +$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user" + // and "mysql/db" tables). + // The controluser is also + // used for all relational + // features (pmadb) +$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? +$cfg['Servers'][$i]['user'] = 'root'; // MySQL user +$cfg['Servers'][$i]['password'] = implode ('', file ('../mysql_password')); // MySQL password (only needed + // with 'config' auth_type) +$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only + // this db is displayed in left frame + // It may also be an array of db-names, where sorting order is relevant. +$cfg['Servers'][$i]['verbose'] = 'Uniform Server'; // Verbose name for this host - leave blank to show the hostname + +$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; // Database used for Relation, Bookmark and PDF Features + // (see scripts/create_tables.sql) + // - leave blank for no support + // DEFAULT: 'phpmyadmin' +$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; // Bookmark table + // - leave blank for no bookmark support + // DEFAULT: 'pma_bookmark' +$cfg['Servers'][$i]['relation'] = 'pma_relation'; // table to describe the relation between links (see doc) + // - leave blank for no relation-links support + // DEFAULT: 'pma_relation' +$cfg['Servers'][$i]['table_info'] = 'pma_table_info'; // table to describe the display fields + // - leave blank for no display fields support + // DEFAULT: 'pma_table_info' +$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; // table to describe the tables position for the PDF schema + // - leave blank for no PDF schema support + // DEFAULT: 'pma_table_coords' +$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; // table to describe pages of relationpdf + // - leave blank if you don't want to use this + // DEFAULT: 'pma_pdf_pages' +$cfg['Servers'][$i]['column_info'] = 'pma_column_info'; // table to store column information + // - leave blank for no column comments/mime types + // DEFAULT: 'pma_column_info' +$cfg['Servers'][$i]['history'] = 'pma_history'; // table to store SQL history + // - leave blank for no SQL query history + // DEFAULT: 'pma_history' +$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables + // are up to date. This prevents compatibility + // checks and thereby increases performance. +$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login +$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use + = ''; +$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults + = array(); + + +// If you have more than one server configured, you can set $cfg['ServerDefault'] +// to any one of them to autoconnect to that server when phpMyAdmin is started, +// or set it to 0 to be given a list of servers without logging in +// If you have only one server configured, $cfg['ServerDefault'] *MUST* be +// set to that server. +$cfg['ServerDefault'] = 1; // Default server (0 = no default server) +$cfg['Server'] = ''; +unset($cfg['Servers'][0]); + + +/** + * Other core phpMyAdmin settings + */ +$cfg['ExecTimeLimit'] = 600; // maximum execution time in seconds (0 for no limit) +$cfg['SkipLockedTables'] = FALSE; // mark used tables, make possible to show + // locked tables (since MySQL 3.23.30) +$cfg['ShowSQL'] = TRUE; // show SQL queries as run +$cfg['AllowUserDropDatabase'] = TRUE; // show a 'Drop database' link to normal users +$cfg['Confirm'] = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' +$cfg['LoginCookieRecall'] = TRUE; // recall previous login in cookie auth. mode or not +$cfg['LoginCookieValidity'] = 3600; // validity of cookie login (in seconds) +$cfg['LeftFrameDBTree'] = TRUE; // turn the select-based light menu into a tree +$cfg['LeftFrameDBSeparator'] = '_'; // the separator to sub-tree the select-based light menu tree +$cfg['LeftFrameTableSeparator']= '_'; // Which string will be used to generate table prefixes + // to split/nest tables into multiple categories +$cfg['LeftFrameTableLevel'] = '1'; // How many sublevels should be displayed when splitting + // up tables by the above Separator +$cfg['ShowTooltip'] = TRUE; // display table comment as tooltip in left frame +$cfg['ShowTooltipAliasDB'] = TRUE; // if ShowToolTip is enabled, this defines that table/db comments +$cfg['ShowTooltipAliasTB'] = TRUE; // are shown (in the left menu and db_details_structure) instead of + // table/db names. Setting ShowTooltipAliasTB to 'nested' will only + // use the Aliases for nested descriptors, not the table itself. + +// In the main frame, at startup... +$cfg['ShowStats'] = TRUE; // allow to display statistics and space usage in + // the pages about database details and table + // properties +$cfg['ShowMysqlInfo'] = TRUE; // whether to display the "MySQL runtime +$cfg['ShowMysqlVars'] = TRUE; // information", "MySQL system variables", "PHP +$cfg['ShowPhpInfo'] = TRUE; // information" and "change password" links for +$cfg['ShowChgPassword'] = TRUE; // simple users or not +$cfg['SuggestDBName'] = TRUE; // suggest a new DB name if possible (false = keep empty) + +$cfg['ShowAll'] = TRUE; // allows to display all the rows +$cfg['MaxRows'] = 300; // maximum number of rows to display +$cfg['Order'] = 'ASC'; // default for 'ORDER BY' clause (valid + // values are 'ASC', 'DESC' or 'SMART' -ie + // descending order for fields of type + // TIME, DATE, DATETIME & TIMESTAMP, + // ascending order else-) + + + +// For the export features... +$cfg['ZipDump'] = TRUE; // Allow the use of zip/gzip/bzip +$cfg['GZipDump'] = TRUE; // compression for +$cfg['BZipDump'] = TRUE; // dump files +$cfg['CompressOnFly'] = TRUE; // Will compress gzip/bzip2 exports on + // fly without need for much memory. + // If you encounter problems with + // created gzip/bzip2 files disable + // this feature. + +// Tabs display settings +$cfg['LightTabs'] = FALSE; // use graphically less intense menu tabs +$cfg['PropertiesIconic'] = TRUE; // Use icons instead of text for the table display of a database (TRUE|FALSE|'both') +$cfg['PropertiesNumColumns'] = 1; // How many columns should be used for table display of a database? + // (a value larger than 1 results in some information being hidden) +/** + * Export defaults + */ + +$cfg['Export']['format'] = 'sql'; // sql/latex/excel/csv/xml/xls/htmlexcel/htmlword +$cfg['Export']['compression'] = 'none'; // none/zip/gzip/bzip2 + +$cfg['Export']['asfile'] = TRUE; +$cfg['Export']['charset'] = ''; +$cfg['Export']['onserver'] = TRUE; +$cfg['Export']['onserver_overwrite'] = FALSE; +$cfg['Export']['remember_file_template'] = TRUE; +$cfg['Export']['file_template_table'] = '__TABLE__-tabel_%Y-%m-%d'; +$cfg['Export']['file_template_database'] = '__DB__-db_%Y-%m-%d'; +$cfg['Export']['file_template_server'] = '__SERVER__-mysql_%Y-%m-%d'; + +$cfg['Export']['htmlexcel_columns'] = FALSE; +$cfg['Export']['htmlexcel_null'] = 'NULL'; + +$cfg['Export']['htmlword_structure'] = TRUE; +$cfg['Export']['htmlword_data'] = TRUE; +$cfg['Export']['htmlword_columns'] = FALSE; +$cfg['Export']['htmlword_null'] = 'NULL'; + +$cfg['Export']['xls_columns'] = FALSE; +$cfg['Export']['xls_null'] = 'NULL'; + +$cfg['Export']['csv_columns'] = FALSE; +$cfg['Export']['csv_null'] = 'NULL'; +$cfg['Export']['csv_separator'] = ';'; +$cfg['Export']['csv_enclosed'] = '"'; +$cfg['Export']['csv_escaped'] = '\\'; +$cfg['Export']['csv_terminated'] = 'AUTO'; +$cfg['Export']['excel_columns'] = FALSE; +$cfg['Export']['excel_null'] = 'NULL'; +$cfg['Export']['excel_edition'] = 'win'; // win/mac + +$cfg['Export']['latex_structure'] = TRUE; +$cfg['Export']['latex_data'] = TRUE; +$cfg['Export']['latex_columns'] = TRUE; +$cfg['Export']['latex_relation'] = TRUE; +$cfg['Export']['latex_comments'] = TRUE; +$cfg['Export']['latex_mime'] = TRUE; +$cfg['Export']['latex_null'] = '\textit{NULL}'; +$cfg['Export']['latex_caption'] = TRUE; +$cfg['Export']['latex_data_label'] = 'tab:__TABLE__-data'; +$cfg['Export']['latex_structure_label'] = 'tab:__TABLE__-structure'; + +$cfg['Export']['sql_structure'] = TRUE; +$cfg['Export']['sql_data'] = TRUE; +$cfg['Export']['sql_compat'] = 'NONE'; +$cfg['Export']['sql_disable_fk'] = FALSE; +$cfg['Export']['sql_use_transaction'] = FALSE; +$cfg['Export']['sql_drop_database'] = FALSE; +$cfg['Export']['sql_drop_table'] = FALSE; +$cfg['Export']['sql_if_not_exists'] = FALSE; +$cfg['Export']['sql_auto_increment'] = TRUE; +$cfg['Export']['sql_backquotes'] = TRUE; +$cfg['Export']['sql_dates'] = FALSE; +$cfg['Export']['sql_relation'] = FALSE; +$cfg['Export']['sql_columns'] = FALSE; +$cfg['Export']['sql_delayed'] = FALSE; +$cfg['Export']['sql_ignore'] = FALSE; +$cfg['Export']['sql_hex_for_binary'] = TRUE; +$cfg['Export']['sql_type'] = 'insert'; // insert/update/replace +$cfg['Export']['sql_extended'] = FALSE; +$cfg['Export']['sql_comments'] = FALSE; +$cfg['Export']['sql_mime'] = FALSE; +$cfg['Export']['sql_header_comment'] = ''; // \n is replaced by new line + +/** + * Link to the official MySQL documentation. + * Be sure to include no trailing slash on the path. + * See http://dev.mysql.com/doc/ for more information + * about MySQL manuals and their types. + */ +$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/mysql/en'; + +/** + * Type of MySQL documentation: + * old - old style used in phpMyAdmin 2.3.0 and sooner + * searchable - "Searchable, with user comments" + * chapters - "HTML, one page per chapter" + * big - "HTML, all on one page" + * none - do not show documentation links + */ +$cfg['MySQLManualType'] = 'searchable'; + + +/** + * PDF options + */ +$cfg['PDFPageSizes'] = array('A3', 'A4', 'A5', 'letter', 'legal'); +$cfg['PDFDefaultPageSize'] = 'A4'; + + +/** + * Language and charset conversion settings + */ +// Default language to use, if not browser-defined or user-defined +$cfg['DefaultLang'] = 'en-iso-8859-1'; + +// Force: always use this language - must be defined in +// libraries/select_lang.lib.php +// $cfg['Lang'] = 'en-iso-8859-1'; + +// Default charset to use for recoding of MySQL queries, does not take +// any effect when charsets recoding is switched off by +// $cfg['AllowAnywhereRecoding'] or in language file +// (see $cfg['AvailableCharsets'] to possible choices, you can add your own) +$cfg['DefaultCharset'] = 'iso-8859-1'; + +// Allow charset recoding of MySQL queries, must be also enabled in language +// file to make harder using other language files than unicode. +// Default value is FALSE to avoid problems on servers without the iconv +// extension and where dl() is not supported +$cfg['AllowAnywhereRecoding'] = TRUE; + +// You can select here which functions will be used for charset conversion. +// Possible values are: +// auto - automatically use available one (first is tested iconv, then +// recode) +// iconv - use iconv or libiconv functions +// recode - use recode_string function +$cfg['RecodingEngine'] = 'auto'; + +// Specify some parameters for iconv used in charset conversion. See iconv +// documentation for details: +// http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html +$cfg['IconvExtraParams'] = ''; + +// Available charsets for MySQL conversion. currently contains all which could +// be found in lang/* files and few more. +// Charsets will be shown in same order as here listed, so if you frequently +// use some of these move them to the top. +$cfg['AvailableCharsets'] = array( + 'iso-8859-1', + 'iso-8859-2', + 'iso-8859-3', + 'iso-8859-4', + 'iso-8859-5', + 'iso-8859-6', + 'iso-8859-7', + 'iso-8859-8', + 'iso-8859-9', + 'iso-8859-10', + 'iso-8859-11', + 'iso-8859-12', + 'iso-8859-13', + 'iso-8859-14', + 'iso-8859-15', + 'windows-1250', + 'windows-1251', + 'windows-1252', + 'windows-1256', + 'windows-1257', + 'koi8-r', + 'big5', + 'gb2312', + 'utf-8', + 'utf-7', + 'x-user-defined', + 'euc-jp', + 'ks_c_5601-1987', + 'tis-620', + 'SHIFT_JIS' +); + +/** + * Customization & design + * + * The graphical settings are now located in themes/themename/layout.inc.php + */ + +$cfg['LeftPointerEnable'] = TRUE; // enable the left panel pointer + // (used when LeftFrameLight is FALSE) + // see also LeftPointerColor + // in layout.inc.php + +$cfg['BrowsePointerEnable'] = TRUE; // enable the browse pointer + // see also BrowsePointerColor + // in layout.inc.php + +$cfg['BrowseMarkerEnable'] = TRUE; // enable the browse marker + // see also BrowseMarkerColor + // in layout.inc.php + +$cfg['TextareaCols'] = 40; // textarea size (columns) in edit mode + // (this value will be emphasized (*2) for sql + // query textareas and (*1.25) for query window) +$cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode +$cfg['LongtextDoubleTextarea'] = TRUE; // double size of textarea size for longtext fields +$cfg['TextareaAutoSelect'] = TRUE; // autoselect when clicking in the textarea of the querybox +$cfg['CharTextareaCols'] = 40; // textarea size (columns) for CHAR/VARCHAR +$cfg['CharTextareaRows'] = 2; // textarea size (rows) for CHAR/VARCHAR +$cfg['CtrlArrowsMoving'] = TRUE; // Enable Ctrl+Arrows moving between fields when editing? +$cfg['LimitChars'] = 50; // Max field data length in browse mode for all non-numeric fields +$cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse + // (or at the top with vertical browse) +$cfg['ModifyDeleteAtRight'] = FALSE; // show edit/delete links on right side of browse + // (or at the bottom with vertical browse) +$cfg['DefaultDisplay'] = 'horizontal'; // default display direction + // (horizontal|vertical|horizontalflipped) +$cfg['DefaultPropDisplay'] = 'horizontal'; // default display direction for altering/ + // creating columns (tbl_properties) + // (horizontal|vertical) + +$cfg['HeaderFlipType'] = 'css'; // table-header rotation via faking or css? (css|fake) + // NOTE: CSS only works in IE browsers! +$cfg['ShowBrowseComments'] = TRUE; // shows stored relation-comments in 'browse' mode. +$cfg['ShowPropertyComments']= TRUE; // shows stored relation-comments in 'table property' mode. +$cfg['RepeatCells'] = 100; // repeat header names every X cells? (0 = deactivate) + +$cfg['QueryFrame'] = TRUE; // displays a link or icon in the left frame to open the querybox, and activates the querybox when clicking on [Edit] on the results page. +$cfg['QueryFrameJS'] = TRUE; // whether to use JavaScript functions for opening a new window for SQL commands. + // if set to 'false', the target of the querybox is always the right frame. +$cfg['QueryWindowWidth'] = 550; // Width of Query window +$cfg['QueryWindowHeight'] = 310; // Height of Query window +$cfg['QueryHistoryDB'] = FALSE; // Set to TRUE if you want DB-based query history. + // If FALSE, this utilizes JS-routines to display + // query history (lost by window close) +$cfg['QueryWindowDefTab'] = 'sql'; // which tab to display in the querywindow on startup + // (sql|files|history|full) +$cfg['QueryHistoryMax'] = 25; // When using DB-based query history, how many entries + // should be kept? +$cfg['BrowseMIME'] = TRUE; // Use MIME-Types (stored in column comments table) for +$cfg['MaxExactCount'] = 20000; // When approximate count < this, PMA will get exact count for + // table rows. +$cfg['WYSIWYG-PDF'] = TRUE; // Utilize DHTML/JS capabilities to allow WYSIWYG editing of + // the PDF page editor. Requires an IE6/Mozilla based browser. + +$cfg['NaturalOrder'] = TRUE; // Sort table and database in natural order + + +//----------------------------------------------------------------------------- +// custom-setup by mkkeck: 2004-05-04 +// some specials for new icons and scrollings +// FIXME: +// 2004-05-08 rabus: We need to rearrange these variables. + +$cfg['ShowHttpHostTitle'] = TRUE; // show HttpHost in browsers window title (true|false)? +$cfg['SetHttpHostTitle'] = ''; // if ShowHttpHostTitle=true, please set your host (server) + // or an other string, wich should be shown in browsers window title. + // If not set (or empty), the PMA will get your real Host-Adress. + +$cfg['ErrorIconic'] = TRUE; // show some icons for warning, error and information messages (true|false)? +$cfg['MainPageIconic'] = TRUE; // show icons in list on main page and on menu tabs (true|false)? +$cfg['ReplaceHelpImg'] = TRUE; // show help button instead of strDocumentation (true|false)? + +// theme manager +$cfg['ThemePath'] = './themes'; // using themes manager please set up here the path to 'themes' + // else leave empty +$cfg['ThemeManager'] = TRUE; // if you want to use selectable themes and if ThemesPath not empty + // set it to true, else set it to false (default is false); +$cfg['ThemeDefault'] = 'darkblue_orange'; // set up default theme, if ThemePath not empty + // you can set up here an valid path to themes or 'original' for + // the original pma-theme +$cfg['ThemePerServer'] = FALSE; // allow diferent theme for each configured server + +//----------------------------------------------------------------------------- + + +/** + * Default queries + * %d will be replaced by the database name. + * %t will be replaced by the table name. + * %f will be replaced by a list of field names. + * (%t and %f only applies to DefaultQueryTable) + */ +$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1'; +$cfg['DefaultQueryDatabase'] = ''; + +/** + * SQL Query box settings + * These are the links display in all of the SQL Query boxes + */ +$cfg['SQLQuery']['Edit'] = TRUE; // Edit link to change a query +$cfg['SQLQuery']['Explain'] = TRUE; // EXPLAIN on SELECT queries +$cfg['SQLQuery']['ShowAsPHP'] = TRUE; // Wrap a query in PHP +$cfg['SQLQuery']['Validate'] = FALSE; // Validate a query (see $cfg['SQLValidator'] as well) +$cfg['SQLQuery']['Refresh'] = TRUE; // Refresh the results page + + +/** + * Webserver upload/save/import directories + */ +$cfg['UploadDir'] = 'w:\databases'; // Directory for uploaded files that can be executed by + // phpMyAdmin. For example './upload'. Leave empty for + // no upload directory support +$cfg['SaveDir'] = 'w:\databases'; // Directory where phpMyAdmin can save exported data on + // server. For example './save'. Leave empty for no save + // directory support. +$cfg['docSQLDir'] = ''; // Directory for docSQL imports, phpMyAdmin can import + // docSQL files from that directory. For example + // './docSQL'. Leave empty for no docSQL import support. +$cfg['TempDir'] = 'w:\tmp'; // Directory where phpMyAdmin can save temporary files. + // This is needed for MS Excel export, see documentation + // how to enable that. + + +/** + * Misc. settings + */ +$cfg['GD2Available'] = 'auto'; // Is GD >= 2 available? Set to yes/no/auto. 'auto' + // does autodetection, which is a bit expensive for + // php < 4.3.0, but it is the only safe vay how to + // determine GD version. +/** + * SQL Parser Settings + */ +$cfg['SQP']['fmtType'] = 'html'; // Pretty-printing style to use on queries (html, text, none) +$cfg['SQP']['fmtInd'] = '1'; // Amount to indent each level (floats ok) +$cfg['SQP']['fmtIndUnit'] = 'em'; // Units for indenting each level (CSS Types - {em,px,pt}) +// The graphical settings are now located in themes/themename/layout.inc.php + +/** + * If you wish to use the SQL Validator service, you should be + * aware of the following: + * All SQL statements are stored anonymously for statistical purposes. + * Mimer SQL Validator, Copyright 2002 Upright Database Technology. + * All rights reserved. + */ +$cfg['SQLValidator']['use'] = FALSE; // Make the SQL Validator available +$cfg['SQLValidator']['username'] = ''; // If you have a custom username, specify it here (defaults to anonymous) +$cfg['SQLValidator']['password'] = ''; // Password for username + +/** + * Developers ONLY! + * To use the following, please install the DBG extension from http://dd.cron.ru/dbg/ + */ +$cfg['DBG']['enable'] = FALSE; // Make the DBG stuff available +$cfg['DBG']['profile']['enable'] = FALSE; // Produce profiling results of PHP +$cfg['DBG']['profile']['threshold'] = 0.5; // Threshold of long running code to display + // Anything below the threshold is not displayed + + +/** + * MySQL settings + */ +// Column types; +// varchar, tinyint, text and date are listed first, based on estimated popularity +$cfg['ColumnTypes'] = array( + 'VARCHAR', + 'TINYINT', + 'TEXT', + 'DATE', + 'SMALLINT', + 'MEDIUMINT', + 'INT', + 'BIGINT', + 'FLOAT', + 'DOUBLE', + 'DECIMAL', + 'DATETIME', + 'TIMESTAMP', + 'TIME', + 'YEAR', + 'CHAR', + 'TINYBLOB', + 'TINYTEXT', + 'BLOB', + 'MEDIUMBLOB', + 'MEDIUMTEXT', + 'LONGBLOB', + 'LONGTEXT', + 'ENUM', + 'SET', + 'BOOL' +); + +// Attributes +// Note: the "ON UPDATE CURRENT_TIMESTAMP" attribute is added dynamically +// for MySQL >= 4.1.2, in tbl_properties.inc.php + +$cfg['AttributeTypes'] = array( + '', + 'BINARY', + 'UNSIGNED', + 'UNSIGNED ZEROFILL' +); + +// Available functions +if ($cfg['ShowFunctionFields']) { + $cfg['Functions'] = array( + 'ASCII', + 'CHAR', + 'SOUNDEX', + 'LCASE', + 'UCASE', + 'NOW', + 'PASSWORD', + 'OLD_PASSWORD', + 'MD5', + 'SHA1', + 'ENCRYPT', + 'RAND', + 'LAST_INSERT_ID', + 'COUNT', + 'AVG', + 'SUM', + 'CURDATE', + 'CURTIME', + 'FROM_DAYS', + 'FROM_UNIXTIME', + 'PERIOD_ADD', + 'PERIOD_DIFF', + 'TO_DAYS', + 'UNIX_TIMESTAMP', + 'USER', + 'WEEKDAY', + 'CONCAT' + ); + + // Which column types will be mapped to which Group? + $cfg['RestrictColumnTypes'] = array( + 'VARCHAR' => 'FUNC_CHAR', + 'TINYINT' => 'FUNC_NUMBER', + 'TEXT' => 'FUNC_CHAR', + 'DATE' => 'FUNC_DATE', + 'SMALLINT' => 'FUNC_NUMBER', + 'MEDIUMINT' => 'FUNC_NUMBER', + 'INT' => 'FUNC_NUMBER', + 'BIGINT' => 'FUNC_NUMBER', + 'FLOAT' => 'FUNC_NUMBER', + 'DOUBLE' => 'FUNC_NUMBER', + 'DECIMAL' => 'FUNC_NUMBER', + 'DATETIME' => 'FUNC_DATE', + 'TIMESTAMP' => 'FUNC_DATE', + 'TIME' => 'FUNC_DATE', + 'YEAR' => 'FUNC_DATE', + 'CHAR' => 'FUNC_CHAR', + 'TINYBLOB' => 'FUNC_CHAR', + 'TINYTEXT' => 'FUNC_CHAR', + 'BLOB' => 'FUNC_CHAR', + 'MEDIUMBLOB' => 'FUNC_CHAR', + 'MEDIUMTEXT' => 'FUNC_CHAR', + 'LONGBLOB' => 'FUNC_CHAR', + 'LONGTEXT' => 'FUNC_CHAR', + 'ENUM' => '', + 'SET' => '' + ); + + // Map above defined groups to any function + $cfg['RestrictFunctions'] = array( + 'FUNC_CHAR' => array( + 'ASCII', + 'CHAR', + 'SOUNDEX', + 'LCASE', + 'UCASE', + 'PASSWORD', + 'OLD_PASSWORD', + 'MD5', + 'SHA1', + 'ENCRYPT', + 'LAST_INSERT_ID', + 'USER', + 'CONCAT' + ), + + 'FUNC_DATE' => array( + 'NOW', + 'CURDATE', + 'CURTIME', + 'FROM_DAYS', + 'FROM_UNIXTIME', + 'PERIOD_ADD', + 'PERIOD_DIFF', + 'TO_DAYS', + 'UNIX_TIMESTAMP', + 'WEEKDAY' + ), + + 'FUNC_NUMBER' => array( + 'ASCII', + 'CHAR', + 'MD5', + 'SHA1', + 'ENCRYPT', + 'RAND', + 'LAST_INSERT_ID', + 'UNIX_TIMESTAMP', + 'COUNT', + 'AVG', + 'SUM' + ) + ); + + // Default functions for above defined groups + $cfg['DefaultFunctions'] = array( + 'FUNC_CHAR' => '', + 'FUNC_DATE' => '', + 'FUNC_NUMBER' => '', + 'first_timestamp' => 'NOW' + ); + + +} // end if + +// Search operators +$cfg['NumOperators'] = array( + '=', + '>', + '>=', + '<', + '<=', + '!=', + 'LIKE', + 'NOT LIKE' +); + +$cfg['TextOperators'] = array( + 'LIKE', + 'LIKE %...%', + 'NOT LIKE', + '=', + '!=', + 'REGEXP', + 'NOT REGEXP' +); + +$cfg['EnumOperators'] = array( + '=', + '!=' +); + +$cfg['SetOperators'] = array( + 'IN', + 'NOT IN' +); + +$cfg['NullOperators'] = array( + 'IS NULL', + 'IS NOT NULL' +); + +$cfg['UnaryOperators'] = array( + 'IS NULL' => 1, + 'IS NOT NULL' => 1 +); + +/** + * Unset magic_quotes_runtime - do not change! + */ +set_magic_quotes_runtime(0); + +/** + * File Revision - do not change either! + */ +$cfg['FileRevision'] = '$Revision: 2.65 $'; +?> \ No newline at end of file diff --git a/Source/udrive/home/admin/www/phpMyAdmin/css/phpmyadmin.css.php b/Source/udrive/home/admin/www/phpMyAdmin/css/phpmyadmin.css.php new file mode 100644 index 0000000..5a82b91 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/css/phpmyadmin.css.php @@ -0,0 +1,789 @@ + +html { + font-size: get('fontsize'); ?>; +} + +input, select, textarea { + font-size: 1em; +} + +/* @deprecated */ +.nowrap { + white-space: nowrap; +} +div.nowrap { + margin: 0; + padding: 0; +} + +checkVersion('2.7.0')) { + ?> + +form { + margin: 0; + padding: 0; + display: inline; +} + +a img { + border: 0; +} + + +/* server privileges */ +#tableuserrights td, +#tablespecificuserrights td, +#tabledatabases td { + vertical-align: middle; +} +/* END server privileges */ + + +/* leave some space between icons and text */ +.icon { + vertical-align: middle; + margin-right: 0.3em; + margin-left: 0.3em; +} +/* no extra space in table cells */ +td .icon { + margin: 0; +} + +.selectallarrow { + margin-: 0.3em; + margin-: 0.6em; +} + +div#tablestatistics { + border-bottom: 0.1em solid #669999; + margin-bottom: 0.5em; + padding-bottom: 0.5em; +} + +div#tablestatistics table { + float: ; + margin-bottom: 0.5em; + margin-right: 0.5em; +} + +div#tablestatistics table caption { + margin-right: 0.5em; +} + + +/* left frame content */ +body#body_leftFrame { + background-color: ; +} + +div#pmalogo, +div#leftframelinks, +div#databaseList { + text-align: center; + border-bottom: 0.1em solid #669999; + margin-bottom: 0.5em; + padding-bottom: 0.5em; +} + +div#leftframelinks .icon { + vertical-align: middle; + padding: 0; + margin: 0; +} + +div#leftframelinks a:hover { + background-color: #669999; +} + +/* leftdatabaselist */ +div#left_tableList ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0; + background-color: ; +} + +div#left_tableList li { + margin: 0; + padding: 0; + white-space: nowrap; +} + + +div#left_tableList li:hover { + background-color: ; +} + + +div#left_tableList img { + padding: 0; + vertical-align: middle; +} + +div#left_tableList ul ul { + margin-left: 0em; + padding-left: 0.1em; + border-left: 0.1em solid #669999; + padding-bottom: 0.1em; + border-bottom: 0.1em solid #669999; +} +/* END left frame content */ + + +/* querywindow */ +body#bodyquerywindow { + margin: 0; + padding: 0; +} + +div#querywindowcontainer { + margin: 0; + padding: 0; + width: 100%; +} + +div#querywindowcontainer fieldset { + margin-top: 0; +} +/* END querywindow */ + + +/* querybox */ + +/* Gecko bug */ +div[class=formelementrow], +div[id=queryfieldscontainer] { + border: 1px solid transparent; +} + +div#sqlquerycontainer { + float: left; + width: 69%; + /* height: 15em; */ +} + +div#tablefieldscontainer { + float: right; + width: 29%; + /* height: 15em; */ +} + +div#tablefieldscontainer select { + width: 100%; + /* height: 12em; */ +} + +textarea#sqlquery { + width: 100%; + /* height: 100%; */ +} + +div#queryboxcontainer div#bookmarkoptions { + margin-top: 0.5em; +} +/* end querybox */ + + +fieldset .formelement { + line-height: 2.4em; + float: left; + margin-right: 0.5em; + /* IE */ + white-space: nowrap; +} +/* revert for Gecko */ +fieldset div[class=formelement] { + white-space: normal; +} + +/* IE */ +fieldset .formelement input, +fieldset .formelement select { + margin-top: 0.5em; + margin-bottom: 0.5em; +} +/* revert for Gecko */ +fieldset div[class=formelement] input, +fieldset div[class=formelement] select { + margin-top: auto; + margin-bottom: auto; + height: auto; +} + +/* Calendar */ +table.calendar { width: 100%; } +table.calendar td { text-align: center; } +table.calendar td a { display: block; } + +table.calendar td a:hover { + background-color: ; +} + +table.calendar th { + background-color: ; +} + +table.calendar td.selected { + background-color: ; +} + +img.calendar { border: none; } +form.clock { text-align: center; } +/* end Calendar */ + + +/* Options, eg. on import page */ +fieldset { + background-color: ; +} +fieldset legend { + background-color: transparent; +} + +/* buttons in some browsers (eg. Konqueror) are block elements, this breaks design */ +button { display: inline; } + +/* Textarea */ +textarea { overflow: auto; } + + +/* topmenu */ + +/* Gecko 1.7 bug (FF 1.0) */ +#topmenucontainer { + border: 1px solid ; +} + +ul#topmenu { + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} + +ul#topmenu li { + float: left; + margin: 0; + padding: 0; + vertical-align: middle; +} + +#topmenu img { + vertical-align: middle; + margin-right: 0.1em; +} + +/* default tab styles */ +.tab, .tabcaution, .tabactive { + display: block; + margin: 0.2em 0.2em 0 0.2em; + padding: 0.2em 0.2em 0 0.2em; + white-space: nowrap; +} + +/* disabled tabs */ +span.tab { + color: #666666; +} + +/* disabled drop/empty tabs */ +span.tabcaution { + color: #ff6666; +} + +/* enabled drop/empty tabs */ +a.tabcaution { + color: #FF0000; +} +a.tabcaution:hover { + color: #FFFFFF; + background-color: #FF0000; +} + + +/* active tab */ +a.tabactive { + color: black; +} + +#topmenu { + margin-top: 0.5em; + padding: 0.1em 0.3em 0.1em 0.3em; +} + +ul#topmenu li { + border-bottom: 1pt solid black; +} + +/* default tab styles */ +.tab, .tabcaution, .tabactive { + background-color: ; + border: 1pt solid ; + border-bottom: 0; + border-top-left-radius: 0.4em; + border-top-right-radius: 0.4em; +} + +/* enabled hover/active tabs */ +a.tab:hover, a.tabcaution:hover, .tabactive, .tabactive:hover { + margin: 0; + padding: 0.2em 0.4em 0.2em 0.4em; + text-decoration: none; +} + +a.tab:hover, .tabactive { + background-color: ; +} + +/* disabled drop/empty tabs */ +span.tab, span.tabcaution { + cursor: url(/original/img/error.ico), url(..//original/img/error.ico), default; +} + +/* end topmenu */ + + + +/* data tables */ +table caption, +table th, +table td { + padding: 0.1em 0.5em 0.1em 0.5em; + margin: 0; + margin: 0.1em; + vertical-align: top; +} + +/* odd table rows 1,3,5,7,... */ +table tr.odd th, +table tr.odd { + background-color: ; +} + +/* even table rows 2,4,6,8,... */ +table tr.even th, +table tr.even { + background-color: ; +} + +/* marked table rows */ +table tr.marked th, +table tr.marked { + background-color: ; +} + +/* hovered table rows */ +table tr.odd:hover, +table tr.even:hover, +table tr.odd:hover th, +table tr.even:hover th, +table tr.hover th, +table tr.hover { + background-color: ; +} + +table .value { + text-align: right; + white-space: nowrap; +} +/* IE doesnt handles 'pre' right */ +table [class=value] { + white-space: pre; +} + +.value { + font-family: "Courier New", Courier, monospace; +} +.value .attention { + color: red; + font-weight: bold; +} +.value .allfine { + color: green; +} + + +/* serverstatus */ +div#serverstatus table caption a.top { + float: right; +} + +div#serverstatus div#serverstatusqueriesdetails table, +div#serverstatus table#serverstatustraffic, +div#serverstatus table#serverstatusconnections { + float: left; +} + +#serverstatussection, +.clearfloat { + clear: both; +} +div#serverstatussection table { + width: 100%; + margin-bottom: 1em; +} +div#serverstatussection table .name { + width: 18em; +} +div#serverstatussection table .value { + width: 6em; +} + +div#serverstatus table tbody td.descr a, +div#serverstatus table .tblFooters a { + white-space: nowrap; +} +div#serverstatus div#statuslinks a:before, +div#serverstatus div#sectionlinks a:before, +div#serverstatus table tbody td.descr a:before, +div#serverstatus table .tblFooters a:before { + content: '['; +} +div#serverstatus div#statuslinks a:after, +div#serverstatus div#sectionlinks a:after, +div#serverstatus table tbody td.descr a:after, +div#serverstatus table .tblFooters a:after { + content: ']'; +} +/* end serverstatus */ + +img.lightbulb { + cursor: pointer; +} + + checkVersion('2.7.1')) { + ?> + +/********************/ +/* NEW in PMA 2.7.1 */ +/********************/ + +body.loginform h1, +body.loginform a.logo { + display: block; + text-align: center; +} + +form.login label { + float: left; + width: 10em; + font-weight: bolder; +} + + +/* main page */ +#maincontainer { + background-image: url(..//original/img/logo_right.png); + background-position: bottom; + background-repeat: no-repeat; + border-bottom: 1px solid silver; +} + +#mysqlmaininformation, +#pmamaininformation { + float: ; + width: 49%; +} + +#maincontainer ul { + list-style-image: url(..//original/img/item_.png); + vertical-align: middle; +} + +#maincontainer li { + margin-bottom: 0.3em; +} +/* END main page */ + + + +/* iconic view for ul items */ +li#li_create_database { + list-style-image: url(..//original/img/b_newdb.png); +} + +li#li_select_lang { + list-style-image: url(..//original/img/s_lang.png); +} + +li#li_select_mysql_collation, +li#li_select_mysql_charset { + list-style-image: url(..//original/img/s_asci.png); +} + +li#li_select_theme{ + list-style-image: url(..//original/img/s_theme.png); +} + +li#li_server_info{ + list-style-image: url(..//original/img/s_host.png); +} + +li#li_user_info{ + /* list-style-image: url(..//original/img/s_rights.png); */ +} + +li#li_mysql_status{ + list-style-image: url(..//original/img/s_status.png); +} + +li#li_mysql_variables{ + list-style-image: url(..//original/img/s_vars.png); +} + +li#li_mysql_processes{ + list-style-image: url(..//original/img/s_process.png); +} + +li#li_mysql_collations{ + list-style-image: url(..//original/img/s_asci.png); +} + +li#li_mysql_engines{ + list-style-image: url(..//original/img/b_engine.png); +} + +li#li_mysql_binlogs { + list-style-image: url(..//original/img/s_tbl.png); +} + +li#li_mysql_databases { + list-style-image: url(..//original/img/s_db.png); +} + +li#li_export { + list-style-image: url(..//original/img/b_export.png); +} + +li#li_import { + list-style-image: url(..//original/img/b_import.png); +} + +li#li_change_password { + list-style-image: url(..//original/img/s_passwd.png); +} + +li#li_log_out { + list-style-image: url(..//original/img/s_loggoff.png); +} + +li#li_pma_docs { + list-style-image: url(..//original/img/b_docs.png); +} + +li#li_phpinfo { + list-style-image: url(..//original/img/php_sym.png); +} + +li#li_pma_homepage { + list-style-image: url(..//original/img/b_home.png); +} + +li#li_mysql_privilegs{ + list-style-image: url(..//original/img/s_rights.png); +} + +li#li_switch_dbstats { + list-style-image: url(..//original/img/b_dbstatistics.png); +} + +li#li_flush_privileges { + list-style-image: url(..//original/img/s_reload.png); +} +/* END iconic view for ul items */ + + + +#body_browse_foreigners { + background-color: ; + margin: 5px 5px 0 5px; +} + +#bodyquerywindow { + background-color: ; +} + +#bodythemes { + width: 500px; + margin: auto; + text-align: center; +} + +#bodythemes img { + border: 0.1em solid black; +} + +#bodythemes a:hover img { + border: 0.1em solid red; +} + +#fieldset_select_fields { + float: left; +} + +#selflink { + clear: both; + display: block; + margin-top: 1em; + margin-bottom: 1em; + width: 100%; + border-top: 0.1em solid silver; + text-align: ; +} + +#table_innodb_bufferpool_usage, +#table_innodb_bufferpool_activity { + float: ; +} + +#div_mysql_charset_collations table { + float: ; +} + +#div_table_order { + min-width: 48%; + float: ; +} + +#div_table_rename { + min-width: 48%; + float: ; +} + +#div_table_copy { + min-width: 48%; + float: ; +} + +#div_table_options { + clear: both; + min-width: 48%; + float: ; +} + +#qbe_div_table_list { + float: ; +} + +#qbe_div_sql_query { + float: ; +} + checkVersion('2.9')) { + ?> + +/********************/ +/* NEW in PMA 2.9 */ +/********************/ + + +/* marked items */ +.marked a, +.marked { + background: ; + color: ; +} + + +/* odd items 1,3,5,7,... */ +.odd { + background: ; +} + +/* even items 2,4,6,8,... */ +.even { + background: ; +} + +/* hovered items */ +.odd:hover, +.even:hover, +.hover { + background: ; + color: ; +} + +/** + * marks table rows/cells if the db field is in a where condition + */ +tr.condition th, +tr.condition td, +td.condition, +th.condition { + border: 1px solid ; +} + +label.desc { + width: 30em; + float: ; +} + +body.loginform { + text-align: center; +} + +body.loginform div.container { + text-align: ; + width: 30em; + margin: 0 auto; +} + +#body_leftFrame #list_server { + list-style-image: url(..//original/img/s_host.png); + list-style-position: inside; + list-style-type: none; + margin: 0; + padding: 0; +} + +#body_leftFrame #list_server li { + margin: 0; + padding: 0; + font-size: 80%; +} + printCss($_REQUEST['js_frame']); +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/css/print.css b/Source/udrive/home/admin/www/phpMyAdmin/css/print.css new file mode 100644 index 0000000..54543dc --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/css/print.css @@ -0,0 +1,69 @@ +.print_ignore { + display: none; +} + +body, table, th, td { + color: #000000; + background-color: #ffffff; + font-size: 8pt; +} + +img { + border: 0; +} + +table, th, td { + border-width: 0.1em; + border-color: #000000; + border-style: solid; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +th, td { + padding: 0.2em; +} + +th { + font-weight: bold; + background-color: #e5e5e5; +} + +@media print { + .print_ignore { + display: none; + } + + body, table, th, td { + color: #000000; + background-color: #ffffff; + font-size: 8pt; + } + + img { + border: 0; + } + + table, th, td { + border-width: 1px; + border-color: #000000; + border-style: solid; + } + + table { + border-collapse: collapse; + border-spacing: 0; + } + + th, td { + padding: 0.2em; + } + + th { + font-weight: bold; + background-color: #e5e5e5; + } +} \ No newline at end of file diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_create.php b/Source/udrive/home/admin/www/phpMyAdmin/db_create.php new file mode 100644 index 0000000..ef6a2a0 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_create.php @@ -0,0 +1,44 @@ += 40101) { + list($db_charset) = explode('_', $db_collation); + if (in_array($db_charset, $mysql_charsets) && in_array($db_collation, $mysql_collations[$db_charset])) { + $sql_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation); + } + unset($db_charset, $db_collation); +} +$sql_query .= ';'; + +$result = PMA_DBI_query($sql_query); + + +/** + * Displays the result and calls default page + */ +$message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated; +require_once('./' . $cfg['DefaultTabDatabase']); + +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_datadict.php b/Source/udrive/home/admin/www/phpMyAdmin/db_datadict.php new file mode 100644 index 0000000..1d8524d --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_datadict.php @@ -0,0 +1,323 @@ + +

+

+ = 40100) { + $comments = PMA_getComments($db, $table); + } + + if ($count != 0) { + echo '
' . "\n"; + } else { + echo '
' . "\n"; + } + + echo '

' . $table . '

' . "\n"; + + /** + * Gets table informations + */ + // The 'show table' statement works correct since 3.23.03 + $showtable = PMA_DBI_get_tables_full( $db, $table ); + $num_rows = (isset($showtable[$table]['TABLE_ROWS']) ? $showtable[$table]['TABLE_ROWS'] : 0); + $show_comment = (isset($showtable[$table]['TABLE_COMMENT']) ? $showtable[$table]['TABLE_COMMENT'] : ''); + unset( $showtable ); + + + /** + * Gets table keys and retains them + */ + + PMA_DBI_select_db($db); + $result = PMA_DBI_query('SHOW KEYS FROM ' . PMA_backquote($table) . ';'); + $primary = ''; + $indexes = array(); + $lastIndex = ''; + $indexes_info = array(); + $indexes_data = array(); + $pk_array = array(); // will be use to emphasis prim. keys in the table + // view + while ($row = PMA_DBI_fetch_assoc($result)) { + // Backups the list of primary keys + if ($row['Key_name'] == 'PRIMARY') { + $primary .= $row['Column_name'] . ', '; + $pk_array[$row['Column_name']] = 1; + } + // Retains keys informations + if ($row['Key_name'] != $lastIndex ){ + $indexes[] = $row['Key_name']; + $lastIndex = $row['Key_name']; + } + $indexes_info[$row['Key_name']]['Sequences'][] = $row['Seq_in_index']; + $indexes_info[$row['Key_name']]['Non_unique'] = $row['Non_unique']; + if (isset($row['Cardinality'])) { + $indexes_info[$row['Key_name']]['Cardinality'] = $row['Cardinality']; + } + // I don't know what does following column mean.... + // $indexes_info[$row['Key_name']]['Packed'] = $row['Packed']; + + $indexes_info[$row['Key_name']]['Comment'] = $row['Comment']; + + $indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name'] = $row['Column_name']; + if (isset($row['Sub_part'])) { + $indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part']; + } + + } // end while + if ($result) { + PMA_DBI_free_result($result); + } + + + /** + * Gets fields properties + */ + $result = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table) . ';', null, PMA_DBI_QUERY_STORE); + $fields_cnt = PMA_DBI_num_rows($result); + + +// We need this to correctly learn if a TIMESTAMP is NOT NULL, since +// SHOW FULL FIELDS or INFORMATION_SCHEMA incorrectly says NULL +// and SHOW CREATE TABLE says NOT NULL (tested +// in MySQL 4.0.25 and 5.0.21, http://bugs.mysql.com/20910). + + $show_create_table = PMA_DBI_fetch_value( + 'SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), + 0, 1); + $analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table)); + + // Check if we can use Relations (Mike Beck) + if (!empty($cfgRelation['relation'])) { + // Find which tables are related with the current one and write it in + // an array + $res_rel = PMA_getForeigners($db, $table); + + if (count($res_rel) > 0) { + $have_rel = TRUE; + } else { + $have_rel = FALSE; + } + } else { + $have_rel = FALSE; + } // end if + + + /** + * Displays the comments of the table if MySQL >= 3.23 + */ + if (!empty($show_comment)) { + echo $strTableComments . ': ' . $show_comment . '

'; + } + + /** + * Displays the table structure + */ + ?> + + + + +*/ ?> + + +*/ ?> + ' . $strLinksTo . '' . "\n"; + } + if ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100) { + echo ' ' . "\n"; + } + if ($cfgRelation['mimework']) { + echo ' ' . "\n"; + } + ?> + + NULL'; + } + } else { + $row['Default'] = htmlspecialchars($row['Default']); + } + $field_name = htmlspecialchars($row['Field']); + + // here, we have a TIMESTAMP that SHOW FULL FIELDS reports as having the + // NULL attribute, but SHOW CREATE TABLE says the contrary. Believe + // the latter. + /** + * @todo merge this logic with the one in tbl_structure.php + * or move it in a function similar to PMA_DBI_get_columns_full() + * but based on SHOW CREATE TABLE because information_schema + * cannot be trusted in this case (MySQL bug) + */ + if (!empty($analyzed_sql[0]['create_table_fields'][$field_name]['type']) && $analyzed_sql[0]['create_table_fields'][$field_name]['type'] == 'TIMESTAMP' && $analyzed_sql[0]['create_table_fields'][$field_name]['timestamp_not_null']) { + $row['Null'] = ''; + } + ?> + + + xml:lang="en" dir="ltr"> +>*/ ?> + + +>*/ ?> + '; + if (isset($res_rel[$field_name])) { + echo htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' -> ' . $res_rel[$field_name]['foreign_field']); + } + echo '' . "\n"; + } + if ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100) { + echo ' ' . "\n"; + } + if ($cfgRelation['mimework']) { + $mime_map = PMA_getMIME($db, $table, true); + + echo ' ' . "\n"; + } + ?> + + +
' . $strComments . 'MIME
+ ' . $field_name . ''; + } else { + echo $field_name; + } + ?> + '; + if (isset($comments[$field_name])) { + echo htmlspecialchars($comments[$field_name]); + } + echo ''; + if (isset($mime_map[$field_name])) { + echo htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])); + } + echo '
+
+ + +
'; + +require_once('./libraries/footer.inc.php'); +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_export.php b/Source/udrive/home/admin/www/phpMyAdmin/db_export.php new file mode 100644 index 0000000..756deb9 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_export.php @@ -0,0 +1,74 @@ +
'; + +$checkall_url = 'db_export.php?' + . PMA_generate_common_url( $db ) + . '&goto=db_export.php'; + +$multi_values .= '
+ ' . $strSelectAll . ' + / + ' . $strUnselectAll . ''; + +$export_type = 'database'; +require_once('./libraries/display_export.lib.php'); + +/** + * Displays the footer + */ +require_once('./libraries/footer.inc.php'); +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_import.php b/Source/udrive/home/admin/www/phpMyAdmin/db_import.php new file mode 100644 index 0000000..a427dd4 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_import.php @@ -0,0 +1,21 @@ + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_operations.php b/Source/udrive/home/admin/www/phpMyAdmin/db_operations.php new file mode 100644 index 0000000..ae51c65 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_operations.php @@ -0,0 +1,478 @@ +build(); + } + + if (isset($GLOBALS['add_constraints'])) { + $GLOBALS['sql_constraints_query_full_db'] = ''; + } + + $tables_full = PMA_DBI_get_tables_full($db); + $views = array(); + foreach ($tables_full as $table => $tmp) { + // to be able to rename a db containing views, we + // first collect in $views all the views we find and we + // will handle them after the tables + /** + * @todo support a view of a view + */ + if (PMA_Table::isView($db, $table)) { + $views[] = $table; + continue; + } + + $back = $sql_query; + $sql_query = ''; + + // value of $what for this table only + $this_what = $what; + + if (!isset($tables_full[$table]['Engine'])) { + $tables_full[$table]['Engine'] = $tables_full[$table]['Type']; + } + // do not copy the data from a Merge table + // note: on the calling FORM, 'data' means 'structure and data' + if ($tables_full[$table]['Engine'] == 'MRG_MyISAM') { + if ($this_what == 'data') { + $this_what = 'structure'; + } + if ($this_what == 'dataonly') { + $this_what = 'nocopy'; + } + } + + if ($this_what != 'nocopy') { + PMA_Table::moveCopy($db, $table, $newname, $table, + isset($this_what) ? $this_what : 'data', $move, 'db_copy'); + if (isset($GLOBALS['add_constraints'])) { + $GLOBALS['sql_constraints_query_full_db'] .= $GLOBALS['sql_constraints_query']; + unset($GLOBALS['sql_constraints_query']); + } + } + + $sql_query = $back . $sql_query; + } // end (foreach) + unset($table); + + // handle the views + foreach ($views as $view) { + PMA_Table::moveCopy($db, $view, $newname, $view, + 'structure', $move, 'db_copy'); + } + unset($view, $views); + + // now that all tables exist, create all the accumulated constraints + if (isset($GLOBALS['add_constraints'])) { + /** + * @todo this works with mysqli but not with mysql, because + * mysql extension does not accept more than one statement; maybe + * interface with the sql import plugin that handles statement delimiter + */ + PMA_DBI_query($GLOBALS['sql_constraints_query_full_db']); + + // and prepare to display them + $GLOBALS['sql_query'] .= "\n" . $GLOBALS['sql_constraints_query_full_db']; + unset($GLOBALS['sql_constraints_query_full_db']); + } + + // Duplicate the bookmarks for this db (done once for each db) + if ($db != $newname) { + $get_fields = array('user', 'label', 'query'); + $where_fields = array('dbase' => $db); + $new_fields = array('dbase' => $newname); + PMA_Table::duplicateInfo('bookmarkwork', 'bookmark', $get_fields, + $where_fields, $new_fields); + } + + if ($move) { + // cleanup pmadb stuff for this db + require_once './libraries/relation_cleanup.lib.php'; + PMA_relationsCleanupDatabase($db); + + $local_query = 'DROP DATABASE ' . PMA_backquote($db) . ';'; + $sql_query .= "\n" . $local_query; + PMA_DBI_query($local_query); + $message = sprintf($strRenameDatabaseOK, htmlspecialchars($db), + htmlspecialchars($newname)); + } else { + $message = sprintf($strCopyDatabaseOK, htmlspecialchars($db), + htmlspecialchars($newname)); + } + $reload = true; + + /* Change database to be used */ + if ($move) { + $db = $newname; + } else { + if (isset($switch_to_new) && $switch_to_new == 'true') { + PMA_setCookie('pma_switch_to_new', 'true'); + $db = $newname; + } else { + PMA_setCookie('pma_switch_to_new', ''); + } + } + } +} +/** + * Settings for relations stuff + */ + +require_once './libraries/relation.lib.php'; +$cfgRelation = PMA_getRelationsParam(); + +/** + * Check if comments were updated + * (must be done before displaying the menu tabs) + */ +if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') { + PMA_SetComment($db, '', '(db_comment)', $comment); +} + +/** + * Prepares the tables list if the user where not redirected to this script + * because there is no table in the database ($is_info is true) + */ +if (empty($is_info)) { + require './libraries/db_common.inc.php'; + $url_query .= '&goto=db_operations.php'; + + // Gets the database structure + $sub_part = '_structure'; + require './libraries/db_info.inc.php'; + echo "\n"; +} + +if (PMA_MYSQL_INT_VERSION >= 40101) { + $db_collation = PMA_getDbCollation($db); +} +if (PMA_MYSQL_INT_VERSION < 50002 + || (PMA_MYSQL_INT_VERSION >= 50002 && $db != 'information_schema')) { + $is_information_schema = false; +} else { + $is_information_schema = true; +} + +if (!$is_information_schema) { + + require './libraries/display_create_table.lib.php'; + + if ($cfgRelation['commwork']) { + /** + * database comment + */ + ?> +
+ + +
+ + '; + } + echo $strDBComment; + $comment = PMA_getComments($db); + ?> + + + +
+
+ +
+ + + +
+ + '; + } + echo $strDBRename . ':'; + ?> + + + +
+
+ + +
+ ' . "\n"; + } + echo '' . "\n"; + echo PMA_generate_common_hidden_inputs($db); + ?> +
+ + '; + } + echo $strDBCopy . ':'; + if (PMA_MYSQL_INT_VERSION >= 50000) { + $drop_clause = 'DROP TABLE / DROP VIEW'; + } else { + $drop_clause = 'DROP TABLE'; + } + ?> + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + + style="vertical-align: middle" /> + +
+
+ +
+
+ + = 40101) { + // MySQL supports setting default charsets / collations for databases since + // version 4.1.1. + echo '
' . "\n" + . PMA_generate_common_hidden_inputs($db, isset($table) ? $table : '') + . '
' . "\n" + . ' '; + if ($cfg['PropertiesIconic']) { + echo ''; + } + echo ' ' . "\n" + . ' ' . "\n" + . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, + 'db_collation', 'select_db_collation', $db_collation, false, 3) + . ' ' . "\n" + . '
' . "\n" + . '
' . "\n"; + } + + if ($num_tables > 0 + && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) { + /* Show error if user has configured something, notice elsewhere */ + if (!empty($cfg['Servers'][$server]['pmadb'])) { + echo '

' . $strError . '

'; + } else { + echo '
'; + } + printf($strRelationNotWorking, '', ''); + echo '
'; + } // end if +} // end if (!$is_information_schema) + + +// not sure about leaving the PDF dialog for information_schema +if ($num_tables > 0 && isset($table)) { + $takeaway = $url_query . '&table=' . urlencode($table); +} else { + $takeaway = ''; +} + +if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?> + + + 0) { ?> + +
+
+ + '; + } + echo $strDisplayPDF; + ?>: + + +
+ + +
+ +
+ +
+ +
+ +
+ + +
+ + + +
+
+ +
+
+ +
    +
  • + '; + if ($cfg['PropertiesIconic']) { + echo ''; + } + echo $strEditPDFPages . ''; + ?> +
  • +
+ diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_printview.php b/Source/udrive/home/admin/www/phpMyAdmin/db_printview.php new file mode 100644 index 0000000..b47ba9a --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_printview.php @@ -0,0 +1,263 @@ + 0) { + while ($tmp = PMA_DBI_fetch_row($result)) { + // if in use memorize tablename + if (preg_match('@in_use=[1-9]+@i', $tmp[0])) { + $sot_cache[$tmp[0]] = true; + } + } + PMA_DBI_free_result($result); + + if (isset($sot_cache)) { + $result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE); + if ($result != false && PMA_DBI_num_rows($result) > 0) { + while ($tmp = PMA_DBI_fetch_row($result)) { + if (!isset($sot_cache[$tmp[0]])) { + $sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\';'); + $sts_tmp = PMA_DBI_fetch_assoc($sts_result); + $tables[] = $sts_tmp; + } else { // table in use + $tables[] = array('Name' => $tmp[0]); + } + } + PMA_DBI_free_result($result); + $sot_ready = true; + } + } + unset($tmp, $result); + } +} + +if (! isset($sot_ready)) { + $result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ';'); + if (PMA_DBI_num_rows($result) > 0) { + while ($sts_tmp = PMA_DBI_fetch_assoc($result)) { + $tables[] = $sts_tmp; + } + PMA_DBI_free_result($result); + unset($res); + } +} + */ + +/** + * If there is at least one table, displays the printer friendly view, else + * an error message + */ +$tables = PMA_DBI_get_tables_full($db); +$num_tables = count($tables); + +echo '
'; + +// 1. No table +if ($num_tables == 0) { + echo $strNoTablesFound; +} +// 2. Shows table informations on mysql >= 3.23.03 - staybyte - 11 June 2001 +else { + ?> + + + + + + + ' . $strSize . ''; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + ' . number_format($sts_data['TABLE_ROWS'], 0, $number_decimal_separator, $number_thousands_separator) . '' . "\n"; + } else { + echo number_format($sts_data['TABLE_ROWS'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; + } + ?> + + + + + + + + '; + } else { + $needs_break = ''; + } + + if (! empty($sts_data['Create_time']) + || ! empty($sts_data['Update_time']) + || ! empty($sts_data['Check_time'])) { + echo $needs_break; + ?> + + + + + + + + + + + + + + + + + +
+ +
+ + + + + -- + + +  
+ + + +

+ + + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_qbe.php b/Source/udrive/home/admin/www/phpMyAdmin/db_qbe.php new file mode 100644 index 0000000..3aff6f1 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_qbe.php @@ -0,0 +1,1031 @@ + execute it, else display the headers + */ +if (isset($_REQUEST['submit_sql']) + && preg_match('@^SELECT@i', $_REQUEST['encoded_sql_query'])) { + $goto = 'db_sql.php'; + $zero_rows = htmlspecialchars($GLOBALS['strSuccess']); + $sql_query = urldecode($_REQUEST['encoded_sql_query']); + require './sql.php'; + exit; +} else { + $sub_part = '_qbe'; + require './libraries/db_common.inc.php'; + $url_query .= '&goto=db_qbe.php'; + $url_params['goto'] = 'db_qbe.php'; + require './libraries/db_info.inc.php'; +} + +if (isset($_REQUEST['submit_sql']) + && ! preg_match('@^SELECT@i', $_REQUEST['encoded_sql_query'])) { + echo '
' . $GLOBALS['strHaveToShow'] . '
'; +} + + +/** + * Initialize some variables + */ +$col_cnt = isset($_REQUEST['col_cnt']) ? (int) $_REQUEST['col_cnt'] : 3; +$add_col = isset($_REQUEST['add_col']) ? (int) $_REQUEST['add_col'] : 0; +$add_row = isset($_REQUEST['add_row']) ? (int) $_REQUEST['add_row'] : 0; + +$rows = isset($_REQUEST['rows']) ? (int) $_REQUEST['rows'] : 0; +$ins_col = isset($_REQUEST['ins_col']) ? $_REQUEST['ins_col'] : array(); +$del_col = isset($_REQUEST['del_col']) ? $_REQUEST['del_col'] : array(); + +$prev_criteria = isset($_REQUEST['prev_criteria']) + ? $_REQUEST['prev_criteria'] + : array(); +$criteria = isset($_REQUEST['criteria']) + ? $_REQUEST['criteria'] + : array_fill(0, $col_cnt, ''); + +$ins_row = isset($_REQUEST['ins_row']) + ? $_REQUEST['ins_row'] + : array_fill(0, $col_cnt, ''); +$del_row = isset($_REQUEST['del_row']) + ? $_REQUEST['del_row'] + : array_fill(0, $col_cnt, ''); +$and_or_row = isset($_REQUEST['and_or_row']) + ? $_REQUEST['and_or_row'] + : array_fill(0, $col_cnt, ''); +$and_or_col = isset($_REQUEST['and_or_col']) + ? $_REQUEST['and_or_col'] + : array_fill(0, $col_cnt, ''); + +// minimum width +$form_column_width = 12; +$col = max($col_cnt + $add_col, 0); +$row = max($rows + $add_row, 0); + + +// The tables list sent by a previously submitted form +if (!empty($TableList)) { + $cnt_table_list = count($TableList); + for ($x = 0; $x < $cnt_table_list; $x++) { + $tbl_names[urldecode($TableList[$x])] = ' selected="selected"'; + } +} // end if + + +// this was a work in progress, deactivated for now +//$columns = PMA_DBI_get_columns_full($GLOBALS['db']); +//$tables = PMA_DBI_get_columns_full($GLOBALS['db']); + + +/** + * Prepares the form + */ +$tbl_result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE); +$tbl_result_cnt = PMA_DBI_num_rows($tbl_result); +$i = 0; +$k = 0; + +// The tables list gets from MySQL +while ($i < $tbl_result_cnt) { + list($tbl) = PMA_DBI_fetch_row($tbl_result); + $fld_results = PMA_DBI_get_fields($db, $tbl); + $fld_results_cnt = ($fld_results) ? count($fld_results) : 0; + $j = 0; + + if (empty($tbl_names[$tbl]) && !empty($TableList)) { + $tbl_names[$tbl] = ''; + } else { + $tbl_names[$tbl] = ' selected="selected"'; + } // end if + + // The fields list per selected tables + if ($tbl_names[$tbl] == ' selected="selected"') { + $fld[$k++] = PMA_backquote($tbl) . '.*'; + while ($j < $fld_results_cnt) { + $fld[$k] = PMA_convert_display_charset($fld_results[$j]['Field']); + $fld[$k] = PMA_backquote($tbl) . '.' . PMA_backquote($fld[$k]); + + // increase the width if necessary + if (strlen($fld[$k]) > $form_column_width) { + $form_column_width = strlen($fld[$k]); + } //end if + + $k++; + $j++; + } // end while + } // end if + + $i++; +} // end if +PMA_DBI_free_result($tbl_result); + +// largest width found +$realwidth = $form_column_width . 'ex'; + + +/** + * Displays the Query by example form + */ + +function showColumnSelectCell($columns, $column_number, $selected = '') +{ + ?> + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
: + + + +
: + + + /> +
: + + + + +
+ + + + + + + + + + + + +
+ : + + + : + + /> +   +
+ : + + + : + + /> +   +
+
+ + + +
+ + + + + + + + + + + + +
+ : + + + : + + /> +
+ : + + + : + + /> +
+
+ + + +
: + : + /> +   : + /> +
+ + +    + +
+ : + /> +   : + /> +
+ + +    + +
+ + + +
+ + + + + + + + + +
+ : + +  : + +  
+
+ + + + + + +
+
+ + $val) { + $strTableListOptions .= ' '; + $strTableListOptions .= '' . "\n"; + $numTableListOptions++; +} +?> + +
+
+ +
+
  +
+ + + + +
+
+ +
+
+
+ diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_search.php b/Source/udrive/home/admin/www/phpMyAdmin/db_search.php new file mode 100644 index 0000000..0dea330 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_search.php @@ -0,0 +1,308 @@ + + */ + +require_once('./libraries/common.lib.php'); + +/** + * Gets some core libraries and send headers + */ +require('./libraries/db_common.inc.php'); +// If config variable $cfg['Usedbsearch'] is on FALSE : exit. +if (!$cfg['UseDbSearch']) { + PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url); +} // end if +$url_query .= '&goto=db_search.php'; +$url_params['goto'] = 'db_search.php'; + +/** + * Get the list of tables from the current database + */ +$tables = PMA_DBI_get_tables($GLOBALS['db']); +$num_tables = count( $tables ); + +/** + * Displays top links + */ +$sub_part = ''; +require('./libraries/db_links.inc.php'); + + +/** + * 1. Main search form has been submitted + */ +if (isset($_REQUEST['submit_search'])) { + + /** + * Builds the SQL search query + * + * @param string the table name + * @param string the string to search + * @param integer type of search (1 -> 1 word at least, 2 -> all words, + * 3 -> exact string, 4 -> regexp) + * + * @return array 3 SQL querys (for count, display and delete results) + * + * @global string the url to return to in case of errors + */ + function PMA_getSearchSqls($table, $search_str, $search_option) + { + global $err_url, $charset_connection; + + // Statement types + $sqlstr_select = 'SELECT'; + $sqlstr_delete = 'DELETE'; + + // Fields to select + $res = PMA_DBI_query('SHOW ' . (PMA_MYSQL_INT_VERSION >= 40100 ? 'FULL ' : '') . 'FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($GLOBALS['db']) . ';'); + while ($current = PMA_DBI_fetch_assoc($res)) { + if (PMA_MYSQL_INT_VERSION >= 40100) { + list($current['Charset']) = explode('_', $current['Collation']); + } + $current['Field'] = PMA_backquote($current['Field']); + $tblfields[] = $current; + } // while + PMA_DBI_free_result($res); + unset($current, $res); + $tblfields_cnt = count($tblfields); + + // Table to use + $sqlstr_from = ' FROM ' . PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($table); + + // Beginning of WHERE clause + $sqlstr_where = ' WHERE'; + + $search_words = (($search_option > 2) ? array($search_str) : explode(' ', $search_str)); + $search_wds_cnt = count($search_words); + + $like_or_regex = (($search_option == 4) ? 'REGEXP' : 'LIKE'); + $automatic_wildcard = (($search_option <3) ? '%' : ''); + + for ($i = 0; $i < $search_wds_cnt; $i++) { + // Eliminates empty values + // In MySQL 4.1, if a field has no collation we get NULL in Charset + // but in MySQL 5.0.x we get '' + if (!empty($search_words[$i])) { + for ($j = 0; $j < $tblfields_cnt; $j++) { + if (PMA_MYSQL_INT_VERSION >= 40100 && $tblfields[$j]['Charset'] != $charset_connection && $tblfields[$j]['Charset'] != 'NULL' && $tblfields[$j]['Charset'] != '') { + $prefix = 'CONVERT(_utf8 '; + $suffix = ' USING ' . $tblfields[$j]['Charset'] . ') COLLATE ' . $tblfields[$j]['Collation']; + } else { + $prefix = $suffix = ''; + } + $thefieldlikevalue[] = $tblfields[$j]['Field'] + . ' ' . $like_or_regex . ' ' + . $prefix + . '\'' + . $automatic_wildcard + . $search_words[$i] + . $automatic_wildcard . '\'' + . $suffix; + } // end for + + $fieldslikevalues[] = ($search_wds_cnt > 1) + ? '(' . implode(' OR ', $thefieldlikevalue) . ')' + : implode(' OR ', $thefieldlikevalue); + unset($thefieldlikevalue); + } // end if + } // end for + + $implode_str = ($search_option == 1 ? ' OR ' : ' AND '); + $sqlstr_where .= ' ' . implode($implode_str, $fieldslikevalues); + unset($fieldslikevalues); + + // Builds complete queries + $sql['select_fields'] = $sqlstr_select . ' * ' . $sqlstr_from . $sqlstr_where; + // here, I think we need to still use the COUNT clause, even for + // VIEWs, anyway we have a WHERE clause that should limit results + $sql['select_count'] = $sqlstr_select . ' COUNT(*) AS count' . $sqlstr_from . $sqlstr_where; + $sql['delete'] = $sqlstr_delete . $sqlstr_from . $sqlstr_where; + + return $sql; + } // end of the "PMA_getSearchSqls()" function + + + /** + * Displays the results + */ + if (!empty($_REQUEST['search_str']) && !empty($_REQUEST['search_option'])) { + + $original_search_str = $_REQUEST['search_str']; + $search_str = PMA_sqlAddslashes($_REQUEST['search_str'], TRUE); + + // Get the true string to display as option's comment + switch ($_REQUEST['search_option']) { + case 1: + $option_str = ' (' . $strSearchOption1 . ')'; + $search_option = 1; + break; + case 2: + $option_str = ' (' . $strSearchOption2 . ')'; + $search_option = 2; + break; + case 3: + $option_str = ' (' . $strSearchOption3 . ')'; + $search_option = 3; + break; + case 4: + $option_str = ' (' . $strSearchOption4 . ')'; + $search_option = 4; + break; + } // end switch + + $this_url_params = array( + 'db' => $GLOBALS['db'], + 'goto' => 'db_sql.php', + 'pos' => 0, + 'is_js_confirmed' => 0, + ); + + // Displays search string + echo '
' . "\n" + .'' . "\n" + .'' . "\n"; + + $num_search_result_total = 0; + $odd_row = true; + + foreach ( $_REQUEST['table_select'] as $each_table ) { + // Gets the SQL statements + $newsearchsqls = PMA_getSearchSqls($each_table, + $search_str, $search_option); + + // Executes the "COUNT" statement + $res_cnt = PMA_DBI_fetch_value($newsearchsqls['select_count']); + $num_search_result_total += $res_cnt; + + echo '' + .'\n"; + + if ($res_cnt > 0) { + $this_url_params['sql_query'] = $newsearchsqls['select_fields']; + echo '\n"; + + $this_url_params['sql_query'] = $newsearchsqls['delete']; + echo '\n"; + + } else { + echo '' . "\n" + .'' . "\n"; + }// end if else + $odd_row = ! $odd_row; + echo '' . "\n"; + } // end for + + echo '
' . "\n" + .sprintf($strSearchResultsFor, + htmlspecialchars($original_search_str), $option_str) . "\n" + .'
' . sprintf($strNumSearchResultsInTable, $res_cnt, + htmlspecialchars($each_table)) . "' . PMA_linkOrButton( + 'sql.php' . PMA_generate_common_url($this_url_params), + $strBrowse, '') . "' . PMA_linkOrButton( + 'sql.php' . PMA_generate_common_url($this_url_params), + $strDelete, $newsearchsqls['delete']) . "  
' . "\n"; + + if ( count($_REQUEST['table_select']) > 1 ) { + echo '

' . sprintf($strNumSearchResultsTotal, + $num_search_result_total) . '

' . "\n"; + } + } // end if (!empty($search_str) && !empty($search_option)) + +} // end 1. + + +/** + * 2. Displays the main search form + */ +echo "\n"; +$searched = (isset($original_search_str)) + ? htmlspecialchars($original_search_str) + : ''; +if (empty($search_option)) { + $search_option = 1; +} +?> + +
+ +
+ + + + + + + + + + + + + + +
+ /> + 1
+ /> + 1
+ /> +
+ /> + +
+
+ 1
+ +' . "\n"; +foreach ( $tables as $each_table ) { + if ( isset($_REQUEST['unselectall'])) { + $is_selected = ''; + } elseif ( ! isset($_REQUEST['table_select']) + || in_array($each_table, $_REQUEST['table_select']) + || isset($_REQUEST['selectall']) ) { + $is_selected = ' selected="selected"'; + } else { + $is_selected = ''; + } + + echo ' ' . "\n"; +} // end while +echo ' ' . "\n"; +$strDoSelectAll = '' . $strSelectAll . '' + . ' / ' + . '' . $strUnselectAll . ''; +?> +
+
+
+
+ +
+
+ + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_sql.php b/Source/udrive/home/admin/www/phpMyAdmin/db_sql.php new file mode 100644 index 0000000..53eaba8 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_sql.php @@ -0,0 +1,34 @@ + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/db_structure.php b/Source/udrive/home/admin/www/phpMyAdmin/db_structure.php new file mode 100644 index 0000000..03cda5c --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/db_structure.php @@ -0,0 +1,529 @@ +' . $strNoTablesFound . '

' . "\n"; + + if (empty($db_is_information_schema)) { + require './libraries/display_create_table.lib.php'; + } // end if (Create Table dialog) + + /** + * Displays the footer + */ + require_once './libraries/footer.inc.php'; + exit; +} + +// else +// 2. Shows table informations - staybyte - 11 June 2001 + +require_once './libraries/bookmark.lib.php'; + +if (PMA_MYSQL_INT_VERSION >= 40101) { + require_once './libraries/mysql_charsets.lib.php'; + $db_collation = PMA_getDbCollation($db); +} + +// Display function +/** + * void PMA_TableHeader([bool $db_is_information_schema = false]) + * display table header (...) + * + * @uses PMA_showHint() + * @uses PMA_MYSQL_INT_VERSION + * @uses $GLOBALS['cfg']['PropertiesNumColumns'] + * @uses $GLOBALS['is_show_stats'] + * @uses $GLOBALS['strTable'] + * @uses $GLOBALS['strAction'] + * @uses $GLOBALS['strRecords'] + * @uses $GLOBALS['strApproximateCount'] + * @uses $GLOBALS['strType'] + * @uses $GLOBALS['strCollation'] + * @uses $GLOBALS['strSize'] + * @uses $GLOBALS['strOverhead'] + * @uses $GLOBALS['structure_tbl_col_cnt'] + * @param boolean $db_is_information_schema + */ +function PMA_TableHeader($db_is_information_schema = false) +{ + $cnt = 0; // Let's count the columns... + + if ($db_is_information_schema) { + $action_colspan = 3; + } else { + $action_colspan = 6; + } + + echo '
' . "\n" + .'' . "\n" + .'' . "\n" + .' ' . "\n" + .' ' + .' ' . "\n"; + if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) { + echo ' ' . "\n"; + $cnt++; + if (PMA_MYSQL_INT_VERSION >= 40100) { + echo ' ' . "\n"; + $cnt++; + } + } + if ($GLOBALS['is_show_stats']) { + echo ' ' . "\n" + . ' ' . "\n"; + $cnt += 2; + } + echo '' . "\n"; + echo '' . "\n"; + echo '' . "\n"; + $GLOBALS['structure_tbl_col_cnt'] = $cnt + $action_colspan + 3; +} // end function PMA_TableHeader() + +$titles = array(); +if (true == $cfg['PropertiesIconic']) { + $titles['Browse'] = '' . $strBrowse . ''; + $titles['NoBrowse'] = '' . $strBrowse . ''; + $titles['Search'] = '' . $strSearch . ''; + $titles['NoSearch'] = '' . $strSearch . ''; + $titles['Insert'] = '' . $strInsert . ''; + $titles['NoInsert'] = '' . $strInsert . ''; + $titles['Structure'] = '' . $strStructure . ''; + $titles['Drop'] = '' . $strDrop . ''; + $titles['NoDrop'] = '' . $strDrop . ''; + $titles['Empty'] = '' . $strEmpty . ''; + $titles['NoEmpty'] = '' . $strEmpty . ''; + + if ('both' === $cfg['PropertiesIconic']) { + $titles['Browse'] .= $strBrowse; + $titles['Search'] .= $strSearch; + $titles['NoBrowse'] .= $strBrowse; + $titles['NoSearch'] .= $strSearch; + $titles['Insert'] .= $strInsert; + $titles['NoInsert'] .= $strInsert; + $titles['Structure'] .= $strStructure; + $titles['Drop'] .= $strDrop; + $titles['NoDrop'] .= $strDrop; + $titles['Empty'] .= $strEmpty; + $titles['NoEmpty'] .= $strEmpty; + } +} else { + $titles['Browse'] = $strBrowse; + $titles['Search'] = $strSearch; + $titles['NoBrowse'] = $strBrowse; + $titles['NoSearch'] = $strSearch; + $titles['Insert'] = $strInsert; + $titles['NoInsert'] = $strInsert; + $titles['Structure'] = $strStructure; + $titles['Drop'] = $strDrop; + $titles['NoDrop'] = $strDrop; + $titles['Empty'] = $strEmpty; + $titles['NoEmpty'] = $strEmpty; +} + +/** + * Displays the tables list + */ +?> + + 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0; +$row_count = 0; + + +$hidden_fields = array(); +$odd_row = true; +$at_least_one_view_exceeds_max_count = false; + +foreach ($tables as $keyname => $each_table) { + if ($each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) { + $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db, + $each_table['TABLE_NAME'], $return = true, $force_exact = true); + } + + $table_encoded = urlencode($each_table['TABLE_NAME']); + // MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW" + $table_is_view = ($each_table['TABLE_TYPE'] === 'VIEW' + || $each_table['TABLE_TYPE'] === 'SYSTEM VIEW'); + + $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']])) + ? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']]) + : htmlspecialchars($each_table['TABLE_NAME']); + $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']])) + ? htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]) + : htmlspecialchars($each_table['TABLE_NAME']); + + // Sets parameters for links + $tbl_url_query = $url_query . '&table=' . $table_encoded; + $i++; + + $row_count++; + if ($table_is_view) { + $hidden_fields[] = ''; + } + + if ($each_table['TABLE_ROWS'] > 0) { + $browse_table = '' . $titles['Browse'] . ''; + $search_table = '' . $titles['Search'] . ''; + } else { + $browse_table = $titles['NoBrowse']; + $search_table = $titles['NoSearch']; + } + + if (! $db_is_information_schema) { + if (! empty($each_table['TABLE_ROWS'])) { + $empty_table = '' . $titles['Empty'] . ''; + } else { + $empty_table = $titles['NoEmpty']; + } + $drop_query = 'DROP ' + . ($table_is_view ? 'VIEW' : 'TABLE') + . ' ' . PMA_backquote($each_table['TABLE_NAME']); + $drop_message = sprintf( + $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped, + htmlspecialchars($each_table['TABLE_NAME'])); + } + + // loic1: Patch from Joshua Nye to get valid + // statistics whatever is the table type + + if (isset($each_table['TABLE_ROWS'])) { + // MyISAM, ISAM or Heap table: Row count, data size and index size + // is accurate. + if (preg_match('@^(MyISAM|ISAM|HEAP|MEMORY)$@', $each_table['ENGINE'])) { + if ($is_show_stats) { + $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']); + $sum_size += $tblsize; + list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); + if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) { + list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0); + $overhead_size += $each_table['Data_free']; + } + } + $sum_entries += $each_table['TABLE_ROWS']; + } elseif ($each_table['ENGINE'] == 'InnoDB') { + // InnoDB table: Row count is not accurate but data and index + // sizes are. + if ($is_show_stats) { + $tblsize = $each_table['Data_length'] + $each_table['Index_length']; + $sum_size += $tblsize; + list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); + } + //$display_rows = ' - '; + $sum_entries += $each_table['TABLE_ROWS']; + } elseif (preg_match('@^(MRG_MyISAM|BerkeleyDB)$@', $each_table['ENGINE'])) { + // Merge or BerkleyDB table: Only row count is accurate. + if ($is_show_stats) { + $formatted_size = ' - '; + $unit = ''; + } + $sum_entries += $each_table['TABLE_ROWS']; + } else { + // Unknown table type. + if ($is_show_stats) { + $formatted_size = 'unknown'; + $unit = ''; + } + } + + if (PMA_MYSQL_INT_VERSION >= 40100) { + if (isset($each_table['Collation'])) { + $collation = '' + . $each_table['Collation'] . ''; + } else { + $collation = '---'; + } + } + + if ($is_show_stats) { + if (isset($formatted_overhead)) { + $overhead = '' . $formatted_overhead + . ' ' . $overhead_unit . '' . "\n"; + unset($formatted_overhead); + $overhead_check .= + "document.getElementById('checkbox_tbl_$i').checked = true;"; + } else { + $overhead = '-'; + } + } // end if + } // end if (isset($each_table['TABLE_ROWS']) + + if ($num_columns > 0 && $num_tables > $num_columns + && (($row_count % $num_columns) == 0)) { + $row_count = 1; + $odd_row = true; + ?> + + +
' . $GLOBALS['strTable'] . '' . "\n" + .' ' . $GLOBALS['strAction'] . "\n" + .' ' . $GLOBALS['strRecords'] + .PMA_showHint($GLOBALS['strApproximateCount']) . "\n" + .' ' . $GLOBALS['strType'] . '' . $GLOBALS['strCollation'] . '' . $GLOBALS['strSize'] . '' . $GLOBALS['strOverhead'] . '
+ + + + /> + + + + + + + + + + + + + + + + = $cfg['MaxExactCountViews']) { + $at_least_one_view_exceeds_max_count = true; + $show_superscript = '1'; + } else { + $show_superscript = ''; + } + ?> + + 1)) { ?> + + + + + + + + + + + + - + + --- + + - + - + + + + + + + + + + + + + + + + + 1)) { + $default_engine = PMA_DBI_get_default_engine(); + echo ' ' . "\n" + . ' ' .$default_engine . '' . "\n"; + // Have to account for old MySQL with no collation (bug 1554885) + if (PMA_MYSQL_INT_VERSION >= 40100) { + // we got a case where $db_collation was empty + echo ' ' . "\n"; + if (! empty($db_collation)) { + echo ' ' . $db_collation + . ''; + } + echo ''; + } +} + +if ($is_show_stats) { + ?> + + + + + + + +
+ +<?php echo $strWithChecked; ?> + + +/ + + + +/ + + + + + + + + +
+ +' . "\n"; + echo '1' . PMA_sanitize(sprintf($strViewMaxExactCount, PMA_formatNumber($cfg['MaxExactCountViews'], 0), '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')) . "\n"; + echo '
' . "\n"; +} +?> +
+ +'; +echo ''; +if ($cfg['PropertiesIconic']) { + echo ''; +} +echo $strPrintView . ' '; + +echo ''; +if ($cfg['PropertiesIconic']) { + echo ''; +} +echo $strDataDict . ''; +echo '

'; + +if (empty($db_is_information_schema)) { + require './libraries/display_create_table.lib.php'; +} // end if (Create Table dialog) + +/** + * Displays the footer + */ +require_once './libraries/footer.inc.php'; +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/error.php b/Source/udrive/home/admin/www/phpMyAdmin/error.php new file mode 100644 index 0000000..8f3153a --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/error.php @@ -0,0 +1,70 @@ + + + + + + + phpMyAdmin + + + + +

phpMyAdmin -

+

+ + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/export.php b/Source/udrive/home/admin/www/phpMyAdmin/export.php new file mode 100644 index 0000000..906c536 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/export.php @@ -0,0 +1,668 @@ + $export_type, 'single_table' => isset($single_table))); + +// Backward compatbility +$type = $what; + +// Check export type +if (!isset($export_list[$type])) { + die('Bad type!'); +} + +/** + * valid compression methods + */ +$compression_methods = array( + 'zip', + 'gzip', + 'bzip', +); + +/** + * init and variable checking + */ +$compression = false; +$onserver = false; +$save_on_server = false; +$buffer_needed = false; +if (empty($_REQUEST['asfile'])) { + $asfile = false; +} else { + $asfile = true; + if (in_array($_REQUEST['compression'], $compression_methods)) { + $compression = $_REQUEST['compression']; + $buffer_needed = true; + } + if (!empty($_REQUEST['onserver'])) { + $onserver = $_REQUEST['onserver']; + // Will we save dump on server? + $save_on_server = ! empty($cfg['SaveDir']) && $onserver; + } +} + +// Does export require to be into file? +if (isset($export_list[$type]['force_file']) && ! $asfile) { + $message = $strExportMustBeFile; + $GLOBALS['show_error_header'] = true; + $js_to_run = 'functions.js'; + require_once('./libraries/header.inc.php'); + if ($export_type == 'server') { + $active_page = 'server_export.php'; + require('./server_export.php'); + } elseif ($export_type == 'database') { + $active_page = 'db_export.php'; + require('./db_export.php'); + } else { + $active_page = 'tbl_export.php'; + require('./tbl_export.php'); + } + exit(); +} + +// Generate error url and check for needed variables +if ($export_type == 'server') { + $err_url = 'server_export.php?' . PMA_generate_common_url(); +} elseif ($export_type == 'database' && strlen($db)) { + $err_url = 'db_export.php?' . PMA_generate_common_url($db); + // Check if we have something to export + if (isset($table_select)) { + $tables = $table_select; + } else { + $tables = array(); + } +} elseif ($export_type == 'table' && strlen($db) && strlen($table)) { + $err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table); +} else { + die('Bad parameters!'); +} + +// Get the functions specific to the export type +require('./libraries/export/' . PMA_securePath($type) . '.php'); + +/** + * Increase time limit for script execution and initializes some variables + */ +@set_time_limit($cfg['ExecTimeLimit']); +if (!empty($cfg['MemoryLimit'])) { + @ini_set('memory_limit', $cfg['MemoryLimit']); +} + +// Start with empty buffer +$dump_buffer = ''; +$dump_buffer_len = 0; + +// We send fake headers to avoid browser timeout when buffering +$time_start = time(); + + +/** + * Output handler for all exports, if needed buffering, it stores data into + * $dump_buffer, otherwise it prints thems out. + * + * @param string the insert statement + * + * @return bool Whether output suceeded + */ +function PMA_exportOutputHandler($line) +{ + global $time_start, $dump_buffer, $dump_buffer_len, $save_filename; + + // Kanji encoding convert feature + if ($GLOBALS['output_kanji_conversion']) { + $line = PMA_kanji_str_conv($line, $GLOBALS['knjenc'], isset($GLOBALS['xkana']) ? $GLOBALS['xkana'] : ''); + } + // If we have to buffer data, we will perform everything at once at the end + if ($GLOBALS['buffer_needed']) { + + $dump_buffer .= $line; + if ($GLOBALS['onfly_compression']) { + + $dump_buffer_len += strlen($line); + + if ($dump_buffer_len > $GLOBALS['memory_limit']) { + if ($GLOBALS['output_charset_conversion']) { + $dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer); + } + // as bzipped + if ($GLOBALS['compression'] == 'bzip' && @function_exists('bzcompress')) { + $dump_buffer = bzcompress($dump_buffer); + } + // as a gzipped file + elseif ($GLOBALS['compression'] == 'gzip' && @function_exists('gzencode')) { + // without the optional parameter level because it bug + $dump_buffer = gzencode($dump_buffer); + } + if ($GLOBALS['save_on_server']) { + $write_result = @fwrite($GLOBALS['file_handle'], $dump_buffer); + if (!$write_result || ($write_result != strlen($dump_buffer))) { + $GLOBALS['message'] = sprintf($GLOBALS['strNoSpace'], htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; + return FALSE; + } + } else { + echo $dump_buffer; + } + $dump_buffer = ''; + $dump_buffer_len = 0; + } + } else { + $time_now = time(); + if ($time_start >= $time_now + 30) { + $time_start = $time_now; + header('X-pmaPing: Pong'); + } // end if + } + } else { + if ($GLOBALS['asfile']) { + if ($GLOBALS['save_on_server'] && strlen($line) > 0) { + $write_result = @fwrite($GLOBALS['file_handle'], $line); + if (!$write_result || ($write_result != strlen($line))) { + $GLOBALS['message'] = sprintf($GLOBALS['strNoSpace'], htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; + return FALSE; + } + $time_now = time(); + if ($time_start >= $time_now + 30) { + $time_start = $time_now; + header('X-pmaPing: Pong'); + } // end if + } else { + // We export as file - output normally + if ($GLOBALS['output_charset_conversion']) { + $line = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $line); + } + echo $line; + } + } else { + // We export as html - replace special chars + echo htmlspecialchars($line); + } + } + return TRUE; +} // end of the 'PMA_exportOutputHandler()' function + +// Defines the default format. For SQL always use \n as MySQL wants this on all platforms. +if ($what == 'sql') { + $crlf = "\n"; +} else { + $crlf = PMA_whichCrlf(); +} + +$output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xls'; + +// Do we need to convert charset? +$output_charset_conversion = $asfile && + $cfg['AllowAnywhereRecoding'] && $allow_recoding + && isset($charset_of_file) && $charset_of_file != $charset + && $type != 'xls'; + +// Use on fly compression? +$onfly_compression = $GLOBALS['cfg']['CompressOnFly'] && ($compression == 'gzip' | $compression == 'bzip'); +if ($onfly_compression) { + $memory_limit = trim(@ini_get('memory_limit')); + // 2 MB as default + if (empty($memory_limit)) { + $memory_limit = 2 * 1024 * 1024; + } + + if (strtolower(substr($memory_limit, -1)) == 'm') { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024; + } elseif (strtolower(substr($memory_limit, -1)) == 'k') { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024; + } elseif (strtolower(substr($memory_limit, -1)) == 'g') { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024 * 1024; + } else { + $memory_limit = (int)$memory_limit; + } + + // Some of memory is needed for other thins and as treshold. + // Nijel: During export I had allocated (see memory_get_usage function) + // approx 1.2MB so this comes from that. + if ($memory_limit > 1500000) { + $memory_limit -= 1500000; + } + + // Some memory is needed for compression, assume 1/3 + $memory_limit /= 8; +} + +// Generate filename and mime type if needed +if ($asfile) { + $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']); + if ($export_type == 'server') { + if (isset($remember_template)) { + PMA_setCookie('pma_server_filename_template', $filename_template); + } + $filename = str_replace('__SERVER__', $GLOBALS['cfg']['Server']['host'], strftime($filename_template)); + } elseif ($export_type == 'database') { + if (isset($remember_template)) { + PMA_setCookie('pma_db_filename_template', $filename_template); + } + $filename = str_replace('__DB__', $db, str_replace('__SERVER__', $GLOBALS['cfg']['Server']['host'], strftime($filename_template))); + } else { + if (isset($remember_template)) { + PMA_setCookie('pma_table_filename_template', $filename_template); + } + $filename = str_replace('__TABLE__', $table, str_replace('__DB__', $db, str_replace('__SERVER__', $GLOBALS['cfg']['Server']['host'], strftime($filename_template)))); + } + + // convert filename to iso-8859-1, it is safer + if (!(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) { + $filename = PMA_convert_string($charset, 'iso-8859-1', $filename); + } else { + $filename = PMA_convert_string($convcharset, 'iso-8859-1', $filename); + } + + // Grab basic dump extension and mime type + $filename .= '.' . $export_list[$type]['extension']; + $mime_type = $export_list[$type]['mime_type']; + + // If dump is going to be compressed, set correct encoding or mime_type and add + // compression to extension + $content_encoding = ''; + if ($compression == 'bzip') { + $filename .= '.bz2'; + // browsers don't like this: + //$content_encoding = 'x-bzip2'; + $mime_type = 'application/x-bzip2'; + } elseif ($compression == 'gzip') { + $filename .= '.gz'; + // Needed to avoid recompression by server modules like mod_gzip. + // It seems necessary to check about zlib.output_compression + // to avoid compressing twice + if (!@ini_get('zlib.output_compression')) { + $content_encoding = 'x-gzip'; + $mime_type = 'application/x-gzip'; + } + } elseif ($compression == 'zip') { + $filename .= '.zip'; + $mime_type = 'application/zip'; + } +} + +// Open file on server if needed +if ($save_on_server) { + $save_filename = PMA_userDir($cfg['SaveDir']) . preg_replace('@[/\\\\]@', '_', $filename); + unset($message); + if (file_exists($save_filename) && empty($onserverover)) { + $message = sprintf($strFileAlreadyExists, htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; + } else { + if (is_file($save_filename) && !is_writable($save_filename)) { + $message = sprintf($strNoPermission, htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; + } else { + if (!$file_handle = @fopen($save_filename, 'w')) { + $message = sprintf($strNoPermission, htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; + } + } + } + if (isset($message)) { + $js_to_run = 'functions.js'; + require_once('./libraries/header.inc.php'); + if ($export_type == 'server') { + $active_page = 'server_export.php'; + require('./server_export.php'); + } elseif ($export_type == 'database') { + $active_page = 'db_export.php'; + require('./db_export.php'); + } else { + $active_page = 'tbl_export.php'; + require('./tbl_export.php'); + } + exit(); + } +} + +/** + * Send headers depending on whether the user chose to download a dump file + * or not + */ +if (!$save_on_server) { + if ($asfile ) { + // Download + if (!empty($content_encoding)) { + header('Content-Encoding: ' . $content_encoding); + } + header('Content-Type: ' . $mime_type); + header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + // lem9: Tested behavior of + // IE 5.50.4807.2300 + // IE 6.0.2800.1106 (small glitch, asks twice when I click Open) + // IE 6.0.2900.2180 + // Firefox 1.0.6 + // in http and https + header('Content-Disposition: attachment; filename="' . $filename . '"'); + if (PMA_USR_BROWSER_AGENT == 'IE') { + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + } else { + header('Pragma: no-cache'); + } + } else { + // HTML + if ($export_type == 'database') { + $num_tables = count($tables); + if ($num_tables == 0) { + $message = $strNoTablesFound; + $js_to_run = 'functions.js'; + require_once('./libraries/header.inc.php'); + $active_page = 'db_export.php'; + require('./db_export.php'); + exit(); + } + } + $backup_cfgServer = $cfg['Server']; + require_once('./libraries/header.inc.php'); + $cfg['Server'] = $backup_cfgServer; + unset($backup_cfgServer); + echo "\n" . '
' . "\n"; + //echo '
' . "\n";
+        echo '    
' . "\n" + // remove auto-select for now: there is no way to select + // only a part of the text; anyway, it should obey + // $cfg['TextareaAutoSelect'] + //. ' ' . "\n" + . '
' . "\n"; + echo '
' . "\n"; + echo "\n"; +?> + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/import.php b/Source/udrive/home/admin/www/phpMyAdmin/import.php new file mode 100644 index 0000000..301ea79 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/import.php @@ -0,0 +1,421 @@ + $db, + 'user' => $cfg['Bookmark']['user'], + 'query' => urlencode($import_text), + 'label' => $bkm_label + ); + + // Should we replace bookmark? + if (isset($bkm_replace)) { + $bookmarks = PMA_listBookmarks($db, $cfg['Bookmark']); + foreach ($bookmarks as $key => $val) { + if ($val == $bkm_label) { + PMA_deleteBookmarks($db, $cfg['Bookmark'], $key); + } + } + } + + PMA_addBookmarks($bfields, $cfg['Bookmark'], isset($bkm_all_users)); + + $bookmark_created = TRUE; +} // end store bookmarks + +// We can not read all at once, otherwise we can run out of memory +$memory_limit = trim(@ini_get('memory_limit')); +// 2 MB as default +if (empty($memory_limit)) { + $memory_limit = 2 * 1024 * 1024; +} +// In case no memory limit we work on 10MB chunks +if ($memory_limit = -1) { + $memory_limit = 10 * 1024 * 1024; +} + +// Calculate value of the limit +if (strtolower(substr($memory_limit, -1)) == 'm') { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024; +} elseif (strtolower(substr($memory_limit, -1)) == 'k') { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024; +} elseif (strtolower(substr($memory_limit, -1)) == 'g') { + $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024 * 1024; +} else { + $memory_limit = (int)$memory_limit; +} + +$read_limit = $memory_limit / 8; // Just to be sure, there might be lot of memory needed for uncompression + +// handle filenames +if (!empty($local_import_file) && !empty($cfg['UploadDir'])) { + + // sanitize $local_import_file as it comes from a POST + $local_import_file = PMA_securePath($local_import_file); + + $import_file = PMA_userDir($cfg['UploadDir']) . $local_import_file; +} elseif (empty($import_file) || !is_uploaded_file($import_file)) { + $import_file = 'none'; +} + +// Do we have file to import? +if ($import_file != 'none' && !$error) { + // work around open_basedir and other limitations + $open_basedir = @ini_get('open_basedir'); + + // If we are on a server with open_basedir, we must move the file + // before opening it. The doc explains how to create the "./tmp" + // directory + + if (!empty($open_basedir)) { + + $tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : './tmp/'); + + // function is_writeable() is valid on PHP3 and 4 + if (is_writeable($tmp_subdir)) { + $import_file_new = $tmp_subdir . basename($import_file); + if (move_uploaded_file($import_file, $import_file_new)) { + $import_file = $import_file_new; + $file_to_unlink = $import_file_new; + } + } + } + + // Handle file compression + $compression = PMA_detectCompression($import_file); + if ($compression === FALSE) { + $message = $strFileCouldNotBeRead; + $show_error_header = TRUE; + $error = TRUE; + } else { + switch ($compression) { + case 'application/bzip2': + if ($cfg['BZipDump'] && @function_exists('bzopen')) { + $import_handle = @bzopen($import_file, 'r'); + } else { + $message = sprintf($strUnsupportedCompressionDetected, $compression); + $show_error_header = TRUE; + $error = TRUE; + } + break; + case 'application/gzip': + if ($cfg['GZipDump'] && @function_exists('gzopen')) { + $import_handle = @gzopen($import_file, 'r'); + } else { + $message = sprintf($strUnsupportedCompressionDetected, $compression); + $show_error_header = TRUE; + $error = TRUE; + } + break; + case 'application/zip': + if ($cfg['GZipDump'] && @function_exists('gzinflate')) { + include_once('./libraries/unzip.lib.php'); + $import_handle = new SimpleUnzip(); + $import_handle->ReadFile($import_file); + if ($import_handle->Count() == 0) { + $message = $strNoFilesFoundInZip; + $show_error_header = TRUE; + $error = TRUE; + } elseif ($import_handle->GetError(0) != 0) { + $message = $strErrorInZipFile . ' ' . $import_handle->GetErrorMsg(0); + $show_error_header = TRUE; + $error = TRUE; + } else { + $import_text = $import_handle->GetData(0); + } + // We don't need to store it further + $import_handle = ''; + } else { + $message = sprintf($strUnsupportedCompressionDetected, $compression); + $show_error_header = TRUE; + $error = TRUE; + } + break; + case 'none': + $import_handle = @fopen($import_file, 'r'); + break; + default: + $message = sprintf($strUnsupportedCompressionDetected, $compression); + $show_error_header = TRUE; + $error = TRUE; + break; + } + } + if (!$error && $import_handle === FALSE) { + $message = $strFileCouldNotBeRead; + $show_error_header = TRUE; + $error = TRUE; + } +} elseif (!$error) { + if (!isset($import_text) || empty($import_text)) { + $message = $strNoDataReceived; + $show_error_header = TRUE; + $error = TRUE; + } +} + +// Convert the file's charset if necessary +if ($cfg['AllowAnywhereRecoding'] && $allow_recoding + && isset($charset_of_file)) { + if ($charset_of_file != $charset) { + $charset_conversion = TRUE; + } +} elseif (PMA_MYSQL_INT_VERSION >= 40100 + && isset($charset_of_file) && $charset_of_file != 'utf8') { + PMA_DBI_query('SET NAMES \'' . $charset_of_file . '\''); + // We can not show query in this case, it is in different charset + $sql_query_disabled = TRUE; + $reset_charset = TRUE; +} + +// Something to skip? +if (!$error && isset($skip)) { + $original_skip = $skip; + while ($skip > 0) { + PMA_importGetNextChunk($skip < $read_limit ? $skip : $read_limit); + $read_multiply = 1; // Disable read progresivity, otherwise we eat all memory! + $skip -= $read_limit; + } + unset($skip); +} + +if (!$error) { + // Check for file existance + if (!file_exists('./libraries/import/' . $format . '.php')) { + $error = TRUE; + $message = $strCanNotLoadImportPlugins; + $show_error_header = TRUE; + } else { + // Do the real import + $plugin_param = $import_type; + require('./libraries/import/' . $format . '.php'); + } +} + +// Cleanup temporary file +if ($file_to_unlink != '') { + unlink($file_to_unlink); +} + +// Reset charset back, if we did some changes +if ($reset_charset) { + PMA_DBI_query('SET CHARACTER SET utf8'); + PMA_DBI_query('SET SESSION collation_connection =\'' . $collation_connection . '\''); +} + +// Show correct message +if (!empty($id_bookmark) && $action_bookmark == 2) { + $message = $strBookmarkDeleted; + $display_query = $import_text; + $error = FALSE; // unset error marker, it was used just to skip processing +} elseif (!empty($id_bookmark) && $action_bookmark == 1) { + $message = $strShowingBookmark; +} elseif ($bookmark_created) { + $special_message = '[br]' . sprintf($strBookmarkCreated, htmlspecialchars($bkm_label)); +} elseif ($finished && !$error) { + if ($import_type == 'query') { + $message = $strSuccess; + } else { + $message = sprintf($strImportSuccessfullyFinished, $executed_queries); + } +} + +// Did we hit timeout? Tell it user. +if ($timeout_passed) { + $message = $strTimeoutPassed; + if ($offset == 0 || (isset($original_skip) && $original_skip == $offset)) { + $message .= ' ' . $strTimeoutNothingParsed; + } +} + +// Parse and analyze the query, for correct db and table name +// in case of a query typed in the query window +require_once('./libraries/parse_analyze.lib.php'); + +// There was an error? +if (isset($my_die)) { + foreach ($my_die AS $key => $die) { + PMA_mysqlDie($die['error'], $die['sql'], '', $err_url, $error); + } +} + +if ($go_sql) { + if (isset($_GET['pos'])) { + // comes from the Refresh link + $pos = $_GET['pos']; + } else { + // Set pos to zero to possibly append limit + $pos = 0; + } + require('./sql.php'); +} else { + $active_page = $goto; + require('./' . $goto); +} +exit(); +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/index.php b/Source/udrive/home/admin/www/phpMyAdmin/index.php new file mode 100644 index 0000000..48090ff --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/index.php @@ -0,0 +1,175 @@ + + + + + + +phpMyAdmin <?php echo PMA_VERSION; ?> - + <?php echo htmlspecialchars($HTTP_HOST); ?> + + + + + + + + + + + + + + <body> + <p><?php echo $GLOBALS['strNoFrames']; ?></p> + </body> + + + + diff --git a/Source/udrive/home/admin/www/phpMyAdmin/js/dom-drag.js b/Source/udrive/home/admin/www/phpMyAdmin/js/dom-drag.js new file mode 100644 index 0000000..0d3b4d0 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/js/dom-drag.js @@ -0,0 +1,121 @@ +/************************************************** + * dom-drag.js + * 09.25.2001 + * www.youngpup.net + ************************************************** + * 10.28.2001 - fixed minor bug where events + * sometimes fired off the handle, not the root. + **************************************************/ + +var Drag = { + + obj : null, + + init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper) + { + o.onmousedown = Drag.start; + + o.hmode = bSwapHorzRef ? false : true ; + o.vmode = bSwapVertRef ? false : true ; + + o.root = oRoot && oRoot != null ? oRoot : o ; + + if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px"; + if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px"; + if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; + if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; + + o.minX = typeof minX != 'undefined' ? minX : null; + o.minY = typeof minY != 'undefined' ? minY : null; + o.maxX = typeof maxX != 'undefined' ? maxX : null; + o.maxY = typeof maxY != 'undefined' ? maxY : null; + + o.xMapper = fXMapper ? fXMapper : null; + o.yMapper = fYMapper ? fYMapper : null; + + o.root.onDragStart = new Function(); + o.root.onDragEnd = new Function(); + o.root.onDrag = new Function(); + }, + + start : function(e) + { + var o = Drag.obj = this; + e = Drag.fixE(e); + var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); + var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); + o.root.onDragStart(x, y); + + o.lastMouseX = e.clientX; + o.lastMouseY = e.clientY; + + if (o.hmode) { + if (o.minX != null) o.minMouseX = e.clientX - x + o.minX; + if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX; + } else { + if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x; + if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x; + } + + if (o.vmode) { + if (o.minY != null) o.minMouseY = e.clientY - y + o.minY; + if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY; + } else { + if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y; + if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y; + } + + document.onmousemove = Drag.drag; + document.onmouseup = Drag.end; + + return false; + }, + + drag : function(e) + { + e = Drag.fixE(e); + var o = Drag.obj; + + var ey = e.clientY; + var ex = e.clientX; + var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); + var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); + var nx, ny; + + if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX); + if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX); + if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY); + if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY); + + nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1)); + ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1)); + + if (o.xMapper) nx = o.xMapper(y) + else if (o.yMapper) ny = o.yMapper(x) + + Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px"; + Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px"; + Drag.obj.lastMouseX = ex; + Drag.obj.lastMouseY = ey; + + Drag.obj.root.onDrag(nx, ny); + return false; + }, + + end : function() + { + document.onmousemove = null; + document.onmouseup = null; + Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), + parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"])); + Drag.obj = null; + }, + + fixE : function(e) + { + if (typeof e == 'undefined') e = window.event; + if (typeof e.layerX == 'undefined') e.layerX = e.offsetX; + if (typeof e.layerY == 'undefined') e.layerY = e.offsetY; + return e; + } +}; diff --git a/Source/udrive/home/admin/www/phpMyAdmin/js/functions.js b/Source/udrive/home/admin/www/phpMyAdmin/js/functions.js new file mode 100644 index 0000000..1524efc --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/js/functions.js @@ -0,0 +1,1214 @@ +/* $Id: functions.js 10296 2007-04-17 16:42:58Z lem9 $ */ + +/** + * @var sql_box_locked lock for the sqlbox textarea in the querybox/querywindow + */ +var sql_box_locked = false; + +/** + * @var array holds elements which content should only selected once + */ +var only_once_elements = new Array(); + +/** + * selects the content of a given object, f.e. a textarea + * + * @param object element element of which the content will be selected + * @param var lock variable which holds the lock for this element + * or true, if no lock exists + * @param boolean only_once if true this is only done once + * f.e. only on first focus + */ +function selectContent( element, lock, only_once ) { + if ( only_once && only_once_elements[element.name] ) { + return; + } + + only_once_elements[element.name] = true; + + if ( lock ) { + return; + } + + element.select(); +} + +/** + * Displays an confirmation box before to submit a "DROP DATABASE" query. + * This function is called while clicking links + * + * @param object the link + * @param object the sql query to submit + * + * @return boolean whether to run the query or not + */ +function confirmLinkDropDB(theLink, theSqlQuery) +{ + // Confirmation is not required in the configuration file + // or browser is Opera (crappy js implementation) + if (confirmMsg == '' || typeof(window.opera) != 'undefined') { + return true; + } + + var is_confirmed = confirm(confirmMsgDropDB + '\n' + confirmMsg + ' :\n' + theSqlQuery); + if (is_confirmed) { + theLink.href += '&is_js_confirmed=1'; + } + + return is_confirmed; +} // end of the 'confirmLinkDropDB()' function + +/** + * Displays an confirmation box before to submit a "DROP/DELETE/ALTER" query. + * This function is called while clicking links + * + * @param object the link + * @param object the sql query to submit + * + * @return boolean whether to run the query or not + */ +function confirmLink(theLink, theSqlQuery) +{ + // Confirmation is not required in the configuration file + // or browser is Opera (crappy js implementation) + if (confirmMsg == '' || typeof(window.opera) != 'undefined') { + return true; + } + + var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery); + if (is_confirmed) { + if ( typeof(theLink.href) != 'undefined' ) { + theLink.href += '&is_js_confirmed=1'; + } else if ( typeof(theLink.form) != 'undefined' ) { + theLink.form.action += '?is_js_confirmed=1'; + } + } + + return is_confirmed; +} // end of the 'confirmLink()' function + + +/** + * Displays an confirmation box before doing some action + * + * @param object the message to display + * + * @return boolean whether to run the query or not + */ +function confirmAction(theMessage) +{ + // TODO: Confirmation is not required in the configuration file + // or browser is Opera (crappy js implementation) + if (typeof(window.opera) != 'undefined') { + return true; + } + + var is_confirmed = confirm(theMessage); + + return is_confirmed; +} // end of the 'confirmAction()' function + + +/** + * Displays an error message if a "DROP DATABASE" statement is submitted + * while it isn't allowed, else confirms a "DROP/DELETE/ALTER" query before + * sumitting it if required. + * This function is called by the 'checkSqlQuery()' js function. + * + * @param object the form + * @param object the sql query textarea + * + * @return boolean whether to run the query or not + * + * @see checkSqlQuery() + */ +function confirmQuery(theForm1, sqlQuery1) +{ + // Confirmation is not required in the configuration file + if (confirmMsg == '') { + return true; + } + + // The replace function (js1.2) isn't supported + else if (typeof(sqlQuery1.value.replace) == 'undefined') { + return true; + } + + // js1.2+ -> validation with regular expressions + else { + // "DROP DATABASE" statement isn't allowed + if (noDropDbMsg != '') { + var drop_re = new RegExp('(^|;)\\s*DROP\\s+(IF EXISTS\\s+)?DATABASE\\s', 'i'); + if (drop_re.test(sqlQuery1.value)) { + alert(noDropDbMsg); + theForm1.reset(); + sqlQuery1.focus(); + return false; + } // end if + } // end if + + // Confirms a "DROP/DELETE/ALTER" statement + // + // TODO: find a way (if possible) to use the parser-analyser + // for this kind of verification + // For now, I just added a ^ to check for the statement at + // beginning of expression + + var do_confirm_re_0 = new RegExp('^DROP\\s+(IF EXISTS\\s+)?(TABLE|DATABASE)\\s', 'i'); + var do_confirm_re_1 = new RegExp('^ALTER\\s+TABLE\\s+((`[^`]+`)|([A-Za-z0-9_$]+))\\s+DROP\\s', 'i'); + var do_confirm_re_2 = new RegExp('^DELETE\\s+FROM\\s', 'i'); + if (do_confirm_re_0.test(sqlQuery1.value) + || do_confirm_re_1.test(sqlQuery1.value) + || do_confirm_re_2.test(sqlQuery1.value)) { + var message = (sqlQuery1.value.length > 100) + ? sqlQuery1.value.substr(0, 100) + '\n ...' + : sqlQuery1.value; + var is_confirmed = confirm(confirmMsg + ' :\n' + message); + // drop/delete/alter statement is confirmed -> update the + // "is_js_confirmed" form field so the confirm test won't be + // run on the server side and allows to submit the form + if (is_confirmed) { + theForm1.elements['is_js_confirmed'].value = 1; + return true; + } + // "DROP/DELETE/ALTER" statement is rejected -> do not submit + // the form + else { + window.focus(); + sqlQuery1.focus(); + return false; + } // end if (handle confirm box result) + } // end if (display confirm box) + } // end confirmation stuff + + return true; +} // end of the 'confirmQuery()' function + + +/** + * Displays an error message if the user submitted the sql query form with no + * sql query, else checks for "DROP/DELETE/ALTER" statements + * + * @param object the form + * + * @return boolean always false + * + * @see confirmQuery() + */ +function checkSqlQuery(theForm) +{ + var sqlQuery = theForm.elements['sql_query']; + var isEmpty = 1; + + // The replace function (js1.2) isn't supported -> basic tests + if (typeof(sqlQuery.value.replace) == 'undefined') { + isEmpty = (sqlQuery.value == '') ? 1 : 0; + if (isEmpty && typeof(theForm.elements['sql_file']) != 'undefined') { + isEmpty = (theForm.elements['sql_file'].value == '') ? 1 : 0; + } + if (isEmpty && typeof(theForm.elements['sql_localfile']) != 'undefined') { + isEmpty = (theForm.elements['sql_localfile'].value == '') ? 1 : 0; + } + if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined') { + isEmpty = (theForm.elements['id_bookmark'].value == null || theForm.elements['id_bookmark'].value == ''); + } + } + // js1.2+ -> validation with regular expressions + else { + var space_re = new RegExp('\\s+'); + if (typeof(theForm.elements['sql_file']) != 'undefined' && + theForm.elements['sql_file'].value.replace(space_re, '') != '') { + return true; + } + if (typeof(theForm.elements['sql_localfile']) != 'undefined' && + theForm.elements['sql_localfile'].value.replace(space_re, '') != '') { + return true; + } + if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined' && + (theForm.elements['id_bookmark'].value != null || theForm.elements['id_bookmark'].value != '') && + theForm.elements['id_bookmark'].selectedIndex != 0 + ) { + return true; + } + // Checks for "DROP/DELETE/ALTER" statements + if (sqlQuery.value.replace(space_re, '') != '') { + if (confirmQuery(theForm, sqlQuery)) { + return true; + } else { + return false; + } + } + theForm.reset(); + isEmpty = 1; + } + + if (isEmpty) { + sqlQuery.select(); + alert(errorMsg0); + sqlQuery.focus(); + return false; + } + + return true; +} // end of the 'checkSqlQuery()' function + + +/** + * Check if a form's element is empty + * should be + * + * @param object the form + * @param string the name of the form field to put the focus on + * + * @return boolean whether the form field is empty or not + */ +function emptyCheckTheField(theForm, theFieldName) +{ + var isEmpty = 1; + var theField = theForm.elements[theFieldName]; + // Whether the replace function (js1.2) is supported or not + var isRegExp = (typeof(theField.value.replace) != 'undefined'); + + if (!isRegExp) { + isEmpty = (theField.value == '') ? 1 : 0; + } else { + var space_re = new RegExp('\\s+'); + isEmpty = (theField.value.replace(space_re, '') == '') ? 1 : 0; + } + + return isEmpty; +} // end of the 'emptyCheckTheField()' function + + +/** + * Displays an error message if an element of a form hasn't been completed and + * should be + * + * @param object the form + * @param string the name of the form field to put the focus on + * + * @return boolean whether the form field is empty or not + */ +function emptyFormElements(theForm, theFieldName) +{ + var theField = theForm.elements[theFieldName]; + var isEmpty = emptyCheckTheField(theForm, theFieldName); + + if (isEmpty) { + theForm.reset(); + theField.select(); + alert(errorMsg0); + theField.focus(); + return false; + } + + return true; +} // end of the 'emptyFormElements()' function + + +/** + * Ensures a value submitted in a form is numeric and is in a range + * + * @param object the form + * @param string the name of the form field to check + * @param integer the minimum authorized value + * @param integer the maximum authorized value + * + * @return boolean whether a valid number has been submitted or not + */ +function checkFormElementInRange(theForm, theFieldName, message, min, max) +{ + var theField = theForm.elements[theFieldName]; + var val = parseInt(theField.value); + + if (typeof(min) == 'undefined') { + min = 0; + } + if (typeof(max) == 'undefined') { + max = Number.MAX_VALUE; + } + + // It's not a number + if (isNaN(val)) { + theField.select(); + alert(errorMsg1); + theField.focus(); + return false; + } + // It's a number but it is not between min and max + else if (val < min || val > max) { + theField.select(); + alert(message.replace('%d', val)); + theField.focus(); + return false; + } + // It's a valid number + else { + theField.value = val; + } + return true; + +} // end of the 'checkFormElementInRange()' function + + +function checkTableEditForm(theForm, fieldsCnt) +{ + // TODO: avoid sending a message if user just wants to add a line + // on the form but has not completed at least one field name + + var atLeastOneField = 0; + var i, elm, elm2, elm3, val, id; + + for (i=0; i 0 ) { + unique_id = this.id; + } else { + return; + } + + if ( typeof(marked_row[unique_id]) == 'undefined' || !marked_row[unique_id] ) { + marked_row[unique_id] = true; + } else { + marked_row[unique_id] = false; + } + + if ( marked_row[unique_id] ) { + this.className += ' marked'; + } else { + this.className = this.className.replace(' marked', ''); + } + + if ( checkbox && checkbox.disabled == false ) { + checkbox.checked = marked_row[unique_id]; + } + } + + // ... and disable label ... + var labeltag = rows[i].getElementsByTagName('label')[0]; + if ( labeltag ) { + labeltag.onclick = function() { + return false; + } + } + // .. and checkbox clicks + var checkbox = rows[i].getElementsByTagName('input')[0]; + if ( checkbox ) { + checkbox.onclick = function() { + // opera does not recognize return false; + this.checked = ! this.checked; + } + } + } +} +window.onload=PMA_markRowsInit; + +/** + * marks all rows and selects its first checkbox inside the given element + * the given element is usaly a table or a div containing the table or tables + * + * @param container DOM element + */ +function markAllRows( container_id ) { + var rows = document.getElementById(container_id).getElementsByTagName('tr'); + var unique_id; + var checkbox; + + for ( var i = 0; i < rows.length; i++ ) { + + checkbox = rows[i].getElementsByTagName( 'input' )[0]; + + if ( checkbox && checkbox.type == 'checkbox' ) { + unique_id = checkbox.name + checkbox.value; + if ( checkbox.disabled == false ) { + checkbox.checked = true; + if ( typeof(marked_row[unique_id]) == 'undefined' || !marked_row[unique_id] ) { + rows[i].className += ' marked'; + marked_row[unique_id] = true; + } + } + } + } + + return true; +} + +/** + * marks all rows and selects its first checkbox inside the given element + * the given element is usaly a table or a div containing the table or tables + * + * @param container DOM element + */ +function unMarkAllRows( container_id ) { + var rows = document.getElementById(container_id).getElementsByTagName('tr'); + var unique_id; + var checkbox; + + for ( var i = 0; i < rows.length; i++ ) { + + checkbox = rows[i].getElementsByTagName( 'input' )[0]; + + if ( checkbox && checkbox.type == 'checkbox' ) { + unique_id = checkbox.name + checkbox.value; + checkbox.checked = false; + rows[i].className = rows[i].className.replace(' marked', ''); + marked_row[unique_id] = false; + } + } + + return true; +} + +/** + * Sets/unsets the pointer and marker in browse mode + * + * @param object the table row + * @param integer the row number + * @param string the action calling this script (over, out or click) + * @param string the default background color + * @param string the color to use for mouseover + * @param string the color to use for marking a row + * + * @return boolean whether pointer is set or not + */ +function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor) +{ + var theCells = null; + + // 1. Pointer and mark feature are disabled or the browser can't get the + // row -> exits + if ((thePointerColor == '' && theMarkColor == '') + || typeof(theRow.style) == 'undefined') { + return false; + } + + // 1.1 Sets the mouse pointer to pointer on mouseover and back to normal otherwise. + if (theAction == "over" || theAction == "click") { + theRow.style.cursor='pointer'; + } else { + theRow.style.cursor='default'; + } + + // 2. Gets the current row and exits if the browser can't get it + if (typeof(document.getElementsByTagName) != 'undefined') { + theCells = theRow.getElementsByTagName('td'); + } + else if (typeof(theRow.cells) != 'undefined') { + theCells = theRow.cells; + } + else { + return false; + } + + // 3. Gets the current color... + var rowCellsCnt = theCells.length; + var domDetect = null; + var currentColor = null; + var newColor = null; + // 3.1 ... with DOM compatible browsers except Opera that does not return + // valid values with "getAttribute" + if (typeof(window.opera) == 'undefined' + && typeof(theCells[0].getAttribute) != 'undefined') { + currentColor = theCells[0].getAttribute('bgcolor'); + domDetect = true; + } + // 3.2 ... with other browsers + else { + currentColor = theCells[0].style.backgroundColor; + domDetect = false; + } // end 3 + + // 3.3 ... Opera changes colors set via HTML to rgb(r,g,b) format so fix it + if (currentColor.indexOf("rgb") >= 0) + { + var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1, + currentColor.indexOf(')')); + var rgbValues = rgbStr.split(","); + currentColor = "#"; + var hexChars = "0123456789ABCDEF"; + for (var i = 0; i < 3; i++) + { + var v = rgbValues[i].valueOf(); + currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16); + } + } + + // 4. Defines the new color + // 4.1 Current color is the default one + if (currentColor == '' + || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) { + if (theAction == 'over' && thePointerColor != '') { + newColor = thePointerColor; + } + else if (theAction == 'click' && theMarkColor != '') { + newColor = theMarkColor; + marked_row[theRowNum] = true; + // Garvin: deactivated onclick marking of the checkbox because it's also executed + // when an action (like edit/delete) on a single item is performed. Then the checkbox + // would get deactived, even though we need it activated. Maybe there is a way + // to detect if the row was clicked, and not an item therein... + // document.getElementById('id_rows_to_delete' + theRowNum).checked = true; + } + } + // 4.1.2 Current color is the pointer one + else if (currentColor.toLowerCase() == thePointerColor.toLowerCase() + && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) { + if (theAction == 'out') { + newColor = theDefaultColor; + } + else if (theAction == 'click' && theMarkColor != '') { + newColor = theMarkColor; + marked_row[theRowNum] = true; + // document.getElementById('id_rows_to_delete' + theRowNum).checked = true; + } + } + // 4.1.3 Current color is the marker one + else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) { + if (theAction == 'click') { + newColor = (thePointerColor != '') + ? thePointerColor + : theDefaultColor; + marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum]) + ? true + : null; + // document.getElementById('id_rows_to_delete' + theRowNum).checked = false; + } + } // end 4 + + // 5. Sets the new color... + if (newColor) { + var c = null; + // 5.1 ... with DOM compatible browsers except Opera + if (domDetect) { + for (c = 0; c < rowCellsCnt; c++) { + theCells[c].setAttribute('bgcolor', newColor, 0); + } // end for + } + // 5.2 ... with other browsers + else { + for (c = 0; c < rowCellsCnt; c++) { + theCells[c].style.backgroundColor = newColor; + } + } + } // end 5 + + return true; +} // end of the 'setPointer()' function + +/* + * Sets/unsets the pointer and marker in vertical browse mode + * + * @param object the table row + * @param integer the column number + * @param string the action calling this script (over, out or click) + * @param string the default background Class + * @param string the Class to use for mouseover + * @param string the Class to use for marking a row + * + * @return boolean whether pointer is set or not + * + * @author Garvin Hicking (rewrite of setPointer.) + */ +function setVerticalPointer(theRow, theColNum, theAction, theDefaultClass1, theDefaultClass2, thePointerClass, theMarkClass) { + // 1. Pointer and mark feature are disabled or the browser can't get the + // row -> exits + if ((thePointerClass == '' && theMarkClass == '') + || typeof(theRow.style) == 'undefined') { + return false; + } + + var tagSwitch = null; + + // 2. Gets the current row and exits if the browser can't get it + if (typeof(document.getElementsByTagName) != 'undefined') { + tagSwitch = 'tag'; + } else if (typeof(document.getElementById('table_results')) != 'undefined') { + tagSwitch = 'cells'; + } else { + return false; + } + + var theCells = null; + + if (tagSwitch == 'tag') { + theRows = document.getElementById('table_results').getElementsByTagName('tr'); + theCells = theRows[1].getElementsByTagName('td'); + } else if (tagSwitch == 'cells') { + theRows = document.getElementById('table_results').rows; + theCells = theRows[1].cells; + } + + // 3. Gets the current Class... + var currentClass = null; + var newClass = null; + + // 3.1 ... with DOM compatible browsers except Opera that does not return + // valid values with "getAttribute" + if (typeof(window.opera) == 'undefined' + && typeof(theCells[theColNum].getAttribute) != 'undefined') { + currentClass = theCells[theColNum].className; + } // end 3 + + // 4. Defines the new Class + // 4.1 Current Class is the default one + if (currentClass == '' + || currentClass.toLowerCase() == theDefaultClass1.toLowerCase() + || currentClass.toLowerCase() == theDefaultClass2.toLowerCase()) { + if (theAction == 'over' && thePointerClass != '') { + newClass = thePointerClass; + } else if (theAction == 'click' && theMarkClass != '') { + newClass = theMarkClass; + marked_row[theColNum] = true; + } + } + // 4.1.2 Current Class is the pointer one + else if (currentClass.toLowerCase() == thePointerClass.toLowerCase() && + (typeof(marked_row[theColNum]) == 'undefined' || !marked_row[theColNum]) || marked_row[theColNum] == false) { + if (theAction == 'out') { + if (theColNum % 2) { + newClass = theDefaultClass1; + } else { + newClass = theDefaultClass2; + } + } + else if (theAction == 'click' && theMarkClass != '') { + newClass = theMarkClass; + marked_row[theColNum] = true; + } + } + // 4.1.3 Current Class is the marker one + else if (currentClass.toLowerCase() == theMarkClass.toLowerCase()) { + if (theAction == 'click') { + newClass = (thePointerClass != '') + ? thePointerClass + : ((theColNum % 2) ? theDefaultClass2 : theDefaultClass1); + marked_row[theColNum] = false; + } + } // end 4 + + // 5 ... with DOM compatible browsers except Opera + + if (newClass) { + var c = null; + var rowCnt = theRows.length; + for (c = 0; c < rowCnt; c++) { + if (tagSwitch == 'tag') { + Cells = theRows[c].getElementsByTagName('td'); + } else if (tagSwitch == 'cells') { + Cells = theRows[c].cells; + } + + Cell = Cells[theColNum]; + + // 5.1 Sets the new Class... + Cell.className = Cell.className.replace(currentClass, newClass); + } // end for + } // end 5 + + return true; + } // end of the 'setVerticalPointer()' function + +/** + * Checks/unchecks all checkbox in given conainer (f.e. a form, fieldset or div) + * + * @param string container_id the container id + * @param boolean state new value for checkbox (true or false) + * @return boolean always true + */ +function setCheckboxes( container_id, state ) { + var checkboxes = document.getElementById(container_id).getElementsByTagName('input'); + + for ( var i = 0; i < checkboxes.length; i++ ) { + if ( checkboxes[i].type == 'checkbox' ) { + checkboxes[i].checked = state; + } + } + + return true; +} // end of the 'setCheckboxes()' function + + +// added 2004-05-08 by Michael Keck +// copy the checked from left to right or from right to left +// so it's easier for users to see, if $cfg['ModifyAtRight']=true, what they've checked ;) +function copyCheckboxesRange(the_form, the_name, the_clicked) +{ + if (typeof(document.forms[the_form].elements[the_name]) != 'undefined' && typeof(document.forms[the_form].elements[the_name + 'r']) != 'undefined') { + if (the_clicked !== 'r') { + if (document.forms[the_form].elements[the_name].checked == true) { + document.forms[the_form].elements[the_name + 'r'].checked = true; + }else { + document.forms[the_form].elements[the_name + 'r'].checked = false; + } + } else if (the_clicked == 'r') { + if (document.forms[the_form].elements[the_name + 'r'].checked == true) { + document.forms[the_form].elements[the_name].checked = true; + }else { + document.forms[the_form].elements[the_name].checked = false; + } + } + } +} + + +// added 2004-05-08 by Michael Keck +// - this was directly written to each td, so why not a function ;) +// setCheckboxColumn(\'id_rows_to_delete' . $row_no . ''\'); +function setCheckboxColumn(theCheckbox){ + if (document.getElementById(theCheckbox)) { + document.getElementById(theCheckbox).checked = (document.getElementById(theCheckbox).checked ? false : true); + if (document.getElementById(theCheckbox + 'r')) { + document.getElementById(theCheckbox + 'r').checked = document.getElementById(theCheckbox).checked; + } + } else { + if (document.getElementById(theCheckbox + 'r')) { + document.getElementById(theCheckbox + 'r').checked = (document.getElementById(theCheckbox +'r').checked ? false : true); + if (document.getElementById(theCheckbox)) { + document.getElementById(theCheckbox).checked = document.getElementById(theCheckbox + 'r').checked; + } + } + } +} + + +/** + * Checks/unchecks all options of a '; + for (i =0; i < 12; i++) { + if (i == month) selected = ' selected="selected"'; + else selected = ''; + str += ''; + } + str += ''; + str += ' »'; + str += ''; + str += ''; + str += '
'; + str += '« '; + str += ''; + str += ' »'; + str += '
'; + str += ''; + + str += ''; + for (i = 0; i < 7; i++) { + str += ""; + } + str += ""; + + var firstDay = new Date(year, month, 1).getDay(); + var lastDay = new Date(year, month + 1, 0).getDate(); + + str += ""; + + dayInWeek = 0; + for (i = 0; i < firstDay; i++) { + str += ""; + dayInWeek++; + } + for (i = 1; i <= lastDay; i++) { + if (dayInWeek == 7) { + str += ""; + dayInWeek = 0; + } + + dispmonth = 1 + month; + + if (window.opener.dateType == 'datetime' || window.opener.dateType == 'date') { + actVal = "" + formatNum4(year) + "-" + formatNum2(dispmonth, 'month') + "-" + formatNum2(i, 'day'); + } else { + actVal = "" + formatNum4(year) + formatNum2(dispmonth, 'month') + formatNum2(i, 'day'); + } + if (i == day) { + style = ' class="selected"'; + current_date = actVal; + } else { + style = ''; + } + str += "" + i + "" + dayInWeek++; + } + for (i = dayInWeek; i < 7; i++) { + str += ""; + } + + str += "
" + day_names[i] + "
 
 
"; + + cnt.innerHTML = str; + + // Should we handle time also? + if (window.opener.dateType != 'date' && !clock_set) { + + if (document.getElementById) { + cnt = document.getElementById("clock_data"); + } else if (document.all) { + cnt = document.all["clock_data"]; + } + + str = ''; + init_hour = hour; + init_minute = minute; + init_second = second; + str += '
'; + str += ':'; + str += ':'; + str += ''; + str += '
'; + str += ''; + str += '
'; + + cnt.innerHTML = str; + clock_set = 1; + } + +} + +/** + * Returns date from calendar. + * + * @param string date text + */ +function returnDate(d) { + txt = d; + if (window.opener.dateType != 'date') { + // need to get time + h = parseInt(document.getElementById('hour').value,10); + m = parseInt(document.getElementById('minute').value,10); + s = parseInt(document.getElementById('second').value,10); + if (window.opener.dateType == 'datetime') { + txt += ' ' + formatNum2(h, 'hour') + ':' + formatNum2(m, 'minute') + ':' + formatNum2(s, 'second'); + } else { + // timestamp + txt += formatNum2(h, 'hour') + formatNum2(m, 'minute') + formatNum2(s, 'second'); + } + } + + window.opener.dateField.value = txt; + window.close(); +} diff --git a/Source/udrive/home/admin/www/phpMyAdmin/js/tooltip.js b/Source/udrive/home/admin/www/phpMyAdmin/js/tooltip.js new file mode 100644 index 0000000..9bb04eb --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/js/tooltip.js @@ -0,0 +1,194 @@ +/* $Id: tooltip.js 7886 2005-11-23 19:10:30Z nijel $ */ + + +/** + * Displays the Tooltips (hints), if we have some + * 2005-01-20 added by Michael Keck (mkkeck) + */ + +var ttXpos = 0, ttYpos = 0; +var ttXadd = 10, ttYadd = -10; +var ttDisplay = 0, ttHoldIt = 0; +// Check if browser does support dynamic content and dhtml +var ttNS4 = (document.layers) ? 1 : 0; // the old Netscape 4 +var ttIE4 = (document.all) ? 1 : 0; // browser wich uses document.all +var ttDOM = (document.getElementById) ? 1 : 0; // DOM-compatible browsers +if (ttDOM) { // if DOM-compatible, set the others to false + ttNS4 = 0; + ttIE4 = 0; +} + +var myTooltipContainer = null; + +if ( (ttDOM) || (ttIE4) || (ttNS4) ) { + // mouse-event + if ( ttNS4 ) { + document.captureEvents(Event.MOUSEMOVE); + } else { + document.onmousemove = mouseMove; + } +} + +/** + * init the tooltip and write the text into it + * + * @param string theText tooltip content + */ +function textTooltip(theText) { + if (ttDOM || ttIE4) { // document.getEelementById || document.all + myTooltipContainer.innerHTML = ""; // we should empty it first + myTooltipContainer.innerHTML = theText; + } else if (ttNS4) { // document.layers + var layerNS4 = myTooltipContainer.document; + layerNS4.write(theText); + layerNS4.close(); + } +} + +/** + * @var integer + */ +var ttTimerID = 0; + +/** + * swap the Tooltip // show and hide + * + * @param boolean stat view status + */ +function swapTooltip(stat) { + if (ttHoldIt!=1) { + if (stat!='default') { + if (stat=='true') + showTooltip(true); + else if (stat=='false') + showTooltip(false); + } else { + if (ttDisplay) + ttTimerID = setTimeout("showTooltip(false);",500); + else + showTooltip(true); + } + } else { + if (ttTimerID) { + clearTimeout(ttTimerID); + ttTimerID = 0; + } + showTooltip(true); + } +} + +/** + * show / hide the Tooltip + * + * @param boolean stat view status + */ +function showTooltip(stat) { + if (stat==false) { + if (ttNS4) + myTooltipContainer.visibility = "hide"; + else + myTooltipContainer.style.visibility = "hidden"; + ttDisplay = 0; + } else { + if (ttNS4) + myTooltipContainer.visibility = "show"; + else + myTooltipContainer.style.visibility = "visible"; + ttDisplay = 1; + } +} +/** + * hold it, if we create or move the mouse over the tooltip + */ +function holdTooltip() { + ttHoldIt = 1; + swapTooltip('true'); + ttHoldIt = 0; +} + +/** + * move the tooltip to mouse position + * + * @param integer posX horiz. position + * @param integer posY vert. position + */ +function moveTooltip(posX, posY) { + if (ttDOM || ttIE4) { + myTooltipContainer.style.left = posX + "px"; + myTooltipContainer.style.top = posY + "px"; + } else if (ttNS4) { + myTooltipContainer.left = posX; + myTooltipContainer.top = posY; + } +} + +/** + * build the tooltip + * + * @param string theText tooltip content + */ +function pmaTooltip( theText ) { + // reference to TooltipContainer + if ( null == myTooltipContainer ) { + if (ttNS4) { + myTooltipContainer = document.TooltipContainer; + } else if (ttIE4) { + myTooltipContainer = document.all('TooltipContainer'); + } else if (ttDOM) { + myTooltipContainer = document.getElementById('TooltipContainer'); + } else { + return; + } + + if ( typeof( myTooltipContainer ) == 'undefined' ) { + return; + } + } + + var plusX=0, plusY=0, docX=0, docY=0; + var divHeight = myTooltipContainer.clientHeight; + var divWidth = myTooltipContainer.clientWidth; + if (navigator.appName.indexOf("Explorer")!=-1) { + if (document.documentElement && document.documentElement.scrollTop) { + plusX = document.documentElement.scrollLeft; + plusY = document.documentElement.scrollTop; + docX = document.documentElement.offsetWidth + plusX; + docY = document.documentElement.offsetHeight + plusY; + } else { + plusX = document.body.scrollLeft; + plusY = document.body.scrollTop; + docX = document.body.offsetWidth + plusX; + docY = document.body.offsetHeight + plusY; + } + } else { + docX = document.body.clientWidth; + docY = document.body.clientHeight; + } + + ttXpos = ttXpos + plusX; + ttYpos = ttYpos + plusY; + + if ((ttXpos + divWidth) > docX) + ttXpos = ttXpos - (divWidth + (ttXadd * 2)); + if ((ttYpos + divHeight) > docY) + ttYpos = ttYpos - (divHeight + (ttYadd * 2)); + + textTooltip(theText); + moveTooltip((ttXpos + ttXadd), (ttYpos + ttYadd)); + holdTooltip(); +} + +/** + * register mouse moves + * + * @param event e + */ +function mouseMove(e) { + if ( typeof( event ) != 'undefined' ) { + ttXpos = event.x; + ttYpos = event.y; + } else { + ttXpos = e.pageX; + ttYpos = e.pageY; + } +} diff --git a/Source/udrive/home/admin/www/phpMyAdmin/js/user_password.js b/Source/udrive/home/admin/www/phpMyAdmin/js/user_password.js new file mode 100644 index 0000000..b0c84b0 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/js/user_password.js @@ -0,0 +1,192 @@ +/* $Id: user_password.js 7886 2005-11-23 19:10:30Z nijel $ */ + + +/** + * Validates the password field in a form + * + * @param object the form + * + * @return boolean whether the field value is valid or not + */ +function checkPassword(the_form) +{ + // Gets the elements pointers + if (the_form.name == 'addUserForm' || the_form.name == 'chgPassword') { + var pswd_index = 1; + var pswd1_name = 'pma_pw'; + var pswd2_name = 'pma_pw2'; + } else { + pswd_index = 2; + pswd1_name = 'new_pw'; + pswd2_name = 'new_pw2'; + } + + // Validates + if (the_form.elements['nopass'][pswd_index].checked) { + if (the_form.elements[pswd1_name].value == '') { + alert(jsPasswordEmpty); + the_form.elements[pswd2_name].value = ''; + the_form.elements[pswd1_name].focus(); + return false; + } else if (the_form.elements[pswd1_name].value != the_form.elements[pswd2_name].value) { + alert(jsPasswordNotSame); + the_form.elements[pswd1_name].value = ''; + the_form.elements[pswd2_name].value = ''; + the_form.elements[pswd1_name].focus(); + return false; + } // end if...else if + } // end if + + return true; +} // end of the 'checkPassword()' function + + +/** + * Validates the "add an user" form + * + * @return boolean whether the form is validated or not + */ +function checkAddUser() +{ + var the_form = document.forms['addUserForm']; + + if (the_form.elements['anyhost'][1].checked && the_form.elements['host'].value == '') { + alert(jsHostEmpty); + the_form.elements['host'].focus(); + return false; + } + + if (the_form.elements['anyuser'][1].checked && the_form.elements['pma_user'].value == '') { + alert(jsUserEmpty); + the_form.elements['pma_user'].focus(); + return false; + } + + return checkPassword(the_form); +} // end of the 'checkAddUser()' function + + +/** + * Validates the "update a profile" form + * + * @return boolean whether the form is validated or not + */ +function checkUpdProfile() +{ + var the_form = document.forms['updUserForm']; + + if (the_form.elements['anyhost'][1].checked && the_form.elements['new_server'].value == '') { + alert(jsHostEmpty); + the_form.elements['new_server'].focus(); + return false; + } + + if (the_form.elements['anyuser'][1].checked && the_form.elements['new_user'].value == '') { + alert(jsUserEmpty); + the_form.elements['new_user'].focus(); + return false; + } + + return checkPassword(the_form); +} // end of the 'checkUpdProfile()' function + + +/** + * Gets the list of selected options in combo + * + * @param object the form to check + * + * @return string the list of selected options + */ +function getSelected(the_field) { + var the_list = ''; + var opts = the_field.options; + var opts_cnt = opts.length; + + for (var i = 0; i < opts_cnt; i++) { + if (opts[i].selected) { + the_list += opts[i].text + ', '; + } + } // end for + + return the_list.substring(0, the_list.length - 2); +} // end of the 'getSelected()' function + + +/** + * Reloads the page to get tables names in a database or fields names in a + * table + * + * @param object the input text box to build the query from + */ +function change(the_field) { + var l = location.href; + var lpos = l.indexOf('?lang'); + var box_name = the_field.name; + var the_form = the_field.form.elements; + var sel_idx = null; + + if (box_name == 'newdb') { + the_form['anydb'][0].checked = true; + the_form['anytable'][0].checked = true; + the_form['anycolumn'][0].checked = true; + if (typeof(the_form['dbgrant']) != 'undefined') { + the_form['dbgrant'].selectedIndex = -1; + } + if (typeof(the_form['tablegrant']) != 'undefined') { + the_form['tablegrant'].selectedIndex = -1; + } + if (typeof(the_form['colgrant']) != 'undefined') { + the_form['colgrant'].selectedIndex = -1; + } + } + else { + if (lpos <= 0) { + l += '?lang=' + the_form['lang'].value + + '&convcharset=' . the_form['convcharset'].value + + '&server=' + the_form['server'].value + + '&grants=1' + + '&host=' + escape(the_form['host'].value) + + '&pma_user=' + escape(the_form['pma_user'].value); + sel_idx = the_form['dbgrant'].selectedIndex; + if (sel_idx > 0) { + l += '&dbgrant=' + escape(the_form['dbgrant'].options[sel_idx].text); + } + sel_idx = the_form['tablegrant'].selectedIndex; + if (sel_idx > 0) { + l += '&tablegrant=' + escape(the_form['tablegrant'].options[sel_idx].text); + } + } + + var lpos = l.indexOf('&' + box_name); + if (lpos > 0) { + l = l.substring(0, lpos); + } // end if + + location.href = l + '&' + box_name + '=' + escape(getSelected(the_field)); + } + +} // end of the 'change()' function + + +/** + * Checks/unchecks all privileges + * + * @param string the form name + * @param boolean whether to check or to uncheck the element + * + * @return boolean always true + */ +function checkForm(the_form, do_check) { + var elts = document.forms[the_form].elements; + var elts_cnt = elts.length; + + for (var i = 0; i < elts_cnt; i++) { + var whichElt = elts[i].name; + if (whichElt.indexOf('_priv') >= 0) { + document.forms[the_form].elements[whichElt].checked = do_check; + } // end if + } // end for + + return true; +} // end of the 'checkForm()' function diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/add_message.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/add_message.sh new file mode 100644 index 0000000..db16c67 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/add_message.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# $Id: add_message.sh 9537 2006-10-12 16:27:13Z nijel $ +# +# Shell script that adds a message to all message files (Lem9) +# +# Example: add_message.sh '$strNewMessage' 'new message contents' +# + +if [ $# -ne 2 ] ; then + echo "usage: add_message.sh '\$strNewMessage' 'new message contents'" + exit 1 +fi + +for file in *.inc.php +do + echo $file " " + grep -v '?>' ${file} > ${file}.new + case $file in + english*) + echo "$1 = '"$2"';" >> ${file}.new + ;; + *) + echo "$1 = '"$2"'; //to translate" >> ${file}.new + ;; + esac + echo "?>" >> ${file}.new + rm $file + mv ${file}.new $file +done +./sort_lang.sh english* +echo " " +echo "Message added to all message files (including english)" diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/add_message_file.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/add_message_file.sh new file mode 100644 index 0000000..f613dbe --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/add_message_file.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# $Id: add_message_file.sh 7364 2005-09-24 08:49:52Z nijel $ +# +# Shell script that adds a message file to all message files +# adding "//to translate" on each line +# +# Example: add_message_file.sh xxx +# +if [ $# -ne 1 ] ; then + echo "usage: add_message_file.sh filename" + exit 1 +fi + +for file in *.inc.php +do + echo $file " " + grep -v '?>' ${file} > ${file}.new + case $file in + english*) + sed -n 's/\(.*\);/\1;/p' $1 >> ${file}.new + ;; + *) + sed -n 's/\(.*\);/\1; \/\/to translate/p' $1 >> ${file}.new + ;; + esac + echo "?>" >> ${file}.new + rm $file + mv ${file}.new $file +done +./sort_lang.sh english* +echo " " +echo "Messages added to add message files (including english)" diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/check_lang.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/check_lang.sh new file mode 100644 index 0000000..ec9e430 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/check_lang.sh @@ -0,0 +1,62 @@ +#!/bin/sh +# $Id: check_lang.sh 9393 2006-09-08 11:28:23Z lem9 $ +## +# Shell script to check that all language files are syncronized +# Catches duplicate/missing strings +# +# Robin Johnson +# August 9, 2002 +## + +MASTER="english-iso-8859-1.inc.php" +TMPDIR="tmp-check" +FILEPAT="*.inc.php" +STRINGMATCH='^[[:space:]]*\$[[:alnum:]_]+[[:blank:]]+=' +IGNOREMATCH='strEncto|strKanjiEncodConvert|strXkana|allow_recoding|doc_lang' + +if [ "`which diffstat`" = "" ] ; then + echo 'You need diffstat to use this!' + exit 1 +fi + +rm -rf $TMPDIR +mkdir -p $TMPDIR + +# Build the list of variables in each file +echo "Building data" +for f in $FILEPAT; +do + awk "/$STRINGMATCH/ && ! /$IGNOREMATCH/ { print \$1 }" $f | sort > $TMPDIR/$f +done + + +# Build the diff files used for checking +# And if there are no differences, delete the empty files +echo "Comparing data" +for f in $FILEPAT; +do + if [ ! $MASTER = $f ]; then + if diff -u $TMPDIR/$MASTER $TMPDIR/$f >$TMPDIR/$f.diff ; then + rm -f $TMPDIR/$f.diff $TMPDIR/$f + fi + fi +done + +# Cleanup +rm -f $TMPDIR/$MASTER + +# Build the nice difference table +echo "Differences" +diffstat -f 0 $TMPDIR/*.diff >$TMPDIR/diffstat 2>/dev/null +echo "Dupe Miss Filename" +head -n -1 $TMPDIR/diffstat | \ +while read filename sep change add plus sub minus edits exclaim; +do + echo "$add $sub $filename"; +done + +echo +echo "Dupe = Duplicate Variables" +echo "Miss = Missing Variables" +echo "For exact problem listings, look in the $TMPDIR/ directory" +echo "Please remember to remove '$TMPDIR/' once you are done" diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/english-utf-8.inc.php b/Source/udrive/home/admin/www/phpMyAdmin/lang/english-utf-8.inc.php new file mode 100644 index 0000000..8cbb1f6 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/english-utf-8.inc.php @@ -0,0 +1,1031 @@ +$cfg[\'BZipDump\'] directive in your phpMyAdmin configuration file to FALSE. If you want to use the Bz2 compression features, you should upgrade to a newer PHP version. See PHP bug report %s for details.'; +$strBzip = '"bzipped"'; + +$strCalendar = 'Calendar'; +$strCancel = 'Cancel'; +$strCanNotLoadExportPlugins = 'Could not load export plugins, please check your installation!'; +$strCanNotLoadImportPlugins = 'Could not load import plugins, please check your installation!'; +$strCannotLogin = 'Cannot log in to the MySQL server'; +$strCantLoad = 'Cannot load [a@http://php.net/%1$s@Documentation][em]%1$s[/em][/a] extension. Please check your PHP configuration.'; +$strCantLoadRecodeIconv = 'Couldn\'t load the iconv or recode extension needed for charset conversion. Either configure PHP to enable these extensions or disable charset conversion in phpMyAdmin.'; +$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!'; +$strCantUseRecodeIconv = 'Couldn\'t use either the iconv, libiconv or recode_string functions, although the necessary extensions appear to be loaded. Check your PHP configuration.'; +$strCardinality = 'Cardinality'; +$strCaseInsensitive = 'case-insensitive'; +$strCaseSensitive = 'case-sensitive'; +$strCentralEuropean = 'Central European'; +$strChange = 'Change'; +$strChangeCopyModeCopy = '... keep the old one.'; +$strChangeCopyMode = 'Create a new user with the same privileges and ...'; +$strChangeCopyModeDeleteAndReload = ' ... delete the old one from the user tables and reload the privileges afterwards.'; +$strChangeCopyModeJustDelete = ' ... delete the old one from the user tables.'; +$strChangeCopyModeRevoke = ' ... revoke all active privileges from the old one and delete it afterwards.'; +$strChangeCopyUser = 'Change Login Information / Copy User'; +$strChangeDisplay = 'Choose field to display'; +$strChangePassword = 'Change password'; +$strCharset = 'Charset'; +$strCharsetOfFile = 'Character set of the file:'; +$strCharsetsAndCollations = 'Character Sets and Collations'; +$strCharsets = 'Charsets'; +$strCheckAll = 'Check All'; +$strCheckOverhead = 'Check tables having overhead'; +$strCheckPrivs = 'Check Privileges'; +$strCheckPrivsLong = 'Check privileges for database "%s".'; +$strCheckTable = 'Check table'; +$strChoosePage = 'Please choose a page to edit'; +$strColComFeat = 'Displaying Column Comments'; +$strCollation = 'Collation'; +$strColumnNames = 'Column names'; +$strColumnPrivileges = 'Column-specific privileges'; +$strCommand = 'Command'; +$strComments = 'Comments'; +$strCommentsForTable = 'COMMENTS FOR TABLE'; +$strCompatibleHashing = 'MySQL 4.0 compatible'; +$strCompleteInserts = 'Complete inserts'; +$strCompression = 'Compression'; +$strCompressionWillBeDetected = 'Imported file compression will be automatically detected from: %s'; +$strConfigDefaultFileError = 'Could not load default configuration from: "%1$s"'; +$strConfigFileError = 'phpMyAdmin was unable to read your configuration file!
This might happen if PHP finds a parse error in it or PHP cannot find the file.
Please call the configuration file directly using the link below and read the PHP error message(s) that you receive. In most cases a quote or a semicolon is missing somewhere.
If you receive a blank page, everything is fine.'; +$strConfigureTableCoord = 'Please configure the coordinates for table %s'; +$strConnectionError = 'Cannot connect: invalid settings.'; +$strConnections = 'Connections'; +$strConstraintsForDumped = 'Constraints for dumped tables'; +$strConstraintsForTable = 'Constraints for table'; +$strCookiesRequired = 'Cookies must be enabled past this point.'; +$strCopy = 'Copy'; +$strCopyDatabaseOK = 'Database %s has been copied to %s'; +$strCopyTable = 'Copy table to (database.table):'; +$strCopyTableOK = 'Table %s has been copied to %s.'; +$strCopyTableSameNames = 'Can\'t copy table to same one!'; +$strCouldNotKill = 'phpMyAdmin was unable to kill thread %s. It probably has already been closed.'; +$strCreate = 'Create'; +$strCreateDatabaseBeforeCopying = 'CREATE DATABASE before copying'; +$strCreateIndex = 'Create an index on %s columns'; +$strCreateIndexTopic = 'Create a new index'; +$strCreateNewDatabase = 'Create new database'; +$strCreateNewTable = 'Create new table on database %s'; +$strCreatePage = 'Create a new page'; +$strCreatePdfFeat = 'Creation of PDFs'; +$strCreateRelation = 'Create relation'; +$strCreateTable = 'Create table'; +$strCreateUserDatabase = 'Database for user'; +$strCreateUserDatabaseName = 'Create database with same name and grant all privileges'; +$strCreateUserDatabaseNone = 'None'; +$strCreateUserDatabaseWildcard = 'Grant all privileges on wildcard name (username\_%)'; +$strCreationDates = 'Creation/Update/Check dates'; +$strCriteria = 'Criteria'; +$strCroatian = 'Croatian'; +$strCSV = 'CSV'; +$strCSVImportOptions = 'CSV options'; +$strCSVOptions = 'CSV options'; +$strCyrillic = 'Cyrillic'; +$strCzech = 'Czech'; +$strCzechSlovak = 'Czech-Slovak'; + +$strDanish = 'Danish'; +$strDatabase = 'Database'; +$strDatabaseEmpty = 'The database name is empty!'; +$strDatabaseExportOptions = 'Database export options'; +$strDatabaseHasBeenDropped = 'Database %s has been dropped.'; +$strDatabaseNoTable = 'This database contains no table!'; +$strDatabases = 'Databases'; +$strDatabasesDropped = '%s databases have been dropped successfully.'; +$strDatabasesStats = 'Databases statistics'; +$strDatabasesStatsDisable = 'Disable Statistics'; +$strDatabasesStatsEnable = 'Enable Statistics'; +$strDatabasesStatsHeavyTraffic = 'Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'; +$strData = 'Data'; +$strDataDict = 'Data Dictionary'; +$strDataOnly = 'Data only'; +$strDataPages = 'Pages containing data'; +$strDBComment = 'Database comment: '; +$strDBCopy = 'Copy database to'; +$strDbIsEmpty = 'Database seems to be empty!'; +$strDbPrivileges = 'Database-specific privileges'; +$strDBRename = 'Rename database to'; +$strDbSpecific = 'database-specific'; +$strDefault = 'Default'; +$strDefaultEngine = '%s is the default storage engine on this MySQL server.'; +$strDefaultValueHelp = 'For default values, please enter just a single value, without backslash escaping or quotes, using this format: a'; +$strDefragment = 'Defragment table'; +$strDelayedInserts = 'Use delayed inserts'; +$strDeleteAndFlush = 'Delete the users and reload the privileges afterwards.'; +$strDeleteAndFlushDescr = 'This is the cleanest way, but reloading the privileges may take a while.'; +$strDelete = 'Delete'; +$strDeletedRows = 'Deleted rows:'; +$strDeleted = 'The row has been deleted'; +$strDeleteNoUsersSelected = 'No users selected for deleting!'; +$strDeleteRelation = 'Delete relation'; +$strDeleting = 'Deleting %s'; +$strDelimiter = 'Delimiter'; +$strDelOld = 'The current page has references to tables that no longer exist. Would you like to delete those references?'; +$strDescending = 'Descending'; +$strDescription = 'Description'; +$strDesigner = 'Designer'; +$strDesignerHelpDisplayField = 'The display field is shown in pink. To set/unset a field as the display field, click the "Choose field to display" icon, then click on the appropriate field name.'; +$strDictionary = 'dictionary'; +$strDirectLinks = 'Direct links'; +$strDirtyPages = 'Dirty pages'; +$strDisabled = 'Disabled'; +$strDisableForeignChecks = 'Disable foreign key checks'; +$strDisplayFeat = 'Display Features'; +$strDisplayOrder = 'Display order:'; +$strDisplayPDF = 'Display PDF schema'; +$strDoAQuery = 'Do a "query by example" (wildcard: "%")'; +$strDocSQL = 'DocSQL'; +$strDocSQLOptions = 'DocSQL options'; +$strDocu = 'Documentation'; +$strDoYouReally = 'Do you really want to '; +$strDropDatabaseStrongWarning = 'You are about to DESTROY a complete database!'; +$strDrop = 'Drop'; +$strDropUsersDb = 'Drop the databases that have the same names as the users.'; +$strDumpingData = 'Dumping data for table'; +$strDumpSaved = 'Dump has been saved to file %s.'; +$strDumpXRows = 'Dump %s row(s) starting at record # %s.'; +$strDynamic = 'dynamic'; + +$strEdit = 'Edit'; +$strEditPDFPages = 'Edit PDF Pages'; +$strEditPrivileges = 'Edit Privileges'; +$strEffective = 'Effective'; +$strEmpty = 'Empty'; +$strEmptyResultSet = 'MySQL returned an empty result set (i.e. zero rows).'; +$strEnabled = 'Enabled'; +$strEncloseInTransaction = 'Enclose export in a transaction'; +$strEndCut = 'END CUT'; +$strEnd = 'End'; +$strEndRaw = 'END RAW'; +$strEngineAvailable = '%s is available on this MySQL server.'; +$strEngineDisabled = '%s has been disabled for this MySQL server.'; +$strEngines = 'Engines'; +$strEngineUnsupported = 'This MySQL server does not support the %s storage engine.'; +$strEnglish = 'English'; +$strEnglishPrivileges = ' Note: MySQL privilege names are expressed in English '; +$strError = 'Error'; +$strErrorInZipFile = 'Error in ZIP archive:'; +$strErrorRelationAdded = 'Error: Relation not added.'; +$strErrorRelationExists = 'Error: relation already exists.'; +$strErrorRenamingTable = 'Error renaming table %1$s to %2$s'; +$strErrorSaveTable = 'Error saving coordinates for Designer.'; +$strEscapeWildcards = 'Wildcards _ and % should be escaped with a \ to use them literally'; +$strEsperanto = 'Esperanto'; +$strEstonian = 'Estonian'; +$strExcelEdition = 'Excel edition'; +$strExcelOptions = 'Excel options'; +$strExecuteBookmarked = 'Execute bookmarked query'; +$strExplain = 'Explain SQL'; +$strExport = 'Export'; +$strExportImportToScale = 'Export/Import to scale'; +$strExportMustBeFile = 'Selected export type has to be saved in file!'; +$strExtendedInserts = 'Extended inserts'; +$strExtra = 'Extra'; + +$strFailedAttempts = 'Failed attempts'; +$strField = 'Field'; +$strFieldHasBeenDropped = 'Field %s has been dropped'; +$strFieldsEmpty = ' The field count is empty! '; +$strFieldsEnclosedBy = 'Fields enclosed by'; +$strFieldsEscapedBy = 'Fields escaped by'; +$strFields = 'Fields'; +$strFieldsTerminatedBy = 'Fields terminated by'; +$strFileAlreadyExists = 'File %s already exists on server, change filename or check overwrite option.'; +$strFileCouldNotBeRead = 'File could not be read'; +$strFileNameTemplateDescriptionDatabase = 'database name'; +$strFileNameTemplateDescriptionServer = 'server name'; +$strFileNameTemplateDescriptionTable = 'table name'; +$strFileNameTemplateDescription = 'This value is interpreted using %1$sstrftime%2$s, so you can use time formatting strings. Additionally the following transformations will happen: %3$s. Other text will be kept as is.'; +$strFileNameTemplate = 'File name template'; +$strFileNameTemplateRemember = 'remember template'; +$strFileToImport = 'File to import'; +$strFixed = 'fixed'; +$strFlushPrivilegesNote = 'Note: phpMyAdmin gets the users\' privileges directly from MySQL\'s privilege tables. The content of these tables may differ from the privileges the server uses, if they have been changed manually. In this case, you should %sreload the privileges%s before you continue.'; +$strFlushQueryCache = 'Flush query cache'; +$strFlushTable = 'Flush the table ("FLUSH")'; +$strFlushTables = 'Flush (close) all tables'; +$strFontSize = 'Font size'; +$strForeignKeyError = 'Error creating foreign key (check data types)'; +$strFormat = 'Format'; +$strFormEmpty = 'Missing value in the form!'; +$strFreePages = 'Free pages'; +$strFullText = 'Full Texts'; +$strFunction = 'Function'; +$strFunctions = 'Functions'; + +$strGenBy = 'Generated by'; +$strGeneralRelationFeat = 'General relation features'; +$strGenerate = 'Generate'; +$strGeneratePassword = 'Generate Password'; +$strGenTime = 'Generation Time'; +$strGeorgian = 'Georgian'; +$strGerman = 'German'; +$strGlobal = 'global'; +$strGlobalPrivileges = 'Global privileges'; +$strGlobalValue = 'Global value'; +$strGo = 'Go'; +$strGrantOption = 'Grant'; +$strGreek = 'Greek'; +$strGzip = '"gzipped"'; + +$strHandler = 'Handler'; +$strHasBeenAltered = 'has been altered.'; +$strHasBeenCreated = 'has been created.'; +$strHaveToShow = 'You have to choose at least one column to display'; +$strHebrew = 'Hebrew'; +$strHelp = 'Help'; +$strHexForBinary = 'Use hexadecimal for binary fields'; +$strHide = 'Hide'; +$strHideShowAll = 'Hide/Show all'; +$strHideShowNoRelation = 'Hide/Show Tables with no relation'; +$strHome = 'Home'; +$strHomepageOfficial = 'Official phpMyAdmin Homepage'; +$strHostEmpty = 'The host name is empty!'; +$strHost = 'Host'; +$strHTMLExcel = 'Microsoft Excel 2000'; +$strHTMLExcelOptions = 'Microsoft Excel 2000 export options'; +$strHTMLWord = 'Microsoft Word 2000'; +$strHTMLWordOptions = 'Microsoft Word 2000 export options'; +$strHungarian = 'Hungarian'; + +$strIcelandic = 'Icelandic'; +$strId = 'ID'; +$strIdxFulltext = 'Fulltext'; +$strIEUnsupported = 'Internet Explorer does not support this function.'; +$strIgnoreDuplicates = 'Ignore duplicate rows'; +$strIgnore = 'Ignore'; +$strIgnoreInserts = 'Use ignore inserts'; +$strImportExportCoords = 'Import/Export coordinates for PDF schema'; +$strImportFiles = 'Import files'; +$strImportFormat = 'Format of imported file'; +$strImport = 'Import'; +$strImportSuccessfullyFinished = 'Import has been successfully finished, %d queries executed.'; +$strIndexes = 'Indexes'; +$strIndexHasBeenDropped = 'Index %s has been dropped'; +$strIndex = 'Index'; +$strIndexName = 'Index name:'; +$strIndexType = 'Index type:'; +$strIndexWarningMultiple = 'More than one %s key was created for column `%s`'; +$strIndexWarningPrimary = 'PRIMARY and INDEX keys should not both be set for column `%s`'; +$strIndexWarningTable = 'Problems with indexes of table `%s`'; +$strIndexWarningUnique = 'UNIQUE and INDEX keys should not both be set for column `%s`'; +$strInnoDBAutoextendIncrement = 'Autoextend increment'; +$strInnoDBAutoextendIncrementDesc = ' The increment size for extending the size of an autoextending tablespace when it becomes full.'; +$strInnoDBBufferPoolSize = 'Buffer pool size'; +$strInnoDBBufferPoolSizeDesc = 'The size of the memory buffer InnoDB uses to cache data and indexes of its tables.'; +$strInnoDBDataFilePath = 'Data files'; +$strInnoDBDataHomeDir = 'Data home directory'; +$strInnoDBDataHomeDirDesc = 'The common part of the directory path for all InnoDB data files.'; +$strInnoDBPages = 'pages'; +$strInnoDBRelationAdded = 'InnoDB relation added'; +$strInnodbStat = 'InnoDB Status'; +$strInsecureMySQL = 'Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole.'; +$strInsertAsNewRow = 'Insert as new row'; +$strInsertedRowId = 'Inserted row id:'; +$strInsertedRows = 'Inserted rows:'; +$strInsert = 'Insert'; +$strInternalNotNecessary = '* An internal relation is not necessary when it exists also in InnoDB.'; +$strInternalRelationAdded = 'Internal relation added'; +$strInternalRelations = 'Internal relations'; +$strInUse = 'in use'; +$strInvalidAuthMethod = 'Invalid authentication method set in configuration:'; +$strInvalidColumnCount = 'Column count has to be larger than zero.'; +$strInvalidColumn = 'Invalid column (%s) specified!'; +$strInvalidCSVFieldCount = 'Invalid field count in CSV input on line %d.'; +$strInvalidCSVFormat = 'Invalid format of CSV input on line %d.'; +$strInvalidCSVParameter = 'Invalid parameter for CSV import: %s'; +$strInvalidDatabase = 'Invalid database'; +$strInvalidFieldAddCount = 'You have to add at least one field.'; +$strInvalidFieldCount = 'Table must have at least one field.'; +$strInvalidLDIImport = 'This plugin does not support compressed imports!'; +$strInvalidRowNumber = '%d is not valid row number.'; +$strInvalidServerHostname = 'Invalid hostname for server %1$s. Please review your configuration.'; +$strInvalidServerIndex = 'Invalid server index: "%s"'; +$strInvalidTableName = 'Invalid table name'; + +$strJapanese = 'Japanese'; +$strJoins = 'Joins'; +$strJumpToDB = 'Jump to database "%s".'; +$strJustDeleteDescr = 'The "deleted" users will still be able to access the server as usual until the privileges are reloaded.'; +$strJustDelete = 'Just delete the users from the privilege tables.'; + +$strKeepPass = 'Do not change the password'; +$strKeyCache = 'Key cache'; +$strKeyname = 'Keyname'; +$strKill = 'Kill'; +$strKnownExternalBug = 'The %s functionality is affected by a known bug, see %s'; +$strKorean = 'Korean'; + +$strLandscape = 'Landscape'; +$strLanguageFileNotFound = 'Language file "%1$s" not found.'; +$strLanguage = 'Language'; +$strLanguageUnknown = 'Unknown language: %1$s.'; +$strLatchedPages = 'Latched pages'; +$strLatexCaption = 'Table caption'; +$strLatexContent = 'Content of table __TABLE__'; +$strLatexContinuedCaption = 'Continued table caption'; +$strLatexContinued = '(continued)'; +$strLatexIncludeCaption = 'Include table caption'; +$strLatexLabel = 'Label key'; +$strLaTeX = 'LaTeX'; +$strLaTeXOptions = 'LaTeX options'; +$strLatexStructure = 'Structure of table __TABLE__'; +$strLatvian = 'Latvian'; +$strLDI = 'CSV using LOAD DATA'; +$strLDIImportOptions = 'Options for CSV import using LOAD DATA'; +$strLDILocal = 'Use LOCAL keyword'; +$strLengthSet = 'Length/Values'; +$strLimitNumRows = 'Number of rows per page'; +$strLinesTerminatedBy = 'Lines terminated by'; +$strLinkNotFound = 'Link not found'; +$strLinksTo = 'Links to'; +$strLithuanian = 'Lithuanian'; +$strLocalhost = 'Local'; +$strLocationTextfile = 'Location of the text file'; +$strLoginInformation = 'Login Information'; +$strLogin = 'Log in'; +$strLogout = 'Log out'; +$strLogPassword = 'Password:'; +$strLogServer = 'Server'; +$strLogUsername = 'Username:'; +$strLongOperation = 'This operation could take a long time. Proceed anyway?'; + +$strMaxConnects = 'max. concurrent connections'; +$strMaximalQueryLength = 'Maximal length of created query'; +$strMaximumSize = 'Max: %s%s'; +$strMbExtensionMissing = 'The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.'; +$strMbOverloadWarning = 'You have enabled mbstring.func_overload in your PHP configuration. This option is incompatible with phpMyAdmin and might cause some data to be corrupted!'; +$strMIME_available_mime = 'Available MIME types'; +$strMIME_available_transform = 'Available transformations'; +$strMIME_description = 'Description'; +$strMIME_MIMEtype = 'MIME type'; +$strMIME_nodescription = 'No description is available for this transformation.
Please ask the author what %s does.'; +$strMIME_transformation = 'Browser transformation'; +$strMIME_transformation_note = 'For a list of available transformation options and their MIME type transformations, click on %stransformation descriptions%s'; +$strMIME_transformation_options_note = 'Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'...
If you ever need to put a backslash ("\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'; +$strMIME_transformation_options = 'Transformation options'; +$strMIMETypesForTable = 'MIME TYPES FOR TABLE'; +$strMIME_without = 'MIME types printed in italics do not have a separate transformation function'; +$strModifications = 'Modifications have been saved'; +$strModifyIndexTopic = 'Modify an index'; +$strModify = 'Modify'; +$strMoveMenu = 'Move Menu'; +$strMoveTable = 'Move table to (database.table):'; +$strMoveTableOK = 'Table %s has been moved to %s.'; +$strMoveTableSameNames = 'Can\'t move table to same one!'; +$strMultilingual = 'multilingual'; +$strMyISAMDataPointerSize = 'Data pointer size'; +$strMyISAMDataPointerSizeDesc = 'The default pointer size in bytes, to be used by CREATE TABLE for MyISAM tables when no MAX_ROWS option is specified.'; +$strMyISAMMaxExtraSortFileSizeDesc = 'If the temporary file used for fast MyISAM index creation would be larger than using the key cache by the amount specified here, prefer the key cache method.'; +$strMyISAMMaxExtraSortFileSize = 'Maximum size for temporary files on index creation'; +$strMyISAMMaxSortFileSizeDesc = 'The maximum size of the temporary file MySQL is allowed to use while re-creating a MyISAM index (during REPAIR TABLE, ALTER TABLE, or LOAD DATA INFILE).'; +$strMyISAMMaxSortFileSize = 'Maximum size for temporary sort files'; +$strMyISAMRecoverOptions = 'Automatic recovery mode'; +$strMyISAMRecoverOptionsDesc = 'The mode for automatic recovery of crashed MyISAM tables, as set via the --myisam-recover server startup option.'; +$strMyISAMRepairThreadsDesc = 'If this value is greater than 1, MyISAM table indexes are created in parallel (each index in its own thread) during the repair by sorting process.'; +$strMyISAMRepairThreads = 'Repair threads'; +$strMyISAMSortBufferSizeDesc = 'The buffer that is allocated when sorting MyISAM indexes during a REPAIR TABLE or when creating indexes with CREATE INDEX or ALTER TABLE.'; +$strMyISAMSortBufferSize = 'Sort buffer size'; +$strMySQLCharset = 'MySQL charset'; +$strMysqlClientVersion = 'MySQL client version'; +$strMySQLConnectionCollation = 'MySQL connection collation'; +$strMySQLSaid = 'MySQL said: '; +$strMySQLShowProcess = 'Show processes'; +$strMySQLShowStatus = 'Show MySQL runtime information'; +$strMySQLShowVars = 'Show MySQL system variables'; + +$strName = 'Name'; +$strNext = 'Next'; +$strNoActivity = 'No activity within %s seconds; please log in again'; +$strNoDatabases = 'No databases'; +$strNoDatabasesSelected = 'No databases selected.'; +$strNoDataReceived = 'No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.'; +$strNoDescription = 'no description'; +$strNoDetailsForEngine = 'There is no detailed status information available for this storage engine.'; +$strNoDropDatabases = '"DROP DATABASE" statements are disabled.'; +$strNoExplain = 'Skip Explain SQL'; +$strNoFilesFoundInZip = 'No files found inside ZIP archive!'; +$strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; +$strNoIndex = 'No index defined!'; +$strNoIndexPartsDefined = 'No index parts defined!'; +$strNoModification = 'No change'; +$strNone = 'None'; +$strNo = 'No'; +$strNoOptions = 'This format has no options'; +$strNoPassword = 'No Password'; +$strNoPermission = 'The web server does not have permission to save the file %s.'; +$strNoPhp = 'Without PHP Code'; +$strNoPrivileges = 'No Privileges'; +$strNoRights = 'You don\'t have sufficient privileges to be here right now!'; +$strNoRowsSelected = 'No rows selected'; +$strNoSpace = 'Insufficient space to save the file %s.'; +$strNoTablesFound = 'No tables found in database.'; +$strNoThemeSupport = 'No themes support; please check your configuration and/or your themes in directory %s.'; +$strNotNumber = 'This is not a number!'; +$strNotOK = 'not OK'; +$strNotSet = '%s table not found or not set in %s'; +$strNoUsersFound = 'No user(s) found.'; +$strNoValidateSQL = 'Skip Validate SQL'; +$strNull = 'Null'; +$strNumberOfFields = 'Number of fields'; +$strNumberOfTables = 'Number of tables'; +$strNumSearchResultsInTable = '%s match(es) inside table %s'; +$strNumSearchResultsTotal = 'Total: %s match(es)'; +$strNumTables = 'Tables'; + +$strOK = 'OK'; +$strOpenDocumentSpreadsheet = 'Open Document Spreadsheet'; +$strOpenDocumentSpreadsheetOptions = 'Open Document Spreadsheet options'; +$strOpenDocumentText = 'Open Document Text'; +$strOpenDocumentTextOptions = 'Open Document Text options'; +$strOpenNewWindow = 'Open new phpMyAdmin window'; +$strOperations = 'Operations'; +$strOperator = 'Operator'; +$strOptimizeTable = 'Optimize table'; +$strOr = 'Or'; +$strOverhead = 'Overhead'; +$strOverwriteExisting = 'Overwrite existing file(s)'; + +$strPageNumber = 'Page number:'; +$strPagesToBeFlushed = 'Pages to be flushed'; +$strPaperSize = 'Paper size'; +$strPartialImport = 'Partial import'; +$strPartialText = 'Partial Texts'; +$strPasswordChanged = 'The password for %s was changed successfully.'; +$strPasswordEmpty = 'The password is empty!'; +$strPasswordHashing = 'Password Hashing'; +$strPasswordNotSame = 'The passwords aren\'t the same!'; +$strPassword = 'Password'; +$strPdfDbSchema = 'Schema of the the "%s" database - Page %s'; +$strPdfInvalidTblName = 'The "%s" table doesn\'t exist!'; +$strPdfNoTables = 'No tables'; +$strPDFOptions = 'PDF options'; +$strPDF = 'PDF'; +$strPDFReportExplanation = '(Generates a report containing the data of a single table)'; +$strPDFReportTitle = 'Report title'; +$strPerHour = 'per hour'; +$strPerMinute = 'per minute'; +$strPerSecond = 'per second'; +$strPersian = 'Persian'; +$strPhoneBook = 'phone book'; +$strPHP40203 = 'You are using PHP 4.2.3, which has a serious bug with multi-byte strings (mbstring). See PHP bug report 19404. This version of PHP is not recommended for use with phpMyAdmin.'; +$strPhp = 'Create PHP Code'; +$strPHPVersion = 'PHP Version'; +$strPleaseSelectPrimaryOrUniqueKey = 'Please select the primary key or a unique key'; +$strPmaDocumentation = 'phpMyAdmin documentation'; +$strPmaUriError = 'The $cfg[\'PmaAbsoluteUri\'] directive MUST be set in your configuration file!'; +$strPmaWiki = 'phpMyAdmin wiki'; +$strPolish = 'Polish'; +$strPortrait = 'Portrait'; +$strPos1 = 'Begin'; +$strPrevious = 'Previous'; +$strPrimaryKeyHasBeenDropped = 'The primary key has been dropped'; +$strPrimaryKeyName = 'The name of the primary key must be "PRIMARY"!'; +$strPrimaryKeyWarning = '("PRIMARY" must be the name of and only of a primary key!)'; +$strPrimary = 'Primary'; +$strPrint = 'Print'; +$strPrintViewFull = 'Print view (with full texts)'; +$strPrintView = 'Print view'; +$strPrivDescAllPrivileges = 'Includes all privileges except GRANT.'; +$strPrivDescAlter = 'Allows altering the structure of existing tables.'; +$strPrivDescAlterRoutine = 'Allows altering and dropping stored routines.'; +$strPrivDescCreateDb = 'Allows creating new databases and tables.'; +$strPrivDescCreateRoutine = 'Allows creating stored routines.'; +$strPrivDescCreateTbl = 'Allows creating new tables.'; +$strPrivDescCreateTmpTable = 'Allows creating temporary tables.'; +$strPrivDescCreateUser = 'Allows creating, dropping and renaming user accounts.'; +$strPrivDescCreateView = 'Allows creating new views.'; +$strPrivDescDelete = 'Allows deleting data.'; +$strPrivDescDropDb = 'Allows dropping databases and tables.'; +$strPrivDescDropTbl = 'Allows dropping tables.'; +$strPrivDescExecute5 = 'Allows executing stored routines.'; +$strPrivDescExecute = 'Allows running stored procedures; has no effect in this MySQL version.'; +$strPrivDescFile = 'Allows importing data from and exporting data into files.'; +$strPrivDescGrant = 'Allows adding users and privileges without reloading the privilege tables.'; +$strPrivDescIndex = 'Allows creating and dropping indexes.'; +$strPrivDescInsert = 'Allows inserting and replacing data.'; +$strPrivDescLockTables = 'Allows locking tables for the current thread.'; +$strPrivDescMaxConnections = 'Limits the number of new connections the user may open per hour.'; +$strPrivDescMaxQuestions = 'Limits the number of queries the user may send to the server per hour.'; +$strPrivDescMaxUpdates = 'Limits the number of commands that change any table or database the user may execute per hour.'; +$strPrivDescMaxUserConnections = 'Limits the number of simultaneous connections the user may have.'; +$strPrivDescProcess3 = 'Allows killing processes of other users.'; +$strPrivDescProcess4 = 'Allows viewing the complete queries in the process list.'; +$strPrivDescReferences = 'Has no effect in this MySQL version.'; +$strPrivDescReload = 'Allows reloading server settings and flushing the server\'s caches.'; +$strPrivDescReplClient = 'Allows the user to ask where the slaves / masters are.'; +$strPrivDescReplSlave = 'Needed for the replication slaves.'; +$strPrivDescSelect = 'Allows reading data.'; +$strPrivDescShowDb = 'Gives access to the complete list of databases.'; +$strPrivDescShowView = 'Allows performing SHOW CREATE VIEW queries.'; +$strPrivDescShutdown = 'Allows shutting down the server.'; +$strPrivDescSuper = 'Allows connecting, even if maximum number of connections is reached; required for most administrative operations like setting global variables or killing threads of other users.'; +$strPrivDescUpdate = 'Allows changing data.'; +$strPrivDescUsage = 'No privileges.'; +$strPrivileges = 'Privileges'; +$strPrivilegesReloaded = 'The privileges were reloaded successfully.'; +$strProcedures = 'Procedures'; +$strProcesses = 'Processes'; +$strProcesslist = 'Process list'; +$strProtocolVersion = 'Protocol version'; +$strPutColNames = 'Put fields names in the first row'; + +$strQBEDel = 'Del'; +$strQBEIns = 'Ins'; +$strQBE = 'Query'; +$strQueryCache = 'Query cache'; +$strQueryFrame = 'Query window'; +$strQueryOnDb = 'SQL query on database %s:'; +$strQueryResultsOperations = 'Query results operations'; +$strQuerySQLHistory = 'SQL history'; +$strQueryStatistics = 'Query statistics: Since its startup, %s queries have been sent to the server.'; +$strQueryTime = 'Query took %01.4f sec'; +$strQueryType = 'Query type'; +$strQueryWindowLock = 'Do not overwrite this query from outside the window'; + +$strReadRequests = 'Read requests'; +$strReceived = 'Received'; +$strRecommended = 'recommended'; +$strRecords = 'Records'; +$strReferentialIntegrity = 'Check referential integrity:'; +$strRefresh = 'Refresh'; +$strRelationalSchema = 'Relational schema'; +$strRelationDeleted = 'Relation deleted'; +$strRelationNotWorking = 'The additional features for working with linked tables have been deactivated. To find out why click %shere%s.'; +$strRelationsForTable = 'RELATIONS FOR TABLE'; +$strRelations = 'Relations'; +$strRelationView = 'Relation view'; +$strReloadingThePrivileges = 'Reloading the privileges'; +$strReloadPrivileges = 'Reload privileges'; +$strReload = 'Reload'; +$strRemoveSelectedUsers = 'Remove selected users'; +$strRenameDatabaseOK = 'Database %s has been renamed to %s'; +$strRenameTableOK = 'Table %s has been renamed to %s'; +$strRenameTable = 'Rename table to'; +$strRepairTable = 'Repair table'; +$strReplaceNULLBy = 'Replace NULL by'; +$strReplaceTable = 'Replace table data with file'; +$strReplication = 'Replication'; +$strReset = 'Reset'; +$strResourceLimits = 'Resource limits'; +$strReType = 'Re-type'; +$strRevokeAndDeleteDescr = 'The users will still have the USAGE privilege until the privileges are reloaded.'; +$strRevokeAndDelete = 'Revoke all active privileges from the users and delete them afterwards.'; +$strRevokeMessage = 'You have revoked the privileges for %s'; +$strRevoke = 'Revoke'; +$strRomanian = 'Romanian'; +$strRowLength = 'Row length'; +$strRowsFrom = 'row(s) starting from record #'; +$strRowSize = ' Row size '; +$strRowsModeFlippedHorizontal = 'horizontal (rotated headers)'; +$strRowsModeHorizontal = 'horizontal'; +$strRowsModeOptions = 'in %s mode and repeat headers after %s cells'; +$strRowsModeVertical = 'vertical'; +$strRows = 'Rows'; +$strRowsStatistic = 'Row Statistics'; +$strRunning = 'running on %s'; +$strRunQuery = 'Submit Query'; +$strRunSQLQueryOnServer = 'Run SQL query/queries on server %s'; +$strRunSQLQuery = 'Run SQL query/queries on database %s'; +$strRussian = 'Russian'; + +$strSaveOnServer = 'Save on server in %s directory'; +$strSavePosition = 'Save position'; +$strSave = 'Save'; +$strScaleFactorSmall = 'The scale factor is too small to fit the schema on one page'; +$strSearchFormTitle = 'Search in database'; +$strSearchInTables = 'Inside table(s):'; +$strSearchNeedle = 'Word(s) or value(s) to search for (wildcard: "%"):'; +$strSearchOption1 = 'at least one of the words'; +$strSearchOption2 = 'all words'; +$strSearchOption3 = 'the exact phrase'; +$strSearchOption4 = 'as regular expression'; +$strSearchResultsFor = 'Search results for "%s" %s:'; +$strSearch = 'Search'; +$strSearchType = 'Find:'; +$strSecretRequired = 'The configuration file now needs a secret passphrase (blowfish_secret).'; +$strSelectADb = 'Please select a database'; +$strSelectAll = 'Select All'; +$strSelectBinaryLog = 'Select binary log to view'; +$strSelectFields = 'Select fields (at least one):'; +$strSelectForeignKey = 'Select Foreign Key'; +$strSelectNumRows = 'in query'; +$strSelectReferencedKey = 'Select referenced key'; +$strSelectTables = 'Select Tables'; +$strSend = 'Save as file'; +$strSent = 'Sent'; +$strServerChoice = 'Server Choice'; +$strServerNotResponding = 'The server is not responding'; +$strServer = 'Server'; +$strServers = 'Servers'; +$strServerStatusDelayedInserts = 'Delayed inserts'; +$strServerStatus = 'Runtime Information'; +$strServerStatusUptime = 'This MySQL server has been running for %s. It started up on %s.'; +$strServerTabVariables = 'Variables'; +$strServerTrafficNotes = 'Server traffic: These tables show the network traffic statistics of this MySQL server since its startup.'; +$strServerVars = 'Server variables and settings'; +$strServerVersion = 'Server version'; +$strSessionValue = 'Session value'; +$strSetEnumVal = 'If field type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'...
If you ever need to put a backslash ("\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'; +$strShowAll = 'Show all'; +$strShowColor = 'Show color'; +$strShowDatadictAs = 'Data Dictionary Format'; +$strShowFullQueries = 'Show Full Queries'; +$strShowGrid = 'Show grid'; +$strShowHideLeftMenu = 'Show/Hide left menu'; +$strShowingBookmark = 'Showing bookmark'; +$strShowingPhp = 'Showing as PHP code'; +$strShowingRecords = 'Showing rows'; +$strShowingSQL = 'Showing SQL query'; +$strShowOpenTables = 'Show open tables'; +$strShowPHPInfo = 'Show PHP information'; +$strShow = 'Show'; +$strShowSlaveHosts = 'Show slave hosts'; +$strShowSlaveStatus = 'Show slave status'; +$strShowStatusBinlog_cache_disk_useDescr = 'The number of transactions that used the temporary binary log cache but that exceeded the value of binlog_cache_size and used a temporary file to store statements from the transaction.'; +$strShowStatusBinlog_cache_useDescr = 'The number of transactions that used the temporary binary log cache.'; +$strShowStatusCreated_tmp_disk_tablesDescr = 'The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.'; +$strShowStatusCreated_tmp_filesDescr = 'How many temporary files mysqld has created.'; +$strShowStatusCreated_tmp_tablesDescr = 'The number of in-memory temporary tables created automatically by the server while executing statements.'; +$strShowStatusDelayed_errorsDescr = 'The number of rows written with INSERT DELAYED for which some error occurred (probably duplicate key).'; +$strShowStatusDelayed_insert_threadsDescr = 'The number of INSERT DELAYED handler threads in use. Every different table on which one uses INSERT DELAYED gets its own thread.'; +$strShowStatusDelayed_writesDescr = 'The number of INSERT DELAYED rows written.'; +$strShowStatusFlush_commandsDescr = 'The number of executed FLUSH statements.'; +$strShowStatusHandler_commitDescr = 'The number of internal COMMIT statements.'; +$strShowStatusHandler_deleteDescr = 'The number of times a row was deleted from a table.'; +$strShowStatusHandler_discoverDescr = 'The MySQL server can ask the NDB Cluster storage engine if it knows about a table with a given name. This is called discovery. Handler_discover indicates the number of time tables have been discovered.'; +$strShowStatusHandler_read_firstDescr = 'The number of times the first entry was read from an index. If this is high, it suggests that the server is doing a lot of full index scans; for example, SELECT col1 FROM foo, assuming that col1 is indexed.'; +$strShowStatusHandler_read_keyDescr = 'The number of requests to read a row based on a key. If this is high, it is a good indication that your queries and tables are properly indexed.'; +$strShowStatusHandler_read_nextDescr = 'The number of requests to read the next row in key order. This is incremented if you are querying an index column with a range constraint or if you are doing an index scan.'; +$strShowStatusHandler_read_prevDescr = 'The number of requests to read the previous row in key order. This read method is mainly used to optimize ORDER BY ... DESC.'; +$strShowStatusHandler_read_rndDescr = 'The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don\'t use keys properly.'; +$strShowStatusHandler_read_rnd_nextDescr = 'The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.'; +$strShowStatusHandler_rollbackDescr = 'The number of internal ROLLBACK statements.'; +$strShowStatusHandler_updateDescr = 'The number of requests to update a row in a table.'; +$strShowStatusHandler_writeDescr = 'The number of requests to insert a row in a table.'; +$strShowStatusInnodb_buffer_pool_pages_dataDescr = 'The number of pages containing data (dirty or clean).'; +$strShowStatusInnodb_buffer_pool_pages_dirtyDescr = 'The number of pages currently dirty.'; +$strShowStatusInnodb_buffer_pool_pages_flushedDescr = 'The number of buffer pool pages that have been requested to be flushed.'; +$strShowStatusInnodb_buffer_pool_pages_freeDescr = 'The number of free pages.'; +$strShowStatusInnodb_buffer_pool_pages_latchedDescr = 'The number of latched pages in InnoDB buffer pool. These are pages currently being read or written or that can\'t be flushed or removed for some other reason.'; +$strShowStatusInnodb_buffer_pool_pages_miscDescr = 'The number of pages busy because they have been allocated for administrative overhead such as row locks or the adaptive hash index. This value can also be calculated as Innodb_buffer_pool_pages_total - Innodb_buffer_pool_pages_free - Innodb_buffer_pool_pages_data.'; +$strShowStatusInnodb_buffer_pool_pages_totalDescr = 'Total size of buffer pool, in pages.'; +$strShowStatusInnodb_buffer_pool_read_ahead_rndDescr = 'The number of "random" read-aheads InnoDB initiated. This happens when a query is to scan a large portion of a table but in random order.'; +$strShowStatusInnodb_buffer_pool_read_ahead_seqDescr = 'The number of sequential read-aheads InnoDB initiated. This happens when InnoDB does a sequential full table scan.'; +$strShowStatusInnodb_buffer_pool_read_requestsDescr = 'The number of logical read requests InnoDB has done.'; +$strShowStatusInnodb_buffer_pool_readsDescr = 'The number of logical reads that InnoDB could not satisfy from buffer pool and had to do a single-page read.'; +$strShowStatusInnodb_buffer_pool_wait_freeDescr = 'Normally, writes to the InnoDB buffer pool happen in the background. However, if it\'s necessary to read or create a page and no clean pages are available, it\'s necessary to wait for pages to be flushed first. This counter counts instances of these waits. If the buffer pool size was set properly, this value should be small.'; +$strShowStatusInnodb_buffer_pool_write_requestsDescr = 'The number writes done to the InnoDB buffer pool.'; +$strShowStatusInnodb_data_fsyncsDescr = 'The number of fsync() operations so far.'; +$strShowStatusInnodb_data_pending_fsyncsDescr = 'The current number of pending fsync() operations.'; +$strShowStatusInnodb_data_pending_readsDescr = 'The current number of pending reads.'; +$strShowStatusInnodb_data_pending_writesDescr = 'The current number of pending writes.'; +$strShowStatusInnodb_data_readDescr = 'The amount of data read so far, in bytes.'; +$strShowStatusInnodb_data_readsDescr = 'The total number of data reads.'; +$strShowStatusInnodb_data_writesDescr = 'The total number of data writes.'; +$strShowStatusInnodb_data_writtenDescr = 'The amount of data written so far, in bytes.'; +$strShowStatusInnodb_dblwr_pages_writtenDescr = 'The number of doublewrite writes that have been performed and the number of pages that have been written for this purpose.'; +$strShowStatusInnodb_dblwr_writesDescr = 'The number of doublewrite writes that have been performed and the number of pages that have been written for this purpose.'; +$strShowStatusInnodb_log_waitsDescr = 'The number of waits we had because log buffer was too small and we had to wait for it to be flushed before continuing.'; +$strShowStatusInnodb_log_write_requestsDescr = 'The number of log write requests.'; +$strShowStatusInnodb_log_writesDescr = 'The number of physical writes to the log file.'; +$strShowStatusInnodb_os_log_fsyncsDescr = 'The number of fsyncs writes done to the log file.'; +$strShowStatusInnodb_os_log_pending_fsyncsDescr = 'The number of pending log file fsyncs.'; +$strShowStatusInnodb_os_log_pending_writesDescr = 'Pending log file writes.'; +$strShowStatusInnodb_os_log_writtenDescr = 'The number of bytes written to the log file.'; +$strShowStatusInnodb_pages_createdDescr = 'The number of pages created.'; +$strShowStatusInnodb_page_sizeDescr = 'The compiled-in InnoDB page size (default 16KB). Many values are counted in pages; the page size allows them to be easily converted to bytes.'; +$strShowStatusInnodb_pages_readDescr = 'The number of pages read.'; +$strShowStatusInnodb_pages_writtenDescr = 'The number of pages written.'; +$strShowStatusInnodb_row_lock_current_waitsDescr = 'The number of row locks currently being waited for.'; +$strShowStatusInnodb_row_lock_time_avgDescr = 'The average time to acquire a row lock, in milliseconds.'; +$strShowStatusInnodb_row_lock_timeDescr = 'The total time spent in acquiring row locks, in milliseconds.'; +$strShowStatusInnodb_row_lock_time_maxDescr = 'The maximum time to acquire a row lock, in milliseconds.'; +$strShowStatusInnodb_row_lock_waitsDescr = 'The number of times a row lock had to be waited for.'; +$strShowStatusInnodb_rows_deletedDescr = 'The number of rows deleted from InnoDB tables.'; +$strShowStatusInnodb_rows_insertedDescr = 'The number of rows inserted in InnoDB tables.'; +$strShowStatusInnodb_rows_readDescr = 'The number of rows read from InnoDB tables.'; +$strShowStatusInnodb_rows_updatedDescr = 'The number of rows updated in InnoDB tables.'; +$strShowStatusKey_blocks_not_flushedDescr = 'The number of key blocks in the key cache that have changed but haven\'t yet been flushed to disk. It used to be known as Not_flushed_key_blocks.'; +$strShowStatusKey_blocks_unusedDescr = 'The number of unused blocks in the key cache. You can use this value to determine how much of the key cache is in use.'; +$strShowStatusKey_blocks_usedDescr = 'The number of used blocks in the key cache. This value is a high-water mark that indicates the maximum number of blocks that have ever been in use at one time.'; +$strShowStatusKey_read_requestsDescr = 'The number of requests to read a key block from the cache.'; +$strShowStatusKey_readsDescr = 'The number of physical reads of a key block from disk. If Key_reads is big, then your key_buffer_size value is probably too small. The cache miss rate can be calculated as Key_reads/Key_read_requests.'; +$strShowStatusKey_write_requestsDescr = 'The number of requests to write a key block to the cache.'; +$strShowStatusKey_writesDescr = 'The number of physical writes of a key block to disk.'; +$strShowStatusLast_query_costDescr = 'The total cost of the last compiled query as computed by the query optimizer. Useful for comparing the cost of different query plans for the same query. The default value of 0 means that no query has been compiled yet.'; +$strShowStatusNot_flushed_delayed_rowsDescr = 'The number of rows waiting to be written in INSERT DELAY queues.'; +$strShowStatusOpened_tablesDescr = 'The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.'; +$strShowStatusOpen_filesDescr = 'The number of files that are open.'; +$strShowStatusOpen_streamsDescr = 'The number of streams that are open (used mainly for logging).'; +$strShowStatusOpen_tablesDescr = 'The number of tables that are open.'; +$strShowStatusQcache_free_blocksDescr = 'The number of free memory blocks in query cache.'; +$strShowStatusQcache_free_memoryDescr = 'The amount of free memory for query cache.'; +$strShowStatusQcache_hitsDescr = 'The number of cache hits.'; +$strShowStatusQcache_insertsDescr = 'The number of queries added to the cache.'; +$strShowStatusQcache_lowmem_prunesDescr = 'The number of queries that have been removed from the cache to free up memory for caching new queries. This information can help you tune the query cache size. The query cache uses a least recently used (LRU) strategy to decide which queries to remove from the cache.'; +$strShowStatusQcache_not_cachedDescr = 'The number of non-cached queries (not cachable, or not cached due to the query_cache_type setting).'; +$strShowStatusQcache_queries_in_cacheDescr = 'The number of queries registered in the cache.'; +$strShowStatusQcache_total_blocksDescr = 'The total number of blocks in the query cache.'; +$strShowStatusReset = 'Reset'; +$strShowStatusRpl_statusDescr = 'The status of failsafe replication (not yet implemented).'; +$strShowStatusSelect_full_joinDescr = 'The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.'; +$strShowStatusSelect_full_range_joinDescr = 'The number of joins that used a range search on a reference table.'; +$strShowStatusSelect_range_checkDescr = 'The number of joins without keys that check for key usage after each row. (If this is not 0, you should carefully check the indexes of your tables.)'; +$strShowStatusSelect_rangeDescr = 'The number of joins that used ranges on the first table. (It\'s normally not critical even if this is big.)'; +$strShowStatusSelect_scanDescr = 'The number of joins that did a full scan of the first table.'; +$strShowStatusSlave_open_temp_tablesDescr = 'The number of temporary tables currently open by the slave SQL thread.'; +$strShowStatusSlave_retried_transactionsDescr = 'Total (since startup) number of times the replication slave SQL thread has retried transactions.'; +$strShowStatusSlave_runningDescr = 'This is ON if this server is a slave that is connected to a master.'; +$strShowStatusSlow_launch_threadsDescr = 'The number of threads that have taken more than slow_launch_time seconds to create.'; +$strShowStatusSlow_queriesDescr = 'The number of queries that have taken more than long_query_time seconds.'; +$strShowStatusSort_merge_passesDescr = 'The number of merge passes the sort algorithm has had to do. If this value is large, you should consider increasing the value of the sort_buffer_size system variable.'; +$strShowStatusSort_rangeDescr = 'The number of sorts that were done with ranges.'; +$strShowStatusSort_rowsDescr = 'The number of sorted rows.'; +$strShowStatusSort_scanDescr = 'The number of sorts that were done by scanning the table.'; +$strShowStatusTable_locks_immediateDescr = 'The number of times that a table lock was acquired immediately.'; +$strShowStatusTable_locks_waitedDescr = 'The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high, and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.'; +$strShowStatusThreads_cachedDescr = 'The number of threads in the thread cache. The cache hit rate can be calculated as Threads_created/Connections. If this value is red you should raise your thread_cache_size.'; +$strShowStatusThreads_connectedDescr = 'The number of currently open connections.'; +$strShowStatusThreads_createdDescr = 'The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. (Normally this doesn\'t give a notable performance improvement if you have a good thread implementation.)'; +$strShowStatusThreads_runningDescr = 'The number of threads that are not sleeping.'; +$strShowTableDimension = 'Show dimension of tables'; +$strShowTables = 'Show tables'; +$strShowThisQuery = ' Show this query here again '; +$strSimplifiedChinese = 'Simplified Chinese'; +$strSingly = '(singly)'; +$strSize = 'Size'; +$strSkipQueries = 'Number of records(queries) to skip from start'; +$strSlovak = 'Slovak'; +$strSlovenian = 'Slovenian'; +$strSmallBigAll = 'Small/Big All'; +$strSnapToGrid = 'Snap to grid'; +$strSocketProblem = '(or the local MySQL server\'s socket is not correctly configured)'; +$strSortByKey = 'Sort by key'; +$strSorting = 'Sorting'; +$strSort = 'Sort'; +$strSpaceUsage = 'Space usage'; +$strSpanish = 'Spanish'; +$strSplitWordsWithSpace = 'Words are separated by a space character (" ").'; +$strSQLCompatibility = 'SQL compatibility mode'; +$strSQLExportType = 'Export type'; +$strSQLImportOptions = 'SQL options'; +$strSQLOptions = 'SQL options'; +$strSQLParserBugMessage = 'There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:'; +$strSQLParserUserError = 'There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem'; +$strSQLQuery = 'SQL query'; +$strSQLResult = 'SQL result'; +$strSQL = 'SQL'; +$strSQPBugInvalidIdentifer = 'Invalid Identifer'; +$strSQPBugUnclosedQuote = 'Unclosed quote'; +$strSQPBugUnknownPunctuation = 'Unknown Punctuation String'; +$strStandInStructureForView = 'Stand-in structure for view'; +$strStatCheckTime = 'Last check'; +$strStatCreateTime = 'Creation'; +$strStatement = 'Statements'; +$strStatisticsOverrun = 'On a busy server, the byte counters may overrun, so those statistics as reported by the MySQL server may be incorrect.'; +$strStatUpdateTime = 'Last update'; +$strStatus = 'Status'; +$strStorageEngines = 'Storage Engines'; +$strStorageEngine = 'Storage Engine'; +$strStrucCSV = 'CSV'; +$strStrucData = 'Structure and data'; +$strStrucExcelCSV = 'CSV for MS Excel'; +$strStrucNativeExcel = 'Native MS Excel format'; +$strStrucNativeExcelOptions = 'Native Excel export options'; +$strStrucOnly = 'Structure only'; +$strStructPropose = 'Propose table structure'; +$strStructureForView = 'Structure for view'; +$strStructure = 'Structure'; +$strSubmit = 'Submit'; +$strSuccess = 'Your SQL query has been executed successfully'; +$strSum = 'Sum'; +$strSwedish = 'Swedish'; +$strSwitchToDatabase = 'Switch to copied database'; +$strSwitchToTable = 'Switch to copied table'; + +$strTableAlreadyExists = 'Table %s already exists!'; +$strTableComments = 'Table comments'; +$strTableEmpty = 'The table name is empty!'; +$strTableHasBeenDropped = 'Table %s has been dropped'; +$strTableHasBeenEmptied = 'Table %s has been emptied'; +$strTableHasBeenFlushed = 'Table %s has been flushed'; +$strTableIsEmpty = 'Table seems to be empty!'; +$strTableMaintenance = 'Table maintenance'; +$strTableName = 'Table name'; +$strTableOfContents = 'Table of contents'; +$strTableOptions = 'Table options'; +$strTables = '%s table(s)'; +$strTableStructure = 'Table structure for table'; +$strTable = 'Table'; +$strTakeIt = 'take it'; +$strTblPrivileges = 'Table-specific privileges'; +$strTempData = 'Temporary data'; +$strTextAreaLength = ' Because of its length,
this field might not be editable '; +$strThai = 'Thai'; +$strThemeDefaultNotFound = 'Default theme %s not found!'; +$strThemeNoPreviewAvailable = 'No preview available.'; +$strThemeNotFound = 'Theme %s not found!'; +$strThemeNoValidImgPath = 'No valid image path for theme %s found!'; +$strThemePathNotFound = 'Theme path not found for theme %s!'; +$strTheme = 'Theme / Style'; +$strThisHost = 'This Host'; +$strThreads = 'Threads'; +$strThreadSuccessfullyKilled = 'Thread %s was successfully killed.'; +$strTimeoutInfo = 'Previous import timed out, after resubmitting will continue from position %d.'; +$strTimeoutNothingParsed = 'However on last run no data has been parsed, this usually means phpMyAdmin won\'t be able to finish this import unless you increase php time limits.'; +$strTimeoutPassed = 'Script timeout passed, if you want to finish import, please resubmit same file and import will resume.'; +$strTime = 'Time'; +$strToFromPage = 'to/from page'; +$strToggleScratchboard = 'Toggle scratchboard'; +$strToggleSmallBig = 'Toggle small/big'; +$strToSelectRelation = 'To select relation, click :'; +$strTotal = 'total'; +$strTotalUC = 'Total'; +$strTraditionalChinese = 'Traditional Chinese'; +$strTraditionalSpanish = 'Traditional Spanish'; +$strTraffic = 'Traffic'; +$strTransactionCoordinator = 'Transaction coordinator'; +$strTransformation_application_octetstream__download = 'Displays a link to download the binary data of the field. You can use the first option to specify the filename, or use the second option as the name of a field which contains the filename. If you use the second option, you need to set the first option to the empty string.'; +$strTransformation_application_octetstream__hex = 'Displays hexadecimal representation of data. Optional first parameter specifies how often space will be added (defaults to 2 nibbles).'; +$strTransformation_image_jpeg__inline = 'Displays a clickable thumbnail. The options are the maximum width and height in pixels. The original aspect ratio is preserved.'; +$strTransformation_image_jpeg__link = 'Displays a link to download this image.'; +$strTransformation_image_png__inline = 'See image/jpeg: inline'; +$strTransformation_text_plain__dateformat = 'Displays a TIME, TIMESTAMP, DATETIME or numeric unix timestamp field as formatted date. The first option is the offset (in hours) which will be added to the timestamp (Default: 0). Use second option to specify a different date/time format string. Third option determines whether you want to see local date or UTC one (use "local" or "utc" strings) for that. According to that, date format has different value - for "local" see the documentation for PHP\'s strftime() function and for "utc" it is done using gmdate() function.'; +$strTransformation_text_plain__external = 'LINUX ONLY: Launches an external application and feeds it the field data via standard input. Returns the standard output of the application. The default is Tidy, to pretty-print HTML code. For security reasons, you have to manually edit the file libraries/transformations/text_plain__external.inc.php and list the tools you want to make available. The first option is then the number of the program you want to use and the second option is the parameters for the program. The third option, if set to 1, will convert the output using htmlspecialchars() (Default 1). The fourth option, if set to 1, will prevent wrapping and ensure that the output appears all on one line (Default 1).'; +$strTransformation_text_plain__formatted = 'Displays the contents of the field as-is, without running it through htmlspecialchars(). That is, the field is assumed to contain valid HTML.'; +$strTransformation_text_plain__imagelink = 'Displays an image and a link; the field contains the filename. The first option is a URL prefix like "http://www.example.com/". The second and third options are the width and the height in pixels.'; +$strTransformation_text_plain__link = 'Displays a link; the field contains the filename. The first option is a URL prefix like "http://www.example.com/". The second option is a title for the link.'; +$strTransformation_text_plain__sql = 'Formats text as SQL query with syntax highlighting.'; +$strTransformation_text_plain__substr = 'Displays a part of a string. The first option is the number of characters to skip from the beginning of the string (Default 0). The second option is the number of characters to return (Default: until end of string). The third option is the string to append and/or prepend when truncation occurs (Default: "...").'; +$strTruncateQueries = 'Truncate Shown Queries'; +$strTurkish = 'Turkish'; +$strType = 'Type'; + +$strUkrainian = 'Ukrainian'; +$strUncheckAll = 'Uncheck All'; +$strUnicode = 'Unicode'; +$strUnique = 'Unique'; +$strUnknown = 'unknown'; +$strUnselectAll = 'Unselect All'; +$strUnsupportedCompressionDetected = 'You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'; +$strUpdatePrivMessage = 'You have updated the privileges for %s.'; +$strUpdateProfileMessage = 'The profile has been updated.'; +$strUpdateQuery = 'Update Query'; +$strUpdComTab = 'Please see the documentation on how to update your column_comments table'; +$strUpgrade = 'You should upgrade to %s %s or later.'; +$strUploadLimit = 'You probably tried to upload too large file. Please refer to %sdocumentation%s for ways to workaround this limit.'; +$strUploadsNotAllowed = 'File uploads are not allowed on this server.'; +$strUsage = 'Usage'; +$strUseBackquotes = 'Enclose table and field names with backquotes'; +$strUsedPhpExtensions = 'Used PHP extensions'; +$strUseHostTable = 'Use Host Table'; +$strUserAlreadyExists = 'The user %s already exists!'; +$strUserEmpty = 'The user name is empty!'; +$strUserName = 'User name'; +$strUserNotFound = 'The selected user was not found in the privilege table.'; +$strUserOverview = 'User overview'; +$strUsersDeleted = 'The selected users have been deleted successfully.'; +$strUsersHavingAccessToDb = 'Users having access to "%s"'; +$strUser = 'User'; +$strUseTabKey = 'Use TAB key to move from value to value, or CTRL+arrows to move anywhere'; +$strUseTables = 'Use Tables'; +$strUseTextField = 'Use text field'; +$strUseThisValue = 'Use this value'; + +$strValidateSQL = 'Validate SQL'; +$strValidatorError = 'The SQL validator could not be initialized. Please check if you have installed the necessary PHP extensions as described in the %sdocumentation%s.'; +$strValue = 'Value'; +$strVar = 'Variable'; +$strVersionInformation = 'Version information'; +$strViewDumpDatabases = 'View dump (schema) of databases'; +$strViewDumpDB = 'View dump (schema) of database'; +$strViewDump = 'View dump (schema) of table'; +$strViewHasBeenDropped = 'View %s has been dropped'; +$strViewMaxExactCount = 'This view has more than %s rows. Please refer to %sdocumentation%s.'; +$strView = 'View'; + +$strWebServerUploadDirectoryError = 'The directory you set for upload work cannot be reached'; +$strWebServerUploadDirectory = 'web server upload directory'; +$strWelcome = 'Welcome to %s'; +$strWestEuropean = 'West European'; +$strWildcard = 'wildcard'; +$strWindowNotFound = 'The target browser window could not be updated. Maybe you have closed the parent window, or your browser\'s security settings are configured to block cross-window updates.'; +$strWithChecked = 'With selected:'; +$strWriteRequests = 'Write requests'; +$strWrongUser = 'Wrong username/password. Access denied.'; + +$strXMLOptions = 'XML options'; +$strXML = 'XML'; + +$strYes = 'Yes'; + +$strZeroRemovesTheLimit = 'Note: Setting these options to 0 (zero) removes the limit.'; +$strZip = '"zipped"'; + +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/remove_message.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/remove_message.sh new file mode 100644 index 0000000..cb25ab2 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/remove_message.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# $Id: remove_message.sh 5152 2003-11-18 15:20:45Z nijel $ +# +# Shell script that removes a message from all message files (Lem9) +# it checks for the message, followed by a space +# +# Example: remove_message.sh 'strMessageToRemove' +# + +if [ $# -ne 1 ] ; then + echo "usage: remove_message.sh 'strMessageToRemove'" + exit 1 +fi + +for file in *.inc.php +do + echo "lines before:" `wc -l $file` + grep -v "$1 " ${file} > ${file}.new + rm $file + mv ${file}.new $file + echo " lines after:" `wc -l $file` +done +echo " " diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/sort_lang.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/sort_lang.sh new file mode 100644 index 0000000..a7563fb --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/sort_lang.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# $Id: sort_lang.sh 5206 2003-11-26 20:42:58Z nijel $ +## +# Shell script to make each language file neat and tidy +# +# Robin Johnson +# August 9, 2002 +## + +specialsort() +{ + in=$1 + out=$2 + + STRINGORDER="A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" + + for i in $STRINGORDER; + do + egrep '^\$str'$i $in | sort >> $out + echo >> $out + done +} + +sortlang() +{ + f=$1 + targetdir=tmp-$f + mkdir -p $targetdir + + TRANSLATIONSTRING='//.*translate.*$' + STRINGSTRING='^\$str[[:alnum:]_]+' + WHITESPACE='^[[:blank:]]*$' + CVSID='/\* \$Id: sort_lang.sh 5206 2003-11-26 20:42:58Z nijel $ \*/' + + echo -n "Extracting:" + echo -n " head" + egrep -i -v $TRANSLATIONSTRING $f | \ + egrep -v "$STRINGSTRING|$CVSID|\?>|<\?php" >> $targetdir/head + + echo -n " cvs" + egrep "$CVSID" $f >>$targetdir/cvs + + echo -n " strings" + egrep -i -v "$WHITESPACE|$TRANSLATIONSTRING" $f | \ + egrep $STRINGSTRING > $targetdir/tmp-tosort + + echo -n " pending_translations" + egrep -i "$STRINGSTRING.*$TRANSLATIONSTRING" $f > $targetdir/tmp-translate + echo + + echo -n "Building:" + echo -n " strings" + specialsort $targetdir/tmp-tosort $targetdir/sort + + echo -n " pending_translations" + if [ -s $targetdir/tmp-translate ] ; then + echo '// To translate:' > $targetdir/translate + specialsort $targetdir/tmp-translate $targetdir/translate + else + echo -n > $targetdir/translate + fi + echo + + echo "Assembling final" + echo " $f + cat $targetdir/cvs $targetdir/head $targetdir/sort $targetdir/translate \ + | uniq >> $f + echo "?>" >> $f + + rm -rf $targetdir +} + +echo "-------------------------------------------------------------------" +for i in "$@"; +do + if [ ! -f $i ] ; then + echo "$i is not a file, skipping" + else + echo "Sorting $i" + sortlang $i + fi + echo "-------------------------------------------------------------------" +done; diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/sync_lang.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/sync_lang.sh new file mode 100644 index 0000000..5aaac4b --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/sync_lang.sh @@ -0,0 +1,281 @@ +#!/bin/sh +# $Id: sync_lang.sh 9375 2006-08-29 15:33:28Z nijel $ +## +# Shell script that synchronises all translations in phpMyAdmin +## +# Any parameters (except --iconv/--recode) will be passed to grep to filter +# processed translation, for example: './sync_lang.sh czech' will process only +# czech translation, './sync_lang.sh -e czech -e english' will process czech +# and english translations. +## +# Written by Michal Cihar +## +# Changes: +# 2005-12-08 +# * less verbose output to allow quick overview +# 2005-11-29 +# * hack for multibyte chars, so that \'; at the end will not fool PHP +# 2004-09-22 +# * default to iconv, as it doesn't break things as recode does +# 2004-09-03 +# * hack for hebrew +# 2003-11-18 +# * switch php3 -> php +# 2003-04-14 +# * convert only files that are needed to convert (checks mtime), --force to +# avoid this checking +# * get charset from filename when reading from file failed +# * report failed translations at the end +# 2002-09-18 +# * now accepts parameters --iconv/--recode for specifying which convertor +# to use +# 2002-08-13 +# * support for synchronisation only for selected language(s) +# 2002-07-18 +# * can exclude some languages from conversion +# 2002-07-17 +# * support for multiple convertors (recode added) +## + +## +# convertor setup +## +# CONVERTOR_PARAMS is used for printf and it also receives two params: source +# and target charset +# + +case "$1" in + --iconv) + echo Using iconv on user request + CONVERTOR=iconv + # the space on following is REQUIRED + CONVERTOR_PARAMS=" -f %s -t %s" + shift + ;; + --recode) + echo Using recode on user request + echo '(please use iconv for arabic)' + CONVERTOR=recode + CONVERTOR_PARAMS=" -f %s..%s" + shift + ;; + *) + echo Using iconv as default, force with --iconv/--recode + CONVERTOR=iconv + # the space on following is REQUIRED + CONVERTOR_PARAMS=" -f %s -t %s" + ;; +esac + +if [ "$1" = "--force" ] ; then + FORCE=1 + shift +else + FORCE=0 +fi + + +## +# names of translations to process +## +# Here should be listed all translations for which conversion should be done. +# The name is filename without inc.php. +# +BASE_TRANSLATIONS="afrikaans-iso-8859-1 +albanian-iso-8859-1 +arabic-windows-1256 +azerbaijani-iso-8859-9 +basque-iso-8859-1 +belarusian_cyrillic-windows-1251 +belarusian_latin-utf-8 +bosnian-windows-1250 +brazilian_portuguese-iso-8859-1 +bulgarian-utf-8 +catalan-iso-8859-1 +chinese_traditional-utf-8 +chinese_simplified-gb2312 +croatian-windows-1250 +czech-utf-8 +danish-iso-8859-1 +dutch-iso-8859-1 +english-iso-8859-1 +estonian-iso-8859-1 +finnish-iso-8859-1 +french-iso-8859-1 +galician-iso-8859-1 +german-utf-8 +greek-iso-8859-7 +hebrew-iso-8859-8-i +hungarian-iso-8859-2 +indonesian-iso-8859-1 +italian-iso-8859-1 +japanese-utf-8 +korean-utf-8 +latvian-windows-1257 +lithuanian-windows-1257 +malay-iso-8859-1 +norwegian-iso-8859-1 +persian-windows-1256 +polish-iso-8859-2 +portuguese-iso-8859-1 +romanian-iso-8859-1 +russian-windows-1251 +serbian_cyrillic-windows-1251 +serbian_latin-windows-1250 +slovenian-iso-8859-2 +slovak-utf-8 +spanish-iso-8859-1 +swedish-iso-8859-1 +tatarish-iso-8859-9 +thai-utf-8 +turkish-utf-8 +ukrainian-windows-1251" + +## +# which translations should not be translated to utf-8 +## +# List here any translation that should not be converted to utf-8. The name is +# same as above. +# +IGNORE_UTF="" + +## +# which translations should not be automatically generated +## +# List here any translation should not be automatically generated from base +# translation for that language (usually for those which are not correctly +# supported by convertor). +# +IGNORE_TRANSLATIONS=" +russian-cp-866" + +## +# end of configuration, you hopefully won't need to edit anything bellow +## + +TEMPFILE=`mktemp /tmp/pma-sync-lang.XXXXXX` + +cleanup() { + rm -f $TEMPFILE +} + +trap cleanup INT ABRT TERM + +FAILED="" + +echo "-------------------------------------------------------------------" +# go through all file we should process +for base in $BASE_TRANSLATIONS ; do + if [ "$#" -gt 0 ] ; then + if ( echo $base | grep -q "$@" ) ; then + true + else + continue + fi + fi + # grep language from basename + lang=$(echo $base|sed 's%-.*%%') + # which files will we create from current? + create_files=$(ls --color=none -1 $lang*.inc.php|grep -v $base.inc.php) + + for ignore in $IGNORE_TRANSLATIONS ; do + create_files=$(echo "$create_files" | grep -v $ignore) + done + + # charset of source file + src_charset=$(grep '\$charset' $base.inc.php | sed "s%^[^'\"]*['\"]\\([^'\"]*\\)['\"][^'\"]*$%\\1%") + replace_charset=$src_charset + # special case for hebrew + if [ $src_charset = 'iso-8859-8-i' ] ; then + src_charset=iso-8859-8 + fi + echo -n "$base [charset $src_charset]" + + # do we already have utf-8 translation? + if [ $src_charset = 'utf-8' ] ; then + is_utf=yes + else + is_utf=no + fi + + # at first update existing translations + for file in $create_files ; do + # charset of destination file + + # grepping from file causes problems when it is empty... + charset=$(grep '\$charset' $file | sed "s%^[^'\"]*['\"]\\([^'\"]*\\)['\"][^'\"]*$%\\1%") + if [ -z "$charset" ] ; then + charset=$(echo $file | sed -e 's/^[^-]*-//' -e 's/\.inc\.php\?$//') + fi + + if [ $charset = 'utf-8' ] ; then + is_utf=yes + fi + + # check whether we need to update translation + if [ ! "$base.inc.php" -nt "$file" -a "$FORCE" -eq 0 -a -s "$file" ] ; then + echo -n " ($file:ok)" + continue + fi + + echo -n " ($file:to $charset:" + if [ $charset = 'utf-8' ] ; then + # if we convert to utf-8, we should add allow_recoding + is_utf=yes + $CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| sed -e "s/$replace_charset/$charset/" -e '/\$charset/a\ +$allow_recoding = TRUE;' > $TEMPFILE + elif [ $src_charset = 'utf-8' ] ; then + is_utf=yes + # if we convert from utf-8, we should remove allow_recoding + $CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| grep -v allow_recoding | sed "s/$replace_charset/$charset/" > $TEMPFILE + else + # just convert + $CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| sed "s/$replace_charset/$charset/" > $TEMPFILE + fi + if [ -s $TEMPFILE ] ; then + sed "s/\\\\';[[:space:]]\+$/\\\\\\\\';/" $TEMPFILE > $file + echo -n 'done)' + else + FAILED="$FAILED $file" + echo -n 'FAILED)' + fi + done + + # now check whether we found utf-8 translation + if [ $is_utf = no ] ; then + if ( echo $IGNORE_UTF | grep -q $base ) ; then + # utf-8 should not be created + true + else + # we should create utf-8 translation + charset=utf-8 + file=$lang-$charset.inc.php + echo -n " [$file:$charset:" + $CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| sed -e "s/$replace_charset/$charset/" -e '/\$charset/a\ +$allow_recoding = TRUE;' > $TEMPFILE + if [ -s $TEMPFILE ] ; then + cat $TEMPFILE > $file + echo -n 'done)' + else + FAILED="$FAILED $file" + echo -n 'FAILED)' + fi + fi + fi + echo +done + +echo "-------------------------------------------------------------------" + +if [ -z "$FAILED" ] ; then + echo "Everything seems to went okay" +else + echo "!!!SOME CONVERSION FAILED!!!" + echo "Following file were NOT updated:" + echo + echo "$FAILED" + echo + echo "!!!SOME CONVERSION FAILED!!!" +fi + +cleanup diff --git a/Source/udrive/home/admin/www/phpMyAdmin/lang/translatecount.sh b/Source/udrive/home/admin/www/phpMyAdmin/lang/translatecount.sh new file mode 100644 index 0000000..02d04e5 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/lang/translatecount.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# $Id: translatecount.sh 5152 2003-11-18 15:20:45Z nijel $ +## +# Shell script to produce counts of just how out of date the translations are! +## +# Accepts optional parameters of a list of files to produce counts from +# Defaults to using all files +## +# Written by Robin Johnson +## +srcfilelist=${@} +destfilelist="" +translationmatch='//to translate' +suffixtoremove='.inc.php' +added=0 +if [ -z "${srcfilelist}" ]; then + srcfilelist="*.inc.php" + added=1 +fi; +for i in ${srcfilelist}; do + if [ ! -e ${i} ]; then + $i=`eval ${i}*php3` + fi + if [ -e ${i} ]; then + destfilelist="${destfilelist} ${i}" + fi; +done; +destfilelist=`echo ${destfilelist} | xargs -n1 | egrep '.inc.php$'` +if [ ! -z "${destfilelist}" ]; then + grep -c -- "${translationmatch}" ${destfilelist} | sort -t':' -n +1 | sed -e "s/${suffixtoremove}//g" | xargs -n1 | egrep -v ':0$' +fi; diff --git a/Source/udrive/home/admin/www/phpMyAdmin/libraries/.htaccess b/Source/udrive/home/admin/www/phpMyAdmin/libraries/.htaccess new file mode 100644 index 0000000..56baee6 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/libraries/.htaccess @@ -0,0 +1,3 @@ +# This folder does not require access over HTTP +# (the following directive denies access by default) +Order allow,deny diff --git a/Source/udrive/home/admin/www/phpMyAdmin/libraries/Config.class.php b/Source/udrive/home/admin/www/phpMyAdmin/libraries/Config.class.php new file mode 100644 index 0000000..b51f2d2 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/libraries/Config.class.php @@ -0,0 +1,1024 @@ +settings = array(); + + // functions need to refresh in case of config file changed goes in + // PMA_Config::load() + $this->load($source); + + // other settings, independant from config file, comes in + $this->checkSystem(); + + $this->checkIsHttps(); + } + + /** + * sets system and application settings + */ + function checkSystem() + { + $this->set('PMA_VERSION', '2.10.1'); + /** + * @deprecated + */ + $this->set('PMA_THEME_VERSION', 2); + /** + * @deprecated + */ + $this->set('PMA_THEME_GENERATION', 2); + + $this->checkPhpVersion(); + $this->checkWebServerOs(); + $this->checkWebServer(); + $this->checkGd2(); + $this->checkClient(); + $this->checkUpload(); + $this->checkUploadSize(); + $this->checkOutputCompression(); + } + + /** + * wether to use gzip output compression or not + */ + function checkOutputCompression() + { + // If zlib output compression is set in the php configuration file, no + // output buffering should be run + if (@ini_get('zlib.output_compression')) { + $this->set('OBGzip', false); + } + + // disable output-buffering (if set to 'auto') for IE6, else enable it. + if (strtolower($this->get('OBGzip')) == 'auto') { + if ($this->get('PMA_USR_BROWSER_AGENT') == 'IE' + && $this->get('PMA_USR_BROWSER_VER') >= 6 + && $this->get('PMA_USR_BROWSER_VER') < 7) { + $this->set('OBGzip', false); + } else { + $this->set('OBGzip', true); + } + } + } + + /** + * Determines platform (OS), browser and version of the user + * Based on a phpBuilder article: + * @see http://www.phpbuilder.net/columns/tim20000821.php + */ + function checkClient() + { + if (PMA_getenv('HTTP_USER_AGENT')) { + $HTTP_USER_AGENT = PMA_getenv('HTTP_USER_AGENT'); + } elseif (!isset($HTTP_USER_AGENT)) { + $HTTP_USER_AGENT = ''; + } + + // 1. Platform + if (strstr($HTTP_USER_AGENT, 'Win')) { + $this->set('PMA_USR_OS', 'Win'); + } elseif (strstr($HTTP_USER_AGENT, 'Mac')) { + $this->set('PMA_USR_OS', 'Mac'); + } elseif (strstr($HTTP_USER_AGENT, 'Linux')) { + $this->set('PMA_USR_OS', 'Linux'); + } elseif (strstr($HTTP_USER_AGENT, 'Unix')) { + $this->set('PMA_USR_OS', 'Unix'); + } elseif (strstr($HTTP_USER_AGENT, 'OS/2')) { + $this->set('PMA_USR_OS', 'OS/2'); + } else { + $this->set('PMA_USR_OS', 'Other'); + } + + // 2. browser and version + // (must check everything else before Mozilla) + + if (preg_match('@Opera(/| )([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) { + $this->set('PMA_USR_BROWSER_VER', $log_version[2]); + $this->set('PMA_USR_BROWSER_AGENT', 'OPERA'); + } elseif (preg_match('@MSIE ([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) { + $this->set('PMA_USR_BROWSER_VER', $log_version[1]); + $this->set('PMA_USR_BROWSER_AGENT', 'IE'); + } elseif (preg_match('@OmniWeb/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) { + $this->set('PMA_USR_BROWSER_VER', $log_version[1]); + $this->set('PMA_USR_BROWSER_AGENT', 'OMNIWEB'); + //} elseif (ereg('Konqueror/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version)) { + // Konqueror 2.2.2 says Konqueror/2.2.2 + // Konqueror 3.0.3 says Konqueror/3 + } elseif (preg_match('@(Konqueror/)(.*)(;)@', $HTTP_USER_AGENT, $log_version)) { + $this->set('PMA_USR_BROWSER_VER', $log_version[2]); + $this->set('PMA_USR_BROWSER_AGENT', 'KONQUEROR'); + } elseif (preg_match('@Mozilla/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version) + && preg_match('@Safari/([0-9]*)@', $HTTP_USER_AGENT, $log_version2)) { + $this->set('PMA_USR_BROWSER_VER', $log_version[1] . '.' . $log_version2[1]); + $this->set('PMA_USR_BROWSER_AGENT', 'SAFARI'); + } elseif (preg_match('@Mozilla/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) { + $this->set('PMA_USR_BROWSER_VER', $log_version[1]); + $this->set('PMA_USR_BROWSER_AGENT', 'MOZILLA'); + } else { + $this->set('PMA_USR_BROWSER_VER', 0); + $this->set('PMA_USR_BROWSER_AGENT', 'OTHER'); + } + } + + /** + * Whether GD2 is present + */ + function checkGd2() + { + if ($this->get('GD2Available') == 'yes') { + $this->set('PMA_IS_GD2', 1); + } elseif ($this->get('GD2Available') == 'no') { + $this->set('PMA_IS_GD2', 0); + } else { + if (!@extension_loaded('gd')) { + PMA_dl('gd'); + } + if (!@function_exists('imagecreatetruecolor')) { + $this->set('PMA_IS_GD2', 0); + } else { + if (@function_exists('gd_info')) { + $gd_nfo = gd_info(); + if (strstr($gd_nfo["GD Version"], '2.')) { + $this->set('PMA_IS_GD2', 1); + } else { + $this->set('PMA_IS_GD2', 0); + } + } else { + /* We must do hard way... */ + ob_start(); + phpinfo(INFO_MODULES); /* Only modules */ + $a = strip_tags(ob_get_contents()); + ob_end_clean(); + /* Get GD version string from phpinfo output */ + if (preg_match('@GD Version[[:space:]]*\(.*\)@', $a, $v)) { + if (strstr($v, '2.')) { + $this->set('PMA_IS_GD2', 1); + } else { + $this->set('PMA_IS_GD2', 0); + } + } else { + $this->set('PMA_IS_GD2', 0); + } + } + } + } + } + + /** + * Whether the Web server php is running on is IIS + */ + function checkWebServer() + { + if (PMA_getenv('SERVER_SOFTWARE') + // some versions return Microsoft-IIS, some Microsoft/IIS + // we could use a preg_match() but it's slower + && stristr(PMA_getenv('SERVER_SOFTWARE'), 'Microsoft') + && stristr(PMA_getenv('SERVER_SOFTWARE'), 'IIS')) { + $this->set('PMA_IS_IIS', 1); + } else { + $this->set('PMA_IS_IIS', 0); + } + } + + /** + * Whether the os php is running on is windows or not + */ + function checkWebServerOs() + { + // Default to Unix or Equiv + $this->set('PMA_IS_WINDOWS', 0); + // If PHP_OS is defined then continue + if (defined('PHP_OS')) { + if (stristr(PHP_OS, 'win') ) { + // Is it some version of Windows + $this->set('PMA_IS_WINDOWS', 1); + } elseif (stristr(PHP_OS, 'OS/2')) { + // Is it OS/2 (No file permissions like Windows) + $this->set('PMA_IS_WINDOWS', 1); + } + } + } + + /** + * detects PHP version + */ + function checkPhpVersion() + { + $match = array(); + if (! preg_match('@([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2})@', + phpversion(), $match)) { + $result = preg_match('@([0-9]{1,2}).([0-9]{1,2})@', + phpversion(), $match); + } + if (isset($match) && ! empty($match[1])) { + if (! isset($match[2])) { + $match[2] = 0; + } + if (! isset($match[3])) { + $match[3] = 0; + } + $this->set('PMA_PHP_INT_VERSION', + (int) sprintf('%d%02d%02d', $match[1], $match[2], $match[3])); + } else { + $this->set('PMA_PHP_INT_VERSION', 0); + } + $this->set('PMA_PHP_STR_VERSION', phpversion()); + } + + /** + * re-init object after loading from session file + * checks config file for changes and relaods if neccessary + */ + function __wakeup() + { + if (! $this->checkConfigSource() + || $this->source_mtime !== filemtime($this->getSource()) + || $this->default_source_mtime !== filemtime($this->default_source) + || $this->error_config_file + || $this->error_config_default_file) { + $this->settings = array(); + $this->load(); + $this->checkSystem(); + } + + // check for https needs to be done everytime, + // as https and http uses same session so this info can not be stored + // in session + $this->checkIsHttps(); + + $this->checkCollationConnection(); + $this->checkFontsize(); + } + + /** + * loads default values from default source + * + * @uses file_exists() + * @uses $this->default_source + * @uses $this->error_config_default_file + * @uses $this->settings + * @return boolean success + */ + function loadDefaults() + { + $cfg = array(); + if (! file_exists($this->default_source)) { + $this->error_config_default_file = true; + return false; + } + include $this->default_source; + + $this->default_source_mtime = filemtime($this->default_source); + + $this->default_server = $cfg['Servers'][1]; + unset($cfg['Servers']); + + $this->settings = PMA_array_merge_recursive($this->settings, $cfg); + + $this->error_config_default_file = false; + + return true; + } + + /** + * loads configuration from $source, usally the config file + * should be called on object creation and from __wakeup if config file + * has changed + * + * @param string $source config file + */ + function load($source = null) + { + $this->loadDefaults(); + + if (null !== $source) { + $this->setSource($source); + } + + if (! $this->checkConfigSource()) { + return false; + } + + $cfg = array(); + + /** + * Parses the configuration file + */ + $old_error_reporting = error_reporting(0); + if (function_exists('file_get_contents')) { + $eval_result = + eval('?>' . trim(file_get_contents($this->getSource()))); + } else { + $eval_result = + eval('?>' . trim(implode("\n", file($this->getSource())))); + } + error_reporting($old_error_reporting); + + if ($eval_result === false) { + $this->error_config_file = true; + } else { + $this->error_config_file = false; + $this->source_mtime = filemtime($this->getSource()); + } + + /** + * Backward compatibility code + */ + if (!empty($cfg['DefaultTabTable'])) { + $cfg['DefaultTabTable'] = str_replace('_properties', '', str_replace('tbl_properties.php', 'tbl_sql.php', $cfg['DefaultTabTable'])); + } + if (!empty($cfg['DefaultTabDatabase'])) { + $cfg['DefaultTabDatabase'] = str_replace('_details', '', str_replace('db_details.php', 'db_sql.php', $cfg['DefaultTabDatabase'])); + } + + $this->checkFontsize(); + //$this->checkPmaAbsoluteUri(); + $this->settings = PMA_array_merge_recursive($this->settings, $cfg); + + // Handling of the collation must be done after merging of $cfg + // (from config.inc.php) so that $cfg['DefaultConnectionCollation'] + // can have an effect. Note that the presence of collation + // information in a cookie has priority over what is defined + // in the default or user's config files. + /** + * @todo check validity of $_COOKIE['pma_collation_connection'] + */ + if (! empty($_COOKIE['pma_collation_connection'])) { + $this->set('collation_connection', + strip_tags($_COOKIE['pma_collation_connection'])); + } else { + $this->set('collation_connection', + $this->get('DefaultConnectionCollation')); + } + // Now, a collation information could come from REQUEST + // (an example of this: the collation selector in main.php) + // so the following handles the setting of collation_connection + // and later, in common.lib.php, the cookie will be set + // according to this. + $this->checkCollationConnection(); + + return true; + } + + /** + * set source + * @param string $source + */ + function setSource($source) + { + $this->source = trim($source); + } + + /** + * checks if the config folder still exists and terminates app if true + */ + function checkConfigFolder() + { + // Refuse to work while there still might be some world writable dir: + if (is_dir('./config')) { + die('Remove "./config" directory before using phpMyAdmin!'); + } + } + + /** + * check config source + * + * @return boolean wether source is valid or not + */ + function checkConfigSource() + { + if (! $this->getSource()) { + // no configuration file set at all + return false; + } + + if (! file_exists($this->getSource())) { + // do not trigger error here + // https://sf.net/tracker/?func=detail&aid=1370269&group_id=23067&atid=377408 + /* + trigger_error( + 'phpMyAdmin-ERROR: unkown configuration source: ' . $source, + E_USER_WARNING); + */ + $this->source_mtime = 0; + return false; + } + + if (! is_readable($this->getSource())) { + $this->source_mtime = 0; + die('Existing configuration file (' . $this->getSource() . ') is not readable.'); + } + + // Check for permissions (on platforms that support it): + $perms = @fileperms($this->getSource()); + if (!($perms === false) && ($perms & 2)) { + // This check is normally done after loading configuration + $this->checkWebServerOs(); + if ($this->get('PMA_IS_WINDOWS') == 0) { + $this->source_mtime = 0; + die('Wrong permissions on configuration file, should not be world writable!'); + } + } + + return true; + } + + /** + * returns specific config setting + * @param string $setting + * @return mixed value + */ + function get($setting) + { + if (isset($this->settings[$setting])) { + return $this->settings[$setting]; + } + return null; + } + + /** + * sets configuration variable + * + * @uses $this->settings + * @param string $setting configuration option + * @param string $value new value for configuration option + */ + function set($setting, $value) + { + if (!isset($this->settings[$setting]) || $this->settings[$setting] != $value) { + $this->settings[$setting] = $value; + $this->set_mtime = time(); + } + } + + /** + * returns source for current config + * @return string config source + */ + function getSource() + { + return $this->source; + } + + /** + * old PHP 4 style constructor + * + * @deprecated + */ + function PMA_Config($source = null) + { + $this->__construct($source); + } + + /** + * returns time of last config change. + * @return int Unix timestamp + */ + function getMtime() + { + return max($this->source_mtime, $this->default_source_mtime, $this->set_mtime); + } + + /** + * $cfg['PmaAbsoluteUri'] is a required directive else cookies won't be + * set properly and, depending on browsers, inserting or updating a + * record might fail + */ + function checkPmaAbsoluteUri() + { + // Setup a default value to let the people and lazy syadmins work anyway, + // they'll get an error if the autodetect code doesn't work + $pma_absolute_uri = $this->get('PmaAbsoluteUri'); + $is_https = $this->get('is_https'); + if (strlen($pma_absolute_uri) < 5 + // needed to catch http/https switch + || ($is_https && substr($pma_absolute_uri, 0, 6) != 'https:') + || (!$is_https && substr($pma_absolute_uri, 0, 5) != 'http:') + ) { + $url = array(); + + // At first we try to parse REQUEST_URI, it might contain full URL + if (PMA_getenv('REQUEST_URI')) { + $url = @parse_url(PMA_getenv('REQUEST_URI')); // produces E_WARNING if it cannot get parsed, e.g. '/foobar:/' + if ($url === false) { + $url = array( 'path' => $_SERVER['REQUEST_URI'] ); + } + } + + // If we don't have scheme, we didn't have full URL so we need to + // dig deeper + if (empty($url['scheme'])) { + // Scheme + if (PMA_getenv('HTTP_SCHEME')) { + $url['scheme'] = PMA_getenv('HTTP_SCHEME'); + } else { + $url['scheme'] = + PMA_getenv('HTTPS') && strtolower(PMA_getenv('HTTPS')) != 'off' + ? 'https' + : 'http'; + } + + // Host and port + if (PMA_getenv('HTTP_HOST')) { + if (strpos(PMA_getenv('HTTP_HOST'), ':') !== false) { + list($url['host'], $url['port']) = + explode(':', PMA_getenv('HTTP_HOST')); + } else { + $url['host'] = PMA_getenv('HTTP_HOST'); + } + } elseif (PMA_getenv('SERVER_NAME')) { + $url['host'] = PMA_getenv('SERVER_NAME'); + } else { + $this->error_pma_uri = true; + return false; + } + + // If we didn't set port yet... + if (empty($url['port']) && PMA_getenv('SERVER_PORT')) { + $url['port'] = PMA_getenv('SERVER_PORT'); + } + + // And finally the path could be already set from REQUEST_URI + if (empty($url['path'])) { + if (PMA_getenv('PATH_INFO')) { + $path = parse_url(PMA_getenv('PATH_INFO')); + } else { + // PHP_SELF in CGI often points to cgi executable, so use it + // as last choice + $path = parse_url(PMA_getenv('PHP_SELF')); + } + $url['path'] = $path['path']; + } + } + + // Make url from parts we have + $pma_absolute_uri = $url['scheme'] . '://'; + // Was there user information? + if (!empty($url['user'])) { + $pma_absolute_uri .= $url['user']; + if (!empty($url['pass'])) { + $pma_absolute_uri .= ':' . $url['pass']; + } + $pma_absolute_uri .= '@'; + } + // Add hostname + $pma_absolute_uri .= $url['host']; + // Add port, if it not the default one + if (! empty($url['port']) + && (($url['scheme'] == 'http' && $url['port'] != 80) + || ($url['scheme'] == 'https' && $url['port'] != 443))) { + $pma_absolute_uri .= ':' . $url['port']; + } + // And finally path, without script name, the 'a' is there not to + // strip our directory, when path is only /pmadir/ without filename. + // Backslashes returned by Windows have to be changed. + // Only replace backslashes by forward slashes if on Windows, + // as the backslash could be valid on a non-Windows system. + if ($this->get('PMA_IS_WINDOWS') == 1) { + $path = str_replace("\\", "/", dirname($url['path'] . 'a')); + } else { + $path = dirname($url['path'] . 'a'); + } + + // To work correctly within transformations overview: + if (defined('PMA_PATH_TO_BASEDIR') && PMA_PATH_TO_BASEDIR == '../../') { + if ($this->get('PMA_IS_WINDOWS') == 1) { + $path = str_replace("\\", "/", dirname(dirname($path))); + } else { + $path = dirname(dirname($path)); + } + } + // in vhost situations, there could be already an ending slash + if (substr($path, -1) != '/') { + $path .= '/'; + } + $pma_absolute_uri .= $path; + + // We used to display a warning if PmaAbsoluteUri wasn't set, but now + // the autodetect code works well enough that we don't display the + // warning at all. The user can still set PmaAbsoluteUri manually. + // See + // http://sf.net/tracker/?func=detail&aid=1257134&group_id=23067&atid=377411 + + } else { + // The URI is specified, however users do often specify this + // wrongly, so we try to fix this. + + // Adds a trailing slash et the end of the phpMyAdmin uri if it + // does not exist. + if (substr($pma_absolute_uri, -1) != '/') { + $pma_absolute_uri .= '/'; + } + + // If URI doesn't start with http:// or https://, we will add + // this. + if (substr($pma_absolute_uri, 0, 7) != 'http://' + && substr($pma_absolute_uri, 0, 8) != 'https://') { + $pma_absolute_uri = + (PMA_getenv('HTTPS') && strtolower(PMA_getenv('HTTPS')) != 'off' + ? 'https' + : 'http') + . ':' . (substr($pma_absolute_uri, 0, 2) == '//' ? '' : '//') + . $pma_absolute_uri; + } + } + + $this->set('PmaAbsoluteUri', $pma_absolute_uri); + } + + /** + * check selected collation_connection + * @todo check validity of $_REQUEST['collation_connection'] + */ + function checkCollationConnection() + { + // (could be improved by executing it after the MySQL connection only if + // PMA_MYSQL_INT_VERSION >= 40100) + if (! empty($_REQUEST['collation_connection'])) { + $this->set('collation_connection', + strip_tags($_REQUEST['collation_connection'])); + } + } + + /** + * checks for font size configuration, and sets font size as requested by user + * + * @uses $_GET + * @uses $_POST + * @uses $_COOKIE + * @uses preg_match() + * @uses function_exists() + * @uses PMA_Config::set() + * @uses PMA_Config::get() + * @uses PMA_setCookie() + */ + function checkFontsize() + { + $new_fontsize = ''; + + if (isset($_GET['fontsize'])) { + $new_fontsize = $_GET['fontsize']; + } elseif (isset($_POST['fontsize'])) { + $new_fontsize = $_POST['fontsize']; + } elseif (isset($_COOKIE['pma_fontsize'])) { + $new_fontsize = $_COOKIE['pma_fontsize']; + } + + if (preg_match('/^[0-9.]+(px|em|pt|\%)$/', $new_fontsize)) { + $this->set('fontsize', $new_fontsize); + } elseif (! $this->get('fontsize')) { + $this->set('fontsize', '100%'); + } + + if (function_exists('PMA_setCookie')) { + PMA_setCookie('pma_fontsize', $this->get('fontsize'), '100%'); + } + } + + /** + * checks if upload is enabled + * + */ + function checkUpload() + { + $this->set('enable_upload', true); + if (strtolower(@ini_get('file_uploads')) == 'off' + || @ini_get('file_uploads') == 0) { + $this->set('enable_upload', false); + } + } + + /** + * Maximum upload size as limited by PHP + * Used with permission from Moodle (http://moodle.org) by Martin Dougiamas + * + * this section generates $max_upload_size in bytes + */ + function checkUploadSize() + { + if (! $filesize = ini_get('upload_max_filesize')) { + $filesize = "5M"; + } + + if ($postsize = ini_get('post_max_size')) { + $this->set('max_upload_size', + min(PMA_get_real_size($filesize), PMA_get_real_size($postsize))); + } else { + $this->set('max_upload_size', PMA_get_real_size($filesize)); + } + } + + /** + * check for https + */ + function checkIsHttps() + { + $this->set('is_https', PMA_Config::isHttps()); + } + + /** + * @static + */ + function isHttps() + { + $is_https = false; + + $url = array(); + + // At first we try to parse REQUEST_URI, it might contain full URL, + if (PMA_getenv('REQUEST_URI')) { + $url = @parse_url(PMA_getenv('REQUEST_URI')); // produces E_WARNING if it cannot get parsed, e.g. '/foobar:/' + if($url === false) { + $url = array(); + } + } + + // If we don't have scheme, we didn't have full URL so we need to + // dig deeper + if (empty($url['scheme'])) { + // Scheme + if (PMA_getenv('HTTP_SCHEME')) { + $url['scheme'] = PMA_getenv('HTTP_SCHEME'); + } else { + $url['scheme'] = + PMA_getenv('HTTPS') && strtolower(PMA_getenv('HTTPS')) != 'off' + ? 'https' + : 'http'; + } + } + + if (isset($url['scheme']) + && $url['scheme'] == 'https') { + $is_https = true; + } else { + $is_https = false; + } + + return $is_https; + } + + /** + * detect correct cookie path + */ + function checkCookiePath() + { + $this->set('cookie_path', PMA_Config::getCookiePath()); + } + + /** + * @static + */ + function getCookiePath() + { + static $cookie_path = null; + + if (null !== $cookie_path) { + return $cookie_path; + } + + $url = ''; + + if (PMA_getenv('REQUEST_URI')) { + $url = PMA_getenv('REQUEST_URI'); + } + + // If we don't have path + if (empty($url)) { + if (PMA_getenv('PATH_INFO')) { + $url = PMA_getenv('PATH_INFO'); + } elseif (PMA_getenv('PHP_SELF')) { + // PHP_SELF in CGI often points to cgi executable, so use it + // as last choice + $url = PMA_getenv('PHP_SELF'); + } elseif (PMA_getenv('SCRIPT_NAME')) { + $url = PMA_getenv('PHP_SELF'); + } + } + + $parsed_url = @parse_url($_SERVER['REQUEST_URI']); // produces E_WARNING if it cannot get parsed, e.g. '/foobar:/' + if ($parsed_url === false) { + $parsed_url = array('path' => $url); + } + + $cookie_path = substr($parsed_url['path'], 0, strrpos($parsed_url['path'], '/')) . '/'; + + return $cookie_path; + } + + /** + * enables backward compatibility + */ + function enableBc() + { + $GLOBALS['cfg'] =& $this->settings; + $GLOBALS['default_server'] =& $this->default_server; + $GLOBALS['collation_connection'] = $this->get('collation_connection'); + $GLOBALS['is_upload'] = $this->get('enable_upload'); + $GLOBALS['max_upload_size'] = $this->get('max_upload_size'); + $GLOBALS['cookie_path'] = $this->get('cookie_path'); + $GLOBALS['is_https'] = $this->get('is_https'); + + $defines = array( + 'PMA_VERSION', + 'PMA_THEME_VERSION', + 'PMA_THEME_GENERATION', + 'PMA_PHP_STR_VERSION', + 'PMA_PHP_INT_VERSION', + 'PMA_IS_WINDOWS', + 'PMA_IS_IIS', + 'PMA_IS_GD2', + 'PMA_USR_OS', + 'PMA_USR_BROWSER_VER', + 'PMA_USR_BROWSER_AGENT', + ); + + foreach ($defines as $define) { + if (! defined($define)) { + define($define, $this->get($define)); + } + } + } + + /** + * @todo finish + */ + function save() {} + + /** + * returns options for font size selection + * + * @uses preg_replace() + * @uses ksort() + * @static + * @param string $current_size current selected font size with unit + * @return array selectable font sizes + */ + function getFontsizeOptions($current_size = '100%') + { + $unit = preg_replace('/[0-9.]*/', '', $current_size); + $value = preg_replace('/[^0-9.]*/', '', $current_size); + + $factors = array(); + $options = array(); + $options["$value"] = $value . $unit; + + if ($unit === '%') { + $factors[] = 1; + $factors[] = 5; + $factors[] = 10; + } elseif ($unit === 'em') { + $factors[] = 0.05; + $factors[] = 0.2; + $factors[] = 1; + } elseif ($unit === 'pt') { + $factors[] = 0.5; + $factors[] = 2; + } elseif ($unit === 'px') { + $factors[] = 1; + $factors[] = 5; + $factors[] = 10; + } else { + //unknown font size unit + $factors[] = 0.05; + $factors[] = 0.2; + $factors[] = 1; + $factors[] = 5; + $factors[] = 10; + } + + foreach ($factors as $key => $factor) { + $option_inc = $value + $factor; + $option_dec = $value - $factor; + while (count($options) < 21) { + $options["$option_inc"] = $option_inc . $unit; + if ($option_dec > $factors[0]) { + $options["$option_dec"] = $option_dec . $unit; + } + $option_inc += $factor; + $option_dec -= $factor; + if (isset($factors[$key + 1]) + && $option_inc >= $value + $factors[$key + 1]) { + break; + } + } + } + ksort($options); + return $options; + } + + /** + * returns html selectbox for font sizes + * + * @uses $_SESSION['PMA_Config'] + * @uses PMA_Config::get() + * @uses PMA_Config::getFontsizeOptions() + * @uses $GLOBALS['strFontSize'] + * @static + * @param string $current_size currently slected font size with unit + * @return string html selectbox + */ + function getFontsizeSelection() + { + $current_size = $_SESSION['PMA_Config']->get('fontsize'); + $options = PMA_Config::getFontsizeOptions($current_size); + + $return = '' . "\n"; + $return .= ''; + + return $return; + } + + /** + * return complete font size selection form + * + * @uses PMA_generate_common_hidden_inputs() + * @uses PMA_Config::getFontsizeSelection() + * @uses $GLOBALS['strGo'] + * @static + * @param string $current_size currently slected font size with unit + * @return string html selectbox + */ + function getFontsizeForm() + { + return '
' . "\n" + . PMA_generate_common_hidden_inputs() . "\n" + . PMA_Config::getFontsizeSelection() . "\n" + . '' . "\n" + . '
'; + } +} +?> diff --git a/Source/udrive/home/admin/www/phpMyAdmin/libraries/PMA_List.class.php b/Source/udrive/home/admin/www/phpMyAdmin/libraries/PMA_List.class.php new file mode 100644 index 0000000..9062189 --- /dev/null +++ b/Source/udrive/home/admin/www/phpMyAdmin/libraries/PMA_List.class.php @@ -0,0 +1,154 @@ +items); + } + + /** + * returns item only if there is only one in the list + * + * @uses PMA_List::count() to decide what to return + * @uses PMA_List::getFirst() to return it + * @uses PMA_List::getEmpty() to return it + * @return single item + */ + function getSingleItem() + { + if ($this->count() === 1) { + return $this->getFirst(); + } + + return $this->getEmpty(); + } + + /** + * returns list item count + * + * @uses PMA_List::$items to count it items + * @uses count() to count items in PMA_List::$items + * @return integer PMA_List::$items count + */ + function count() + { + return count($this->items); + } + + /** + * defines what is an empty item (0, '', false or null) + * + * @uses PMA_List::$item_empty as return value + * @return mixed an empty item + */ + function getEmpty() + { + return $this->item_empty; + } + + /** + * checks if the given db names exists in the current list, if there is + * missing at least one item it reutrns false other wise true + * + * @uses PMA_List::$items to check for existence of specific item + * @uses func_get_args() + * @uses in_array() to check if given arguments exists in PMA_List::$items + * @param string $db_name,.. one or more mysql result resources + * @return boolean true if all items exists, otheriwse false + */ + function exists() + { + foreach (func_get_args() as $result) { + if (! in_array($result, $this->items)) { + return false; + } + } + + return true; + } + + /** + * returns HTML