From: Banana Date: Sun, 8 Aug 2021 08:01:28 +0000 (+0200) Subject: first steps in setup file X-Git-Tag: 1.3~21 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=c3eb369b6d6dd325c18e1291baa42166e6004c62;p=bibliotheca-php.git first steps in setup file --- diff --git a/CHANGELOG b/CHANGELOG index 1b25a02..90c5277 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ 1.x - Rrajigar Mine * Fixed install sql file. * New field: artists - lookupmultiple field + * Added setup file. See setup.txt for more details 1.2 - NyLeve's Falls 20210717 * Updated requirements information diff --git a/webclient/config/config.php.default b/webclient/config/config.php.default index 486851a..aa32af9 100644 --- a/webclient/config/config.php.default +++ b/webclient/config/config.php.default @@ -17,25 +17,25 @@ */ # set to true if you need debug messages in error log file -define('DEBUG',true); +define('DEBUG',false); # set to ture if you need query log messages in error log file. -define('QUERY_DEBUG',true); +define('QUERY_DEBUG',false); # timezone settings -define('TIMEZONE','Europe/Berlin'); +define('TIMEZONE','~timezone~'); # path settings -define('PATH_ABSOLUTE','/home/some/path/bibliotheca/webclient'); +define('PATH_ABSOLUTE','~pathabsolute~'); define('PATH_SYSTEMOUT',PATH_ABSOLUTE.'/systemout'); define('PATH_STORAGE',PATH_ABSOLUTE.'/storage'); define('PATH_WEB_STORAGE','storage'); # database config -define('DB_HOST','127.0.0.1'); -define('DB_USERNAME','user'); -define('DB_PASSWORD','test'); -define('DB_NAME','bibliotheca'); -define('DB_PREFIX','bib'); # a _ is added automatically as separation +define('DB_HOST','~dbhost~'); +define('DB_USERNAME','~dbuser~'); +define('DB_PASSWORD','~dbpassword~'); +define('DB_NAME','~dbname~'); +define('DB_PREFIX','~dbprefix~'); # a _ is added automatically as separation ## theme support # fallback is default theme diff --git a/webclient/index.php b/webclient/index.php index beae986..d379624 100644 --- a/webclient/index.php +++ b/webclient/index.php @@ -25,7 +25,6 @@ ini_set('error_reporting',-1); // E_ALL & E_STRICT # check request $_urlToParse = filter_var($_SERVER['QUERY_STRING'],FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); if(!empty($_urlToParse)) { - # see http://de2.php.net/manual/en/regexp.reference.unicode.php if(preg_match('/[\p{C}\p{M}\p{Sc}\p{Sk}\p{So}\p{Zl}\p{Zp}]/u',$_urlToParse) === 1) { die('Malformed request. Make sure you know what you are doing.'); } diff --git a/webclient/setup.php b/webclient/setup.php new file mode 100644 index 0000000..8456b60 --- /dev/null +++ b/webclient/setup.php @@ -0,0 +1,144 @@ + 'Europe/Berlin' + ); + + $TemplateData['bodyForm'] = stepConfig($data); + break; + + case 'ready': + default: + $TemplateData['headline'] = 'Complete'; + $TemplateData['body'] = 'All done. This file is now gone. To restart the setup remove all non .default config files and upload the setup.php file again.'; + $TemplateData['bodyForm'] = ''; + $TemplateData['footer'] = 'cya'; +} + +?> + + + + + + + Setup - Bibliotheca + + +
+

+
+
+

+
+ +

+
+
+ + + +".$tz.""; + } + $absPath = getcwd(); + + return << + Select your timezone
+ +

+

+ The absolute path to this installation on your webspace. Current {$absPath} should be the right one.
+ +

+

+ Database Hostname
+ +

+

+ Database User
+ +

+

+ Database Password for the given user
+ +

+

+ Database name
+ +

+

+ Database table prefix. Default is bib. A _ is added automatically.
+ +

+RET; +}