root/dev/install/install_step6.php @ 106

Revision 106, 3.0 KB (checked in by exi, 14 years ago)

Added the missing data to the items table.
Changed the parser so it doesnt break on involved empty npcs.

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