Просмотр исходного кода

改变数据库管理软件位置,并忽略设置文件,增加config.sample.php文件

visuddhinanda 4 лет назад
Родитель
Сommit
479fc07c02

+ 4 - 0
app/dbadmin/.gitignore

@@ -0,0 +1,4 @@
+/user/config.php
+/system/config.php
+/3rd/config.php
+/palicanon/config.php

+ 1 - 1
app/studio/dictadmin/3rd/phpliteadmin.config.php → app/dbadmin/3rd/config.sample.php

@@ -13,7 +13,7 @@
 $password = 'dhamma';
 
 //directory relative to this file to search for databases (if false, manually list databases in the $databases variable)
-$directory = '../../../../tmp/appdata/dict/3rd';
+$directory = '../../../tmp/appdata/dict/3rd';
 
 //whether or not to scan the subdirectories of the above directory infinitely deep
 $subdirectories = false;

+ 1 - 1
app/studio/dictadmin/user/pla.php → app/dbadmin/3rd/pla.php

@@ -425,7 +425,7 @@ $lang = array(
 //- Initialization
 
 // load optional configuration file
-$config_filename = './phpliteadmin.config.php';
+$config_filename = './config.php';
 if (is_readable($config_filename))
 {
 	include_once $config_filename;

+ 1 - 1
app/studio/dictadmin/palicanon/phpliteadmin.config.php → app/dbadmin/palicanon/config.sample.php

@@ -13,7 +13,7 @@
 $password = 'dhamma';
 
 //directory relative to this file to search for databases (if false, manually list databases in the $databases variable)
-$directory = "../../../../tmp/appdata/palicanon";
+$directory = "../../../tmp/appdata/palicanon";
 
 //whether or not to scan the subdirectories of the above directory infinitely deep
 $subdirectories = false;

+ 39 - 55
app/studio/dictadmin/3rd/pla.php → app/dbadmin/palicanon/pla.php

@@ -425,7 +425,7 @@ $lang = array(
 //- Initialization
 
 // load optional configuration file
-$config_filename = './phpliteadmin.config.php';
+$config_filename = './config.php';
 if (is_readable($config_filename))
 {
 	include_once $config_filename;
@@ -442,6 +442,43 @@ define('VERSION_CHECK_URL','https://www.phpliteadmin.org/current_version.php');
 define('PROJECT_BUGTRACKER_LINK','<a href="https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open" target="_blank">https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open</a>');
 define('PROJECT_INSTALL_LINK','<a href="https://bitbucket.org/phpliteadmin/public/wiki/Installation" target="_blank">https://bitbucket.org/phpliteadmin/public/wiki/Installation</a>');
 
+class MicroTimer {
+
+	private $startTime, $stopTime;
+
+	// creates and starts a timer
+	function __construct()
+	{
+		$this->startTime = microtime(true);
+	}
+
+	// stops a timer
+	public function stop()
+	{
+		$this->stopTime = microtime(true);
+	}
+
+	// returns the number of seconds from the timer's creation, or elapsed
+	// between creation and call to ->stop()
+	public function elapsed()
+	{
+		if ($this->stopTime)
+			return round($this->stopTime - $this->startTime, 4);
+
+		return round(microtime(true) - $this->startTime, 4);
+	}
+
+	// called when using a MicroTimer object as a string
+	public function __toString()
+	{
+		return (string) $this->elapsed();
+	}
+
+}
+//	class Resources (issue #157)
+//	outputs secondary files, such as css and javascript
+//	data is stored gzipped (gzencode) and encoded (base64_encode)
+//
 // up here, we don't output anything. debug output might appear here which is catched by ob and thrown later
 ob_start();
 
@@ -486,24 +523,7 @@ if($language != 'en') {
 	unset($temp_lang);
 }
 
-// stripslashes if MAGIC QUOTES is turned on
-// This is only a workaround. Please better turn off magic quotes!
-// This code is from http://php.net/manual/en/security.magicquotes.disabling.php
-if (get_magic_quotes_gpc()) {
-	$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
-	while (list($key, $val) = each($process)) {
-		foreach ($val as $k => $v) {
-			unset($process[$key][$k]);
-			if (is_array($v)) {
-				$process[$key][stripslashes($k)] = $v;
-				$process[] = &$process[$key][stripslashes($k)];
-			} else {
-				$process[$key][stripslashes($k)] = stripslashes($v);
-			}
-		}
-	}
-	unset($process);
-}
+
 
 
 //data types array
@@ -5986,43 +6006,7 @@ class GetParameters
 }//	class MicroTimer (issue #146)
 //	wraps calls to microtime(), calculating the elapsed time and rounding output
 //
-class MicroTimer {
-
-	private $startTime, $stopTime;
-
-	// creates and starts a timer
-	function __construct()
-	{
-		$this->startTime = microtime(true);
-	}
-
-	// stops a timer
-	public function stop()
-	{
-		$this->stopTime = microtime(true);
-	}
 
-	// returns the number of seconds from the timer's creation, or elapsed
-	// between creation and call to ->stop()
-	public function elapsed()
-	{
-		if ($this->stopTime)
-			return round($this->stopTime - $this->startTime, 4);
-
-		return round(microtime(true) - $this->startTime, 4);
-	}
-
-	// called when using a MicroTimer object as a string
-	public function __toString()
-	{
-		return (string) $this->elapsed();
-	}
-
-}
-//	class Resources (issue #157)
-//	outputs secondary files, such as css and javascript
-//	data is stored gzipped (gzencode) and encoded (base64_encode)
-//
 class Resources {
 
 	// set this to the file containing getInternalResource;

+ 1 - 1
app/studio/dictadmin/system/phpliteadmin.config.php → app/dbadmin/system/config.sample.php

@@ -13,7 +13,7 @@
 $password = 'dhamma';
 
 //directory relative to this file to search for databases (if false, manually list databases in the $databases variable)
-$directory = '../../../../tmp/appdata/dict/system';
+$directory = '../../../tmp/appdata/dict/system';
 
 //whether or not to scan the subdirectories of the above directory infinitely deep
 $subdirectories = false;

+ 39 - 55
app/studio/dictadmin/term/pla.php → app/dbadmin/system/pla.php

@@ -425,7 +425,7 @@ $lang = array(
 //- Initialization
 
 // load optional configuration file
-$config_filename = './phpliteadmin.config.php';
+$config_filename = './config.php';
 if (is_readable($config_filename))
 {
 	include_once $config_filename;
@@ -442,6 +442,43 @@ define('VERSION_CHECK_URL','https://www.phpliteadmin.org/current_version.php');
 define('PROJECT_BUGTRACKER_LINK','<a href="https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open" target="_blank">https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open</a>');
 define('PROJECT_INSTALL_LINK','<a href="https://bitbucket.org/phpliteadmin/public/wiki/Installation" target="_blank">https://bitbucket.org/phpliteadmin/public/wiki/Installation</a>');
 
+class MicroTimer {
+
+	private $startTime, $stopTime;
+
+	// creates and starts a timer
+	function __construct()
+	{
+		$this->startTime = microtime(true);
+	}
+
+	// stops a timer
+	public function stop()
+	{
+		$this->stopTime = microtime(true);
+	}
+
+	// returns the number of seconds from the timer's creation, or elapsed
+	// between creation and call to ->stop()
+	public function elapsed()
+	{
+		if ($this->stopTime)
+			return round($this->stopTime - $this->startTime, 4);
+
+		return round(microtime(true) - $this->startTime, 4);
+	}
+
+	// called when using a MicroTimer object as a string
+	public function __toString()
+	{
+		return (string) $this->elapsed();
+	}
+
+}
+//	class Resources (issue #157)
+//	outputs secondary files, such as css and javascript
+//	data is stored gzipped (gzencode) and encoded (base64_encode)
+//
 // up here, we don't output anything. debug output might appear here which is catched by ob and thrown later
 ob_start();
 
@@ -486,24 +523,7 @@ if($language != 'en') {
 	unset($temp_lang);
 }
 
-// stripslashes if MAGIC QUOTES is turned on
-// This is only a workaround. Please better turn off magic quotes!
-// This code is from http://php.net/manual/en/security.magicquotes.disabling.php
-if (get_magic_quotes_gpc()) {
-	$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
-	while (list($key, $val) = each($process)) {
-		foreach ($val as $k => $v) {
-			unset($process[$key][$k]);
-			if (is_array($v)) {
-				$process[$key][stripslashes($k)] = $v;
-				$process[] = &$process[$key][stripslashes($k)];
-			} else {
-				$process[$key][stripslashes($k)] = stripslashes($v);
-			}
-		}
-	}
-	unset($process);
-}
+
 
 
 //data types array
@@ -5986,43 +6006,7 @@ class GetParameters
 }//	class MicroTimer (issue #146)
 //	wraps calls to microtime(), calculating the elapsed time and rounding output
 //
-class MicroTimer {
-
-	private $startTime, $stopTime;
-
-	// creates and starts a timer
-	function __construct()
-	{
-		$this->startTime = microtime(true);
-	}
-
-	// stops a timer
-	public function stop()
-	{
-		$this->stopTime = microtime(true);
-	}
 
-	// returns the number of seconds from the timer's creation, or elapsed
-	// between creation and call to ->stop()
-	public function elapsed()
-	{
-		if ($this->stopTime)
-			return round($this->stopTime - $this->startTime, 4);
-
-		return round(microtime(true) - $this->startTime, 4);
-	}
-
-	// called when using a MicroTimer object as a string
-	public function __toString()
-	{
-		return (string) $this->elapsed();
-	}
-
-}
-//	class Resources (issue #157)
-//	outputs secondary files, such as css and javascript
-//	data is stored gzipped (gzencode) and encoded (base64_encode)
-//
 class Resources {
 
 	// set this to the file containing getInternalResource;

+ 1 - 1
app/studio/dictadmin/user/phpliteadmin.config.php → app/dbadmin/user/config.sample.php

@@ -13,7 +13,7 @@
 $password = 'dhamma';
 
 //directory relative to this file to search for databases (if false, manually list databases in the $databases variable)
-$directory = "../../../../tmp/user";
+$directory = "../../../tmp/user";
 
 //whether or not to scan the subdirectories of the above directory infinitely deep
 $subdirectories = false;

+ 39 - 55
app/studio/dictadmin/palicanon/pla.php → app/dbadmin/user/pla.php

@@ -425,7 +425,7 @@ $lang = array(
 //- Initialization
 
 // load optional configuration file
-$config_filename = './phpliteadmin.config.php';
+$config_filename = './config.php';
 if (is_readable($config_filename))
 {
 	include_once $config_filename;
@@ -442,6 +442,43 @@ define('VERSION_CHECK_URL','https://www.phpliteadmin.org/current_version.php');
 define('PROJECT_BUGTRACKER_LINK','<a href="https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open" target="_blank">https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open</a>');
 define('PROJECT_INSTALL_LINK','<a href="https://bitbucket.org/phpliteadmin/public/wiki/Installation" target="_blank">https://bitbucket.org/phpliteadmin/public/wiki/Installation</a>');
 
+class MicroTimer {
+
+	private $startTime, $stopTime;
+
+	// creates and starts a timer
+	function __construct()
+	{
+		$this->startTime = microtime(true);
+	}
+
+	// stops a timer
+	public function stop()
+	{
+		$this->stopTime = microtime(true);
+	}
+
+	// returns the number of seconds from the timer's creation, or elapsed
+	// between creation and call to ->stop()
+	public function elapsed()
+	{
+		if ($this->stopTime)
+			return round($this->stopTime - $this->startTime, 4);
+
+		return round(microtime(true) - $this->startTime, 4);
+	}
+
+	// called when using a MicroTimer object as a string
+	public function __toString()
+	{
+		return (string) $this->elapsed();
+	}
+
+}
+//	class Resources (issue #157)
+//	outputs secondary files, such as css and javascript
+//	data is stored gzipped (gzencode) and encoded (base64_encode)
+//
 // up here, we don't output anything. debug output might appear here which is catched by ob and thrown later
 ob_start();
 
@@ -486,24 +523,7 @@ if($language != 'en') {
 	unset($temp_lang);
 }
 
-// stripslashes if MAGIC QUOTES is turned on
-// This is only a workaround. Please better turn off magic quotes!
-// This code is from http://php.net/manual/en/security.magicquotes.disabling.php
-if (get_magic_quotes_gpc()) {
-	$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
-	while (list($key, $val) = each($process)) {
-		foreach ($val as $k => $v) {
-			unset($process[$key][$k]);
-			if (is_array($v)) {
-				$process[$key][stripslashes($k)] = $v;
-				$process[] = &$process[$key][stripslashes($k)];
-			} else {
-				$process[$key][stripslashes($k)] = stripslashes($v);
-			}
-		}
-	}
-	unset($process);
-}
+
 
 
 //data types array
@@ -5986,43 +6006,7 @@ class GetParameters
 }//	class MicroTimer (issue #146)
 //	wraps calls to microtime(), calculating the elapsed time and rounding output
 //
-class MicroTimer {
-
-	private $startTime, $stopTime;
-
-	// creates and starts a timer
-	function __construct()
-	{
-		$this->startTime = microtime(true);
-	}
-
-	// stops a timer
-	public function stop()
-	{
-		$this->stopTime = microtime(true);
-	}
 
-	// returns the number of seconds from the timer's creation, or elapsed
-	// between creation and call to ->stop()
-	public function elapsed()
-	{
-		if ($this->stopTime)
-			return round($this->stopTime - $this->startTime, 4);
-
-		return round(microtime(true) - $this->startTime, 4);
-	}
-
-	// called when using a MicroTimer object as a string
-	public function __toString()
-	{
-		return (string) $this->elapsed();
-	}
-
-}
-//	class Resources (issue #157)
-//	outputs secondary files, such as css and javascript
-//	data is stored gzipped (gzencode) and encoded (base64_encode)
-//
 class Resources {
 
 	// set this to the file containing getInternalResource;

Разница между файлами не показана из-за своего большого размера
+ 0 - 6106
app/studio/dictadmin/system/pla.php


+ 0 - 82
app/studio/dictadmin/term/phpliteadmin.config.php

@@ -1,82 +0,0 @@
-<?php 
-//
-// This is sample configuration file
-//
-// You can configure phpliteadmin in one of 2 ways:
-// 1. Rename phpliteadmin.config.sample.php to phpliteadmin.config.php and change parameters in there.
-//    You can set only your custom settings in phpliteadmin.config.php. All other settings will be set to defaults.
-// 2. Change parameters directly in main phpliteadmin.php file
-//
-// Please see https://bitbucket.org/phpliteadmin/public/wiki/Configuration for more details
-
-//password to gain access
-$password = 'dhamma';
-
-//directory relative to this file to search for databases (if false, manually list databases in the $databases variable)
-$directory = "../../../../tmp/appdata/dict/dhammaterm";
-
-//whether or not to scan the subdirectories of the above directory infinitely deep
-$subdirectories = false;
-
-//if the above $directory variable is set to false, you must specify the databases manually in an array as the next variable
-//if any of the databases do not exist as they are referenced by their path, they will be created automatically
-$databases = array(
-	array(
-		'path'=> 'database1.sqlite',
-		'name'=> 'Database 1'
-	),
-	array(
-		'path'=> 'database2.sqlite',
-		'name'=> 'Database 2'
-	),
-);
-
-
-/* ---- Interface settings ---- */
-
-// Theme! If you want to change theme, save the CSS file in same folder of phpliteadmin or in folder "themes"
-$theme = 'phpliteadmin.css';
-
-// the default language! If you want to change it, save the language file in same folder of phpliteadmin or in folder "languages"
-// More about localizations (downloads, how to translate etc.): https://bitbucket.org/phpliteadmin/public/wiki/Localization
-$language = 'en';
-
-// set default number of rows. You need to relog after changing the number
-$rowsNum = 30;
-
-// reduce string characters by a number bigger than 10
-$charsNum = 300;
-
-// maximum number of SQL queries to save in the history
-$maxSavedQueries = 10;
-
-/* ---- Custom functions ---- */
-
-//a list of custom functions that can be applied to columns in the databases
-//make sure to define every function below if it is not a core PHP function
-$custom_functions = array(
-	'md5', 'sha1', 'time', 'strtotime',
-	// add the names of your custom functions to this array
-	/* 'leet_text', */
-);
-
-// define your custom functions here
-/*
-function leet_text($value)
-{
-  return strtr($value, 'eaAsSOl', '344zZ01');
-}
-*/
-
-
-/* ---- Advanced options ---- */
-
-//changing the following variable allows multiple phpLiteAdmin installs to work under the same domain.
-$cookie_name = 'pla3412';
-
-//whether or not to put the app in debug mode where errors are outputted
-$debug = false;
-
-// the user is allowed to create databases with only these extensions
-$allowed_extensions = array('db','db3','sqlite','sqlite3');
-

Некоторые файлы не были показаны из-за большого количества измененных файлов