root/dev/install/install_step7.php @ 215

Revision 212, 1.6 KB (checked in by ralle030583, 14 years ago)

- replaced $config->getConfig with config::getconfig so we havent a mix in all files<br>
- added valing='top' to award boxes to make the awards nice in board with not many pilots<br>
- removed not needed includes<br>
- added event 'killmail_delete' which is called before real delete of a killmail<br>
- admin can see classified system in the killmaildetails

Line 
1<?php
2$stoppage = true;
3
4extract($_SESSION['sql']);
5$dbhost = $host;
6extract($_SESSION['sett']);
7
8$config = preg_replace("/\{([^\}]+)\}/e", "\\1", join('', file('config.tpl')));
9$fp = fopen('../cache/config.php', 'w');
10fwrite($fp, trim($config));
11fclose($fp);
12?>
13<p>Here is the config i created for you, i saved it as ../cache/config.php with chmod 777.<br/>
14Please move that file to the main dir or create a new one there with the following content.<br/>
15You can continue once that config exists, i will try to delete the generated config if it should be stil there on the next step.<br/>
16</p>
17<?php
18highlight_string($config);
19?>
20<?php
21if (!file_exists('../config.php'))
22{
23    ?>
24<p><a href="?step=<?php echo $_SESSION['state']; ?>">Refresh</a></p>
25<?php
26    return;
27}
28// config is there, use it to create all config vars which arent there
29// to prevent that ppl with running installs get new values
30require_once('../config.php');
31
32$db = mysql_pconnect(DB_HOST, DB_USER, DB_PASS);
33mysql_select_db(DB_NAME);
34
35$confs = file('config.data');
36foreach ($confs as $line)
37{
38    list($key, $value) = explode(chr(9), trim($line));
39    $result = mysql_query('select * from kb3_config where cfg_site=\''.KB_SITE.'\' and cfg_key=\''.$key.'\'');
40    if (!$row = mysql_fetch_row($result))
41    {
42        $sql = "insert into kb3_config values ('".KB_SITE."','".$key."','".$value."')";
43        mysql_query($sql);
44    }
45}
46?>
47<br/><br/><font size=+1>Found the config on the right place, please continue...</font><br/>
48<p><a href="?step=<?php echo ($_SESSION['state']+1); ?>">Next Step</a></p>
Note: See TracBrowser for help on using the browser.