Subversion Repositories oidplus

Compare Revisions

No changes between revisions

Regard whitespace Rev 1054 → Rev 1055

/trunk/setup/setup_bg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/setup/img/main_icon.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/setup/includes/setup_base.css
1,6 → 1,6
/*
* OIDplus 2.0
* Copyright 2019 - 2021 Daniel Marschall, ViaThinkSoft
* Copyright 2019 - 2022 Daniel Marschall, ViaThinkSoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
15,43 → 15,6
* limitations under the License.
*/
 
/*************************************************************************************
** ATTENTION: **
*************************************************************************************
** Please do NOT edit this file, since a software update will override **
** your changes. **
** To do changes to the design, you have following possibilities: **
** - If you just want to change colors, then the color plugin in the admin area **
** could an option for you. **
** - Create userdata/styles/setup_add.css (it will be placed after this file), **
** and use the "!important" statements to override style definitions. **
** - You can completely REPLACE setup_base.css by **
** creating userdata/styles/setup_base.css . This is very dangerous, because **
** you need to regularly check if the official setup_base.css gets changed or **
** extended, and you need to apply the changes according to the master file. **
*************************************************************************************/
 
body {
font-family: "Arial";
background-color: #EBEBEB;
background-image: url("../setup_bg.png");
background-repeat: repeat;
}
 
input[type=button], input[type=submit], input[type=reset] {
cursor: pointer;
}
 
#dirAccessWarning {
color:red;
}
 
.lng_flag {
cursor: pointer;
border: 1px solid #000 !important;
height: 20px;
}
 
.picture_ghost {
opacity: 0.4;
}
/trunk/setup/includes/setup_base.js
253,4 → 253,4
performAccessCheck();
}
 
window.onload = setupOnLoad;
$(document).ready(setupOnLoad);
/trunk/setup/index.php
24,27 → 24,17
 
require_once __DIR__ . '/../includes/oidplus.inc.php';
 
define('BASECONFIG_FILE', 'userdata/baseconfig/config.inc.php');
$already_setup = file_exists(__DIR__.'/../'.BASECONFIG_FILE);
define('BASECONFIG_FILE_OLD', 'includes/config.inc.php');
define('BASECONFIG_FILE_NEW', 'userdata/baseconfig/config.inc.php');
$existing_config = '';
if (file_exists(__DIR__.'/../'.BASECONFIG_FILE_OLD)) $existing_config = BASECONFIG_FILE_OLD;
if (file_exists(__DIR__.'/../'.BASECONFIG_FILE_NEW)) $existing_config = BASECONFIG_FILE_NEW;
$already_setup = $existing_config != '';
 
OIDplus::handleLangArgument();
 
echo '<!DOCTYPE html>';
echo '<html lang="'.substr(OIDplus::getCurrentLang(),0,2).'">';
ob_start();
 
echo '<head>';
echo ' <title>'._L('OIDplus Setup').'</title>';
echo ' <meta name="robots" content="noindex">';
echo ' <meta name="viewport" content="width=device-width, initial-scale=1.0">';
echo ' <link rel="stylesheet" href="setup.min.css.php">';
echo ' <link rel="shortcut icon" type="image/x-icon" href="../favicon.ico.php">';
echo ' <script src="setup.min.js.php" type="text/javascript"></script>';
echo '</head>';
 
echo '<body>';
 
echo '<h1>'._L('OIDplus Setup - Configuration File Generator').'</h1>';
 
echo '<noscript>';
echo '<h2>'._L('Please enable JavaScript in order to use setup!').'</h2>';
echo '</noscript>';
51,15 → 41,13
 
echo '<span id="setupPageContent" style="display:None">';
 
echo OIDplus::gui()->getLanguageBox(null, false);
 
echo '<p>';
if ($already_setup) {
echo _L('This assistant will help you updating the file <b>%1</b>.',BASECONFIG_FILE);
echo _L('This assistant will help you updating the file <b>%1</b>.',$existing_config);
} else {
echo _L('Thank you very much for choosing OIDplus!');
echo ' ';
echo _L('This setup assistant will help you creating the file <b>%1</b>.',BASECONFIG_FILE);
echo _L('This setup assistant will help you creating the file <b>%1</b>.',$existing_config);
}
echo ' ';
echo _L('This assistant does not automatically write to this file. Instead, you need to copy-paste the contents into the file.');
214,8 → 202,8
// ----------------------------------------
 
