root/dev/install/install_step6.php @ 400

Revision 400, 3.1 KB (checked in by kovell, 13 years ago)

Fixes: install is locked after first run, private cache files made inaccesible, initial summary caching removed from kill posting, board will not attempt to run on MySQL < 4.1, PILOT_ID cannot be set, legacy option removed from admin panel, pos values added to installation defaults

Line 
1<?php
2if(!$installrunning) {header('Location: index.php');die();}
3$stoppage = true;
4
5if ($_REQUEST['submit'])
6{
7    foreach ($_POST['set'] as $name => $value)
8    {
9        $_SESSION['sett'][$name] = $value;
10    }
11}
12$uri = 'http://'.$_SERVER['HTTP_HOST'].str_replace('/install/index.php','', $_SERVER['SCRIPT_NAME']);
13if (!$_SESSION['sett']['host'])
14{
15    $_SESSION['sett']['host'] = $uri.'/';
16}
17if (!$_SESSION['sett']['style'])
18{
19    $_SESSION['sett']['style'] = $uri.'/style';
20}
21if (!$_SESSION['sett']['img'])
22{
23    $_SESSION['sett']['img'] = $uri.'/img';
24}
25if (!$_SESSION['sett']['common'])
26{
27    $_SESSION['sett']['common'] = $uri.'/common';
28}
29
30if ($_SESSION['sett']['adminpw'] && $_SESSION['sett']['site'])
31{
32    $stoppage = false;
33}
34if ($_SESSION['sett']['aid'] && $_SESSION['sett']['cid'])
35{
36    echo '<b>Error:</b> You have entered an alliance AND corp id, please fix this conflict.<br/>';
37    $stoppage = true;
38}
39if (isset($_SESSION['sett']['site']) && strlen($_SESSION['sett']['site']) > 12)
40{
41    echo '<b>Error:</b> Your site identification string is way too long.<br/>';
42    $stoppage = true;
43}
44?>
45<p>You have to enter/edit some settings now. I will generate a config file based on this data for you.<br/>
46To be able to continue you have to enter at least an admin password and a site identification key.<br/>
47<br/>
48<b>Tips:</b><br/>
49Title is used as title attribute for every page so your corp/alliance name could be a good idea.<br/>
50Site identification should be 1-8 chars, they will be used to reference your settings inside the database, something like 'GKB' will be sufficient.<br/>
51The URLs are guessed on the location of this installscript, you might need to correct them for some installations.<br/>
52You can try to get the needed corp/alliance id from the eve-dev.net test killboard in case you don't know them.
53</p>
54<form id="options" name="options" method="post" action="?step=6">
55<input type="hidden" name="step" value="6">
56<div class="block-header2">Settings</div>
57<table class="kb-subtable">
58<?php
59$settings = array();
60$settings[] = array('descr' => 'Adminpassword', 'name' => 'adminpw');
61$settings[] = array('descr' => 'Title', 'name' => 'title');
62$settings[] = array('descr' => 'Site', 'name' => 'site');
63
64$settings[] = array('descr' => 'Host', 'name' => 'host');
65$settings[] = array('descr' => 'Style URL', 'name' => 'style');
66$settings[] = array('descr' => 'IMG URL', 'name' => 'img');
67$settings[] = array('descr' => 'Common URL', 'name' => 'common');
68
69//$settings[] = array('descr' => 'CorpID', 'name' => 'cid');
70//$settings[] = array('descr' => 'AllianceID', 'name' => 'aid');
71
72foreach ($settings as $set)
73{
74?>
75<tr><td width="120"><b><?php echo $set['descr']; ?></b></td><td><input type=<?php 
76        if($set[name] == 'adminpw') echo "password"; else echo "text"
77        ?> name=set[<?php echo $set['name']; ?>] size=60 maxlength=80 value="<?php echo $_SESSION['sett'][$set['name']]; ?>"></td></tr>
78<?php
79}
80?>
81<tr><td width="120"></td><td><input type=submit name=submit value="Save"></td></tr>
82</table>
83<?php if ($stoppage)
84{
85    return;
86}?>
87<p><a href="?step=<?php echo ($_SESSION['state']+1); ?>">Next Step</a></p>
Note: See TracBrowser for help on using the browser.