Add javascript class
This commit is contained in:
parent
becc770d7f
commit
2fc6f72fd2
BIN
html-java-script/APPS Lab Submission Example.docx
Normal file
BIN
html-java-script/APPS Lab Submission Example.docx
Normal file
Binary file not shown.
BIN
html-java-script/AWS-SCREEN/APPS Lab Submission Example.docx
Normal file
BIN
html-java-script/AWS-SCREEN/APPS Lab Submission Example.docx
Normal file
Binary file not shown.
BIN
html-java-script/GRCC Web Apps AWS EC2 LAMP.pdf
Normal file
BIN
html-java-script/GRCC Web Apps AWS EC2 LAMP.pdf
Normal file
Binary file not shown.
9
html-java-script/Week8/8.15-lab-maps/index.html
Normal file
9
html-java-script/Week8/8.15-lab-maps/index.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script src="script.js"></script>
|
||||
|
||||
<body>
|
||||
<p>To test your function, call calcWordFrequencies()
|
||||
from the JavaScript console in the browser.</p>
|
||||
</body>
|
||||
</html>
|
20
html-java-script/Week8/8.15-lab-maps/script.js
Normal file
20
html-java-script/Week8/8.15-lab-maps/script.js
Normal file
@ -0,0 +1,20 @@
|
||||
function calcWordFrequencies() {
|
||||
var userInput = prompt();
|
||||
var userList = userInput.split(" ");
|
||||
let count = 0;
|
||||
let removeMe;
|
||||
|
||||
|
||||
for (i=0;i<userList.length;i++){
|
||||
count = userList.filter(
|
||||
function(x){ return x === userList[i]; }).length;
|
||||
console.log(userList[i] + " " + count);
|
||||
count = 0;
|
||||
removeMe = userList[i];
|
||||
if (userList.indexOf(userList[i] != -1)){
|
||||
userList = userList.filter(function(a){return a !== removeMe})
|
||||
i--;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
BIN
html-java-script/Week8/8.16-lab-loops/LAB JavaScript loops.zip
Normal file
BIN
html-java-script/Week8/8.16-lab-loops/LAB JavaScript loops.zip
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<title>JavaScript Loop Lab</title>
|
||||
<script src="script.js"></script>
|
||||
<body>
|
||||
<p>Test your drawTriangle() function by calling it front the JavaScript console.</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,10 @@
|
||||
function drawTriangle(size) {
|
||||
let target = "";
|
||||
for (let i=0; i<size; i++){
|
||||
for (let j=0; j<=i; j++){
|
||||
target = target + "*";
|
||||
}
|
||||
console.log(target);
|
||||
target = "";
|
||||
}
|
||||
}
|
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
[09:35:01.670] Global cache location '/home/logen/.cache/typescript/4.2', safe file path '/usr/local/lib/node_modules/typescript/lib/typingSafeList.json', types map path /usr/local/lib/node_modules/typescript/lib/typesMap.json
|
||||
[09:35:01.673] Processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[09:35:01.674] Trying to find '/home/logen/.cache/typescript/4.2/package.json'...
|
||||
[09:35:01.674] Finished processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[09:35:01.674] Process id: 18233
|
||||
[09:35:01.674] NPM location: /usr/bin/npm (explicit '--npmLocation' not provided)
|
||||
[09:35:01.675] validateDefaultNpmLocation: false
|
||||
[09:35:01.675] Npm config file: /home/logen/.cache/typescript/4.2/package.json
|
||||
[09:35:01.675] Npm config file: '/home/logen/.cache/typescript/4.2/package.json' is missing, creating new one...
|
||||
[09:35:01.677] Updating types-registry npm package...
|
||||
[09:35:01.677] Exec: /usr/bin/npm install --ignore-scripts types-registry@latest
|
||||
[09:35:06.429] Succeeded. stdout:
|
||||
+ types-registry@0.1.531
|
||||
added 1 package from 1 contributor and audited 1 package in 3.555s
|
||||
found 0 vulnerabilities
|
||||
|
||||
|
||||
[09:35:06.429] Updated types-registry npm package
|
||||
[09:35:06.453] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.full.d.ts","/home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/script.js"],"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength","kind":"discover"}
|
||||
[09:35:06.486] Loaded safelist from types map file '/usr/local/lib/node_modules/typescript/lib/typesMap.json'
|
||||
[09:35:06.487] Explicitly included types: []
|
||||
[09:35:06.488] Inferred typings from unresolved imports: []
|
||||
[09:35:06.488] Result: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/bower_components","/home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/node_modules"]}
|
||||
[09:35:06.489] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/bower_components","/home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/node_modules"]}
|
||||
[09:35:06.489] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/bower_components
|
||||
[09:35:06.490] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[09:35:06.492] Elapsed:: 2.3727420000359416ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[09:35:06.492] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/node_modules
|
||||
[09:35:06.492] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[09:35:06.493] Elapsed:: 0.2666279999539256ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.17-pass-strength/LAB JavaScript password strength/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[09:35:06.493] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typings":[],"unresolvedImports":[],"kind":"action::set"}
|
||||
[09:35:06.493] Response has been sent.
|
||||
[09:35:06.493] No new typings were requested as a result of typings discovery
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<title>JavaScript Password Strength Lab</title>
|
||||
<script src="script.js"></script>
|
||||
<body>
|
||||
<p>To test your function, call isStrongPassword()
|
||||
from the JavaScript console in the browser.</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,27 @@
|
||||
"use strict"
|
||||
|
||||
function checkIfContainsCapital(string){
|
||||
for (let i=0; i<string.length;i++){
|
||||
if (string.charCodeAt(i) >= 65 &&
|
||||
string.charCodeAt(i) <= 90){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isStrongPassword(string){
|
||||
if (string.length < 8){
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf("password") != -1){
|
||||
return false;
|
||||
}
|
||||
if (checkIfContainsCapital(string) == false){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
// (setq gc-cons-threshold 200000000)
|
BIN
html-java-script/Week8/8.18-js-arrays/LAB JavaScript arrays.zip
Normal file
BIN
html-java-script/Week8/8.18-js-arrays/LAB JavaScript arrays.zip
Normal file
Binary file not shown.
@ -0,0 +1,35 @@
|
||||
[10:02:18.134] Global cache location '/home/logen/.cache/typescript/4.2', safe file path '/usr/local/lib/node_modules/typescript/lib/typingSafeList.json', types map path /usr/local/lib/node_modules/typescript/lib/typesMap.json
|
||||
[10:02:18.137] Processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[10:02:18.137] Trying to find '/home/logen/.cache/typescript/4.2/package.json'...
|
||||
[10:02:18.179] Loaded content of '/home/logen/.cache/typescript/4.2/package.json': {"private":true,"dependencies":{"types-registry":"^0.1.531"}}
|
||||
[10:02:18.179] Loaded content of '/home/logen/.cache/typescript/4.2/package-lock.json'
|
||||
[10:02:18.180] Finished processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[10:02:18.180] Process id: 19527
|
||||
[10:02:18.180] NPM location: /usr/bin/npm (explicit '--npmLocation' not provided)
|
||||
[10:02:18.180] validateDefaultNpmLocation: false
|
||||
[10:02:18.180] Npm config file: /home/logen/.cache/typescript/4.2/package.json
|
||||
[10:02:18.180] Updating types-registry npm package...
|
||||
[10:02:18.180] Exec: /usr/bin/npm install --ignore-scripts types-registry@latest
|
||||
[10:02:20.495] Succeeded. stdout:
|
||||
+ types-registry@0.1.531
|
||||
updated 1 package and audited 1 package in 1.012s
|
||||
found 0 vulnerabilities
|
||||
|
||||
|
||||
[10:02:20.496] Updated types-registry npm package
|
||||
[10:02:20.527] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.full.d.ts","/home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/script.js"],"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays","kind":"discover"}
|
||||
[10:02:20.561] Loaded safelist from types map file '/usr/local/lib/node_modules/typescript/lib/typesMap.json'
|
||||
[10:02:20.563] Explicitly included types: []
|
||||
[10:02:20.564] Inferred typings from unresolved imports: []
|
||||
[10:02:20.564] Result: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/bower_components","/home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/node_modules"]}
|
||||
[10:02:20.564] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/bower_components","/home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/node_modules"]}
|
||||
[10:02:20.565] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/bower_components
|
||||
[10:02:20.565] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:02:20.568] Elapsed:: 2.2793479999527335ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:02:20.568] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/node_modules
|
||||
[10:02:20.568] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:02:20.568] Elapsed:: 0.2772429995238781ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.18-js-arrays/LAB JavaScript arrays/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:02:20.568] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typings":[],"unresolvedImports":[],"kind":"action::set"}
|
||||
[10:02:20.569] Response has been sent.
|
||||
[10:02:20.569] No new typings were requested as a result of typings discovery
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<title>JavaScript Array Lab</title>
|
||||
<script src="script.js"></script>
|
||||
<body>
|
||||
<p>To test your function, call divideArray()
|
||||
from the JavaScript console in the browser.</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,44 @@
|
||||
"use strict"
|
||||
/*
|
||||
take array of ints
|
||||
divide numbers into two arrays
|
||||
evenNums
|
||||
oddNums
|
||||
|
||||
sort arrays
|
||||
output to console
|
||||
Write None if either catagory is empty
|
||||
hint: Use push() and Sort()
|
||||
*/
|
||||
function sortAndPrintArray(arr){
|
||||
//Annoying sorting style to avoid 2 being bigger than 10
|
||||
arr.sort(function(a, b){return a-b});
|
||||
if (arr.length > 0){
|
||||
for (let i = 0; i < arr.length; i++){
|
||||
console.log(arr[i]);
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log("None")
|
||||
}
|
||||
}
|
||||
|
||||
function divideArray(arr){
|
||||
let evenNums = [];
|
||||
let oddNums = [];
|
||||
|
||||
for (let i = 0; i < arr.length ; i++){
|
||||
if (arr[i] %2 === 0){
|
||||
evenNums.push(arr[i]);
|
||||
}
|
||||
else{
|
||||
oddNums.push(arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Even numbers:");
|
||||
sortAndPrintArray(evenNums);
|
||||
|
||||
console.log("Odd numbers:");
|
||||
sortAndPrintArray(oddNums);
|
||||
}
|
Binary file not shown.
@ -0,0 +1,35 @@
|
||||
[10:56:10.531] Global cache location '/home/logen/.cache/typescript/4.2', safe file path '/usr/local/lib/node_modules/typescript/lib/typingSafeList.json', types map path /usr/local/lib/node_modules/typescript/lib/typesMap.json
|
||||
[10:56:10.534] Processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[10:56:10.534] Trying to find '/home/logen/.cache/typescript/4.2/package.json'...
|
||||
[10:56:10.535] Loaded content of '/home/logen/.cache/typescript/4.2/package.json': {"private":true,"dependencies":{"types-registry":"^0.1.531"}}
|
||||
[10:56:10.535] Loaded content of '/home/logen/.cache/typescript/4.2/package-lock.json'
|
||||
[10:56:10.535] Finished processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[10:56:10.536] Process id: 21580
|
||||
[10:56:10.536] NPM location: /usr/bin/npm (explicit '--npmLocation' not provided)
|
||||
[10:56:10.536] validateDefaultNpmLocation: false
|
||||
[10:56:10.536] Npm config file: /home/logen/.cache/typescript/4.2/package.json
|
||||
[10:56:10.536] Updating types-registry npm package...
|
||||
[10:56:10.536] Exec: /usr/bin/npm install --ignore-scripts types-registry@latest
|
||||
[10:56:12.493] Succeeded. stdout:
|
||||
+ types-registry@0.1.531
|
||||
updated 1 package and audited 1 package in 0.714s
|
||||
found 0 vulnerabilities
|
||||
|
||||
|
||||
[10:56:12.494] Updated types-registry npm package
|
||||
[10:56:12.521] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.full.d.ts","/home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/script.js"],"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object","kind":"discover"}
|
||||
[10:56:12.555] Loaded safelist from types map file '/usr/local/lib/node_modules/typescript/lib/typesMap.json'
|
||||
[10:56:12.556] Explicitly included types: []
|
||||
[10:56:12.558] Inferred typings from unresolved imports: []
|
||||
[10:56:12.558] Result: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/bower_components","/home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/node_modules"]}
|
||||
[10:56:12.558] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/bower_components","/home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/node_modules"]}
|
||||
[10:56:12.558] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/bower_components
|
||||
[10:56:12.559] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:56:12.561] Elapsed:: 2.3361570006236434ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:56:12.561] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/node_modules
|
||||
[10:56:12.561] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:56:12.562] Elapsed:: 0.2631700001657009ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/8.19-game-object/LAB JavaScript game object/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[10:56:12.562] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typings":[],"unresolvedImports":[],"kind":"action::set"}
|
||||
[10:56:12.562] Response has been sent.
|
||||
[10:56:12.562] No new typings were requested as a result of typings discovery
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<title>JavaScript Game Object Lab</title>
|
||||
<script src="script.js"></script>
|
||||
<body>
|
||||
<p>View the program's output in the JavaScript console.</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
Create game object
|
||||
|
||||
Add 2 properties: lives - initially 3, and coins - initially 0.
|
||||
Add a getter called points that returns coins * 10.
|
||||
Add a playerDies() method that subtracts 1 from lives if lives is greater than 0.
|
||||
Add a newGame() method that sets lives to 3 and coins to 0.
|
||||
|
||||
If it works correctly, output will be:
|
||||
lives = 3
|
||||
coins = 0
|
||||
points = 0
|
||||
points = 20
|
||||
lives = 2
|
||||
lives = 0
|
||||
lives = 3
|
||||
coins = 0
|
||||
*/
|
||||
|
||||
const game = {
|
||||
lives: 3,
|
||||
coins: 0,
|
||||
get points() {return (this.coins * 10)},
|
||||
playerDies : function() {if (this.lives>0){this.lives-=1}},
|
||||
newGame : function(){this.lives=3; this.coins=0;}
|
||||
}
|
||||
|
||||
/* The below comes with the exercise */
|
||||
console.log("lives = " + game.lives); // should be 3
|
||||
console.log("coins = " + game.coins); // should be 0
|
||||
console.log("points = " + game.points); // should be 0
|
||||
game.coins = 2;
|
||||
console.log("points = " + game.points); // should be 20
|
||||
game.playerDies();
|
||||
console.log("lives = " + game.lives); // should be 2
|
||||
game.playerDies();
|
||||
game.playerDies();
|
||||
game.playerDies();
|
||||
console.log("lives = " + game.lives); // should be 0
|
||||
game.newGame();
|
||||
console.log("lives = " + game.lives); // should be 3
|
||||
console.log("coins = " + game.coins); // should be 0
|
35
html-java-script/Week8/change-calculator/.log/ti-23955.log
Normal file
35
html-java-script/Week8/change-calculator/.log/ti-23955.log
Normal file
@ -0,0 +1,35 @@
|
||||
[11:17:34.582] Global cache location '/home/logen/.cache/typescript/4.2', safe file path '/usr/local/lib/node_modules/typescript/lib/typingSafeList.json', types map path /usr/local/lib/node_modules/typescript/lib/typesMap.json
|
||||
[11:17:34.585] Processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[11:17:34.585] Trying to find '/home/logen/.cache/typescript/4.2/package.json'...
|
||||
[11:17:34.586] Loaded content of '/home/logen/.cache/typescript/4.2/package.json': {"private":true,"dependencies":{"types-registry":"^0.1.531"}}
|
||||
[11:17:34.586] Loaded content of '/home/logen/.cache/typescript/4.2/package-lock.json'
|
||||
[11:17:34.586] Finished processing cache location '/home/logen/.cache/typescript/4.2'
|
||||
[11:17:34.587] Process id: 23962
|
||||
[11:17:34.587] NPM location: /usr/bin/npm (explicit '--npmLocation' not provided)
|
||||
[11:17:34.587] validateDefaultNpmLocation: false
|
||||
[11:17:34.587] Npm config file: /home/logen/.cache/typescript/4.2/package.json
|
||||
[11:17:34.587] Updating types-registry npm package...
|
||||
[11:17:34.587] Exec: /usr/bin/npm install --ignore-scripts types-registry@latest
|
||||
[11:17:36.139] Succeeded. stdout:
|
||||
+ types-registry@0.1.531
|
||||
updated 1 package and audited 1 package in 0.525s
|
||||
found 0 vulnerabilities
|
||||
|
||||
|
||||
[11:17:36.139] Updated types-registry npm package
|
||||
[11:17:36.166] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","/usr/local/lib/node_modules/typescript/lib/lib.es2016.full.d.ts","/home/logen/Downloads/html/Week8/change-calculator/script.js"],"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/home/logen/Downloads/html/Week8/change-calculator","kind":"discover"}
|
||||
[11:17:36.199] Loaded safelist from types map file '/usr/local/lib/node_modules/typescript/lib/typesMap.json'
|
||||
[11:17:36.201] Explicitly included types: []
|
||||
[11:17:36.202] Inferred typings from unresolved imports: []
|
||||
[11:17:36.202] Result: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/change-calculator/bower_components","/home/logen/Downloads/html/Week8/change-calculator/node_modules"]}
|
||||
[11:17:36.202] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":[],"filesToWatch":["/home/logen/Downloads/html/Week8/change-calculator/bower_components","/home/logen/Downloads/html/Week8/change-calculator/node_modules"]}
|
||||
[11:17:36.203] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/change-calculator/bower_components
|
||||
[11:17:36.203] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/change-calculator/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[11:17:36.206] Elapsed:: 2.373486001044512ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/change-calculator/bower_components 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[11:17:36.206] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/change-calculator/node_modules
|
||||
[11:17:36.206] DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/change-calculator/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[11:17:36.206] Elapsed:: 0.25212400034070015ms DirectoryWatcher:: Added:: WatchInfo: /home/logen/Downloads/html/Week8/change-calculator/node_modules 1 undefined Project: /dev/null/inferredProject1* watcher already invoked: false
|
||||
[11:17:36.206] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"module":1,"target":3,"jsx":1,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typings":[],"unresolvedImports":[],"kind":"action::set"}
|
||||
[11:17:36.207] Response has been sent.
|
||||
[11:17:36.207] No new typings were requested as a result of typings discovery
|
7231
html-java-script/Week8/change-calculator/.log/tsserver.log
Normal file
7231
html-java-script/Week8/change-calculator/.log/tsserver.log
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
7
html-java-script/Week8/change-calculator/index.html
Normal file
7
html-java-script/Week8/change-calculator/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script src="script.js"></script>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
50
html-java-script/Week8/change-calculator/script.js
Normal file
50
html-java-script/Week8/change-calculator/script.js
Normal file
@ -0,0 +1,50 @@
|
||||
"use strict"
|
||||
|
||||
/* Make an application that takes in a coin ammount
|
||||
* From 0-99.
|
||||
* return a best change amount.
|
||||
* Example: 27
|
||||
* 1 quarters
|
||||
* 0 dimes
|
||||
* 0 nickels
|
||||
* 2 pennies
|
||||
*/
|
||||
|
||||
let userTotal = 0, quarters=0, dimes=0, nickels=0;
|
||||
|
||||
function getUserChange() {
|
||||
while (true) {
|
||||
userTotal = prompt("Enter an ammount between 0-99: ");
|
||||
|
||||
if (isNaN(userTotal)) {
|
||||
alert("Only enter numbers")
|
||||
continue;
|
||||
}
|
||||
if (userTotal < 0){
|
||||
alert("Only positive numbers!")
|
||||
continue;
|
||||
}
|
||||
if (userTotal > 99){
|
||||
alert("Your number is too hight!")
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return userTotal;
|
||||
}
|
||||
|
||||
userTotal = getUserChange()
|
||||
|
||||
quarters = userTotal /25;
|
||||
userTotal %= 25;
|
||||
|
||||
dimes = userTotal /10;
|
||||
userTotal %= 10;
|
||||
|
||||
nickels = userTotal /5;
|
||||
userTotal %= 5;
|
||||
|
||||
alert("Quarters: " + parseInt(quarters) + "\n" +
|
||||
"Dimes: " + parseInt(dimes) + "\n" +
|
||||
"Nickels: " + parseInt(nickels) + "\n" +
|
||||
"Pennies: " + parseInt(userTotal) + "\n")
|
26
html-java-script/Week8/unit-8-javascript.org
Normal file
26
html-java-script/Week8/unit-8-javascript.org
Normal file
@ -0,0 +1,26 @@
|
||||
* 3 new
|
||||
** We learned that Javascript has var, let, and const.
|
||||
|
||||
Var being the origional and assigns globals
|
||||
Let being new as of 2015 to assign locals
|
||||
And also Const to make immutables
|
||||
Declared, but uninitialized, variables have a value of
|
||||
undefined
|
||||
Redeclared variables do not lose their value
|
||||
** Multiple variables can be declared and assigned by using commas
|
||||
5 data types, string number boolean null and undefined
|
||||
* 2 Interesting
|
||||
** 1
|
||||
I'm someone who likes working close to the metal, but I like
|
||||
the way they explained using encapsulation to design your code
|
||||
|
||||
I've often found myself wondering how to organize code,
|
||||
but this concept of, write code until you feel that peice
|
||||
is done, wrap it into a function, and then move onto
|
||||
the next step, somewhat made it click a bit better for me.
|
||||
|
||||
Having used Lisp, I've loved the lots of small functions
|
||||
concept, but I suppose I always had trouble with design.
|
||||
Somehow, thinking about it this way, works for me.
|
||||
* 1 not clear
|
||||
The difference between null and undefined.
|
11
html-java-script/example/index.html
Normal file
11
html-java-script/example/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Your code goes here -->
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
html-java-script/lab1/LAB News article (HTML).zip
Normal file
BIN
html-java-script/lab1/LAB News article (HTML).zip
Normal file
Binary file not shown.
BIN
html-java-script/lab1/SnakeBite.jpg
Normal file
BIN
html-java-script/lab1/SnakeBite.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
32
html-java-script/lab1/index.html
Normal file
32
html-java-script/lab1/index.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Your code goes here -->
|
||||
|
||||
<title>5 Things to Know About Rattlesnakes and Their Babies</title>
|
||||
<img src="UniversityLogo.png" alt="Logo of The University of Arizona">
|
||||
<h1>5 Things to Know About Rattlesnakes and Their Babies</h1>
|
||||
<p>UA College of Pharmacy | Aug. 6, 2014</p>
|
||||
<p>Arguably, snake season is year-round in Arizona, a state known for its rattlers. But baby rattlesnakes are born in July and August, making these two months especially dangerous for hikers, gardeners, children and others at high risk of exposure to rattlesnake bites.</p>
|
||||
<img src="SnakeBite.jpg" alt="Snake bite on side of child's foot">
|
||||
<p>So far this year, 74 rattlesnake bites to humans have been reported to the Arizona Poison and Drug Information Center. Based at the University of Arizona College of Pharmacy, the center serves the entire state of Arizona with the exception of Maricopa County, providing free and confidential poison and medication information to callers around the clock.</p>
|
||||
<p>Specialists answering the phones at the center regularly receive calls from Arizonans of all ages who don't realize they were bitten by a rattler. The poison center urges anyone who feels a mysterious sting, pinch or bite while outdoors to immediately call the center at 800-222-1222.</p>
|
||||
<p>"We will ask a few questions that will help you either identify possible snakebite or eliminate it," said Keith Boesen, director of the Arizona Poison and Drug Information Center. "With snakebite, the sooner the medical treatment, the better the outcome, so calling us right away can make a very big difference for the victims and the medical teams treating them."</p>
|
||||
<p>The center advises anyone who might come cross paths with rattlesnakes to be aware of these five things:</p>
|
||||
<ol>
|
||||
<li>Baby rattlesnakes range in length from 6 to 12 inches and are easily camouflaged by brush and grass.</li>
|
||||
<li>Baby rattlesnakes are rattleless until they first shed their skins, so there will be no infamous "chica-chica" sound before they strike.</li>
|
||||
<li>Despite their impish size, baby snakes have enough venom to be very dangerous if they bite a human.</li>
|
||||
<li>Adult rattlesnakes do not always rattle an audible warning before or while they are biting.</li>
|
||||
<li>It's a good idea to call the poison center if you notice an unidentified small cut or wound, even if you feel no pain. With the lack of telltale rattle warning, people can be bitten without knowing what has happened until they notice their symptoms and attribute them to a snakebite.</li>
|
||||
</ol>
|
||||
<p> <a href="https://twitter.com/"> Twitter</a>
|
||||
<a href="https://www.facebook.com/">Facebook</a>
|
||||
<a href="https://www.linkedin.com/">LinkedIn</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
42
html-java-script/lab2/index.html
Normal file
42
html-java-script/lab2/index.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Your code goes here -->
|
||||
|
||||
<h1>hometown</h1>
|
||||
<section>
|
||||
<h2>Location</h2>
|
||||
<p>Location</h2>
|
||||
</section>
|
||||
<section>
|
||||
<h2>About</h2>
|
||||
<section>
|
||||
<h3>Stupid</h3>
|
||||
<p>stupid</p>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Real stupid</h3>
|
||||
<p>Still stupid</p>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Really really stupid</h3>
|
||||
<p>Still really stupid</p>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Things To Do</h2>
|
||||
<ul>
|
||||
<li>nope</li>
|
||||
<li>Extra for sanity</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
html-java-script/lab3/LAB Photo gallery table (HTML).zip
Normal file
BIN
html-java-script/lab3/LAB Photo gallery table (HTML).zip
Normal file
Binary file not shown.
37
html-java-script/lab3/index.html
Normal file
37
html-java-script/lab3/index.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<caption> Desert</caption>
|
||||
<tr>
|
||||
<th>Photo</th>
|
||||
<th>Date</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src="vacation1.jpg" alt="another"></td>
|
||||
<td>Jan 16,2018</td>
|
||||
<td>View from the top row; sitting area holds 9,525 people</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="vacation2.jpg" alt=" "></td>
|
||||
<td>Feb 20,2017</td>
|
||||
<td>Facing south from the top of the ampitheatre</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="vacation3.jpg" alt="something"></td>
|
||||
<td>Mar 30,2019</td>
|
||||
<td>Nearby red rocks sit 6,450 feet (1,970m) above sea level</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Copyright © 2019 Zippy Photographers</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
BIN
html-java-script/lab3/vacation1.jpg
Normal file
BIN
html-java-script/lab3/vacation1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
html-java-script/lab3/vacation2.jpg
Normal file
BIN
html-java-script/lab3/vacation2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
html-java-script/lab3/vacation3.jpg
Normal file
BIN
html-java-script/lab3/vacation3.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
html-java-script/lab4/LAB Poem (HTML).zip
Normal file
BIN
html-java-script/lab4/LAB Poem (HTML).zip
Normal file
Binary file not shown.
22
html-java-script/lab4/index.html
Normal file
22
html-java-script/lab4/index.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>I'm Nobody! Who are you?<br>
|
||||
Are you - Nobody - Too?<br>
|
||||
Then there's a pair of us!<br>
|
||||
Don't tell! They'd banish us - you know!</p>
|
||||
|
||||
<p>How dreary - to be - Somebody!<br>
|
||||
How public - like a Frog -<br>
|
||||
To tell one's name - the livelong June -<br>
|
||||
To an admiring Bog!</p>
|
||||
|
||||
<p>
|
||||
<cite>By Emily Dickinson (1891)</cite>
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
html-java-script/lab5/LAB HTML practice.zip
Normal file
BIN
html-java-script/lab5/LAB HTML practice.zip
Normal file
Binary file not shown.
72
html-java-script/lab5/index.html
Normal file
72
html-java-script/lab5/index.html
Normal file
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<title>Practice with HTML5</title>
|
||||
|
||||
<body>
|
||||
<h1>1.</h1>
|
||||
<!-- Your solution to #1 here -->
|
||||
<p><i>Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it.</i></p>
|
||||
<p>-- Steve Jobs</p>
|
||||
<hr>
|
||||
|
||||
<h1>2.</h1>
|
||||
<!-- Your solution to #2 here -->
|
||||
<p><!-- & --></p>
|
||||
<hr>
|
||||
|
||||
<h1>3.</h1>
|
||||
<!-- Your solution to #3 here -->
|
||||
<p><p>Nice!</p></p>
|
||||
<hr>
|
||||
|
||||
<h1>4.</h1>
|
||||
<!-- Your solution to #4 here -->
|
||||
<a href="stuff.html">Go to my stuff</a>
|
||||
<hr>
|
||||
|
||||
<h1>5.</h1>
|
||||
<!-- Your solution to #5 here -->
|
||||
<a href="https://www.zybooks.com"><img src="zyBooks_logo.png"></a>
|
||||
<hr>
|
||||
|
||||
<h1>6.</h1>
|
||||
<!-- Your solution to #6 here -->
|
||||
<ol>
|
||||
<li>Desktop
|
||||
<ul>
|
||||
<li>Linux</li>
|
||||
<li>Mac OS</li>
|
||||
<li>Windows</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mobile
|
||||
<ul>
|
||||
<li>Android</li>
|
||||
<li>iOS</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<hr>
|
||||
|
||||
<h1>7.</h1>
|
||||
<!-- Your solution to #7 here -->
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan=2>2</td>
|
||||
<td>3</td>
|
||||
<td>4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>6</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<hr>
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
html-java-script/lab6/LAB Fan web page (HTML).zip
Normal file
BIN
html-java-script/lab6/LAB Fan web page (HTML).zip
Normal file
Binary file not shown.
12
html-java-script/lab6/index.html
Normal file
12
html-java-script/lab6/index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Your solution here -->
|
||||
<header> <h1> Music man's name</h1></header>
|
||||
<main>
|
||||
<p>Backgorund infromation</p>
|
||||
<p><a href="example.com">About</a></p>
|
||||
</main>
|
||||
<footer>
|
||||
Me, I did.
|
||||
</footer>
|
||||
</html>
|
Binary file not shown.
36
html-java-script/lab7/index.html
Normal file
36
html-java-script/lab7/index.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<title>Join a social network</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
|
||||
<body>
|
||||
<h1>Join a social network</h1>
|
||||
|
||||
<!-- Add the form below -->
|
||||
|
||||
<form action="https://wp.zybooks.com/form-viewer.php" method="post"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<div>
|
||||
<label for="fullName">Full name:</label>
|
||||
<input type="text" id="fullName" name="fullName" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="email">Email address:</label>
|
||||
<input type="email" name="email" id="email" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="about">About you:</label>
|
||||
<textarea rows=3 cols=50 name="about" id=about></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label for="picture">Photo:</label>
|
||||
<input type="file" name="picture" id="picture">
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit">
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
8
html-java-script/lab7/styles.css
Normal file
8
html-java-script/lab7/styles.css
Normal file
@ -0,0 +1,8 @@
|
||||
div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
}
|
Binary file not shown.
52
html-java-script/lab8/index.html
Normal file
52
html-java-script/lab8/index.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<title>Happy Birthday Message Creator</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<meta charset="utf-8">
|
||||
<body>
|
||||
<h1>Happy Birthday Message Creator</h1>
|
||||
<form method="POST" action="https://wp.zybooks.com/form-viewer.php">
|
||||
<div>
|
||||
<label for="birthdayMessage">Message?</label>
|
||||
<input type="text" id="birthdayMessage" name="birthdayMessage" value="Happy birthday!">
|
||||
</div>
|
||||
<div>
|
||||
<label for="emailAddr">Email address?</label>
|
||||
|
||||
<!-- TODO: Add regular expression to pattern -->
|
||||
<input type="email" id="emailAddr" name="emailAddr"
|
||||
placeholder="name@domain.com"
|
||||
pattern="[a-zA-Z0-9-_\.]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*">
|
||||
</div>
|
||||
<div>
|
||||
<label for="dateToSend">Date to send?</label>
|
||||
<!-- TODO: Add date widget -->
|
||||
<input type="date" id="dateToSend" name="dateToSend">
|
||||
</div>
|
||||
<div>
|
||||
<label for="messageColor">Message color?</label>
|
||||
<!-- TODO: Add color widget -->
|
||||
<input type="color" id="messageColor" name="messageColor">
|
||||
</div>
|
||||
<div>
|
||||
<label for="numBlinks">Number of blinks?</label>
|
||||
<!-- TODO: Add number widget -->
|
||||
<input type="number" value=0 min=0 max=10 name="numBlinks"
|
||||
id="numBlinks">
|
||||
</div>
|
||||
<div>
|
||||
<label for="musicVolume">Music volume?</label>
|
||||
<!-- TODO: Add range widget -->
|
||||
<input type=range min=0 max=50 value=20 name="musicVolume"
|
||||
id="musicVolume">
|
||||
</div>
|
||||
|
||||
<!-- TODO: Add submit button -->
|
||||
<div>
|
||||
<button type="Submit">Send Birthday Message</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
9
html-java-script/lab8/styles.css
Normal file
9
html-java-script/lab8/styles.css
Normal file
@ -0,0 +1,9 @@
|
||||
div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
}
|
||||
|
BIN
html-java-script/lab9/LAB Starting lineup (HTML).zip
Normal file
BIN
html-java-script/lab9/LAB Starting lineup (HTML).zip
Normal file
Binary file not shown.
45
html-java-script/lab9/index.html
Normal file
45
html-java-script/lab9/index.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<title>Starting Lineup</title>
|
||||
|
||||
<body>
|
||||
<h1>Starting Lineup</h1>
|
||||
|
||||
<!-- Place your form here -->
|
||||
|
||||
<form method="post" action="https://wp.zybooks.com/form-viewer.php">
|
||||
<p><label for="status">Status:</label>
|
||||
<label><input type="radio" name="status">Draft</label>
|
||||
<label><input type="radio" name="status" checked>Final</label></p>
|
||||
|
||||
<p><label for="gameDate">Date:</label>
|
||||
<select name="gameDate">
|
||||
<option value="March 20">March 20</option>
|
||||
<option value="March 24">March 24</option>
|
||||
<option value="April 2">April 2</option>
|
||||
<option value="April 6">April 6</option>
|
||||
<option value="April 13">April 13</option>
|
||||
</select></p>
|
||||
|
||||
<p><label for="player">Players:</label><br>
|
||||
<label><input type="checkbox" value="Aarav Agarwal"
|
||||
name="player">Aarav Agarwal</label><br>
|
||||
|
||||
<label><input type="checkbox" value="Ava Johnson"
|
||||
name="player">Ava Johnson</label><br>
|
||||
|
||||
<label><input type="checkbox" value="Julio Ortiz"
|
||||
name="player">Julio Ortiz</label><br>
|
||||
|
||||
<label><input type="checkbox" value="Liam Rubio"
|
||||
name="player">Liam Rubio</label><br>
|
||||
|
||||
<label><input type="checkbox" value="Emma Witherspoon"
|
||||
name="player">Emma Witherspoon</label></p>
|
||||
<input type=submit value="Submit">
|
||||
</form>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Binary file not shown.
52
html-java-script/myAWSsite/html/phpMyAdmin/CONTRIBUTING.md
Normal file
52
html-java-script/myAWSsite/html/phpMyAdmin/CONTRIBUTING.md
Normal file
@ -0,0 +1,52 @@
|
||||
# Contributing to phpMyAdmin
|
||||
|
||||
As an open-source project, phpMyAdmin welcomes contributions of many forms.
|
||||
|
||||
## Bug reporting
|
||||
|
||||
We appreciate your effort to improve phpMyAdmin by submitting a bug report. Before doing so, please check the following things:
|
||||
|
||||
1. Check whether the bug you face **hasn't been already reported**. Duplicate reports take us time, that we could be used to fix other bugs or make improvements.
|
||||
|
||||
2. Specify the phpMyAdmin, server, PHP, MySQL and browser information that may be helpful to fix the problem, especially exact **version numbers**.
|
||||
|
||||
3. If you got some error, please **describe what happened** and add an error message. Reports like "I get an error when I clicked on some link" are useless.
|
||||
|
||||
4. Provide easy steps to reproduce and if possible include your table structure (``SHOW CREATE TABLE `tbl_name`;``); if your problem implies specific data, attach a small export file for sample rows.
|
||||
|
||||
5. **Security problems** should not be reported here. See [our security page](https://www.phpmyadmin.net/security/).
|
||||
|
||||
Thanks for your help!
|
||||
|
||||
Please report [bugs on GitHub][1].
|
||||
|
||||
[1]: https://github.com/phpmyadmin/phpmyadmin/issues/new
|
||||
|
||||
## Patches submission
|
||||
|
||||
Patches are welcome as [pull requests on GitHub][2]. Please include a
|
||||
Signed-off-by tag in the commit message (you can do this by passing [`--signoff`][4] parameter to Git).
|
||||
|
||||
When creating the commit on GitHub or using some other tool which does not have
|
||||
direct support for this, it is the same as adding `Signed-off-by: Your name <email@example.com>`
|
||||
as the last line of the commit message.
|
||||
|
||||
Example: `Signed-off-by: Jane Smith <jane.smith@example.org>`
|
||||
|
||||
Note that by submitting patches with the Signed-off-by tag, you are giving
|
||||
permission to license the patch as GPLv2-or-later. See [the DCO file][3] for details.
|
||||
|
||||
|
||||
[2]: https://github.com/phpmyadmin/phpmyadmin/pulls
|
||||
[3]: https://github.com/phpmyadmin/phpmyadmin/blob/master/DCO
|
||||
[4]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff
|
||||
|
||||
## Triage issues [![Open Source Helpers](https://www.codetriage.com/phpmyadmin/phpmyadmin/badges/users.svg)](https://www.codetriage.com/phpmyadmin/phpmyadmin)
|
||||
|
||||
You can triage issues, which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to phpMyAdmin on CodeTriage](https://www.codetriage.com/phpmyadmin/phpmyadmin).
|
||||
|
||||
## More information
|
||||
|
||||
You can find more information on our website:
|
||||
|
||||
https://www.phpmyadmin.net/contribute/
|
458
html-java-script/myAWSsite/html/phpMyAdmin/ChangeLog
Normal file
458
html-java-script/myAWSsite/html/phpMyAdmin/ChangeLog
Normal file
@ -0,0 +1,458 @@
|
||||
phpMyAdmin - ChangeLog
|
||||
======================
|
||||
|
||||
5.0.4 (2020-10-15)
|
||||
- issue #16245 Fix failed Zoom search clears existing values
|
||||
- issue Fixed a PHP error when reporting a particular JS error
|
||||
- issue #16326 Fixed latitude and longitude swap for geometries in edit mode
|
||||
- issue #16032 Fix CREATE TABLE not being tracked when auto tracking is enabled
|
||||
- issue #16397 Fix compatibility problems with older PHP versions (also issue #16399)
|
||||
- issue #16396 Fix broken two-factor authentication
|
||||
|
||||
5.0.3 (2020-10-09)
|
||||
- issue #15983 Require twig ^2.9
|
||||
- issue Fix option to import files locally appearing as not available
|
||||
- issue #16048 Fix to allow NULL as a default bit value
|
||||
- issue #16062 Fix "htmlspecialchars() expects parameter 1 to be string, null given" on Export xml
|
||||
- issue #16078 Fix no charts in monitor when using a decimal separator ","
|
||||
- issue #16041 Fix IN(...) clause doesn't permit multiple values on "Search" page
|
||||
- issue #14411 Support double tap to edit on mobile
|
||||
- issue #16043 Fix php error "Use of undefined constant MYSQLI_TYPE_JSON" when using the mysqlnd extension
|
||||
- issue #14611 Fix fatal JS error on index creation after using Enter key to submit the form
|
||||
- issue #16012 Set "axis-order" to swap lon and lat on MySQL >= 8.1
|
||||
- issue #16104 Fixed overwriting a bookmarked query causes a PHP fatal error
|
||||
- issue Fix typo in a condition in the Sql class
|
||||
- issue #15996 Fix local setup doc links pointing to a wrong location
|
||||
- issue #16093 Fix error importing utf-8 with bom sql file
|
||||
- issue #16089 2FA UX enhancement: autofocus 2FA input
|
||||
- issue #16127 Fix table column description PHP error when ['DisableIS'] = true;
|
||||
- issue #16130 Fix local documentation links display when a PHP extension is missing
|
||||
- issue Fix some twig code deprecations for php 8
|
||||
- issue Fix ENUM and SET display when editing procedures and functions
|
||||
- issue Keep full query state on "auto refresh" process list
|
||||
- issue Keep columns order on "auto refresh" process list
|
||||
- issue Fixed editing a failed query from the error message
|
||||
- issue #16166 Fix the alter user privileges query to make it MySQL 8.0.11+ compatible
|
||||
- issue Fix copy table to another database when the nbr of DBs is > $cfg['MaxDbList']
|
||||
- issue #16157 Fix relations of tables having spaces or special chars not showing in the Designer
|
||||
- issue #16052 Fix a very rare JS error occuring on mousemove event
|
||||
- issue #16162 Make a foreign key link clickable in a new tab after the value was saved and replaced
|
||||
- issue #16163 Fixed a PHP notice "Undefined index: column_info" on views
|
||||
- issue #14478 Fix the data stream when exporting data in file mode
|
||||
- issue #16184 Fix templates/ directory not found error
|
||||
- issue #16184 Remove chdir logic to fix PHP fatal error "Uncaught TypeError: chdir()"
|
||||
- issue Support for Twig 3
|
||||
- issue Allow phpmyadmin/twig-i18n-extension ^3.0
|
||||
- issue #16201 Trim spaces for integer values in table search
|
||||
- issue #16076 Fixed cannot edit or export TIMESTAMP column with default CURRENT_TIMESTAMP in MySQL >= 8.0.13
|
||||
- issue #16226 Fix error 500 after copying a table
|
||||
- issue #16222 Fixed can't use the search page when the table name has special characters
|
||||
- issue #16248 Fix zoom search is not performing input validation on INT columns
|
||||
- issue #16248 Fix javascript error when typing in INT fields on zoom search page
|
||||
- issue Fix type errors when using saved searches
|
||||
- issue #16261 Fix missing headings on modals of "User Accounts -> Export"
|
||||
- issue #16146 Fixed sorting did not keep the selector of number of rows
|
||||
- issue #16194 Fixed SQL query does not appear in case of editing view where definer is not you on MySQL 8
|
||||
- issue #16255 Fix tinyint(1) shown as INT on Search page
|
||||
- issue #16256 Fix "Warning: error_reporting() has been disabled for security reasons" on php 7.x
|
||||
- issue #15367 Fix "Change or reconfigure primary server" link
|
||||
- issue #15367 Fix first replica links, start, stop, ignore links
|
||||
- issue #16058 Add "PMA_single_signon_HMAC_secret" for signon auths to make special links work and udate examples
|
||||
- issue #16269 Support ReCaptcha v2 checkbox width "$cfg['CaptchaMethod'] = 'checkbox';"
|
||||
- issue #14644 Use Doctum instead of Sami
|
||||
- issue #16086 Fix "Browse" headings shift when scrolling
|
||||
- issue #15328 Fix no message after import of zipped shapefile without php-zip
|
||||
- issue #14326 Fix PHP error when exporting without php-zip
|
||||
- issue #16318 Fix Profiling doesn't sum the number of calls
|
||||
- issue #16319 Fixed a Russian translation mistake on search results total text
|
||||
- issue #15634 Only use session_set_cookie_params once on PHP >= 7.3.0 versions for single signon auth
|
||||
- issue #14698 Fixed database named as 'New' (language variable) causes PHP fatal error
|
||||
- issue #16355 Make textareas both sides resizable
|
||||
- issue #16366 Fix column definition form not showing default value
|
||||
- issue #16342 Fixed multi-table query (db_multi_table_query.php) alias show the same alias for all columns
|
||||
- issue #15109 Fixed using ST_GeomFromText + GUI on insert throws an error
|
||||
- issue #16325 Fixed editing Geometry data throws error on using the GUI
|
||||
- issue [security] Fix XSS vulnerability with the transformation feature (PMASA-2020-5)
|
||||
- issue [security] Fix SQL injection vulnerability with search feature (PMASA-2020-6)
|
||||
|
||||
5.0.2 (2020-03-20)
|
||||
- issue Fixed deprecation warning "implode(): Passing glue string after array is deprecated." function on export page
|
||||
- issue #15767 Fixed can not copy user account since 5.0 - "error #1133"
|
||||
- issue #15772 Fixed error code 500 during pagination of the tables in a database
|
||||
- issue #16009 Fix php error "Trying to access array offset on value of type null" on column distinct values feature
|
||||
- issue #15741 Fix fatal javascript error on clicking "Pick from Central Columns"
|
||||
- issue #15773 Fixed a view named "views" adds an expand button
|
||||
- issue #15432 Fixed names of the pages in the designer should be unique
|
||||
- issue #14310 Fixed column selector "See more" removes "Preview SQL" and "Save" area
|
||||
- issue Fixed wrong jQuery function call in table search page
|
||||
- issue #15761 Fix uncaught TypeError when using "$cfg['ServerDefault'] = 0;"
|
||||
- issue #15780 Fixed unexpected UI of action links (text only mode)
|
||||
- issue #15674 Replace twig/extensions with phpmyadmin/twig-i18n-extension
|
||||
- issue #15799 Change location of profiling state documentation to fix column ordering
|
||||
- issue #15720 Fix designer adding all available tables to a designer page after adding a new relationship
|
||||
- issue #15791 Replace facebook/webdriver by php-webdriver/webdriver
|
||||
- issue #15802 Removed SET AUTOCOMMIT=0 from SQL export
|
||||
- issue #15818 Fix table borders missing on theme original since 5.0.0
|
||||
- issue #13864 Fix ENUM's radiobuttons reset on "Continue insertion with" changes
|
||||
- issue #15811 Fixed browse foreign values doesn't show a modal with grid edit
|
||||
- issue #15817 Fix "new table" layout issue on original theme
|
||||
- issue #15798 Fixed not needed prompt before abandoning changes on SQL tab after only changing a checkbox
|
||||
- issue #15833 Fix php TypeError when submitting unchanged data
|
||||
- issue Fix php notice "Trying to access array offset on value of type bool" on Designer
|
||||
- issue #13326 Added integer validations on search page
|
||||
- issue #15200 Fixed server-side HTTPS detection misses support for Forwarded HTTP Extension (RFC 7239)
|
||||
- issue #15831 Fixed DB names starting with "b" being cut off in <option>, User account page
|
||||
- issue #15850 Fixed display content from "information_schema.PROCESSLIST"
|
||||
- issue #15836 Fixed "has no type" error on export and import pages for "Chinese traditional" users
|
||||
- issue #15863 Fixed designer move menu icon not changing directions and tables menu list resize button
|
||||
- issue #15854 Fixed black borders for full screen mode on Designer
|
||||
- issue #15899 Fix "Uncaught TypeError: mb_strtoupper()" on the relational view of a view
|
||||
- issue Fixed some php uncaught errors and notices on user missing extension
|
||||
- issue #15926 Fixed PhpMyAdmin\Core::getRealSize('8000M') returns a float instead of an int
|
||||
- issue #15410 Fixed auto increment reset issue where the last value of AI was saved an could destroy the "good" value
|
||||
- issue #15187 Fixed editing a row and using 'insert as new row' uses primary key 0 instead of NULL
|
||||
- issue #15877 Fixed php error "preg_match() expects parameter 2 to be string, null given" on some specific tables
|
||||
- issue #15795 Fix broken link on "MySQL said" error message
|
||||
- issue #15781 Fix illegal string offset error on structure page of 'information_schema' database
|
||||
- issue #15745 Fix version 5.0.1 suggests 4.9.4 as latest stable version
|
||||
- issue #15958 Fix uncaught TypeError when sorting database tables by size or by rows
|
||||
- issue #15830 Fix strftime issue on windows for Japanese users on "Structure" tab
|
||||
- issue Windows testsuite fixes
|
||||
- issue #15879 Added missing CSS class on "simulate query" button
|
||||
- issue #15401 Fixed php notice "Undefined index HMAC_secret" for users upgrading phpMyAdmin without a log-out
|
||||
- issue #15810 Fixed unexpected heading on add a new procedure, trigger, function, routine modals
|
||||
- issue #15970 Removed wrong html a tag on "Replication status" header
|
||||
- issue Add missing css classes on some buttons
|
||||
- issue #15937 Make modals draggability/expand (down) work after a screen zoom change
|
||||
- issue Fix php notice "Undefined index: on_delete" while creating a foreign key
|
||||
- issue #15876 Fixed select "IN (...)" is a simple select instead of a multiple select
|
||||
- issue Fix maxlength for User and Host on replication add user form
|
||||
- issue #15282 Fixed MySQL 8.0 password syntax error when creating a replication user
|
||||
- issue #15986 Fixed php fatal error "Uncaught TypeError: array_flip() expects parameter 1 to be array, null given"
|
||||
- issue Fixed php fatal error "Uncaught TypeError: htmlspecialchars() expects parameter 1 to be string, int given"
|
||||
- issue Support phpunit 9.0
|
||||
- issue Fix error in NavigationTree where $key might be sent as an int instead of a str to urlencode
|
||||
- issue #16022 Fix uncaught TypeError on browse foreigners
|
||||
- issue Fix failure if relational display field value is NULL - "Display column for relationships"
|
||||
- issue #16033 Remove vendor bin files from non source version of phpMyAdmin
|
||||
- issue #15898 [security] Fix escape tbl_storage_engine argument used on tbl_create.php
|
||||
- issue #15224 Don't fire keyboard shortcuts while SQL query area is focused (on a mobile for example)
|
||||
- issue [security] Fix SQL injection with certain usernames (PMASA-2020-2)
|
||||
- issue [security] Fix SQL injection in particular search situations (PMASA-2020-3)
|
||||
- issue [security] Fix SQL injection and XSS flaw (PMASA-2020-4)
|
||||
- issue Deprecate "options" for the external transformation; options must now be hard-coded along with the program name directly in the file.
|
||||
|
||||
5.0.1 (2020-01-07)
|
||||
- issue #15719 Fixed error 500 when browsing a table when $cfg['LimitChars'] used a string and not an int value
|
||||
- issue #14936 Fixed display NULL on numeric fields has showing empty string since 5.0.0
|
||||
- issue #15722 Fix get Database structure fails with PHP error on replicated server
|
||||
- issue #15723 Fix can't browse certain tables since 5.0.0 update
|
||||
- issue Prevent line wrap in DB structure size column
|
||||
- issue Remove extra line break from downloaded blob content
|
||||
- issue #15725 Fixed error 500 when exporting - set time limit when $cfg['ExecTimeLimit'] used a string and not an int value
|
||||
- issue #15726 Fixed double delete icons on enum editor
|
||||
- issue #15717 Fixed warning popup not dissapearing on table stucture when using actions without any column selection
|
||||
- issue #15693 Fixed focus of active tab is lost by clicking refresh option on browse tab
|
||||
- issue #15734 Fix Uncaught TypeError: http_build_query() in setup
|
||||
- issue Fix double slash in path when $cfg['TempDir'] has a trailing slash
|
||||
- issue #14875 Fix shp file import tests where failing when php dbase extension was enabled
|
||||
- issue #14299 Fix JS error "PMA_makegrid is not defined" when clicking on a table from the "Insert" tab opened in a new tab
|
||||
- issue #15351 Fixed 2FA setting removed each time the user edits another configuration setting
|
||||
- issue [security] Fix SQL injection vulnerability on the user accounts page (PMASA-2020-1)
|
||||
|
||||
5.0.0 (2019-12-26)
|
||||
- issue #13896 Drop support for PHP 5.5, PHP 5.6, PHP 7.0 and HHVM
|
||||
- issue #14007 Enable columns names by default for CSV exports
|
||||
- issue #13919 Remove font size feature
|
||||
- issue #12373 Add Metro theme
|
||||
- issue #14155 Add move columns preview SQL button
|
||||
- issue #14296 Enable strict mode in PHP files
|
||||
- issue #13627 Increase field width for editing varchar fields
|
||||
- issue #12603 Show warning for users with the default values for controluser and controlpass
|
||||
- issue #14589 Fix rendering of column comments in Safari, improve display in all browsers
|
||||
- issue #14330 New features for csv import plugin
|
||||
- issue #14417 Automatically add index while editing an existing row and setting auto increment
|
||||
- issue #13057 Add export option to drop user security definers from views
|
||||
- issue #14404 Drop view and or replace added to exporting view
|
||||
- issue #14594 Database "Search" selects all tables by default
|
||||
- issue #12158 Auto expand the single database
|
||||
- issue #13067 Inconsistency with submit buttons
|
||||
- issue #14683 Improper message in Show Hidden Navigation Tree Items
|
||||
- issue #14695 Remove unlabeled default collation from the bottom of the database list; this information is available elsewhere
|
||||
- issue #14677 Security confirm() before running UPDATE statement without WHERE condition
|
||||
- issue #13023 Show errors at the bottom of the page and add copy query button for errors in processing sql queries
|
||||
- issue #14633 Use Sass instead of PHP to compile CSS
|
||||
- issue #14765 Add initial support for Bootstrap 4
|
||||
- issue #14829 Change table column comment field from input to textarea
|
||||
- issue #14725 Console: ctrl+l clear line and ctrl+u clear console
|
||||
- issue #14837 Use charset 'windows-1252' when format is MS Excel
|
||||
- issue #15030 Move 'More settings' link from 'Appearance settings' to 'General settings'
|
||||
- issue #15029 Remove the redundant 'i' help/tool tip in page settings "Query History Length" area
|
||||
- issue #13424 Importing CSV now uses file name as the table name instead of 'TABLE #'
|
||||
- issue #14926 Add an Edit link for each view in tables list
|
||||
- issue #14890 Display column details in navigation bar
|
||||
- issue #14977 Add title for group in navigation bar
|
||||
- issue #14927 Show InnoDB table overhead (free space)
|
||||
- issue #15072 Add 'Close' button to the Monitor Instructions modal
|
||||
- issue #15174 Improved filter method in server variables page
|
||||
- issue #15266 Add an external dependency injection system
|
||||
- issue #15350 Change MIME type references to Media (MIME) type
|
||||
- issue Fixed url.php crashing because it's not loading the DatabaseInterface service
|
||||
- issue #15540 Fixed uncaught TypeError: htmlspecialchars() in NavigationTree
|
||||
- issue Fix twig deprecation notices for php 8.0
|
||||
- issue #15435 Fix ReCAPTCHA couldn't find user-provided function: Functions.recaptchaCallback
|
||||
- issue #15623 Fix width of picker modal and remove date picker for int fields
|
||||
- issue #14732 Fixed can't rename primary key with auto increment
|
||||
- issue #15677 Fix show process-list triggers a php exception
|
||||
- issue #15697 Fix uncaught php error: "Call to a member function get() on null" in db_export.php when exporting a table from the list
|
||||
|
||||
4.9.7 (2020-10-15)
|
||||
- issue #16397 Fix compatibility problems with older PHP versions (also issue #16399)
|
||||
- issue #16396 Fix broken two-factor authentication
|
||||
|
||||
4.9.6 (2020-10-09)
|
||||
- issue [security] Fix XSS vulnerability with the transformation feature (PMASA-2020-5)
|
||||
- issue [security] Fix SQL injection vulnerability with search feature (PMASA-2020-6)
|
||||
|
||||
4.9.5 (2020-03-20)
|
||||
- issue [security] Fix SQL injection with certain usernames (PMASA-2020-2)
|
||||
- issue [security] Fix SQL injection in particular search situations (PMASA-2020-3)
|
||||
- issue [security] Fix SQL injection and XSS flaw (PMASA-2020-4)
|
||||
- issue Deprecate "options" for the external transformation; options must now be hard-coded along with the program name directly in the file.
|
||||
|
||||
4.9.4 (2020-01-07)
|
||||
- issue #15724 Fix 2FA was disabled by a bug
|
||||
- issue [security] Fix SQL injection vulnerability on the user accounts page (PMASA-2020-1)
|
||||
|
||||
4.9.3 (2019-12-26)
|
||||
- issue #15570 Fix page contents go underneath of floating menubar in some cases
|
||||
- issue #15591 Fix php notice 'Undefined index: foreign_keys_data' on relations view when the user has column access
|
||||
- issue #15592 Fix php warning "error_reporting() has been disabled for security reasons"
|
||||
- issue #15434 Fix middle click on table sort column name shows a blank page
|
||||
- issue Fix php notice "Undefined index table_create_time" when setting displayed columns on results of a view
|
||||
- issue #15571 Fix fatal error when trying to edit row with row checked and button under the table
|
||||
- issue #15633 Fix designer set display field broken for php 5.x versions
|
||||
- issue #15621 Support CloudFront-Forwarded-Proto header for Amazon CloudFront proxy
|
||||
- issue Fix php 8.0 php notices - Undefined index on login page
|
||||
- issue #15640 Fix php 7.4 error when trying to access array offset on value of type null on table browse
|
||||
- issue #15641 Fix replication actions where broken (start slave, stop slave, reset, ...)
|
||||
- issue #15608 Fix DisableIS is broken when with controluser configured (database list broken)
|
||||
- issue #15614 Fix undefined offset on index page for MySQL 5.7.8 (server charset)
|
||||
- issue #15692 Fix JavaScript error when user has not enough privilege to view query statistics.
|
||||
- issue #14248 Fixed date selection in search menu missing higher Z-index value
|
||||
- issue Fix Uncaught php TypeError on php 8.0 when adding a column to table create form
|
||||
- issue #15682 Fix calendar not taking current time as default value
|
||||
- issue #15636 Fix php error trying to access array offset on value o type null on replication GUI
|
||||
- issue #15695 Fix input field for the time in datetime picker is disabled
|
||||
|
||||
4.9.2 (2019-11-21)
|
||||
- issue #14184 Change the cookie name from phpMyAdmin to phpMyAdmin_https for HTTPS, fixes many "Failed to set session cookie" errors
|
||||
- issue #15304 Fix ssl_use php error
|
||||
- issue #14804 Fix undefined index: ssl_* variables
|
||||
- issue #14245 Fix mysql 8.0.3 and above fails on advisor
|
||||
- issue #15499 Fix unparenthesized php deprecation
|
||||
- issue #15482 Fix URL encoding plus sign (+) in the table or DB name when configuring foreign keys
|
||||
- issue #14898 Fixed bottom table in list in left panel blocked by horizontal scroll bar
|
||||
- issue #15161 Fix text area overflows its parent element on "Query" page
|
||||
- issue #15511 Fixed exporting users after a delete will delete all selected users on "Users" page
|
||||
- issue #14598 Fixed checking referencial integrity on "Operations" page
|
||||
- issue #14433 Fix "You do not have privileges to manipulate with the users!" on root superadmin
|
||||
- issue #15391 Fix GIS polygon of a geometry field is not drawn on "GIS visualization"
|
||||
- issue #15311 Fix adjust privileges on copy database fails with MariaDB
|
||||
- issue #15477 Fix display referential integrity check for InnoDB
|
||||
- issue #15236 Support phpunit 8 in our test suite to help packaging phpMyAdmin on Debian
|
||||
- issue #15522 Fix missing image error fills logs, removed ic_b_info icon from icon list
|
||||
- issue #15537 Fixed some issues with the sort by key selectors
|
||||
- issue #15546 Fix operators precedence in DatabaseInterface class
|
||||
- issue #14906 Test test suite on 32-bit systems
|
||||
- issue Fix Long2IP transformation issue with PHP 7.1
|
||||
- issue #14951 Fix moving columns with DEFAULT NULL doesn't work on MariaDB 10.2+
|
||||
- issue #14951 Fix moving columns with INT AND DEFAULT CURRENT_TIMESTAMP doesn't work on MariaDB
|
||||
- issue #12241 Fixed table alias is removed when exporting a query
|
||||
- issue #15316 Fixed cross join clause is removed on export
|
||||
- issue #14809 Fix error "is_uploaded_file() expects parameter 1 to be string" when inserting blobs from files
|
||||
- issue #15127 Fix white square when refreshing designer or browsing other pages
|
||||
- issue #13912 Detect when phpMyAdmin storage tables are not accessible, help users browse corrupt DBs
|
||||
- issue #15465 Display profiling when query outputs no rows
|
||||
- issue Fix setting and removing display field on Designer
|
||||
- issue Added a warning when trying to set a display field on Designer and configuration storage is not setup
|
||||
- issue #15327 Fix shift-click in Export misses a checkbox
|
||||
- issue [security] Fix improperly sanitized data when showing the Git branch (thanks to Ali Hubail for this report)
|
||||
- issue [security] Fix security weaknesses in Designer feature,including a flaw where an attacker could trigger an SQL injection attack (PMASA-2019-5)
|
||||
|
||||
4.9.1 (2019-09-20)
|
||||
- issue #15313 Added support for Twig 2
|
||||
- issue #15315 Fix cannot edit or export column with default CURRENT_TIMESTAMP in MySQL >= 8.0.13
|
||||
- issue Fix a TypeError in Import class with PHP 8
|
||||
- issue #14270 Fix Middle-click on foreign key link broken
|
||||
- issue #14363 Fix broken relational links in tables
|
||||
- issue #14987 Fix weird error for empty collation
|
||||
- issue #15334 Fix export of GIS visualisation not working (PNG, PDF, SVG)
|
||||
- issue #14918 Use hex for the phpMyAdmin session token
|
||||
- issue Added GB18030 Chinese collations description
|
||||
- issue Added Russian, Swedish, Slovak and Chinese UCA 9.0.0 collations description
|
||||
- issue Added description for the _ks (kana-sensitive) collation suffix
|
||||
- issue Added description for the _nopad (NO PAD) collation suffix
|
||||
- issue #15404 Remove array/string curly braces access
|
||||
- issue #15427 Fixed "FilterLanguages" option does not work (configuration)
|
||||
- issue #15202 Fixed creating user with single quote in password results in no password user
|
||||
- issue #14950 Fixed left database overview "add column" triggers error
|
||||
- issue #15363 Fix remove unexpected quotes on text fields (structure and insert)
|
||||
- issue Fix NULL wrongly checked on field change
|
||||
- issue #15388 Fix allow to rollback an empty statement
|
||||
- issue #14291 Fixed incorrect linkage from one table's value to another table
|
||||
- issue #15446 Fix tables added from other databases are not collapsing in the designer section
|
||||
- issue #14945 Fix designer page save fails if dB name contains period
|
||||
- issue Display an error when trying to import in designer a table that's already imported
|
||||
- issue Fix many bugs when adding new tables to designer
|
||||
- issue Update CodeMirror to v5.48.4
|
||||
- issue Update jQuery Migrate to v3.1.0
|
||||
- issue Update jQuery Validation to v1.19.1
|
||||
- issue Update jQuery to v3.4.1
|
||||
- issue Update js-cookie to v2.2.1
|
||||
- issue Remove fieldset closing tag when setting global privileges
|
||||
- issue #15425 Fix backslash in column name resulting an error in editing
|
||||
- issue #15380 Fix Status - Advisor error
|
||||
- issue #15439 Fix designer page status not updated when added a new table from another database
|
||||
- issue #15440 Fix page number is not being updated in the URL after saving a designer's page
|
||||
- issue Fix reloading a designer's page
|
||||
- issue Fix designer full screen mode button and text stuck when exiting full-screen mode
|
||||
- issue Reduced possibility of causing heavy server traffic between the database and web servers
|
||||
- issue Fix a situation where a server could be deleted while an administator is using the setup script
|
||||
|
||||
4.9.0.1 (2019-06-04)
|
||||
- issue #14478 phpMyAdmin no longer streams the export data
|
||||
- issue #14514 Tables with SYSTEM VERSIONING show up as views instead of tables
|
||||
- issue #14515 Values cannot be edited in SYSTEM VERSIONING tables with INVISIBLE timestamps
|
||||
- issue Fix header icon on server plugins page
|
||||
- issue #14298 Fixed error 500 on MultiTableQuery page when a empty query is passed
|
||||
- issue #14402 Fixed fatal javascript error while adding index to a new column
|
||||
- issue #14896 Fixed issue with plus/minus icon when refreshing an expanded database
|
||||
- issue #14922 Fixed json encode error in export
|
||||
- issue #13975 Fixed missing query time in German (fix decimal number format issue)
|
||||
- issue #14503 Fixed JavaScript events not activating on input (sql bookmark issue)
|
||||
- issue #14898 Fixed Bottom table is blocked in database list (left panel)
|
||||
- issue #14425 Fixed Null Checkbox automatically unmarked
|
||||
- issue #14870 Display correct date and time in Zip files
|
||||
- issue #14763 Fixed the loading symbol not appearing when refreshing the navigation
|
||||
- issue #14607 Count rows only if needed
|
||||
- issue #14832 Show Designer combo boxes when adding a constraint
|
||||
- issue #14948 Fix change password is not showing password strength difference at the second attempt
|
||||
- issue #14868 Fix edit view
|
||||
- issue #14943 Fixed loading Forever when creating new view without filling any field
|
||||
- issue #14843 Fix Bookmark::get() id matching SQL
|
||||
- issue #14734 Fixed invalid default value for bit field
|
||||
- issue #14311 Fixed undefined index in setup script
|
||||
- issue #14991 Fixed TypeError in GIS editor
|
||||
- issue Fixed GIS data editor for multi server setup
|
||||
- issue #14312 Fixed type error in setup script when adding new server
|
||||
- issue #14053 Fix missed padding on query results
|
||||
- issue #14826 Fixed javascript error PMA_messages is not defined
|
||||
- issue Show error message if config-set fails and not "loading..." forever
|
||||
- issue #14359 Prevent multiple error modals, and error-report request spamming from script
|
||||
- issue Fixed error reporting javascript errors on multi server setup
|
||||
- issue Fixed wrong property name on TableStructureController
|
||||
- issue #14811 Fix SHOW FULL TABLES FROM when a table is locked
|
||||
- issue #14916 Fix bug when creating or editing views
|
||||
- issue #14931 Fixed php error when using a query like SELECT 1 INTO @a; SELECT @a; in inline query edit
|
||||
- issue #15074 Make the server logo visible on theme "original"
|
||||
- issue #15077 Fixed incorrect page numbers
|
||||
- issue #14205 Fixed "No tables found in database" when you delete all tables from last page
|
||||
- issue #14957 Virtuality is not selected when editing generated column (added virtuality(stored) option for mariadb)
|
||||
- issue #14853 Insert page should not allow entering things into virtual columns
|
||||
- issue #15110 Fixed TypeError e.preventDefaulut is not a function
|
||||
- issue #15115 Improved label in Settings export, clarifying that it's a JSON file
|
||||
- issue #14816 Fixed [designer] Cannot read property 'style' of null
|
||||
- issue Fixed [designer] Add new tables with database/table list modal
|
||||
- issue Fixed query format on multi server setup
|
||||
- issue Fixed remove partitioning on multi server setup
|
||||
- issue Fixed normalization
|
||||
- issue Fixed 'RESET SLAVE' button on replication slave
|
||||
- issue Fixed sending a php error report on multi server setup
|
||||
- issue Fixed downloading of monitor parameters for IE 11, Edge, Chrome and others
|
||||
- issue #15141 Fixed php notice Undefined index: designer_settings
|
||||
- issue #12729 Fixed sticky table header over dropdown menu
|
||||
- issue #15140 Fixed edit link does not work on failed insert
|
||||
- issue #14334 Fixed export table structure shows rows fields
|
||||
- issue #15010 Fixed empty SQL preview modal on tbl_relation
|
||||
- issue #14673 Fixed innodb & MySQL 8: DYNAMIC & COMPRESSED ROW_FORMAT missing
|
||||
- issue Fixed empty success message when adding a new INDEX from left panel
|
||||
- issue #15150 Fixed generate password hidden on second open of change password modal
|
||||
- issue Fixed import XML data with leading zeros
|
||||
- issue #15036 Fixed missing input fields checks for MaxSizeForInputField
|
||||
- issue #15119 Fixed uninterpreted HTML on Settings->Export page
|
||||
- issue #15159 Fixed missing query time and database in console
|
||||
- issue #13713 Fixed column comments in the floating table header
|
||||
- issue #15177 Fixed label alignment on login page
|
||||
- issue #15210 Fixed a typo in the english name of the Albanian language
|
||||
- issue Fixed issue when resetting charset in import.php
|
||||
- issue #14460 Fixed forms where submitted multiple times on CTRL + ENTER
|
||||
- issue #15038 Fixed console height was allowing a negative values
|
||||
- issue #15219 Fixed 'No Password' option does not switch automatically to 'Use Text Field' in add user account
|
||||
- issue Fixed importing the exported config on Server status monitor page
|
||||
- issue #15228 Fixed php notice 'Undefined index: foreign_keys_data' on designer when the user has column access
|
||||
- issue #12900 Fixed designer page saving gives error when configuration storage is not set up
|
||||
- issue #15229 Fixed php notice, added support for 'DELETE HISTORY' table privilege (MariaDB >= 10.3.4)
|
||||
- issue #14527 Fixed import settings function not working
|
||||
- issue #14908 Fixed uninterpreted HTML on Settings->Import (missing data error descriptions)
|
||||
- issue #14800 Fixed status->Processes doesn't show full query process list page
|
||||
- issue #14833 Fixed sort by Time not working in process list page
|
||||
- issue #14982 Fixed setting "null" keep an "enum" value
|
||||
- issue #14401 Fixed insert rows keypress Enter behavior
|
||||
- issue #15146 Fixed error reports can not be sent because they are too large
|
||||
- issue #15205 Fixed useless backquotes on sql preview modal when deleting an index
|
||||
- issue #13178 Fixed issues with uppercase table and database names (lower_case_table_names=1)
|
||||
- issue #14383 Fixed warning when browsing certain tables (GIS data)
|
||||
- issue #12865 Fixed MySQL 8.0.0 issues with GIS display
|
||||
- issue #15059 Fixed "Server charset" in "Database server" tab showing wrong information
|
||||
- issue #14614 Fixed mysql error "#2014 - Commands out of sync; you can't run this command now" on sql query
|
||||
- issue #15238 Fixed phpMyAdmin 4.8.5 doesn't show privileges of procedures (raw html displayed instead)
|
||||
- issue #13726 Fixed can not copy user on Percona Server 5.7
|
||||
- issue #15239 Fixed javascript error while fetching latest version info and switching pages
|
||||
- issue #14301 Fixed javascript error when editing a JSON data type column
|
||||
- issue #15240 Fixed apply a Settings form with errors shows a JSON response after using return back
|
||||
- issue #15043 Fixed multiple errors printing on Settings page
|
||||
- issue #15037 Fixed unexpected behavior of reset button on Settings
|
||||
- issue #15157 Fixed 'Settings' tab not marked as active when browsing 2FA settings
|
||||
- issue #14934 Fixed all fields readonly on Edit/Insert screens
|
||||
- issue #14588 Fixed export of geometry objects, GIS objects are now exported as hex
|
||||
- issue #14412 Better handling of errors with Signon authentication type
|
||||
- issue Added support for AUTO_INCREMENT when using ROCKSDB, on Operations page
|
||||
- issue #15276 Fixed partitioning is missing in Structure page UI (MySQL 8.0)
|
||||
- issue #14252 Fixed DisableIS and database tree list (new database missing when refreshing the list)
|
||||
- issue #14621 Removed "Propose table structure" on MySQL 8.0
|
||||
- issue Fixed editing of virtual columns on PerconaDB
|
||||
- issue #13854 Fixed column options are ignored for GENERATED/VIRTUAL/STORED columns
|
||||
- issue #15262 Fixed incorrect display of charset column (raw html)
|
||||
- issue Added explicit parentheses in nested ternary operators
|
||||
- issue #15287 Fix auto_increment field is too small
|
||||
- issue #15283 Fix tries to change collation on views when changing collation on all tables/fields
|
||||
- issue Fixed empty PMA_gotoWhitelist JavaScript array
|
||||
- issue #15079 Fixed responsive behaviour of instruction dialog box
|
||||
- issue #10846 Fixed javascript error when renaming a table
|
||||
- issue Updated sql-parser to version 4.3.2
|
||||
- issue [security] SQL injection in Designer (PMASA-2019-3)
|
||||
- issue [security] CSRF attack on 'cookie' login form (PMASA-2019-4)
|
||||
|
||||
4.8.5 (2019-01-25)
|
||||
- issue Developer debug data was saved to the PHP error log
|
||||
- issue #14217 Fix issue when adding user on MySQL 8.0.11
|
||||
- issue #13788 Exporting a view structure based on another view with a sub-query throws no database selected error
|
||||
- issue #14635 Fix PHP error in GitRevision, error in processing request, error code 200
|
||||
- issue #14787 Cannot execute stored procedure
|
||||
- issue Add Burmese language
|
||||
- issue #14794 Not responding to click, frozen interface, plugin Text_Plain_Sql error
|
||||
- issue #14786 Table level Operations functions missing
|
||||
- issue #14791 PHP warning, db_export.php#L91 urldecode()
|
||||
- issue #14775 Export to SQL format not available for tables
|
||||
- issue #14782 Error message shown instead of two-factor QR code when adding 2fa to a user
|
||||
- issue [security] Arbitrary file read/delete relating to MySQL LOAD DATA LOCAL INFILE and an evil server instance (PMASA-2019-1)
|
||||
- issue [security] SQL injection in Designer (PMASA-2019-2)
|
||||
|
||||
--- Older ChangeLogs can be found on our project website ---
|
||||
https://www.phpmyadmin.net/old-stuff/ChangeLogs/
|
||||
|
||||
# vim: et ts=4 sw=4 sts=4
|
||||
# vim: ft=changelog fenc=utf-8
|
||||
# vim: fde=getline(v\:lnum-1)=~'^\\s*$'&&getline(v\:lnum)=~'\\S'?'>1'\:1&&v\:lnum>4&&getline(v\:lnum)!~'^#'
|
||||
# vim: fdn=1 fdm=expr
|
339
html-java-script/myAWSsite/html/phpMyAdmin/LICENSE
Normal file
339
html-java-script/myAWSsite/html/phpMyAdmin/LICENSE
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
52
html-java-script/myAWSsite/html/phpMyAdmin/README
Normal file
52
html-java-script/myAWSsite/html/phpMyAdmin/README
Normal file
@ -0,0 +1,52 @@
|
||||
phpMyAdmin - Readme
|
||||
===================
|
||||
|
||||
Version 5.0.4
|
||||
|
||||
A web interface for MySQL and MariaDB.
|
||||
|
||||
https://www.phpmyadmin.net/
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
phpMyAdmin is intended to handle the administration of MySQL over the web.
|
||||
For a summary of features, list of requirements, and installation instructions,
|
||||
please see the documentation in the ./doc/ folder or at https://docs.phpmyadmin.net/
|
||||
|
||||
Copyright
|
||||
---------
|
||||
|
||||
Copyright © 1998 onwards -- the phpMyAdmin team
|
||||
|
||||
Certain libraries are copyrighted by their respective authors;
|
||||
see the full copyright list for details.
|
||||
|
||||
For full copyright information, please see ./doc/copyright.rst
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License version 2, as published by the
|
||||
Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Licensing of current contributions
|
||||
----------------------------------
|
||||
|
||||
Beginning on 2013-12-01, new contributions to this codebase are all licensed
|
||||
under terms compatible with GPLv2-or-later. phpMyAdmin is currently
|
||||
transitioning older code to GPLv2-or-later, but work is not yet complete.
|
||||
|
||||
Enjoy!
|
||||
------
|
||||
|
||||
The phpMyAdmin team
|
@ -0,0 +1 @@
|
||||
Thu Oct 15 18:06:40 UTC 2020
|
74
html-java-script/myAWSsite/html/phpMyAdmin/ajax.php
Normal file
74
html-java-script/myAWSsite/html/phpMyAdmin/ajax.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Generic AJAX endpoint for getting information about database
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\AjaxController;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
$_GET['ajax_request'] = 'true';
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
$response->setAjax(true);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var AjaxController $controller */
|
||||
$controller = $containerBuilder->get(AjaxController::class);
|
||||
|
||||
if (empty($_POST['type'])) {
|
||||
Core::fatalError(__('Bad type!'));
|
||||
}
|
||||
|
||||
switch ($_POST['type']) {
|
||||
case 'list-databases':
|
||||
$response->addJSON($controller->databases());
|
||||
break;
|
||||
case 'list-tables':
|
||||
Util::checkParameters(['db'], true);
|
||||
$response->addJSON($controller->tables([
|
||||
'db' => $_POST['db'],
|
||||
]));
|
||||
break;
|
||||
case 'list-columns':
|
||||
Util::checkParameters(['db', 'table'], true);
|
||||
$response->addJSON($controller->columns([
|
||||
'db' => $_POST['db'],
|
||||
'table' => $_POST['table'],
|
||||
]));
|
||||
break;
|
||||
case 'config-get':
|
||||
Util::checkParameters(['key'], true);
|
||||
$response->addJSON($controller->getConfig([
|
||||
'key' => $_POST['key'],
|
||||
]));
|
||||
break;
|
||||
case 'config-set':
|
||||
Util::checkParameters(['key', 'value'], true);
|
||||
$result = $controller->setConfig([
|
||||
'key' => $_POST['key'],
|
||||
'value' => $_POST['value'],
|
||||
]);
|
||||
if ($result !== true) {
|
||||
$response->setRequestStatus(false);
|
||||
$response->addJSON('message', $result);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Core::fatalError(__('Bad type!'));
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* display selection for relational field values
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\BrowseForeigners;
|
||||
use PhpMyAdmin\Controllers\BrowseForeignersController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
Util::checkParameters(['db', 'table', 'field'], true);
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var Template $template */
|
||||
$template = $containerBuilder->get('template');
|
||||
/* Register BrowseForeignersController dependencies */
|
||||
$containerBuilder->set(
|
||||
'browse_foreigners',
|
||||
new BrowseForeigners(
|
||||
(int) $GLOBALS['cfg']['LimitChars'],
|
||||
(int) $GLOBALS['cfg']['MaxRows'],
|
||||
(int) $GLOBALS['cfg']['RepeatCells'],
|
||||
(bool) $GLOBALS['cfg']['ShowAll'],
|
||||
$GLOBALS['pmaThemeImage'],
|
||||
$template
|
||||
)
|
||||
);
|
||||
|
||||
/** @var BrowseForeignersController $controller */
|
||||
$controller = $containerBuilder->get(BrowseForeignersController::class);
|
||||
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->disableMenuAndConsole();
|
||||
$header->setBodyId('body_browse_foreigners');
|
||||
|
||||
$response->addHTML($controller->index([
|
||||
'db' => $_POST['db'] ?? null,
|
||||
'table' => $_POST['table'] ?? null,
|
||||
'field' => $_POST['field'] ?? null,
|
||||
'fieldkey' => $_POST['fieldkey'] ?? null,
|
||||
'data' => $_POST['data'] ?? null,
|
||||
'foreign_showAll' => $_POST['foreign_showAll'] ?? null,
|
||||
'foreign_filter' => $_POST['foreign_filter'] ?? null,
|
||||
]));
|
112
html-java-script/myAWSsite/html/phpMyAdmin/changelog.php
Normal file
112
html-java-script/myAWSsite/html/phpMyAdmin/changelog.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Simple script to set correct charset for changelog
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Template;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets core libraries and defines some variables
|
||||
*/
|
||||
require ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Template $template */
|
||||
$template = $containerBuilder->get('template');
|
||||
|
||||
$response = Response::getInstance();
|
||||
$response->disable();
|
||||
$response->getHeader()->sendHttpHeaders();
|
||||
|
||||
$filename = CHANGELOG_FILE;
|
||||
|
||||
/**
|
||||
* Read changelog.
|
||||
*/
|
||||
// Check if the file is available, some distributions remove these.
|
||||
if (@is_readable($filename)) {
|
||||
// Test if the if is in a compressed format
|
||||
if (substr($filename, -3) == '.gz') {
|
||||
ob_start();
|
||||
readgzfile($filename);
|
||||
$changelog = ob_get_contents();
|
||||
ob_end_clean();
|
||||
} else {
|
||||
$changelog = file_get_contents($filename);
|
||||
}
|
||||
} else {
|
||||
printf(
|
||||
__(
|
||||
'The %s file is not available on this system, please visit ' .
|
||||
'%s for more information.'
|
||||
),
|
||||
$filename,
|
||||
'<a href="https://www.phpmyadmin.net/">phpmyadmin.net</a>'
|
||||
);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whole changelog in variable.
|
||||
*/
|
||||
$changelog = htmlspecialchars($changelog);
|
||||
|
||||
$github_url = 'https://github.com/phpmyadmin/phpmyadmin/';
|
||||
$faq_url = 'https://docs.phpmyadmin.net/en/latest/faq.html';
|
||||
|
||||
$replaces = [
|
||||
'@(https?://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@'
|
||||
=> '<a href="url.php?url=\\1">\\1</a>',
|
||||
|
||||
// mail address
|
||||
'/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +<(.*@.*)>/i'
|
||||
=> '\\1 <a href="mailto:\\3">\\2</a>',
|
||||
|
||||
// FAQ entries
|
||||
'/FAQ ([0-9]+)\.([0-9a-z]+)/i'
|
||||
=> '<a href="url.php?url=' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>',
|
||||
|
||||
// GitHub issues
|
||||
'/issue\s*#?([0-9]{4,5}) /i'
|
||||
=> '<a href="url.php?url=' . $github_url . 'issues/\\1">issue #\\1</a> ',
|
||||
|
||||
// CVE/CAN entries
|
||||
'/((CAN|CVE)-[0-9]+-[0-9]+)/'
|
||||
=> '<a href="url.php?url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>',
|
||||
|
||||
// PMASAentries
|
||||
'/(PMASA-[0-9]+-[0-9]+)/'
|
||||
=> '<a href="url.php?url=https://www.phpmyadmin.net/security/\\1/">\\1</a>',
|
||||
|
||||
// Highlight releases (with links)
|
||||
'/([0-9]+)\.([0-9]+)\.([0-9]+)\.0 (\([0-9-]+\))/'
|
||||
=> '<a id="\\1_\\2_\\3"></a>'
|
||||
. '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3">'
|
||||
. '\\1.\\2.\\3.0 \\4</a>',
|
||||
'/([0-9]+)\.([0-9]+)\.([0-9]+)\.([1-9][0-9]*) (\([0-9-]+\))/'
|
||||
=> '<a id="\\1_\\2_\\3_\\4"></a>'
|
||||
. '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3_\\4">'
|
||||
. '\\1.\\2.\\3.\\4 \\5</a>',
|
||||
|
||||
// Highlight releases (not linkable)
|
||||
'/( ### )(.*)/'
|
||||
=> '\\1<b>\\2</b>',
|
||||
|
||||
// Links target and rel
|
||||
'/a href="/' => 'a target="_blank" rel="noopener noreferrer" href="',
|
||||
|
||||
];
|
||||
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
|
||||
echo $template->render('changelog', [
|
||||
'changelog' => preg_replace(array_keys($replaces), $replaces, $changelog),
|
||||
]);
|
47
html-java-script/myAWSsite/html/phpMyAdmin/chk_rel.php
Normal file
47
html-java-script/myAWSsite/html/phpMyAdmin/chk_rel.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Displays status of phpMyAdmin configuration storage
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var Relation $relation */
|
||||
$relation = $containerBuilder->get('relation');
|
||||
|
||||
// If request for creating the pmadb
|
||||
if (isset($_POST['create_pmadb']) && $relation->createPmaDatabase()) {
|
||||
$relation->fixPmaTables('phpmyadmin');
|
||||
}
|
||||
|
||||
// If request for creating all PMA tables.
|
||||
if (isset($_POST['fixall_pmadb'])) {
|
||||
$relation->fixPmaTables($GLOBALS['db']);
|
||||
}
|
||||
|
||||
$cfgRelation = $relation->getRelationsParam();
|
||||
// If request for creating missing PMA tables.
|
||||
if (isset($_POST['fix_pmadb'])) {
|
||||
$relation->fixPmaTables($cfgRelation['db']);
|
||||
}
|
||||
|
||||
$response->addHTML(
|
||||
$relation->getRelationsParamDiagnostic($cfgRelation)
|
||||
);
|
112
html-java-script/myAWSsite/html/phpMyAdmin/composer.json
Normal file
112
html-java-script/myAWSsite/html/phpMyAdmin/composer.json
Normal file
@ -0,0 +1,112 @@
|
||||
{
|
||||
"name": "phpmyadmin/phpmyadmin",
|
||||
"type": "project",
|
||||
"description": "A web interface for MySQL and MariaDB",
|
||||
"keywords": ["phpmyadmin","mysql","web"],
|
||||
"homepage": "https://www.phpmyadmin.net/",
|
||||
"support": {
|
||||
"forum": "https://www.phpmyadmin.net/support/",
|
||||
"issues": "https://github.com/phpmyadmin/phpmyadmin/issues",
|
||||
"wiki": "https://wiki.phpmyadmin.net/",
|
||||
"docs": "https://docs.phpmyadmin.net/",
|
||||
"source": "https://github.com/phpmyadmin/phpmyadmin"
|
||||
},
|
||||
"license": "GPL-2.0-only",
|
||||
"authors": [
|
||||
{
|
||||
"name": "The phpMyAdmin Team",
|
||||
"email": "developers@phpmyadmin.net",
|
||||
"homepage": "https://www.phpmyadmin.net/team/"
|
||||
}
|
||||
],
|
||||
"non-feature-branches": ["RELEASE_.*"],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpMyAdmin\\": "libraries/classes"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"PhpMyAdmin\\Tests\\": "test/classes",
|
||||
"PhpMyAdmin\\Tests\\Selenium\\": "test/selenium/"
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://www.phpmyadmin.net"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"ext-hash": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mysqli": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-xml": "*",
|
||||
"google/recaptcha": "^1.1",
|
||||
"phpmyadmin/motranslator": "^4.0",
|
||||
"phpmyadmin/shapefile": "^2.0",
|
||||
"phpmyadmin/sql-parser": "^5.0",
|
||||
"phpmyadmin/twig-i18n-extension": "^2.0 || ^3.0",
|
||||
"phpseclib/phpseclib": "^2.0",
|
||||
"symfony/config": "^4.2.8",
|
||||
"symfony/dependency-injection": "^4.2.8",
|
||||
"symfony/expression-language": "^4.2",
|
||||
"symfony/polyfill-ctype": "^1.8",
|
||||
"symfony/polyfill-mbstring": "^1.3",
|
||||
"symfony/yaml": "^4.2.8",
|
||||
"twig/twig": "^2.9 || ^3",
|
||||
"williamdes/mariadb-mysql-kbs": "^1.2"
|
||||
},
|
||||
"conflict": {
|
||||
"phpseclib/phpseclib": "2.0.8",
|
||||
"tecnickcom/tcpdf": "<6.2",
|
||||
"pragmarx/google2fa": ">=6.1",
|
||||
"pragmarx/google2fa-qrcode": "<1.0.1",
|
||||
"samyoul/u2f-php-server": "<1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-openssl": "Cookie encryption",
|
||||
"ext-curl": "Updates checking",
|
||||
"ext-opcache": "Better performance",
|
||||
"ext-zlib": "For gz import and export",
|
||||
"ext-bz2": "For bzip2 import and export",
|
||||
"ext-zip": "For zip import and export",
|
||||
"ext-gd2": "For image transformations",
|
||||
"ext-mbstring": "For best performance",
|
||||
"tecnickcom/tcpdf": "For PDF support",
|
||||
"pragmarx/google2fa-qrcode": "For 2FA authentication",
|
||||
"samyoul/u2f-php-server": "For FIDO U2F authentication"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-webdriver/webdriver": "^1.7.1",
|
||||
"phpmyadmin/coding-standard": "^1.0",
|
||||
"phpstan/phpstan": "^0.11.5",
|
||||
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.0",
|
||||
"pragmarx/google2fa-qrcode": "^1.0.1",
|
||||
"samyoul/u2f-php-server": "^1.1",
|
||||
"squizlabs/php_codesniffer": "^3.0",
|
||||
"tecnickcom/tcpdf": "^6.3"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0.x-dev"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"phpcbf": "phpcbf",
|
||||
"phpcs": "phpcs",
|
||||
"phpstan": "phpstan analyse",
|
||||
"phpunit": "phpunit",
|
||||
"test": [
|
||||
"@phpcs",
|
||||
"@phpstan",
|
||||
"@phpunit"
|
||||
]
|
||||
},
|
||||
"config":{
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
4932
html-java-script/myAWSsite/html/phpMyAdmin/composer.lock
generated
Normal file
4932
html-java-script/myAWSsite/html/phpMyAdmin/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
155
html-java-script/myAWSsite/html/phpMyAdmin/config.sample.inc.php
Normal file
155
html-java-script/myAWSsite/html/phpMyAdmin/config.sample.inc.php
Normal file
@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* phpMyAdmin sample configuration, you can use it as base for
|
||||
* manual configuration. For easier setup you can use setup/
|
||||
*
|
||||
* All directives are explained in documentation in the doc/ folder
|
||||
* or at <https://docs.phpmyadmin.net/>.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This is needed for cookie based authentication to encrypt password in
|
||||
* cookie. Needs to be 32 chars long.
|
||||
*/
|
||||
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
|
||||
|
||||
/**
|
||||
* Servers configuration
|
||||
*/
|
||||
$i = 0;
|
||||
|
||||
/**
|
||||
* First server
|
||||
*/
|
||||
$i++;
|
||||
/* Authentication type */
|
||||
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||
/* Server parameters */
|
||||
$cfg['Servers'][$i]['host'] = 'localhost';
|
||||
$cfg['Servers'][$i]['compress'] = false;
|
||||
$cfg['Servers'][$i]['AllowNoPassword'] = false;
|
||||
|
||||
/**
|
||||
* phpMyAdmin configuration storage settings.
|
||||
*/
|
||||
|
||||
/* User used to manipulate with storage */
|
||||
// $cfg['Servers'][$i]['controlhost'] = '';
|
||||
// $cfg['Servers'][$i]['controlport'] = '';
|
||||
// $cfg['Servers'][$i]['controluser'] = 'pma';
|
||||
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
|
||||
|
||||
/* Storage database and tables */
|
||||
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
|
||||
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
|
||||
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
|
||||
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
|
||||
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
|
||||
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
|
||||
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
|
||||
// $cfg['Servers'][$i]['history'] = 'pma__history';
|
||||
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
|
||||
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
|
||||
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
|
||||
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
|
||||
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
|
||||
// $cfg['Servers'][$i]['users'] = 'pma__users';
|
||||
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
|
||||
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
|
||||
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
|
||||
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
|
||||
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
|
||||
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
|
||||
|
||||
/**
|
||||
* End of servers configuration
|
||||
*/
|
||||
|
||||
/**
|
||||
* Directories for saving/loading files from server
|
||||
*/
|
||||
$cfg['UploadDir'] = '';
|
||||
$cfg['SaveDir'] = '';
|
||||
|
||||
/**
|
||||
* Whether to display icons or text or both icons and text in table row
|
||||
* action segment. Value can be either of 'icons', 'text' or 'both'.
|
||||
* default = 'both'
|
||||
*/
|
||||
//$cfg['RowActionType'] = 'icons';
|
||||
|
||||
/**
|
||||
* Defines whether a user should be displayed a "show all (records)"
|
||||
* button in browse mode or not.
|
||||
* default = false
|
||||
*/
|
||||
//$cfg['ShowAll'] = true;
|
||||
|
||||
/**
|
||||
* Number of rows displayed when browsing a result set. If the result
|
||||
* set contains more rows, "Previous" and "Next".
|
||||
* Possible values: 25, 50, 100, 250, 500
|
||||
* default = 25
|
||||
*/
|
||||
//$cfg['MaxRows'] = 50;
|
||||
|
||||
/**
|
||||
* Disallow editing of binary fields
|
||||
* valid values are:
|
||||
* false allow editing
|
||||
* 'blob' allow editing except for BLOB fields
|
||||
* 'noblob' disallow editing except for BLOB fields
|
||||
* 'all' disallow editing
|
||||
* default = 'blob'
|
||||
*/
|
||||
//$cfg['ProtectBinary'] = false;
|
||||
|
||||
/**
|
||||
* Default language to use, if not browser-defined or user-defined
|
||||
* (you find all languages in the locale folder)
|
||||
* uncomment the desired line:
|
||||
* default = 'en'
|
||||
*/
|
||||
//$cfg['DefaultLang'] = 'en';
|
||||
//$cfg['DefaultLang'] = 'de';
|
||||
|
||||
/**
|
||||
* How many columns should be used for table display of a database?
|
||||
* (a value larger than 1 results in some information being hidden)
|
||||
* default = 1
|
||||
*/
|
||||
//$cfg['PropertiesNumColumns'] = 2;
|
||||
|
||||
/**
|
||||
* Set to true if you want DB-based query history.If false, this utilizes
|
||||
* JS-routines to display query history (lost by window close)
|
||||
*
|
||||
* This requires configuration storage enabled, see above.
|
||||
* default = false
|
||||
*/
|
||||
//$cfg['QueryHistoryDB'] = true;
|
||||
|
||||
/**
|
||||
* When using DB-based query history, how many entries should be kept?
|
||||
* default = 25
|
||||
*/
|
||||
//$cfg['QueryHistoryMax'] = 100;
|
||||
|
||||
/**
|
||||
* Whether or not to query the user before sending the error report to
|
||||
* the phpMyAdmin team when a JavaScript error occurs
|
||||
*
|
||||
* Available options
|
||||
* ('ask' | 'always' | 'never')
|
||||
* default = 'ask'
|
||||
*/
|
||||
//$cfg['SendErrorReports'] = 'always';
|
||||
|
||||
/**
|
||||
* You can find more configuration options in the documentation
|
||||
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
|
||||
*/
|
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Central Columns view/edit
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
use PhpMyAdmin\CentralColumns;
|
||||
use PhpMyAdmin\Controllers\Database\CentralColumnsController;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var CentralColumns $centralColumns */
|
||||
$centralColumns = $containerBuilder->get('central_columns');
|
||||
|
||||
/** @var CentralColumnsController $controller */
|
||||
$controller = $containerBuilder->get(CentralColumnsController::class);
|
||||
|
||||
/** @var string $db */
|
||||
$db = $containerBuilder->getParameter('db');
|
||||
|
||||
if (isset($_POST['edit_save'])) {
|
||||
echo $controller->editSave([
|
||||
'col_name' => $_POST['col_name'] ?? null,
|
||||
'orig_col_name' => $_POST['orig_col_name'] ?? null,
|
||||
'col_default' => $_POST['col_default'] ?? null,
|
||||
'col_default_sel' => $_POST['col_default_sel'] ?? null,
|
||||
'col_extra' => $_POST['col_extra'] ?? null,
|
||||
'col_isNull' => $_POST['col_isNull'] ?? null,
|
||||
'col_length' => $_POST['col_length'] ?? null,
|
||||
'col_attribute' => $_POST['col_attribute'] ?? null,
|
||||
'col_type' => $_POST['col_type'] ?? null,
|
||||
'collation' => $_POST['collation'] ?? null,
|
||||
]);
|
||||
exit;
|
||||
} elseif (isset($_POST['add_new_column'])) {
|
||||
$tmp_msg = $controller->addNewColumn([
|
||||
'col_name' => $_POST['col_name'] ?? null,
|
||||
'col_default' => $_POST['col_default'] ?? null,
|
||||
'col_default_sel' => $_POST['col_default_sel'] ?? null,
|
||||
'col_extra' => $_POST['col_extra'] ?? null,
|
||||
'col_isNull' => $_POST['col_isNull'] ?? null,
|
||||
'col_length' => $_POST['col_length'] ?? null,
|
||||
'col_attribute' => $_POST['col_attribute'] ?? null,
|
||||
'col_type' => $_POST['col_type'] ?? null,
|
||||
'collation' => $_POST['collation'] ?? null,
|
||||
]);
|
||||
}
|
||||
if (isset($_POST['populateColumns'])) {
|
||||
$response->addHTML($controller->populateColumns([
|
||||
'selectedTable' => $_POST['selectedTable'],
|
||||
]));
|
||||
exit;
|
||||
}
|
||||
if (isset($_POST['getColumnList'])) {
|
||||
$response->addJSON('message', $controller->getColumnList([
|
||||
'cur_table' => $_POST['cur_table'] ?? null,
|
||||
]));
|
||||
exit;
|
||||
}
|
||||
if (isset($_POST['add_column'])) {
|
||||
$tmp_msg = $controller->addColumn([
|
||||
'table-select' => $_POST['table-select'] ?? null,
|
||||
'column-select' => $_POST['column-select'] ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
|
||||
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
|
||||
$scripts->addFile('database/central_columns.js');
|
||||
|
||||
if (isset($_POST['edit_central_columns_page'])) {
|
||||
$response->addHTML($controller->editPage([
|
||||
'selected_fld' => $_POST['selected_fld'] ?? null,
|
||||
'db' => $_POST['db'] ?? null,
|
||||
]));
|
||||
exit;
|
||||
}
|
||||
if (isset($_POST['multi_edit_central_column_save'])) {
|
||||
$message = $controller->updateMultipleColumn([
|
||||
'db' => $_POST['db'] ?? null,
|
||||
'orig_col_name' => $_POST['orig_col_name'] ?? null,
|
||||
'field_name' => $_POST['field_name'] ?? null,
|
||||
'field_default_type' => $_POST['field_default_type'] ?? null,
|
||||
'field_default_value' => $_POST['field_default_value'] ?? null,
|
||||
'field_length' => $_POST['field_length'] ?? null,
|
||||
'field_attribute' => $_POST['field_attribute'] ?? null,
|
||||
'field_type' => $_POST['field_type'] ?? null,
|
||||
'field_collation' => $_POST['field_collation'] ?? null,
|
||||
'field_null' => $_POST['field_null'] ?? null,
|
||||
'col_extra' => $_POST['col_extra'] ?? null,
|
||||
]);
|
||||
if (! is_bool($message)) {
|
||||
$response->setRequestStatus(false);
|
||||
$response->addJSON('message', $message);
|
||||
}
|
||||
}
|
||||
if (isset($_POST['delete_save'])) {
|
||||
$tmp_msg = $controller->deleteSave([
|
||||
'db' => $_POST['db'] ?? null,
|
||||
'col_name' => $_POST['col_name'] ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
$response->addHTML($controller->index([
|
||||
'pos' => $_POST['pos'] ?? null,
|
||||
'total_rows' => $_POST['total_rows'] ?? null,
|
||||
]));
|
||||
|
||||
$pos = 0;
|
||||
if (Core::isValid($_POST['pos'], 'integer')) {
|
||||
$pos = (int) $_POST['pos'];
|
||||
}
|
||||
$num_cols = $centralColumns->getColumnsCount(
|
||||
$db,
|
||||
$pos,
|
||||
(int) $GLOBALS['cfg']['MaxRows']
|
||||
);
|
||||
$message = Message::success(
|
||||
sprintf(__('Showing rows %1$s - %2$s.'), $pos + 1, $pos + $num_cols)
|
||||
);
|
||||
if (isset($tmp_msg) && $tmp_msg !== true) {
|
||||
$message = $tmp_msg;
|
||||
}
|
31
html-java-script/myAWSsite/html/phpMyAdmin/db_datadict.php
Normal file
31
html-java-script/myAWSsite/html/phpMyAdmin/db_datadict.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Renders data dictionary
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\Database\DataDictionaryController;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
Util::checkParameters(['db']);
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DataDictionaryController $controller */
|
||||
$controller = $containerBuilder->get(DataDictionaryController::class);
|
||||
|
||||
$header = $response->getHeader();
|
||||
$header->enablePrintView();
|
||||
|
||||
$response->addHTML($controller->index());
|
236
html-java-script/myAWSsite/html/phpMyAdmin/db_designer.php
Normal file
236
html-java-script/myAWSsite/html/phpMyAdmin/db_designer.php
Normal file
@ -0,0 +1,236 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* phpMyAdmin designer general code
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Database\Designer;
|
||||
use PhpMyAdmin\Database\Designer\Common;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $db;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var Designer $databaseDesigner */
|
||||
$databaseDesigner = $containerBuilder->get('designer');
|
||||
|
||||
/** @var Common $designerCommon */
|
||||
$designerCommon = $containerBuilder->get('designer_common');
|
||||
|
||||
if (isset($_POST['dialog'])) {
|
||||
if ($_POST['dialog'] == 'edit') {
|
||||
$html = $databaseDesigner->getHtmlForEditOrDeletePages($_POST['db'], 'editPage');
|
||||
} elseif ($_POST['dialog'] == 'delete') {
|
||||
$html = $databaseDesigner->getHtmlForEditOrDeletePages($_POST['db'], 'deletePage');
|
||||
} elseif ($_POST['dialog'] == 'save_as') {
|
||||
$html = $databaseDesigner->getHtmlForPageSaveAs($_POST['db']);
|
||||
} elseif ($_POST['dialog'] == 'export') {
|
||||
$html = $databaseDesigner->getHtmlForSchemaExport(
|
||||
$_POST['db'],
|
||||
$_POST['selected_page']
|
||||
);
|
||||
} elseif ($_POST['dialog'] == 'add_table') {
|
||||
// Pass the db and table to the getTablesInfo so we only have the table we asked for
|
||||
$script_display_field = $designerCommon->getTablesInfo($_POST['db'], $_POST['table']);
|
||||
$tab_column = $designerCommon->getColumnsInfo($script_display_field);
|
||||
$tables_all_keys = $designerCommon->getAllKeys($script_display_field);
|
||||
$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys($script_display_field);
|
||||
|
||||
$html = $databaseDesigner->getDatabaseTables(
|
||||
$_POST['db'],
|
||||
$script_display_field,
|
||||
[],
|
||||
-1,
|
||||
$tab_column,
|
||||
$tables_all_keys,
|
||||
$tables_pk_or_unique_keys
|
||||
);
|
||||
}
|
||||
|
||||
if (! empty($html)) {
|
||||
$response->addHTML($html);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (isset($_POST['operation'])) {
|
||||
if ($_POST['operation'] == 'deletePage') {
|
||||
$success = $designerCommon->deletePage($_POST['selected_page']);
|
||||
$response->setRequestStatus($success);
|
||||
} elseif ($_POST['operation'] == 'savePage') {
|
||||
if ($_POST['save_page'] == 'same') {
|
||||
$page = $_POST['selected_page'];
|
||||
} else { // new
|
||||
if ($designerCommon->getPageExists($_POST['selected_value'])) {
|
||||
$response->addJSON(
|
||||
'message',
|
||||
/* l10n: The user tries to save a page with an existing name in Designer */
|
||||
__(
|
||||
sprintf(
|
||||
"There already exists a page named \"%s\" please rename it to something else.",
|
||||
htmlspecialchars($_POST['selected_value'])
|
||||
)
|
||||
)
|
||||
);
|
||||
$response->setRequestStatus(false);
|
||||
return;
|
||||
} else {
|
||||
$page = $designerCommon->createNewPage($_POST['selected_value'], $_POST['db']);
|
||||
$response->addJSON('id', $page);
|
||||
}
|
||||
}
|
||||
$success = $designerCommon->saveTablePositions($page);
|
||||
$response->setRequestStatus($success);
|
||||
} elseif ($_POST['operation'] == 'setDisplayField') {
|
||||
[
|
||||
$success,
|
||||
$message,
|
||||
] = $designerCommon->saveDisplayField(
|
||||
$_POST['db'],
|
||||
$_POST['table'],
|
||||
$_POST['field']
|
||||
);
|
||||
$response->setRequestStatus($success);
|
||||
$response->addJSON('message', $message);
|
||||
} elseif ($_POST['operation'] == 'addNewRelation') {
|
||||
list($success, $message) = $designerCommon->addNewRelation(
|
||||
$_POST['db'],
|
||||
$_POST['T1'],
|
||||
$_POST['F1'],
|
||||
$_POST['T2'],
|
||||
$_POST['F2'],
|
||||
$_POST['on_delete'],
|
||||
$_POST['on_update'],
|
||||
$_POST['DB1'],
|
||||
$_POST['DB2']
|
||||
);
|
||||
$response->setRequestStatus($success);
|
||||
$response->addJSON('message', $message);
|
||||
} elseif ($_POST['operation'] == 'removeRelation') {
|
||||
list($success, $message) = $designerCommon->removeRelation(
|
||||
$_POST['T1'],
|
||||
$_POST['F1'],
|
||||
$_POST['T2'],
|
||||
$_POST['F2']
|
||||
);
|
||||
$response->setRequestStatus($success);
|
||||
$response->addJSON('message', $message);
|
||||
} elseif ($_POST['operation'] == 'save_setting_value') {
|
||||
$success = $designerCommon->saveSetting($_POST['index'], $_POST['value']);
|
||||
$response->setRequestStatus($success);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
$script_display_field = $designerCommon->getTablesInfo();
|
||||
|
||||
$display_page = -1;
|
||||
$selected_page = null;
|
||||
|
||||
if (isset($_GET['query'])) {
|
||||
$display_page = $designerCommon->getDefaultPage($_GET['db']);
|
||||
} elseif (! empty($_GET['page'])) {
|
||||
$display_page = $_GET['page'];
|
||||
} else {
|
||||
$display_page = $designerCommon->getLoadingPage($_GET['db']);
|
||||
}
|
||||
if ($display_page != -1) {
|
||||
$selected_page = $designerCommon->getPageName($display_page);
|
||||
}
|
||||
$tab_pos = $designerCommon->getTablePositions($display_page);
|
||||
|
||||
$fullTableNames = [];
|
||||
|
||||
foreach ($script_display_field as $designerTable) {
|
||||
$fullTableNames[] = $designerTable->getDbTableString();
|
||||
}
|
||||
|
||||
foreach ($tab_pos as $position) {
|
||||
if (! in_array($position['dbName'] . '.' . $position['tableName'], $fullTableNames)) {
|
||||
foreach ($designerCommon->getTablesInfo($position['dbName'], $position['tableName']) as $designerTable) {
|
||||
$script_display_field[] = $designerTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tab_column = $designerCommon->getColumnsInfo($script_display_field);
|
||||
$script_tables = $designerCommon->getScriptTabs($script_display_field);
|
||||
$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys($script_display_field);
|
||||
$tables_all_keys = $designerCommon->getAllKeys($script_display_field);
|
||||
$classes_side_menu = $databaseDesigner->returnClassNamesFromMenuButtons();
|
||||
|
||||
|
||||
$script_contr = $designerCommon->getScriptContr($script_display_field);
|
||||
|
||||
$params = ['lang' => $GLOBALS['lang']];
|
||||
if (isset($_GET['db'])) {
|
||||
$params['db'] = $_GET['db'];
|
||||
}
|
||||
|
||||
$response = Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setBodyId('designer_body');
|
||||
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('vendor/jquery/jquery.fullscreen.js');
|
||||
$scripts->addFile('designer/database.js');
|
||||
$scripts->addFile('designer/objects.js');
|
||||
$scripts->addFile('designer/page.js');
|
||||
$scripts->addFile('designer/history.js');
|
||||
$scripts->addFile('designer/move.js');
|
||||
$scripts->addFile('designer/init.js');
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
// Embed some data into HTML, later it will be read
|
||||
// by designer/init.js and converted to JS variables.
|
||||
$response->addHTML(
|
||||
$databaseDesigner->getHtmlForMain(
|
||||
$db,
|
||||
$_GET['db'],
|
||||
$script_display_field,
|
||||
$script_tables,
|
||||
$script_contr,
|
||||
$script_display_field,
|
||||
$display_page,
|
||||
isset($_GET['query']),
|
||||
$selected_page,
|
||||
$classes_side_menu,
|
||||
$tab_pos,
|
||||
$tab_column,
|
||||
$tables_all_keys,
|
||||
$tables_pk_or_unique_keys
|
||||
)
|
||||
);
|
||||
|
||||
$response->addHTML('<div id="PMA_disable_floating_menubar"></div>');
|
80
html-java-script/myAWSsite/html/phpMyAdmin/db_events.php
Normal file
80
html-java-script/myAWSsite/html/phpMyAdmin/db_events.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Events management.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\Database\EventsController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
$_PMA_RTE = 'EVN';
|
||||
|
||||
/** @var EventsController $controller */
|
||||
$controller = $containerBuilder->get(EventsController::class);
|
||||
|
||||
/** @var string $db */
|
||||
$db = $containerBuilder->getParameter('db');
|
||||
|
||||
/** @var string $table */
|
||||
$table = $containerBuilder->getParameter('table');
|
||||
|
||||
if (! $response->isAjax()) {
|
||||
/**
|
||||
* Displays the header and tabs
|
||||
*/
|
||||
if (! empty($table) && in_array($table, $dbi->getTables($db))) {
|
||||
include_once ROOT_PATH . 'libraries/tbl_common.inc.php';
|
||||
} else {
|
||||
$table = '';
|
||||
include_once ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Since we did not include some libraries, we need
|
||||
* to manually select the required database and
|
||||
* create the missing $url_query variable
|
||||
*/
|
||||
if (strlen($db) > 0) {
|
||||
$dbi->selectDb($db);
|
||||
if (! isset($url_query)) {
|
||||
$url_query = Url::getCommon(
|
||||
[
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$controller->index();
|
173
html-java-script/myAWSsite/html/phpMyAdmin/db_export.php
Normal file
173
html-java-script/myAWSsite/html/phpMyAdmin/db_export.php
Normal file
@ -0,0 +1,173 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* dumps a database
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Config\PageSettings;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Display\Export as DisplayExport;
|
||||
use PhpMyAdmin\Export;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $db, $table, $url_query, $containerBuilder;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
PageSettings::showGroup('Export');
|
||||
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('export.js');
|
||||
|
||||
/** @var Export $export */
|
||||
$export = $containerBuilder->get('export');
|
||||
|
||||
// $sub_part is used in Util::getDbInfo() to see if we are coming from
|
||||
// db_export.php, in which case we don't obey $cfg['MaxTableList']
|
||||
$sub_part = '_export';
|
||||
require_once ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_export.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, $sub_part === null ? '' : $sub_part);
|
||||
|
||||
/**
|
||||
* Displays the form
|
||||
*/
|
||||
$export_page_title = __('View dump (schema) of database');
|
||||
|
||||
// exit if no tables in db found
|
||||
if ($num_tables < 1) {
|
||||
$response->addHTML(
|
||||
Message::error(__('No tables found in database.'))->getDisplay()
|
||||
);
|
||||
exit;
|
||||
} // end if
|
||||
|
||||
$multi_values = '<div class="export_table_list_container">';
|
||||
if (isset($_POST['structure_or_data_forced'])) {
|
||||
$force_val = htmlspecialchars($_POST['structure_or_data_forced']);
|
||||
} else {
|
||||
$force_val = 0;
|
||||
}
|
||||
$multi_values .= '<input type="hidden" name="structure_or_data_forced" value="'
|
||||
. $force_val . '">';
|
||||
$multi_values .= '<table class="export_table_select">'
|
||||
. '<thead><tr><th></th>'
|
||||
. '<th>' . __('Tables') . '</th>'
|
||||
. '<th class="export_structure">' . __('Structure') . '</th>'
|
||||
. '<th class="export_data">' . __('Data') . '</th>'
|
||||
. '</tr><tr>'
|
||||
. '<td></td>'
|
||||
. '<td class="export_table_name all">' . __('Select all') . '</td>'
|
||||
. '<td class="export_structure all">'
|
||||
. '<input type="checkbox" id="table_structure_all"></td>'
|
||||
. '<td class="export_data all"><input type="checkbox" id="table_data_all">'
|
||||
. '</td>'
|
||||
. '</tr></thead>'
|
||||
. '<tbody>';
|
||||
$multi_values .= "\n";
|
||||
|
||||
// when called by libraries/mult_submits.inc.php
|
||||
if (! empty($_POST['selected_tbl']) && empty($table_select)) {
|
||||
$table_select = $_POST['selected_tbl'];
|
||||
}
|
||||
|
||||
foreach ($tables as $each_table) {
|
||||
if (isset($_POST['table_select']) && is_array($_POST['table_select'])) {
|
||||
$is_checked = $export->getCheckedClause(
|
||||
$each_table['Name'],
|
||||
$_POST['table_select']
|
||||
);
|
||||
} elseif (isset($table_select)) {
|
||||
$is_checked = $export->getCheckedClause(
|
||||
$each_table['Name'],
|
||||
$table_select
|
||||
);
|
||||
} else {
|
||||
$is_checked = ' checked="checked"';
|
||||
}
|
||||
if (isset($_POST['table_structure']) && is_array($_POST['table_structure'])) {
|
||||
$structure_checked = $export->getCheckedClause(
|
||||
$each_table['Name'],
|
||||
$_POST['table_structure']
|
||||
);
|
||||
} else {
|
||||
$structure_checked = $is_checked;
|
||||
}
|
||||
if (isset($_POST['table_data']) && is_array($_POST['table_data'])) {
|
||||
$data_checked = $export->getCheckedClause(
|
||||
$each_table['Name'],
|
||||
$_POST['table_data']
|
||||
);
|
||||
} else {
|
||||
$data_checked = $is_checked;
|
||||
}
|
||||
$table_html = htmlspecialchars($each_table['Name']);
|
||||
$multi_values .= '<tr class="marked">';
|
||||
$multi_values .= '<td><input type="checkbox" name="table_select[]"'
|
||||
. ' value="' . $table_html . '"' . $is_checked . ' class="checkall"></td>';
|
||||
$multi_values .= '<td class="export_table_name">'
|
||||
. str_replace(' ', ' ', $table_html) . '</td>';
|
||||
$multi_values .= '<td class="export_structure">'
|
||||
. '<input type="checkbox" name="table_structure[]"'
|
||||
. ' value="' . $table_html . '"' . $structure_checked . '></td>';
|
||||
$multi_values .= '<td class="export_data">'
|
||||
. '<input type="checkbox" name="table_data[]"'
|
||||
. ' value="' . $table_html . '"' . $data_checked . '></td>';
|
||||
$multi_values .= '</tr>';
|
||||
} // end for
|
||||
|
||||
$multi_values .= "\n";
|
||||
$multi_values .= '</tbody></table></div>';
|
||||
|
||||
if (! isset($sql_query)) {
|
||||
$sql_query = '';
|
||||
}
|
||||
if (! isset($num_tables)) {
|
||||
$num_tables = 0;
|
||||
}
|
||||
if (! isset($unlim_num_rows)) {
|
||||
$unlim_num_rows = 0;
|
||||
}
|
||||
if ($multi_values === null) {
|
||||
$multi_values = '';
|
||||
}
|
||||
$response = Response::getInstance();
|
||||
$displayExport = new DisplayExport();
|
||||
$response->addHTML(
|
||||
$displayExport->getDisplay(
|
||||
'database',
|
||||
$db,
|
||||
$table,
|
||||
$sql_query,
|
||||
$num_tables,
|
||||
$unlim_num_rows,
|
||||
$multi_values
|
||||
)
|
||||
);
|
56
html-java-script/myAWSsite/html/phpMyAdmin/db_import.php
Normal file
56
html-java-script/myAWSsite/html/phpMyAdmin/db_import.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database import page
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Config\PageSettings;
|
||||
use PhpMyAdmin\Display\Import;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $db, $table;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
PageSettings::showGroup('Import');
|
||||
|
||||
$response = Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('import.js');
|
||||
|
||||
$import = new Import();
|
||||
|
||||
/**
|
||||
* Gets tables information and displays top links
|
||||
*/
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
$response = Response::getInstance();
|
||||
$response->addHTML(
|
||||
$import->get(
|
||||
'database',
|
||||
$db,
|
||||
$table,
|
||||
$max_upload_size
|
||||
)
|
||||
);
|
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Handles database multi-table querying
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\Database\MultiTableQueryController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Template;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var MultiTableQueryController $controller */
|
||||
$controller = $containerBuilder->get(MultiTableQueryController::class);
|
||||
|
||||
/** @var Template $template */
|
||||
$template = $containerBuilder->get('template');
|
||||
|
||||
if (isset($_POST['sql_query'])) {
|
||||
$controller->displayResults([
|
||||
'sql_query' => $_POST['sql_query'],
|
||||
'db' => $_REQUEST['db'] ?? null,
|
||||
]);
|
||||
} elseif (isset($_GET['tables'])) {
|
||||
$response->addJSON($controller->table([
|
||||
'tables' => $_GET['tables'],
|
||||
'db' => $_REQUEST['db'] ?? null,
|
||||
]));
|
||||
} else {
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('vendor/jquery/jquery.md5.js');
|
||||
$scripts->addFile('database/multi_table_query.js');
|
||||
$scripts->addFile('database/query_generator.js');
|
||||
|
||||
$response->addHTML($controller->index($template));
|
||||
}
|
321
html-java-script/myAWSsite/html/phpMyAdmin/db_operations.php
Normal file
321
html-java-script/myAWSsite/html/phpMyAdmin/db_operations.php
Normal file
@ -0,0 +1,321 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* handles miscellaneous db operations:
|
||||
* - move/rename
|
||||
* - copy
|
||||
* - changing collation
|
||||
* - changing comment
|
||||
* - adding tables
|
||||
* - viewing PDF schemas
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\CheckUserPrivileges;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Display\CreateTable;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Operations;
|
||||
use PhpMyAdmin\Plugins;
|
||||
use PhpMyAdmin\Plugins\Export\ExportSql;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\RelationCleanup;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $cfg, $db, $server, $url_query;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
$checkUserPrivileges = new CheckUserPrivileges($dbi);
|
||||
$checkUserPrivileges->getPrivileges();
|
||||
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('database/operations.js');
|
||||
|
||||
$sql_query = '';
|
||||
|
||||
/** @var Relation $relation */
|
||||
$relation = $containerBuilder->get('relation');
|
||||
$operations = new Operations($dbi, $relation);
|
||||
$relationCleanup = new RelationCleanup($dbi, $relation);
|
||||
|
||||
/**
|
||||
* Rename/move or copy database
|
||||
*/
|
||||
if (strlen($db) > 0
|
||||
&& (! empty($_POST['db_rename']) || ! empty($_POST['db_copy']))
|
||||
) {
|
||||
if (! empty($_POST['db_rename'])) {
|
||||
$move = true;
|
||||
} else {
|
||||
$move = false;
|
||||
}
|
||||
|
||||
if (! isset($_POST['newname']) || strlen($_POST['newname']) === 0) {
|
||||
$message = Message::error(__('The database name is empty!'));
|
||||
} else {
|
||||
// lower_case_table_names=1 `DB` becomes `db`
|
||||
if ($dbi->getLowerCaseNames() === '1') {
|
||||
$_POST['newname'] = mb_strtolower(
|
||||
$_POST['newname']
|
||||
);
|
||||
}
|
||||
|
||||
if ($_POST['newname'] === $_REQUEST['db']) {
|
||||
$message = Message::error(
|
||||
__('Cannot copy database to the same name. Change the name and try again.')
|
||||
);
|
||||
} else {
|
||||
$_error = false;
|
||||
if ($move || ! empty($_POST['create_database_before_copying'])) {
|
||||
$operations->createDbBeforeCopy();
|
||||
}
|
||||
|
||||
// here I don't use DELIMITER because it's not part of the
|
||||
// language; I have to send each statement one by one
|
||||
|
||||
// to avoid selecting alternatively the current and new db
|
||||
// we would need to modify the CREATE definitions to qualify
|
||||
// the db name
|
||||
$operations->runProcedureAndFunctionDefinitions($db);
|
||||
|
||||
// go back to current db, just in case
|
||||
$dbi->selectDb($db);
|
||||
|
||||
$tables_full = $dbi->getTablesFull($db);
|
||||
|
||||
// remove all foreign key constraints, otherwise we can get errors
|
||||
/** @var ExportSql $export_sql_plugin */
|
||||
$export_sql_plugin = Plugins::getPlugin(
|
||||
"export",
|
||||
"sql",
|
||||
'libraries/classes/Plugins/Export/',
|
||||
[
|
||||
'single_table' => isset($single_table),
|
||||
'export_type' => 'database',
|
||||
]
|
||||
);
|
||||
|
||||
// create stand-in tables for views
|
||||
$views = $operations->getViewsAndCreateSqlViewStandIn(
|
||||
$tables_full,
|
||||
$export_sql_plugin,
|
||||
$db
|
||||
);
|
||||
|
||||
// copy tables
|
||||
$sqlConstratints = $operations->copyTables(
|
||||
$tables_full,
|
||||
$move,
|
||||
$db
|
||||
);
|
||||
|
||||
// handle the views
|
||||
if (! $_error) {
|
||||
$operations->handleTheViews($views, $move, $db);
|
||||
}
|
||||
unset($views);
|
||||
|
||||
// now that all tables exist, create all the accumulated constraints
|
||||
if (! $_error && count($sqlConstratints) > 0) {
|
||||
$operations->createAllAccumulatedConstraints($sqlConstratints);
|
||||
}
|
||||
unset($sqlConstratints);
|
||||
|
||||
if ($dbi->getVersion() >= 50100) {
|
||||
// here DELIMITER is not used because it's not part of the
|
||||
// language; each statement is sent one by one
|
||||
|
||||
$operations->runEventDefinitionsForDb($db);
|
||||
}
|
||||
|
||||
// go back to current db, just in case
|
||||
$dbi->selectDb($db);
|
||||
|
||||
// Duplicate the bookmarks for this db (done once for each db)
|
||||
$operations->duplicateBookmarks($_error, $db);
|
||||
|
||||
if (! $_error && $move) {
|
||||
if (isset($_POST['adjust_privileges'])
|
||||
&& ! empty($_POST['adjust_privileges'])
|
||||
) {
|
||||
$operations->adjustPrivilegesMoveDb($db, $_POST['newname']);
|
||||
}
|
||||
|
||||
/**
|
||||
* cleanup pmadb stuff for this db
|
||||
*/
|
||||
$relationCleanup->database($db);
|
||||
|
||||
// if someday the RENAME DATABASE reappears, do not DROP
|
||||
$local_query = 'DROP DATABASE '
|
||||
. Util::backquote($db) . ';';
|
||||
$sql_query .= "\n" . $local_query;
|
||||
$dbi->query($local_query);
|
||||
|
||||
$message = Message::success(
|
||||
__('Database %1$s has been renamed to %2$s.')
|
||||
);
|
||||
$message->addParam($db);
|
||||
$message->addParam($_POST['newname']);
|
||||
} elseif (! $_error) {
|
||||
if (isset($_POST['adjust_privileges'])
|
||||
&& ! empty($_POST['adjust_privileges'])
|
||||
) {
|
||||
$operations->adjustPrivilegesCopyDb($db, $_POST['newname']);
|
||||
}
|
||||
|
||||
$message = Message::success(
|
||||
__('Database %1$s has been copied to %2$s.')
|
||||
);
|
||||
$message->addParam($db);
|
||||
$message->addParam($_POST['newname']);
|
||||
} else {
|
||||
$message = Message::error();
|
||||
}
|
||||
$reload = true;
|
||||
|
||||
/* Change database to be used */
|
||||
if (! $_error && $move) {
|
||||
$db = $_POST['newname'];
|
||||
} elseif (! $_error) {
|
||||
if (isset($_POST['switch_to_new'])
|
||||
&& $_POST['switch_to_new'] == 'true'
|
||||
) {
|
||||
$_SESSION['pma_switch_to_new'] = true;
|
||||
$db = $_POST['newname'];
|
||||
} else {
|
||||
$_SESSION['pma_switch_to_new'] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Database has been successfully renamed/moved. If in an Ajax request,
|
||||
* generate the output with {@link PhpMyAdmin\Response} and exit
|
||||
*/
|
||||
if ($response->isAjax()) {
|
||||
$response->setRequestStatus($message->isSuccess());
|
||||
$response->addJSON('message', $message);
|
||||
$response->addJSON('newname', $_POST['newname']);
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
Util::getMessage(null, $sql_query)
|
||||
);
|
||||
$response->addJSON('db', $db);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Settings for relations stuff
|
||||
*/
|
||||
$cfgRelation = $relation->getRelationsParam();
|
||||
|
||||
/**
|
||||
* Check if comments were updated
|
||||
* (must be done before displaying the menu tabs)
|
||||
*/
|
||||
if (isset($_POST['comment'])) {
|
||||
$relation->setDbComment($db, $_POST['comment']);
|
||||
}
|
||||
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_operations.php';
|
||||
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, $sub_part === null ? '' : $sub_part);
|
||||
|
||||
echo "\n";
|
||||
|
||||
if (isset($message)) {
|
||||
echo Util::getMessage($message, $sql_query);
|
||||
unset($message);
|
||||
}
|
||||
|
||||
$db_collation = $dbi->getDbCollation($db);
|
||||
$is_information_schema = $dbi->isSystemSchema($db);
|
||||
|
||||
if (! $is_information_schema) {
|
||||
if ($cfgRelation['commwork']) {
|
||||
/**
|
||||
* database comment
|
||||
*/
|
||||
$response->addHTML($operations->getHtmlForDatabaseComment($db));
|
||||
}
|
||||
|
||||
$response->addHTML('<div>');
|
||||
$response->addHTML(CreateTable::getHtml($db));
|
||||
$response->addHTML('</div>');
|
||||
|
||||
/**
|
||||
* rename database
|
||||
*/
|
||||
if ($db != 'mysql') {
|
||||
$response->addHTML($operations->getHtmlForRenameDatabase($db, $db_collation));
|
||||
}
|
||||
|
||||
// Drop link if allowed
|
||||
// Don't even try to drop information_schema.
|
||||
// You won't be able to. Believe me. You won't.
|
||||
// Don't allow to easily drop mysql database, RFE #1327514.
|
||||
if (($dbi->isSuperuser() || $cfg['AllowUserDropDatabase'])
|
||||
&& ! $db_is_system_schema
|
||||
&& $db != 'mysql'
|
||||
) {
|
||||
$response->addHTML($operations->getHtmlForDropDatabaseLink($db));
|
||||
}
|
||||
/**
|
||||
* Copy database
|
||||
*/
|
||||
$response->addHTML($operations->getHtmlForCopyDatabase($db, $db_collation));
|
||||
|
||||
/**
|
||||
* Change database charset
|
||||
*/
|
||||
$response->addHTML($operations->getHtmlForChangeDatabaseCharset($db, $db_collation));
|
||||
|
||||
if (! $cfgRelation['allworks']
|
||||
&& $cfg['PmaNoRelation_DisableWarning'] == false
|
||||
) {
|
||||
$message = Message::notice(
|
||||
__(
|
||||
'The phpMyAdmin configuration storage has been deactivated. ' .
|
||||
'%sFind out why%s.'
|
||||
)
|
||||
);
|
||||
$message->addParamHtml('<a href="./chk_rel.php" data-post="' . $url_query . '">');
|
||||
$message->addParamHtml('</a>');
|
||||
/* Show error if user has configured something, notice elsewhere */
|
||||
if (! empty($cfg['Servers'][$server]['pmadb'])) {
|
||||
$message->isError(true);
|
||||
}
|
||||
} // end if
|
||||
} // end if (!$is_information_schema)
|
192
html-java-script/myAWSsite/html/phpMyAdmin/db_qbe.php
Normal file
192
html-java-script/myAWSsite/html/phpMyAdmin/db_qbe.php
Normal file
@ -0,0 +1,192 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* query by example the whole database
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Database\Qbe;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\SavedSearches;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $db, $pmaThemeImage, $url_query;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var Relation $relation */
|
||||
$relation = $containerBuilder->get('relation');
|
||||
/** @var Template $template */
|
||||
$template = $containerBuilder->get('template');
|
||||
|
||||
// Gets the relation settings
|
||||
$cfgRelation = $relation->getRelationsParam();
|
||||
|
||||
$savedSearchList = [];
|
||||
$savedSearch = null;
|
||||
$currentSearchId = null;
|
||||
if ($cfgRelation['savedsearcheswork']) {
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('database/qbe.js');
|
||||
|
||||
//Get saved search list.
|
||||
$savedSearch = new SavedSearches($GLOBALS, $relation);
|
||||
$savedSearch->setUsername($GLOBALS['cfg']['Server']['user'])
|
||||
->setDbname($db);
|
||||
|
||||
if (! empty($_POST['searchId'])) {
|
||||
$savedSearch->setId($_POST['searchId']);
|
||||
}
|
||||
|
||||
//Action field is sent.
|
||||
if (isset($_POST['action'])) {
|
||||
$savedSearch->setSearchName($_POST['searchName']);
|
||||
if ('create' === $_POST['action']) {
|
||||
$saveResult = $savedSearch->setId(null)
|
||||
->setCriterias($_POST)
|
||||
->save();
|
||||
} elseif ('update' === $_POST['action']) {
|
||||
$saveResult = $savedSearch->setCriterias($_POST)
|
||||
->save();
|
||||
} elseif ('delete' === $_POST['action']) {
|
||||
$deleteResult = $savedSearch->delete();
|
||||
//After deletion, reset search.
|
||||
$savedSearch = new SavedSearches($GLOBALS, $relation);
|
||||
$savedSearch->setUsername($GLOBALS['cfg']['Server']['user'])
|
||||
->setDbname($db);
|
||||
$_POST = [];
|
||||
} elseif ('load' === $_POST['action']) {
|
||||
if (empty($_POST['searchId'])) {
|
||||
//when not loading a search, reset the object.
|
||||
$savedSearch = new SavedSearches($GLOBALS, $relation);
|
||||
$savedSearch->setUsername($GLOBALS['cfg']['Server']['user'])
|
||||
->setDbname($db);
|
||||
$_POST = [];
|
||||
} else {
|
||||
$loadResult = $savedSearch->load();
|
||||
}
|
||||
}
|
||||
//Else, it's an "update query"
|
||||
}
|
||||
|
||||
$savedSearchList = $savedSearch->getList();
|
||||
$currentSearchId = $savedSearch->getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* A query has been submitted -> (maybe) execute it
|
||||
*/
|
||||
$message_to_display = false;
|
||||
if (isset($_POST['submit_sql']) && ! empty($sql_query)) {
|
||||
if (0 !== stripos($sql_query, "SELECT")) {
|
||||
$message_to_display = true;
|
||||
} else {
|
||||
$goto = 'db_sql.php';
|
||||
$sql = new Sql();
|
||||
$sql->executeQueryAndSendQueryResponse(
|
||||
null, // analyzed_sql_results
|
||||
false, // is_gotofile
|
||||
$_POST['db'], // db
|
||||
null, // table
|
||||
false, // find_real_end
|
||||
null, // sql_query_for_bookmark
|
||||
null, // extra_data
|
||||
null, // message_to_show
|
||||
null, // message
|
||||
null, // sql_data
|
||||
$goto, // goto
|
||||
$pmaThemeImage, // pmaThemeImage
|
||||
null, // disp_query
|
||||
null, // disp_message
|
||||
null, // query_type
|
||||
$sql_query, // sql_query
|
||||
null, // selectedTables
|
||||
null // complete_query
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$sub_part = '_qbe';
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_qbe.php';
|
||||
$url_params['goto'] = 'db_qbe.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, $sub_part === null ? '' : $sub_part);
|
||||
|
||||
if ($message_to_display) {
|
||||
Message::error(
|
||||
__('You have to choose at least one column to display!')
|
||||
)
|
||||
->display();
|
||||
}
|
||||
unset($message_to_display);
|
||||
|
||||
// create new qbe search instance
|
||||
$db_qbe = new Qbe($relation, $template, $dbi, $db, $savedSearchList, $savedSearch);
|
||||
|
||||
$secondaryTabs = [
|
||||
'multi' => [
|
||||
'link' => 'db_multi_table_query.php',
|
||||
'text' => __('Multi-table query'),
|
||||
],
|
||||
'qbe' => [
|
||||
'link' => 'db_qbe.php',
|
||||
'text' => __('Query by example'),
|
||||
],
|
||||
];
|
||||
$response->addHTML(
|
||||
$template->render('secondary_tabs', [
|
||||
'url_params' => $url_params,
|
||||
'sub_tabs' => $secondaryTabs,
|
||||
])
|
||||
);
|
||||
|
||||
$url = 'db_designer.php' . Url::getCommon(
|
||||
array_merge(
|
||||
$url_params,
|
||||
['query' => 1]
|
||||
)
|
||||
);
|
||||
$response->addHTML(
|
||||
Message::notice(
|
||||
sprintf(
|
||||
__('Switch to %svisual builder%s'),
|
||||
'<a href="' . $url . '">',
|
||||
'</a>'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Displays the Query by example form
|
||||
*/
|
||||
$response->addHTML($db_qbe->getSelectionForm());
|
87
html-java-script/myAWSsite/html/phpMyAdmin/db_routines.php
Normal file
87
html-java-script/myAWSsite/html/phpMyAdmin/db_routines.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Routines management.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\CheckUserPrivileges;
|
||||
use PhpMyAdmin\Controllers\Database\RoutinesController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var string $db */
|
||||
$db = $containerBuilder->getParameter('db');
|
||||
|
||||
/** @var string $table */
|
||||
$table = $containerBuilder->getParameter('table');
|
||||
|
||||
/** @var CheckUserPrivileges $checkUserPrivileges */
|
||||
$checkUserPrivileges = $containerBuilder->get('check_user_privileges');
|
||||
$checkUserPrivileges->getPrivileges();
|
||||
|
||||
$_PMA_RTE = 'RTN';
|
||||
|
||||
/** @var RoutinesController $controller */
|
||||
$controller = $containerBuilder->get(RoutinesController::class);
|
||||
|
||||
if (! $response->isAjax()) {
|
||||
/**
|
||||
* Displays the header and tabs
|
||||
*/
|
||||
if (! empty($table) && in_array($table, $dbi->getTables($db))) {
|
||||
include_once ROOT_PATH . 'libraries/tbl_common.inc.php';
|
||||
} else {
|
||||
$table = '';
|
||||
include_once ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Since we did not include some libraries, we need
|
||||
* to manually select the required database and
|
||||
* create the missing $url_query variable
|
||||
*/
|
||||
if (strlen($db) > 0) {
|
||||
$dbi->selectDb($db);
|
||||
if (! isset($url_query)) {
|
||||
$url_query = Url::getCommon(
|
||||
[
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$controller->index([
|
||||
'type' => $_REQUEST['type'] ?? null,
|
||||
]);
|
85
html-java-script/myAWSsite/html/phpMyAdmin/db_search.php
Normal file
85
html-java-script/myAWSsite/html/phpMyAdmin/db_search.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* searches the entire database
|
||||
*
|
||||
* @todo make use of UNION when searching multiple tables
|
||||
* @todo display executed query, optional?
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Database\Search;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $db, $url_query;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var Template $template */
|
||||
$template = $containerBuilder->get('template');
|
||||
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('database/search.js');
|
||||
$scripts->addFile('vendor/stickyfill.min.js');
|
||||
$scripts->addFile('sql.js');
|
||||
$scripts->addFile('makegrid.js');
|
||||
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
// If config variable $GLOBALS['cfg']['UseDbSearch'] is on false : exit.
|
||||
if (! $GLOBALS['cfg']['UseDbSearch']) {
|
||||
Util::mysqlDie(
|
||||
__('Access denied!'),
|
||||
'',
|
||||
false,
|
||||
$err_url
|
||||
);
|
||||
} // end if
|
||||
$url_query .= '&goto=db_search.php';
|
||||
$url_params['goto'] = 'db_search.php';
|
||||
|
||||
// Create a database search instance
|
||||
$db_search = new Search($dbi, $db, $template);
|
||||
|
||||
// Display top links if we are not in an Ajax request
|
||||
if (! $response->isAjax()) {
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
|
||||
// Main search form has been submitted, get results
|
||||
if (isset($_POST['submit_search'])) {
|
||||
$response->addHTML($db_search->getSearchResults());
|
||||
}
|
||||
|
||||
// If we are in an Ajax request, we need to exit after displaying all the HTML
|
||||
if ($response->isAjax() && empty($_REQUEST['ajax_page_request'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Display the search form
|
||||
$response->addHTML($db_search->getMainHtml());
|
49
html-java-script/myAWSsite/html/phpMyAdmin/db_sql.php
Normal file
49
html-java-script/myAWSsite/html/phpMyAdmin/db_sql.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database SQL executor
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\Database\SqlController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\SqlQueryForm;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $containerBuilder;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var SqlController $controller */
|
||||
$controller = $containerBuilder->get(SqlController::class);
|
||||
|
||||
/** @var SqlQueryForm $sqlQueryForm */
|
||||
$sqlQueryForm = $containerBuilder->get('sql_query_form');
|
||||
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('makegrid.js');
|
||||
$scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
|
||||
$scripts->addFile('vendor/stickyfill.min.js');
|
||||
$scripts->addFile('sql.js');
|
||||
|
||||
$response->addHTML(
|
||||
$controller->index(
|
||||
[
|
||||
'delimiter' => $_POST['delimiter'] ?? null,
|
||||
],
|
||||
$sqlQueryForm
|
||||
)
|
||||
);
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Table/Column autocomplete in SQL editors
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
if ($GLOBALS['cfg']['EnableAutocompleteForTablesAndColumns']) {
|
||||
$db = isset($_POST['db']) ? $_POST['db'] : $GLOBALS['db'];
|
||||
$sql_autocomplete = [];
|
||||
if ($db) {
|
||||
$tableNames = $dbi->getTables($db);
|
||||
foreach ($tableNames as $tableName) {
|
||||
$sql_autocomplete[$tableName] = $dbi->getColumns(
|
||||
$db,
|
||||
$tableName
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sql_autocomplete = true;
|
||||
}
|
||||
|
||||
$response->addJSON("tables", json_encode($sql_autocomplete));
|
27
html-java-script/myAWSsite/html/phpMyAdmin/db_sql_format.php
Normal file
27
html-java-script/myAWSsite/html/phpMyAdmin/db_sql_format.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Format SQL for SQL editors
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loading common files. Used to check for authorization, localization and to
|
||||
* load the parsing library.
|
||||
*/
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
$query = ! empty($_POST['sql']) ? $_POST['sql'] : '';
|
||||
|
||||
$query = PhpMyAdmin\SqlParser\Utils\Formatter::format($query);
|
||||
|
||||
$response = Response::getInstance();
|
||||
$response->addJSON("sql", $query);
|
62
html-java-script/myAWSsite/html/phpMyAdmin/db_structure.php
Normal file
62
html-java-script/myAWSsite/html/phpMyAdmin/db_structure.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database structure manipulation
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\Database\StructureController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
require_once ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
/** @var StructureController $controller */
|
||||
$controller = $containerBuilder->get(StructureController::class);
|
||||
|
||||
if ($response->isAjax() && ! empty($_REQUEST['favorite_table'])) {
|
||||
$json = $controller->addRemoveFavoriteTablesAction([
|
||||
'favorite_table' => $_REQUEST['favorite_table'],
|
||||
'favoriteTables' => $_REQUEST['favoriteTables'] ?? null,
|
||||
'sync_favorite_tables' => $_REQUEST['sync_favorite_tables'] ?? null,
|
||||
'add_favorite' => $_REQUEST['add_favorite'] ?? null,
|
||||
'remove_favorite' => $_REQUEST['remove_favorite'] ?? null,
|
||||
]);
|
||||
if ($json !== null) {
|
||||
$response->addJSON($json);
|
||||
}
|
||||
} elseif ($response->isAjax()
|
||||
&& isset($_REQUEST['real_row_count'])
|
||||
&& (bool) $_REQUEST['real_row_count'] === true
|
||||
) {
|
||||
$response->addJSON($controller->handleRealRowCountRequestAction([
|
||||
'real_row_count_all' => $_REQUEST['real_row_count_all'] ?? null,
|
||||
'table' => $_REQUEST['table'] ?? null,
|
||||
]));
|
||||
} else {
|
||||
$response->getHeader()->getScripts()->addFiles([
|
||||
'database/structure.js',
|
||||
'table/change.js',
|
||||
]);
|
||||
|
||||
$response->addHTML($controller->index([
|
||||
'submit_mult' => $_POST['submit_mult'] ?? null,
|
||||
'selected_tbl' => $_POST['selected_tbl'] ?? null,
|
||||
'mult_btn' => $_POST['mult_btn'] ?? null,
|
||||
'sort' => $_REQUEST['sort'] ?? null,
|
||||
'sort_order' => $_REQUEST['sort_order'] ?? null,
|
||||
]));
|
||||
}
|
129
html-java-script/myAWSsite/html/phpMyAdmin/db_tracking.php
Normal file
129
html-java-script/myAWSsite/html/phpMyAdmin/db_tracking.php
Normal file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Tracking configuration for database
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Display\CreateTable;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Tracker;
|
||||
use PhpMyAdmin\Tracking;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
global $db, $pmaThemeImage, $text_dir, $url_query;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
//Get some js files needed for Ajax requests
|
||||
$response = Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
|
||||
$scripts->addFile('database/tracking.js');
|
||||
|
||||
/** @var Tracking $tracking */
|
||||
$tracking = $containerBuilder->get('tracking');
|
||||
|
||||
/**
|
||||
* If we are not in an Ajax request, then do the common work and show the links etc.
|
||||
*/
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=tbl_tracking.php&back=db_tracking.php';
|
||||
$url_params['goto'] = 'tbl_tracking.php';
|
||||
$url_params['back'] = 'db_tracking.php';
|
||||
|
||||
// Get the database structure
|
||||
$sub_part = '_structure';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, $sub_part === null ? '' : $sub_part);
|
||||
|
||||
if (isset($_POST['delete_tracking']) && isset($_POST['table'])) {
|
||||
Tracker::deleteTracking($db, $_POST['table']);
|
||||
Message::success(
|
||||
__('Tracking data deleted successfully.')
|
||||
)->display();
|
||||
} elseif (isset($_POST['submit_create_version'])) {
|
||||
$tracking->createTrackingForMultipleTables($_POST['selected']);
|
||||
Message::success(
|
||||
sprintf(
|
||||
__(
|
||||
'Version %1$s was created for selected tables,'
|
||||
. ' tracking is active for them.'
|
||||
),
|
||||
htmlspecialchars($_POST['version'])
|
||||
)
|
||||
)->display();
|
||||
} elseif (isset($_POST['submit_mult'])) {
|
||||
if (! empty($_POST['selected_tbl'])) {
|
||||
if ($_POST['submit_mult'] == 'delete_tracking') {
|
||||
foreach ($_POST['selected_tbl'] as $table) {
|
||||
Tracker::deleteTracking($db, $table);
|
||||
}
|
||||
Message::success(
|
||||
__('Tracking data deleted successfully.')
|
||||
)->display();
|
||||
} elseif ($_POST['submit_mult'] == 'track') {
|
||||
echo $tracking->getHtmlForDataDefinitionAndManipulationStatements(
|
||||
'db_tracking.php' . $url_query,
|
||||
0,
|
||||
$db,
|
||||
$_POST['selected_tbl']
|
||||
);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
Message::notice(
|
||||
__('No tables selected.')
|
||||
)->display();
|
||||
}
|
||||
}
|
||||
|
||||
// Get tracked data about the database
|
||||
$data = Tracker::getTrackedData($db, '', '1');
|
||||
|
||||
// No tables present and no log exist
|
||||
if ($num_tables == 0 && count($data['ddlog']) === 0) {
|
||||
echo '<p>' , __('No tables found in database.') , '</p>' , "\n";
|
||||
|
||||
if (empty($db_is_system_schema)) {
|
||||
echo CreateTable::getHtml($db);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
echo $tracking->getHtmlForDbTrackingTables(
|
||||
$db,
|
||||
$url_query,
|
||||
$pmaThemeImage,
|
||||
$text_dir
|
||||
);
|
||||
|
||||
// If available print out database log
|
||||
if (count($data['ddlog']) > 0) {
|
||||
$log = '';
|
||||
foreach ($data['ddlog'] as $entry) {
|
||||
$log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n"
|
||||
. $entry['statement'] . "\n";
|
||||
}
|
||||
echo Util::getMessage(__('Database Log'), $log);
|
||||
}
|
80
html-java-script/myAWSsite/html/phpMyAdmin/db_triggers.php
Normal file
80
html-java-script/myAWSsite/html/phpMyAdmin/db_triggers.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Triggers management.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpMyAdmin\Controllers\Database\TriggersController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
|
||||
/** @var DatabaseInterface $dbi */
|
||||
$dbi = $containerBuilder->get(DatabaseInterface::class);
|
||||
|
||||
$_PMA_RTE = 'TRI';
|
||||
|
||||
/** @var TriggersController $controller */
|
||||
$controller = $containerBuilder->get(TriggersController::class);
|
||||
|
||||
/** @var string $db */
|
||||
$db = $containerBuilder->getParameter('db');
|
||||
|
||||
/** @var string $table */
|
||||
$table = $containerBuilder->getParameter('table');
|
||||
|
||||
if (! $response->isAjax()) {
|
||||
/**
|
||||
* Displays the header and tabs
|
||||
*/
|
||||
if (! empty($table) && in_array($table, $dbi->getTables($db))) {
|
||||
include_once ROOT_PATH . 'libraries/tbl_common.inc.php';
|
||||
} else {
|
||||
$table = '';
|
||||
include_once ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Since we did not include some libraries, we need
|
||||
* to manually select the required database and
|
||||
* create the missing $url_query variable
|
||||
*/
|
||||
if (strlen($db) > 0) {
|
||||
$dbi->selectDb($db);
|
||||
if (! isset($url_query)) {
|
||||
$url_query = Url::getCommon(
|
||||
[
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$controller->index();
|
@ -0,0 +1,77 @@
|
||||
.. _bookmarks:
|
||||
|
||||
Bookmarks
|
||||
=========
|
||||
|
||||
.. note::
|
||||
|
||||
You need to have configured the :ref:`linked-tables` for using bookmarks
|
||||
feature.
|
||||
|
||||
Storing bookmarks
|
||||
-----------------
|
||||
|
||||
Any query that is executed can be marked as a bookmark on the page
|
||||
where the results are displayed. You will find a button labeled
|
||||
:guilabel:`Bookmark this query` just at the end of the page. As soon as you have
|
||||
stored a bookmark, that query is linked to the database.
|
||||
You can now access a bookmark dropdown on each page where the query box appears on for that database.
|
||||
|
||||
Variables inside bookmarks
|
||||
--------------------------
|
||||
|
||||
Inside a query, you can also add placeholders for variables.
|
||||
This is done by inserting into the query SQL comments between ``/*`` and
|
||||
``*/``. The special string ``[VARIABLE{variable-number}]`` is used inside the comments.
|
||||
Be aware that the whole query minus the SQL comments must be
|
||||
valid by itself, otherwise you won't be able to store it as a bookmark.
|
||||
Also, note that the text 'VARIABLE' is case-sensitive.
|
||||
|
||||
When you execute the bookmark, everything typed into the *Variables*
|
||||
input boxes on the query box page will replace the strings ``/*[VARIABLE{variable-number}]*/`` in
|
||||
your stored query.
|
||||
|
||||
Also remember, that everything else inside the ``/*[VARIABLE{variable-number}]*/`` string for
|
||||
your query will remain the way it is, but will be stripped of the ``/**/``
|
||||
chars. So you can use:
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
/*, [VARIABLE1] AS myname */
|
||||
|
||||
which will be expanded to
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
, VARIABLE1 as myname
|
||||
|
||||
in your query, where VARIABLE1 is the string you entered in the Variable 1 input box.
|
||||
|
||||
A more complex example, say you have stored this query:
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
SELECT Name, Address FROM addresses WHERE 1 /* AND Name LIKE '%[VARIABLE1]%' */
|
||||
|
||||
If you wish to enter "phpMyAdmin" as the variable for the stored query, the full
|
||||
query will be:
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
SELECT Name, Address FROM addresses WHERE 1 AND Name LIKE '%phpMyAdmin%'
|
||||
|
||||
**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.
|
||||
|
||||
Browsing a table using a bookmark
|
||||
---------------------------------
|
||||
|
||||
When a bookmark has the same name as the table, it will be used as the query when browsing
|
||||
this table.
|
||||
|
||||
.. seealso::
|
||||
|
||||
:ref:`faqbookmark`,
|
||||
:ref:`faq6_22`
|
@ -0,0 +1,143 @@
|
||||
.. _charts:
|
||||
|
||||
Charts
|
||||
======
|
||||
|
||||
.. versionadded:: 3.4.0
|
||||
|
||||
Since phpMyAdmin version 3.4.0, you can easily generate charts from a SQL query
|
||||
by clicking the "Display chart" link in the "Query results operations" area.
|
||||
|
||||
.. image:: images/query_result_operations.png
|
||||
|
||||
A window layer "Display chart" is shown in which you can customize the chart with the following options.
|
||||
|
||||
- Chart type: Allows you to choose the type of chart. Supported types are bar charts, column charts, line charts, spline charts, area charts, pie charts and timeline charts (only the chart types applicable for current series selection are offered).
|
||||
- X-axis: Allows to choose the field for the main axis.
|
||||
- Series: Allows to choose series for the chart. You can choose multiple series.
|
||||
- Title: Allows specifying a title for the chart which is displayed above the chart.
|
||||
- X-axis and Y-axis labels: Allows specifying labels for axes.
|
||||
- Start row and a number of rows: Allows generating charts only for a specified number of rows of the results set.
|
||||
|
||||
.. image:: images/chart.png
|
||||
|
||||
Chart implementation
|
||||
--------------------
|
||||
|
||||
Charts in phpMyAdmin are drawn using `jqPlot <http://www.jqplot.com/>`_ jQuery library.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Pie chart
|
||||
+++++++++
|
||||
|
||||
Query results for a simple pie chart can be generated with:
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
SELECT 'Food' AS 'expense',
|
||||
1250 AS 'amount' UNION
|
||||
SELECT 'Accommodation', 500 UNION
|
||||
SELECT 'Travel', 720 UNION
|
||||
SELECT 'Misc', 220
|
||||
|
||||
And the result of this query is:
|
||||
|
||||
+---------------+--------+
|
||||
| expense | amount |
|
||||
+===============+========+
|
||||
| Food | 1250 |
|
||||
+---------------+--------+
|
||||
| Accommodation | 500 |
|
||||
+---------------+--------+
|
||||
| Travel | 720 |
|
||||
+---------------+--------+
|
||||
| Misc | 220 |
|
||||
+---------------+--------+
|
||||
|
||||
Choosing expense as the X-axis and amount in series:
|
||||
|
||||
.. image:: images/pie_chart.png
|
||||
|
||||
Bar and column chart
|
||||
++++++++++++++++++++
|
||||
|
||||
Both bar charts and column chats support stacking. Upon selecting one of these types a checkbox is displayed to select stacking.
|
||||
|
||||
Query results for a simple bar or column chart can be generated with:
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
SELECT
|
||||
'ACADEMY DINOSAUR' AS 'title',
|
||||
0.99 AS 'rental_rate',
|
||||
20.99 AS 'replacement_cost' UNION
|
||||
SELECT 'ACE GOLDFINGER', 4.99, 12.99 UNION
|
||||
SELECT 'ADAPTATION HOLES', 2.99, 18.99 UNION
|
||||
SELECT 'AFFAIR PREJUDICE', 2.99, 26.99 UNION
|
||||
SELECT 'AFRICAN EGG', 2.99, 22.99
|
||||
|
||||
And the result of this query is:
|
||||
|
||||
+------------------+--------------+-------------------+
|
||||
| title | rental_rate | replacement_cost |
|
||||
+==================+==============+===================+
|
||||
| ACADEMY DINOSAUR | 0.99 | 20.99 |
|
||||
+------------------+--------------+-------------------+
|
||||
| ACE GOLDFINGER | 4.99 | 12.99 |
|
||||
+------------------+--------------+-------------------+
|
||||
| ADAPTATION HOLES | 2.99 | 18.99 |
|
||||
+------------------+--------------+-------------------+
|
||||
| AFFAIR PREJUDICE | 2.99 | 26.99 |
|
||||
+------------------+--------------+-------------------+
|
||||
| AFRICAN EGG | 2.99 | 22.99 |
|
||||
+------------------+--------------+-------------------+
|
||||
|
||||
Choosing title as the X-axis and rental_rate and replacement_cost as series:
|
||||
|
||||
.. image:: images/column_chart.png
|
||||
|
||||
Scatter chart
|
||||
+++++++++++++
|
||||
|
||||
Scatter charts are useful in identifying the movement of one or more variable(s) compared to another variable.
|
||||
|
||||
Using the same data set from bar and column charts section and choosing replacement_cost as the X-axis and rental_rate in series:
|
||||
|
||||
.. image:: images/scatter_chart.png
|
||||
|
||||
Line, spline and timeline charts
|
||||
++++++++++++++++++++++++++++++++
|
||||
|
||||
These charts can be used to illustrate trends in underlying data. Spline charts draw smooth lines while timeline charts draw X-axis taking the distances between the dates/time into consideration.
|
||||
|
||||
Query results for a simple line, spline or timeline chart can be generated with:
|
||||
|
||||
.. code-block:: mysql
|
||||
|
||||
SELECT
|
||||
DATE('2006-01-08') AS 'date',
|
||||
2056 AS 'revenue',
|
||||
1378 AS 'cost' UNION
|
||||
SELECT DATE('2006-01-09'), 1898, 2301 UNION
|
||||
SELECT DATE('2006-01-15'), 1560, 600 UNION
|
||||
SELECT DATE('2006-01-17'), 3457, 1565
|
||||
|
||||
And the result of this query is:
|
||||
|
||||
+------------+---------+------+
|
||||
| date | revenue | cost |
|
||||
+============+=========+======+
|
||||
| 2016-01-08 | 2056 | 1378 |
|
||||
+------------+---------+------+
|
||||
| 2006-01-09 | 1898 | 2301 |
|
||||
+------------+---------+------+
|
||||
| 2006-01-15 | 1560 | 600 |
|
||||
+------------+---------+------+
|
||||
| 2006-01-17 | 3457 | 1565 |
|
||||
+------------+---------+------+
|
||||
|
||||
.. image:: images/line_chart.png
|
||||
.. image:: images/spline_chart.png
|
||||
.. image:: images/timeline_chart.png
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,42 @@
|
||||
.. _copyright:
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
Copyright (C) 1998-2000 Tobias Ratschiller <tobias_at_ratschiller.com>
|
||||
Copyright (C) 2001-2018 Marc Delisle <marc_at_infomarc.info>
|
||||
Olivier Müller <om_at_omnis.ch>
|
||||
Robin Johnson <robbat2_at_users.sourceforge.net>
|
||||
Alexander M. Turek <me_at_derrabus.de>
|
||||
Michal Čihař <michal_at_cihar.com>
|
||||
Garvin Hicking <me_at_supergarv.de>
|
||||
Michael Keck <mkkeck_at_users.sourceforge.net>
|
||||
Sebastian Mendel <cybot_tm_at_users.sourceforge.net>
|
||||
[check credits for more details]
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2, as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Third party licenses
|
||||
++++++++++++++++++++
|
||||
|
||||
phpMyAdmin includes several third-party libraries which come under their
|
||||
respective licenses.
|
||||
|
||||
jQuery's license, which is where we got the files under js/vendor/jquery/ is
|
||||
(MIT|GPL), a copy of each license is available in this repository (GPL
|
||||
is available as LICENSE, MIT as js/vendor/jquery/MIT-LICENSE.txt).
|
||||
|
||||
The download kit additionally includes several composer libraries. See their
|
||||
licensing information in the vendor/ directory.
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
||||
.. _developers:
|
||||
|
||||
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.
|
||||
|
||||
You can check out all the possibilities to contribute in the
|
||||
`contribute section on our website
|
||||
<https://www.phpmyadmin.net/contribute/>`_.
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,422 @@
|
||||
.. _glossary:
|
||||
|
||||
Glossary
|
||||
========
|
||||
|
||||
From Wikipedia, the free encyclopedia
|
||||
|
||||
.. glossary::
|
||||
|
||||
.htaccess
|
||||
the default name of Apache's directory-level configuration file.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/.htaccess>
|
||||
|
||||
ACL
|
||||
Access Control List
|
||||
|
||||
Blowfish
|
||||
a keyed, symmetric block cipher, designed in 1993 by Bruce Schneier.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Blowfish_(cipher)>
|
||||
|
||||
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.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Web_browser>
|
||||
|
||||
bzip2
|
||||
a free software/open-source data compression algorithm and program developed by Julian Seward.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Bzip2>
|
||||
|
||||
CGI
|
||||
Common Gateway Interface is an important World Wide Web technology that
|
||||
enables a client web browser to request data from a program executed on
|
||||
the Web server.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Common_Gateway_Interface>
|
||||
|
||||
Changelog
|
||||
a log or record of changes made to a project.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Changelog>
|
||||
|
||||
Client
|
||||
a computer system that accesses a (remote) service on another computer by some kind of network.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Client_(computing)>
|
||||
|
||||
column
|
||||
a set of data values of a particularly simple type, one for each row of the table.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Column_(database)>
|
||||
|
||||
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.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/HTTP_cookie>
|
||||
|
||||
CSV
|
||||
Comma-separated values
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Comma-separated_values>
|
||||
|
||||
DB
|
||||
look at :term:`database`
|
||||
|
||||
database
|
||||
an organized collection of data.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Database>
|
||||
|
||||
Engine
|
||||
look at :term:`Storage Engines`
|
||||
|
||||
extension
|
||||
a PHP module that extends PHP with additional functionality.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Software_extension>
|
||||
|
||||
FAQ
|
||||
Frequently Asked Questions is a list of commonly asked question and there
|
||||
answers.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/FAQ>
|
||||
|
||||
Field
|
||||
one part of divided data/columns.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Field_(computer_science)>
|
||||
|
||||
foreign key
|
||||
a column or group of columns in a database row that points to a key column
|
||||
or group of columns forming a key of another database row in some
|
||||
(usually different) table.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Foreign_key>
|
||||
|
||||
GD
|
||||
Graphics Library by Thomas Boutell and others for dynamically manipulating images.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/GD_Graphics_Library>
|
||||
|
||||
GD2
|
||||
look at :term:`GD`
|
||||
|
||||
GZip
|
||||
gzip is short for GNU zip, a GNU free software file compression program.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Gzip>
|
||||
|
||||
host
|
||||
any machine connected to a computer network, a node that has a hostname.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Host>
|
||||
|
||||
hostname
|
||||
the unique name by which a network-attached device is known on a network.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Hostname>
|
||||
|
||||
HTTP
|
||||
HyperText Transfer Protocol is the primary method used to transfer or
|
||||
convey information on the World Wide Web.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/HyperText_Transfer_Protocol>
|
||||
|
||||
https
|
||||
a :term:`HTTP`-connection with additional security measures.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Https:_URI_scheme>
|
||||
|
||||
IEC
|
||||
International Electrotechnical Commission
|
||||
|
||||
IIS
|
||||
Internet Information Services is a set of Internet-based services for
|
||||
servers using Microsoft Windows.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Internet_Information_Services>
|
||||
|
||||
Index
|
||||
a feature that allows quick access to the rows in a table.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Index_(database)>
|
||||
|
||||
IP
|
||||
Internet Protocol is a data-oriented protocol used by source and
|
||||
destination hosts for communicating data across a packet-switched
|
||||
internetwork.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Internet_Protocol>
|
||||
|
||||
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.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/IP_Address>
|
||||
|
||||
IPv6
|
||||
IPv6 (Internet Protocol version 6) is the latest revision of the
|
||||
Internet Protocol (:term:`IP`), designed to deal with the
|
||||
long-anticipated problem of its predecessor IPv4 running out of addresses.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/IPv6>
|
||||
|
||||
ISAPI
|
||||
Internet Server Application Programming Interface is the API of Internet Information Services (IIS).
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/ISAPI>
|
||||
|
||||
ISP
|
||||
An Internet service provider is a business or organization that offers users
|
||||
access to the Internet and related services.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/ISP>
|
||||
|
||||
ISO
|
||||
International Standards Organization
|
||||
|
||||
JPEG
|
||||
a most commonly used standard method of lossy compression for photographic images.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/JPEG>
|
||||
|
||||
JPG
|
||||
look at :term:`JPEG`
|
||||
|
||||
Key
|
||||
look at :term:`Index`
|
||||
|
||||
LATEX
|
||||
a document preparation system for the TEX typesetting program.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/LaTeX>
|
||||
|
||||
Mac
|
||||
Apple Macintosh is a line of personal computers is designed, developed, manufactured, and marketed by Apple Computer.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Mac>
|
||||
|
||||
Mac OS X
|
||||
the operating system which is included with all currently shipping Apple Macintosh computers in the consumer and professional markets.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Mac_OS_X>
|
||||
|
||||
mbstring
|
||||
The PHP `mbstring` functions provide support for languages represented by multi-byte character sets, most notably UTF-8.
|
||||
|
||||
If you have troubles installing this extension, please follow :ref:`faqmysql`, it provides useful hints.
|
||||
|
||||
.. seealso:: <https://www.php.net/manual/en/book.mbstring.php>
|
||||
|
||||
Media type
|
||||
A media type (formerly known as MIME type) is a two-part identifier
|
||||
for file formats and format contents transmitted on the Internet.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Media_type>
|
||||
|
||||
MIME
|
||||
Multipurpose Internet Mail Extensions is
|
||||
an Internet Standard for the format of e-mail.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/MIME>
|
||||
|
||||
module
|
||||
some sort of extension for the Apache Webserver.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Apache_HTTP_Server>
|
||||
|
||||
mod_proxy_fcgi
|
||||
an Apache module implementing a Fast CGI interface; PHP can be run as a CGI module, FastCGI, or
|
||||
directly as an Apache module.
|
||||
|
||||
MySQL
|
||||
a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS).
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/MySQL>
|
||||
|
||||
mysqli
|
||||
the improved MySQL client PHP extension.
|
||||
|
||||
.. seealso:: <https://www.php.net/manual/en/book.mysqli.php>
|
||||
|
||||
mysql
|
||||
the MySQL client PHP extension.
|
||||
|
||||
.. seealso:: <https://www.php.net/manual/en/book.mysql.php>
|
||||
|
||||
OpenDocument
|
||||
an open standard for office documents.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/OpenDocument>
|
||||
|
||||
OS X
|
||||
look at :term:`Mac OS X`.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/OS_X>
|
||||
|
||||
PDF
|
||||
Portable Document Format is a file format developed by Adobe Systems for
|
||||
representing two-dimensional documents in a device-independent and
|
||||
resolution-independent format.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Portable_Document_Format>
|
||||
|
||||
PEAR
|
||||
the PHP Extension and Application Repository.
|
||||
|
||||
.. seealso:: <https://pear.php.net/>
|
||||
|
||||
PCRE
|
||||
Perl Compatible Regular Expressions is the perl-compatible regular
|
||||
expression functions for PHP
|
||||
|
||||
.. seealso:: <https://www.php.net/pcre>
|
||||
|
||||
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.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/PHP>
|
||||
|
||||
port
|
||||
a connection through which data is sent and received.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Port_(computing)>
|
||||
|
||||
primary key
|
||||
A primary key is an index over one or more fields in a table with
|
||||
unique values for every single row in this table. Every table should have
|
||||
a primary key for easier accessing/identifying data in this table. There
|
||||
can only be one primary key per table and it is named always **PRIMARY**.
|
||||
In fact, a primary key is just an :term:`unique key` with the name
|
||||
**PRIMARY**. If no primary key is defined MySQL will use first *unique
|
||||
key* as primary key if there is one.
|
||||
|
||||
You can create the primary key when creating the table (in phpMyAdmin
|
||||
just check the primary key radio buttons for each field you wish to be
|
||||
part of the primary key).
|
||||
|
||||
You can also add a primary key to an existing table with `ALTER` `TABLE`
|
||||
or `CREATE` `INDEX` (in phpMyAdmin you can just click on 'add index' on
|
||||
the table structure page below the listed fields).
|
||||
|
||||
RFC
|
||||
Request for Comments (RFC) documents are a series of memoranda
|
||||
encompassing new research, innovations, and methodologies applicable to
|
||||
Internet technologies.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Request_for_Comments>
|
||||
|
||||
RFC 1952
|
||||
GZIP file format specification version 4.3
|
||||
|
||||
.. seealso:: :rfc:`1952`
|
||||
|
||||
Row (record, tuple)
|
||||
represents a single, implicitly structured data item in a table.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Row_(database)>
|
||||
|
||||
Server
|
||||
a computer system that provides services to other computing systems over a network.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Server_(computing)>
|
||||
|
||||
Storage Engines
|
||||
MySQL can use several different formats for storing data on disk, these
|
||||
are called storage engines or table types. phpMyAdmin allows a user to
|
||||
change their storage engine for a particular table through the operations
|
||||
tab.
|
||||
|
||||
Common table types are InnoDB and MyISAM, though many others exist and
|
||||
may be desirable in some situations.
|
||||
|
||||
.. seealso:: <https://dev.mysql.com/doc/refman/5.7/en/storage-engines.html>
|
||||
|
||||
socket
|
||||
a form of inter-process communication.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Unix_domain_socket>
|
||||
|
||||
SSL
|
||||
Secure Sockets Layer is a cryptographic protocol which provides secure
|
||||
communication on the Internet.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Secure_Sockets_Layer>
|
||||
|
||||
Stored procedure
|
||||
a subroutine available to applications accessing a relational database system
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Stored_procedure>
|
||||
|
||||
SQL
|
||||
Structured Query Language
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/SQL>
|
||||
|
||||
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.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Table_(database)>
|
||||
|
||||
tar
|
||||
a type of archive file format: the Tape ARchive format.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Tar_(file_format)>
|
||||
|
||||
TCP
|
||||
Transmission Control Protocol is one of the core protocols of the
|
||||
Internet protocol suite.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/TCP>
|
||||
|
||||
TCPDF
|
||||
PHP library to generate PDF files.
|
||||
|
||||
.. seealso:: <https://tcpdf.org/>
|
||||
|
||||
trigger
|
||||
a procedural code that is automatically executed in response to certain events on a particular table or view in a database
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Database_trigger>
|
||||
|
||||
unique key
|
||||
A unique key is an index over one or more fields in a table which has a
|
||||
unique value for each row. The first unique key will be treated as
|
||||
:term:`primary key` if there is no *primary key* defined.
|
||||
|
||||
URL
|
||||
Uniform Resource Locator is 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.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/URL>
|
||||
|
||||
Webserver
|
||||
A computer (program) that is responsible for accepting HTTP requests from clients and serving them Web pages.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Webserver>
|
||||
|
||||
XML
|
||||
Extensible Markup Language is a W3C-recommended general-purpose markup
|
||||
language for creating special-purpose markup languages, capable of
|
||||
describing many different kinds of data.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/XML>
|
||||
|
||||
ZIP
|
||||
a popular data compression and archival format.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/ZIP_(file_format)>
|
||||
|
||||
Zlib
|
||||
an open-source, cross-platform data compression library by Jean-loup Gailly and Mark Adler.
|
||||
|
||||
.. seealso:: <https://en.wikipedia.org/wiki/Zlib>
|
@ -0,0 +1,350 @@
|
||||
Import and export
|
||||
=================
|
||||
|
||||
Import
|
||||
++++++
|
||||
|
||||
To import data, go to the "Import" tab in phpMyAdmin. To import data into a
|
||||
specific database or table, open the database or table before going to the
|
||||
"Import" tab.
|
||||
|
||||
In addition to the standard Import and Export tab, you can also import an SQL
|
||||
file directly by dragging and dropping it from your local file manager to the
|
||||
phpMyAdmin interface in your web browser.
|
||||
|
||||
If you are having troubles importing big files, please consult :ref:`faq1_16`.
|
||||
|
||||
You can import using following methods:
|
||||
|
||||
Form based upload
|
||||
|
||||
Can be used with any supported format, also (b|g)zipped files, e.g., mydump.sql.gz .
|
||||
|
||||
Form based SQL Query
|
||||
|
||||
Can be used with valid SQL dumps.
|
||||
|
||||
Using upload directory
|
||||
|
||||
You can specify an upload directory on your web server where phpMyAdmin is installed, after uploading your file into this directory you can select this file in the import dialog of phpMyAdmin, see :config:option:`$cfg['UploadDir']`.
|
||||
|
||||
phpMyAdmin can import from several various commonly used formats.
|
||||
|
||||
CSV
|
||||
---
|
||||
|
||||
Comma separated values format which is often used by spreadsheets or various other programs for export/import.
|
||||
|
||||
.. note::
|
||||
|
||||
When importing data into a table from a CSV file where the table has an
|
||||
'auto_increment' field, make the 'auto_increment' value for each record in
|
||||
the CSV field to be '0' (zero). This allows the 'auto_increment' field to
|
||||
populate correctly.
|
||||
|
||||
It is now possible to import a CSV file at the server or database level.
|
||||
Instead of having to create a table to import the CSV file into, a best-fit
|
||||
structure will be determined for you and the data imported into it, instead.
|
||||
All other features, requirements, and limitations are as before.
|
||||
|
||||
CSV using LOAD DATA
|
||||
-------------------
|
||||
|
||||
Similar to CSV, only using the internal MySQL parser and not the phpMyAdmin one.
|
||||
|
||||
ESRI Shape File
|
||||
---------------
|
||||
|
||||
The ESRI shapefile or simply a shapefile is a popular geospatial vector data
|
||||
format for geographic information systems software. It is developed and
|
||||
regulated by Esri as a (mostly) open specification for data interoperability
|
||||
among Esri and other software products.
|
||||
|
||||
MediaWiki
|
||||
---------
|
||||
|
||||
MediaWiki files, which can be exported by phpMyAdmin (version 4.0 or later),
|
||||
can now also be imported. This is the format used by Wikipedia to display
|
||||
tables.
|
||||
|
||||
Open Document Spreadsheet (ODS)
|
||||
-------------------------------
|
||||
|
||||
OpenDocument workbooks containing one or more spreadsheets can now be directly imported.
|
||||
|
||||
When importing an ODS spreadsheet, the spreadsheet must be named in a specific way in order to make the
|
||||
import as simple as possible.
|
||||
|
||||
Table name
|
||||
~~~~~~~~~~
|
||||
|
||||
During import, phpMyAdmin uses the sheet name as the table name; you should rename the
|
||||
sheet in your spreadsheet program in order to match your existing table name (or the table you wish to create,
|
||||
though this is less of a concern since you could quickly rename the new table from the Operations tab).
|
||||
|
||||
Column names
|
||||
~~~~~~~~~~~~
|
||||
|
||||
You should also make the first row of your spreadsheet a header with the names of the columns (this can be
|
||||
accomplished by inserting a new row at the top of your spreadsheet). When on the Import screen, select the
|
||||
checkbox for "The first line of the file contains the table column names;" this way your newly imported
|
||||
data will go to the proper columns.
|
||||
|
||||
.. note::
|
||||
|
||||
Formulas and calculations will NOT be evaluated, rather, their value from
|
||||
the most recent save will be loaded. Please ensure that all values in the
|
||||
spreadsheet are as needed before importing it.
|
||||
|
||||
SQL
|
||||
---
|
||||
|
||||
SQL can be used to make any manipulation on data, it is also useful for restoring backed up data.
|
||||
|
||||
XML
|
||||
---
|
||||
|
||||
XML files exported by phpMyAdmin (version 3.3.0 or later) can now be imported.
|
||||
Structures (databases, tables, views, triggers, etc.) and/or data will be
|
||||
created depending on the contents of the file.
|
||||
|
||||
The supported xml schemas are not yet documented in this wiki.
|
||||
|
||||
Export
|
||||
++++++
|
||||
|
||||
phpMyAdmin can export into text files (even compressed) on your local disk (or
|
||||
a special the webserver :config:option:`$cfg['SaveDir']` folder) in various
|
||||
commonly used formats:
|
||||
|
||||
CodeGen
|
||||
-------
|
||||
|
||||
`NHibernate <https://en.wikipedia.org/wiki/NHibernate>`_ file format. Planned
|
||||
versions: Java, Hibernate, PHP PDO, JSON, etc. So the preliminary name is
|
||||
codegen.
|
||||
|
||||
CSV
|
||||
---
|
||||
|
||||
Comma separated values format which is often used by spreadsheets or various
|
||||
other programs for export/import.
|
||||
|
||||
CSV for Microsoft Excel
|
||||
-----------------------
|
||||
|
||||
This is just preconfigured version of CSV export which can be imported into
|
||||
most English versions of Microsoft Excel. Some localised versions (like
|
||||
"Danish") are expecting ";" instead of "," as field separator.
|
||||
|
||||
Microsoft Word 2000
|
||||
-------------------
|
||||
|
||||
If you're using Microsoft Word 2000 or newer (or compatible such as
|
||||
OpenOffice.org), you can use this export.
|
||||
|
||||
JSON
|
||||
----
|
||||
|
||||
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It
|
||||
is easy for humans to read and write and it is easy for machines to parse and
|
||||
generate.
|
||||
|
||||
.. versionchanged:: 4.7.0
|
||||
|
||||
The generated JSON structure has been changed in phpMyAdmin 4.7.0 to
|
||||
produce valid JSON data.
|
||||
|
||||
The generated JSON is list of objects with following attributes:
|
||||
|
||||
.. js:data:: type
|
||||
|
||||
Type of given object, can be one of:
|
||||
|
||||
``header``
|
||||
Export header containing comment and phpMyAdmin version.
|
||||
``database``
|
||||
Start of a database marker, containing name of database.
|
||||
``table``
|
||||
Table data export.
|
||||
|
||||
.. js:data:: version
|
||||
|
||||
Used in ``header`` :js:data:`type` and indicates phpMyAdmin version.
|
||||
|
||||
.. js:data:: comment
|
||||
|
||||
Optional textual comment.
|
||||
|
||||
.. js:data:: name
|
||||
|
||||
Object name - either table or database based on :js:data:`type`.
|
||||
|
||||
.. js:data:: database
|
||||
|
||||
Database name for ``table`` :js:data:`type`.
|
||||
|
||||
.. js:data:: data
|
||||
|
||||
Table content for ``table`` :js:data:`type`.
|
||||
|
||||
Sample output:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
[
|
||||
{
|
||||
"comment": "Export to JSON plugin for PHPMyAdmin",
|
||||
"type": "header",
|
||||
"version": "4.7.0-dev"
|
||||
},
|
||||
{
|
||||
"name": "cars",
|
||||
"type": "database"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"car_id": "1",
|
||||
"description": "Green Chrysler 300",
|
||||
"make_id": "5",
|
||||
"mileage": "113688",
|
||||
"price": "13545.00",
|
||||
"transmission": "automatic",
|
||||
"yearmade": "2007"
|
||||
}
|
||||
],
|
||||
"database": "cars",
|
||||
"name": "cars",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"make": "Chrysler",
|
||||
"make_id": "5"
|
||||
}
|
||||
],
|
||||
"database": "cars",
|
||||
"name": "makes",
|
||||
"type": "table"
|
||||
}
|
||||
]
|
||||
|
||||
LaTeX
|
||||
-----
|
||||
|
||||
If you want to embed table data or structure in LaTeX, this is right choice for you.
|
||||
|
||||
LaTeX is a typesetting system that is very suitable for producing scientific
|
||||
and mathematical documents of high typographical quality. It is also suitable
|
||||
for producing all sorts of other documents, from simple letters to complete
|
||||
books. LaTeX uses TeX as its formatting engine. Learn more about TeX and
|
||||
LaTeX on `the Comprehensive TeX Archive Network <https://www.ctan.org/>`_
|
||||
also see the `short description od TeX <https://www.ctan.org/tex/>`_.
|
||||
|
||||
The output needs to be embedded into a LaTeX document before it can be
|
||||
rendered, for example in following document:
|
||||
|
||||
.. code-block:: latex
|
||||
|
||||
\documentclass{article}
|
||||
\title{phpMyAdmin SQL output}
|
||||
\author{}
|
||||
\usepackage{longtable,lscape}
|
||||
\date{}
|
||||
\setlength{\parindent}{0pt}
|
||||
\usepackage[left=2cm,top=2cm,right=2cm,nohead,nofoot]{geometry}
|
||||
\pdfpagewidth 210mm
|
||||
\pdfpageheight 297mm
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
% insert phpMyAdmin LaTeX Dump here
|
||||
|
||||
\end{document}
|
||||
|
||||
MediaWiki
|
||||
---------
|
||||
|
||||
Both tables and databases can be exported in the MediaWiki format, which is
|
||||
used by Wikipedia to display tables. It can export structure, data or both,
|
||||
including table names or headers.
|
||||
|
||||
OpenDocument Spreadsheet
|
||||
------------------------
|
||||
|
||||
Open standard for spreadsheet data, which is being widely adopted. Many recent
|
||||
spreadsheet programs, such as LibreOffice, OpenOffice, Microsoft Office or
|
||||
Google Docs can handle this format.
|
||||
|
||||
OpenDocument Text
|
||||
-----------------
|
||||
|
||||
New standard for text data which is being widely adopted. Most recent word
|
||||
processors (such as LibreOffice, OpenOffice, Microsoft Word, AbiWord or KWord)
|
||||
can handle this.
|
||||
|
||||
PDF
|
||||
---
|
||||
|
||||
For presentation purposes, non editable PDF might be best choice for you.
|
||||
|
||||
PHP Array
|
||||
---------
|
||||
|
||||
You can generate a php file which will declare a multidimensional array with
|
||||
the contents of the selected table or database.
|
||||
|
||||
SQL
|
||||
---
|
||||
|
||||
Export in SQL can be used to restore your database, thus it is useful for
|
||||
backing up.
|
||||
|
||||
The option 'Maximal length of created query' seems to be undocumented. But
|
||||
experiments has shown that it splits large extended INSERTS so each one is no
|
||||
bigger than the given number of bytes (or characters?). Thus when importing the
|
||||
file, for large tables you avoid the error "Got a packet bigger than
|
||||
'max_allowed_packet' bytes".
|
||||
|
||||
.. seealso::
|
||||
|
||||
https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html
|
||||
|
||||
Data Options
|
||||
~~~~~~~~~~~~
|
||||
|
||||
**Complete inserts** adds the column names to the SQL dump. This parameter
|
||||
improves the readability and reliability of the dump. Adding the column names
|
||||
increases the size of the dump, but when combined with Extended inserts it's
|
||||
negligible.
|
||||
|
||||
**Extended inserts** combines multiple rows of data into a single INSERT query.
|
||||
This will significantly decrease filesize for large SQL dumps, increases the
|
||||
INSERT speed when imported, and is generally recommended.
|
||||
|
||||
.. seealso::
|
||||
|
||||
http://www.scriptalicious.com/blog/2009/04/complete-inserts-or-extended-inserts-in-phpmyadmin/
|
||||
|
||||
Texy!
|
||||
-----
|
||||
|
||||
`Texy! <https://texy.info/>`_ markup format. You can see example on `Texy! demo
|
||||
<https://texy.info/en/try/4q5we>`_.
|
||||
|
||||
XML
|
||||
---
|
||||
|
||||
Easily parsable export for use with custom scripts.
|
||||
|
||||
.. versionchanged:: 3.3.0
|
||||
|
||||
The XML schema used has changed as of version 3.3.0
|
||||
|
||||
YAML
|
||||
----
|
||||
|
||||
YAML is a data serialization format which is both human readable and
|
||||
computationally powerful ( <https://yaml.org> ).
|
@ -0,0 +1,32 @@
|
||||
.. phpMyAdmin documentation master file, created by
|
||||
sphinx-quickstart on Wed Sep 26 14:04:48 2012.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to phpMyAdmin's documentation!
|
||||
======================================
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
intro
|
||||
require
|
||||
setup
|
||||
config
|
||||
user
|
||||
faq
|
||||
developers
|
||||
security
|
||||
vendors
|
||||
copyright
|
||||
credits
|
||||
glossary
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
||||
* :ref:`glossary`
|
@ -0,0 +1,79 @@
|
||||
.. _intro:
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
phpMyAdmin is a free software tool written in PHP that is intended to handle the
|
||||
administration of a MySQL or MariaDB database server. You can use phpMyAdmin to
|
||||
perform most administration tasks, including creating a database, running queries,
|
||||
and adding user accounts.
|
||||
|
||||
Supported features
|
||||
------------------
|
||||
|
||||
Currently phpMyAdmin can:
|
||||
|
||||
* create, browse, edit, and drop databases, tables, views, columns, and indexes
|
||||
* display multiple results sets through stored procedures or queries
|
||||
* create, copy, drop, rename and alter databases, tables, columns and
|
||||
indexes
|
||||
* maintenance server, databases and tables, with proposals on server
|
||||
configuration
|
||||
* execute, edit and bookmark any :term:`SQL`-statement, even batch-queries
|
||||
* load text files into tables
|
||||
* create [#f1]_ and read dumps of tables
|
||||
* export [#f1]_ data to various formats: :term:`CSV`, :term:`XML`, :term:`PDF`,
|
||||
:term:`ISO`/:term:`IEC` 26300 - :term:`OpenDocument` Text and Spreadsheet, Microsoft
|
||||
Word 2000, and LATEX formats
|
||||
* import data and :term:`MySQL` structures from :term:`OpenDocument` spreadsheets, as
|
||||
well as :term:`XML`, :term:`CSV`, and :term:`SQL` files
|
||||
* administer multiple servers
|
||||
* add, edit, and remove MySQL user accounts and privileges
|
||||
* check referential integrity in MyISAM tables
|
||||
* using Query-by-example (QBE), create complex queries automatically
|
||||
connecting required tables
|
||||
* create :term:`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
|
||||
* track changes on databases, tables and views
|
||||
* support InnoDB tables and foreign keys
|
||||
* support mysqli, the improved MySQL extension see :ref:`faq1_17`
|
||||
* create, edit, call, export and drop stored procedures and functions
|
||||
* create, edit, export and drop events and triggers
|
||||
* communicate in `80 different languages
|
||||
<https://www.phpmyadmin.net/translations/>`_
|
||||
|
||||
Shortcut keys
|
||||
-------------
|
||||
|
||||
Currently phpMyAdmin supports following shortcuts:
|
||||
|
||||
* k - Toggle console
|
||||
* h - Go to home page
|
||||
* s - Open settings
|
||||
* d + s - Go to database structure (Provided you are in database related page)
|
||||
* d + f - Search database (Provided you are in database related page)
|
||||
* t + s - Go to table structure (Provided you are in table related page)
|
||||
* t + f - Search table (Provided you are in table related page)
|
||||
* backspace - Takes you to older page.
|
||||
|
||||
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.
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
.. [#f1]
|
||||
|
||||
phpMyAdmin can compress (:term:`ZIP`, :term:`GZip` or :term:`RFC 1952`
|
||||
formats) dumps and :term:`CSV` exports if you use PHP with
|
||||
:term:`Zlib` support (``--with-zlib``).
|
||||
Proper support may also need changes in :file:`php.ini`.
|
@ -0,0 +1,32 @@
|
||||
Other sources of information
|
||||
============================
|
||||
|
||||
Printed Book
|
||||
------------
|
||||
|
||||
The definitive guide to using phpMyAdmin is the book Mastering phpMyAdmin for
|
||||
Effective MySQL Management by Marc Delisle. You can get information on that
|
||||
book and other officially endorsed `books at the phpMyAdmin site`_.
|
||||
|
||||
.. _books at the phpMyAdmin site: https://www.phpmyadmin.net/docs/
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
Third party tutorials and articles which you might find interesting:
|
||||
|
||||
Česky (Czech)
|
||||
+++++++++++++
|
||||
|
||||
- `Seriál o phpMyAdminovi <https://cihar.com/publications/linuxsoft/>`_
|
||||
|
||||
English
|
||||
+++++++
|
||||
|
||||
- `Having fun with phpMyAdmin's MIME-transformations & PDF-features <https://garv.in/tops/texte/mimetutorial>`_
|
||||
- `Learning SQL Using phpMyAdmin (old tutorial) <http://www.php-editors.com/articles/sql_phpmyadmin.php>`_
|
||||
|
||||
Русский (Russian)
|
||||
+++++++++++++++++
|
||||
|
||||
* `Russian server about phpMyAdmin <https://php-myadmin.ru/>`_
|
@ -0,0 +1,74 @@
|
||||
User management
|
||||
===============
|
||||
|
||||
User management is the process of controlling which users are allowed to
|
||||
connect to the MySQL server and what permissions they have on each database.
|
||||
phpMyAdmin does not handle user management, rather it passes the username and
|
||||
password on to MySQL, which then determines whether a user is permitted to
|
||||
perform a particular action. Within phpMyAdmin, administrators have full
|
||||
control over creating users, viewing and editing privileges for existing users,
|
||||
and removing users.
|
||||
|
||||
Within phpMyAdmin, user management is controlled via the :guilabel:`Users` link
|
||||
from the main page. Users can be created, edited, and removed.
|
||||
|
||||
Creating a new user
|
||||
-------------------
|
||||
|
||||
To create a new user, click the :guilabel:`Add a new user` link near the bottom
|
||||
of the :guilabel:`Users` page (you must be a "superuser", e.g., user "root").
|
||||
Use the textboxes and drop-downs to configure the user to your particular
|
||||
needs. You can then select whether to create a database for that user and grant
|
||||
specific global privileges. Once you've created the user (by clicking Go), you
|
||||
can define that user's permissions on a specific database (don't grant global
|
||||
privileges in that case). In general, users do not need any global privileges
|
||||
(other than USAGE), only permissions for their specific database.
|
||||
|
||||
Editing an existing user
|
||||
------------------------
|
||||
|
||||
To edit an existing user, simply click the pencil icon to the right of that
|
||||
user in the :guilabel:`Users` page. You can then edit their global- and
|
||||
database-specific privileges, change their password, or even copy those
|
||||
privileges to a new user.
|
||||
|
||||
Deleting a user
|
||||
---------------
|
||||
|
||||
From the :guilabel:`Users` page, check the checkbox for the user you wish to
|
||||
remove, select whether or not to also remove any databases of the same name (if
|
||||
they exist), and click Go.
|
||||
|
||||
Assigning privileges to user for a specific database
|
||||
----------------------------------------------------
|
||||
|
||||
Users are assigned to databases by editing the user record (from the
|
||||
:guilabel:`User accounts` link on the home page).
|
||||
If you are creating a user specifically for a given table
|
||||
you will have to create the user first (with no global privileges) and then go
|
||||
back and edit that user to add the table and privileges for the individual
|
||||
table.
|
||||
|
||||
.. _configurablemenus:
|
||||
|
||||
Configurable menus and user groups
|
||||
----------------------------------
|
||||
|
||||
By enabling :config:option:`$cfg['Servers'][$i]['usergroups']` and
|
||||
:config:option:`$cfg['Servers'][$i]['usergroups']` you can customize what users
|
||||
will see in the phpMyAdmin navigation.
|
||||
|
||||
.. warning::
|
||||
|
||||
This feature only limits what a user sees, he is still able to use all the
|
||||
functions. So this can not be considered as a security limitation. Should
|
||||
you want to limit what users can do, use MySQL privileges to achieve that.
|
||||
|
||||
With this feature enabled, the :guilabel:`User accounts` management interface gains
|
||||
a second tab for managing :guilabel:`User groups`, where you can define what each
|
||||
group will view (see image below) and you can then assign each user to one of
|
||||
these groups. Users will be presented with a simplified user interface, which might be
|
||||
useful for inexperienced users who could be overwhelmed by all the features
|
||||
phpMyAdmin provides.
|
||||
|
||||
.. image:: images/usergroups.png
|
@ -0,0 +1,84 @@
|
||||
.. _relations:
|
||||
|
||||
Relations
|
||||
=========
|
||||
|
||||
phpMyAdmin allows relationships (similar to foreign keys) using MySQL-native
|
||||
(InnoDB) methods when available and falling back on special phpMyAdmin-only
|
||||
features when needed. There are two ways of editing these relations, with the
|
||||
*relation view* and the drag-and-drop *designer* -- both of which are explained
|
||||
on this page.
|
||||
|
||||
.. note::
|
||||
|
||||
You need to have configured the :ref:`linked-tables` for using phpMyAdmin
|
||||
only relations.
|
||||
|
||||
Technical info
|
||||
--------------
|
||||
|
||||
Currently the only MySQL table type that natively supports relationships is
|
||||
InnoDB. When using an InnoDB table, phpMyAdmin will create real InnoDB
|
||||
relations which will be enforced by MySQL no matter which application accesses
|
||||
the database. In the case of any other table type, phpMyAdmin enforces the
|
||||
relations internally and those relations are not applied to any other
|
||||
application.
|
||||
|
||||
Relation view
|
||||
-------------
|
||||
|
||||
In order to get it working, you first have to properly create the
|
||||
[[pmadb|pmadb]]. Once that is setup, select a table's "Structure" page. Below
|
||||
the table definition, a link called "Relation view" is shown. If you click that
|
||||
link, a page will be shown that offers you to create a link to another table
|
||||
for any (most) fields. Only PRIMARY KEYS are shown there, so if the field you
|
||||
are referring to is not shown, you most likely are doing something wrong. The
|
||||
drop-down at the bottom is the field which will be used as the name for a
|
||||
record.
|
||||
|
||||
Relation view example
|
||||
+++++++++++++++++++++
|
||||
|
||||
.. image:: images/pma-relations-relation-view-link.png
|
||||
|
||||
.. image:: images/pma-relations-relation-link.png
|
||||
|
||||
Let's say you have categories and links and one category can contain several links. Your table structure would be something like this:
|
||||
|
||||
- `category.category_id` (must be unique)
|
||||
- `category.name`
|
||||
- `link.link_id`
|
||||
- `link.category_id`
|
||||
- `link.uri`.
|
||||
|
||||
Open the relation view (below the table structure) page for the `link` table and for `category_id` field, you select `category.category_id` as master record.
|
||||
|
||||
If you now browse the link table, the `category_id` field will be a clickable hyperlink to the proper category record. But all you see is just the `category_id`, not the name of the category.
|
||||
|
||||
.. image:: images/pma-relations-relation-name.png
|
||||
|
||||
To fix this, open the relation view of the `category` table and in the drop down at the bottom, select "name". If you now browse the link table again and hover the mouse over the `category_id` hyperlink, the value from the related category will be shown as tooltip.
|
||||
|
||||
.. image:: images/pma-relations-links.png
|
||||
|
||||
Designer
|
||||
--------
|
||||
|
||||
The Designer feature is a graphical way of creating, editing, and displaying
|
||||
phpMyAdmin relations. These relations are compatible with those created in
|
||||
phpMyAdmin's relation view.
|
||||
|
||||
To use this feature, you need a properly configured :ref:`linked-tables` and
|
||||
must have the :config:option:`$cfg['Servers'][$i]['table_coords']` configured.
|
||||
|
||||
To use the designer, select a database's structure page, then look for the
|
||||
:guilabel:`Designer` tab.
|
||||
|
||||
To export the view into PDF, you have to create PDF pages first. The Designer
|
||||
creates the layout, how the tables shall be displayed. To finally export the
|
||||
view, you have to create this with a PDF page and select your layout, which you
|
||||
have created with the designer.
|
||||
|
||||
.. seealso::
|
||||
|
||||
:ref:`faqpdf`
|
@ -0,0 +1,60 @@
|
||||
.. _require:
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
Web server
|
||||
----------
|
||||
|
||||
Since phpMyAdmin's interface is based entirely in your browser, you'll need a
|
||||
web server (such as Apache, nginx, :term:`IIS`) to install phpMyAdmin's files into.
|
||||
|
||||
PHP
|
||||
---
|
||||
|
||||
* You need PHP 7.1.3 or newer, with ``session`` support, the Standard PHP Library
|
||||
(SPL) extension, hash, ctype, and JSON support.
|
||||
|
||||
* The ``mbstring`` extension (see :term:`mbstring`) is strongly recommended
|
||||
for performance reasons.
|
||||
|
||||
* To support uploading of ZIP files, you need the PHP ``zip`` extension.
|
||||
|
||||
* You need GD2 support in PHP to display inline thumbnails of JPEGs
|
||||
("image/jpeg: inline") with their original aspect ratio.
|
||||
|
||||
* When using the cookie authentication (the default), the `openssl
|
||||
<https://www.php.net/openssl>`_ extension is strongly suggested.
|
||||
|
||||
* To support upload progress bars, see :ref:`faq2_9`.
|
||||
|
||||
* To support XML and Open Document Spreadsheet importing, you need the
|
||||
`libxml <https://www.php.net/libxml>`_ extension.
|
||||
|
||||
* To support reCAPTCHA on the login page, you need the
|
||||
`openssl <https://www.php.net/openssl>`_ extension.
|
||||
|
||||
* To support displaying phpMyAdmin's latest version, you need to enable
|
||||
``allow_url_open`` in your :file:`php.ini` or to have the
|
||||
`curl <https://www.php.net/curl>`_ extension.
|
||||
|
||||
.. seealso:: :ref:`faq1_31`, :ref:`authentication_modes`
|
||||
|
||||
Database
|
||||
--------
|
||||
|
||||
phpMyAdmin supports MySQL-compatible databases.
|
||||
|
||||
* MySQL 5.5 or newer
|
||||
* MariaDB 5.5 or newer
|
||||
|
||||
.. seealso:: :ref:`faq1_17`
|
||||
|
||||
Web browser
|
||||
-----------
|
||||
|
||||
To access phpMyAdmin you need a web browser with cookies and JavaScript
|
||||
enabled.
|
||||
|
||||
You need a browser which is supported by jQuery 2.0, see
|
||||
<https://jquery.com/browser-support/>.
|
@ -0,0 +1,113 @@
|
||||
Security policy
|
||||
===============
|
||||
|
||||
The phpMyAdmin developer team is putting lot of effort to make phpMyAdmin as
|
||||
secure as possible. But still web application like phpMyAdmin can be vulnerable
|
||||
to a number of attacks and new ways to exploit are still being explored.
|
||||
|
||||
For every reported vulnerability we issue a phpMyAdmin Security Announcement
|
||||
(PMASA) and it get's assigned a CVE ID as well. We might group similar
|
||||
vulnerabilities to one PMASA (eg. multiple XSS vulnerabilities can be announced
|
||||
under one PMASA).
|
||||
|
||||
If you think you've found a vulnerability, please see :ref:`reporting-security`.
|
||||
|
||||
Typical vulnerabilities
|
||||
-----------------------
|
||||
|
||||
In this section, we will describe typical vulnerabilities, which can appear in
|
||||
our code base. This list is by no means complete, it is intended to show
|
||||
typical attack surface.
|
||||
|
||||
Cross-site scripting (XSS)
|
||||
++++++++++++++++++++++++++
|
||||
|
||||
When phpMyAdmin shows a piece of user data, e.g. something inside a user's
|
||||
database, all html special chars have to be escaped. When this escaping is
|
||||
missing somewhere a malicious user might fill a database with specially crafted
|
||||
content to trick an other user of that database into executing something. This
|
||||
could for example be a piece of JavaScript code that would do any number of
|
||||
nasty things.
|
||||
|
||||
phpMyAdmin tries to escape all userdata before it is rendered into html for the
|
||||
browser.
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Cross-site scripting on Wikipedia <https://en.wikipedia.org/wiki/Cross-site_scripting>`_
|
||||
|
||||
Cross-site request forgery (CSRF)
|
||||
+++++++++++++++++++++++++++++++++
|
||||
|
||||
An attacker would trick a phpMyAdmin user into clicking on a link to provoke
|
||||
some action in phpMyAdmin. This link could either be sent via email or some
|
||||
random website. If successful this the attacker would be able to perform some
|
||||
action with the users privileges.
|
||||
|
||||
To mitigate this phpMyAdmin requires a token to be sent on sensitive requests.
|
||||
The idea is that an attacker does not poses the currently valid token to
|
||||
include in the presented link.
|
||||
|
||||
The token is regenerated for every login, so it's generally valid only for
|
||||
limited time, what makes it harder for attacker to obtain valid one.
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Cross-site request forgery on Wikipedia <https://en.wikipedia.org/wiki/Cross-site_request_forgery>`_
|
||||
|
||||
SQL injection
|
||||
+++++++++++++
|
||||
|
||||
As the whole purpose of phpMyAdmin is to preform sql queries, this is not our
|
||||
first concern. SQL injection is sensitive to us though when it concerns the
|
||||
mysql control connection. This controlconnection can have additional privileges
|
||||
which the logged in user does not poses. E.g. access the :ref:`linked-tables`.
|
||||
|
||||
User data that is included in (administrative) queries should always be run
|
||||
through DatabaseInterface::escapeString().
|
||||
|
||||
.. seealso::
|
||||
|
||||
`SQL injection on Wikipedia <https://en.wikipedia.org/wiki/SQL_injection>`_
|
||||
|
||||
Brute force attack
|
||||
++++++++++++++++++
|
||||
|
||||
phpMyAdmin on its own does not rate limit authentication attempts in any way.
|
||||
This is caused by need to work in stateless environment, where there is no way
|
||||
to protect against such kind of things.
|
||||
|
||||
To mitigate this, you can use Captcha or utilize external tools such as
|
||||
fail2ban, this is more details described in :ref:`securing`.
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Brute force attack on Wikipedia <https://en.wikipedia.org/wiki/Brute-force_attack>`_
|
||||
|
||||
.. _reporting-security:
|
||||
|
||||
Reporting security issues
|
||||
-------------------------
|
||||
|
||||
Should you find a security issue in the phpMyAdmin programming code, please
|
||||
contact the `phpMyAdmin security team <mailto:security@phpmyadmin.net>`_ in
|
||||
advance before publishing it. This way we can prepare a fix and release the fix together with your
|
||||
announcement. You will be also given credit in our security announcement.
|
||||
You can optionally encrypt your report with PGP key ID
|
||||
``DA68AB39218AB947`` with following fingerprint:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
pub 4096R/DA68AB39218AB947 2016-08-02
|
||||
Key fingerprint = 5BAD 38CF B980 50B9 4BD7 FB5B DA68 AB39 218A B947
|
||||
uid phpMyAdmin Security Team <security@phpmyadmin.net>
|
||||
sub 4096R/5E4176FB497A31F7 2016-08-02
|
||||
|
||||
The key can be either obtained from the keyserver or is available in
|
||||
`phpMyAdmin keyring <https://files.phpmyadmin.net/phpmyadmin.keyring>`_
|
||||
available on our download server or using `Keybase <https://keybase.io/phpmyadmin_sec>`_.
|
||||
|
||||
Should you have suggestion on improving phpMyAdmin to make it more secure, please
|
||||
report that to our `issue tracker <https://github.com/phpmyadmin/phpmyadmin/issues>`_.
|
||||
Existing improvement suggestions can be found by
|
||||
`hardening label <https://github.com/phpmyadmin/phpmyadmin/labels/hardening>`_.
|
@ -0,0 +1,21 @@
|
||||
Configuring phpMyAdmin
|
||||
----------------------
|
||||
|
||||
There are many configuration settings that can be used to customize the
|
||||
interface. Those settings are described in
|
||||
:ref:`config`. There are several layers of the configuration.
|
||||
|
||||
The global settings can be configured in :file:`config.inc.php` as described in
|
||||
:ref:`config`. This is only way to configure connections to databases and other
|
||||
system wide settings.
|
||||
|
||||
On top of this there are user settings which can be persistently stored in
|
||||
:ref:`linked-tables`, possibly automatically configured through
|
||||
:ref:`zeroconf`. If the :ref:`linked-tables` are not configured, the settings
|
||||
are temporarily stored in the session data; these are valid only until you
|
||||
logout.
|
||||
|
||||
You can also save the user configuration for further use, either download them
|
||||
as a file or to the browser local storage. You can find both those options in
|
||||
the :guilabel:`Settings` tab. The settings stored in browser local storage will
|
||||
be automatically offered for loading upon your login to phpMyAdmin.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user