echo '<div id="step3">';
echo '<h2>'._L('Step %1: Save %2 file',3,BASECONFIG_FILE).'</h2>';
echo '<p>'._L('Save following contents into the file <b>%1</b>',BASECONFIG_FILE).'</p>';
echo '<h2>'._L('Step %1: Save %2 file',3,$existing_config).'</h2>';
echo '<p>'._L('Save following contents into the file <b>%1</b>',$existing_config).'</p>';
echo '<code><font color="darkblue"><div id="config"></div></font></code>';
echo '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(config)"></p>';
echo '</div>';
223,18 → 211,36
// ----------------------------------------
 
echo '<div id="step4">';
echo '<h2>'._L('Step %1: After you have updated the file...',4).'</h2>';
if (is_dir(__DIR__.'/../plugins/viathinksoft/adminPages/050_oobe/')) {
if ($already_setup) {
echo '<h2>'._L('Step %1: Start OIDplus',4).'</h2>';
echo '<p><input type="button" onclick="window.location.href=\'../plugins/viathinksoft/adminPages/050_oobe/oobe.php\'" value="'._L('Check connection and modify initial settings').'"></p>';
echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Check connection and start OIDplus').'"></p>';
} else {
echo '<h2>'._L('Step %1: Continue to next step',4).'</h2>';
echo '<p><input type="button" onclick="window.location.href=\'../plugins/viathinksoft/adminPages/050_oobe/oobe.php\'" value="'._L('Check connection and go to initial settings').'"></p>';
}
echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Continue').'"></p>';
} else {
echo '<p><input type="button" onclick="window.location.href=\'../\'" value="'._L('Check connection and start OIDplus').'"></p>';
}
echo '</div>';
 
echo '<br><br><br>'; // because of iPhone Safari
echo '<br><br>'; // because of iPhone Safari
 
echo '</span>';
echo '<script> $("#setupPageContent")[0].style.display = "Block"; </script>';
 
echo '</body>';
echo '</html>';
# ---
 
$page_title_1 = _L('OIDplus Setup');
$page_title_2 = _L('Configuration File Generator');
$static_icon = 'img/main_icon.png';
$static_content = ob_get_contents();
$extra_head_tags = array();
$extra_head_tags[] = '<meta name="robots" content="noindex">';
$extra_head_tags[] = '<link rel="stylesheet" href="setup.min.css.php">';
$extra_head_tags[] = '<script src="setup.min.js.php" type="text/javascript"></script>';
ob_end_clean();
 
OIDplus::invoke_shutdown();
 
OIDplus::gui()->showSimplePage($page_title_1, $page_title_2, $static_icon, $static_content, $extra_head_tags);
/trunk/setup/setup.min.js.php
2,7 → 2,7
 
/*
* OIDplus 2.0
* Copyright 2019 - 2021 Daniel Marschall, ViaThinkSoft
* Copyright 2019 - 2022 Daniel Marschall, ViaThinkSoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
28,11 → 28,6
 
$files = array();
 
// Note: Currently we do not use process_file() like in oidplus.min.js.php to fix relative paths
// since this script currently has no relvate resources that need to be loaded
$files[] = __DIR__ . '/../vendor/emn178/js-sha3/src/sha3.js'; // https://github.com/emn178/js-sha3
$files[] = __DIR__ . '/../vendor/components/jquery/jquery.js';
 
$files[] = 'var DEFAULT_LANGUAGE = '.json_encode(OIDplus::getDefaultLang()).';';
 
OIDplus::registerAllPlugins('language', OIDplusLanguagePlugin::class, null);
50,6 → 45,7
$files[] = /*captcha*/'var captcha_rebuild_config_callbacks = [];'; // Get config strings to be placed in the baseconfig file
$files[] = /*captcha*/'var captcha_plugin_combobox_change_callbacks = [];';
 
// Load SETUP JavaScripts (not to be confused with the regular javascripts in oidplus.min.js.php)
$manifests = OIDplus::getAllPluginManifests('database,captcha', true);
foreach ($manifests as $manifest) {
foreach ($manifest->getJsFilesSetup() as $js_file) {