Changeset 95

Show
Ignore:
Timestamp:
11/28/06 08:54:08 (14 years ago)
Author:
exi
Message:

Added Logout option to admin menu.
Autoupgrade now checks for index rather than just creating it.
Fixed that no system error for contracts during upgrade.
Added a warning to the installer in case it doesnt get any id on step5.

Location:
dev
Files:
1 added
8 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin_menu.php

    r91 r95  
    1616$menubox->addOption("Kill Export - files", "?a=kill_export"); 
    1717$menubox->addOption("Kill Export - csv", "?a=kill_export_search"); 
     18$menubox->addOption("Logout", "?a=logout"); 
    1819?> 
  • dev/common/autoupgrade.php

    r89 r95  
    9999    } 
    100100    $qry->execute('ALTER TABLE `kb3_contract_details` ADD `ctd_sys_id` INT(11) NOT NULL DEFAULT \'0\''); 
     101 
     102    $qry->execute('SHOW columns from `kb3_contract_details` like \'ctd_ctr_id\''); 
     103    $arr = $qry->getRow(); 
     104    if ($arr['Key'] == 'PRI') 
     105    { 
     106        return; 
     107    } 
    101108    $qry->execute('ALTER TABLE `kb3_contract_details` ADD INDEX (`ctd_ctr_id`) '); 
    102109} 
  • dev/common/class.contract.php

    r91 r95  
    5656 
    5757        $caqry = new DBQuery(); 
    58         $caqry->execute($sql) or die($caqry->getErrorMsg()); 
     58        if (!$caqry->execute($sql)) 
     59        { 
     60            include_once('autoupgrade.php'); 
     61            check_contracts(); 
     62            $caqry->execute($sql); 
     63        } 
    5964 
    6065        while ($carow = $caqry->getRow()) 
  • dev/common/class.item.php

    r89 r95  
    2424    { 
    2525        $this->execQuery(); 
    26 //        if (strstr($this->row_['itt_name'], 'Drone')) 
    27 //        { 
    28 //            $html .= "<td class=item-icon width=\"30\" height=\"34\" background=\"".IMG_URL."/drones/".$size."_".$size."/".$this->row_['itm_externalid'].".png\" valign=top>"; 
    29 //        } 
    30 //        else 
    31 //        { 
     26 
     27        // slot 6 is dronebay 
     28        if ($this->row_['itt_slot'] == 6) 
     29        { 
     30            $html .= "<td class=item-icon width=\"30\" height=\"34\" background=\"".IMG_URL."/drones/".$size."_".$size."/".$this->row_['itm_externalid'].".png\" valign=top>"; 
     31        } 
     32        else 
     33        { 
     34            // fix for new db structure, just make sure old clients dont break 
     35            if (!strpos($this->row_['itm_icon'], 'icon')) 
     36            { 
     37                $this->row_['itm_icon'] = 'icon'.$this->row_['itm_icon']; 
     38            } 
    3239            $html .= "<td class=item-icon width=\"30\" height=\"34\" background=\"".IMG_URL."/items/".$size."_".$size."/".$this->row_['itm_icon'].".png\" valign=top>"; 
    33 //        } 
     40        } 
    3441        // return IMG_URL."/items/".$size."_".$size."/".$this->row_['itm_icon'].".png"; 
    3542 
  • dev/common/class.session.php

    r92 r95  
    1010            session_start(); 
    1111        } 
    12 //        $this->qry_ = new DBQuery(); 
    13 //        $this->sql_ = "select * 
    14 //                       from kb3_sessions ses 
    15 //                      where ses.ses_id = '" . $cookie . "' 
    16 //                      and ses.ses_ip = '" . $ip . "'"; 
    1712    } 
    1813 
     
    2015    { 
    2116        return isset($_SESSION['admin']); 
    22  
    23         $this->execQuery(); 
    24         return $this->qry_->recordCount() == 1; 
    2517    } 
    2618 
     
    2820    { 
    2921        return isset($_SESSION['admin_super']); 
    30  
    31         $this->execQuery(); 
    32         return ($this->qry_->recordCount() == 1 && $this->row_['ses_super'] == 1); 
    33     } 
    34  
    35     function execQuery() 
    36     { 
    37         return true; 
    38  
    39         if (!$this->qry_->executed_) 
    40             $this->qry_->execute($this->sql_); 
    41  
    42         $this->row_ = $this->qry_->getRow(); 
    43     } 
    44  
    45     function cleanup() 
    46     { 
    47         return true; 
    48  
    49         $qry = new DBQuery(); 
    50         $qry->execute("delete from kb3_sessions 
    51                        where ses_logon < date_sub( now(), INTERVAL '120:0' MINUTE_SECOND )"); 
    5222    } 
    5323 
     
    5727        $_SESSION['admin'] = 1; 
    5828        $_SESSION['admin_super'] = $super; 
    59 //        $current = time(); 
    60 //        $random = $_SERVER['REMOTE_ADDR'] . $current . KB_SITE; 
    61 //        $ses_id = md5($random); 
    62 // 
    63 //        if (!setcookie("EVK_COOKIE", $ses_id, 0)) 
    64 //            die("Unable to set cookie"); 
    65 // 
    66 //        $qry = new DBQuery(); 
    67 //        $qry->execute("insert into kb3_sessions values ('" . $ses_id . "', 
    68 //                                                        '" . $_SERVER['REMOTE_ADDR'] . "', 
    69 //                                                        now(), " . $super . " )"); 
     29    } 
     30 
     31    function destroy() 
     32    { 
     33        session_destroy(); 
    7034    } 
    7135} 
  • dev/install/install_step5.php

    r88 r95  
    150150{ 
    151151    return; 
    152 }?> 
     152} 
     153if ($_SESSION['sett']['aid'] == 0 && $_SESSION['sett']['aid'] == 0) 
     154{ 
     155    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/>'; 
     156} 
     157?> 
    153158<p><a href="?step=<?php echo ($_SESSION['state']+1); ?>">Next Step</a></p> 
  • dev/install/install_step7.php

    r88 r95  
    1010$config = preg_replace("/\{([^\}]+)\}/e", "\\1", join('', file('config.tpl'))); 
    1111$fp = fopen('../cache/config.php', 'w'); 
    12 fwrite($fp, $config); 
     12fwrite($fp, trim($config)); 
    1313fclose($fp); 
    1414?> 
  • dev/style/revelations/style.css

    r90 r95  
    178178{ 
    179179  padding-right: 5px; 
     180  padding-top: 5px; 
     181 padding-bottom: 6px; 
    180182} 
    181183