Subversion Repositories oidplus

Rev

Rev 81 | Rev 104 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
82 daniel-mar 1
<?php
2
 
3
$own_dir = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI'];
4
 
5
?><!DOCTYPE html>
2 daniel-mar 6
<html lang="en">
7
 
8
<head>
76 daniel-mar 9
        <title>OIDplus setup</title>
2 daniel-mar 10
        <link rel="stylesheet" href="setup.css">
11
        <script src="../3p/sha3_js/sha3.js"></script><!-- https://github.com/emn178/js-sha3 -->
12
        <script src="setup.js"></script>
13
</head>
14
 
15
<body onLoad="javascript:rebuild()">
16
 
76 daniel-mar 17
<h1>OIDplus setup - Database connectivity</h1>
2 daniel-mar 18
 
19
<div id="step1">
20
<h2>Step 1: Enter setup information</h2>
21
<form id="step1_form">
22
<p>Which admin password do you want?<br><input id="admin_password" type="password" autocomplete="new-password" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"> <span id="password_warn"></span></p>
23
<p>Please repeat the password input:<br><input id="admin_password2" type="password" autocomplete="new-password" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"> <span id="password_warn2"></span></p>
24
<p>---</p>
81 daniel-mar 25
<p>MySQL hostname (usually <b>localhost</b>):<br><input id="mysql_host" type="text" value="localhost" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()">  <span id="mysql_host_warn"></p>
26
<p>MySQL username:<br><input id="mysql_username" type="text" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"> <span id="mysql_username_warn"></p>
2 daniel-mar 27
<p>MySQL password:<br><input id="mysql_password" type="password" autocomplete="new-password" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"></p>
81 daniel-mar 28
<p>MySQL database name:<br><input id="mysql_database" type="text" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"> <span id="mysql_database_warn"></p>
2 daniel-mar 29
<p>Tablename prefix (e.g. <b>oidplus_</b>):<br><input id="tablename_prefix" type="text" value="oidplus_" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"></p>
30
<p>---</p>
43 daniel-mar 31
<p><input id="recaptcha_enabled" type="checkbox" onclick="javascript:rebuild()"> <label for="recaptcha_enabled">RECAPTCHA Enabled</label></p>
2 daniel-mar 32
<p>RECAPTCHA Public key<br><input id="recaptcha_public" type="text" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"></p>
33
<p>RECAPTCHA Private key<br><input id="recaptcha_private" type="text" onKeyPress="javascript:rebuild()" onKeyUp="javascript:rebuild()"></p>
80 daniel-mar 34
<p>---</p>
35
<p>SSL enforcement<br><select name="enforce_ssl" id="enforce_ssl" onclick="javascript:rebuild()">
36
<option value="0">No SSL available (don't redirect)</option>
37
<option value="1">Enforce SSL (always redirect)</option>
82 daniel-mar 38
<option value="2" selected>Intelligent SSL detection (redirect if port 443 is open)</option>
80 daniel-mar 39
</select></p>
2 daniel-mar 40
</form>
41
</div>
42
 
43
<div id="step2">
44
<h2>Step 2: Import data</h2>
81 daniel-mar 45
<p><b>If you already have an OIDplus database and just want to rebuild the config file, please ignore this step.</b></p>
46
<p>Otherwise, import one of the following MySQL dumps in your database:</p>
2 daniel-mar 47
<p><ul>
82 daniel-mar 48
        <li><a href="struct_empty.sql.php" id="struct_1" target="_blank">Empty OIDplus database without example data</a>,<br>
49
        or via command line: <code>curl "<?php echo $own_dir; ?><span id="sqlcli_1"></span>" | mysql</code><br><br></li>
50
        <li><a href="struct_with_examples.sql.php" id="struct_2" target="_blank">OIDplus database with example data</a>,<br>
51
        or via command line: <code>curl "<?php echo $own_dir; ?><span id="sqlcli_2"></span>" | mysql</code></li>
2 daniel-mar 52
</ul></p>
82 daniel-mar 53
<p><font color="red">All data from the previous OIDplus instance will be deleted during the import.</font></p>
80 daniel-mar 54
 
2 daniel-mar 55
</div>
56
 
57
<div id="step3">
58
<h2>Step 3: Save config.inc.php file</h2>
59
<p>Save following contents into the file <b>includes/config.inc.php</b>:</p>
60
<code><font color="darkblue"><div id="config"></div></font></code>
61
</div>
62
 
63
<div id="step4">
80 daniel-mar 64
<h2>Step 4: Continue to next step</h2>
65
<p><input type="button" onclick="document.location='../'" value="Continue"></p>
66
<!-- <p><a href="../">Run the OIDplus system</a></p> -->
2 daniel-mar 67
</div>
68
 
69
</body>
70
</html>