Changeset 370 for dev/install

Show
Ignore:
Timestamp:
06/14/09 06:51:49 (12 years ago)
Author:
kovell
Message:

- SQL queries optimised for speed and error protection.
- feed syndication optimised
- front page includes optional clock and optional kill/loss display
- mysqli support added
- transaction protection of kills added where supported (mysqli and InnoDB)
- summary tables and contracts show total destroyed value instead of ship value
- html errors reduced
- related kill calculation improved
- query caching errors reduced
- minor bugfixes
- Smarty 2.6.25 added
- apoc fitting mod added and modded
- code optimisations
- code comments added (doxygen format)
- conflicting mods are now identified

Location:
dev/install
Files:
1 added
13 modified

Legend:

Unmodified
Added
Removed
  • dev/install/config.data

    r345 r370  
    5757summarytable    1 
    5858cfg_qcache      0 
     59DBUpdate 007 
  • dev/install/config.tpl

    r254 r370  
    2020define('DB_USER', '{$user}'); 
    2121define('DB_PASS', '{$pass}'); 
     22define('DB_TYPE', 'mysqli'); 
     23define('DB_PORT', '3306'); 
    2224 
    2325// please make sure that there is no space behind the closing tag 
  • dev/install/index.php

    r254 r370  
    1414<html> 
    1515<head> 
    16 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> 
     16<meta http-equiv="content-type" content="text/html; charset=UTF8"> 
    1717<title>EVE Development Network Killboard Install Script</title> 
    1818<link rel="stylesheet" type="text/css" href="common.css"> 
     
    2424<td valign="top" height="100%" style="height: 100%"> 
    2525<div id="header"> 
    26 <img src="trinity.jpg" border="0"> 
     26<img src="quantum_rise.jpg" border="0"> 
    2727</div> 
    2828<div id="page-title">Install Step <?php echo $_SESSION['state']; ?></div> 
     
    3434</div></td> 
    3535</tr></table> 
    36 <div class="counter"><font style="font-size: 9px;">&copy;2006-2007 <a href="http://www.eve-dev.net/" target="_blank">EVE Development Network</a></font></div> 
     36<div class="counter"><font style="font-size: 9px;">&copy;2006-2009 <a href="http://www.eve-dev.net/" target="_blank">EVE Development Network</a></font></div> 
    3737</td></tr></table> 
    3838</body> 
  • dev/install/install_step1.php

    r254 r370  
    11<p>Welcome to the installer and updater, it will help you to set up everything correctly.<br/> 
     2<br/> 
     3This software requires:<br/> 
     4- Webserver (Apache)<br/> 
     5- Mysql 4.1+<br/> 
     6- PHP 4.0+<br/> 
     7- - GD 2 or higher<br/> 
     8- - PHP safe mode off<br/> 
     9- - allow_url_fopen option on (Recommended)<br/> 
     10<br/> 
    211The next step will test if your server has the needed modules to run the Killboard with all features. 
    312</p> 
  • dev/install/install_step2.php

    r340 r370  
    1414    if (function_exists('imagettftext')) 
    1515    { 
    16         echo 'I found FreeType support, this is needed by the signaturemod. Good!<br/>'; 
     16        echo 'I found FreeType support, this is needed by the signature mod. Good!<br/>'; 
    1717    } 
    1818    else 
    1919    { 
    20         echo 'Unfortunatly i was unable to locate FreeType support so you cannot use all available signatures. :(<br/>'; 
     20        echo 'Unfortunately I was unable to locate FreeType support so you cannot use all available signatures. :(<br/>'; 
    2121    } 
    2222} 
     
    2424{ 
    2525    echo 'GD is NOT available.<br/>The Killboard will be unable to output character portraits or corporation logos, please speak with your system administrator to install GD 2.0 or higher.<br/>'; 
    26     echo 'However, you can continue the installation but the Killboard might not run smoothly.<br/>'; 
     26    echo 'You can continue the installation but the Killboard might not run smoothly.<br/>'; 
    2727} 
    2828 
     
    5353{ 
    5454    echo 'Cache directory is writeable, testing for subdirs now:<br/>'; 
     55    checkdir('../cache/cache'); 
     56    checkdir('../cache/api'); 
    5557    checkdir('../cache/corps'); 
    5658    checkdir('../cache/data'); 
    5759    checkdir('../cache/map'); 
     60    checkdir('../cache/mails'); 
    5861    checkdir('../cache/portraits'); 
    5962    checkdir('../cache/templates_c'); 
     
    8891if (ini_get('allow_url_fopen')) 
    8992{ 
    90     echo 'allow_url_fopen is on, i will try to fetch a testpage from "'.$url.'".<br/>'; 
     93    echo 'allow_url_fopen is on, I will try to fetch a testpage from "'.$url.'".<br/>'; 
    9194    if (count(file($url))) 
    9295    { 
    93         echo 'Seems to be ok, i got the file.<br/>'; 
     96        echo 'Seems to be ok, I got the file.<br/>'; 
    9497    } 
    9598    else 
     
    101104{ 
    102105    include('../common/includes/class.http.php'); 
    103     echo 'allow_url_fopen is disabled, nethertheless i will try a socket connect now.<br/>'; 
     106    echo 'allow_url_fopen is disabled, nethertheless I will try a socket connect now.<br/>'; 
    104107 
    105108    $http = new http_request($url); 
    106109    if ($http->get_content()) 
    107110    { 
    108         echo 'Seems to be ok, i got the file.<br/>'; 
     111        echo 'Seems to be ok, I got the file.<br/>'; 
    109112    } 
    110113    else 
    111114    { 
    112         echo 'I could not get the file this might be a firewall related issue or the eve-dev server is not available.<br/>'; 
     115        echo 'I could not get the file. This might be a firewall related issue or the eve-dev server is not available.<br/>'; 
    113116    } 
    114117} 
  • dev/install/install_step3.php

    r342 r370  
    22$stoppage = true; 
    33 
    4 if ($_REQUEST['submit']) 
     4if ($_REQUEST['submit'] != '') 
    55{ 
    6     $_SESSION['sql'] = array(); 
    76    $_SESSION['sql']['host'] = $_POST['host']; 
    87    $_SESSION['sql']['user'] = $_POST['user']; 
  • dev/install/install_step4.php

    r342 r370  
    160160                    } 
    161161                } 
    162                 echo 'File '.$file.' had '.$lines.' lines with '.$query_count.' querys.<br/> '.$errors.' Querys failed.<br/>'; 
     162                echo '<br/>File '.$file.' had '.$lines.' lines with '.$query_count.' queries.<br/> '.$errors.' Queries failed.<br/>'; 
    163163                if (!$error) 
    164164                { 
    165                     echo 'Finished importing of this file.<br/>'; 
     165                    echo '<br/>Finished importing of this file.<br/>'; 
    166166                    echo '<meta http-equiv="refresh" content="1; URL=?step=4&sub=data" />'; 
    167167                    echo 'Automatic reload in 1s for next chunk. <a href="?step=4&sub=data">Manual Link</a><br/>'; 
     
    171171                    echo $error; 
    172172                    echo '<meta http-equiv="refresh" content="20; URL=?step=4&sub=data" />'; 
    173                     echo 'Automatic reload in 20s for next chunk because of the error occured. <a href="?step=4&sub=data">Manual Link</a><br/>'; 
     173                    echo 'Automatic reload in 20s for next chunk because an error occurred. <a href="?step=4&sub=data">Manual Link</a><br/>'; 
    174174                } 
    175175                $_SESSION['sqlinsert']++; 
     
    213213                    continue; 
    214214                } 
    215                 echo 'Inserting optional data ('.$i.'/'.$optsel.') into '.$table.'<br/> using file '.$file.'...'; 
     215                echo '<br/>Inserting optional data ('.$i.'/'.$optsel.') into '.$table.'<br/> using file '.$file.'...'; 
    216216                $fp = gzopen($file, 'r'); 
    217217                while ($query = gzgets($fp, 4000)) 
     
    254254    { 
    255255        $stoppage = false; 
     256        $failed = 0; 
    256257        echo 'All tables imported. Checking tables for correct data...<br/>'; 
    257258        foreach ($kb['kb3']['table'] as $line) 
     
    262263            $result = mysql_query('SELECT count(*) as cnt FROM '.$table); 
    263264            $test = mysql_fetch_array($result); 
    264             $failed = 0; 
    265265            if ($test['cnt'] != $count && $count != 0) 
    266266            { 
     
    292292 
    293293$structadd = 0; 
     294$failed = 0; 
    294295foreach ($struct as $table => $file) 
    295296{ 
     
    304305    echo 'Please continue with <a href="?step=4&sub=datasel">Importing Data</a><br/>'; 
    305306 
    306     echo '<br/><br/>In case you aborted the install and you got already data in those table you can bypass the import now by with <a href="?step=5">this link</a><br/>'; 
    307     echo 'To be sure i will check some table data for you now:<br/>'; 
     307    echo '<br/><br/>If you have aborted the install and you already have the data in those tables, you can bypass the import now with <a href="?step=5">this link</a><br/>'; 
     308    echo 'To be sure, I will check some table data for you now:<br/><br/>'; 
    308309    foreach ($kb['kb3']['table'] as $line) 
    309310    { 
     
    313314        $result = mysql_query('SELECT count(*) as cnt FROM '.$table); 
    314315        $test = mysql_fetch_array($result); 
    315         $failed = 0; 
     316         
    316317        if ($test['cnt'] != $count && $count != 0) 
    317318        { 
     
    327328    if ($failed == 0) 
    328329    { 
    329         echo 'All important table data seems to be there, you are safe to bypass the import.<br/>'; 
     330        echo '<br/>All important table data seems to be there. You are safe to bypass the import.<br/>'; 
    330331    } 
    331332    else 
    332333    { 
    333         echo 'There was an error in one of the important tables, please run the import.<br/>'; 
     334        echo '<br/>There was an error in one of the important tables. Please run the import.<br/>'; 
    334335    } 
    335336} 
    336337elseif ($structadd) 
    337338{ 
    338     echo 'Some table structures have to be added, please continue with <a href="?step=4&sub=struct">Creating Tables</a><br/>'; 
     339    echo 'Some table structures have to be added. Please continue with <a href="?step=4&sub=struct">Creating Tables</a><br/>'; 
    339340} 
    340341 
  • dev/install/install_step40.php

    r270 r370  
    160160                    } 
    161161                } 
    162                 echo 'File '.$file.' had '.$lines.' lines with '.$query_count.' querys.<br/> '.$errors.' Querys failed.<br/>'; 
     162                echo '<br/>File '.$file.' had '.$lines.' lines with '.$query_count.' querys.<br/> '.$errors.' Querys failed.<br/>'; 
    163163                if (!$error) 
    164164                { 
    165                     echo 'Finished importing of this file.<br/>'; 
     165                    echo '<br/>Finished importing of this file.<br/>'; 
    166166                    echo '<meta http-equiv="refresh" content="1; URL=?step=40&sub=data" />'; 
    167167                    echo 'Automatic reload in 1s for next chunk. <a href="?step=40&sub=data">Manual Link</a><br/>'; 
     
    171171                    echo $error; 
    172172                    echo '<meta http-equiv="refresh" content="20; URL=?step=40&sub=data" />'; 
    173                     echo 'Automatic reload in 20s for next chunk because of the error occured. <a href="?step=4&sub=data">Manual Link</a><br/>'; 
     173                    echo 'Automatic reload in 20s for next chunk because an error occured. <a href="?step=4&sub=data">Manual Link</a><br/>'; 
    174174                } 
    175175                $_SESSION['sqlinsert']++; 
     
    213213                    continue; 
    214214                } 
    215                 echo 'Inserting optional data ('.$i.'/'.$optsel.') into '.$table.'<br/> using file '.$file.'...'; 
     215                echo '<br/>Inserting optional data ('.$i.'/'.$optsel.') into '.$table.'<br/> using file '.$file.'...'; 
    216216                $fp = gzopen($file, 'r'); 
    217217                while ($query = gzgets($fp, 4000)) 
     
    292292 
    293293$structadd = 0; 
     294$failed = 0; 
     295 
    294296foreach ($struct as $table => $file) 
    295297{ 
     
    299301if (!$structadd && $_REQUEST['sub'] != 'datasel' && $_REQUEST['sub'] != 'data') 
    300302{ 
    301     echo 'All table structures seem to be in the database.<br/>'; 
     303    echo 'All table structures seem to be in the database.<br/><br/>'; 
    302304#    echo 'I will now check some table structures in case you are upgrading from a previous version... '; 
    303305#    include('install_step4_tblchk.php'); 
    304306    echo 'Please continue with <a href="?step=40&sub=datasel">Importing Data</a><br/>'; 
    305307 
    306     echo '<br/><br/>In case you aborted the install and you got already data in those table you can bypass the import now by with <a href="?step=41">this link</a><br/>'; 
    307     echo 'To be sure i will check some table data for you now:<br/>'; 
     308    echo '<br/><br/>If you have aborted the install and you already have the data in those tables, you can bypass the import now with <a href="?step=41">this link</a><br/>'; 
     309    echo 'To be sure, I will check some table data for you now:<br/><br/>'; 
     310 
    308311    foreach ($kb['kb3']['table'] as $line) 
    309312    { 
     
    313316        $result = mysql_query('SELECT count(*) as cnt FROM '.$table); 
    314317        $test = mysql_fetch_array($result); 
    315         $failed = 0; 
    316318        if ($test['cnt'] != $count && $count != 0) 
    317319        { 
     
    327329    if ($failed == 0) 
    328330    { 
    329         echo 'All important table data seems to be there, you are safe to bypass the import.<br/>'; 
     331        echo '<br/>All important table data seems to be there. You are safe to bypass the import.<br/>'; 
    330332    } 
    331333    else 
    332334    { 
    333         echo 'There was an error in one of the important tables, please run the import.<br/>'; 
     335        echo 'There was an error in one of the important tables. Please run the import.<br/>'; 
    334336    } 
    335337} 
    336338elseif ($structadd) 
    337339{ 
    338     echo 'Some table structures have to be added, please continue with <a href="?step=40&sub=struct">Creating Tables</a><br/>'; 
     340    echo 'Some table structures have to be added. Please continue with <a href="?step=40&sub=struct">Creating Tables</a><br/>'; 
    339341} 
    340342 
  • dev/install/install_step5.php

    r165 r370  
    5959} 
    6060?> 
    61 <p>You can now search for your corporation/alliance.<br/> 
    62 If you haven't imported that data or your corporation/alliance is missing i will offer to create it for you.<br/> 
    63 <b>Note:</b> Make sure you spell your corporation/alliance correctly (including capitalization), else you cannot post any mails!<br/> 
     61<p>You can now search for your corporation/alliance.<br/><br/> 
     62If you haven't imported that data or your corporation/alliance is missing I will offer to create it for you.<br/> 
     63<b>Note:</b> Make sure you spell your corporation/alliance <b>correctly</b> (including capitalisation), else you cannot post any mails!<br/> 
    6464</p> 
    6565<?php 
     
    162162if ($_SESSION['sett']['aid'] == 0 && $_SESSION['sett']['cid'] == 0) 
    163163{ 
    164     echo '<b>Warning:</b> It seems like i got no alliance and corpid, you can continue but you might have to edit it into the config yourself.<br/>'; 
     164    echo '<b>Warning:</b> It seems like I received no alliance or corp id. You can continue but you might have to edit it into the config yourself.<br/>'; 
    165165} 
    166166?> 
  • dev/install/install_step6.php

    r106 r370  
    4242} 
    4343?> 
    44 <p>You have to enter/edit some settings now, i will generate a config based on this data for you.<br/> 
     44<p>You have to enter/edit some settings now. I will generate a config file based on this data for you.<br/> 
    4545To be able to continue you have to enter at least an admin password and a site identification key.<br/> 
    4646<br/> 
     
    4949Site identification should be 1-8 chars, they will be used to reference your settings inside the database, something like 'GKB' will be sufficient.<br/> 
    5050The URLs are guessed on the location of this installscript, you might need to correct them for some installations.<br/> 
    51 You can try to get the needed corp/alliance id from the eve-dev.net test keyboard in case you don't know them. 
     51You can try to get the needed corp/alliance id from the eve-dev.net test killboard in case you don't know them. 
    5252</p> 
    5353<form id="options" name="options" method="post" action="?step=6"> 
  • dev/install/install_step7.php

    r267 r370  
    55$dbhost = $host; 
    66extract($_SESSION['sett']); 
     7$adminpw = crypt($adminpw); 
    78 
    89$config = preg_replace("/\{([^\}]+)\}/e", "\\1", join('', file('config.tpl'))); 
     
    1516</p> 
    1617<?php 
     18echo'<div class="config">'; 
    1719highlight_string($config); 
     20echo'</div>'; 
    1821?> 
    1922<?php 
     
    2124{ 
    2225    ?> 
    23 <p>Something went wrong, the file ../kbconfig.php is gone!</p> 
     26<p>Something went wrong. The file ../kbconfig.php is missing!</p> 
    2427<?php 
    2528    return; 
     
    6770} 
    6871?> 
    69 <br/><br/><font size=+1>Found the config on the right place, please continue...</font><br/> 
     72<br/><br/><font size=+1>Found the config file in the right place. Please continue...</font><br/> 
    7073<p><a href="?step=<?php echo ($_SESSION['state']+1); ?>">Next Step</a></p> 
  • dev/install/install_step8.php

    r254 r370  
    33?> 
    44<div class="block-header2">Installation Complete</div> 
    5 <p>Congratulations, you successfully installed the EVE Development Network Killboard v1.4!<br/> 
     5<p>Congratulations, you have successfully installed the EVE Development Network Killboard v1.4!<br/> 
    66Please check <a href="http://www.eve-dev.net/">EVE-Dev.net</a> for updates from time to time.<br/> 
    77<br/> 
  • dev/install/style.css

    r88 r370  
    55  padding: 0px; 
    66  height: 100%; 
    7   background-color: #4e4652; 
     7  background-color: #0D2323; 
    88} 
    99 
    1010.navigation 
    1111{ 
    12   background: #4e4652; 
     12  background: #0D2323; 
    1313  padding: 0px; 
    1414  border-collapse: separate; 
     
    3131  height: 100%; 
    3232 
    33   border-left: 1px solid #4e4652; 
    34   border-right: 1px solid #4e4652; 
    35   border-top: 0px solid #4e4652; 
    36   border-bottom: 0px solid #4e4652; 
     33  border-left: 1px solid #0D2323; 
     34  border-right: 1px solid #0D2323; 
     35  border-top: 0px solid #0D2323; 
     36  border-bottom: 0px solid #0D2323; 
    3737  padding: 0px; 
    3838  border-collapse: separate; 
    3939  border-spacing: 0px; 
    40   background-color: #66606B; 
     40  background-color: #3B5353; 
    4141} 
    4242 
     
    5050input, button, select, textarea 
    5151{ 
    52   border: 1px solid #4e4652; 
     52  border: 1px solid #0D2323; 
    5353  font-size: 9px; 
    54   background-color: #888088; 
     54  background-color: #0D2323; 
     55  color: #fff9ff; 
    5556} 
    5657 
     
    6162  width: 760px; 
    6263 
    63   background: #66606B; 
     64  background: #3B5353; 
    6465 
    6566  font-size: 11px; 
     
    9091} 
    9192 
     93div.config 
     94{ 
     95    background: #E0E0E0; 
     96    border: 2px solid #0D2323; 
     97    padding: 10px; 
     98} 
     99 
    92100.box-title 
    93101{ 
     
    202210{ 
    203211  height: 15px; 
    204   background: #4e4652; 
     212  background: #0D2323; 
    205213  font-size: 10px; 
    206214  font-weight: bold; 
     
    456464  font-size: 10px; 
    457465  font-weight: bold; 
    458   text-decoration: none; 
     466  text-decoration: underline; 
    459467} 
    460468 
     
    467475  font-size: 10px; 
    468476  font-weight: bold; 
     477  text-decoration: underline; 
     478} 
     479 
     480a:active { 
     481  color: #ffffff; 
     482  font-size: 10px; 
     483  font-weight: bold; 
     484  text-decoration: underline; 
     485} 
     486 
     487a:hover { 
     488  color: #ffffff; 
     489  font-size: 10px; 
     490  font-weight: bold; 
    469491  text-decoration: none; 
    470 } 
    471  
    472 a:active { 
    473   color: #ffffff; 
    474   font-size: 10px; 
    475   font-weight: bold; 
    476   text-decoration: none; 
    477 } 
    478  
    479 a:hover { 
    480   color: #ffffff; 
    481   font-size: 10px; 
    482   font-weight: bold; 
    483   text-decoration: underline; 
    484492} 
    485493.counter