Adjusts on update feature to keep theWebMind in the latest version
Esse commit está contido em:
+25
-25
@@ -1,26 +1,26 @@
|
||||
# Instalation
|
||||
|
||||
TheWebMind's core was developed in PHP. Then, it's needed to have a working PHP environment configured in your machine or server, wherever you prefer to configura Mind.
|
||||
First, download the project's content. Go to the download center to acquire the latest version, at: http://thewebmind.org/.
|
||||
|
||||
# Requirements
|
||||
|
||||
To run TheWebMind you need:
|
||||
|
||||
* PHP 5 or superior
|
||||
* HTTP Server (We recomend Apache)
|
||||
* A modern Browser*
|
||||
* Javascript on
|
||||
|
||||
# To Linux users: TheWebMind needs to create and modify files and directories into its folder.
|
||||
Be sure that the HTTP user (usualy www-data or apache) has access to read, write and execute, into it.
|
||||
|
||||
# After downloading theWebMind, unzip it into your server.
|
||||
It's enough to have it working, and you can access it just hitting its address.
|
||||
For example: http://localhost/thewebmind
|
||||
Any difficulties, visit our FAQ.
|
||||
|
||||
|
||||
http://thewebmind.org
|
||||
http://docs.thewebmind.org
|
||||
# Instalation
|
||||
|
||||
TheWebMind's core was developed in PHP. Then, it's needed to have a working PHP environment configured in your machine or server, wherever you prefer to configura Mind.
|
||||
First, download the project's content. Go to the download center to acquire the latest version, at: http://thewebmind.org/.
|
||||
|
||||
# Requirements
|
||||
|
||||
To run TheWebMind you need:
|
||||
|
||||
* PHP 5 or superior
|
||||
* HTTP Server (We recomend Apache)
|
||||
* A modern Browser*
|
||||
* Javascript on
|
||||
|
||||
# To Linux users: TheWebMind needs to create and modify files and directories into its folder.
|
||||
Be sure that the HTTP user (usualy www-data or apache) has access to read, write and execute, into it.
|
||||
|
||||
# After downloading theWebMind, unzip it into your server.
|
||||
It's enough to have it working, and you can access it just hitting its address.
|
||||
For example: http://localhost/thewebmind
|
||||
Any difficulties, visit our FAQ.
|
||||
|
||||
|
||||
http://thewebmind.org
|
||||
http://docs.thewebmind.org
|
||||
contact@thewebmind.org
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
The MIT License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010 TheWebMind.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
See INSTALL.txt file to help.
|
||||
|
||||
http://thewebmind.org
|
||||
http://docs.thewebmind.org
|
||||
See INSTALL.txt file to help.
|
||||
|
||||
http://thewebmind.org
|
||||
http://docs.thewebmind.org
|
||||
contact@thewebmind.org
|
||||
+58
-57
@@ -1,58 +1,59 @@
|
||||
<?php // starting configuration file
|
||||
header ('Content-type: text/html; charset=utf-8');
|
||||
|
||||
$_MIND= Array();
|
||||
$_MIND['appName'] = 'theWebMind(s) - 2.0';
|
||||
$_MIND['wmlCurrentVersion'] = '1.0';
|
||||
$_MIND['home_page'] = 'http://latest.thewebmind.org/home.php'; //'http://latest.thewebmind.org/home.php';
|
||||
//$_MIND['home_page'] = 'http://localhost/thewebmind.org/latest/home.php';;
|
||||
$_MIND['updateSource'] = 'http://latest.thewebmind.org/current.xml';
|
||||
$_MIND['wmlVersion'] = Array();
|
||||
$_MIND['wmlVersion']['1.0'] = '<?wml version="1.0"?>';
|
||||
$_MIND['cryptKey'] = 'theWebMind';
|
||||
$_MIND['header'] = 'components/header.php'; // the header to be loaded in each file
|
||||
$_MIND['components'] = 'components'; // the Mind components directory
|
||||
$_MIND['frameworkDir'] = 'framework'; // the framework directory
|
||||
$_MIND['framework'] = 'framework/mind-2.0.php'; // the framework to be loaded in each file
|
||||
$_MIND['sessionDir'] = 'default'; // aplies the default, or the specified directory to record sessions
|
||||
$_MIND['sessionLife'] = '0'; // the value in seconds, use "0" to end when the browser is closed
|
||||
$_MIND['userDir'] = 'users'; // directory to load user information
|
||||
$_MIND['userConfFile'] = 'conf'; // directory to load user information
|
||||
$_MIND['imageDir'] = 'images'; // directory to load images to Mind Interface
|
||||
$_MIND['scriptSrc'] = 'framework/scripts'; // directory to load scripts to Mind Interface
|
||||
$_MIND['styleSrc'] = 'framework/styles'; // directory to load CSS styles to Mind Interface
|
||||
$_MIND['themeSrc'] = 'framework/styles/themes'; // directory to load CSS styles to Mind Interface
|
||||
$_MIND['fwComponents'] = 'framework/components'; // components to be used by the mind framework
|
||||
$_MIND['dbmsDir'] = 'dbmss'; // directory to load DBMS configuration and libraries
|
||||
$_MIND['defaultDbms'] = 'postgres';
|
||||
$_MIND['default_timezone'] = 'America/Sao_Paulo';
|
||||
$_MIND['autoBackup'] = true; // generates a copy of the current version of the system, before replacing it
|
||||
$_MIND['pluginDir'] = 'plugins'; // directory to load plugins
|
||||
$_MIND['moduleDir'] = 'modules'; // directory to load modules
|
||||
$_MIND['defaultModule'] = 'php_mvc';
|
||||
$_MIND['languageDir'] = 'languages'; // directory to load modules
|
||||
$_MIND['defaultLanguage'] = 'en';
|
||||
$_MIND['licenses'] = '../licenses'; // the directory where you will find the licenses
|
||||
$_MIND['docs'] = 'docs'; // the directory where you will find the documentation and help content
|
||||
$_MIND['allowExport'] = true; // allows the user to export project information (when false, only admin can do it)
|
||||
$_MIND['rootDir'] = '';
|
||||
$_MIND['publishDir'] = 'projects';
|
||||
$_MIND['backupDir'] = '.MindBackUps';
|
||||
$_MIND['errorMessagesFile'] = 'messages/error.php';
|
||||
$_MIND['warningMessagesFile'] = 'messages/warning.php';
|
||||
$_MIND['tipMessagesFile'] = 'messages/tip.php';
|
||||
$_MIND['primaryKeyPrefix'] = 'pk_';
|
||||
$_MIND['foreignKeyPrefix'] = 'fk_';
|
||||
$_MIND['showDeveloperMenu'] = false; // shows the menu DEVELOPER, or not
|
||||
$_MIND['load'] = Array();
|
||||
$_MIND['load']['user'] = 'classes/user.php';
|
||||
$_MIND['load']['project'] = 'classes/project.php';
|
||||
$_MIND['load']['plugin'] = 'classes/plugin.php';
|
||||
$_MIND['load']['module'] = 'classes/module.php';
|
||||
//use $_MIND['load']['extraConfig'] = 'myConfigFile.php'; to load extra configuration of yours, to the system, it may be used by your own modules, or plugins that require so
|
||||
$_MIND['version'] = '2.0';
|
||||
$_MIND['year'] = '2009';
|
||||
$_MIND['month'] = '';
|
||||
$_MIND['mindSpecificInfoAt'] = 'http://thewebmind.org/2.0';
|
||||
$_MIND['developers'] = 'http://thewebmind.org/2.0/credits';
|
||||
<?php // starting configuration file
|
||||
header ('Content-type: text/html; charset=utf-8');
|
||||
|
||||
$_MIND= Array();
|
||||
$_MIND['appName'] = 'theWebMind(s) - 2.0';
|
||||
$_MIND['wmlCurrentVersion'] = '1.0';
|
||||
$_MIND['home_page'] = 'http://latest.thewebmind.org/home.php'; //'http://latest.thewebmind.org/home.php';
|
||||
//$_MIND['home_page'] = 'http://localhost/thewebmind.org/latest/home.php';;
|
||||
$_MIND['updateSource'] = 'http://latest.thewebmind.org/current.xml';
|
||||
//$_MIND['updateSource'] = 'http://localhost/thewebmind.org/latest/current.xml';
|
||||
$_MIND['wmlVersion'] = Array();
|
||||
$_MIND['wmlVersion']['1.0'] = '<?wml version="1.0"?>';
|
||||
$_MIND['cryptKey'] = 'theWebMind';
|
||||
$_MIND['header'] = 'components/header.php'; // the header to be loaded in each file
|
||||
$_MIND['components'] = 'components'; // the Mind components directory
|
||||
$_MIND['frameworkDir'] = 'framework'; // the framework directory
|
||||
$_MIND['framework'] = 'framework/mind-2.0.php'; // the framework to be loaded in each file
|
||||
$_MIND['sessionDir'] = 'default'; // aplies the default, or the specified directory to record sessions
|
||||
$_MIND['sessionLife'] = '0'; // the value in seconds, use "0" to end when the browser is closed
|
||||
$_MIND['userDir'] = 'users'; // directory to load user information
|
||||
$_MIND['userConfFile'] = 'conf'; // directory to load user information
|
||||
$_MIND['imageDir'] = 'images'; // directory to load images to Mind Interface
|
||||
$_MIND['scriptSrc'] = 'framework/scripts'; // directory to load scripts to Mind Interface
|
||||
$_MIND['styleSrc'] = 'framework/styles'; // directory to load CSS styles to Mind Interface
|
||||
$_MIND['themeSrc'] = 'framework/styles/themes'; // directory to load CSS styles to Mind Interface
|
||||
$_MIND['fwComponents'] = 'framework/components'; // components to be used by the mind framework
|
||||
$_MIND['dbmsDir'] = 'dbmss'; // directory to load DBMS configuration and libraries
|
||||
$_MIND['defaultDbms'] = 'postgres';
|
||||
$_MIND['default_timezone'] = 'America/Sao_Paulo';
|
||||
$_MIND['autoBackup'] = true; // generates a copy of the current version of the system, before replacing it
|
||||
$_MIND['pluginDir'] = 'plugins'; // directory to load plugins
|
||||
$_MIND['moduleDir'] = 'modules'; // directory to load modules
|
||||
$_MIND['defaultModule'] = 'php_mvc';
|
||||
$_MIND['languageDir'] = 'languages'; // directory to load modules
|
||||
$_MIND['defaultLanguage'] = 'en';
|
||||
$_MIND['licenses'] = '../licenses'; // the directory where you will find the licenses
|
||||
$_MIND['docs'] = 'docs'; // the directory where you will find the documentation and help content
|
||||
$_MIND['allowExport'] = true; // allows the user to export project information (when false, only admin can do it)
|
||||
$_MIND['rootDir'] = '';
|
||||
$_MIND['publishDir'] = 'projects';
|
||||
$_MIND['backupDir'] = '.MindBackUps';
|
||||
$_MIND['errorMessagesFile'] = 'messages/error.php';
|
||||
$_MIND['warningMessagesFile'] = 'messages/warning.php';
|
||||
$_MIND['tipMessagesFile'] = 'messages/tip.php';
|
||||
$_MIND['primaryKeyPrefix'] = 'pk_';
|
||||
$_MIND['foreignKeyPrefix'] = 'fk_';
|
||||
$_MIND['showDeveloperMenu'] = false; // shows the menu DEVELOPER, or not
|
||||
$_MIND['load'] = Array();
|
||||
$_MIND['load']['user'] = 'classes/user.php';
|
||||
$_MIND['load']['project'] = 'classes/project.php';
|
||||
$_MIND['load']['plugin'] = 'classes/plugin.php';
|
||||
$_MIND['load']['module'] = 'classes/module.php';
|
||||
//use $_MIND['load']['extraConfig'] = 'myConfigFile.php'; to load extra configuration of yours, to the system, it may be used by your own modules, or plugins that require so
|
||||
$_MIND['version'] = '2.0';
|
||||
$_MIND['year'] = '2009';
|
||||
$_MIND['month'] = '';
|
||||
$_MIND['mindSpecificInfoAt'] = 'http://thewebmind.org/2.0';
|
||||
$_MIND['developers'] = 'http://thewebmind.org/2.0/credits';
|
||||
// end of configuration file ?>
|
||||
+9999
-9999
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
$n= (integer)$_POST['lns'];
|
||||
$n+= 10;
|
||||
for($i=1; $i<=$n; $i++)
|
||||
{
|
||||
echo $i.'
|
||||
';
|
||||
}
|
||||
<?php
|
||||
$n= (integer)$_POST['lns'];
|
||||
$n+= 10;
|
||||
for($i=1; $i<=$n; $i++)
|
||||
{
|
||||
echo $i.'
|
||||
';
|
||||
}
|
||||
?>
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.AS3 = function()
|
||||
{
|
||||
// Created by Peter Atoria @ http://iAtoria.com
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Bash = function()
|
||||
{
|
||||
var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le';
|
||||
var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
|
||||
'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
|
||||
'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
|
||||
'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
|
||||
'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
|
||||
'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
|
||||
'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
|
||||
'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
|
||||
'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
|
||||
'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
|
||||
'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
|
||||
'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
|
||||
'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
|
||||
'vi watch wc whereis which who whoami Wget xargs yes'
|
||||
;
|
||||
|
||||
this.findMatches = function(regexList, code)
|
||||
{
|
||||
code = code.replace(/>/g, '>').replace(/</g, '<');
|
||||
this.code = code;
|
||||
return SyntaxHighlighter.Highlighter.prototype.findMatches.apply(this, [regexList, code]);
|
||||
};
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
|
||||
];
|
||||
}
|
||||
|
||||
SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Bash = function()
|
||||
{
|
||||
var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le';
|
||||
var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
|
||||
'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
|
||||
'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
|
||||
'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
|
||||
'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
|
||||
'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
|
||||
'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
|
||||
'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
|
||||
'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
|
||||
'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
|
||||
'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
|
||||
'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
|
||||
'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
|
||||
'vi watch wc whereis which who whoami Wget xargs yes'
|
||||
;
|
||||
|
||||
this.findMatches = function(regexList, code)
|
||||
{
|
||||
code = code.replace(/>/g, '>').replace(/</g, '<');
|
||||
this.code = code;
|
||||
return SyntaxHighlighter.Highlighter.prototype.findMatches.apply(this, [regexList, code]);
|
||||
};
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
|
||||
];
|
||||
}
|
||||
|
||||
SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell'];
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.CSharp = function()
|
||||
{
|
||||
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
|
||||
'continue decimal default delegate do double else enum event explicit ' +
|
||||
'extern false finally fixed float for foreach get goto if implicit in int ' +
|
||||
'interface internal is lock long namespace new null object operator out ' +
|
||||
'override params private protected public readonly ref return sbyte sealed set ' +
|
||||
'short sizeof stackalloc static string struct switch this throw true try ' +
|
||||
'typeof uint ulong unchecked unsafe ushort using virtual void while';
|
||||
|
||||
function fixComments(match, regexInfo)
|
||||
{
|
||||
var css = (match[0].indexOf("///") == 0)
|
||||
? 'color1'
|
||||
: 'comments'
|
||||
;
|
||||
|
||||
return [new SyntaxHighlighter.Match(match[0], match.index, css)];
|
||||
}
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
|
||||
{ regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
|
||||
{ regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.CSharp.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp'];
|
||||
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.CSharp = function()
|
||||
{
|
||||
var keywords = 'abstract as base bool break byte case catch char checked class const ' +
|
||||
'continue decimal default delegate do double else enum event explicit ' +
|
||||
'extern false finally fixed float for foreach get goto if implicit in int ' +
|
||||
'interface internal is lock long namespace new null object operator out ' +
|
||||
'override params private protected public readonly ref return sbyte sealed set ' +
|
||||
'short sizeof stackalloc static string struct switch this throw true try ' +
|
||||
'typeof uint ulong unchecked unsafe ushort using virtual void while';
|
||||
|
||||
function fixComments(match, regexInfo)
|
||||
{
|
||||
var css = (match[0].indexOf("///") == 0)
|
||||
? 'color1'
|
||||
: 'comments'
|
||||
;
|
||||
|
||||
return [new SyntaxHighlighter.Match(match[0], match.index, css)];
|
||||
}
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
|
||||
{ regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
|
||||
{ regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.CSharp.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp'];
|
||||
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.ColdFusion = function()
|
||||
{
|
||||
// Contributed by Jen
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Cpp = function()
|
||||
{
|
||||
// Copyright 2006 Shin, YoungJin
|
||||
|
||||
var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
|
||||
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
|
||||
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
|
||||
'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
|
||||
'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
|
||||
'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
|
||||
'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
|
||||
'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
|
||||
'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
|
||||
'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
|
||||
'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
|
||||
'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
|
||||
'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
|
||||
'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
|
||||
'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
|
||||
'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
|
||||
'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
|
||||
'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
|
||||
'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
|
||||
'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
|
||||
'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
|
||||
'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
|
||||
'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
|
||||
'va_list wchar_t wctrans_t wctype_t wint_t signed';
|
||||
|
||||
var keywords = 'break case catch class const __finally __exception __try ' +
|
||||
'const_cast continue private public protected __declspec ' +
|
||||
'default delete deprecated dllexport dllimport do dynamic_cast ' +
|
||||
'else enum explicit extern if for friend goto inline ' +
|
||||
'mutable naked namespace new noinline noreturn nothrow ' +
|
||||
'register reinterpret_cast return selectany ' +
|
||||
'sizeof static static_cast struct switch template this ' +
|
||||
'thread throw true false try typedef typeid typename union ' +
|
||||
'using uuid virtual void volatile whcar_t while';
|
||||
|
||||
var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
|
||||
'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
|
||||
'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
|
||||
'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
|
||||
'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
|
||||
'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
|
||||
'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
|
||||
'fwrite getc getchar gets perror printf putc putchar puts remove ' +
|
||||
'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
|
||||
'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
|
||||
'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
|
||||
'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
|
||||
'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
|
||||
'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
|
||||
'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
|
||||
'clock ctime difftime gmtime localtime mktime strftime time';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /^ *#.*/gm, css: 'preprocessor' },
|
||||
{ regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
|
||||
{ regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Cpp.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Cpp.aliases = ['cpp', 'c'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Cpp = function()
|
||||
{
|
||||
// Copyright 2006 Shin, YoungJin
|
||||
|
||||
var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
|
||||
'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
|
||||
'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
|
||||
'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
|
||||
'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
|
||||
'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
|
||||
'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
|
||||
'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
|
||||
'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
|
||||
'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
|
||||
'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
|
||||
'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
|
||||
'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
|
||||
'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
|
||||
'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
|
||||
'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
|
||||
'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
|
||||
'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
|
||||
'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
|
||||
'__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
|
||||
'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
|
||||
'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
|
||||
'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
|
||||
'va_list wchar_t wctrans_t wctype_t wint_t signed';
|
||||
|
||||
var keywords = 'break case catch class const __finally __exception __try ' +
|
||||
'const_cast continue private public protected __declspec ' +
|
||||
'default delete deprecated dllexport dllimport do dynamic_cast ' +
|
||||
'else enum explicit extern if for friend goto inline ' +
|
||||
'mutable naked namespace new noinline noreturn nothrow ' +
|
||||
'register reinterpret_cast return selectany ' +
|
||||
'sizeof static static_cast struct switch template this ' +
|
||||
'thread throw true false try typedef typeid typename union ' +
|
||||
'using uuid virtual void volatile whcar_t while';
|
||||
|
||||
var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
|
||||
'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
|
||||
'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
|
||||
'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
|
||||
'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
|
||||
'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
|
||||
'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
|
||||
'fwrite getc getchar gets perror printf putc putchar puts remove ' +
|
||||
'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
|
||||
'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
|
||||
'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
|
||||
'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
|
||||
'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
|
||||
'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
|
||||
'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
|
||||
'clock ctime difftime gmtime localtime mktime strftime time';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /^ *#.*/gm, css: 'preprocessor' },
|
||||
{ regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
|
||||
{ regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Cpp.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Cpp.aliases = ['cpp', 'c'];
|
||||
|
||||
@@ -1,93 +1,93 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.CSS = function()
|
||||
{
|
||||
function getKeywordsCSS(str)
|
||||
{
|
||||
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
|
||||
};
|
||||
|
||||
function getValuesCSS(str)
|
||||
{
|
||||
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
|
||||
};
|
||||
|
||||
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
|
||||
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
|
||||
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
|
||||
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
|
||||
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
|
||||
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
|
||||
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
|
||||
'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
|
||||
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
|
||||
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
|
||||
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
|
||||
'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
|
||||
'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
|
||||
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
|
||||
|
||||
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
|
||||
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
|
||||
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
|
||||
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
|
||||
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
|
||||
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
|
||||
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
|
||||
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
|
||||
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
|
||||
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
|
||||
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
|
||||
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
|
||||
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
|
||||
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
|
||||
|
||||
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
|
||||
{ regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
|
||||
{ regex: /!important/g, css: 'color3' }, // !important
|
||||
{ regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
|
||||
{ regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
|
||||
];
|
||||
|
||||
this.forHtmlScript({
|
||||
left: /(<|<)\s*style.*?(>|>)/gi,
|
||||
right: /(<|<)\/\s*style\s*(>|>)/gi
|
||||
});
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.CSS.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.CSS.aliases = ['css'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.CSS = function()
|
||||
{
|
||||
function getKeywordsCSS(str)
|
||||
{
|
||||
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
|
||||
};
|
||||
|
||||
function getValuesCSS(str)
|
||||
{
|
||||
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
|
||||
};
|
||||
|
||||
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
|
||||
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
|
||||
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
|
||||
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
|
||||
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
|
||||
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
|
||||
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
|
||||
'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
|
||||
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
|
||||
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
|
||||
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
|
||||
'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
|
||||
'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
|
||||
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
|
||||
|
||||
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
|
||||
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
|
||||
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
|
||||
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
|
||||
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
|
||||
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
|
||||
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
|
||||
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
|
||||
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
|
||||
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
|
||||
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
|
||||
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
|
||||
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
|
||||
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
|
||||
|
||||
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
|
||||
{ regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
|
||||
{ regex: /!important/g, css: 'color3' }, // !important
|
||||
{ regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
|
||||
{ regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
|
||||
];
|
||||
|
||||
this.forHtmlScript({
|
||||
left: /(<|<)\s*style.*?(>|>)/gi,
|
||||
right: /(<|<)\/\s*style\s*(>|>)/gi
|
||||
});
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.CSS.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.CSS.aliases = ['css'];
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Delphi = function()
|
||||
{
|
||||
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
|
||||
'case char class comp const constructor currency destructor div do double ' +
|
||||
'downto else end except exports extended false file finalization finally ' +
|
||||
'for function goto if implementation in inherited int64 initialization ' +
|
||||
'integer interface is label library longint longword mod nil not object ' +
|
||||
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
|
||||
'pint64 pointer private procedure program property pshortstring pstring ' +
|
||||
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
|
||||
'record repeat set shl shortint shortstring shr single smallint string then ' +
|
||||
'threadvar to true try type unit until uses val var varirnt while widechar ' +
|
||||
'widestring with word write writeln xor';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
|
||||
{ regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
|
||||
{ regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
|
||||
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Delphi.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Delphi.aliases = ['delphi', 'pascal', 'pas'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Delphi = function()
|
||||
{
|
||||
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
|
||||
'case char class comp const constructor currency destructor div do double ' +
|
||||
'downto else end except exports extended false file finalization finally ' +
|
||||
'for function goto if implementation in inherited int64 initialization ' +
|
||||
'integer interface is label library longint longword mod nil not object ' +
|
||||
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
|
||||
'pint64 pointer private procedure program property pshortstring pstring ' +
|
||||
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
|
||||
'record repeat set shl shortint shortstring shr single smallint string then ' +
|
||||
'threadvar to true try type unit until uses val var varirnt while widechar ' +
|
||||
'widestring with word write writeln xor';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
|
||||
{ regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
|
||||
{ regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
|
||||
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Delphi.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Delphi.aliases = ['delphi', 'pascal', 'pas'];
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Diff = function()
|
||||
{
|
||||
this.regexList = [
|
||||
{ regex: /^\+\+\+.*$/gm, css: 'color2' },
|
||||
{ regex: /^\-\-\-.*$/gm, css: 'color2' },
|
||||
{ regex: /^\s.*$/gm, css: 'color1' },
|
||||
{ regex: /^@@.*@@$/gm, css: 'variable' },
|
||||
{ regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
|
||||
{ regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Diff.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Diff.aliases = ['diff', 'patch'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Diff = function()
|
||||
{
|
||||
this.regexList = [
|
||||
{ regex: /^\+\+\+.*$/gm, css: 'color2' },
|
||||
{ regex: /^\-\-\-.*$/gm, css: 'color2' },
|
||||
{ regex: /^\s.*$/gm, css: 'color1' },
|
||||
{ regex: /^@@.*@@$/gm, css: 'variable' },
|
||||
{ regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
|
||||
{ regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Diff.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Diff.aliases = ['diff', 'patch'];
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Erlang = function()
|
||||
{
|
||||
// Contributed by Jean-Lou Dupont
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Groovy = function()
|
||||
{
|
||||
// Contributed by Andres Almiray
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.JScript = function()
|
||||
{
|
||||
var keywords = 'break case catch continue ' +
|
||||
'default delete do else false ' +
|
||||
'for function if in instanceof ' +
|
||||
'new null return super switch ' +
|
||||
'this throw true try typeof var while with'
|
||||
;
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.JScript = function()
|
||||
{
|
||||
var keywords = 'break case catch continue ' +
|
||||
'default delete do else false ' +
|
||||
'for function if in instanceof ' +
|
||||
'new null return super switch ' +
|
||||
'this throw true try typeof var while with'
|
||||
;
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Java = function()
|
||||
{
|
||||
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
||||
'continue default do double else enum extends ' +
|
||||
'false final finally float for goto if implements import ' +
|
||||
'instanceof int interface long native new null ' +
|
||||
'package private protected public return ' +
|
||||
'short static strictfp super switch synchronized this throw throws true ' +
|
||||
'transient try void volatile while';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments
|
||||
{ regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
|
||||
{ regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
|
||||
{ regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
|
||||
];
|
||||
|
||||
this.forHtmlScript({
|
||||
left : /(<|<)%[@!=]?/g,
|
||||
right : /%(>|>)/g
|
||||
});
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Java.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Java.aliases = ['java'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Java = function()
|
||||
{
|
||||
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
||||
'continue default do double else enum extends ' +
|
||||
'false final finally float for goto if implements import ' +
|
||||
'instanceof int interface long native new null ' +
|
||||
'package private protected public return ' +
|
||||
'short static strictfp super switch synchronized this throw throws true ' +
|
||||
'transient try void volatile while';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments
|
||||
{ regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
|
||||
{ regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
|
||||
{ regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
|
||||
];
|
||||
|
||||
this.forHtmlScript({
|
||||
left : /(<|<)%[@!=]?/g,
|
||||
right : /%(>|>)/g
|
||||
});
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Java.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Java.aliases = ['java'];
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.JavaFX = function()
|
||||
{
|
||||
// Contributed by Patrick Webster
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Perl = function()
|
||||
{
|
||||
// Contributed by David Simmons-Duffin and Marty Kube
|
||||
|
||||
var funcs =
|
||||
'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
|
||||
'chroot close closedir connect cos crypt defined delete each endgrent ' +
|
||||
'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
|
||||
'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
|
||||
'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
|
||||
'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
|
||||
'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
|
||||
'getservbyname getservbyport getservent getsockname getsockopt glob ' +
|
||||
'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
|
||||
'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
|
||||
'oct open opendir ord pack pipe pop pos print printf prototype push ' +
|
||||
'quotemeta rand read readdir readline readlink readpipe recv rename ' +
|
||||
'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
|
||||
'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
|
||||
'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
|
||||
'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
|
||||
'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
|
||||
'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
|
||||
'undef unlink unpack unshift utime values vec wait waitpid warn write';
|
||||
|
||||
var keywords =
|
||||
'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
|
||||
'for foreach goto if import last local my next no our package redo ref ' +
|
||||
'require return sub tie tied unless untie until use wantarray while';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
|
||||
{ regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
|
||||
{ regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
||||
}
|
||||
|
||||
SyntaxHighlighter.brushes.Perl.prototype = new SyntaxHighlighter.Highlighter();
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Perl = function()
|
||||
{
|
||||
// Contributed by David Simmons-Duffin and Marty Kube
|
||||
|
||||
var funcs =
|
||||
'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
|
||||
'chroot close closedir connect cos crypt defined delete each endgrent ' +
|
||||
'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
|
||||
'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
|
||||
'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
|
||||
'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
|
||||
'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
|
||||
'getservbyname getservbyport getservent getsockname getsockopt glob ' +
|
||||
'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
|
||||
'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
|
||||
'oct open opendir ord pack pipe pop pos print printf prototype push ' +
|
||||
'quotemeta rand read readdir readline readlink readpipe recv rename ' +
|
||||
'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
|
||||
'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
|
||||
'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
|
||||
'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
|
||||
'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
|
||||
'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
|
||||
'undef unlink unpack unshift utime values vec wait waitpid warn write';
|
||||
|
||||
var keywords =
|
||||
'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
|
||||
'for foreach goto if import last local my next no our package redo ref ' +
|
||||
'require return sub tie tied unless untie until use wantarray while';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
|
||||
{ regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
|
||||
{ regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
||||
}
|
||||
|
||||
SyntaxHighlighter.brushes.Perl.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Perl.aliases = ['perl', 'Perl', 'pl'];
|
||||
@@ -1,91 +1,91 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Php = function()
|
||||
{
|
||||
var funcs = 'abs acos acosh addcslashes addslashes ' +
|
||||
'array_change_key_case array_chunk array_combine array_count_values array_diff '+
|
||||
'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
|
||||
'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
|
||||
'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
|
||||
'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
|
||||
'array_push array_rand array_reduce array_reverse array_search array_shift '+
|
||||
'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
|
||||
'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
|
||||
'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
|
||||
'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
|
||||
'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
|
||||
'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
|
||||
'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
|
||||
'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
|
||||
'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
|
||||
'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
|
||||
'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
|
||||
'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
|
||||
'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
|
||||
'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
|
||||
'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
|
||||
'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
|
||||
'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
|
||||
'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
|
||||
'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
|
||||
'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
|
||||
'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
|
||||
'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+
|
||||
'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
|
||||
'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
|
||||
'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
|
||||
'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
|
||||
'strtoupper strtr strval substr substr_compare';
|
||||
|
||||
var keywords = 'and or xor array as break case ' +
|
||||
'cfunction class const continue declare default die do else ' +
|
||||
'elseif enddeclare endfor endforeach endif endswitch endwhile ' +
|
||||
'extends for foreach function include include_once global if ' +
|
||||
'new old_function return static switch use require require_once ' +
|
||||
'var while abstract interface public implements extends private protected throw';
|
||||
|
||||
var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\$\w+/g, css: 'variable' }, // variables
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
|
||||
{ regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Php.aliases = ['php'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Php = function()
|
||||
{
|
||||
var funcs = 'abs acos acosh addcslashes addslashes ' +
|
||||
'array_change_key_case array_chunk array_combine array_count_values array_diff '+
|
||||
'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
|
||||
'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
|
||||
'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
|
||||
'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
|
||||
'array_push array_rand array_reduce array_reverse array_search array_shift '+
|
||||
'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
|
||||
'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
|
||||
'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
|
||||
'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
|
||||
'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
|
||||
'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
|
||||
'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
|
||||
'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
|
||||
'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
|
||||
'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
|
||||
'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
|
||||
'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
|
||||
'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
|
||||
'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
|
||||
'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
|
||||
'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
|
||||
'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
|
||||
'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
|
||||
'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
|
||||
'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
|
||||
'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
|
||||
'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+
|
||||
'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
|
||||
'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
|
||||
'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
|
||||
'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
|
||||
'strtoupper strtr strval substr substr_compare';
|
||||
|
||||
var keywords = 'and or xor array as break case ' +
|
||||
'cfunction class const continue declare default die do else ' +
|
||||
'elseif enddeclare endfor endforeach endif endswitch endwhile ' +
|
||||
'extends for foreach function include include_once global if ' +
|
||||
'new old_function return static switch use require require_once ' +
|
||||
'var while abstract interface public implements extends private protected throw';
|
||||
|
||||
var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\$\w+/g, css: 'variable' }, // variables
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
|
||||
{ regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Php.aliases = ['php'];
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Plain = function()
|
||||
{
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Plain.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Plain.aliases = ['text', 'plain'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Plain = function()
|
||||
{
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Plain.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Plain.aliases = ['text', 'plain'];
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.PowerShell = function()
|
||||
{
|
||||
// Contributes by B.v.Zanten, Getronics
|
||||
// http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro
|
||||
|
||||
var keywords = 'Add-Content Add-History Add-Member Add-PSSnapin Clear(-Content)? Clear-Item ' +
|
||||
'Clear-ItemProperty Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ' +
|
||||
'ConvertTo-Html ConvertTo-SecureString Copy(-Item)? Copy-ItemProperty Export-Alias ' +
|
||||
'Export-Clixml Export-Console Export-Csv ForEach(-Object)? Format-Custom Format-List ' +
|
||||
'Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command ' +
|
||||
'Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy ' +
|
||||
'Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member ' +
|
||||
'Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service ' +
|
||||
'Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object ' +
|
||||
'Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item ' +
|
||||
'Join-Path Measure-Command Measure-Object Move(-Item)? Move-ItemProperty New-Alias ' +
|
||||
'New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan ' +
|
||||
'New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location ' +
|
||||
'Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin ' +
|
||||
'Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service ' +
|
||||
'Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content ' +
|
||||
'Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug ' +
|
||||
'Set-Service Set-TraceSource Set(-Variable)? Sort-Object Split-Path Start-Service ' +
|
||||
'Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service ' +
|
||||
'Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where(-Object)? ' +
|
||||
'Write-Debug Write-Error Write(-Host)? Write-Output Write-Progress Write-Verbose Write-Warning';
|
||||
var alias = 'ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl ' +
|
||||
'ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv ' +
|
||||
'gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ' +
|
||||
'ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep sort sp ' +
|
||||
'spps spsv sv tee cat cd cp h history kill lp ls ' +
|
||||
'mount mv popd ps pushd pwd r rm rmdir echo cls chdir del dir ' +
|
||||
'erase rd ren type % \\?';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /#.*$/gm, css: 'comments' }, // one line comments
|
||||
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // variables $Computer1
|
||||
{ regex: /\-[a-zA-Z]+\b/g, css: 'keyword' }, // Operators -not -and -eq
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' },
|
||||
{ regex: new RegExp(this.getKeywords(alias), 'gmi'), css: 'keyword' }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.PowerShell.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.PowerShell.aliases = ['powershell', 'ps'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.PowerShell = function()
|
||||
{
|
||||
// Contributes by B.v.Zanten, Getronics
|
||||
// http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro
|
||||
|
||||
var keywords = 'Add-Content Add-History Add-Member Add-PSSnapin Clear(-Content)? Clear-Item ' +
|
||||
'Clear-ItemProperty Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ' +
|
||||
'ConvertTo-Html ConvertTo-SecureString Copy(-Item)? Copy-ItemProperty Export-Alias ' +
|
||||
'Export-Clixml Export-Console Export-Csv ForEach(-Object)? Format-Custom Format-List ' +
|
||||
'Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command ' +
|
||||
'Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy ' +
|
||||
'Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member ' +
|
||||
'Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service ' +
|
||||
'Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object ' +
|
||||
'Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item ' +
|
||||
'Join-Path Measure-Command Measure-Object Move(-Item)? Move-ItemProperty New-Alias ' +
|
||||
'New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan ' +
|
||||
'New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location ' +
|
||||
'Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin ' +
|
||||
'Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service ' +
|
||||
'Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content ' +
|
||||
'Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug ' +
|
||||
'Set-Service Set-TraceSource Set(-Variable)? Sort-Object Split-Path Start-Service ' +
|
||||
'Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service ' +
|
||||
'Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where(-Object)? ' +
|
||||
'Write-Debug Write-Error Write(-Host)? Write-Output Write-Progress Write-Verbose Write-Warning';
|
||||
var alias = 'ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl ' +
|
||||
'ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv ' +
|
||||
'gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ' +
|
||||
'ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep sort sp ' +
|
||||
'spps spsv sv tee cat cd cp h history kill lp ls ' +
|
||||
'mount mv popd ps pushd pwd r rm rmdir echo cls chdir del dir ' +
|
||||
'erase rd ren type % \\?';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /#.*$/gm, css: 'comments' }, // one line comments
|
||||
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // variables $Computer1
|
||||
{ regex: /\-[a-zA-Z]+\b/g, css: 'keyword' }, // Operators -not -and -eq
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' },
|
||||
{ regex: new RegExp(this.getKeywords(alias), 'gmi'), css: 'keyword' }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.PowerShell.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.PowerShell.aliases = ['powershell', 'ps'];
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Python = function()
|
||||
{
|
||||
// Contributed by Gheorghe Milas and Ahmad Sherif
|
||||
|
||||
var keywords = 'and assert break class continue def del elif else ' +
|
||||
'except exec finally for from global if import in is ' +
|
||||
'lambda not or pass print raise return try yield while';
|
||||
|
||||
var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
|
||||
'chr classmethod cmp coerce compile complex delattr dict dir ' +
|
||||
'divmod enumerate eval execfile file filter float format frozenset ' +
|
||||
'getattr globals hasattr hash help hex id input int intern ' +
|
||||
'isinstance issubclass iter len list locals long map max min next ' +
|
||||
'object oct open ord pow print property range raw_input reduce ' +
|
||||
'reload repr reversed round set setattr slice sorted staticmethod ' +
|
||||
'str sum super tuple type type unichr unicode vars xrange zip';
|
||||
|
||||
var special = 'None True False self cls class_';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
|
||||
{ regex: /^\s*@\w+/gm, css: 'decorator' },
|
||||
{ regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
|
||||
{ regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
|
||||
{ regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
|
||||
{ regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
|
||||
{ regex: /\b\d+\.?\w*/g, css: 'value' },
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
|
||||
{ regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Python.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Python.aliases = ['py', 'python'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Python = function()
|
||||
{
|
||||
// Contributed by Gheorghe Milas and Ahmad Sherif
|
||||
|
||||
var keywords = 'and assert break class continue def del elif else ' +
|
||||
'except exec finally for from global if import in is ' +
|
||||
'lambda not or pass print raise return try yield while';
|
||||
|
||||
var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
|
||||
'chr classmethod cmp coerce compile complex delattr dict dir ' +
|
||||
'divmod enumerate eval execfile file filter float format frozenset ' +
|
||||
'getattr globals hasattr hash help hex id input int intern ' +
|
||||
'isinstance issubclass iter len list locals long map max min next ' +
|
||||
'object oct open ord pow print property range raw_input reduce ' +
|
||||
'reload repr reversed round set setattr slice sorted staticmethod ' +
|
||||
'str sum super tuple type type unichr unicode vars xrange zip';
|
||||
|
||||
var special = 'None True False self cls class_';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
|
||||
{ regex: /^\s*@\w+/gm, css: 'decorator' },
|
||||
{ regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
|
||||
{ regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
|
||||
{ regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
|
||||
{ regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
|
||||
{ regex: /\b\d+\.?\w*/g, css: 'value' },
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
|
||||
{ regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Python.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Python.aliases = ['py', 'python'];
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Ruby = function()
|
||||
{
|
||||
// Contributed by Erik Peterson.
|
||||
|
||||
var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
|
||||
'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
|
||||
'self super then throw true undef unless until when while yield';
|
||||
|
||||
var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
|
||||
'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
|
||||
'ThreadGroup Thread Time TrueClass';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants
|
||||
{ regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols
|
||||
{ regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Ruby.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Ruby.aliases = ['ruby', 'rails', 'ror', 'rb'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Ruby = function()
|
||||
{
|
||||
// Contributed by Erik Peterson.
|
||||
|
||||
var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
|
||||
'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
|
||||
'self super then throw true undef unless until when while yield';
|
||||
|
||||
var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
|
||||
'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
|
||||
'ThreadGroup Thread Time TrueClass';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants
|
||||
{ regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols
|
||||
{ regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Ruby.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Ruby.aliases = ['ruby', 'rails', 'ror', 'rb'];
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Scala = function()
|
||||
{
|
||||
// Contributed by Yegor Jbanov and David Bernard.
|
||||
|
||||
var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' +
|
||||
'override try lazy for var catch throw type extends class while with new final yield abstract ' +
|
||||
'else do if return protected private this package false';
|
||||
|
||||
var keyops = '[_:=><%#@]+';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword
|
||||
];
|
||||
}
|
||||
|
||||
SyntaxHighlighter.brushes.Scala.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Scala.aliases = ['scala'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Scala = function()
|
||||
{
|
||||
// Contributed by Yegor Jbanov and David Bernard.
|
||||
|
||||
var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' +
|
||||
'override try lazy for var catch throw type extends class while with new final yield abstract ' +
|
||||
'else do if return protected private this package false';
|
||||
|
||||
var keyops = '[_:=><%#@]+';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string
|
||||
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
||||
{ regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword
|
||||
];
|
||||
}
|
||||
|
||||
SyntaxHighlighter.brushes.Scala.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Scala.aliases = ['scala'];
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Sql = function()
|
||||
{
|
||||
var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
|
||||
'current_user day isnull left lower month nullif replace right ' +
|
||||
'session_user space substring sum system_user upper user year';
|
||||
|
||||
var keywords = 'absolute action add after alter as asc at authorization begin bigint ' +
|
||||
'binary bit by cascade char character check checkpoint close collate ' +
|
||||
'column commit committed connect connection constraint contains continue ' +
|
||||
'create cube current current_date current_time cursor database date ' +
|
||||
'deallocate dec decimal declare default delete desc distinct double drop ' +
|
||||
'dynamic else end end-exec escape except exec execute false fetch first ' +
|
||||
'float for force foreign forward free from full function global goto grant ' +
|
||||
'group grouping having hour ignore index inner insensitive insert instead ' +
|
||||
'int integer intersect into is isolation key last level load local max min ' +
|
||||
'minute modify move name national nchar next no numeric of off on only ' +
|
||||
'open option order out output partial password precision prepare primary ' +
|
||||
'prior privileges procedure public read real references relative repeatable ' +
|
||||
'restrict return returns revoke rollback rollup rows rule schema scroll ' +
|
||||
'second section select sequence serializable set size smallint static ' +
|
||||
'statistics table temp temporary then time timestamp to top transaction ' +
|
||||
'translation trigger true truncate uncommitted union unique update values ' +
|
||||
'varchar varying view when where with work';
|
||||
|
||||
var operators = 'all and any between cross in join like not null or outer some';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions
|
||||
{ regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Sql.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Sql.aliases = ['sql'];
|
||||
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Sql = function()
|
||||
{
|
||||
var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
|
||||
'current_user day isnull left lower month nullif replace right ' +
|
||||
'session_user space substring sum system_user upper user year';
|
||||
|
||||
var keywords = 'absolute action add after alter as asc at authorization begin bigint ' +
|
||||
'binary bit by cascade char character check checkpoint close collate ' +
|
||||
'column commit committed connect connection constraint contains continue ' +
|
||||
'create cube current current_date current_time cursor database date ' +
|
||||
'deallocate dec decimal declare default delete desc distinct double drop ' +
|
||||
'dynamic else end end-exec escape except exec execute false fetch first ' +
|
||||
'float for force foreign forward free from full function global goto grant ' +
|
||||
'group grouping having hour ignore index inner insensitive insert instead ' +
|
||||
'int integer intersect into is isolation key last level load local max min ' +
|
||||
'minute modify move name national nchar next no numeric of off on only ' +
|
||||
'open option order out output partial password precision prepare primary ' +
|
||||
'prior privileges procedure public read real references relative repeatable ' +
|
||||
'restrict return returns revoke rollback rollup rows rule schema scroll ' +
|
||||
'second section select sequence serializable set size smallint static ' +
|
||||
'statistics table temp temporary then time timestamp to top transaction ' +
|
||||
'translation trigger true truncate uncommitted union unique update values ' +
|
||||
'varchar varying view when where with work';
|
||||
|
||||
var operators = 'all and any between cross in join like not null or outer some';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
|
||||
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
|
||||
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions
|
||||
{ regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Sql.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Sql.aliases = ['sql'];
|
||||
|
||||
|
||||
+58
-58
@@ -1,58 +1,58 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Vb = function()
|
||||
{
|
||||
var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' +
|
||||
'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' +
|
||||
'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' +
|
||||
'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' +
|
||||
'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' +
|
||||
'Function Get GetType GoSub GoTo Handles If Implements Imports In ' +
|
||||
'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' +
|
||||
'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' +
|
||||
'NotInheritable NotOverridable Object On Option Optional Or OrElse ' +
|
||||
'Overloads Overridable Overrides ParamArray Preserve Private Property ' +
|
||||
'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' +
|
||||
'Return Select Set Shadows Shared Short Single Static Step Stop String ' +
|
||||
'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' +
|
||||
'Variant When While With WithEvents WriteOnly Xor';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /'.*$/gm, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Vb.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Vb.aliases = ['vb', 'vbnet'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Vb = function()
|
||||
{
|
||||
var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' +
|
||||
'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' +
|
||||
'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' +
|
||||
'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' +
|
||||
'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' +
|
||||
'Function Get GetType GoSub GoTo Handles If Implements Imports In ' +
|
||||
'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' +
|
||||
'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' +
|
||||
'NotInheritable NotOverridable Object On Option Optional Or OrElse ' +
|
||||
'Overloads Overridable Overrides ParamArray Preserve Private Property ' +
|
||||
'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' +
|
||||
'Return Select Set Shadows Shared Short Single Static Step Stop String ' +
|
||||
'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' +
|
||||
'Variant When While With WithEvents WriteOnly Xor';
|
||||
|
||||
this.regexList = [
|
||||
{ regex: /'.*$/gm, css: 'comments' }, // one line comments
|
||||
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
||||
{ regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
||||
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword
|
||||
];
|
||||
|
||||
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Vb.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Vb.aliases = ['vb', 'vbnet'];
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Xml = function()
|
||||
{
|
||||
function process(match, regexInfo)
|
||||
{
|
||||
var constructor = SyntaxHighlighter.Match,
|
||||
code = match[0],
|
||||
tag = new XRegExp('(<|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
|
||||
result = []
|
||||
;
|
||||
|
||||
if (match.attributes != null)
|
||||
{
|
||||
var attributes,
|
||||
regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
|
||||
'\\s*=\\s*' +
|
||||
'(?<value> ".*?"|\'.*?\'|\\w+)',
|
||||
'xg');
|
||||
|
||||
while ((attributes = regex.exec(code)) != null)
|
||||
{
|
||||
result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
|
||||
result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
|
||||
}
|
||||
}
|
||||
|
||||
if (tag != null)
|
||||
result.push(
|
||||
new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
this.regexList = [
|
||||
{ regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>
|
||||
{ regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // <!-- ... -->
|
||||
{ regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Xml.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Xml.aliases = ['xml', 'xhtml', 'xslt', 'html'];
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
SyntaxHighlighter.brushes.Xml = function()
|
||||
{
|
||||
function process(match, regexInfo)
|
||||
{
|
||||
var constructor = SyntaxHighlighter.Match,
|
||||
code = match[0],
|
||||
tag = new XRegExp('(<|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
|
||||
result = []
|
||||
;
|
||||
|
||||
if (match.attributes != null)
|
||||
{
|
||||
var attributes,
|
||||
regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
|
||||
'\\s*=\\s*' +
|
||||
'(?<value> ".*?"|\'.*?\'|\\w+)',
|
||||
'xg');
|
||||
|
||||
while ((attributes = regex.exec(code)) != null)
|
||||
{
|
||||
result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
|
||||
result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
|
||||
}
|
||||
}
|
||||
|
||||
if (tag != null)
|
||||
result.push(
|
||||
new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
this.regexList = [
|
||||
{ regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>
|
||||
{ regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // <!-- ... -->
|
||||
{ regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
|
||||
];
|
||||
};
|
||||
|
||||
SyntaxHighlighter.brushes.Xml.prototype = new SyntaxHighlighter.Highlighter();
|
||||
SyntaxHighlighter.brushes.Xml.aliases = ['xml', 'xhtml', 'xslt', 'html'];
|
||||
|
||||
+29
-29
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+29
-29
@@ -1,30 +1,30 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 y={d:{}};y.d={F:6(S,l,q,k,m,n){6 J(z,Y){1 V=16 15("^"+Y+"\\\\[(?<o>\\\\w+)\\\\]$","14"),x=2;h(1 i=0;i<z.g;i++){7((x=V.17(z[i]))!=2){4 x.o}}4 2};6 3(r,U){4 r!=2?r:U};6 9(s){4 s!=2?s.13():2};1 f=S.18(":"),E=f[0],c={},u={"p":"p"};C={"p":"1a"},v=2,5=d.5;h(1 i 19 f){c[f[i]]="p"}l=9(3(l,5.O));q=9(3(q,5.T));k=9(3(k,5.A));n=9(3(n,5.W));m=9(3(m,5["K-L"]));v={1b:E,O:3(C[c.12],l),T:3(C[c.1g],q),A:3(u[c.A],k),W:3(u[c.1t],n),"K-L":3(J(f,"1q"),m)};4 v},1x:6(B,I,D,H,N,M){6 Z(){1 a=1r;h(1 i=0;i<a.g;i++){7(a[i]===2){10}7(G(a[i])=="1s"&&a[i]!=""){4 a[i]+""}7(G(a[i])=="1c"&&a[i].o!=""){4 a[i].o+""}}4 2};6 t(Q,R,11){1 j=1w.1v(11);h(1 i=0;i<j.g;i++){7(j[i].1u("1p")==R){Q.1n(j[i])}}};1 b=[],1o=2,1f={},1e="1d";t(b,B,"1h");t(b,B,"1i");7(b.g===0){4}h(1 i=0;i<b.g;i++){1 8=b[i],e=Z(8.X["1m"],8.1l,8.X["P"],8.P),1k="";7(e===2){10}e=y.d.F(e,I,D,H,N,M);d.1j(e,8)}}};',62,96,'|var|null|defaultValue|return|defaults|function|if|_26|asString||_21|_11|SyntaxHighlighter|_27|_f|length|for||_1f|_4|_2|_5|_6|value|true|_3|_c|_e|findTagsByName|_12|result||_a|dp|_7|collapse|_14|reverse|_16|_10|parseParams|typeof|_17|_15|getValue|first|line|_19|_18|gutter|language|_1c|_1d|_1|toolbar|_d|_9|ruler|attributes|_8|findValue|continue|_1e|nogutter|toString|gi|XRegExp|new|exec|split|in|false|brush|object|innerHTML|_24|_23|nocontrols|pre|textarea|highlight|_28|className|class|push|_22|name|firstline|arguments|string|showcolumns|getAttribute|getElementsByTagName|document|HighlightAll'.split('|'),0,{}))
|
||||
|
||||
@@ -1661,9 +1661,14 @@ Mind.View.Project = {
|
||||
}
|
||||
}
|
||||
|
||||
Mind.ConfirmUpdate= function(){
|
||||
//Mind.tmpShownData= Mind.Dialog.ShowData("<center><br/><br/><img src='"+Mind.Properties.imagesPath+"/load.gif'><br/>Checking for updates</center>",'Mind Updates', false, false, true);
|
||||
var url= Mind.Properties.path+'/../../mind_update.php?confirmUpdate=true';
|
||||
document.getElementById('tempIframeForUpdate').src= url;
|
||||
}
|
||||
Mind.UpdateItSelf= function(){
|
||||
//Mind.Dialog.ShowMessage("Checking for updates");
|
||||
var d= Mind.Dialog.ShowData("<center><br/><br/><img src='"+Mind.Properties.imagesPath+"/load.gif'><br/>Checking for updates</center>",
|
||||
|
||||
Mind.tmpShownData= Mind.Dialog.ShowData("<center><br/><br/><img src='"+Mind.Properties.imagesPath+"/load.gif'><br/>Checking for updates</center>",
|
||||
'Mind Updates', false, false, true);
|
||||
var url= Mind.Properties.path+'/../../mind_update.php';
|
||||
|
||||
@@ -1671,8 +1676,9 @@ Mind.UpdateItSelf= function(){
|
||||
$.ajax({
|
||||
url: url,
|
||||
success: function(ret){
|
||||
Mind.Dialog.CloseData(d);
|
||||
Mind.Dialog.ShowData(ret, 'Message', 580, 400);
|
||||
Mind.Dialog.CloseData(Mind.tmpShownData);
|
||||
Mind.Dialog.ShowData(ret, 'Message', 580, 400, true);
|
||||
document.getElementById('currentChangesToTake').innerHTML= document.getElementById('hiddenCurrentChangesToTake').innerHTML;
|
||||
},
|
||||
error : function(XMLHttpRequest, textStatus, errorThrown){
|
||||
Mind.AjaxHandler.Capture(XMLHttpRequest);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Mind.Update = {
|
||||
url : "http://felipe/flpnm/thewebmind.org/update/update.php",
|
||||
Verify : function(){
|
||||
alert('aff');
|
||||
var html = $.ajax({
|
||||
url: Mind.Update.url,
|
||||
async: false
|
||||
|
||||
@@ -1,330 +1,330 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
.syntaxhighlighter,
|
||||
.syntaxhighlighter div,
|
||||
.syntaxhighlighter code,
|
||||
.syntaxhighlighter table,
|
||||
.syntaxhighlighter table td,
|
||||
.syntaxhighlighter table tr,
|
||||
.syntaxhighlighter table tbody
|
||||
{
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
border: 0 !important;
|
||||
outline: 0 !important;
|
||||
background: none !important;
|
||||
text-align: left !important;
|
||||
float: none !important;
|
||||
vertical-align: baseline !important;
|
||||
position: static !important;
|
||||
left: auto !important;
|
||||
top: auto !important;
|
||||
right: auto !important;
|
||||
bottom: auto !important;
|
||||
height: auto !important;
|
||||
width: auto !important;
|
||||
line-height: 1.1em !important;
|
||||
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
|
||||
font-weight: normal !important;
|
||||
font-style: normal !important;
|
||||
font-size: 1em !important;
|
||||
min-height: inherit !important; /* For IE8, FF & WebKit */
|
||||
min-height: auto !important; /* For IE7 */
|
||||
}
|
||||
|
||||
.syntaxhighlighter
|
||||
{
|
||||
width: 99% !important; /* 99% fixes IE8 horizontal scrollbar */
|
||||
margin: 0em 0 0em 0 !important;
|
||||
padding: 0px !important; /* adds a little border on top and bottom */
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .bold
|
||||
{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .italic
|
||||
{
|
||||
font-style: italic !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line
|
||||
{
|
||||
}
|
||||
|
||||
.syntaxhighlighter .no-wrap .line .content
|
||||
{
|
||||
white-space: pre !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line table
|
||||
{
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line td
|
||||
{
|
||||
vertical-align: top !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .number
|
||||
{
|
||||
width: 3em !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .number code
|
||||
{
|
||||
width: 2.7em !important;
|
||||
padding-right: .3em !important;
|
||||
text-align: right !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .content
|
||||
{
|
||||
padding-left: .5em !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .spaces
|
||||
{
|
||||
}
|
||||
|
||||
/* Disable border and margin on the lines when no gutter option is set */
|
||||
.syntaxhighlighter.nogutter .line .content
|
||||
{
|
||||
border-left: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .bar
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .bar.show
|
||||
{
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .bar
|
||||
{
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* Adjust some properties when collapsed */
|
||||
|
||||
.syntaxhighlighter.collapsed .lines
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .lines.no-wrap
|
||||
{
|
||||
overflow: auto !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/* Styles for the toolbar */
|
||||
|
||||
.syntaxhighlighter .toolbar
|
||||
{
|
||||
position: absolute !important;
|
||||
right: 0px !important;
|
||||
top: 0px !important;
|
||||
font-size: 1px !important;
|
||||
padding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .toolbar
|
||||
{
|
||||
font-size: 80% !important;
|
||||
padding: .2em 0 .5em .5em !important;
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar a.item,
|
||||
.syntaxhighlighter .toolbar .item
|
||||
{
|
||||
display: block !important;
|
||||
float: left !important;
|
||||
margin-left: 8px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
overflow: hidden !important;
|
||||
text-indent: -5000px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .toolbar .item
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .toolbar .item.expandSource
|
||||
{
|
||||
background-image: url(magnifier.png) !important;
|
||||
display: inline !important;
|
||||
text-indent: 0 !important;
|
||||
width: auto !important;
|
||||
float: none !important;
|
||||
height: 16px !important;
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.viewSource
|
||||
{
|
||||
background-image: url(page_white_code.png) !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.printSource
|
||||
{
|
||||
background-image: url(printer.png) !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.copyToClipboard
|
||||
{
|
||||
text-indent: 0 !important;
|
||||
background: none !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.about
|
||||
{
|
||||
background-image: url(help.png) !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print view.
|
||||
* Colors are based on the default theme without background.
|
||||
*/
|
||||
|
||||
.syntaxhighlighter.printing,
|
||||
.syntaxhighlighter.printing .line.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.alt2 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted .number,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt2 .content,
|
||||
{
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
/* Gutter line numbers */
|
||||
.syntaxhighlighter.printing .line .number
|
||||
{
|
||||
color: #bbb !important;
|
||||
}
|
||||
|
||||
/* Add border to the lines */
|
||||
.syntaxhighlighter.printing .line .content
|
||||
{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
/* Toolbar when visible */
|
||||
.syntaxhighlighter.printing .toolbar
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing a
|
||||
{
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .plain,
|
||||
.syntaxhighlighter.printing .plain a
|
||||
{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .comments,
|
||||
.syntaxhighlighter.printing .comments a
|
||||
{
|
||||
color: #008200 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .string,
|
||||
.syntaxhighlighter.printing .string a
|
||||
{
|
||||
color: blue !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .keyword
|
||||
{
|
||||
color: #069 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .preprocessor
|
||||
{
|
||||
color: gray !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .variable
|
||||
{
|
||||
color: #a70 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .value
|
||||
{
|
||||
color: #090 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .functions
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .constants
|
||||
{
|
||||
color: #0066CC !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .script
|
||||
{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .color1,
|
||||
.syntaxhighlighter.printing .color1 a
|
||||
{
|
||||
color: #808080 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .color2,
|
||||
.syntaxhighlighter.printing .color2 a
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .color3,
|
||||
.syntaxhighlighter.printing .color3 a
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
.syntaxhighlighter,
|
||||
.syntaxhighlighter div,
|
||||
.syntaxhighlighter code,
|
||||
.syntaxhighlighter table,
|
||||
.syntaxhighlighter table td,
|
||||
.syntaxhighlighter table tr,
|
||||
.syntaxhighlighter table tbody
|
||||
{
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
border: 0 !important;
|
||||
outline: 0 !important;
|
||||
background: none !important;
|
||||
text-align: left !important;
|
||||
float: none !important;
|
||||
vertical-align: baseline !important;
|
||||
position: static !important;
|
||||
left: auto !important;
|
||||
top: auto !important;
|
||||
right: auto !important;
|
||||
bottom: auto !important;
|
||||
height: auto !important;
|
||||
width: auto !important;
|
||||
line-height: 1.1em !important;
|
||||
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
|
||||
font-weight: normal !important;
|
||||
font-style: normal !important;
|
||||
font-size: 1em !important;
|
||||
min-height: inherit !important; /* For IE8, FF & WebKit */
|
||||
min-height: auto !important; /* For IE7 */
|
||||
}
|
||||
|
||||
.syntaxhighlighter
|
||||
{
|
||||
width: 99% !important; /* 99% fixes IE8 horizontal scrollbar */
|
||||
margin: 0em 0 0em 0 !important;
|
||||
padding: 0px !important; /* adds a little border on top and bottom */
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .bold
|
||||
{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .italic
|
||||
{
|
||||
font-style: italic !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line
|
||||
{
|
||||
}
|
||||
|
||||
.syntaxhighlighter .no-wrap .line .content
|
||||
{
|
||||
white-space: pre !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line table
|
||||
{
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line td
|
||||
{
|
||||
vertical-align: top !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .number
|
||||
{
|
||||
width: 3em !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .number code
|
||||
{
|
||||
width: 2.7em !important;
|
||||
padding-right: .3em !important;
|
||||
text-align: right !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .content
|
||||
{
|
||||
padding-left: .5em !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line .spaces
|
||||
{
|
||||
}
|
||||
|
||||
/* Disable border and margin on the lines when no gutter option is set */
|
||||
.syntaxhighlighter.nogutter .line .content
|
||||
{
|
||||
border-left: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .bar
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .bar.show
|
||||
{
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .bar
|
||||
{
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* Adjust some properties when collapsed */
|
||||
|
||||
.syntaxhighlighter.collapsed .lines
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .lines.no-wrap
|
||||
{
|
||||
overflow: auto !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/* Styles for the toolbar */
|
||||
|
||||
.syntaxhighlighter .toolbar
|
||||
{
|
||||
position: absolute !important;
|
||||
right: 0px !important;
|
||||
top: 0px !important;
|
||||
font-size: 1px !important;
|
||||
padding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .toolbar
|
||||
{
|
||||
font-size: 80% !important;
|
||||
padding: .2em 0 .5em .5em !important;
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar a.item,
|
||||
.syntaxhighlighter .toolbar .item
|
||||
{
|
||||
display: block !important;
|
||||
float: left !important;
|
||||
margin-left: 8px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
overflow: hidden !important;
|
||||
text-indent: -5000px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .toolbar .item
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.collapsed .toolbar .item.expandSource
|
||||
{
|
||||
background-image: url(magnifier.png) !important;
|
||||
display: inline !important;
|
||||
text-indent: 0 !important;
|
||||
width: auto !important;
|
||||
float: none !important;
|
||||
height: 16px !important;
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.viewSource
|
||||
{
|
||||
background-image: url(page_white_code.png) !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.printSource
|
||||
{
|
||||
background-image: url(printer.png) !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.copyToClipboard
|
||||
{
|
||||
text-indent: 0 !important;
|
||||
background: none !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar .item.about
|
||||
{
|
||||
background-image: url(help.png) !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print view.
|
||||
* Colors are based on the default theme without background.
|
||||
*/
|
||||
|
||||
.syntaxhighlighter.printing,
|
||||
.syntaxhighlighter.printing .line.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.alt2 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted .number,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt2 .content,
|
||||
{
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
/* Gutter line numbers */
|
||||
.syntaxhighlighter.printing .line .number
|
||||
{
|
||||
color: #bbb !important;
|
||||
}
|
||||
|
||||
/* Add border to the lines */
|
||||
.syntaxhighlighter.printing .line .content
|
||||
{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
/* Toolbar when visible */
|
||||
.syntaxhighlighter.printing .toolbar
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing a
|
||||
{
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .plain,
|
||||
.syntaxhighlighter.printing .plain a
|
||||
{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .comments,
|
||||
.syntaxhighlighter.printing .comments a
|
||||
{
|
||||
color: #008200 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .string,
|
||||
.syntaxhighlighter.printing .string a
|
||||
{
|
||||
color: blue !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .keyword
|
||||
{
|
||||
color: #069 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .preprocessor
|
||||
{
|
||||
color: gray !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .variable
|
||||
{
|
||||
color: #a70 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .value
|
||||
{
|
||||
color: #090 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .functions
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .constants
|
||||
{
|
||||
color: #0066CC !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .script
|
||||
{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .color1,
|
||||
.syntaxhighlighter.printing .color1 a
|
||||
{
|
||||
color: #808080 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .color2,
|
||||
.syntaxhighlighter.printing .color2 a
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .color3,
|
||||
.syntaxhighlighter.printing .color3 a
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
@@ -1,173 +1,173 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/************************************
|
||||
* Default Syntax Highlighter theme.
|
||||
*
|
||||
* Interface elements.
|
||||
************************************/
|
||||
|
||||
.syntaxhighlighter
|
||||
{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
/* Highlighed line number */
|
||||
.syntaxhighlighter .line.highlighted .number
|
||||
{
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
/* Highlighed line */
|
||||
.syntaxhighlighter .line.highlighted.alt1,
|
||||
.syntaxhighlighter .line.highlighted.alt2
|
||||
{
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
/* Gutter line numbers */
|
||||
.syntaxhighlighter .line .number
|
||||
{
|
||||
color: #afafaf !important;
|
||||
}
|
||||
|
||||
/* Add border to the lines */
|
||||
.syntaxhighlighter .line .content
|
||||
{
|
||||
border-left: 3px solid #6CE26C !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .line .content
|
||||
{
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
/* First line */
|
||||
.syntaxhighlighter .line.alt1
|
||||
{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
/* Second line */
|
||||
.syntaxhighlighter .line.alt2
|
||||
{
|
||||
background-color: #F8F8F8 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar
|
||||
{
|
||||
background-color: #F8F8F8 !important;
|
||||
border: #E7E5DC solid 1px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar a
|
||||
{
|
||||
color: #a0a0a0 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar a:hover
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
/************************************
|
||||
* Actual syntax highlighter colors.
|
||||
************************************/
|
||||
.syntaxhighlighter .plain,
|
||||
.syntaxhighlighter .plain a
|
||||
{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .comments,
|
||||
.syntaxhighlighter .comments a
|
||||
{
|
||||
color: #008200 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .string,
|
||||
.syntaxhighlighter .string a
|
||||
{
|
||||
color: blue !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .keyword
|
||||
{
|
||||
color: #069 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .preprocessor
|
||||
{
|
||||
color: gray !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .variable
|
||||
{
|
||||
color: #a70 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .value
|
||||
{
|
||||
color: #090 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .functions
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .constants
|
||||
{
|
||||
color: #0066CC !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .script
|
||||
{
|
||||
background-color: yellow !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .color1,
|
||||
.syntaxhighlighter .color1 a
|
||||
{
|
||||
color: #808080 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .color2,
|
||||
.syntaxhighlighter .color2 a
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .color3,
|
||||
.syntaxhighlighter .color3 a
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/************************************
|
||||
* Default Syntax Highlighter theme.
|
||||
*
|
||||
* Interface elements.
|
||||
************************************/
|
||||
|
||||
.syntaxhighlighter
|
||||
{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
/* Highlighed line number */
|
||||
.syntaxhighlighter .line.highlighted .number
|
||||
{
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
/* Highlighed line */
|
||||
.syntaxhighlighter .line.highlighted.alt1,
|
||||
.syntaxhighlighter .line.highlighted.alt2
|
||||
{
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
/* Gutter line numbers */
|
||||
.syntaxhighlighter .line .number
|
||||
{
|
||||
color: #afafaf !important;
|
||||
}
|
||||
|
||||
/* Add border to the lines */
|
||||
.syntaxhighlighter .line .content
|
||||
{
|
||||
border-left: 3px solid #6CE26C !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter.printing .line .content
|
||||
{
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
/* First line */
|
||||
.syntaxhighlighter .line.alt1
|
||||
{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
/* Second line */
|
||||
.syntaxhighlighter .line.alt2
|
||||
{
|
||||
background-color: #F8F8F8 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar
|
||||
{
|
||||
background-color: #F8F8F8 !important;
|
||||
border: #E7E5DC solid 1px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar a
|
||||
{
|
||||
color: #a0a0a0 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .toolbar a:hover
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
/************************************
|
||||
* Actual syntax highlighter colors.
|
||||
************************************/
|
||||
.syntaxhighlighter .plain,
|
||||
.syntaxhighlighter .plain a
|
||||
{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .comments,
|
||||
.syntaxhighlighter .comments a
|
||||
{
|
||||
color: #008200 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .string,
|
||||
.syntaxhighlighter .string a
|
||||
{
|
||||
color: blue !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .keyword
|
||||
{
|
||||
color: #069 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .preprocessor
|
||||
{
|
||||
color: gray !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .variable
|
||||
{
|
||||
color: #a70 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .value
|
||||
{
|
||||
color: #090 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .functions
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .constants
|
||||
{
|
||||
color: #0066CC !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .script
|
||||
{
|
||||
background-color: yellow !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .color1,
|
||||
.syntaxhighlighter .color1 a
|
||||
{
|
||||
color: #808080 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .color2,
|
||||
.syntaxhighlighter .color2 a
|
||||
{
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .color3,
|
||||
.syntaxhighlighter .color3 a
|
||||
{
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* Django SyntaxHighlighter theme
|
||||
*/
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* Eclipse IDE SyntaxHighlighter color theme
|
||||
* (C) Code-House
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* Emacs SyntaxHighlighter theme based on theme by Joshua Emmons
|
||||
* http://www.skia.net/
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* Fade to Grey SyntaxHighlighter theme based on theme by Brasten Sager
|
||||
* http://www.ibrasten.com/
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* Midnight SyntaxHighlighter theme based on theme by J.D. Myers
|
||||
* http://webdesign.lsnjd.com/
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
||||
*
|
||||
* @version
|
||||
* 2.1.364 (October 15 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* This file is part of SyntaxHighlighter.
|
||||
*
|
||||
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SyntaxHighlighter 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 SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
||||
*/
|
||||
/**
|
||||
* RDark SyntaxHighlighter theme based on theme by Radu Dineiu
|
||||
* http://www.vim.org/scripts/script.php?script_id=1732
|
||||
|
||||
+53
-18
@@ -2,11 +2,22 @@
|
||||
require_once('config/mind.php');
|
||||
require_once(''.$_MIND['framework']);
|
||||
require_once(''.$_MIND['header']);
|
||||
|
||||
set_time_limit(72000); // 20 Minutes
|
||||
|
||||
$current= $_MIND['fw']->loadXML($_MIND['rootDir'].'config/current.xml');
|
||||
$localCurrent= $_MIND['rootDir'].'config/current.xml';
|
||||
$localCurrentDir= $localCurrent;
|
||||
|
||||
function changeStatus($n)
|
||||
{
|
||||
GLOBAL $_MIND;
|
||||
echo "<script>";
|
||||
echo "parent.document.getElementById('currentChangesToTake').innerHTML= parent.document.getElementById('currentChangesToTake').innerHTML -1; ";
|
||||
echo "parent.document.getElementById('updateListItem_".$n."').style.color= '#777'; ";
|
||||
echo "parent.document.getElementById('updateListItem_".$n."').style.textDecoration= 'line-through'; ";
|
||||
echo "</script>";
|
||||
$_MIND['fw']->forceFlush();
|
||||
}
|
||||
|
||||
if(!@$serverCurrent= @file_get_contents($_MIND['updateSource']))
|
||||
{
|
||||
@@ -17,7 +28,6 @@
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
//$serverCurrent= @file_get_contents($_MIND['updateSource']);
|
||||
|
||||
$localCurrent= @simplexml_load_file($localCurrent);
|
||||
$serverCurrent= @simplexml_load_string($serverCurrent);
|
||||
@@ -28,14 +38,26 @@
|
||||
|
||||
$changedFiles= Array();
|
||||
|
||||
echo 'Current installed version: <b><i>'.((string)$localCurrent->mindFiles['version']) .'</i></b><br/>Current version to download: <b><i>'. ((string)$serverCurrent->mindFiles['version']).'</i></b><br/>';
|
||||
//exit;
|
||||
$currentChangesToTake= 0;
|
||||
if((string)$localCurrent->mindFiles['version'] != (string)$serverCurrent->mindFiles['version'])
|
||||
{
|
||||
if(!isset($_GET['confirmUpdate']))
|
||||
echo "<br/><b>Changes:</b> <span id='currentChangesToTake'>0</span><hr/><div style='padding-left: 20px;'>";
|
||||
foreach($serverCurrent->mindFiles->file as $file)
|
||||
{
|
||||
$continue= false;
|
||||
if(!file_exists('../'. $file['addr']))
|
||||
{
|
||||
$continue= true;
|
||||
$currentChangesToTake++;
|
||||
if(!isset($_GET['confirmUpdate']))
|
||||
{
|
||||
echo "<span style='color:#4a4;' id='updateListItem_".$file['addr']."'>- To be Added: ".$file['addr'].'</span><br/>';
|
||||
}else{
|
||||
changeStatus($file['addr']);
|
||||
}
|
||||
}else{
|
||||
$match= (array)$localCurrent->xpath("mindFiles/file[@addr='".$file['addr']."']");
|
||||
|
||||
@@ -43,15 +65,22 @@
|
||||
{
|
||||
$match= $match[0];
|
||||
if((integer)$match['version'] < (integer)$file['version'])
|
||||
{
|
||||
$continue= true;
|
||||
$currentChangesToTake++;
|
||||
if(!isset($_GET['confirmUpdate']))
|
||||
{
|
||||
echo "<span style='color:#f44;' id='updateListItem_".$file['addr']."'>- To be Updated: ".$file['addr'].'</span><br/>';
|
||||
}else{
|
||||
changeStatus($file['addr']);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$continue= true;
|
||||
$continue= false;
|
||||
}
|
||||
}
|
||||
|
||||
//$file['addr']= '../'.$file['addr'];
|
||||
$curPath= '';
|
||||
if($continue)
|
||||
if($continue && isset($_GET['confirmUpdate']) && false)
|
||||
{
|
||||
$updated= true;
|
||||
$addr= explode('/', (string)$file['addr']);
|
||||
@@ -71,9 +100,26 @@
|
||||
$localCurrent->details= $serverCurrent->details;
|
||||
}
|
||||
}
|
||||
echo "</div><hr/>";
|
||||
echo "<b>Details:</b><br/>
|
||||
<div style='padding-left:20px; background-color:#e0e0ff;border:solid 1px #99c;'>
|
||||
<pre>";
|
||||
echo (string)$serverCurrent->details;
|
||||
echo '</pre></div>';
|
||||
// let's use it to update the value of how many changes we have
|
||||
echo "<span id='hiddenCurrentChangesToTake' style='display:none;'>".$currentChangesToTake.'</span>';
|
||||
}else{
|
||||
$updated= false;
|
||||
}
|
||||
|
||||
if(!isset($_GET['confirmUpdate']) && $currentChangesToTake > 0)
|
||||
{
|
||||
echo '<center>';
|
||||
echo "<input type='button' class='ui-state-default ui-corner-all ui-state-focus ui-state-hover' value='Update' onclick='Mind.ConfirmUpdate();'>";
|
||||
echo '<br/><iframe id="tempIframeForUpdate" style="display:none;"></iframe>';
|
||||
echo '</center>';
|
||||
exit;
|
||||
}
|
||||
if($updated)
|
||||
{
|
||||
$localCurrent->data->lastUpdate['value']= time();
|
||||
@@ -101,7 +147,7 @@
|
||||
?>
|
||||
<div style='border:solid 1px #666;padding:20px;margin:8px; background-color:#cfc;color:#393;font-weight:bold;'>
|
||||
<img src='<?php echo $_MIND['imageDir'].'/'; ?>visto.png' />
|
||||
theWebMind 2.0 has just been updated to its latest version, <?php echo implode('.', $curVs); ?>
|
||||
<b>theWebMind</b> has just been updated to its latest version, <?php echo implode('.', $curVs); ?>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>
|
||||
@@ -113,17 +159,6 @@
|
||||
?>
|
||||
</pre>
|
||||
</fieldset>
|
||||
<div style='tet-align:left;
|
||||
height:100px;
|
||||
overflow:auto;'>
|
||||
Changed files:<br/>
|
||||
<?php
|
||||
for($i=0, $j=sizeof($changedFiles); $i<$j;$i++)
|
||||
{
|
||||
echo $changedFiles[$i].'<br/>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Main Controller
|
||||
* @filesource
|
||||
* @author Jaydson Gomes
|
||||
* @author Felipe Nascimento
|
||||
* @copyright TheWebMind.org
|
||||
* @package Hello
|
||||
* @subpackage Hello.application.controllers
|
||||
* @version 1.0
|
||||
*/
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the home page
|
||||
* @return void
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$view = Zend_Registry::get('view');
|
||||
$view->assign('header','pageHeader.phtml');
|
||||
$view->assign('body','index/bodyindex.phtml');
|
||||
$view->assign('footer','pageFooter.phtml');
|
||||
$this->_response->setBody($view->render('default.phtml'));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Main Controller
|
||||
* @filesource
|
||||
* @author Jaydson Gomes
|
||||
* @author Felipe Nascimento
|
||||
* @copyright TheWebMind.org
|
||||
* @package Hello
|
||||
* @subpackage Hello.application.controllers
|
||||
* @version 1.0
|
||||
*/
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the home page
|
||||
* @return void
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$view = Zend_Registry::get('view');
|
||||
$view->assign('header','pageHeader.phtml');
|
||||
$view->assign('body','index/bodyindex.phtml');
|
||||
$view->assign('footer','pageFooter.phtml');
|
||||
$this->_response->setBody($view->render('default.phtml'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
Copyright (c) 2010 TheWebMind.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
Copyright (c) 2010 TheWebMind.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RewriteEngine on
|
||||
RewriteRule .* index.php
|
||||
php_flag magic_quotes_gpc off
|
||||
php_flag register_globals off
|
||||
RewriteEngine on
|
||||
RewriteRule .* index.php
|
||||
php_flag magic_quotes_gpc off
|
||||
php_flag register_globals off
|
||||
|
||||
+30
-30
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Main Controller
|
||||
* @filesource
|
||||
* @author Jaydson Gomes
|
||||
* @author Felipe Nascimento
|
||||
* @copyright TheWebMind.org
|
||||
* @package Hello
|
||||
* @subpackage Hello.application.controllers
|
||||
* @version 1.0
|
||||
*/
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the home page
|
||||
* @return void
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$view = Zend_Registry::get('view');
|
||||
$view->assign('header','pageHeader.phtml');
|
||||
$view->assign('body','index/bodyindex.phtml');
|
||||
$view->assign('footer','pageFooter.phtml');
|
||||
$this->_response->setBody($view->render('default.phtml'));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Main Controller
|
||||
* @filesource
|
||||
* @author Jaydson Gomes
|
||||
* @author Felipe Nascimento
|
||||
* @copyright TheWebMind.org
|
||||
* @package Hello
|
||||
* @subpackage Hello.application.controllers
|
||||
* @version 1.0
|
||||
*/
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the home page
|
||||
* @return void
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$view = Zend_Registry::get('view');
|
||||
$view->assign('header','pageHeader.phtml');
|
||||
$view->assign('body','index/bodyindex.phtml');
|
||||
$view->assign('footer','pageFooter.phtml');
|
||||
$this->_response->setBody($view->render('default.phtml'));
|
||||
}
|
||||
}
|
||||
|
||||
+19
-19
@@ -1,20 +1,20 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo PROJECT_NAME; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo PATH_APPLICATION; ?>/public/styles/zend.generic.css" />
|
||||
<link rel="stylesheet" href="<?php echo PATH_APPLICATION; ?>/public/styles/jquery.treeview.css" />
|
||||
<link rel="stylesheet" href="<?php echo PATH_APPLICATION; ?>/public/styles/ui-lightness/jquery-ui-1.8rc1.custom.css" />
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery-ui-1.8rc1.custom.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery.maskedinput-1.2.2.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery.treeview.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/default.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $this->render($this->header); ?>
|
||||
<div id="container">
|
||||
|
||||
<?php echo $this->render($this->body); ?>
|
||||
</div>
|
||||
</body>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo PROJECT_NAME; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo PATH_APPLICATION; ?>/public/styles/zend.generic.css" />
|
||||
<link rel="stylesheet" href="<?php echo PATH_APPLICATION; ?>/public/styles/jquery.treeview.css" />
|
||||
<link rel="stylesheet" href="<?php echo PATH_APPLICATION; ?>/public/styles/ui-lightness/jquery-ui-1.8rc1.custom.css" />
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery-ui-1.8rc1.custom.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery.maskedinput-1.2.2.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/jquery.treeview.js" type="text/javascript"></script>
|
||||
<script src="<?php echo PATH_APPLICATION; ?>/public/scripts/default.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $this->render($this->header); ?>
|
||||
<div id="container">
|
||||
|
||||
<?php echo $this->render($this->body); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
<div id="footer">
|
||||
<div id="logomarca_maker">
|
||||
Footer
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="logomarca_maker">
|
||||
Footer
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,132 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* Bootstrap
|
||||
* @filesource
|
||||
* @author Jaydson Gomes
|
||||
* @author Felipe Nascimento
|
||||
* @copyright TheWebMind.org
|
||||
* @package Hello
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Errors message.
|
||||
*/
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
/**
|
||||
* Operantig System detector
|
||||
* Credits to this Bootstrap file go to Flavio Gomes da Silva Lisboa (http://www.fgsl.eti.br)
|
||||
*/
|
||||
|
||||
define('PROJECT_NAME', '<projectName>');
|
||||
|
||||
$operatingSystem = stripos($_SERVER['SERVER_SOFTWARE'],'win32')!== FALSE ? 'WINDOWS' : 'LINUX';
|
||||
$bar = $operatingSystem == 'WINDOWS' ? '\\' : '/' ;
|
||||
$pathSeparator = $operatingSystem == 'WINDOWS' ? ';' : ':' ;
|
||||
$documentRoot = $operatingSystem == 'WINDOWS' ? str_replace('/','\\',$_SERVER['DOCUMENT_ROOT']) : $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
/**
|
||||
* Path configuration
|
||||
*/
|
||||
define ('PATH_APPLICATION', substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/index.php')));
|
||||
$path = $pathSeparator.$documentRoot.$bar.'library';
|
||||
$path .= $pathSeparator.$documentRoot.$bar.PATH_APPLICATION.$bar.'application'.$bar.'models';
|
||||
set_include_path(get_include_path().$path);
|
||||
|
||||
/**
|
||||
* Include Component Zend_Loader
|
||||
*/
|
||||
include('Zend/Loader.php');
|
||||
|
||||
/**
|
||||
* Include Zend Registry
|
||||
*/
|
||||
Zend_Loader::loadClass('Zend_Registry');
|
||||
|
||||
/**
|
||||
* Include Zend Session
|
||||
*/
|
||||
Zend_Loader::loadClass('Zend_Session');
|
||||
|
||||
/**
|
||||
* LoadClass
|
||||
*/
|
||||
Zend_Loader::loadClass('Zend_Controller_Front'); /** Controllers */
|
||||
Zend_Loader::loadClass('Zend_View'); /** Views */
|
||||
Zend_Loader::loadClass('Zend_Config_Ini'); /** Config */
|
||||
Zend_Loader::loadClass('Zend_Db'); /** Db */
|
||||
Zend_Loader::loadClass('Zend_Db_Table'); /** Tables */
|
||||
Zend_Loader::loadClass('Zend_Filter_Input'); /** Filter */
|
||||
Zend_Loader::loadClass('Zend_Session'); /** Sesssion */
|
||||
Zend_Loader::loadClass('Zend_Session_Namespace'); /** Session Namespace */
|
||||
|
||||
/**
|
||||
* O método set é responsável por armazenar variáveis que podem ser usadas
|
||||
* Store variables and Filter
|
||||
*/
|
||||
Zend_Registry::set('post', new Zend_Filter_Input(NULL,NULL,$_POST));
|
||||
Zend_Registry::set('get', new Zend_Filter_Input(NULL,NULL,$_GET));
|
||||
|
||||
/** Views */
|
||||
|
||||
/** New object View */
|
||||
$view = new Zend_View();
|
||||
|
||||
/** Encoding */
|
||||
$view->setEncoding('UTF-8');
|
||||
$view->setEscape('htmlentities');
|
||||
|
||||
/** Views path */
|
||||
$view->setBasePath('./application/views/');
|
||||
|
||||
/** Register the view variable */
|
||||
Zend_Registry::set('view', $view);
|
||||
|
||||
/** Session Init */
|
||||
Zend_Session::start();
|
||||
|
||||
/** Session Handler */
|
||||
Zend_Registry::set('session',new Zend_Session_Namespace());
|
||||
|
||||
/**
|
||||
* Project Controller.
|
||||
*/
|
||||
$baseUrl = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/index.php'));
|
||||
|
||||
/** New instance of controller class */
|
||||
$frontController = Zend_Controller_Front::getInstance();
|
||||
|
||||
/** Address configuration */
|
||||
$frontController->setbaseUrl($baseUrl);
|
||||
|
||||
/** Controllers dir */
|
||||
$frontController->setControllerDirectory('./application/controllers');
|
||||
|
||||
/** Exceptions */
|
||||
$frontController->throwExceptions(TRUE);
|
||||
|
||||
/**
|
||||
* Database configuration
|
||||
*/
|
||||
$config = new Zend_Config_Ini('./application/config.ini', 'database');
|
||||
|
||||
/** Register variable config */
|
||||
Zend_Registry::set('config', $config);
|
||||
|
||||
/**
|
||||
* Database Connection Configuration
|
||||
*/
|
||||
$db = Zend_Db::factory($config->db->adapter, $config->db->config->toArray());
|
||||
Zend_Db_Table_Abstract::setDefaultAdapter($db);
|
||||
|
||||
/** Register variable db */
|
||||
Zend_Registry::set('db', $db);
|
||||
|
||||
/** Monetary */
|
||||
setlocale(LC_MONETARY,'ptb');
|
||||
|
||||
/**
|
||||
* Dispatch
|
||||
*/
|
||||
<?php
|
||||
/**
|
||||
* Bootstrap
|
||||
* @filesource
|
||||
* @author Jaydson Gomes
|
||||
* @author Felipe Nascimento
|
||||
* @copyright TheWebMind.org
|
||||
* @package Hello
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Errors message.
|
||||
*/
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
/**
|
||||
* Operantig System detector
|
||||
* Credits to this Bootstrap file go to Flavio Gomes da Silva Lisboa (http://www.fgsl.eti.br)
|
||||
*/
|
||||
|
||||
define('PROJECT_NAME', '<projectName>');
|
||||
|
||||
$operatingSystem = stripos($_SERVER['SERVER_SOFTWARE'],'win32')!== FALSE ? 'WINDOWS' : 'LINUX';
|
||||
$bar = $operatingSystem == 'WINDOWS' ? '\\' : '/' ;
|
||||
$pathSeparator = $operatingSystem == 'WINDOWS' ? ';' : ':' ;
|
||||
$documentRoot = $operatingSystem == 'WINDOWS' ? str_replace('/','\\',$_SERVER['DOCUMENT_ROOT']) : $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
/**
|
||||
* Path configuration
|
||||
*/
|
||||
define ('PATH_APPLICATION', substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/index.php')));
|
||||
$path = $pathSeparator.$documentRoot.$bar.'library';
|
||||
$path .= $pathSeparator.$documentRoot.$bar.PATH_APPLICATION.$bar.'application'.$bar.'models';
|
||||
set_include_path(get_include_path().$path);
|
||||
|
||||
/**
|
||||
* Include Component Zend_Loader
|
||||
*/
|
||||
include('Zend/Loader.php');
|
||||
|
||||
/**
|
||||
* Include Zend Registry
|
||||
*/
|
||||
Zend_Loader::loadClass('Zend_Registry');
|
||||
|
||||
/**
|
||||
* Include Zend Session
|
||||
*/
|
||||
Zend_Loader::loadClass('Zend_Session');
|
||||
|
||||
/**
|
||||
* LoadClass
|
||||
*/
|
||||
Zend_Loader::loadClass('Zend_Controller_Front'); /** Controllers */
|
||||
Zend_Loader::loadClass('Zend_View'); /** Views */
|
||||
Zend_Loader::loadClass('Zend_Config_Ini'); /** Config */
|
||||
Zend_Loader::loadClass('Zend_Db'); /** Db */
|
||||
Zend_Loader::loadClass('Zend_Db_Table'); /** Tables */
|
||||
Zend_Loader::loadClass('Zend_Filter_Input'); /** Filter */
|
||||
Zend_Loader::loadClass('Zend_Session'); /** Sesssion */
|
||||
Zend_Loader::loadClass('Zend_Session_Namespace'); /** Session Namespace */
|
||||
|
||||
/**
|
||||
* O método set é responsável por armazenar variáveis que podem ser usadas
|
||||
* Store variables and Filter
|
||||
*/
|
||||
Zend_Registry::set('post', new Zend_Filter_Input(NULL,NULL,$_POST));
|
||||
Zend_Registry::set('get', new Zend_Filter_Input(NULL,NULL,$_GET));
|
||||
|
||||
/** Views */
|
||||
|
||||
/** New object View */
|
||||
$view = new Zend_View();
|
||||
|
||||
/** Encoding */
|
||||
$view->setEncoding('UTF-8');
|
||||
$view->setEscape('htmlentities');
|
||||
|
||||
/** Views path */
|
||||
$view->setBasePath('./application/views/');
|
||||
|
||||
/** Register the view variable */
|
||||
Zend_Registry::set('view', $view);
|
||||
|
||||
/** Session Init */
|
||||
Zend_Session::start();
|
||||
|
||||
/** Session Handler */
|
||||
Zend_Registry::set('session',new Zend_Session_Namespace());
|
||||
|
||||
/**
|
||||
* Project Controller.
|
||||
*/
|
||||
$baseUrl = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/index.php'));
|
||||
|
||||
/** New instance of controller class */
|
||||
$frontController = Zend_Controller_Front::getInstance();
|
||||
|
||||
/** Address configuration */
|
||||
$frontController->setbaseUrl($baseUrl);
|
||||
|
||||
/** Controllers dir */
|
||||
$frontController->setControllerDirectory('./application/controllers');
|
||||
|
||||
/** Exceptions */
|
||||
$frontController->throwExceptions(TRUE);
|
||||
|
||||
/**
|
||||
* Database configuration
|
||||
*/
|
||||
$config = new Zend_Config_Ini('./application/config.ini', 'database');
|
||||
|
||||
/** Register variable config */
|
||||
Zend_Registry::set('config', $config);
|
||||
|
||||
/**
|
||||
* Database Connection Configuration
|
||||
*/
|
||||
$db = Zend_Db::factory($config->db->adapter, $config->db->config->toArray());
|
||||
Zend_Db_Table_Abstract::setDefaultAdapter($db);
|
||||
|
||||
/** Register variable db */
|
||||
Zend_Registry::set('db', $db);
|
||||
|
||||
/** Monetary */
|
||||
setlocale(LC_MONETARY,'ptb');
|
||||
|
||||
/**
|
||||
* Dispatch
|
||||
*/
|
||||
$frontController->dispatch();
|
||||
@@ -1,10 +1,10 @@
|
||||
$(document).ready(function(){
|
||||
$("#navigation").treeview({
|
||||
persist: "location",
|
||||
collapsed: true,
|
||||
unique: true
|
||||
});
|
||||
|
||||
$("#browser").treeview();
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#navigation").treeview({
|
||||
persist: "location",
|
||||
collapsed: true,
|
||||
unique: true
|
||||
});
|
||||
|
||||
$("#browser").treeview();
|
||||
|
||||
});
|
||||
+138
-138
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+6
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Masked Input plugin for jQuery
|
||||
Copyright (c) 2007-2009 Josh Bush (digitalbush.com)
|
||||
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||
Version: 1.2.2 (03/09/2009 22:39:06)
|
||||
*/
|
||||
/*
|
||||
Masked Input plugin for jQuery
|
||||
Copyright (c) 2007-2009 Josh Bush (digitalbush.com)
|
||||
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||
Version: 1.2.2 (03/09/2009 22:39:06)
|
||||
*/
|
||||
(function(a){var c=(a.browser.msie?"paste":"input")+".mask";var b=(window.orientation!=undefined);a.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"}};a.fn.extend({caret:function(e,f){if(this.length==0){return}if(typeof e=="number"){f=(typeof f=="number")?f:e;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(e,f)}else{if(this.createTextRange){var g=this.createTextRange();g.collapse(true);g.moveEnd("character",f);g.moveStart("character",e);g.select()}}})}else{if(this[0].setSelectionRange){e=this[0].selectionStart;f=this[0].selectionEnd}else{if(document.selection&&document.selection.createRange){var d=document.selection.createRange();e=0-d.duplicate().moveStart("character",-100000);f=e+d.text.length}}return{begin:e,end:f}}},unmask:function(){return this.trigger("unmask")},mask:function(j,d){if(!j&&this.length>0){var f=a(this[0]);var g=f.data("tests");return a.map(f.data("buffer"),function(l,m){return g[m]?l:null}).join("")}d=a.extend({placeholder:"_",completed:null},d);var k=a.mask.definitions;var g=[];var e=j.length;var i=null;var h=j.length;a.each(j.split(""),function(m,l){if(l=="?"){h--;e=m}else{if(k[l]){g.push(new RegExp(k[l]));if(i==null){i=g.length-1}}else{g.push(null)}}});return this.each(function(){var r=a(this);var m=a.map(j.split(""),function(x,y){if(x!="?"){return k[x]?d.placeholder:x}});var n=false;var q=r.val();r.data("buffer",m).data("tests",g);function v(x){while(++x<=h&&!g[x]){}return x}function t(x){while(!g[x]&&--x>=0){}for(var y=x;y<h;y++){if(g[y]){m[y]=d.placeholder;var z=v(y);if(z<h&&g[y].test(m[z])){m[y]=m[z]}else{break}}}s();r.caret(Math.max(i,x))}function u(y){for(var A=y,z=d.placeholder;A<h;A++){if(g[A]){var B=v(A);var x=m[A];m[A]=z;if(B<h&&g[B].test(x)){z=x}else{break}}}}function l(y){var x=a(this).caret();var z=y.keyCode;n=(z<16||(z>16&&z<32)||(z>32&&z<41));if((x.begin-x.end)!=0&&(!n||z==8||z==46)){w(x.begin,x.end)}if(z==8||z==46||(b&&z==127)){t(x.begin+(z==46?0:-1));return false}else{if(z==27){r.val(q);r.caret(0,p());return false}}}function o(B){if(n){n=false;return(B.keyCode==8)?false:null}B=B||window.event;var C=B.charCode||B.keyCode||B.which;var z=a(this).caret();if(B.ctrlKey||B.altKey||B.metaKey){return true}else{if((C>=32&&C<=125)||C>186){var x=v(z.begin-1);if(x<h){var A=String.fromCharCode(C);if(g[x].test(A)){u(x);m[x]=A;s();var y=v(x);a(this).caret(y);if(d.completed&&y==h){d.completed.call(r)}}}}}return false}function w(x,y){for(var z=x;z<y&&z<h;z++){if(g[z]){m[z]=d.placeholder}}}function s(){return r.val(m.join("")).val()}function p(y){var z=r.val();var C=-1;for(var B=0,x=0;B<h;B++){if(g[B]){m[B]=d.placeholder;while(x++<z.length){var A=z.charAt(x-1);if(g[B].test(A)){m[B]=A;C=B;break}}if(x>z.length){break}}else{if(m[B]==z[x]&&B!=e){x++;C=B}}}if(!y&&C+1<e){r.val("");w(0,h)}else{if(y||C+1>=e){s();if(!y){r.val(r.val().substring(0,C+1))}}}return(e?B:i)}if(!r.attr("readonly")){r.one("unmask",function(){r.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){q=r.val();var x=p();s();setTimeout(function(){if(x==j.length){r.caret(0,x)}else{r.caret(x)}},0)}).bind("blur.mask",function(){p();if(r.val()!=q){r.change()}}).bind("keydown.mask",l).bind("keypress.mask",o).bind(c,function(){setTimeout(function(){r.caret(p(true))},0)})}p()})}})})(jQuery);
|
||||
+58
-58
@@ -1,68 +1,68 @@
|
||||
.treeview, .treeview ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
.treeview, .treeview ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.treeview ul {
|
||||
background-color: white;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.treeview .hitarea {
|
||||
background: url(../images/treeview-default.gif) -64px -25px no-repeat;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
margin-left: -16px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* fix for IE6 */
|
||||
* html .hitarea {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.treeview .hitarea {
|
||||
background: url(../images/treeview-default.gif) -64px -25px no-repeat;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
margin-left: -16px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* fix for IE6 */
|
||||
* html .hitarea {
|
||||
display: inline;
|
||||
float:none;
|
||||
}
|
||||
|
||||
.treeview li {
|
||||
margin: 0;
|
||||
padding: 3px 0pt 3px 16px;
|
||||
}
|
||||
|
||||
.treeview a.selected {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#treecontrol { margin: 1em 0; display: none; }
|
||||
|
||||
.treeview .hover { color: red; cursor: pointer; }
|
||||
|
||||
.treeview li { background: url(../images/treeview-default-line.gif) 0 0 no-repeat; }
|
||||
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
|
||||
|
||||
.treeview .expandable-hitarea { background-position: -80px -3px; }
|
||||
|
||||
.treeview li.last { background-position: 0 -1766px }
|
||||
}
|
||||
|
||||
.treeview li {
|
||||
margin: 0;
|
||||
padding: 3px 0pt 3px 16px;
|
||||
}
|
||||
|
||||
.treeview a.selected {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#treecontrol { margin: 1em 0; display: none; }
|
||||
|
||||
.treeview .hover { color: red; cursor: pointer; }
|
||||
|
||||
.treeview li { background: url(../images/treeview-default-line.gif) 0 0 no-repeat; }
|
||||
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
|
||||
|
||||
.treeview .expandable-hitarea { background-position: -80px -3px; }
|
||||
|
||||
.treeview li.last { background-position: 0 -1766px }
|
||||
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(../images/treeview-default.gif); }
|
||||
.treeview li.lastCollapsable { background-position: 0 -111px }
|
||||
.treeview li.lastExpandable { background-position: -32px -67px }
|
||||
|
||||
.treeview li.lastExpandable { background-position: -32px -67px }
|
||||
|
||||
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
|
||||
|
||||
.treeview-red li { background-image: url(../images/treeview-red-line.gif); }
|
||||
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(../images/treeview-red.gif); }
|
||||
|
||||
.treeview-black li { background-image: url(../images/treeview-black-line.gif); }
|
||||
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(../images/treeview-black.gif); }
|
||||
|
||||
.treeview-gray li { background-image: url(../images/treeview-gray-line.gif); }
|
||||
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(../images/treeview-gray.gif); }
|
||||
|
||||
.treeview-famfamfam li { background-image: url(../images/treeview-famfamfam-line.gif); }
|
||||
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(../images/treeview-famfamfam.gif); }
|
||||
|
||||
|
||||
.filetree li { padding: 3px 0 2px 16px; }
|
||||
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
|
||||
.filetree span.folder { background: url(../images/folder.gif) 0 0 no-repeat; }
|
||||
.filetree li.expandable span.folder { background: url(../images/folder-closed.gif) 0 0 no-repeat; }
|
||||
.filetree span.file { background: url(../images/file.gif) 0 0 no-repeat; }
|
||||
|
||||
.treeview-red li { background-image: url(../images/treeview-red-line.gif); }
|
||||
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(../images/treeview-red.gif); }
|
||||
|
||||
.treeview-black li { background-image: url(../images/treeview-black-line.gif); }
|
||||
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(../images/treeview-black.gif); }
|
||||
|
||||
.treeview-gray li { background-image: url(../images/treeview-gray-line.gif); }
|
||||
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(../images/treeview-gray.gif); }
|
||||
|
||||
.treeview-famfamfam li { background-image: url(../images/treeview-famfamfam-line.gif); }
|
||||
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(../images/treeview-famfamfam.gif); }
|
||||
|
||||
|
||||
.filetree li { padding: 3px 0 2px 16px; }
|
||||
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
|
||||
.filetree span.folder { background: url(../images/folder.gif) 0 0 no-repeat; }
|
||||
.filetree li.expandable span.folder { background: url(../images/folder-closed.gif) 0 0 no-repeat; }
|
||||
.filetree span.file { background: url(../images/file.gif) 0 0 no-repeat; }
|
||||
|
||||
+43
-43
@@ -1,44 +1,44 @@
|
||||
|
||||
body{
|
||||
font-family:"frutiger linotype","lucida grande",helvetica,arial,sans-serif;
|
||||
color:#333;
|
||||
font-size: 76%;
|
||||
}
|
||||
|
||||
|
||||
#container{
|
||||
font-family:arial;
|
||||
font-size:18px;
|
||||
float:left;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#header{
|
||||
margin-top:15px;
|
||||
height:50px;
|
||||
font-size:22px;
|
||||
border-bottom:1px solid black;
|
||||
text-align:center;
|
||||
|
||||
}
|
||||
|
||||
.menu{
|
||||
float:left;
|
||||
padding:12px;
|
||||
width:150px;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#content{
|
||||
clear:both;
|
||||
background-color: #ffffff;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#footer{
|
||||
border:1px solid black;
|
||||
}
|
||||
|
||||
#warning {
|
||||
color : red;
|
||||
|
||||
body{
|
||||
font-family:"frutiger linotype","lucida grande",helvetica,arial,sans-serif;
|
||||
color:#333;
|
||||
font-size: 76%;
|
||||
}
|
||||
|
||||
|
||||
#container{
|
||||
font-family:arial;
|
||||
font-size:18px;
|
||||
float:left;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#header{
|
||||
margin-top:15px;
|
||||
height:50px;
|
||||
font-size:22px;
|
||||
border-bottom:1px solid black;
|
||||
text-align:center;
|
||||
|
||||
}
|
||||
|
||||
.menu{
|
||||
float:left;
|
||||
padding:12px;
|
||||
width:150px;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#content{
|
||||
clear:both;
|
||||
background-color: #ffffff;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#footer{
|
||||
border:1px solid black;
|
||||
}
|
||||
|
||||
#warning {
|
||||
color : red;
|
||||
}
|
||||
@@ -1,183 +1,183 @@
|
||||
<?php
|
||||
/**
|
||||
* Helper functions to convert between ADODB recordset objects and XMLRPC values.
|
||||
* Uses John Lim's AdoDB and Edd Dumbill's phpxmlrpc libs
|
||||
*
|
||||
* @author Daniele Baroncelli
|
||||
* @author Gaetano Giunta
|
||||
* @copyright (c) 2003-2004 Giunta/Baroncelli. All rights reserved.
|
||||
*
|
||||
* @todo some more error checking here and there
|
||||
* @todo document the xmlrpc-struct used to encode recordset info
|
||||
* @todo verify if using xmlrpc_encode($rs->GetArray()) would work with:
|
||||
* - ADODB_FETCH_BOTH
|
||||
* - null values
|
||||
*/
|
||||
|
||||
/**
|
||||
* Include the main libraries
|
||||
*/
|
||||
require_once('xmlrpc.inc');
|
||||
if (!defined('ADODB_DIR')) require_once('adodb.inc.php');
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value out of an AdoDB recordset
|
||||
*/
|
||||
function rs2xmlrpcval(&$adodbrs) {
|
||||
|
||||
$header = rs2xmlrpcval_header($adodbrs);
|
||||
$body = rs2xmlrpcval_body($adodbrs);
|
||||
|
||||
// put it all together and build final xmlrpc struct
|
||||
$xmlrpcrs = new xmlrpcval ( array(
|
||||
"header" => $header,
|
||||
"body" => $body,
|
||||
), "struct");
|
||||
|
||||
return $xmlrpcrs;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value describing an AdoDB recordset
|
||||
*/
|
||||
function rs2xmlrpcval_header($adodbrs)
|
||||
{
|
||||
$numfields = $adodbrs->FieldCount();
|
||||
$numrecords = $adodbrs->RecordCount();
|
||||
|
||||
// build structure holding recordset information
|
||||
$fieldstruct = array();
|
||||
for ($i = 0; $i < $numfields; $i++) {
|
||||
$fld = $adodbrs->FetchField($i);
|
||||
$fieldarray = array();
|
||||
if (isset($fld->name))
|
||||
$fieldarray["name"] = new xmlrpcval ($fld->name);
|
||||
if (isset($fld->type))
|
||||
$fieldarray["type"] = new xmlrpcval ($fld->type);
|
||||
if (isset($fld->max_length))
|
||||
$fieldarray["max_length"] = new xmlrpcval ($fld->max_length, "int");
|
||||
if (isset($fld->not_null))
|
||||
$fieldarray["not_null"] = new xmlrpcval ($fld->not_null, "boolean");
|
||||
if (isset($fld->has_default))
|
||||
$fieldarray["has_default"] = new xmlrpcval ($fld->has_default, "boolean");
|
||||
if (isset($fld->default_value))
|
||||
$fieldarray["default_value"] = new xmlrpcval ($fld->default_value);
|
||||
$fieldstruct[$i] = new xmlrpcval ($fieldarray, "struct");
|
||||
}
|
||||
$fieldcount = new xmlrpcval ($numfields, "int");
|
||||
$recordcount = new xmlrpcval ($numrecords, "int");
|
||||
$sql = new xmlrpcval ($adodbrs->sql);
|
||||
$fieldinfo = new xmlrpcval ($fieldstruct, "array");
|
||||
|
||||
$header = new xmlrpcval ( array(
|
||||
"fieldcount" => $fieldcount,
|
||||
"recordcount" => $recordcount,
|
||||
"sql" => $sql,
|
||||
"fieldinfo" => $fieldinfo
|
||||
), "struct");
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value out of an AdoDB recordset
|
||||
* (data values only, no data definition)
|
||||
*/
|
||||
function rs2xmlrpcval_body($adodbrs)
|
||||
{
|
||||
$numfields = $adodbrs->FieldCount();
|
||||
|
||||
// build structure containing recordset data
|
||||
$adodbrs->MoveFirst();
|
||||
$rows = array();
|
||||
while (!$adodbrs->EOF) {
|
||||
$columns = array();
|
||||
// This should work on all cases of fetch mode: assoc, num, both or default
|
||||
if ($adodbrs->fetchMode == 'ADODB_FETCH_BOTH' || count($adodbrs->fields) == 2 * $adodbrs->FieldCount())
|
||||
for ($i = 0; $i < $numfields; $i++)
|
||||
if ($adodbrs->fields[$i] === null)
|
||||
$columns[$i] = new xmlrpcval ('');
|
||||
else
|
||||
$columns[$i] = xmlrpc_encode ($adodbrs->fields[$i]);
|
||||
else
|
||||
foreach ($adodbrs->fields as $val)
|
||||
if ($val === null)
|
||||
$columns[] = new xmlrpcval ('');
|
||||
else
|
||||
$columns[] = xmlrpc_encode ($val);
|
||||
|
||||
$rows[] = new xmlrpcval ($columns, "array");
|
||||
|
||||
$adodbrs->MoveNext();
|
||||
}
|
||||
$body = new xmlrpcval ($rows, "array");
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an xmlrpc struct value as string out of an AdoDB recordset
|
||||
*/
|
||||
function rs2xmlrpcstring (&$adodbrs) {
|
||||
$xmlrpc = rs2xmlrpcval ($adodbrs);
|
||||
if ($xmlrpc)
|
||||
return $xmlrpc->serialize();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a well-formed xmlrpc struct object returns an AdoDB object
|
||||
*
|
||||
* @todo add some error checking on the input value
|
||||
*/
|
||||
function xmlrpcval2rs (&$xmlrpcval) {
|
||||
|
||||
$fields_array = array();
|
||||
$data_array = array();
|
||||
|
||||
// rebuild column information
|
||||
$header = $xmlrpcval->structmem('header');
|
||||
|
||||
$numfields = $header->structmem('fieldcount');
|
||||
$numfields = $numfields->scalarval();
|
||||
$numrecords = $header->structmem('recordcount');
|
||||
$numrecords = $numrecords->scalarval();
|
||||
$sqlstring = $header->structmem('sql');
|
||||
$sqlstring = $sqlstring->scalarval();
|
||||
|
||||
$fieldinfo = $header->structmem('fieldinfo');
|
||||
for ($i = 0; $i < $numfields; $i++) {
|
||||
$temp = $fieldinfo->arraymem($i);
|
||||
$fld = new ADOFieldObject();
|
||||
while (list($key,$value) = $temp->structeach()) {
|
||||
if ($key == "name") $fld->name = $value->scalarval();
|
||||
if ($key == "type") $fld->type = $value->scalarval();
|
||||
if ($key == "max_length") $fld->max_length = $value->scalarval();
|
||||
if ($key == "not_null") $fld->not_null = $value->scalarval();
|
||||
if ($key == "has_default") $fld->has_default = $value->scalarval();
|
||||
if ($key == "default_value") $fld->default_value = $value->scalarval();
|
||||
} // while
|
||||
$fields_array[] = $fld;
|
||||
} // for
|
||||
|
||||
// fetch recordset information into php array
|
||||
$body = $xmlrpcval->structmem('body');
|
||||
for ($i = 0; $i < $numrecords; $i++) {
|
||||
$data_array[$i]= array();
|
||||
$xmlrpcrs_row = $body->arraymem($i);
|
||||
for ($j = 0; $j < $numfields; $j++) {
|
||||
$temp = $xmlrpcrs_row->arraymem($j);
|
||||
$data_array[$i][$j] = $temp->scalarval();
|
||||
} // for j
|
||||
} // for i
|
||||
|
||||
// finally build in-memory recordset object and return it
|
||||
$rs = new ADORecordSet_array();
|
||||
$rs->InitArrayFields($data_array,$fields_array);
|
||||
return $rs;
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Helper functions to convert between ADODB recordset objects and XMLRPC values.
|
||||
* Uses John Lim's AdoDB and Edd Dumbill's phpxmlrpc libs
|
||||
*
|
||||
* @author Daniele Baroncelli
|
||||
* @author Gaetano Giunta
|
||||
* @copyright (c) 2003-2004 Giunta/Baroncelli. All rights reserved.
|
||||
*
|
||||
* @todo some more error checking here and there
|
||||
* @todo document the xmlrpc-struct used to encode recordset info
|
||||
* @todo verify if using xmlrpc_encode($rs->GetArray()) would work with:
|
||||
* - ADODB_FETCH_BOTH
|
||||
* - null values
|
||||
*/
|
||||
|
||||
/**
|
||||
* Include the main libraries
|
||||
*/
|
||||
require_once('xmlrpc.inc');
|
||||
if (!defined('ADODB_DIR')) require_once('adodb.inc.php');
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value out of an AdoDB recordset
|
||||
*/
|
||||
function rs2xmlrpcval(&$adodbrs) {
|
||||
|
||||
$header = rs2xmlrpcval_header($adodbrs);
|
||||
$body = rs2xmlrpcval_body($adodbrs);
|
||||
|
||||
// put it all together and build final xmlrpc struct
|
||||
$xmlrpcrs = new xmlrpcval ( array(
|
||||
"header" => $header,
|
||||
"body" => $body,
|
||||
), "struct");
|
||||
|
||||
return $xmlrpcrs;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value describing an AdoDB recordset
|
||||
*/
|
||||
function rs2xmlrpcval_header($adodbrs)
|
||||
{
|
||||
$numfields = $adodbrs->FieldCount();
|
||||
$numrecords = $adodbrs->RecordCount();
|
||||
|
||||
// build structure holding recordset information
|
||||
$fieldstruct = array();
|
||||
for ($i = 0; $i < $numfields; $i++) {
|
||||
$fld = $adodbrs->FetchField($i);
|
||||
$fieldarray = array();
|
||||
if (isset($fld->name))
|
||||
$fieldarray["name"] = new xmlrpcval ($fld->name);
|
||||
if (isset($fld->type))
|
||||
$fieldarray["type"] = new xmlrpcval ($fld->type);
|
||||
if (isset($fld->max_length))
|
||||
$fieldarray["max_length"] = new xmlrpcval ($fld->max_length, "int");
|
||||
if (isset($fld->not_null))
|
||||
$fieldarray["not_null"] = new xmlrpcval ($fld->not_null, "boolean");
|
||||
if (isset($fld->has_default))
|
||||
$fieldarray["has_default"] = new xmlrpcval ($fld->has_default, "boolean");
|
||||
if (isset($fld->default_value))
|
||||
$fieldarray["default_value"] = new xmlrpcval ($fld->default_value);
|
||||
$fieldstruct[$i] = new xmlrpcval ($fieldarray, "struct");
|
||||
}
|
||||
$fieldcount = new xmlrpcval ($numfields, "int");
|
||||
$recordcount = new xmlrpcval ($numrecords, "int");
|
||||
$sql = new xmlrpcval ($adodbrs->sql);
|
||||
$fieldinfo = new xmlrpcval ($fieldstruct, "array");
|
||||
|
||||
$header = new xmlrpcval ( array(
|
||||
"fieldcount" => $fieldcount,
|
||||
"recordcount" => $recordcount,
|
||||
"sql" => $sql,
|
||||
"fieldinfo" => $fieldinfo
|
||||
), "struct");
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value out of an AdoDB recordset
|
||||
* (data values only, no data definition)
|
||||
*/
|
||||
function rs2xmlrpcval_body($adodbrs)
|
||||
{
|
||||
$numfields = $adodbrs->FieldCount();
|
||||
|
||||
// build structure containing recordset data
|
||||
$adodbrs->MoveFirst();
|
||||
$rows = array();
|
||||
while (!$adodbrs->EOF) {
|
||||
$columns = array();
|
||||
// This should work on all cases of fetch mode: assoc, num, both or default
|
||||
if ($adodbrs->fetchMode == 'ADODB_FETCH_BOTH' || count($adodbrs->fields) == 2 * $adodbrs->FieldCount())
|
||||
for ($i = 0; $i < $numfields; $i++)
|
||||
if ($adodbrs->fields[$i] === null)
|
||||
$columns[$i] = new xmlrpcval ('');
|
||||
else
|
||||
$columns[$i] = xmlrpc_encode ($adodbrs->fields[$i]);
|
||||
else
|
||||
foreach ($adodbrs->fields as $val)
|
||||
if ($val === null)
|
||||
$columns[] = new xmlrpcval ('');
|
||||
else
|
||||
$columns[] = xmlrpc_encode ($val);
|
||||
|
||||
$rows[] = new xmlrpcval ($columns, "array");
|
||||
|
||||
$adodbrs->MoveNext();
|
||||
}
|
||||
$body = new xmlrpcval ($rows, "array");
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an xmlrpc struct value as string out of an AdoDB recordset
|
||||
*/
|
||||
function rs2xmlrpcstring (&$adodbrs) {
|
||||
$xmlrpc = rs2xmlrpcval ($adodbrs);
|
||||
if ($xmlrpc)
|
||||
return $xmlrpc->serialize();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a well-formed xmlrpc struct object returns an AdoDB object
|
||||
*
|
||||
* @todo add some error checking on the input value
|
||||
*/
|
||||
function xmlrpcval2rs (&$xmlrpcval) {
|
||||
|
||||
$fields_array = array();
|
||||
$data_array = array();
|
||||
|
||||
// rebuild column information
|
||||
$header = $xmlrpcval->structmem('header');
|
||||
|
||||
$numfields = $header->structmem('fieldcount');
|
||||
$numfields = $numfields->scalarval();
|
||||
$numrecords = $header->structmem('recordcount');
|
||||
$numrecords = $numrecords->scalarval();
|
||||
$sqlstring = $header->structmem('sql');
|
||||
$sqlstring = $sqlstring->scalarval();
|
||||
|
||||
$fieldinfo = $header->structmem('fieldinfo');
|
||||
for ($i = 0; $i < $numfields; $i++) {
|
||||
$temp = $fieldinfo->arraymem($i);
|
||||
$fld = new ADOFieldObject();
|
||||
while (list($key,$value) = $temp->structeach()) {
|
||||
if ($key == "name") $fld->name = $value->scalarval();
|
||||
if ($key == "type") $fld->type = $value->scalarval();
|
||||
if ($key == "max_length") $fld->max_length = $value->scalarval();
|
||||
if ($key == "not_null") $fld->not_null = $value->scalarval();
|
||||
if ($key == "has_default") $fld->has_default = $value->scalarval();
|
||||
if ($key == "default_value") $fld->default_value = $value->scalarval();
|
||||
} // while
|
||||
$fields_array[] = $fld;
|
||||
} // for
|
||||
|
||||
// fetch recordset information into php array
|
||||
$body = $xmlrpcval->structmem('body');
|
||||
for ($i = 0; $i < $numrecords; $i++) {
|
||||
$data_array[$i]= array();
|
||||
$xmlrpcrs_row = $body->arraymem($i);
|
||||
for ($j = 0; $j < $numfields; $j++) {
|
||||
$temp = $xmlrpcrs_row->arraymem($j);
|
||||
$data_array[$i][$j] = $temp->scalarval();
|
||||
} // for j
|
||||
} // for i
|
||||
|
||||
// finally build in-memory recordset object and return it
|
||||
$rs = new ADORecordSet_array();
|
||||
$rs->InitArrayFields($data_array,$fields_array);
|
||||
return $rs;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,68 +1,68 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>ADODB Manual</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<XSTYLE
|
||||
body,td {font-family:Arial,Helvetica,sans-serif;font-size:11pt}
|
||||
pre {font-size:9pt}
|
||||
.toplink {font-size:8pt}
|
||||
/>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
|
||||
<h3>ADOdb Library for PHP</h3>
|
||||
<p>ADOdb is a suite of database libraries that allow you to connect to multiple
|
||||
databases in a portable manner. Download from <a href=http://adodb.sourceforge.net/>http://adodb.sourceforge.net/</a>.
|
||||
<ul><li>The ADOdb documentation has moved to <a href=docs-adodb.htm>docs-adodb.htm</a>
|
||||
This allows you to query, update and insert records using a portable API.
|
||||
<p><li>The ADOdb data dictionary docs are at <a href=docs-datadict.htm>docs-datadict.htm</a>.
|
||||
This allows you to create database tables and indexes in a portable manner.
|
||||
<p><li>The ADOdb database performance monitoring docs are at <a href=docs-perf.htm>docs-perf.htm</a>.
|
||||
This allows you to perform health checks, tune and monitor your database.
|
||||
<p><li>The ADOdb database-backed session docs are at <a href=docs-session.htm>docs-session.htm</a>.
|
||||
</ul>
|
||||
<p>
|
||||
<h3>Installation</h3>
|
||||
Make sure you are running PHP4.0.4 or later. Unpack all the files into a directory accessible by your webserver.
|
||||
<p>
|
||||
To test, try modifying some of the tutorial examples. Make sure you customize the connection settings correctly. You can debug using:
|
||||
<pre>
|
||||
<?php
|
||||
include('adodb/adodb.inc.php');
|
||||
|
||||
$db = <b>ADONewConnection</b>($driver); # eg. 'mysql' or 'oci8'
|
||||
$db->debug = true;
|
||||
$db-><b>Connect</b>($server, $user, $password, $database);
|
||||
$rs = $db-><b>Execute</b>('select * from some_small_table');
|
||||
print "<pre>";
|
||||
print_r($rs-><b>GetRows</b>());
|
||||
print "</pre>";
|
||||
?>
|
||||
</pre>
|
||||
<h3>How are people using ADOdb</h3>
|
||||
Here are some examples of how people are using ADOdb:
|
||||
<ul>
|
||||
<li> <strong>PhpLens</strong> is a commercial data grid component that allows
|
||||
both cool Web designers and serious unshaved programmers to develop and
|
||||
maintain databases on the Web easily. Developed by the author of ADOdb.
|
||||
</li>
|
||||
<li> <strong>PHAkt</strong>: PHP Extension for DreamWeaver Ultradev allows
|
||||
you to script PHP in the popular Web page editor. Database handling provided
|
||||
by ADOdb. </li>
|
||||
<li> <strong>Analysis Console for Intrusion Databases (ACID)</strong>: PHP-based
|
||||
analysis engine to search and process a database of security incidents
|
||||
generated by security-related software such as IDSes and firewalls (e.g.
|
||||
Snort, ipchains). By Roman Danyliw. </li>
|
||||
<li> <strong>PostNuke</strong> is a very popular free content management system
|
||||
and weblog system. It offers full CSS support, HTML 4.01 transitional
|
||||
compliance throughout, an advanced blocks system, and is fully multi-lingual
|
||||
enabled. </li>
|
||||
<li><strong> EasyPublish CMS</strong> is another free content management system
|
||||
for managing information and integrated modules on your internet, intranet-
|
||||
and extranet-sites. From Norway. </li>
|
||||
<li> <strong>NOLA</strong> is a full featured accounting, inventory, and job
|
||||
tracking application. It is licensed under the GPL, and developed by Noguska.
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ADODB Manual</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<XSTYLE
|
||||
body,td {font-family:Arial,Helvetica,sans-serif;font-size:11pt}
|
||||
pre {font-size:9pt}
|
||||
.toplink {font-size:8pt}
|
||||
/>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
|
||||
<h3>ADOdb Library for PHP</h3>
|
||||
<p>ADOdb is a suite of database libraries that allow you to connect to multiple
|
||||
databases in a portable manner. Download from <a href=http://adodb.sourceforge.net/>http://adodb.sourceforge.net/</a>.
|
||||
<ul><li>The ADOdb documentation has moved to <a href=docs-adodb.htm>docs-adodb.htm</a>
|
||||
This allows you to query, update and insert records using a portable API.
|
||||
<p><li>The ADOdb data dictionary docs are at <a href=docs-datadict.htm>docs-datadict.htm</a>.
|
||||
This allows you to create database tables and indexes in a portable manner.
|
||||
<p><li>The ADOdb database performance monitoring docs are at <a href=docs-perf.htm>docs-perf.htm</a>.
|
||||
This allows you to perform health checks, tune and monitor your database.
|
||||
<p><li>The ADOdb database-backed session docs are at <a href=docs-session.htm>docs-session.htm</a>.
|
||||
</ul>
|
||||
<p>
|
||||
<h3>Installation</h3>
|
||||
Make sure you are running PHP4.0.4 or later. Unpack all the files into a directory accessible by your webserver.
|
||||
<p>
|
||||
To test, try modifying some of the tutorial examples. Make sure you customize the connection settings correctly. You can debug using:
|
||||
<pre>
|
||||
<?php
|
||||
include('adodb/adodb.inc.php');
|
||||
|
||||
$db = <b>ADONewConnection</b>($driver); # eg. 'mysql' or 'oci8'
|
||||
$db->debug = true;
|
||||
$db-><b>Connect</b>($server, $user, $password, $database);
|
||||
$rs = $db-><b>Execute</b>('select * from some_small_table');
|
||||
print "<pre>";
|
||||
print_r($rs-><b>GetRows</b>());
|
||||
print "</pre>";
|
||||
?>
|
||||
</pre>
|
||||
<h3>How are people using ADOdb</h3>
|
||||
Here are some examples of how people are using ADOdb:
|
||||
<ul>
|
||||
<li> <strong>PhpLens</strong> is a commercial data grid component that allows
|
||||
both cool Web designers and serious unshaved programmers to develop and
|
||||
maintain databases on the Web easily. Developed by the author of ADOdb.
|
||||
</li>
|
||||
<li> <strong>PHAkt</strong>: PHP Extension for DreamWeaver Ultradev allows
|
||||
you to script PHP in the popular Web page editor. Database handling provided
|
||||
by ADOdb. </li>
|
||||
<li> <strong>Analysis Console for Intrusion Databases (ACID)</strong>: PHP-based
|
||||
analysis engine to search and process a database of security incidents
|
||||
generated by security-related software such as IDSes and firewalls (e.g.
|
||||
Snort, ipchains). By Roman Danyliw. </li>
|
||||
<li> <strong>PostNuke</strong> is a very popular free content management system
|
||||
and weblog system. It offers full CSS support, HTML 4.01 transitional
|
||||
compliance throughout, an advanced blocks system, and is fully multi-lingual
|
||||
enabled. </li>
|
||||
<li><strong> EasyPublish CMS</strong> is another free content management system
|
||||
for managing information and integrated modules on your internet, intranet-
|
||||
and extranet-sites. From Norway. </li>
|
||||
<li> <strong>NOLA</strong> is a full featured accounting, inventory, and job
|
||||
tracking application. It is licensed under the GPL, and developed by Noguska.
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,367 +1,367 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Tips on Writing Portable SQL for Multiple Databases for PHP</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor=white>
|
||||
<table width=100% border=0><tr><td><h2>Tips on Writing Portable SQL </h2></td><td>
|
||||
<div align=right><img src="cute_icons_for_site/adodb.gif"></div></td></tr></table>
|
||||
<p>Updated 6 Oct 2006. Added OffsetDate example.
|
||||
<p>Updated 18 Sep 2003. Added Portable Native SQL section.
|
||||
<p>
|
||||
|
||||
If you are writing an application that is used in multiple environments and
|
||||
operating systems, you need to plan to support multiple databases. This article
|
||||
is based on my experiences with multiple database systems, stretching from 4th
|
||||
Dimension in my Mac days, to the databases I currently use, which are: Oracle,
|
||||
FoxPro, Access, MS SQL Server and MySQL. Although most of the advice here applies
|
||||
to using SQL with Perl, Python and other programming languages, I will focus on PHP and how
|
||||
the <a href="http://adodb.sourceforge.net/">ADOdb</a> database abstraction library
|
||||
offers some solutions.<p></p>
|
||||
<p>Most database vendors practice product lock-in. The best or fastest way to
|
||||
do things is often implemented using proprietary extensions to SQL. This makes
|
||||
it extremely hard to write portable SQL code that performs well under all conditions.
|
||||
When the first ANSI committee got together in 1984 to standardize SQL, the database
|
||||
vendors had such different implementations that they could only agree on the
|
||||
core functionality of SQL. Many important application specific requirements
|
||||
were not standardized, and after so many years since the ANSI effort began,
|
||||
it looks as if much useful database functionality will never be standardized.
|
||||
Even though ANSI-92 SQL has codified much more, we still have to implement portability
|
||||
at the application level.</p>
|
||||
<h3><b>Selects</b></h3>
|
||||
<p>The SELECT statement has been standardized to a great degree. Nearly every
|
||||
database supports the following:</p>
|
||||
<p>SELECT [cols] FROM [tables]<br>
|
||||
[WHERE conditions]<br>
|
||||
[GROUP BY cols]<br>
|
||||
[HAVING conditions] <br>
|
||||
[ORDER BY cols]</p>
|
||||
<p>But so many useful techniques can only be implemented by using proprietary
|
||||
extensions. For example, when writing SQL to retrieve the first 10 rows for
|
||||
paging, you could write...</p>
|
||||
<table width="80%" border="1" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td><b>Database</b></td>
|
||||
<td><b>SQL Syntax</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DB2</td>
|
||||
<td>select * from table fetch first 10 rows only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Informix</td>
|
||||
<td>select first 10 * from table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Microsoft SQL Server and Access</td>
|
||||
<td>select top 10 * from table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MySQL and PostgreSQL</td>
|
||||
<td>select * from table limit 10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Oracle 8i</td>
|
||||
<td>select * from (select * from table) where rownum <= 10</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>This feature of getting a subset of data is so useful that in the PHP class
|
||||
library ADOdb, we have a SelectLimit( ) function that allows you to hide the
|
||||
implementation details within a function that will rewrite your SQL for you:</p>
|
||||
<pre>$connection->SelectLimit('select * from table', 10);
|
||||
</pre>
|
||||
<p><b>Selects: Fetch Modes</b></p>
|
||||
<p>PHP allows you to retrieve database records as arrays. You can choose to have
|
||||
the arrays indexed by field name or number. However different low-level PHP
|
||||
database drivers are inconsistent in their indexing efforts. ADOdb allows you
|
||||
to determine your prefered mode. You set this by setting the variable $ADODB_FETCH_MODE
|
||||
to either of the constants ADODB_FETCH_NUM (for numeric indexes) or ADODB_FETCH_ASSOC
|
||||
(using field names as an associative index).</p>
|
||||
<p>The default behaviour of ADOdb varies depending on the database you are using.
|
||||
For consistency, set the fetch mode to either ADODB_FETCH_NUM (for speed) or
|
||||
ADODB_FETCH_ASSOC (for convenience) at the beginning of your code. </p>
|
||||
<p><b>Selects: Counting Records</b></p>
|
||||
<p>Another problem with SELECTs is that some databases do not return the number
|
||||
of rows retrieved from a select statement. This is because the highest performance
|
||||
databases will return records to you even before the last record has been found.
|
||||
</p>
|
||||
<p>In ADOdb, RecordCount( ) returns the number of rows returned, or will emulate
|
||||
it by buffering the rows and returning the count after all rows have been returned.
|
||||
This can be disabled for performance reasons when retrieving large recordsets
|
||||
by setting the global variable $ADODB_COUNTRECS = false. This variable is checked
|
||||
every time a query is executed, so you can selectively choose which recordsets
|
||||
to count.</p>
|
||||
<p>If you prefer to set $ADODB_COUNTRECS = false, ADOdb still has the PO_RecordCount(
|
||||
) function. This will return the number of rows, or if it is not found, it will
|
||||
return an estimate using SELECT COUNT(*):</p>
|
||||
<pre>$rs = $db->Execute("select * from table where state=$state");
|
||||
$numrows = $rs->PO_RecordCount('table', "state=$state");</pre>
|
||||
<p><b>Selects: Locking</b> </p>
|
||||
<p>SELECT statements are commonly used to implement row-level locking of tables.
|
||||
Other databases such as Oracle, Interbase, PostgreSQL and MySQL with InnoDB
|
||||
do not require row-level locking because they use versioning to display data
|
||||
consistent with a specific point in time.</p>
|
||||
<p>Currently, I recommend encapsulating the row-level locking in a separate function,
|
||||
such as RowLock($table, $where):</p>
|
||||
<pre>$connection->BeginTrans( );
|
||||
$connection->RowLock($table, $where); </pre>
|
||||
<pre><font color=green># some operation</font></pre>
|
||||
<pre>if ($ok) $connection->CommitTrans( );
|
||||
else $connection->RollbackTrans( );
|
||||
</pre>
|
||||
<p><b>Selects: Outer Joins</b></p>
|
||||
<p>Not all databases support outer joins. Furthermore the syntax for outer joins
|
||||
differs dramatically between database vendors. One portable (and possibly slower)
|
||||
method of implementing outer joins is using UNION.</p>
|
||||
<p>For example, an ANSI-92 left outer join between two tables t1 and t2 could
|
||||
look like:</p>
|
||||
<pre>SELECT t1.col1, t1.col2, t2.cola <br> FROM t1 <i>LEFT JOIN</i> t2 ON t1.col = t2.col</pre>
|
||||
<p>This can be emulated using:</p>
|
||||
<pre>SELECT t1.col1, t1.col2, t2.cola FROM t1, t2 <br> WHERE t1.col = t2.col
|
||||
UNION ALL
|
||||
SELECT col1, col2, null FROM t1 <br> WHERE t1.col not in (select distinct col from t2)
|
||||
</pre>
|
||||
<p>Since ADOdb 2.13, we provide some hints in the connection object as to legal
|
||||
join variations. This is still incomplete and sometimes depends on the database
|
||||
version you are using, but is useful as a general guideline:</p>
|
||||
<p><font face="Courier New, Courier, mono">$conn->leftOuter</font>: holds the
|
||||
operator used for left outer joins (eg. '*='), or false if not known or not
|
||||
available.<br>
|
||||
<font face="Courier New, Courier, mono">$conn->rightOuter</font>: holds the
|
||||
operator used for right outer joins (eg '=*'), or false if not known or not
|
||||
available.<br>
|
||||
<font face="Courier New, Courier, mono">$conn->ansiOuter</font>: boolean
|
||||
that if true means that ANSI-92 style outer joins are supported, or false if
|
||||
not known.</p>
|
||||
<h3><b>Inserts</b> </h3>
|
||||
<p>When you create records, you need to generate unique id's for each record.
|
||||
There are two common techniques: (1) auto-incrementing columns and (2) sequences.
|
||||
</p>
|
||||
<p>Auto-incrementing columns are supported by MySQL, Sybase and Microsoft Access
|
||||
and SQL Server. However most other databases do not support this feature. So
|
||||
for portability, you have little choice but to use sequences. Sequences are
|
||||
special functions that return a unique incrementing number every time you call
|
||||
it, suitable to be used as database keys. In ADOdb, we use the GenID( ) function.
|
||||
It has takes a parameter, the sequence name. Different tables can have different
|
||||
sequences. </p>
|
||||
<pre>$id = $connection->GenID('sequence_name');<br>$connection->Execute("insert into table (id, firstname, lastname) <br> values ($id, $firstname, $lastname)");</pre>
|
||||
<p>For databases that do not support sequences natively, ADOdb emulates sequences
|
||||
by creating a table for every sequence.</p>
|
||||
<h3><b>Binding</b></h3>
|
||||
<p>Binding variables in an SQL statement is another tricky feature. Binding is
|
||||
useful because it allows pre-compilation of SQL. When inserting multiple records
|
||||
into a database in a loop, binding can offer a 50% (or greater) speedup. However
|
||||
many databases such as Access and MySQL do not support binding natively and
|
||||
there is some overhead in emulating binding. Furthermore, different databases
|
||||
(specificly Oracle!) implement binding differently. My recommendation is to
|
||||
use binding if your database queries are too slow, but make sure you are using
|
||||
a database that supports it like Oracle. </p>
|
||||
<p>ADOdb supports portable Prepare/Execute with:</p>
|
||||
<pre>$stmt = $db->Prepare('select * from customers where custid=? and state=?');
|
||||
$rs = $db->Execute($stmt, array($id,'New York'));</pre>
|
||||
<p>Oracle uses named bind placeholders, not "?", so to support portable binding, we have Param() that generates
|
||||
the correct placeholder (available since ADOdb 3.92):
|
||||
<pre><font color="#000000">$sql = <font color="#993300">'insert into table (col1,col2) values ('</font>.$DB->Param('a').<font color="#993300">','</font>.$DB->Param('b').<font color="#993300">')'</font>;
|
||||
<font color="#006600"># generates 'insert into table (col1,col2) values (?,?)'
|
||||
# or 'insert into table (col1,col2) values (:a,:b)</font>'
|
||||
$stmt = $DB->Prepare($sql);
|
||||
$stmt = $DB->Execute($stmt,array('one','two'));
|
||||
</font></pre>
|
||||
<a name="native"></a>
|
||||
<h2>Portable Native SQL</h2>
|
||||
<p>ADOdb provides the following functions for portably generating SQL functions
|
||||
as strings to be merged into your SQL statements (some are only available since
|
||||
ADOdb 3.92): </p>
|
||||
<table width="75%" border="1" align=center>
|
||||
<tr>
|
||||
<td width=30%><b>Function</b></td>
|
||||
<td><b>Description</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBDate($date)</td>
|
||||
<td>Pass in a UNIX timestamp or ISO date and it will convert it to a date
|
||||
string formatted for INSERT/UPDATE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBTimeStamp($date)</td>
|
||||
<td>Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp
|
||||
string formatted for INSERT/UPDATE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SQLDate($date, $fmt)</td>
|
||||
<td>Portably generate a date formatted using $fmt mask, for use in SELECT
|
||||
statements.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OffsetDate($date, $ndays)</td>
|
||||
<td>Portably generate a $date offset by $ndays.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Concat($s1, $s2, ...)</td>
|
||||
<td>Portably concatenate strings. Alternatively, for mssql use mssqlpo driver,
|
||||
which allows || operator.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IfNull($fld, $replaceNull)</td>
|
||||
<td>Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Param($name)</td>
|
||||
<td>Generates bind placeholders, using ? or named conventions as appropriate.</td>
|
||||
</tr>
|
||||
<tr><td>$db->sysDate</td><td>Property that holds the SQL function that returns today's date</td>
|
||||
</tr>
|
||||
<tr><td>$db->sysTimeStamp</td><td>Property that holds the SQL function that returns the current
|
||||
timestamp (date+time).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$db->concat_operator</td><td>Property that holds the concatenation operator
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>$db->length</td><td>Property that holds the name of the SQL strlen function.
|
||||
</td></tr>
|
||||
|
||||
<tr><td>$db->upperCase</td><td>Property that holds the name of the SQL strtoupper function.
|
||||
</td></tr>
|
||||
<tr><td>$db->random</td><td>Property that holds the SQL to generate a random number between 0.00 and 1.00.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>$db->substr</td><td>Property that holds the name of the SQL substring function.
|
||||
</td></tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<h2>DDL and Tuning</h2>
|
||||
There are database design tools such as ERWin or Dezign that allow you to generate data definition language commands such as ALTER TABLE or CREATE INDEX from Entity-Relationship diagrams.
|
||||
<p>
|
||||
However if you prefer to use a PHP-based table creation scheme, adodb provides you with this feature. Here is the code to generate the SQL to create a table with:
|
||||
<ol>
|
||||
<li> Auto-increment primary key 'ID', </li>
|
||||
<li>The person's 'NAME' VARCHAR(32) NOT NULL and defaults to '', </li>
|
||||
<li>The date and time of record creation 'CREATED', </li>
|
||||
<li> The person's 'AGE', defaulting to 0, type NUMERIC(16). </li>
|
||||
</ol>
|
||||
<p>
|
||||
Also create a compound index consisting of 'NAME' and 'AGE':
|
||||
<pre>
|
||||
$datadict = <strong>NewDataDictionary</strong>($connection);
|
||||
$flds = "
|
||||
<font color="#660000"> ID I AUTOINCREMENT PRIMARY,
|
||||
NAME C(32) DEFAULT '' NOTNULL,
|
||||
CREATED T DEFTIMESTAMP,
|
||||
AGE N(16) DEFAULT 0</font>
|
||||
";
|
||||
$sql1 = $datadict-><strong>CreateTableSQL</strong>('tabname', $flds);
|
||||
$sql2 = $datadict-><strong>CreateIndexSQL</strong>('idx_name_age', 'tabname', 'NAME,AGE');
|
||||
</pre>
|
||||
|
||||
<h3>Data Types</h3>
|
||||
<p>Stick to a few data types that are available in most databases. Char, varchar
|
||||
and numeric/number are supported by most databases. Most other data types (including
|
||||
integer, boolean and float) cannot be relied on being available. I recommend
|
||||
using char(1) or number(1) to hold booleans. </p>
|
||||
<p>Different databases have different ways of representing dates and timestamps/datetime.
|
||||
ADOdb attempts to display all dates in ISO (YYYY-MM-DD) format. ADOdb also provides
|
||||
DBDate( ) and DBTimeStamp( ) to convert dates to formats that are acceptable
|
||||
to that database. Both functions accept Unix integer timestamps and date strings
|
||||
in ISO format.</p>
|
||||
<pre>$date1 = $connection->DBDate(time( ));<br>$date2 = $connection->DBTimeStamp('2002-02-23 13:03:33');</pre>
|
||||
<p>We also provide functions to convert database dates to Unix timestamps:</p>
|
||||
<pre>$unixts = $recordset->UnixDate('#2002-02-30#'); <font color="green"># MS Access date =gt; unix timestamp</font></pre>
|
||||
<p>For date calculations, we have OffsetDate which allows you to calculate dates such as <i>yesterday</i> and <i>next week</i> in a RDBMS independant fashion. For example, if we want to set a field to 6 hour from now, use:
|
||||
<pre>
|
||||
$sql = 'update table set dtimefld='.$db->OffsetDate($db->sysTimeStamp, 6/24).' where ...';
|
||||
</pre>
|
||||
<p>The maximum length of a char/varchar field is also database specific. You can
|
||||
only assume that field lengths of up to 250 characters are supported. This is
|
||||
normally impractical for web based forum or content management systems. You
|
||||
will need to be familiar with how databases handle large objects (LOBs). ADOdb
|
||||
implements two functions, UpdateBlob( ) and UpdateClob( ) that allow you to
|
||||
update fields holding Binary Large Objects (eg. pictures) and Character Large
|
||||
Objects (eg. HTML articles):</p>
|
||||
<pre><font color=green># for oracle </font>
|
||||
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1,empty_blob())');
|
||||
$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
|
||||
|
||||
<font color=green># non-oracle databases</font>
|
||||
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
|
||||
$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
|
||||
</pre>
|
||||
<p>Null handling is another area where differences can occur. This is a mine-field,
|
||||
because 3-value logic is tricky.
|
||||
<p>In general, I avoid using nulls except for dates and default all my numeric
|
||||
and character fields to 0 or the empty string. This maintains consistency with
|
||||
PHP, where empty strings and zero are treated as equivalent, and avoids SQL
|
||||
ambiguities when you use the ANY and EXISTS operators. However if your database
|
||||
has significant amounts of missing or unknown data, using nulls might be a good
|
||||
idea.
|
||||
<p>
|
||||
ADOdb also supports a portable <a href=http://phplens.com/adodb/reference.functions.concat.html#ifnull>IfNull</a> function, so you can define what to display
|
||||
if the field contains a null.
|
||||
<h3><b>Stored Procedures</b></h3>
|
||||
<p>Stored procedures are another problem area. Some databases allow recordsets
|
||||
to be returned in a stored procedure (Microsoft SQL Server and Sybase), and
|
||||
others only allow output parameters to be returned. Stored procedures sometimes
|
||||
need to be wrapped in special syntax. For example, Oracle requires such code
|
||||
to be wrapped in an anonymous block with BEGIN and END. Also internal sql operators
|
||||
and functions such as +, ||, TRIM( ), SUBSTR( ) or INSTR( ) vary between vendors.
|
||||
</p>
|
||||
<p>An example of how to call a stored procedure with 2 parameters and 1 return
|
||||
value follows:</p>
|
||||
<pre> switch ($db->databaseType) {
|
||||
case '<font color="#993300">mssql</font>':
|
||||
$sql = <font color="#000000"><font color="#993333">'<font color="#993300">SP_RUNSOMETHING</font>'</font></font>; break;
|
||||
case '<font color="#993300">oci8</font>':
|
||||
$sql =
|
||||
<font color="#993300"> </font><font color="#000000"><font color="#993300">"declare RETVAL integer;begin :RETVAL := </font><font color="#000000"><font color="#993333"><font color="#993300">SP_RUNSOMETHING</font></font></font><font color="#993300">(:myid,:group);end;";
|
||||
</font> break;</font>
|
||||
default:
|
||||
die('<font color="#993300">Unsupported feature</font>');
|
||||
}
|
||||
<font color="#000000"><font color="green"> # @RETVAL = SP_RUNSOMETHING @myid,@group</font>
|
||||
$stmt = $db->PrepareSP($sql); <br> $db->Parameter($stmt,$id,'<font color="#993300">myid</font>');
|
||||
$db->Parameter($stmt,$group,'<font color="#993300">group</font>');
|
||||
<font color="green"># true indicates output parameter<br> </font>$db->Parameter($stmt,$ret,'<font color="#993300">RETVAL</font>',true);
|
||||
$db->Execute($stmt); </font></pre>
|
||||
<p>As you can see, the ADOdb API is the same for both databases. But the stored
|
||||
procedure SQL syntax is quite different between databases and is not portable,
|
||||
so be forewarned! However sometimes you have little choice as some systems only
|
||||
allow data to be accessed via stored procedures. This is when the ultimate portability
|
||||
solution might be the only solution: <i>treating portable SQL as a localization
|
||||
exercise...</i></p>
|
||||
<h3><b>SQL as a Localization Exercise</b></h3>
|
||||
<p> In general to provide real portability, you will have to treat SQL coding
|
||||
as a localization exercise. In PHP, it has become common to define separate
|
||||
language files for English, Russian, Korean, etc. Similarly, I would suggest
|
||||
you have separate Sybase, Intebase, MySQL, etc files, and conditionally include
|
||||
the SQL based on the database. For example, each MySQL SQL statement would be
|
||||
stored in a separate variable, in a file called 'mysql-lang.inc.php'.</p>
|
||||
<pre>$sqlGetPassword = '<font color="#993300">select password from users where userid=%s</font>';
|
||||
$sqlSearchKeyword = quot;<font color="#993300">SELECT * FROM articles WHERE match (title,body) against (%s</font>)";</pre>
|
||||
<p>In our main PHP file:</p>
|
||||
<pre><font color=green># define which database to load...</font>
|
||||
<b>$database = '<font color="#993300">mysql</font>';
|
||||
include_once("<font color="#993300">$database-lang.inc.php</font>");</b>
|
||||
|
||||
$db = NewADOConnection($database);
|
||||
$db->PConnect(...) or die('<font color="#993300">Failed to connect to database</font>');
|
||||
|
||||
<font color=green># search for a keyword $word</font>
|
||||
$rs = $db->Execute(sprintf($sqlSearchKeyWord,$db->qstr($word)));</pre>
|
||||
<p>Note that we quote the $word variable using the qstr( ) function. This is because
|
||||
each database quotes strings using different conventions.</p>
|
||||
<p>
|
||||
<h3>Final Thoughts</h3>
|
||||
<p>The best way to ensure that you have portable SQL is to have your data tables designed using
|
||||
sound principles. Learn the theory of normalization and entity-relationship diagrams and model
|
||||
your data carefully. Understand how joins and indexes work and how they are used to tune performance.
|
||||
<p> Visit the following page for more references on database theory and vendors:
|
||||
<a href="http://php.weblogs.com/sql_tutorial">http://php.weblogs.com/sql_tutorial</a>.
|
||||
Also read this article on <a href=http://phplens.com/lens/php-book/optimizing-debugging-php.php>Optimizing PHP</a>.
|
||||
<p>
|
||||
<font size=1>(c) 2002-2003 John Lim.</font>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Tips on Writing Portable SQL for Multiple Databases for PHP</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor=white>
|
||||
<table width=100% border=0><tr><td><h2>Tips on Writing Portable SQL </h2></td><td>
|
||||
<div align=right><img src="cute_icons_for_site/adodb.gif"></div></td></tr></table>
|
||||
<p>Updated 6 Oct 2006. Added OffsetDate example.
|
||||
<p>Updated 18 Sep 2003. Added Portable Native SQL section.
|
||||
<p>
|
||||
|
||||
If you are writing an application that is used in multiple environments and
|
||||
operating systems, you need to plan to support multiple databases. This article
|
||||
is based on my experiences with multiple database systems, stretching from 4th
|
||||
Dimension in my Mac days, to the databases I currently use, which are: Oracle,
|
||||
FoxPro, Access, MS SQL Server and MySQL. Although most of the advice here applies
|
||||
to using SQL with Perl, Python and other programming languages, I will focus on PHP and how
|
||||
the <a href="http://adodb.sourceforge.net/">ADOdb</a> database abstraction library
|
||||
offers some solutions.<p></p>
|
||||
<p>Most database vendors practice product lock-in. The best or fastest way to
|
||||
do things is often implemented using proprietary extensions to SQL. This makes
|
||||
it extremely hard to write portable SQL code that performs well under all conditions.
|
||||
When the first ANSI committee got together in 1984 to standardize SQL, the database
|
||||
vendors had such different implementations that they could only agree on the
|
||||
core functionality of SQL. Many important application specific requirements
|
||||
were not standardized, and after so many years since the ANSI effort began,
|
||||
it looks as if much useful database functionality will never be standardized.
|
||||
Even though ANSI-92 SQL has codified much more, we still have to implement portability
|
||||
at the application level.</p>
|
||||
<h3><b>Selects</b></h3>
|
||||
<p>The SELECT statement has been standardized to a great degree. Nearly every
|
||||
database supports the following:</p>
|
||||
<p>SELECT [cols] FROM [tables]<br>
|
||||
[WHERE conditions]<br>
|
||||
[GROUP BY cols]<br>
|
||||
[HAVING conditions] <br>
|
||||
[ORDER BY cols]</p>
|
||||
<p>But so many useful techniques can only be implemented by using proprietary
|
||||
extensions. For example, when writing SQL to retrieve the first 10 rows for
|
||||
paging, you could write...</p>
|
||||
<table width="80%" border="1" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td><b>Database</b></td>
|
||||
<td><b>SQL Syntax</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DB2</td>
|
||||
<td>select * from table fetch first 10 rows only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Informix</td>
|
||||
<td>select first 10 * from table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Microsoft SQL Server and Access</td>
|
||||
<td>select top 10 * from table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MySQL and PostgreSQL</td>
|
||||
<td>select * from table limit 10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Oracle 8i</td>
|
||||
<td>select * from (select * from table) where rownum <= 10</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>This feature of getting a subset of data is so useful that in the PHP class
|
||||
library ADOdb, we have a SelectLimit( ) function that allows you to hide the
|
||||
implementation details within a function that will rewrite your SQL for you:</p>
|
||||
<pre>$connection->SelectLimit('select * from table', 10);
|
||||
</pre>
|
||||
<p><b>Selects: Fetch Modes</b></p>
|
||||
<p>PHP allows you to retrieve database records as arrays. You can choose to have
|
||||
the arrays indexed by field name or number. However different low-level PHP
|
||||
database drivers are inconsistent in their indexing efforts. ADOdb allows you
|
||||
to determine your prefered mode. You set this by setting the variable $ADODB_FETCH_MODE
|
||||
to either of the constants ADODB_FETCH_NUM (for numeric indexes) or ADODB_FETCH_ASSOC
|
||||
(using field names as an associative index).</p>
|
||||
<p>The default behaviour of ADOdb varies depending on the database you are using.
|
||||
For consistency, set the fetch mode to either ADODB_FETCH_NUM (for speed) or
|
||||
ADODB_FETCH_ASSOC (for convenience) at the beginning of your code. </p>
|
||||
<p><b>Selects: Counting Records</b></p>
|
||||
<p>Another problem with SELECTs is that some databases do not return the number
|
||||
of rows retrieved from a select statement. This is because the highest performance
|
||||
databases will return records to you even before the last record has been found.
|
||||
</p>
|
||||
<p>In ADOdb, RecordCount( ) returns the number of rows returned, or will emulate
|
||||
it by buffering the rows and returning the count after all rows have been returned.
|
||||
This can be disabled for performance reasons when retrieving large recordsets
|
||||
by setting the global variable $ADODB_COUNTRECS = false. This variable is checked
|
||||
every time a query is executed, so you can selectively choose which recordsets
|
||||
to count.</p>
|
||||
<p>If you prefer to set $ADODB_COUNTRECS = false, ADOdb still has the PO_RecordCount(
|
||||
) function. This will return the number of rows, or if it is not found, it will
|
||||
return an estimate using SELECT COUNT(*):</p>
|
||||
<pre>$rs = $db->Execute("select * from table where state=$state");
|
||||
$numrows = $rs->PO_RecordCount('table', "state=$state");</pre>
|
||||
<p><b>Selects: Locking</b> </p>
|
||||
<p>SELECT statements are commonly used to implement row-level locking of tables.
|
||||
Other databases such as Oracle, Interbase, PostgreSQL and MySQL with InnoDB
|
||||
do not require row-level locking because they use versioning to display data
|
||||
consistent with a specific point in time.</p>
|
||||
<p>Currently, I recommend encapsulating the row-level locking in a separate function,
|
||||
such as RowLock($table, $where):</p>
|
||||
<pre>$connection->BeginTrans( );
|
||||
$connection->RowLock($table, $where); </pre>
|
||||
<pre><font color=green># some operation</font></pre>
|
||||
<pre>if ($ok) $connection->CommitTrans( );
|
||||
else $connection->RollbackTrans( );
|
||||
</pre>
|
||||
<p><b>Selects: Outer Joins</b></p>
|
||||
<p>Not all databases support outer joins. Furthermore the syntax for outer joins
|
||||
differs dramatically between database vendors. One portable (and possibly slower)
|
||||
method of implementing outer joins is using UNION.</p>
|
||||
<p>For example, an ANSI-92 left outer join between two tables t1 and t2 could
|
||||
look like:</p>
|
||||
<pre>SELECT t1.col1, t1.col2, t2.cola <br> FROM t1 <i>LEFT JOIN</i> t2 ON t1.col = t2.col</pre>
|
||||
<p>This can be emulated using:</p>
|
||||
<pre>SELECT t1.col1, t1.col2, t2.cola FROM t1, t2 <br> WHERE t1.col = t2.col
|
||||
UNION ALL
|
||||
SELECT col1, col2, null FROM t1 <br> WHERE t1.col not in (select distinct col from t2)
|
||||
</pre>
|
||||
<p>Since ADOdb 2.13, we provide some hints in the connection object as to legal
|
||||
join variations. This is still incomplete and sometimes depends on the database
|
||||
version you are using, but is useful as a general guideline:</p>
|
||||
<p><font face="Courier New, Courier, mono">$conn->leftOuter</font>: holds the
|
||||
operator used for left outer joins (eg. '*='), or false if not known or not
|
||||
available.<br>
|
||||
<font face="Courier New, Courier, mono">$conn->rightOuter</font>: holds the
|
||||
operator used for right outer joins (eg '=*'), or false if not known or not
|
||||
available.<br>
|
||||
<font face="Courier New, Courier, mono">$conn->ansiOuter</font>: boolean
|
||||
that if true means that ANSI-92 style outer joins are supported, or false if
|
||||
not known.</p>
|
||||
<h3><b>Inserts</b> </h3>
|
||||
<p>When you create records, you need to generate unique id's for each record.
|
||||
There are two common techniques: (1) auto-incrementing columns and (2) sequences.
|
||||
</p>
|
||||
<p>Auto-incrementing columns are supported by MySQL, Sybase and Microsoft Access
|
||||
and SQL Server. However most other databases do not support this feature. So
|
||||
for portability, you have little choice but to use sequences. Sequences are
|
||||
special functions that return a unique incrementing number every time you call
|
||||
it, suitable to be used as database keys. In ADOdb, we use the GenID( ) function.
|
||||
It has takes a parameter, the sequence name. Different tables can have different
|
||||
sequences. </p>
|
||||
<pre>$id = $connection->GenID('sequence_name');<br>$connection->Execute("insert into table (id, firstname, lastname) <br> values ($id, $firstname, $lastname)");</pre>
|
||||
<p>For databases that do not support sequences natively, ADOdb emulates sequences
|
||||
by creating a table for every sequence.</p>
|
||||
<h3><b>Binding</b></h3>
|
||||
<p>Binding variables in an SQL statement is another tricky feature. Binding is
|
||||
useful because it allows pre-compilation of SQL. When inserting multiple records
|
||||
into a database in a loop, binding can offer a 50% (or greater) speedup. However
|
||||
many databases such as Access and MySQL do not support binding natively and
|
||||
there is some overhead in emulating binding. Furthermore, different databases
|
||||
(specificly Oracle!) implement binding differently. My recommendation is to
|
||||
use binding if your database queries are too slow, but make sure you are using
|
||||
a database that supports it like Oracle. </p>
|
||||
<p>ADOdb supports portable Prepare/Execute with:</p>
|
||||
<pre>$stmt = $db->Prepare('select * from customers where custid=? and state=?');
|
||||
$rs = $db->Execute($stmt, array($id,'New York'));</pre>
|
||||
<p>Oracle uses named bind placeholders, not "?", so to support portable binding, we have Param() that generates
|
||||
the correct placeholder (available since ADOdb 3.92):
|
||||
<pre><font color="#000000">$sql = <font color="#993300">'insert into table (col1,col2) values ('</font>.$DB->Param('a').<font color="#993300">','</font>.$DB->Param('b').<font color="#993300">')'</font>;
|
||||
<font color="#006600"># generates 'insert into table (col1,col2) values (?,?)'
|
||||
# or 'insert into table (col1,col2) values (:a,:b)</font>'
|
||||
$stmt = $DB->Prepare($sql);
|
||||
$stmt = $DB->Execute($stmt,array('one','two'));
|
||||
</font></pre>
|
||||
<a name="native"></a>
|
||||
<h2>Portable Native SQL</h2>
|
||||
<p>ADOdb provides the following functions for portably generating SQL functions
|
||||
as strings to be merged into your SQL statements (some are only available since
|
||||
ADOdb 3.92): </p>
|
||||
<table width="75%" border="1" align=center>
|
||||
<tr>
|
||||
<td width=30%><b>Function</b></td>
|
||||
<td><b>Description</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBDate($date)</td>
|
||||
<td>Pass in a UNIX timestamp or ISO date and it will convert it to a date
|
||||
string formatted for INSERT/UPDATE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBTimeStamp($date)</td>
|
||||
<td>Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp
|
||||
string formatted for INSERT/UPDATE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SQLDate($date, $fmt)</td>
|
||||
<td>Portably generate a date formatted using $fmt mask, for use in SELECT
|
||||
statements.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OffsetDate($date, $ndays)</td>
|
||||
<td>Portably generate a $date offset by $ndays.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Concat($s1, $s2, ...)</td>
|
||||
<td>Portably concatenate strings. Alternatively, for mssql use mssqlpo driver,
|
||||
which allows || operator.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IfNull($fld, $replaceNull)</td>
|
||||
<td>Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Param($name)</td>
|
||||
<td>Generates bind placeholders, using ? or named conventions as appropriate.</td>
|
||||
</tr>
|
||||
<tr><td>$db->sysDate</td><td>Property that holds the SQL function that returns today's date</td>
|
||||
</tr>
|
||||
<tr><td>$db->sysTimeStamp</td><td>Property that holds the SQL function that returns the current
|
||||
timestamp (date+time).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$db->concat_operator</td><td>Property that holds the concatenation operator
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>$db->length</td><td>Property that holds the name of the SQL strlen function.
|
||||
</td></tr>
|
||||
|
||||
<tr><td>$db->upperCase</td><td>Property that holds the name of the SQL strtoupper function.
|
||||
</td></tr>
|
||||
<tr><td>$db->random</td><td>Property that holds the SQL to generate a random number between 0.00 and 1.00.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>$db->substr</td><td>Property that holds the name of the SQL substring function.
|
||||
</td></tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<h2>DDL and Tuning</h2>
|
||||
There are database design tools such as ERWin or Dezign that allow you to generate data definition language commands such as ALTER TABLE or CREATE INDEX from Entity-Relationship diagrams.
|
||||
<p>
|
||||
However if you prefer to use a PHP-based table creation scheme, adodb provides you with this feature. Here is the code to generate the SQL to create a table with:
|
||||
<ol>
|
||||
<li> Auto-increment primary key 'ID', </li>
|
||||
<li>The person's 'NAME' VARCHAR(32) NOT NULL and defaults to '', </li>
|
||||
<li>The date and time of record creation 'CREATED', </li>
|
||||
<li> The person's 'AGE', defaulting to 0, type NUMERIC(16). </li>
|
||||
</ol>
|
||||
<p>
|
||||
Also create a compound index consisting of 'NAME' and 'AGE':
|
||||
<pre>
|
||||
$datadict = <strong>NewDataDictionary</strong>($connection);
|
||||
$flds = "
|
||||
<font color="#660000"> ID I AUTOINCREMENT PRIMARY,
|
||||
NAME C(32) DEFAULT '' NOTNULL,
|
||||
CREATED T DEFTIMESTAMP,
|
||||
AGE N(16) DEFAULT 0</font>
|
||||
";
|
||||
$sql1 = $datadict-><strong>CreateTableSQL</strong>('tabname', $flds);
|
||||
$sql2 = $datadict-><strong>CreateIndexSQL</strong>('idx_name_age', 'tabname', 'NAME,AGE');
|
||||
</pre>
|
||||
|
||||
<h3>Data Types</h3>
|
||||
<p>Stick to a few data types that are available in most databases. Char, varchar
|
||||
and numeric/number are supported by most databases. Most other data types (including
|
||||
integer, boolean and float) cannot be relied on being available. I recommend
|
||||
using char(1) or number(1) to hold booleans. </p>
|
||||
<p>Different databases have different ways of representing dates and timestamps/datetime.
|
||||
ADOdb attempts to display all dates in ISO (YYYY-MM-DD) format. ADOdb also provides
|
||||
DBDate( ) and DBTimeStamp( ) to convert dates to formats that are acceptable
|
||||
to that database. Both functions accept Unix integer timestamps and date strings
|
||||
in ISO format.</p>
|
||||
<pre>$date1 = $connection->DBDate(time( ));<br>$date2 = $connection->DBTimeStamp('2002-02-23 13:03:33');</pre>
|
||||
<p>We also provide functions to convert database dates to Unix timestamps:</p>
|
||||
<pre>$unixts = $recordset->UnixDate('#2002-02-30#'); <font color="green"># MS Access date =gt; unix timestamp</font></pre>
|
||||
<p>For date calculations, we have OffsetDate which allows you to calculate dates such as <i>yesterday</i> and <i>next week</i> in a RDBMS independant fashion. For example, if we want to set a field to 6 hour from now, use:
|
||||
<pre>
|
||||
$sql = 'update table set dtimefld='.$db->OffsetDate($db->sysTimeStamp, 6/24).' where ...';
|
||||
</pre>
|
||||
<p>The maximum length of a char/varchar field is also database specific. You can
|
||||
only assume that field lengths of up to 250 characters are supported. This is
|
||||
normally impractical for web based forum or content management systems. You
|
||||
will need to be familiar with how databases handle large objects (LOBs). ADOdb
|
||||
implements two functions, UpdateBlob( ) and UpdateClob( ) that allow you to
|
||||
update fields holding Binary Large Objects (eg. pictures) and Character Large
|
||||
Objects (eg. HTML articles):</p>
|
||||
<pre><font color=green># for oracle </font>
|
||||
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1,empty_blob())');
|
||||
$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
|
||||
|
||||
<font color=green># non-oracle databases</font>
|
||||
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
|
||||
$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
|
||||
</pre>
|
||||
<p>Null handling is another area where differences can occur. This is a mine-field,
|
||||
because 3-value logic is tricky.
|
||||
<p>In general, I avoid using nulls except for dates and default all my numeric
|
||||
and character fields to 0 or the empty string. This maintains consistency with
|
||||
PHP, where empty strings and zero are treated as equivalent, and avoids SQL
|
||||
ambiguities when you use the ANY and EXISTS operators. However if your database
|
||||
has significant amounts of missing or unknown data, using nulls might be a good
|
||||
idea.
|
||||
<p>
|
||||
ADOdb also supports a portable <a href=http://phplens.com/adodb/reference.functions.concat.html#ifnull>IfNull</a> function, so you can define what to display
|
||||
if the field contains a null.
|
||||
<h3><b>Stored Procedures</b></h3>
|
||||
<p>Stored procedures are another problem area. Some databases allow recordsets
|
||||
to be returned in a stored procedure (Microsoft SQL Server and Sybase), and
|
||||
others only allow output parameters to be returned. Stored procedures sometimes
|
||||
need to be wrapped in special syntax. For example, Oracle requires such code
|
||||
to be wrapped in an anonymous block with BEGIN and END. Also internal sql operators
|
||||
and functions such as +, ||, TRIM( ), SUBSTR( ) or INSTR( ) vary between vendors.
|
||||
</p>
|
||||
<p>An example of how to call a stored procedure with 2 parameters and 1 return
|
||||
value follows:</p>
|
||||
<pre> switch ($db->databaseType) {
|
||||
case '<font color="#993300">mssql</font>':
|
||||
$sql = <font color="#000000"><font color="#993333">'<font color="#993300">SP_RUNSOMETHING</font>'</font></font>; break;
|
||||
case '<font color="#993300">oci8</font>':
|
||||
$sql =
|
||||
<font color="#993300"> </font><font color="#000000"><font color="#993300">"declare RETVAL integer;begin :RETVAL := </font><font color="#000000"><font color="#993333"><font color="#993300">SP_RUNSOMETHING</font></font></font><font color="#993300">(:myid,:group);end;";
|
||||
</font> break;</font>
|
||||
default:
|
||||
die('<font color="#993300">Unsupported feature</font>');
|
||||
}
|
||||
<font color="#000000"><font color="green"> # @RETVAL = SP_RUNSOMETHING @myid,@group</font>
|
||||
$stmt = $db->PrepareSP($sql); <br> $db->Parameter($stmt,$id,'<font color="#993300">myid</font>');
|
||||
$db->Parameter($stmt,$group,'<font color="#993300">group</font>');
|
||||
<font color="green"># true indicates output parameter<br> </font>$db->Parameter($stmt,$ret,'<font color="#993300">RETVAL</font>',true);
|
||||
$db->Execute($stmt); </font></pre>
|
||||
<p>As you can see, the ADOdb API is the same for both databases. But the stored
|
||||
procedure SQL syntax is quite different between databases and is not portable,
|
||||
so be forewarned! However sometimes you have little choice as some systems only
|
||||
allow data to be accessed via stored procedures. This is when the ultimate portability
|
||||
solution might be the only solution: <i>treating portable SQL as a localization
|
||||
exercise...</i></p>
|
||||
<h3><b>SQL as a Localization Exercise</b></h3>
|
||||
<p> In general to provide real portability, you will have to treat SQL coding
|
||||
as a localization exercise. In PHP, it has become common to define separate
|
||||
language files for English, Russian, Korean, etc. Similarly, I would suggest
|
||||
you have separate Sybase, Intebase, MySQL, etc files, and conditionally include
|
||||
the SQL based on the database. For example, each MySQL SQL statement would be
|
||||
stored in a separate variable, in a file called 'mysql-lang.inc.php'.</p>
|
||||
<pre>$sqlGetPassword = '<font color="#993300">select password from users where userid=%s</font>';
|
||||
$sqlSearchKeyword = quot;<font color="#993300">SELECT * FROM articles WHERE match (title,body) against (%s</font>)";</pre>
|
||||
<p>In our main PHP file:</p>
|
||||
<pre><font color=green># define which database to load...</font>
|
||||
<b>$database = '<font color="#993300">mysql</font>';
|
||||
include_once("<font color="#993300">$database-lang.inc.php</font>");</b>
|
||||
|
||||
$db = NewADOConnection($database);
|
||||
$db->PConnect(...) or die('<font color="#993300">Failed to connect to database</font>');
|
||||
|
||||
<font color=green># search for a keyword $word</font>
|
||||
$rs = $db->Execute(sprintf($sqlSearchKeyWord,$db->qstr($word)));</pre>
|
||||
<p>Note that we quote the $word variable using the qstr( ) function. This is because
|
||||
each database quotes strings using different conventions.</p>
|
||||
<p>
|
||||
<h3>Final Thoughts</h3>
|
||||
<p>The best way to ensure that you have portable SQL is to have your data tables designed using
|
||||
sound principles. Learn the theory of normalization and entity-relationship diagrams and model
|
||||
your data carefully. Understand how joins and indexes work and how they are used to tune performance.
|
||||
<p> Visit the following page for more references on database theory and vendors:
|
||||
<a href="http://php.weblogs.com/sql_tutorial">http://php.weblogs.com/sql_tutorial</a>.
|
||||
Also read this article on <a href=http://phplens.com/lens/php-book/optimizing-debugging-php.php>Optimizing PHP</a>.
|
||||
<p>
|
||||
<font size=1>(c) 2002-2003 John Lim.</font>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,290 +1,290 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Tutorial: Moving from MySQL to ADODB</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor=white>
|
||||
<h1>Tutorial: Moving from MySQL to ADODB</h1>
|
||||
|
||||
<pre> You say eether and I say eyether,
|
||||
You say neether and I say nyther;
|
||||
Eether, eyether, neether, nyther -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
You like potato and I like po-tah-to,
|
||||
You like tomato and I like to-mah-to;
|
||||
Potato, po-tah-to, tomato, to-mah-to -
|
||||
Let's call the whole thing off !
|
||||
</pre>
|
||||
<p>I love this song, especially the version with Louis Armstrong and Ella singing
|
||||
duet. It is all about how hard it is for two people in love to be compatible
|
||||
with each other. It's about compromise and finding a common ground, and that's
|
||||
what this article is all about.
|
||||
<p>PHP is all about creating dynamic web-sites with the least fuss and the most
|
||||
fun. To create these websites we need to use databases to retrieve login information,
|
||||
to splash dynamic news onto the web page and store forum postings. So let's
|
||||
say we were using the popular MySQL database for this. Your company has done
|
||||
such a fantastic job that the Web site is more popular than your wildest dreams.
|
||||
You find that MySQL cannot scale to handle the workload; time to switch databases.
|
||||
<p> Unfortunately in PHP every database is accessed slightly differently. To connect
|
||||
to MySQL, you would use <i>mysql_connect()</i>; when you decide to upgrade to
|
||||
Oracle or Microsoft SQL Server, you would use <i>ocilogon() </i>or <i>mssql_connect()</i>
|
||||
respectively. What is worse is that the parameters you use for the different
|
||||
connect functions are different also.. One database says po-tato, the other
|
||||
database says pota-to. Oh-oh.
|
||||
<h3>Let's NOT call the whole thing off</h3>
|
||||
<p>A database wrapper library such as ADODB comes in handy when you need to ensure portability. It provides
|
||||
you with a common API to communicate with any supported database so you don't have to call things off. <p>
|
||||
|
||||
<p>ADODB stands for Active Data Objects DataBase (sorry computer guys are sometimes
|
||||
not very original). ADODB currently supports MySQL, PostgreSQL, Oracle, Interbase,
|
||||
Microsoft SQL Server, Access, FoxPro, Sybase, ODBC and ADO. You can download
|
||||
ADODB from <a href=http://php.weblogs.com/adodb></a><a href="http://php.weblogs.com/adodb">http://php.weblogs.com/adodb</a>.
|
||||
<h3>MySQL Example</h3>
|
||||
<p>The most common database used with PHP is MySQL, so I guess you should be familiar
|
||||
with the following code. It connects to a MySQL server at <i>localhost</i>,
|
||||
database <i>mydb</i>, and executes an SQL select statement. The results are
|
||||
printed, one line per row.
|
||||
<pre><font color="#666600">$db = <b>mysql_connect</b>("localhost", "root", "password");
|
||||
<b>mysql_select_db</b>("mydb",$db);</font>
|
||||
<font color="#660000">$result = <b>mysql_query</b>("SELECT * FROM employees",$db)</font><code><font color="#663300">;
|
||||
if ($result === false) die("failed");</font></code>
|
||||
<font color="#006666"><b>while</b> ($fields =<b> mysql_fetch_row</b>($result)) {
|
||||
<b>for</b> ($i=0, $max=sizeof($fields); $i < $max; $i++) {
|
||||
<b>print</b> $fields[$i].' ';
|
||||
}
|
||||
<b>print</b> "<br>\n";
|
||||
}</font>
|
||||
</pre>
|
||||
<p>The above code has been color-coded by section. The first section is the connection
|
||||
phase. The second is the execution of the SQL, and the last section is displaying
|
||||
the fields. The <i>while</i> loop scans the rows of the result, while the <i>for</i>
|
||||
loop scans the fields in one row.</p>
|
||||
<p>Here is the equivalent code in ADODB</p>
|
||||
<pre><b><font color="#666600"> include("adodb.inc.php");</font></b><font color="#666600">
|
||||
$db = <b>NewADOConnection</b>('mysql');
|
||||
$db-><b>Connect</b>("localhost", "root", "password", "mydb");</font>
|
||||
<font color="#663300">$result = $db-><b>Execute</b>("SELECT * FROM employees");
|
||||
</font><font color="#663300"></font><code><font color="#663300">if ($result === false) die("failed")</font></code><code><font color="#663300">;</font></code>
|
||||
<font color="#006666"><b>while</b> (!$result->EOF) {
|
||||
<b>for</b> ($i=0, $max=$result-><b>FieldCount</b>(); $i < $max; $i++)
|
||||
<b>print</b> $result->fields[$i].' ';
|
||||
$result-><b>MoveNext</b>();
|
||||
<b>print</b> "<br>\n";
|
||||
}</font> </pre>
|
||||
<p></p>
|
||||
<p>Now porting to Oracle is as simple as changing the second line to <code>NewADOConnection('oracle')</code>.
|
||||
Let's walk through the code...</p>
|
||||
<h3>Connecting to the Database</h3>
|
||||
<p></p>
|
||||
<pre><b><font color="#666600">include("adodb.inc.php");</font></b><font color="#666600">
|
||||
$db = <b>NewADOConnection</b>('mysql');
|
||||
$db-><b>Connect</b>("localhost", "root", "password", "mydb");</font></pre>
|
||||
<p>The connection code is a bit more sophisticated than MySQL's because our needs
|
||||
are more sophisticated. In ADODB, we use an object-oriented approach to managing
|
||||
the complexity of handling multiple databases. We have different classes to
|
||||
handle different databases. If you aren't familiar with object-oriented programing,
|
||||
don't worry -- the complexity is all hidden away in the<code> NewADOConnection()</code>
|
||||
function.</p>
|
||||
<p>To conserve memory, we only load the PHP code specific to the database you
|
||||
are connecting to. We do this by calling <code>NewADOConnection(databasedriver)</code>.
|
||||
Legal database drivers include <i>mysql, mssql, oracle, oci8, postgres, sybase,
|
||||
vfp, access, ibase </i>and many others.</p>
|
||||
<p>Then we create a new instance of the connection class by calling <code>NewADOConnection()</code>.
|
||||
Finally we connect to the database using <code>$db->Connect(). </code></p>
|
||||
<h3>Executing the SQL</h3>
|
||||
<p><code><font color="#663300">$result = $db-><b>Execute</b>("SELECT *
|
||||
FROM employees");<br>
|
||||
if ($result === false) die("failed")</font></code><code><font color="#663300">;</font></code>
|
||||
<br>
|
||||
</p>
|
||||
<p>Sending the SQL statement to the server is straight forward. Execute() will
|
||||
return a recordset object on successful execution. You should check $result
|
||||
as we do above.
|
||||
<p>An issue that confuses beginners is the fact that we have two types of objects
|
||||
in ADODB, the connection object and the recordset object. When do we use each?
|
||||
<p>The connection object ($db) is responsible for connecting to the database,
|
||||
formatting your SQL and querying the database server. The recordset object ($result)
|
||||
is responsible for retrieving the results and formatting the reply as text or
|
||||
as an array.
|
||||
<p>The only thing I need to add is that ADODB provides several helper functions
|
||||
for making INSERT and UPDATE statements easier, which we will cover in the Advanced
|
||||
section.
|
||||
<h3>Retrieving the Data<br>
|
||||
</h3>
|
||||
<pre><font color="#006666"><b>while</b> (!$result->EOF) {
|
||||
<b>for</b> ($i=0, $max=$result-><b>FieldCount</b>(); $i < $max; $i++)
|
||||
<b>print</b> $result->fields[$i].' ';
|
||||
$result-><b>MoveNext</b>();
|
||||
<b>print</b> "<br>\n";
|
||||
}</font></pre>
|
||||
<p>The paradigm for getting the data is that it's like reading a file. For every
|
||||
line, we check first whether we have reached the end-of-file (EOF). While not
|
||||
end-of-file, loop through each field in the row. Then move to the next line
|
||||
(MoveNext) and repeat.
|
||||
<p>The <code>$result->fields[]</code> array is generated by the PHP database
|
||||
extension. Some database extensions do not index the array by field name.
|
||||
To force indexing by name - that is associative arrays -
|
||||
use the $ADODB_FETCH_MODE global variable.
|
||||
<pre>
|
||||
$<b>ADODB_FETCH_MODE</b> = ADODB_FETCH_NUM;
|
||||
$rs1 = $db->Execute('select * from table');
|
||||
$<b>ADODB_FETCH_MODE</b> = ADODB_FETCH_ASSOC;
|
||||
$rs2 = $db->Execute('select * from table');
|
||||
print_r($rs1->fields); // shows <i>array([0]=>'v0',[1] =>'v1')</i>
|
||||
print_r($rs2->fields); // shows <i>array(['col1']=>'v0',['col2'] =>'v1')</i>
|
||||
</pre>
|
||||
<p>
|
||||
As you can see in the above example, both recordsets store and use different fetch modes
|
||||
based on the $ADODB_FETCH_MODE setting when the recordset was created by Execute().</p>
|
||||
<h2>ADOConnection<a name="ADOConnection"></a></h2>
|
||||
<p>Object that performs the connection to the database, executes SQL statements
|
||||
and has a set of utility functions for standardising the format of SQL statements
|
||||
for issues such as concatenation and date formats.</p>
|
||||
|
||||
<h3>Other Useful Functions</h3>
|
||||
<p><code>$recordset->Move($pos)</code> scrolls to that particular row. ADODB supports forward
|
||||
scrolling for all databases. Some databases will not support backwards scrolling.
|
||||
This is normally not a problem as you can always cache records to simulate backwards
|
||||
scrolling.
|
||||
<p><code>$recordset->RecordCount()</code> returns the number of records accessed by the
|
||||
SQL statement. Some databases will return -1 because it is not supported.
|
||||
<p><code>$recordset->GetArray()</code> returns the result as an array.
|
||||
<p><code>rs2html($recordset)</code> is a function that is generates a HTML table based on the
|
||||
$recordset passed to it. An example with the relevant lines in bold:
|
||||
<pre> include('adodb.inc.php');
|
||||
<b>include('tohtml.inc.php');</b> /* includes the rs2html function */
|
||||
$conn = ADONewConnection('mysql');
|
||||
$conn->PConnect('localhost','userid','password','database');
|
||||
$rs = $conn->Execute('select * from table');
|
||||
<b> rs2html($rs)</b>; /* recordset to html table */ </pre>
|
||||
<p>There are many other helper functions that are listed in the documentation available at <a href="http://php.weblogs.com/adodb_manual"></a><a href="http://php.weblogs.com/adodb_manual">http://php.weblogs.com/adodb_manual</a>.
|
||||
<h2>Advanced Material</h2>
|
||||
<h3>Inserts and Updates </h3>
|
||||
<p>Let's say you want to insert the following data into a database.
|
||||
<p><b>ID</b> = 3<br>
|
||||
<b>TheDate</b>=mktime(0,0,0,8,31,2001) /* 31st August 2001 */<br>
|
||||
<b>Note</b>= sugar why don't we call it off
|
||||
<p>When you move to another database, your insert might no longer work.</p>
|
||||
<p>The first problem is that each database has a different default date format.
|
||||
MySQL expects YYYY-MM-DD format, while other databases have different defaults.
|
||||
ADODB has a function called DBDate() that addresses this issue by converting
|
||||
converting the date to the correct format.</p>
|
||||
<p>The next problem is that the <b>don't</b> in the Note needs to be quoted. In
|
||||
MySQL, we use <b>don\'t</b> but in some other databases (Sybase, Access, Microsoft
|
||||
SQL Server) we use <b>don''t. </b>The qstr() function addresses this issue.</p>
|
||||
<p>So how do we use the functions? Like this:</p>
|
||||
<pre>$sql = "INSERT INTO table (id, thedate,note) values ("
|
||||
. $<b>ID</b> . ','
|
||||
. $db->DBDate($<b>TheDate</b>) .','
|
||||
. $db->qstr($<b>Note</b>).")";
|
||||
$db->Execute($sql);</pre>
|
||||
<p>ADODB also supports <code>$connection->Affected_Rows()</code> (returns the
|
||||
number of rows affected by last update or delete) and <code>$recordset->Insert_ID()</code>
|
||||
(returns last autoincrement number generated by an insert statement). Be forewarned
|
||||
that not all databases support the two functions.<br>
|
||||
</p>
|
||||
<h3>MetaTypes</h3>
|
||||
<p>You can find out more information about each of the fields (I use the words
|
||||
fields and columns interchangebly) you are selecting by calling the recordset
|
||||
method <code>FetchField($fieldoffset)</code>. This will return an object with
|
||||
3 properties: name, type and max_length.
|
||||
<pre>For example:</pre>
|
||||
<pre>$recordset = $conn->Execute("select adate from table");<br>$f0 = $recordset->FetchField(0);
|
||||
</pre>
|
||||
<p>Then <code>$f0->name</code> will hold <i>'adata'</i>, <code>$f0->type</code>
|
||||
will be set to '<i>date'</i>. If the max_length is unknown, it will be set to
|
||||
-1.
|
||||
<p>One problem with handling different databases is that each database often calls
|
||||
the same type by a different name. For example a <i>timestamp</i> type is called
|
||||
<i>datetime</i> in one database and <i>time</i> in another. So ADODB has a special
|
||||
<code>MetaType($type, $max_length)</code> function that standardises the types
|
||||
to the following:
|
||||
<p>C: character and varchar types<br>
|
||||
X: text or long character (eg. more than 255 bytes wide).<br>
|
||||
B: blob or binary image<br>
|
||||
D: date<br>
|
||||
T: timestamp<br>
|
||||
L: logical (boolean)<br>
|
||||
I: integer<br>
|
||||
N: numeric (float, double, money)
|
||||
<p>In the above date example,
|
||||
<p><code>$recordset = $conn->Execute("select adate from table");<br>
|
||||
$f0 = $recordset->FetchField(0);<br>
|
||||
$type = $recordset->MetaType($f0->type, $f0->max_length);<br>
|
||||
print $type; /* should print 'D'</code> */
|
||||
<p>
|
||||
<p><b>Select Limit and Top Support</b>
|
||||
<p>ADODB has a function called $connection->SelectLimit($sql,$nrows,$offset) that allows
|
||||
you to retrieve a subset of the recordset. This will take advantage of native
|
||||
SELECT TOP on Microsoft products and SELECT ... LIMIT with PostgreSQL and MySQL, and
|
||||
emulated if the database does not support it.
|
||||
<p><b>Caching Support</b>
|
||||
<p>ADODB allows you to cache recordsets in your file system, and only requery the database
|
||||
server after a certain timeout period with $connection->CacheExecute($secs2cache,$sql) and
|
||||
$connection->CacheSelectLimit($secs2cache,$sql,$nrows,$offset).
|
||||
<p><b>PHP4 Session Handler Support</b>
|
||||
<p>ADODB also supports PHP4 session handlers. You can store your session variables
|
||||
in a database for true scalability using ADODB. For further information, visit
|
||||
<a href="http://php.weblogs.com/adodb-sessions"></a><a href="http://php.weblogs.com/adodb-sessions">http://php.weblogs.com/adodb-sessions</a>
|
||||
<h3>Commercial Use Encouraged</h3>
|
||||
<p>If you plan to write commercial PHP applications that you want to resell, you should consider ADODB. It has been released using the lesser GPL, which means you can legally include it in commercial applications, while keeping your code proprietary. Commercial use of ADODB is strongly encouraged! We are using it internally for this reason.<p>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<p>As a thank you for finishing this article, here are the complete lyrics for
|
||||
<i>let's call the whole thing off</i>.<br>
|
||||
<br>
|
||||
<pre>
|
||||
Refrain
|
||||
<br>
|
||||
You say eether and I say eyether,
|
||||
You say neether and I say nyther;
|
||||
Eether, eyether, neether, nyther -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
You like potato and I like po-tah-to,
|
||||
You like tomato and I like to-mah-to;
|
||||
Potato, po-tah-to, tomato, to-mah-to -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
But oh, if we call the whole thing off, then we must part.
|
||||
And oh, if we ever part, then that might break my heart.
|
||||
<br>
|
||||
So, if you like pajamas and I like pa-jah-mas,
|
||||
I'll wear pajamas and give up pa-jah-mas.
|
||||
For we know we
|
||||
Need each other, so we
|
||||
Better call the calling off off.
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
Second Refrain
|
||||
<br>
|
||||
You say laughter and I say lawfter,
|
||||
You say after and I say awfter;
|
||||
Laughter, lawfter, after, awfter -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
You like vanilla and I like vanella,
|
||||
You, sa's'parilla and I sa's'parella;
|
||||
Vanilla, vanella, choc'late, strawb'ry -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
But oh, if we call the whole thing off, then we must part.
|
||||
And oh, if we ever part, then that might break my heart.
|
||||
<br>
|
||||
So, if you go for oysters and I go for ersters,
|
||||
I'll order oysters and cancel the ersters.
|
||||
For we know we
|
||||
Need each other, so we
|
||||
Better call the calling off off.
|
||||
Let's call the whole thing off !
|
||||
</pre>
|
||||
<p><font size=2>Song and lyrics by George and Ira Gershwin, introduced by Fred Astaire and Ginger Rogers
|
||||
in the film "Shall We Dance?" </font><p>
|
||||
<p>
|
||||
(c)2001-2002 John Lim.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Tutorial: Moving from MySQL to ADODB</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor=white>
|
||||
<h1>Tutorial: Moving from MySQL to ADODB</h1>
|
||||
|
||||
<pre> You say eether and I say eyether,
|
||||
You say neether and I say nyther;
|
||||
Eether, eyether, neether, nyther -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
You like potato and I like po-tah-to,
|
||||
You like tomato and I like to-mah-to;
|
||||
Potato, po-tah-to, tomato, to-mah-to -
|
||||
Let's call the whole thing off !
|
||||
</pre>
|
||||
<p>I love this song, especially the version with Louis Armstrong and Ella singing
|
||||
duet. It is all about how hard it is for two people in love to be compatible
|
||||
with each other. It's about compromise and finding a common ground, and that's
|
||||
what this article is all about.
|
||||
<p>PHP is all about creating dynamic web-sites with the least fuss and the most
|
||||
fun. To create these websites we need to use databases to retrieve login information,
|
||||
to splash dynamic news onto the web page and store forum postings. So let's
|
||||
say we were using the popular MySQL database for this. Your company has done
|
||||
such a fantastic job that the Web site is more popular than your wildest dreams.
|
||||
You find that MySQL cannot scale to handle the workload; time to switch databases.
|
||||
<p> Unfortunately in PHP every database is accessed slightly differently. To connect
|
||||
to MySQL, you would use <i>mysql_connect()</i>; when you decide to upgrade to
|
||||
Oracle or Microsoft SQL Server, you would use <i>ocilogon() </i>or <i>mssql_connect()</i>
|
||||
respectively. What is worse is that the parameters you use for the different
|
||||
connect functions are different also.. One database says po-tato, the other
|
||||
database says pota-to. Oh-oh.
|
||||
<h3>Let's NOT call the whole thing off</h3>
|
||||
<p>A database wrapper library such as ADODB comes in handy when you need to ensure portability. It provides
|
||||
you with a common API to communicate with any supported database so you don't have to call things off. <p>
|
||||
|
||||
<p>ADODB stands for Active Data Objects DataBase (sorry computer guys are sometimes
|
||||
not very original). ADODB currently supports MySQL, PostgreSQL, Oracle, Interbase,
|
||||
Microsoft SQL Server, Access, FoxPro, Sybase, ODBC and ADO. You can download
|
||||
ADODB from <a href=http://php.weblogs.com/adodb></a><a href="http://php.weblogs.com/adodb">http://php.weblogs.com/adodb</a>.
|
||||
<h3>MySQL Example</h3>
|
||||
<p>The most common database used with PHP is MySQL, so I guess you should be familiar
|
||||
with the following code. It connects to a MySQL server at <i>localhost</i>,
|
||||
database <i>mydb</i>, and executes an SQL select statement. The results are
|
||||
printed, one line per row.
|
||||
<pre><font color="#666600">$db = <b>mysql_connect</b>("localhost", "root", "password");
|
||||
<b>mysql_select_db</b>("mydb",$db);</font>
|
||||
<font color="#660000">$result = <b>mysql_query</b>("SELECT * FROM employees",$db)</font><code><font color="#663300">;
|
||||
if ($result === false) die("failed");</font></code>
|
||||
<font color="#006666"><b>while</b> ($fields =<b> mysql_fetch_row</b>($result)) {
|
||||
<b>for</b> ($i=0, $max=sizeof($fields); $i < $max; $i++) {
|
||||
<b>print</b> $fields[$i].' ';
|
||||
}
|
||||
<b>print</b> "<br>\n";
|
||||
}</font>
|
||||
</pre>
|
||||
<p>The above code has been color-coded by section. The first section is the connection
|
||||
phase. The second is the execution of the SQL, and the last section is displaying
|
||||
the fields. The <i>while</i> loop scans the rows of the result, while the <i>for</i>
|
||||
loop scans the fields in one row.</p>
|
||||
<p>Here is the equivalent code in ADODB</p>
|
||||
<pre><b><font color="#666600"> include("adodb.inc.php");</font></b><font color="#666600">
|
||||
$db = <b>NewADOConnection</b>('mysql');
|
||||
$db-><b>Connect</b>("localhost", "root", "password", "mydb");</font>
|
||||
<font color="#663300">$result = $db-><b>Execute</b>("SELECT * FROM employees");
|
||||
</font><font color="#663300"></font><code><font color="#663300">if ($result === false) die("failed")</font></code><code><font color="#663300">;</font></code>
|
||||
<font color="#006666"><b>while</b> (!$result->EOF) {
|
||||
<b>for</b> ($i=0, $max=$result-><b>FieldCount</b>(); $i < $max; $i++)
|
||||
<b>print</b> $result->fields[$i].' ';
|
||||
$result-><b>MoveNext</b>();
|
||||
<b>print</b> "<br>\n";
|
||||
}</font> </pre>
|
||||
<p></p>
|
||||
<p>Now porting to Oracle is as simple as changing the second line to <code>NewADOConnection('oracle')</code>.
|
||||
Let's walk through the code...</p>
|
||||
<h3>Connecting to the Database</h3>
|
||||
<p></p>
|
||||
<pre><b><font color="#666600">include("adodb.inc.php");</font></b><font color="#666600">
|
||||
$db = <b>NewADOConnection</b>('mysql');
|
||||
$db-><b>Connect</b>("localhost", "root", "password", "mydb");</font></pre>
|
||||
<p>The connection code is a bit more sophisticated than MySQL's because our needs
|
||||
are more sophisticated. In ADODB, we use an object-oriented approach to managing
|
||||
the complexity of handling multiple databases. We have different classes to
|
||||
handle different databases. If you aren't familiar with object-oriented programing,
|
||||
don't worry -- the complexity is all hidden away in the<code> NewADOConnection()</code>
|
||||
function.</p>
|
||||
<p>To conserve memory, we only load the PHP code specific to the database you
|
||||
are connecting to. We do this by calling <code>NewADOConnection(databasedriver)</code>.
|
||||
Legal database drivers include <i>mysql, mssql, oracle, oci8, postgres, sybase,
|
||||
vfp, access, ibase </i>and many others.</p>
|
||||
<p>Then we create a new instance of the connection class by calling <code>NewADOConnection()</code>.
|
||||
Finally we connect to the database using <code>$db->Connect(). </code></p>
|
||||
<h3>Executing the SQL</h3>
|
||||
<p><code><font color="#663300">$result = $db-><b>Execute</b>("SELECT *
|
||||
FROM employees");<br>
|
||||
if ($result === false) die("failed")</font></code><code><font color="#663300">;</font></code>
|
||||
<br>
|
||||
</p>
|
||||
<p>Sending the SQL statement to the server is straight forward. Execute() will
|
||||
return a recordset object on successful execution. You should check $result
|
||||
as we do above.
|
||||
<p>An issue that confuses beginners is the fact that we have two types of objects
|
||||
in ADODB, the connection object and the recordset object. When do we use each?
|
||||
<p>The connection object ($db) is responsible for connecting to the database,
|
||||
formatting your SQL and querying the database server. The recordset object ($result)
|
||||
is responsible for retrieving the results and formatting the reply as text or
|
||||
as an array.
|
||||
<p>The only thing I need to add is that ADODB provides several helper functions
|
||||
for making INSERT and UPDATE statements easier, which we will cover in the Advanced
|
||||
section.
|
||||
<h3>Retrieving the Data<br>
|
||||
</h3>
|
||||
<pre><font color="#006666"><b>while</b> (!$result->EOF) {
|
||||
<b>for</b> ($i=0, $max=$result-><b>FieldCount</b>(); $i < $max; $i++)
|
||||
<b>print</b> $result->fields[$i].' ';
|
||||
$result-><b>MoveNext</b>();
|
||||
<b>print</b> "<br>\n";
|
||||
}</font></pre>
|
||||
<p>The paradigm for getting the data is that it's like reading a file. For every
|
||||
line, we check first whether we have reached the end-of-file (EOF). While not
|
||||
end-of-file, loop through each field in the row. Then move to the next line
|
||||
(MoveNext) and repeat.
|
||||
<p>The <code>$result->fields[]</code> array is generated by the PHP database
|
||||
extension. Some database extensions do not index the array by field name.
|
||||
To force indexing by name - that is associative arrays -
|
||||
use the $ADODB_FETCH_MODE global variable.
|
||||
<pre>
|
||||
$<b>ADODB_FETCH_MODE</b> = ADODB_FETCH_NUM;
|
||||
$rs1 = $db->Execute('select * from table');
|
||||
$<b>ADODB_FETCH_MODE</b> = ADODB_FETCH_ASSOC;
|
||||
$rs2 = $db->Execute('select * from table');
|
||||
print_r($rs1->fields); // shows <i>array([0]=>'v0',[1] =>'v1')</i>
|
||||
print_r($rs2->fields); // shows <i>array(['col1']=>'v0',['col2'] =>'v1')</i>
|
||||
</pre>
|
||||
<p>
|
||||
As you can see in the above example, both recordsets store and use different fetch modes
|
||||
based on the $ADODB_FETCH_MODE setting when the recordset was created by Execute().</p>
|
||||
<h2>ADOConnection<a name="ADOConnection"></a></h2>
|
||||
<p>Object that performs the connection to the database, executes SQL statements
|
||||
and has a set of utility functions for standardising the format of SQL statements
|
||||
for issues such as concatenation and date formats.</p>
|
||||
|
||||
<h3>Other Useful Functions</h3>
|
||||
<p><code>$recordset->Move($pos)</code> scrolls to that particular row. ADODB supports forward
|
||||
scrolling for all databases. Some databases will not support backwards scrolling.
|
||||
This is normally not a problem as you can always cache records to simulate backwards
|
||||
scrolling.
|
||||
<p><code>$recordset->RecordCount()</code> returns the number of records accessed by the
|
||||
SQL statement. Some databases will return -1 because it is not supported.
|
||||
<p><code>$recordset->GetArray()</code> returns the result as an array.
|
||||
<p><code>rs2html($recordset)</code> is a function that is generates a HTML table based on the
|
||||
$recordset passed to it. An example with the relevant lines in bold:
|
||||
<pre> include('adodb.inc.php');
|
||||
<b>include('tohtml.inc.php');</b> /* includes the rs2html function */
|
||||
$conn = ADONewConnection('mysql');
|
||||
$conn->PConnect('localhost','userid','password','database');
|
||||
$rs = $conn->Execute('select * from table');
|
||||
<b> rs2html($rs)</b>; /* recordset to html table */ </pre>
|
||||
<p>There are many other helper functions that are listed in the documentation available at <a href="http://php.weblogs.com/adodb_manual"></a><a href="http://php.weblogs.com/adodb_manual">http://php.weblogs.com/adodb_manual</a>.
|
||||
<h2>Advanced Material</h2>
|
||||
<h3>Inserts and Updates </h3>
|
||||
<p>Let's say you want to insert the following data into a database.
|
||||
<p><b>ID</b> = 3<br>
|
||||
<b>TheDate</b>=mktime(0,0,0,8,31,2001) /* 31st August 2001 */<br>
|
||||
<b>Note</b>= sugar why don't we call it off
|
||||
<p>When you move to another database, your insert might no longer work.</p>
|
||||
<p>The first problem is that each database has a different default date format.
|
||||
MySQL expects YYYY-MM-DD format, while other databases have different defaults.
|
||||
ADODB has a function called DBDate() that addresses this issue by converting
|
||||
converting the date to the correct format.</p>
|
||||
<p>The next problem is that the <b>don't</b> in the Note needs to be quoted. In
|
||||
MySQL, we use <b>don\'t</b> but in some other databases (Sybase, Access, Microsoft
|
||||
SQL Server) we use <b>don''t. </b>The qstr() function addresses this issue.</p>
|
||||
<p>So how do we use the functions? Like this:</p>
|
||||
<pre>$sql = "INSERT INTO table (id, thedate,note) values ("
|
||||
. $<b>ID</b> . ','
|
||||
. $db->DBDate($<b>TheDate</b>) .','
|
||||
. $db->qstr($<b>Note</b>).")";
|
||||
$db->Execute($sql);</pre>
|
||||
<p>ADODB also supports <code>$connection->Affected_Rows()</code> (returns the
|
||||
number of rows affected by last update or delete) and <code>$recordset->Insert_ID()</code>
|
||||
(returns last autoincrement number generated by an insert statement). Be forewarned
|
||||
that not all databases support the two functions.<br>
|
||||
</p>
|
||||
<h3>MetaTypes</h3>
|
||||
<p>You can find out more information about each of the fields (I use the words
|
||||
fields and columns interchangebly) you are selecting by calling the recordset
|
||||
method <code>FetchField($fieldoffset)</code>. This will return an object with
|
||||
3 properties: name, type and max_length.
|
||||
<pre>For example:</pre>
|
||||
<pre>$recordset = $conn->Execute("select adate from table");<br>$f0 = $recordset->FetchField(0);
|
||||
</pre>
|
||||
<p>Then <code>$f0->name</code> will hold <i>'adata'</i>, <code>$f0->type</code>
|
||||
will be set to '<i>date'</i>. If the max_length is unknown, it will be set to
|
||||
-1.
|
||||
<p>One problem with handling different databases is that each database often calls
|
||||
the same type by a different name. For example a <i>timestamp</i> type is called
|
||||
<i>datetime</i> in one database and <i>time</i> in another. So ADODB has a special
|
||||
<code>MetaType($type, $max_length)</code> function that standardises the types
|
||||
to the following:
|
||||
<p>C: character and varchar types<br>
|
||||
X: text or long character (eg. more than 255 bytes wide).<br>
|
||||
B: blob or binary image<br>
|
||||
D: date<br>
|
||||
T: timestamp<br>
|
||||
L: logical (boolean)<br>
|
||||
I: integer<br>
|
||||
N: numeric (float, double, money)
|
||||
<p>In the above date example,
|
||||
<p><code>$recordset = $conn->Execute("select adate from table");<br>
|
||||
$f0 = $recordset->FetchField(0);<br>
|
||||
$type = $recordset->MetaType($f0->type, $f0->max_length);<br>
|
||||
print $type; /* should print 'D'</code> */
|
||||
<p>
|
||||
<p><b>Select Limit and Top Support</b>
|
||||
<p>ADODB has a function called $connection->SelectLimit($sql,$nrows,$offset) that allows
|
||||
you to retrieve a subset of the recordset. This will take advantage of native
|
||||
SELECT TOP on Microsoft products and SELECT ... LIMIT with PostgreSQL and MySQL, and
|
||||
emulated if the database does not support it.
|
||||
<p><b>Caching Support</b>
|
||||
<p>ADODB allows you to cache recordsets in your file system, and only requery the database
|
||||
server after a certain timeout period with $connection->CacheExecute($secs2cache,$sql) and
|
||||
$connection->CacheSelectLimit($secs2cache,$sql,$nrows,$offset).
|
||||
<p><b>PHP4 Session Handler Support</b>
|
||||
<p>ADODB also supports PHP4 session handlers. You can store your session variables
|
||||
in a database for true scalability using ADODB. For further information, visit
|
||||
<a href="http://php.weblogs.com/adodb-sessions"></a><a href="http://php.weblogs.com/adodb-sessions">http://php.weblogs.com/adodb-sessions</a>
|
||||
<h3>Commercial Use Encouraged</h3>
|
||||
<p>If you plan to write commercial PHP applications that you want to resell, you should consider ADODB. It has been released using the lesser GPL, which means you can legally include it in commercial applications, while keeping your code proprietary. Commercial use of ADODB is strongly encouraged! We are using it internally for this reason.<p>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<p>As a thank you for finishing this article, here are the complete lyrics for
|
||||
<i>let's call the whole thing off</i>.<br>
|
||||
<br>
|
||||
<pre>
|
||||
Refrain
|
||||
<br>
|
||||
You say eether and I say eyether,
|
||||
You say neether and I say nyther;
|
||||
Eether, eyether, neether, nyther -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
You like potato and I like po-tah-to,
|
||||
You like tomato and I like to-mah-to;
|
||||
Potato, po-tah-to, tomato, to-mah-to -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
But oh, if we call the whole thing off, then we must part.
|
||||
And oh, if we ever part, then that might break my heart.
|
||||
<br>
|
||||
So, if you like pajamas and I like pa-jah-mas,
|
||||
I'll wear pajamas and give up pa-jah-mas.
|
||||
For we know we
|
||||
Need each other, so we
|
||||
Better call the calling off off.
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
Second Refrain
|
||||
<br>
|
||||
You say laughter and I say lawfter,
|
||||
You say after and I say awfter;
|
||||
Laughter, lawfter, after, awfter -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
You like vanilla and I like vanella,
|
||||
You, sa's'parilla and I sa's'parella;
|
||||
Vanilla, vanella, choc'late, strawb'ry -
|
||||
Let's call the whole thing off !
|
||||
<br>
|
||||
But oh, if we call the whole thing off, then we must part.
|
||||
And oh, if we ever part, then that might break my heart.
|
||||
<br>
|
||||
So, if you go for oysters and I go for ersters,
|
||||
I'll order oysters and cancel the ersters.
|
||||
For we know we
|
||||
Need each other, so we
|
||||
Better call the calling off off.
|
||||
Let's call the whole thing off !
|
||||
</pre>
|
||||
<p><font size=2>Song and lyrics by George and Ira Gershwin, introduced by Fred Astaire and Ginger Rogers
|
||||
in the film "Shall We Dance?" </font><p>
|
||||
<p>
|
||||
(c)2001-2002 John Lim.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
// Chinese language file contributed by "Cuiyan (cysoft)" cysoft#php.net.
|
||||
// Encode by GB2312
|
||||
// Simplified Chinese
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'cn',
|
||||
DB_ERROR => '未知错误',
|
||||
DB_ERROR_ALREADY_EXISTS => '已经存在',
|
||||
DB_ERROR_CANNOT_CREATE => '不能创建',
|
||||
DB_ERROR_CANNOT_DELETE => '不能删除',
|
||||
DB_ERROR_CANNOT_DROP => '不能丢弃',
|
||||
DB_ERROR_CONSTRAINT => '约束限制',
|
||||
DB_ERROR_DIVZERO => '被0除',
|
||||
DB_ERROR_INVALID => '无效',
|
||||
DB_ERROR_INVALID_DATE => '无效的日期或者时间',
|
||||
DB_ERROR_INVALID_NUMBER => '无效的数字',
|
||||
DB_ERROR_MISMATCH => '不匹配',
|
||||
DB_ERROR_NODBSELECTED => '没有数据库被选择',
|
||||
DB_ERROR_NOSUCHFIELD => '没有相应的字段',
|
||||
DB_ERROR_NOSUCHTABLE => '没有相应的表',
|
||||
DB_ERROR_NOT_CAPABLE => '数据库后台不兼容',
|
||||
DB_ERROR_NOT_FOUND => '没有发现',
|
||||
DB_ERROR_NOT_LOCKED => '没有被锁定',
|
||||
DB_ERROR_SYNTAX => '语法错误',
|
||||
DB_ERROR_UNSUPPORTED => '不支持',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => '在行上累计值',
|
||||
DB_ERROR_INVALID_DSN => '无效的数据源 (DSN)',
|
||||
DB_ERROR_CONNECT_FAILED => '连接失败',
|
||||
0 => '没有错误', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => '提供的数据不能符合要求',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> '扩展没有被发现',
|
||||
DB_ERROR_NOSUCHDB => '没有相应的数据库',
|
||||
DB_ERROR_ACCESS_VIOLATION => '没有合适的权限'
|
||||
);
|
||||
<?php
|
||||
// Chinese language file contributed by "Cuiyan (cysoft)" cysoft#php.net.
|
||||
// Encode by GB2312
|
||||
// Simplified Chinese
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'cn',
|
||||
DB_ERROR => '未知错误',
|
||||
DB_ERROR_ALREADY_EXISTS => '已经存在',
|
||||
DB_ERROR_CANNOT_CREATE => '不能创建',
|
||||
DB_ERROR_CANNOT_DELETE => '不能删除',
|
||||
DB_ERROR_CANNOT_DROP => '不能丢弃',
|
||||
DB_ERROR_CONSTRAINT => '约束限制',
|
||||
DB_ERROR_DIVZERO => '被0除',
|
||||
DB_ERROR_INVALID => '无效',
|
||||
DB_ERROR_INVALID_DATE => '无效的日期或者时间',
|
||||
DB_ERROR_INVALID_NUMBER => '无效的数字',
|
||||
DB_ERROR_MISMATCH => '不匹配',
|
||||
DB_ERROR_NODBSELECTED => '没有数据库被选择',
|
||||
DB_ERROR_NOSUCHFIELD => '没有相应的字段',
|
||||
DB_ERROR_NOSUCHTABLE => '没有相应的表',
|
||||
DB_ERROR_NOT_CAPABLE => '数据库后台不兼容',
|
||||
DB_ERROR_NOT_FOUND => '没有发现',
|
||||
DB_ERROR_NOT_LOCKED => '没有被锁定',
|
||||
DB_ERROR_SYNTAX => '语法错误',
|
||||
DB_ERROR_UNSUPPORTED => '不支持',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => '在行上累计值',
|
||||
DB_ERROR_INVALID_DSN => '无效的数据源 (DSN)',
|
||||
DB_ERROR_CONNECT_FAILED => '连接失败',
|
||||
0 => '没有错误', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => '提供的数据不能符合要求',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> '扩展没有被发现',
|
||||
DB_ERROR_NOSUCHDB => '没有相应的数据库',
|
||||
DB_ERROR_ACCESS_VIOLATION => '没有合适的权限'
|
||||
);
|
||||
?>
|
||||
@@ -1,40 +1,40 @@
|
||||
<?php
|
||||
|
||||
# Czech language, encoding by ISO 8859-2 charset (Iso Latin-2)
|
||||
# For convert to MS Windows use shell command:
|
||||
# iconv -f ISO_8859-2 -t CP1250 < adodb-cz.inc.php
|
||||
# For convert to ASCII use shell command:
|
||||
# unaccent ISO_8859-2 < adodb-cz.inc.php
|
||||
# v1.0, 19.06.2003 Kamil Jakubovic <jake@host.sk>
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'cz',
|
||||
DB_ERROR => 'neznámá chyba',
|
||||
DB_ERROR_ALREADY_EXISTS => 'ji? existuje',
|
||||
DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it',
|
||||
DB_ERROR_CANNOT_DELETE => 'nelze smazat',
|
||||
DB_ERROR_CANNOT_DROP => 'nelze odstranit',
|
||||
DB_ERROR_CONSTRAINT => 'poru?ení omezující podmínky',
|
||||
DB_ERROR_DIVZERO => 'd?lení nulou',
|
||||
DB_ERROR_INVALID => 'neplatné',
|
||||
DB_ERROR_INVALID_DATE => 'neplatné datum nebo ?as',
|
||||
DB_ERROR_INVALID_NUMBER => 'neplatné ?íslo',
|
||||
DB_ERROR_MISMATCH => 'nesouhlasí',
|
||||
DB_ERROR_NODBSELECTED => '?ádná databáze není vybrána',
|
||||
DB_ERROR_NOSUCHFIELD => 'pole nenalezeno',
|
||||
DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena',
|
||||
DB_ERROR_NOT_CAPABLE => 'nepodporováno',
|
||||
DB_ERROR_NOT_FOUND => 'nenalezeno',
|
||||
DB_ERROR_NOT_LOCKED => 'nezam?eno',
|
||||
DB_ERROR_SYNTAX => 'syntaktická chyba',
|
||||
DB_ERROR_UNSUPPORTED => 'nepodporováno',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => '',
|
||||
DB_ERROR_INVALID_DSN => 'neplatné DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'p?ipojení selhalo',
|
||||
0 => 'bez chyb', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'málo zdrojových dat',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'roz?í?ení nenalezeno',
|
||||
DB_ERROR_NOSUCHDB => 'databáze neexistuje',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'nedostate?ná práva'
|
||||
);
|
||||
<?php
|
||||
|
||||
# Czech language, encoding by ISO 8859-2 charset (Iso Latin-2)
|
||||
# For convert to MS Windows use shell command:
|
||||
# iconv -f ISO_8859-2 -t CP1250 < adodb-cz.inc.php
|
||||
# For convert to ASCII use shell command:
|
||||
# unaccent ISO_8859-2 < adodb-cz.inc.php
|
||||
# v1.0, 19.06.2003 Kamil Jakubovic <jake@host.sk>
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'cz',
|
||||
DB_ERROR => 'neznámá chyba',
|
||||
DB_ERROR_ALREADY_EXISTS => 'ji? existuje',
|
||||
DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it',
|
||||
DB_ERROR_CANNOT_DELETE => 'nelze smazat',
|
||||
DB_ERROR_CANNOT_DROP => 'nelze odstranit',
|
||||
DB_ERROR_CONSTRAINT => 'poru?ení omezující podmínky',
|
||||
DB_ERROR_DIVZERO => 'd?lení nulou',
|
||||
DB_ERROR_INVALID => 'neplatné',
|
||||
DB_ERROR_INVALID_DATE => 'neplatné datum nebo ?as',
|
||||
DB_ERROR_INVALID_NUMBER => 'neplatné ?íslo',
|
||||
DB_ERROR_MISMATCH => 'nesouhlasí',
|
||||
DB_ERROR_NODBSELECTED => '?ádná databáze není vybrána',
|
||||
DB_ERROR_NOSUCHFIELD => 'pole nenalezeno',
|
||||
DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena',
|
||||
DB_ERROR_NOT_CAPABLE => 'nepodporováno',
|
||||
DB_ERROR_NOT_FOUND => 'nenalezeno',
|
||||
DB_ERROR_NOT_LOCKED => 'nezam?eno',
|
||||
DB_ERROR_SYNTAX => 'syntaktická chyba',
|
||||
DB_ERROR_UNSUPPORTED => 'nepodporováno',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => '',
|
||||
DB_ERROR_INVALID_DSN => 'neplatné DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'p?ipojení selhalo',
|
||||
0 => 'bez chyb', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'málo zdrojových dat',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'roz?í?ení nenalezeno',
|
||||
DB_ERROR_NOSUCHDB => 'databáze neexistuje',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'nedostate?ná práva'
|
||||
);
|
||||
?>
|
||||
@@ -1,33 +1,33 @@
|
||||
<?php
|
||||
// contributed by "Heinz Hombergs" <opn@hhombergs.de>
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'de',
|
||||
DB_ERROR => 'Unbekannter Fehler',
|
||||
DB_ERROR_ALREADY_EXISTS => 'existiert bereits',
|
||||
DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen',
|
||||
DB_ERROR_CANNOT_DELETE => 'kann nicht löschen',
|
||||
DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden',
|
||||
DB_ERROR_CONSTRAINT => 'Constraint Verletzung',
|
||||
DB_ERROR_DIVZERO => 'Division durch Null',
|
||||
DB_ERROR_INVALID => 'ung¨ltig',
|
||||
DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit',
|
||||
DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl',
|
||||
DB_ERROR_MISMATCH => 'Unverträglichkeit',
|
||||
DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt',
|
||||
DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden',
|
||||
DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden',
|
||||
DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert',
|
||||
DB_ERROR_NOT_FOUND => 'nicht gefunden',
|
||||
DB_ERROR_NOT_LOCKED => 'nicht gesperrt',
|
||||
DB_ERROR_SYNTAX => 'Syntaxfehler',
|
||||
DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage',
|
||||
DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden',
|
||||
0 => 'kein Fehler', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden',
|
||||
DB_ERROR_NOSUCHDB => 'keine Datenbank',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte'
|
||||
);
|
||||
<?php
|
||||
// contributed by "Heinz Hombergs" <opn@hhombergs.de>
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'de',
|
||||
DB_ERROR => 'Unbekannter Fehler',
|
||||
DB_ERROR_ALREADY_EXISTS => 'existiert bereits',
|
||||
DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen',
|
||||
DB_ERROR_CANNOT_DELETE => 'kann nicht löschen',
|
||||
DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden',
|
||||
DB_ERROR_CONSTRAINT => 'Constraint Verletzung',
|
||||
DB_ERROR_DIVZERO => 'Division durch Null',
|
||||
DB_ERROR_INVALID => 'ung¨ltig',
|
||||
DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit',
|
||||
DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl',
|
||||
DB_ERROR_MISMATCH => 'Unverträglichkeit',
|
||||
DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt',
|
||||
DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden',
|
||||
DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden',
|
||||
DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert',
|
||||
DB_ERROR_NOT_FOUND => 'nicht gefunden',
|
||||
DB_ERROR_NOT_LOCKED => 'nicht gesperrt',
|
||||
DB_ERROR_SYNTAX => 'Syntaxfehler',
|
||||
DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage',
|
||||
DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden',
|
||||
0 => 'kein Fehler', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden',
|
||||
DB_ERROR_NOSUCHDB => 'keine Datenbank',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte'
|
||||
);
|
||||
?>
|
||||
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
|
||||
/* Farsi - by "Peyman Hooshmandi Raad" <phooshmand#gmail.com> */
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'fa',
|
||||
DB_ERROR => 'خطای ناشناخته',
|
||||
DB_ERROR_ALREADY_EXISTS => 'وجود دارد',
|
||||
DB_ERROR_CANNOT_CREATE => 'امکان create وجود ندارد',
|
||||
DB_ERROR_CANNOT_DELETE => 'امکان حذف وجود ندارد',
|
||||
DB_ERROR_CANNOT_DROP => 'امکان drop وجود ندارد',
|
||||
DB_ERROR_CONSTRAINT => 'نقض شرط',
|
||||
DB_ERROR_DIVZERO => 'تقسیم بر صفر',
|
||||
DB_ERROR_INVALID => 'نامعتبر',
|
||||
DB_ERROR_INVALID_DATE => 'زمان یا تاریخ نامعتبر',
|
||||
DB_ERROR_INVALID_NUMBER => 'عدد نامعتبر',
|
||||
DB_ERROR_MISMATCH => 'عدم مطابقت',
|
||||
DB_ERROR_NODBSELECTED => 'بانک اطلاعاتی انتخاب نشده است',
|
||||
DB_ERROR_NOSUCHFIELD => 'چنین ستونی وجود ندارد',
|
||||
DB_ERROR_NOSUCHTABLE => 'چنین جدولی وجود ندارد',
|
||||
DB_ERROR_NOT_CAPABLE => 'backend بانک اطلاعاتی قادر نیست',
|
||||
DB_ERROR_NOT_FOUND => 'پیدا نشد',
|
||||
DB_ERROR_NOT_LOCKED => 'قفل نشده',
|
||||
DB_ERROR_SYNTAX => 'خطای دستوری',
|
||||
DB_ERROR_UNSUPPORTED => 'پشتیبانی نمی شود',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'شمارش مقادیر روی ردیف',
|
||||
DB_ERROR_INVALID_DSN => 'DSN نامعتبر',
|
||||
DB_ERROR_CONNECT_FAILED => 'ارتباط برقرار نشد',
|
||||
0 => 'بدون خطا', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'داده ناکافی است',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'extension پیدا نشد',
|
||||
DB_ERROR_NOSUCHDB => 'چنین بانک اطلاعاتی وجود ندارد',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'حق دسترسی ناکافی'
|
||||
);
|
||||
<?php
|
||||
|
||||
/* Farsi - by "Peyman Hooshmandi Raad" <phooshmand#gmail.com> */
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'fa',
|
||||
DB_ERROR => 'خطای ناشناخته',
|
||||
DB_ERROR_ALREADY_EXISTS => 'وجود دارد',
|
||||
DB_ERROR_CANNOT_CREATE => 'امکان create وجود ندارد',
|
||||
DB_ERROR_CANNOT_DELETE => 'امکان حذف وجود ندارد',
|
||||
DB_ERROR_CANNOT_DROP => 'امکان drop وجود ندارد',
|
||||
DB_ERROR_CONSTRAINT => 'نقض شرط',
|
||||
DB_ERROR_DIVZERO => 'تقسیم بر صفر',
|
||||
DB_ERROR_INVALID => 'نامعتبر',
|
||||
DB_ERROR_INVALID_DATE => 'زمان یا تاریخ نامعتبر',
|
||||
DB_ERROR_INVALID_NUMBER => 'عدد نامعتبر',
|
||||
DB_ERROR_MISMATCH => 'عدم مطابقت',
|
||||
DB_ERROR_NODBSELECTED => 'بانک اطلاعاتی انتخاب نشده است',
|
||||
DB_ERROR_NOSUCHFIELD => 'چنین ستونی وجود ندارد',
|
||||
DB_ERROR_NOSUCHTABLE => 'چنین جدولی وجود ندارد',
|
||||
DB_ERROR_NOT_CAPABLE => 'backend بانک اطلاعاتی قادر نیست',
|
||||
DB_ERROR_NOT_FOUND => 'پیدا نشد',
|
||||
DB_ERROR_NOT_LOCKED => 'قفل نشده',
|
||||
DB_ERROR_SYNTAX => 'خطای دستوری',
|
||||
DB_ERROR_UNSUPPORTED => 'پشتیبانی نمی شود',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'شمارش مقادیر روی ردیف',
|
||||
DB_ERROR_INVALID_DSN => 'DSN نامعتبر',
|
||||
DB_ERROR_CONNECT_FAILED => 'ارتباط برقرار نشد',
|
||||
0 => 'بدون خطا', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'داده ناکافی است',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'extension پیدا نشد',
|
||||
DB_ERROR_NOSUCHDB => 'چنین بانک اطلاعاتی وجود ندارد',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'حق دسترسی ناکافی'
|
||||
);
|
||||
?>
|
||||
@@ -1,33 +1,33 @@
|
||||
<?php
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'fr',
|
||||
DB_ERROR => 'erreur inconnue',
|
||||
DB_ERROR_ALREADY_EXISTS => 'existe déjà',
|
||||
DB_ERROR_CANNOT_CREATE => 'crétion impossible',
|
||||
DB_ERROR_CANNOT_DELETE => 'effacement impossible',
|
||||
DB_ERROR_CANNOT_DROP => 'suppression impossible',
|
||||
DB_ERROR_CONSTRAINT => 'violation de contrainte',
|
||||
DB_ERROR_DIVZERO => 'division par zéro',
|
||||
DB_ERROR_INVALID => 'invalide',
|
||||
DB_ERROR_INVALID_DATE => 'date ou heure invalide',
|
||||
DB_ERROR_INVALID_NUMBER => 'nombre invalide',
|
||||
DB_ERROR_MISMATCH => 'erreur de concordance',
|
||||
DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée',
|
||||
DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide',
|
||||
DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante',
|
||||
DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée',
|
||||
DB_ERROR_NOT_FOUND => 'pas trouvé',
|
||||
DB_ERROR_NOT_LOCKED => 'non verrouillé',
|
||||
DB_ERROR_SYNTAX => 'erreur de syntaxe',
|
||||
DB_ERROR_UNSUPPORTED => 'non supporté',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne',
|
||||
DB_ERROR_INVALID_DSN => 'DSN invalide',
|
||||
DB_ERROR_CONNECT_FAILED => 'échec à la connexion',
|
||||
0 => "pas d'erreur", // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée',
|
||||
DB_ERROR_NOSUCHDB => 'base de données inconnue',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants'
|
||||
);
|
||||
<?php
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'fr',
|
||||
DB_ERROR => 'erreur inconnue',
|
||||
DB_ERROR_ALREADY_EXISTS => 'existe déjà',
|
||||
DB_ERROR_CANNOT_CREATE => 'crétion impossible',
|
||||
DB_ERROR_CANNOT_DELETE => 'effacement impossible',
|
||||
DB_ERROR_CANNOT_DROP => 'suppression impossible',
|
||||
DB_ERROR_CONSTRAINT => 'violation de contrainte',
|
||||
DB_ERROR_DIVZERO => 'division par zéro',
|
||||
DB_ERROR_INVALID => 'invalide',
|
||||
DB_ERROR_INVALID_DATE => 'date ou heure invalide',
|
||||
DB_ERROR_INVALID_NUMBER => 'nombre invalide',
|
||||
DB_ERROR_MISMATCH => 'erreur de concordance',
|
||||
DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée',
|
||||
DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide',
|
||||
DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante',
|
||||
DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée',
|
||||
DB_ERROR_NOT_FOUND => 'pas trouvé',
|
||||
DB_ERROR_NOT_LOCKED => 'non verrouillé',
|
||||
DB_ERROR_SYNTAX => 'erreur de syntaxe',
|
||||
DB_ERROR_UNSUPPORTED => 'non supporté',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne',
|
||||
DB_ERROR_INVALID_DSN => 'DSN invalide',
|
||||
DB_ERROR_CONNECT_FAILED => 'échec à la connexion',
|
||||
0 => "pas d'erreur", // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée',
|
||||
DB_ERROR_NOSUCHDB => 'base de données inconnue',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants'
|
||||
);
|
||||
?>
|
||||
@@ -1,34 +1,34 @@
|
||||
<?php
|
||||
// Italian language file contributed by Tiraboschi Massimiliano aka TiMax
|
||||
// www.maxdev.com timax@maxdev.com
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'it',
|
||||
DB_ERROR => 'errore sconosciuto',
|
||||
DB_ERROR_ALREADY_EXISTS => 'esiste già',
|
||||
DB_ERROR_CANNOT_CREATE => 'non posso creare',
|
||||
DB_ERROR_CANNOT_DELETE => 'non posso cancellare',
|
||||
DB_ERROR_CANNOT_DROP => 'non posso eliminare',
|
||||
DB_ERROR_CONSTRAINT => 'violazione constraint',
|
||||
DB_ERROR_DIVZERO => 'divisione per zero',
|
||||
DB_ERROR_INVALID => 'non valido',
|
||||
DB_ERROR_INVALID_DATE => 'data od ora non valida',
|
||||
DB_ERROR_INVALID_NUMBER => 'numero non valido',
|
||||
DB_ERROR_MISMATCH => 'diversi',
|
||||
DB_ERROR_NODBSELECTED => 'nessun database selezionato',
|
||||
DB_ERROR_NOSUCHFIELD => 'nessun campo trovato',
|
||||
DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato',
|
||||
DB_ERROR_NOT_FOUND => 'non trovato',
|
||||
DB_ERROR_NOT_LOCKED => 'non bloccato',
|
||||
DB_ERROR_SYNTAX => 'errore di sintassi',
|
||||
DB_ERROR_UNSUPPORTED => 'non supportato',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna',
|
||||
DB_ERROR_INVALID_DSN => 'DSN non valido',
|
||||
DB_ERROR_CONNECT_FAILED => 'connessione fallita',
|
||||
0 => 'nessun errore', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata',
|
||||
DB_ERROR_NOSUCHDB => 'database non trovato',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti'
|
||||
);
|
||||
<?php
|
||||
// Italian language file contributed by Tiraboschi Massimiliano aka TiMax
|
||||
// www.maxdev.com timax@maxdev.com
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'it',
|
||||
DB_ERROR => 'errore sconosciuto',
|
||||
DB_ERROR_ALREADY_EXISTS => 'esiste già',
|
||||
DB_ERROR_CANNOT_CREATE => 'non posso creare',
|
||||
DB_ERROR_CANNOT_DELETE => 'non posso cancellare',
|
||||
DB_ERROR_CANNOT_DROP => 'non posso eliminare',
|
||||
DB_ERROR_CONSTRAINT => 'violazione constraint',
|
||||
DB_ERROR_DIVZERO => 'divisione per zero',
|
||||
DB_ERROR_INVALID => 'non valido',
|
||||
DB_ERROR_INVALID_DATE => 'data od ora non valida',
|
||||
DB_ERROR_INVALID_NUMBER => 'numero non valido',
|
||||
DB_ERROR_MISMATCH => 'diversi',
|
||||
DB_ERROR_NODBSELECTED => 'nessun database selezionato',
|
||||
DB_ERROR_NOSUCHFIELD => 'nessun campo trovato',
|
||||
DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato',
|
||||
DB_ERROR_NOT_FOUND => 'non trovato',
|
||||
DB_ERROR_NOT_LOCKED => 'non bloccato',
|
||||
DB_ERROR_SYNTAX => 'errore di sintassi',
|
||||
DB_ERROR_UNSUPPORTED => 'non supportato',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna',
|
||||
DB_ERROR_INVALID_DSN => 'DSN non valido',
|
||||
DB_ERROR_CONNECT_FAILED => 'connessione fallita',
|
||||
0 => 'nessun errore', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata',
|
||||
DB_ERROR_NOSUCHDB => 'database non trovato',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti'
|
||||
);
|
||||
?>
|
||||
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
|
||||
// Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru.
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'ru1251',
|
||||
DB_ERROR => 'неизвестная ошибка',
|
||||
DB_ERROR_ALREADY_EXISTS => 'уже существует',
|
||||
DB_ERROR_CANNOT_CREATE => 'невозможно создать',
|
||||
DB_ERROR_CANNOT_DELETE => 'невозможно удалить',
|
||||
DB_ERROR_CANNOT_DROP => 'невозможно удалить (drop)',
|
||||
DB_ERROR_CONSTRAINT => 'нарушение условий проверки',
|
||||
DB_ERROR_DIVZERO => 'деление на 0',
|
||||
DB_ERROR_INVALID => 'неправильно',
|
||||
DB_ERROR_INVALID_DATE => 'некорректная дата или время',
|
||||
DB_ERROR_INVALID_NUMBER => 'некорректное число',
|
||||
DB_ERROR_MISMATCH => 'ошибка',
|
||||
DB_ERROR_NODBSELECTED => 'БД не выбрана',
|
||||
DB_ERROR_NOSUCHFIELD => 'не существует поле',
|
||||
DB_ERROR_NOSUCHTABLE => 'не существует таблица',
|
||||
DB_ERROR_NOT_CAPABLE => 'СУБД не в состоянии',
|
||||
DB_ERROR_NOT_FOUND => 'не найдено',
|
||||
DB_ERROR_NOT_LOCKED => 'не заблокировано',
|
||||
DB_ERROR_SYNTAX => 'синтаксическая ошибка',
|
||||
DB_ERROR_UNSUPPORTED => 'не поддерживается',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'счетчик значений в строке',
|
||||
DB_ERROR_INVALID_DSN => 'неправильная DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'соединение неуспешно',
|
||||
0 => 'нет ошибки', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'предоставлено недостаточно данных',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'расширение не найдено',
|
||||
DB_ERROR_NOSUCHDB => 'не существует БД',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'недостаточно прав доступа'
|
||||
);
|
||||
<?php
|
||||
|
||||
// Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru.
|
||||
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'ru1251',
|
||||
DB_ERROR => 'неизвестная ошибка',
|
||||
DB_ERROR_ALREADY_EXISTS => 'уже существует',
|
||||
DB_ERROR_CANNOT_CREATE => 'невозможно создать',
|
||||
DB_ERROR_CANNOT_DELETE => 'невозможно удалить',
|
||||
DB_ERROR_CANNOT_DROP => 'невозможно удалить (drop)',
|
||||
DB_ERROR_CONSTRAINT => 'нарушение условий проверки',
|
||||
DB_ERROR_DIVZERO => 'деление на 0',
|
||||
DB_ERROR_INVALID => 'неправильно',
|
||||
DB_ERROR_INVALID_DATE => 'некорректная дата или время',
|
||||
DB_ERROR_INVALID_NUMBER => 'некорректное число',
|
||||
DB_ERROR_MISMATCH => 'ошибка',
|
||||
DB_ERROR_NODBSELECTED => 'БД не выбрана',
|
||||
DB_ERROR_NOSUCHFIELD => 'не существует поле',
|
||||
DB_ERROR_NOSUCHTABLE => 'не существует таблица',
|
||||
DB_ERROR_NOT_CAPABLE => 'СУБД не в состоянии',
|
||||
DB_ERROR_NOT_FOUND => 'не найдено',
|
||||
DB_ERROR_NOT_LOCKED => 'не заблокировано',
|
||||
DB_ERROR_SYNTAX => 'синтаксическая ошибка',
|
||||
DB_ERROR_UNSUPPORTED => 'не поддерживается',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'счетчик значений в строке',
|
||||
DB_ERROR_INVALID_DSN => 'неправильная DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'соединение неуспешно',
|
||||
0 => 'нет ошибки', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'предоставлено недостаточно данных',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'расширение не найдено',
|
||||
DB_ERROR_NOSUCHDB => 'не существует БД',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'недостаточно прав доступа'
|
||||
);
|
||||
?>
|
||||
@@ -1,33 +1,33 @@
|
||||
<?php
|
||||
// Christian Tiberg" christian@commsoft.nu
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'en',
|
||||
DB_ERROR => 'Okänt fel',
|
||||
DB_ERROR_ALREADY_EXISTS => 'finns redan',
|
||||
DB_ERROR_CANNOT_CREATE => 'kan inte skapa',
|
||||
DB_ERROR_CANNOT_DELETE => 'kan inte ta bort',
|
||||
DB_ERROR_CANNOT_DROP => 'kan inte släppa',
|
||||
DB_ERROR_CONSTRAINT => 'begränsning kränkt',
|
||||
DB_ERROR_DIVZERO => 'division med noll',
|
||||
DB_ERROR_INVALID => 'ogiltig',
|
||||
DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid',
|
||||
DB_ERROR_INVALID_NUMBER => 'ogiltigt tal',
|
||||
DB_ERROR_MISMATCH => 'felaktig matchning',
|
||||
DB_ERROR_NODBSELECTED => 'ingen databas vald',
|
||||
DB_ERROR_NOSUCHFIELD => 'inget sådant fält',
|
||||
DB_ERROR_NOSUCHTABLE => 'ingen sådan tabell',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte',
|
||||
DB_ERROR_NOT_FOUND => 'finns inte',
|
||||
DB_ERROR_NOT_LOCKED => 'inte låst',
|
||||
DB_ERROR_SYNTAX => 'syntaxfel',
|
||||
DB_ERROR_UNSUPPORTED => 'stöds ej',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'värde räknat på rad',
|
||||
DB_ERROR_INVALID_DSN => 'ogiltig DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades',
|
||||
0 => 'inget fel', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'otillräckligt med data angivet',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'utökning hittades ej',
|
||||
DB_ERROR_NOSUCHDB => 'ingen sådan databas',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'otillräckliga rättigheter'
|
||||
);
|
||||
<?php
|
||||
// Christian Tiberg" christian@commsoft.nu
|
||||
$ADODB_LANG_ARRAY = array (
|
||||
'LANG' => 'en',
|
||||
DB_ERROR => 'Okänt fel',
|
||||
DB_ERROR_ALREADY_EXISTS => 'finns redan',
|
||||
DB_ERROR_CANNOT_CREATE => 'kan inte skapa',
|
||||
DB_ERROR_CANNOT_DELETE => 'kan inte ta bort',
|
||||
DB_ERROR_CANNOT_DROP => 'kan inte släppa',
|
||||
DB_ERROR_CONSTRAINT => 'begränsning kränkt',
|
||||
DB_ERROR_DIVZERO => 'division med noll',
|
||||
DB_ERROR_INVALID => 'ogiltig',
|
||||
DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid',
|
||||
DB_ERROR_INVALID_NUMBER => 'ogiltigt tal',
|
||||
DB_ERROR_MISMATCH => 'felaktig matchning',
|
||||
DB_ERROR_NODBSELECTED => 'ingen databas vald',
|
||||
DB_ERROR_NOSUCHFIELD => 'inget sådant fält',
|
||||
DB_ERROR_NOSUCHTABLE => 'ingen sådan tabell',
|
||||
DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte',
|
||||
DB_ERROR_NOT_FOUND => 'finns inte',
|
||||
DB_ERROR_NOT_LOCKED => 'inte låst',
|
||||
DB_ERROR_SYNTAX => 'syntaxfel',
|
||||
DB_ERROR_UNSUPPORTED => 'stöds ej',
|
||||
DB_ERROR_VALUE_COUNT_ON_ROW => 'värde räknat på rad',
|
||||
DB_ERROR_INVALID_DSN => 'ogiltig DSN',
|
||||
DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades',
|
||||
0 => 'inget fel', // DB_OK
|
||||
DB_ERROR_NEED_MORE_DATA => 'otillräckligt med data angivet',
|
||||
DB_ERROR_EXTENSION_NOT_FOUND=> 'utökning hittades ej',
|
||||
DB_ERROR_NOSUCHDB => 'ingen sådan databas',
|
||||
DB_ERROR_ACCESS_VIOLATION => 'otillräckliga rättigheter'
|
||||
);
|
||||
?>
|
||||
@@ -1,182 +1,182 @@
|
||||
ADOdb is dual licensed using BSD and LGPL.
|
||||
|
||||
In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license.
|
||||
|
||||
For more info about ADOdb, visit http://adodb.sourceforge.net/
|
||||
|
||||
BSD Style-License
|
||||
=================
|
||||
|
||||
Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
of conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
Neither the name of the John Lim nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
DISCLAIMER:
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
==========================================================
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
|
||||
Preamble
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
|
||||
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library.
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library.
|
||||
|
||||
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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
|
||||
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
|
||||
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
|
||||
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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.
|
||||
|
||||
If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
|
||||
|
||||
|
||||
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
|
||||
b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
|
||||
c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
|
||||
d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
|
||||
e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
|
||||
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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.
|
||||
|
||||
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
|
||||
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
|
||||
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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.
|
||||
|
||||
9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License.
|
||||
|
||||
11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library.
|
||||
|
||||
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.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
|
||||
ADOdb is dual licensed using BSD and LGPL.
|
||||
|
||||
In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license.
|
||||
|
||||
For more info about ADOdb, visit http://adodb.sourceforge.net/
|
||||
|
||||
BSD Style-License
|
||||
=================
|
||||
|
||||
Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
of conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
Neither the name of the John Lim nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
DISCLAIMER:
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
==========================================================
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
|
||||
Preamble
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
|
||||
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library.
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library.
|
||||
|
||||
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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
|
||||
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
|
||||
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
|
||||
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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.
|
||||
|
||||
If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
|
||||
|
||||
|
||||
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
|
||||
b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
|
||||
c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
|
||||
d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
|
||||
e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
|
||||
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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.
|
||||
|
||||
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
|
||||
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
|
||||
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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.
|
||||
|
||||
9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License.
|
||||
|
||||
11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library.
|
||||
|
||||
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.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,20 +1,20 @@
|
||||
From: Rich Tango-Lowy (richtl#arscognita.com)
|
||||
Date: Sat, May 29, 2004 11:20 am
|
||||
|
||||
OK, I hacked out an ADOdb container for PEAR-Auth. The error handling's
|
||||
a bit of a mess, but all the methods work.
|
||||
|
||||
Copy ADOdb.php to your pear/Auth/Container/ directory.
|
||||
|
||||
Use the ADOdb container exactly as you would the DB
|
||||
container, but specify 'ADOdb' instead of 'DB':
|
||||
|
||||
$dsn = "mysql://myuser:mypass@localhost/authdb";
|
||||
$a = new Auth("ADOdb", $dsn, "loginFunction");
|
||||
|
||||
|
||||
-------------------
|
||||
|
||||
John Lim adds:
|
||||
|
||||
See http://pear.php.net/manual/en/package.authentication.php
|
||||
From: Rich Tango-Lowy (richtl#arscognita.com)
|
||||
Date: Sat, May 29, 2004 11:20 am
|
||||
|
||||
OK, I hacked out an ADOdb container for PEAR-Auth. The error handling's
|
||||
a bit of a mess, but all the methods work.
|
||||
|
||||
Copy ADOdb.php to your pear/Auth/Container/ directory.
|
||||
|
||||
Use the ADOdb container exactly as you would the DB
|
||||
container, but specify 'ADOdb' instead of 'DB':
|
||||
|
||||
$dsn = "mysql://myuser:mypass@localhost/authdb";
|
||||
$a = new Auth("ADOdb", $dsn, "loginFunction");
|
||||
|
||||
|
||||
-------------------
|
||||
|
||||
John Lim adds:
|
||||
|
||||
See http://pear.php.net/manual/en/package.authentication.php
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
>> ADODB Library for PHP4
|
||||
|
||||
(c) 2000-2004 John Lim (jlim@natsoft.com.my)
|
||||
|
||||
Released under both BSD and GNU Lesser GPL library license.
|
||||
This means you can use it in proprietary products.
|
||||
|
||||
|
||||
>> Introduction
|
||||
|
||||
PHP's database access functions are not standardised. This creates a
|
||||
need for a database class library to hide the differences between the
|
||||
different databases (encapsulate the differences) so we can easily
|
||||
switch databases.
|
||||
|
||||
We currently support MySQL, Interbase, Sybase, PostgreSQL, Oracle,
|
||||
Microsoft SQL server, Foxpro ODBC, Access ODBC, Informix, DB2,
|
||||
Sybase SQL Anywhere, generic ODBC and Microsoft's ADO.
|
||||
|
||||
We hope more people will contribute drivers to support other databases.
|
||||
|
||||
|
||||
>> Documentation and Examples
|
||||
|
||||
Refer to the adodb/docs directory for full documentation and examples.
|
||||
There is also a tutorial tute.htm that contrasts ADODB code with
|
||||
mysql code.
|
||||
|
||||
|
||||
>>> Files
|
||||
Adodb.inc.php is the main file. You need to include only this file.
|
||||
|
||||
Adodb-*.inc.php are the database specific driver code.
|
||||
|
||||
Test.php contains a list of test commands to exercise the class library.
|
||||
|
||||
Adodb-session.php is the PHP4 session handling code.
|
||||
|
||||
Testdatabases.inc.php contains the list of databases to apply the tests on.
|
||||
|
||||
Benchmark.php is a simple benchmark to test the throughput of a simple SELECT
|
||||
statement for databases described in testdatabases.inc.php. The benchmark
|
||||
tables are created in test.php.
|
||||
|
||||
readme.htm is the main documentation.
|
||||
|
||||
tute.htm is the tutorial.
|
||||
|
||||
|
||||
>> More Info
|
||||
|
||||
For more information, including installation see readme.htm
|
||||
or visit
|
||||
http://adodb.sourceforge.net/
|
||||
|
||||
|
||||
>> Feature Requests and Bug Reports
|
||||
|
||||
Email to jlim@natsoft.com.my
|
||||
|
||||
|
||||
>> ADODB Library for PHP4
|
||||
|
||||
(c) 2000-2004 John Lim (jlim@natsoft.com.my)
|
||||
|
||||
Released under both BSD and GNU Lesser GPL library license.
|
||||
This means you can use it in proprietary products.
|
||||
|
||||
|
||||
>> Introduction
|
||||
|
||||
PHP's database access functions are not standardised. This creates a
|
||||
need for a database class library to hide the differences between the
|
||||
different databases (encapsulate the differences) so we can easily
|
||||
switch databases.
|
||||
|
||||
We currently support MySQL, Interbase, Sybase, PostgreSQL, Oracle,
|
||||
Microsoft SQL server, Foxpro ODBC, Access ODBC, Informix, DB2,
|
||||
Sybase SQL Anywhere, generic ODBC and Microsoft's ADO.
|
||||
|
||||
We hope more people will contribute drivers to support other databases.
|
||||
|
||||
|
||||
>> Documentation and Examples
|
||||
|
||||
Refer to the adodb/docs directory for full documentation and examples.
|
||||
There is also a tutorial tute.htm that contrasts ADODB code with
|
||||
mysql code.
|
||||
|
||||
|
||||
>>> Files
|
||||
Adodb.inc.php is the main file. You need to include only this file.
|
||||
|
||||
Adodb-*.inc.php are the database specific driver code.
|
||||
|
||||
Test.php contains a list of test commands to exercise the class library.
|
||||
|
||||
Adodb-session.php is the PHP4 session handling code.
|
||||
|
||||
Testdatabases.inc.php contains the list of databases to apply the tests on.
|
||||
|
||||
Benchmark.php is a simple benchmark to test the throughput of a simple SELECT
|
||||
statement for databases described in testdatabases.inc.php. The benchmark
|
||||
tables are created in test.php.
|
||||
|
||||
readme.htm is the main documentation.
|
||||
|
||||
tute.htm is the tutorial.
|
||||
|
||||
|
||||
>> More Info
|
||||
|
||||
For more information, including installation see readme.htm
|
||||
or visit
|
||||
http://adodb.sourceforge.net/
|
||||
|
||||
|
||||
>> Feature Requests and Bug Reports
|
||||
|
||||
Email to jlim@natsoft.com.my
|
||||
|
||||
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<?php
|
||||
if (!defined('ADODB_SESSION')) die();
|
||||
|
||||
include_once ADODB_SESSION . '/crypt.inc.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
|
||||
class ADODB_Encrypt_SHA1 {
|
||||
|
||||
function write($data, $key)
|
||||
{
|
||||
$sha1crypt = new SHA1Crypt();
|
||||
return $sha1crypt->encrypt($data, $key);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function read($data, $key)
|
||||
{
|
||||
$sha1crypt = new SHA1Crypt();
|
||||
return $sha1crypt->decrypt($data, $key);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
<?php
|
||||
if (!defined('ADODB_SESSION')) die();
|
||||
|
||||
include_once ADODB_SESSION . '/crypt.inc.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
|
||||
class ADODB_Encrypt_SHA1 {
|
||||
|
||||
function write($data, $key)
|
||||
{
|
||||
$sha1crypt = new SHA1Crypt();
|
||||
return $sha1crypt->encrypt($data, $key);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function read($data, $key)
|
||||
{
|
||||
$sha1crypt = new SHA1Crypt();
|
||||
return $sha1crypt->decrypt($data, $key);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
?>
|
||||
@@ -1,131 +1,131 @@
|
||||
John,
|
||||
|
||||
I have been an extremely satisfied ADODB user for several years now.
|
||||
|
||||
To give you something back for all your hard work, I've spent the last 3
|
||||
days rewriting the adodb-session.php code.
|
||||
|
||||
----------
|
||||
What's New
|
||||
----------
|
||||
|
||||
Here's a list of the new code's benefits:
|
||||
|
||||
* Combines the functionality of the three files:
|
||||
|
||||
adodb-session.php
|
||||
adodb-session-clob.php
|
||||
adodb-cryptsession.php
|
||||
|
||||
each with very similar functionality, into a single file adodb-session.php.
|
||||
This will ease maintenance and support issues.
|
||||
|
||||
* Supports multiple encryption and compression schemes.
|
||||
Currently, we support:
|
||||
|
||||
MD5Crypt (crypt.inc.php)
|
||||
MCrypt
|
||||
Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
|
||||
GZip
|
||||
BZip2
|
||||
|
||||
These can be stacked, so if you want to compress and then encrypt your
|
||||
session data, it's easy.
|
||||
Also, the built-in MCrypt functions will be *much* faster, and more secure,
|
||||
than the MD5Crypt code.
|
||||
|
||||
* adodb-session.php contains a single class ADODB_Session that encapsulates
|
||||
all functionality.
|
||||
This eliminates the use of global vars and defines (though they are
|
||||
supported for backwards compatibility).
|
||||
|
||||
* All user defined parameters are now static functions in the ADODB_Session
|
||||
class.
|
||||
|
||||
New parameters include:
|
||||
|
||||
* encryptionKey(): Define the encryption key used to encrypt the session.
|
||||
Originally, it was a hard coded string.
|
||||
|
||||
* persist(): Define if the database will be opened in persistent mode.
|
||||
Originally, the user had to call adodb_sess_open().
|
||||
|
||||
* dataFieldName(): Define the field name used to store the session data, as
|
||||
'DATA' appears to be a reserved word in the following cases:
|
||||
ANSI SQL
|
||||
IBM DB2
|
||||
MS SQL Server
|
||||
Postgres
|
||||
SAP
|
||||
|
||||
* filter(): Used to support multiple, simulataneous encryption/compression
|
||||
schemes.
|
||||
|
||||
* Debug support is improved thru _rsdump() function, which is called after
|
||||
every database call.
|
||||
|
||||
------------
|
||||
What's Fixed
|
||||
------------
|
||||
|
||||
The new code includes several bug fixes and enhancements:
|
||||
|
||||
* sesskey is compared in BINARY mode for MySQL, to avoid problems with
|
||||
session keys that differ only by case.
|
||||
Of course, the user should define the sesskey field as BINARY, to
|
||||
correctly fix this problem, otherwise performance will suffer.
|
||||
|
||||
* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in
|
||||
the original code have been optimized to a single DELETE.
|
||||
|
||||
* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table
|
||||
WHERE sesskey = $qkey" will only return a single value, we don't loop on the
|
||||
result, we simply process the row, if any.
|
||||
|
||||
* We close $rs after every use.
|
||||
|
||||
---------------
|
||||
What's the Same
|
||||
---------------
|
||||
|
||||
I know backwards compatibility is *very* important to you. Therefore, the
|
||||
new code is 100% backwards compatible.
|
||||
|
||||
If you like my code, but don't "trust" it's backwards compatible, maybe we
|
||||
offer it as beta code, in a new directory for a release or two?
|
||||
|
||||
------------
|
||||
What's To Do
|
||||
------------
|
||||
|
||||
I've vascillated over whether to use a single function to get/set
|
||||
parameters:
|
||||
|
||||
$user = ADODB_Session::user(); // get
|
||||
ADODB_Session::user($user); // set
|
||||
|
||||
or to use separate functions (which is the PEAR/Java way):
|
||||
|
||||
$user = ADODB_Session::getUser();
|
||||
ADODB_Session::setUser($user);
|
||||
|
||||
I've chosen the former as it's makes for a simpler API, and reduces the
|
||||
amount of code, but I'd be happy to change it to the latter.
|
||||
|
||||
Also, do you think the class should be a singleton class, versus a static
|
||||
class?
|
||||
|
||||
Let me know if you find this code useful, and will be including it in the
|
||||
next release of ADODB.
|
||||
|
||||
If so, I will modify the current documentation to detail the new
|
||||
functionality. To that end, what file(s) contain the documentation? Please
|
||||
send them to me if they are not publically available.
|
||||
|
||||
Also, if there is *anything* in the code that you like to see changed, let
|
||||
me know.
|
||||
|
||||
Thanks,
|
||||
|
||||
Ross
|
||||
|
||||
John,
|
||||
|
||||
I have been an extremely satisfied ADODB user for several years now.
|
||||
|
||||
To give you something back for all your hard work, I've spent the last 3
|
||||
days rewriting the adodb-session.php code.
|
||||
|
||||
----------
|
||||
What's New
|
||||
----------
|
||||
|
||||
Here's a list of the new code's benefits:
|
||||
|
||||
* Combines the functionality of the three files:
|
||||
|
||||
adodb-session.php
|
||||
adodb-session-clob.php
|
||||
adodb-cryptsession.php
|
||||
|
||||
each with very similar functionality, into a single file adodb-session.php.
|
||||
This will ease maintenance and support issues.
|
||||
|
||||
* Supports multiple encryption and compression schemes.
|
||||
Currently, we support:
|
||||
|
||||
MD5Crypt (crypt.inc.php)
|
||||
MCrypt
|
||||
Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
|
||||
GZip
|
||||
BZip2
|
||||
|
||||
These can be stacked, so if you want to compress and then encrypt your
|
||||
session data, it's easy.
|
||||
Also, the built-in MCrypt functions will be *much* faster, and more secure,
|
||||
than the MD5Crypt code.
|
||||
|
||||
* adodb-session.php contains a single class ADODB_Session that encapsulates
|
||||
all functionality.
|
||||
This eliminates the use of global vars and defines (though they are
|
||||
supported for backwards compatibility).
|
||||
|
||||
* All user defined parameters are now static functions in the ADODB_Session
|
||||
class.
|
||||
|
||||
New parameters include:
|
||||
|
||||
* encryptionKey(): Define the encryption key used to encrypt the session.
|
||||
Originally, it was a hard coded string.
|
||||
|
||||
* persist(): Define if the database will be opened in persistent mode.
|
||||
Originally, the user had to call adodb_sess_open().
|
||||
|
||||
* dataFieldName(): Define the field name used to store the session data, as
|
||||
'DATA' appears to be a reserved word in the following cases:
|
||||
ANSI SQL
|
||||
IBM DB2
|
||||
MS SQL Server
|
||||
Postgres
|
||||
SAP
|
||||
|
||||
* filter(): Used to support multiple, simulataneous encryption/compression
|
||||
schemes.
|
||||
|
||||
* Debug support is improved thru _rsdump() function, which is called after
|
||||
every database call.
|
||||
|
||||
------------
|
||||
What's Fixed
|
||||
------------
|
||||
|
||||
The new code includes several bug fixes and enhancements:
|
||||
|
||||
* sesskey is compared in BINARY mode for MySQL, to avoid problems with
|
||||
session keys that differ only by case.
|
||||
Of course, the user should define the sesskey field as BINARY, to
|
||||
correctly fix this problem, otherwise performance will suffer.
|
||||
|
||||
* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in
|
||||
the original code have been optimized to a single DELETE.
|
||||
|
||||
* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table
|
||||
WHERE sesskey = $qkey" will only return a single value, we don't loop on the
|
||||
result, we simply process the row, if any.
|
||||
|
||||
* We close $rs after every use.
|
||||
|
||||
---------------
|
||||
What's the Same
|
||||
---------------
|
||||
|
||||
I know backwards compatibility is *very* important to you. Therefore, the
|
||||
new code is 100% backwards compatible.
|
||||
|
||||
If you like my code, but don't "trust" it's backwards compatible, maybe we
|
||||
offer it as beta code, in a new directory for a release or two?
|
||||
|
||||
------------
|
||||
What's To Do
|
||||
------------
|
||||
|
||||
I've vascillated over whether to use a single function to get/set
|
||||
parameters:
|
||||
|
||||
$user = ADODB_Session::user(); // get
|
||||
ADODB_Session::user($user); // set
|
||||
|
||||
or to use separate functions (which is the PEAR/Java way):
|
||||
|
||||
$user = ADODB_Session::getUser();
|
||||
ADODB_Session::setUser($user);
|
||||
|
||||
I've chosen the former as it's makes for a simpler API, and reduces the
|
||||
amount of code, but I'd be happy to change it to the latter.
|
||||
|
||||
Also, do you think the class should be a singleton class, versus a static
|
||||
class?
|
||||
|
||||
Let me know if you find this code useful, and will be including it in the
|
||||
next release of ADODB.
|
||||
|
||||
If so, I will modify the current documentation to detail the new
|
||||
functionality. To that end, what file(s) contain the documentation? Please
|
||||
send them to me if they are not publically available.
|
||||
|
||||
Also, if there is *anything* in the code that you like to see changed, let
|
||||
me know.
|
||||
|
||||
Thanks,
|
||||
|
||||
Ross
|
||||
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
include('../adodb.inc.php');
|
||||
|
||||
echo "<pre>";
|
||||
try {
|
||||
echo "New Connection\n";
|
||||
|
||||
|
||||
$dsn = 'pdo_mysql://root:@localhost/northwind?persist';
|
||||
|
||||
if (!empty($dsn)) {
|
||||
$DB = NewADOConnection($dsn) || die("CONNECT FAILED");
|
||||
$connstr = $dsn;
|
||||
} else {
|
||||
|
||||
$DB = NewADOConnection('pdo');
|
||||
|
||||
echo "Connect\n";
|
||||
|
||||
$u = ''; $p = '';
|
||||
/*
|
||||
$connstr = 'odbc:nwind';
|
||||
|
||||
$connstr = 'oci:';
|
||||
$u = 'scott';
|
||||
$p = 'natsoft';
|
||||
|
||||
|
||||
$connstr ="sqlite:d:\inetpub\adodb\sqlite.db";
|
||||
*/
|
||||
|
||||
$connstr = "mysql:dbname=northwind";
|
||||
$u = 'root';
|
||||
|
||||
$connstr = "pgsql:dbname=test";
|
||||
$u = 'tester';
|
||||
$p = 'test';
|
||||
|
||||
$DB->Connect($connstr,$u,$p) || die("CONNECT FAILED");
|
||||
|
||||
}
|
||||
|
||||
echo "connection string=$connstr\n Execute\n";
|
||||
|
||||
//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
|
||||
$rs = $DB->Execute("select * from ADOXYZ where id<3");
|
||||
if ($DB->ErrorNo()) echo "*** errno=".$DB->ErrorNo() . " ".($DB->ErrorMsg())."\n";
|
||||
|
||||
|
||||
//print_r(get_class_methods($DB->_stmt));
|
||||
|
||||
if (!$rs) die("NO RS");
|
||||
|
||||
echo "Meta\n";
|
||||
for ($i=0; $i < $rs->NumCols(); $i++) {
|
||||
var_dump($rs->FetchField($i));
|
||||
echo "<br>";
|
||||
}
|
||||
|
||||
echo "FETCH\n";
|
||||
$cnt = 0;
|
||||
while (!$rs->EOF) {
|
||||
adodb_pr($rs->fields);
|
||||
$rs->MoveNext();
|
||||
if ($cnt++ > 1000) break;
|
||||
}
|
||||
|
||||
echo "<br>--------------------------------------------------------<br>\n\n\n";
|
||||
|
||||
$stmt = $DB->PrepareStmt("select * from ADOXYZ");
|
||||
|
||||
$rs = $stmt->Execute();
|
||||
$cols = $stmt->NumCols(); // execute required
|
||||
|
||||
echo "COLS = $cols";
|
||||
for($i=1;$i<=$cols;$i++) {
|
||||
$v = $stmt->_stmt->getColumnMeta($i);
|
||||
var_dump($v);
|
||||
}
|
||||
|
||||
echo "e=".$stmt->ErrorNo() . " ".($stmt->ErrorMsg())."\n";
|
||||
while ($arr = $rs->FetchRow()) {
|
||||
adodb_pr($arr);
|
||||
}
|
||||
die("DONE\n");
|
||||
|
||||
} catch (exception $e) {
|
||||
echo "<pre>";
|
||||
echo $e;
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
include('../adodb.inc.php');
|
||||
|
||||
echo "<pre>";
|
||||
try {
|
||||
echo "New Connection\n";
|
||||
|
||||
|
||||
$dsn = 'pdo_mysql://root:@localhost/northwind?persist';
|
||||
|
||||
if (!empty($dsn)) {
|
||||
$DB = NewADOConnection($dsn) || die("CONNECT FAILED");
|
||||
$connstr = $dsn;
|
||||
} else {
|
||||
|
||||
$DB = NewADOConnection('pdo');
|
||||
|
||||
echo "Connect\n";
|
||||
|
||||
$u = ''; $p = '';
|
||||
/*
|
||||
$connstr = 'odbc:nwind';
|
||||
|
||||
$connstr = 'oci:';
|
||||
$u = 'scott';
|
||||
$p = 'natsoft';
|
||||
|
||||
|
||||
$connstr ="sqlite:d:\inetpub\adodb\sqlite.db";
|
||||
*/
|
||||
|
||||
$connstr = "mysql:dbname=northwind";
|
||||
$u = 'root';
|
||||
|
||||
$connstr = "pgsql:dbname=test";
|
||||
$u = 'tester';
|
||||
$p = 'test';
|
||||
|
||||
$DB->Connect($connstr,$u,$p) || die("CONNECT FAILED");
|
||||
|
||||
}
|
||||
|
||||
echo "connection string=$connstr\n Execute\n";
|
||||
|
||||
//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
|
||||
$rs = $DB->Execute("select * from ADOXYZ where id<3");
|
||||
if ($DB->ErrorNo()) echo "*** errno=".$DB->ErrorNo() . " ".($DB->ErrorMsg())."\n";
|
||||
|
||||
|
||||
//print_r(get_class_methods($DB->_stmt));
|
||||
|
||||
if (!$rs) die("NO RS");
|
||||
|
||||
echo "Meta\n";
|
||||
for ($i=0; $i < $rs->NumCols(); $i++) {
|
||||
var_dump($rs->FetchField($i));
|
||||
echo "<br>";
|
||||
}
|
||||
|
||||
echo "FETCH\n";
|
||||
$cnt = 0;
|
||||
while (!$rs->EOF) {
|
||||
adodb_pr($rs->fields);
|
||||
$rs->MoveNext();
|
||||
if ($cnt++ > 1000) break;
|
||||
}
|
||||
|
||||
echo "<br>--------------------------------------------------------<br>\n\n\n";
|
||||
|
||||
$stmt = $DB->PrepareStmt("select * from ADOXYZ");
|
||||
|
||||
$rs = $stmt->Execute();
|
||||
$cols = $stmt->NumCols(); // execute required
|
||||
|
||||
echo "COLS = $cols";
|
||||
for($i=1;$i<=$cols;$i++) {
|
||||
$v = $stmt->_stmt->getColumnMeta($i);
|
||||
var_dump($v);
|
||||
}
|
||||
|
||||
echo "e=".$stmt->ErrorNo() . " ".($stmt->ErrorMsg())."\n";
|
||||
while ($arr = $rs->FetchRow()) {
|
||||
adodb_pr($arr);
|
||||
}
|
||||
die("DONE\n");
|
||||
|
||||
} catch (exception $e) {
|
||||
echo "<pre>";
|
||||
echo $e;
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,50 +1,50 @@
|
||||
<?php
|
||||
|
||||
include_once('../adodb-perf.inc.php');
|
||||
|
||||
error_reporting(E_ALL);
|
||||
session_start();
|
||||
|
||||
if (isset($_GET)) {
|
||||
foreach($_GET as $k => $v) {
|
||||
if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_SESSION['_db'])) {
|
||||
$_db = $_SESSION['_db'];
|
||||
$_GET[$_db] = 1;
|
||||
$$_db = 1;
|
||||
}
|
||||
|
||||
echo "<h1>Performance Monitoring</h1>";
|
||||
include_once('testdatabases.inc.php');
|
||||
|
||||
|
||||
function testdb($db)
|
||||
{
|
||||
if (!$db) return;
|
||||
echo "<font size=1>";print_r($db->ServerInfo()); echo " user=".$db->user."</font>";
|
||||
|
||||
$perf = NewPerfMonitor($db);
|
||||
|
||||
# unit tests
|
||||
if (0) {
|
||||
//$DB->debug=1;
|
||||
echo "Data Cache Size=".$perf->DBParameter('data cache size').'<p>';
|
||||
echo $perf->HealthCheck();
|
||||
echo($perf->SuspiciousSQL());
|
||||
echo($perf->ExpensiveSQL());
|
||||
echo($perf->InvalidSQL());
|
||||
echo $perf->Tables();
|
||||
|
||||
echo "<pre>";
|
||||
echo $perf->HealthCheckCLI();
|
||||
$perf->Poll(3);
|
||||
die();
|
||||
}
|
||||
|
||||
if ($perf) $perf->UI(3);
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
include_once('../adodb-perf.inc.php');
|
||||
|
||||
error_reporting(E_ALL);
|
||||
session_start();
|
||||
|
||||
if (isset($_GET)) {
|
||||
foreach($_GET as $k => $v) {
|
||||
if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_SESSION['_db'])) {
|
||||
$_db = $_SESSION['_db'];
|
||||
$_GET[$_db] = 1;
|
||||
$$_db = 1;
|
||||
}
|
||||
|
||||
echo "<h1>Performance Monitoring</h1>";
|
||||
include_once('testdatabases.inc.php');
|
||||
|
||||
|
||||
function testdb($db)
|
||||
{
|
||||
if (!$db) return;
|
||||
echo "<font size=1>";print_r($db->ServerInfo()); echo " user=".$db->user."</font>";
|
||||
|
||||
$perf = NewPerfMonitor($db);
|
||||
|
||||
# unit tests
|
||||
if (0) {
|
||||
//$DB->debug=1;
|
||||
echo "Data Cache Size=".$perf->DBParameter('data cache size').'<p>';
|
||||
echo $perf->HealthCheck();
|
||||
echo($perf->SuspiciousSQL());
|
||||
echo($perf->ExpensiveSQL());
|
||||
echo($perf->InvalidSQL());
|
||||
echo $perf->Tables();
|
||||
|
||||
echo "<pre>";
|
||||
echo $perf->HealthCheckCLI();
|
||||
$perf->Poll(3);
|
||||
die();
|
||||
}
|
||||
|
||||
if ($perf) $perf->UI(3);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
<?php
|
||||
|
||||
// BASIC ADO test
|
||||
|
||||
include_once('../adodb.inc.php');
|
||||
|
||||
$db = ADONewConnection("ado_access");
|
||||
$db->debug=1;
|
||||
$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
|
||||
$myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
|
||||
. 'DATA SOURCE=' . $access . ';';
|
||||
|
||||
echo "<p>PHP ",PHP_VERSION,"</p>";
|
||||
|
||||
$db->Connect($myDSN) || die('fail');
|
||||
|
||||
print_r($db->ServerInfo());
|
||||
|
||||
try {
|
||||
$rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
|
||||
print_r($rs->fields);
|
||||
} catch(exception $e) {
|
||||
print_r($e);
|
||||
echo "<p> Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y');
|
||||
}
|
||||
<?php
|
||||
|
||||
// BASIC ADO test
|
||||
|
||||
include_once('../adodb.inc.php');
|
||||
|
||||
$db = ADONewConnection("ado_access");
|
||||
$db->debug=1;
|
||||
$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
|
||||
$myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
|
||||
. 'DATA SOURCE=' . $access . ';';
|
||||
|
||||
echo "<p>PHP ",PHP_VERSION,"</p>";
|
||||
|
||||
$db->Connect($myDSN) || die('fail');
|
||||
|
||||
print_r($db->ServerInfo());
|
||||
|
||||
try {
|
||||
$rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
|
||||
print_r($rs->fields);
|
||||
} catch(exception $e) {
|
||||
print_r($e);
|
||||
echo "<p> Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y');
|
||||
}
|
||||
?>
|
||||
@@ -1,36 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
V4.50 6 July 2004
|
||||
|
||||
Run multiple copies of this php script at the same time
|
||||
to test unique generation of id's in multiuser mode
|
||||
*/
|
||||
include_once('../adodb.inc.php');
|
||||
$testaccess = true;
|
||||
include_once('testdatabases.inc.php');
|
||||
|
||||
function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
|
||||
{
|
||||
$table = 'adodbseq';
|
||||
|
||||
$db->Execute("drop table $table");
|
||||
//$db->debug=true;
|
||||
|
||||
$ctr = 5000;
|
||||
$lastnum = 0;
|
||||
|
||||
while (--$ctr >= 0) {
|
||||
$num = $db->GenID($table);
|
||||
if ($num === false) {
|
||||
print "GenID returned false";
|
||||
break;
|
||||
}
|
||||
if ($lastnum + 1 == $num) print " $num ";
|
||||
else {
|
||||
print " <font color=red>$num</font> ";
|
||||
flush();
|
||||
}
|
||||
$lastnum = $num;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/*
|
||||
V4.50 6 July 2004
|
||||
|
||||
Run multiple copies of this php script at the same time
|
||||
to test unique generation of id's in multiuser mode
|
||||
*/
|
||||
include_once('../adodb.inc.php');
|
||||
$testaccess = true;
|
||||
include_once('testdatabases.inc.php');
|
||||
|
||||
function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
|
||||
{
|
||||
$table = 'adodbseq';
|
||||
|
||||
$db->Execute("drop table $table");
|
||||
//$db->debug=true;
|
||||
|
||||
$ctr = 5000;
|
||||
$lastnum = 0;
|
||||
|
||||
while (--$ctr >= 0) {
|
||||
$num = $db->GenID($table);
|
||||
if ($num === false) {
|
||||
print "GenID returned false";
|
||||
break;
|
||||
}
|
||||
if ($lastnum + 1 == $num) print " $num ";
|
||||
else {
|
||||
print " <font color=red>$num</font> ";
|
||||
flush();
|
||||
}
|
||||
$lastnum = $num;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,80 +1,80 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('mssql.datetimeconvert',0);
|
||||
|
||||
function tmssql()
|
||||
{
|
||||
print "<h3>mssql</h3>";
|
||||
$db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection');
|
||||
mssql_select_db('northwind',$db);
|
||||
|
||||
$rs = mssql_query('select getdate() as date',$db);
|
||||
$o = mssql_fetch_row($rs);
|
||||
print_r($o);
|
||||
mssql_free_result($rs);
|
||||
|
||||
print "<p>Delete</p>"; flush();
|
||||
$rs2 = mssql_query('delete from adoxyz',$db);
|
||||
$p = mssql_num_rows($rs2);
|
||||
mssql_free_result($rs2);
|
||||
|
||||
}
|
||||
|
||||
function tpear()
|
||||
{
|
||||
include_once('DB.php');
|
||||
|
||||
print "<h3>PEAR</h3>";
|
||||
$username = 'adodb';
|
||||
$password = 'natsoft';
|
||||
$hostname = 'JAGUAR\vsdotnet';
|
||||
$databasename = 'northwind';
|
||||
|
||||
$dsn = "mssql://$username:$password@$hostname/$databasename";
|
||||
$conn = DB::connect($dsn);
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
@$conn->query('create table tester (id integer)');
|
||||
print "<p>Delete</p>"; flush();
|
||||
$rs = $conn->query('delete from tester');
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
}
|
||||
|
||||
function tadodb()
|
||||
{
|
||||
include_once('../adodb.inc.php');
|
||||
|
||||
print "<h3>ADOdb</h3>";
|
||||
$conn = NewADOConnection('mssql');
|
||||
$conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind');
|
||||
// $conn->debug=1;
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
$conn->Execute('create table tester (id integer)');
|
||||
print "<p>Delete</p>"; flush();
|
||||
$rs = $conn->Execute('delete from tester');
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
}
|
||||
|
||||
|
||||
$ACCEPTIP = '127.0.0.1';
|
||||
|
||||
$remote = $_SERVER["REMOTE_ADDR"];
|
||||
|
||||
if (!empty($ACCEPTIP))
|
||||
if ($remote != '127.0.0.1' && $remote != $ACCEPTIP)
|
||||
die("Unauthorised client: '$remote'");
|
||||
|
||||
?>
|
||||
<a href=tmssql.php?do=tmssql>mssql</a>
|
||||
<a href=tmssql.php?do=tpear>pear</a>
|
||||
<a href=tmssql.php?do=tadodb>adodb</a>
|
||||
<?php
|
||||
if (!empty($_GET['do'])) {
|
||||
$do = $_GET['do'];
|
||||
switch($do) {
|
||||
case 'tpear':
|
||||
case 'tadodb':
|
||||
case 'tmssql':
|
||||
$do();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('mssql.datetimeconvert',0);
|
||||
|
||||
function tmssql()
|
||||
{
|
||||
print "<h3>mssql</h3>";
|
||||
$db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection');
|
||||
mssql_select_db('northwind',$db);
|
||||
|
||||
$rs = mssql_query('select getdate() as date',$db);
|
||||
$o = mssql_fetch_row($rs);
|
||||
print_r($o);
|
||||
mssql_free_result($rs);
|
||||
|
||||
print "<p>Delete</p>"; flush();
|
||||
$rs2 = mssql_query('delete from adoxyz',$db);
|
||||
$p = mssql_num_rows($rs2);
|
||||
mssql_free_result($rs2);
|
||||
|
||||
}
|
||||
|
||||
function tpear()
|
||||
{
|
||||
include_once('DB.php');
|
||||
|
||||
print "<h3>PEAR</h3>";
|
||||
$username = 'adodb';
|
||||
$password = 'natsoft';
|
||||
$hostname = 'JAGUAR\vsdotnet';
|
||||
$databasename = 'northwind';
|
||||
|
||||
$dsn = "mssql://$username:$password@$hostname/$databasename";
|
||||
$conn = DB::connect($dsn);
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
@$conn->query('create table tester (id integer)');
|
||||
print "<p>Delete</p>"; flush();
|
||||
$rs = $conn->query('delete from tester');
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
}
|
||||
|
||||
function tadodb()
|
||||
{
|
||||
include_once('../adodb.inc.php');
|
||||
|
||||
print "<h3>ADOdb</h3>";
|
||||
$conn = NewADOConnection('mssql');
|
||||
$conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind');
|
||||
// $conn->debug=1;
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
$conn->Execute('create table tester (id integer)');
|
||||
print "<p>Delete</p>"; flush();
|
||||
$rs = $conn->Execute('delete from tester');
|
||||
print "date=".$conn->GetOne('select getdate()')."<br>";
|
||||
}
|
||||
|
||||
|
||||
$ACCEPTIP = '127.0.0.1';
|
||||
|
||||
$remote = $_SERVER["REMOTE_ADDR"];
|
||||
|
||||
if (!empty($ACCEPTIP))
|
||||
if ($remote != '127.0.0.1' && $remote != $ACCEPTIP)
|
||||
die("Unauthorised client: '$remote'");
|
||||
|
||||
?>
|
||||
<a href=tmssql.php?do=tmssql>mssql</a>
|
||||
<a href=tmssql.php?do=tpear>pear</a>
|
||||
<a href=tmssql.php?do=tadodb>adodb</a>
|
||||
<?php
|
||||
if (!empty($_GET['do'])) {
|
||||
$do = $_GET['do'];
|
||||
switch($do) {
|
||||
case 'tpear':
|
||||
case 'tadodb':
|
||||
case 'tmssql':
|
||||
$do();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,32 +1,32 @@
|
||||
<?php
|
||||
require('adodb5/adodb.inc.php');
|
||||
|
||||
$dbdriver= $_POST['dataBase'];
|
||||
$db= ADONewConnection($dbdriver);
|
||||
$db->debug = false;
|
||||
$server= $_POST['dbAddress1'];
|
||||
$user= $_POST['userRoot1'];
|
||||
$password= $_POST['userRootPwd1'];
|
||||
$database= $_POST['dbName1'];
|
||||
$f= false;
|
||||
if($dbdriver == 'mssql'){
|
||||
$db = &ADONewConnection("ado_mssql");
|
||||
$myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};". "SERVER=$server;DATABASE=$database;UID=$user;PWD=$password;";
|
||||
if($db->Connect($myDSN)){
|
||||
$f= true;
|
||||
}
|
||||
}else{
|
||||
if(@$db->Connect($server, $user, $password, $database))
|
||||
{
|
||||
$f= true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$f)
|
||||
{
|
||||
echo 'Connection Failed
|
||||
Error Message: '.$db->_errorMsg;
|
||||
}else{
|
||||
echo 'Connection OK';
|
||||
}
|
||||
<?php
|
||||
require('adodb5/adodb.inc.php');
|
||||
|
||||
$dbdriver= $_POST['dataBase'];
|
||||
$db= ADONewConnection($dbdriver);
|
||||
$db->debug = false;
|
||||
$server= $_POST['dbAddress1'];
|
||||
$user= $_POST['userRoot1'];
|
||||
$password= $_POST['userRootPwd1'];
|
||||
$database= $_POST['dbName1'];
|
||||
$f= false;
|
||||
if($dbdriver == 'mssql'){
|
||||
$db = &ADONewConnection("ado_mssql");
|
||||
$myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};". "SERVER=$server;DATABASE=$database;UID=$user;PWD=$password;";
|
||||
if($db->Connect($myDSN)){
|
||||
$f= true;
|
||||
}
|
||||
}else{
|
||||
if(@$db->Connect($server, $user, $password, $database))
|
||||
{
|
||||
$f= true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$f)
|
||||
{
|
||||
echo 'Connection Failed
|
||||
Error Message: '.$db->_errorMsg;
|
||||
}else{
|
||||
echo 'Connection OK';
|
||||
}
|
||||
?>
|
||||
Referência em uma Nova Issue
Bloquear um usuário