root/dev/install/install_step6.php @ 461

Revision 461, 3.1 KB (checked in by kovell, 11 years ago)

Fixes: eve-dev changed to eve-id, recursive clearup scripts recurse more than one level, defunct admin sync removed.

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