Changeset 212

Show
Ignore:
Timestamp:
05/08/07 10:20:01 (15 years ago)
Author:
ralle030583
Message:

- 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

Location:
dev
Files:
34 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin/admin_mods.php

    r207 r212  
    11<?php 
    2 require_once('common/includes/class.killboard.php'); 
    32require_once('common/admin/admin_menu.php'); 
    43 
     
    65$killboard = new Killboard(KB_SITE); 
    76$page->setAdmin(); 
    8 $config = $killboard->getConfig(); 
    97 
    108if ($_POST['set_mods'] != '') 
     
    2119    } 
    2220    $activemods = substr($activemods, 0, strlen($activemods)-1); 
    23     $config->setConfig("mods_active", $activemods); 
     21    config::setConfig("mods_active", $activemods); 
    2422} 
    25 $activemods = explode(",", $config->getConfig("mods_active")); 
     23$activemods = explode(",", config::getConfig("mods_active")); 
    2624$html = <<<HTML 
    2725        <form action="?a=admin_mods" method="post"> 
  • dev/common/alliance_detail.php

    r206 r212  
    518518$menubox->addOption("caption","Pilot statistics"); 
    519519$menubox->addOption("link","Top killers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_kills"); 
    520 if ($config->getConfig('kill_points')) 
     520if (config::getConfig('kill_points')) 
    521521{ 
    522522    $menubox->addOption('link', "Top scorers", "?a=alliance_detail&all_id=" . $alliance->getID() . "&view=pilot_scores"); 
  • dev/common/awards.php

    r206 r212  
    5656$tklist->generate(); 
    5757$tkbox = new AwardBox($tklist, "Top killers", "kills", "kills", "eagle"); 
    58 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     58$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    5959// top scorers 
    6060$killboard = $page->killboard_; 
    61 $config = $killboard->getConfig(); 
    62 if ($config->getKillPoints()) 
     61if (config::getKillPoints()) 
    6362{ 
    6463    $tklist = new TopScoreList(); 
     
    7271    $tklist->generate(); 
    7372    $tkbox = new AwardBox($tklist, "Top scorers", "points", "points", "redcross"); 
    74     $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     73    $html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    7574} 
    7675// top solo killers 
     
    8584$tklist->generate(); 
    8685$tkbox = new AwardBox($tklist, "Top solokillers", "solo kills", "kills", "cross"); 
    87 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     86$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    8887// top damage dealers 
    8988$tklist = new TopDamageDealerList(); 
     
    9796$tklist->generate(); 
    9897$tkbox = new AwardBox($tklist, "Top damagedealers", "kills w/ most damage", "kills", "wing1"); 
    99 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     98$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    10099 
    101100$html .= "</tr><tr>"; 
     
    111110$tklist->generate(); 
    112111$tkbox = new AwardBox($tklist, "Top finalblows", "final blows", "kills", "skull"); 
    113 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     112$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    114113// top podkillers 
    115114$tklist = new TopPodKillerList(); 
     
    123122$tklist->generate(); 
    124123$tkbox = new AwardBox($tklist, "Top podkillers", "podkills", "kills", "globe"); 
    125 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     124$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    126125// top griefers 
    127126$tklist = new TopGrieferList(); 
     
    135134$tklist->generate(); 
    136135$tkbox = new AwardBox($tklist, "Top griefers", "carebear kills", "kills", "star"); 
    137 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     136$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    138137// top capital killers 
    139138$tklist = new TopCapitalShipKillerList(); 
     
    147146$tklist->generate(); 
    148147$tkbox = new AwardBox($tklist, "Top ISK killers", "capital shipkills", "kills", "wing2"); 
    149 $html .= "<td align=center>".$tkbox->generate()."</td>"; 
     148$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    150149 
    151150$html .= "</td></tr></table>"; 
  • dev/common/cc_detail.php

    r206 r212  
    221221$page->addContext($tkbox->generate()); 
    222222 
    223 $killboard = $page->killboard_; 
    224 $config = $killboard->getConfig(); 
    225 if ($config->getKillPoints()) 
     223if (config::getKillPoints()) 
    226224{ 
    227225    $tklist = new TopContractScoreList(); 
  • dev/common/comments.php

    r190 r212  
    66{ 
    77    $pw = false; 
    8     if (!$config->getConfig('comments_pw') || $page->isAdmin()) 
     8    if (!config::getConfig('comments_pw') || $page->isAdmin()) 
    99    { 
    1010        $pw = true; 
  • dev/common/corp_detail.php

    r206 r212  
    408408 
    409409$killboard = $page->killboard_; 
    410 $config = $killboard->getConfig(); 
    411 if ($config->getKillPoints()) 
     410if (config::getKillPoints()) 
    412411    $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
    413412$menubox->addOption("link","Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); 
  • dev/common/home.php

    r206 r212  
    6767 
    6868// bad hax0ring, we really need mod callback stuff 
    69 if (strpos($config->getConfig('mods_active'), 'rss_feed') !== false) 
     69if (strpos(config::getConfig('mods_active'), 'rss_feed') !== false) 
    7070{ 
    7171    $html .= "<div class=kb-kills-header><a href=\"?a=rss\"><img src=\"mods/rss_feed/rss_icon.png\" alt=\"RSS-Feed\" border=\"0\"></a>&nbsp;20 most recent kills</div>"; 
  • dev/common/igb_home.php

    r206 r212  
    108108$page->addContext($tkbox->generate()); 
    109109 
    110 if ($config->getKillPoints()) 
     110if (config::getKillPoints()) 
    111111{ 
    112112    $tklist = new TopScoreList(); 
  • dev/common/includes/class.box.php

    r190 r212  
    11<?php 
    22require_once("class.graph.php"); 
    3 require_once("globals.php"); 
    43 
    54class Box 
     
    5352    function generate() 
    5453    { 
    55         global $config, $smarty; 
     54        global $smarty; 
    5655 
    5756        $rows = array(); 
  • dev/common/includes/class.item.php

    r190 r212  
    8787        if (!isset($row['itm_id'])) 
    8888        { 
    89             global $config; 
    90             if ($config->getConfig('adapt_items')) 
     89            if (config::getConfig('adapt_items')) 
    9190            { 
    9291                // if the item is a tec2 we likely have the tec1 
  • dev/common/includes/class.kill.php

    r201 r212  
    754754            return; 
    755755 
     756        event::call('killmail_delete', &$this); 
     757            
    756758        $qry = new DBQuery(); 
    757759        $qry->execute("delete from kb3_kills where kll_id = ".$this->id_); 
  • dev/common/includes/class.killlist.php

    r210 r212  
    4242                                fbcrp.crp_name as fbcrp_name'; 
    4343 
    44             global $config; 
    45             if ($config->getConfig('ship_values')) 
     44            if (config::getConfig('ship_values')) 
    4645            { 
    4746                $this->sql_ .= ', ksv.shp_value'; 
     
    5756                           inner join kb3_ship_classes scl 
    5857                              on ( scl.scl_id = shp.shp_class )"; 
    59             if ($config->getConfig('ship_values')) 
     58            if (config::getConfig('ship_values')) 
    6059            { 
    6160                $this->sql_ .= ' left join kb3_ships_values ksv on (shp.shp_id = ksv.shp_id) '; 
  • dev/common/includes/class.killlisttable.php

    r210 r212  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("globals.php"); 
    4  
    52class KillListTable 
    63{ 
     
    3128    function generate() 
    3229    { 
    33         global $config, $smarty; 
     30        global $smarty; 
    3431        $prevdate = ""; 
    3532        $this->kill_list_->rewind(); 
    3633        $smarty->assign('daybreak', $this->daybreak_); 
    37         $smarty->assign('comments_count', $config->getConfig('comments_count')); 
     34        $smarty->assign('comments_count', config::getConfig('comments_count')); 
    3835 
    3936        // evil hardcode-hack, don't do this at home kids ! ;) 
    40         if ($config->getConfig('style_name') == 'revelations') 
     37        if (config::getConfig('style_name') == 'revelations') 
    4138        { 
    4239            $smarty->assign('comment_white', '_white'); 
     
    10097                $kll['plext'] = null; 
    10198            } 
    102             if ($config->getConfig('comments_count')) 
     99            if (config::getConfig('comments_count')) 
    103100            { 
    104101                $kll['commentcount'] = $kill->countComment($kill->getID()); 
  • dev/common/includes/class.killsummarytable.php

    r191 r212  
    11<?php 
    2 require_once("db.php"); 
    3 require_once("class.page.php"); 
    42require_once("class.ship.php"); 
    53 
     
    8886    function getkills() 
    8987    { 
    90         global $config; 
    9188        if ($this->mixedinvolved_) 
    9289        { 
     
    111108 
    112109        $sql = 'SELECT count(*) AS knb, scl_id, scl_class,'; 
    113         if ($config->getConfig('ship_values')) 
     110        if (config::getConfig('ship_values')) 
    114111        { 
    115112            $sql .= ' sum(ifnull(ksv.shp_value,scl.scl_value)) AS kisk FROM kb3_kills kll 
     
    145142 
    146143        $sql = 'SELECT count(*) AS lnb, scl_id, scl_class,'; 
    147         if ($config->getConfig('ship_values')) 
     144        if (config::getConfig('ship_values')) 
    148145        { 
    149146            $sql .= ' sum(ifnull(ksv.shp_value,scl.scl_value)) AS lisk FROM kb3_kills kll 
  • dev/common/includes/class.map.php

    r190 r212  
    11<?php 
    2 require_once('db.php'); 
    3 require_once('globals.php'); 
    4  
    52class MapView 
    63{ 
  • dev/common/includes/class.page.php

    r209 r212  
    11<?php 
    2 require_once('class.killboard.php'); 
    3  
    42class Page 
    53{ 
  • dev/common/includes/class.parser.php

    r190 r212  
    3737    function parse($checkauth = true) 
    3838    { 
    39         global $config; 
    4039        // header 
    4140        $involvedpos = strpos($this->killmail_, "Involved parties:"); 
     
    297296            if (!$authorized) 
    298297            { 
    299                 if ($string = $config->getConfig('post_permission')) 
     298                if ($string = config::getConfig('post_permission')) 
    300299                { 
    301300                    if ($string == 'all') 
     
    483482        if ($set == 'german') 
    484483        { 
    485             $search = array('Ziel:','Allianz: nichts','Allianz:','Zerstört','Sicherheit:','Beteiligte Parteien:','Anz:'); 
     484            $search = array('Ziel:','Allianz: nichts','Allianz:','Zerstï¿œrt','Sicherheit:','Beteiligte Parteien:','Anz:'); 
    486485            $replace = array('Victim:','Alliance: None','Alliance:','Destroyed','Security:','Involved parties:', 'Qty:'); 
    487486            $this->killmail_ = str_replace($search, $replace, $this->killmail_); 
  • dev/common/includes/class.ship.php

    r209 r212  
    6969        if (!$this->qry_) 
    7070        { 
    71             global $config; 
    7271            $this->qry_ = new DBQuery(); 
    7372 
  • dev/common/includes/globals.php

    r206 r212  
    11<?php 
    22// current subversion revision 
    3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 206 $', $match); 
     3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 210 $', $match); 
    44define('SVN_REV', $match[1]); 
    55 
  • dev/common/kill_detail.php

    r206 r212  
    1818            $IID = $_POST['IID']; 
    1919            $Val = $_POST[$IID]; 
    20             //echo "UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'"; 
    2120            $qry = new DBQuery(); 
    2221            $qry->execute("UPDATE kb3_items SET itm_value ='".$Val."' WHERE itm_id='".$IID."'"); 
     
    115114if ($kill->isClassified()) 
    116115{ 
    117     $smarty->assign('System', 'Classified'); 
    118     $smarty->assign('SystemURL', ""); 
    119     $smarty->assign('SystemSecurity', '0.0'); 
     116        //Admin is able to see classified Systems 
     117        if ($page->isAdmin()){ 
     118            $smarty->assign('System', $system->getName().' (Classified)'); 
     119        $smarty->assign('SystemURL', "?a=system_detail&amp;sys_id=".$system->getID()); 
     120            $smarty->assign('SystemSecurity', $system->getSecurity(true)); 
     121        }else{ 
     122                $smarty->assign('System', 'Classified'); 
     123        $smarty->assign('SystemURL', ""); 
     124            $smarty->assign('SystemSecurity', '0.0'); 
     125        } 
    120126} 
    121127else 
     
    218224} 
    219225 
    220 if (!$kill->isClassified()) 
     226//Admin is able to see classsiefied systems  
     227if ((!$kill->isClassified()) || ($page->isAdmin())) 
    221228{ 
    222229    $mapbox = new Box("Map"); 
  • dev/common/post.php

    r206 r212  
    6969        else 
    7070        { 
    71             if ($config->getPostMailto() != "") 
     71            if (config::getPostMailto() != "") 
    7272            { 
    7373                $mailer = new PHPMailer(); 
  • dev/common/post_igb.php

    r206 r212  
    1010if (isset($_POST['killmail'])) 
    1111{ 
    12     if ($_POST['password'] == $config->getPostPassword()) 
     12    if ($_POST['password'] == config::getPostPassword()) 
    1313    { 
    1414        $parser = new Parser($_POST['killmail']); 
  • dev/install/install_step7.php

    r95 r212  
    11<?php 
    22$stoppage = true; 
    3  
    4  
    53 
    64extract($_SESSION['sql']); 
  • dev/mods/example_mod/home.php

    r207 r212  
    108108$page->addContext($tkbox->generate()); 
    109109 
    110 $config = $page->killboard_->getConfig(); 
    111 if ($config->getKillPoints()) 
     110if (config::getKillPoints()) 
    112111{ 
    113112    $tklist = new TopScoreList(); 
  • dev/mods/feed_syndication/settings.php

    r193 r212  
    1616@set_time_limit(0); 
    1717require_once( 'feed_fetcher.php' ); 
    18 require_once( 'common/includes/class.page.php' ); 
    1918require_once( 'common/admin/admin_menu.php' ); 
    2019require_once( 'common/includes/class.corp.php' ); 
  • dev/mods/forum_post/cc_detail.php

    r207 r212  
    229229 
    230230$killboard = $page->killboard_; 
    231 $config = $killboard->getConfig(); 
    232 if ($config->getKillPoints()) 
     231if (config::getKillPoints()) 
    233232{ 
    234233    $tklist = new TopContractScoreList(); 
  • dev/mods/forum_post/class.killsummarytable.php

    r207 r212  
    8686    function getkills() 
    8787    { 
    88         global $config; 
    8988        if ($this->mixedinvolved_) 
    9089        { 
     
    109108 
    110109        $sql = 'SELECT count(*) AS knb, scl_id, scl_class,'; 
    111         if ($config->getConfig('ship_values')) 
     110        if (config::getConfig('ship_values')) 
    112111        { 
    113112            $sql .= ' sum(ifnull(ksv.shp_value,scl.scl_value)) AS kisk FROM kb3_kills kll 
     
    143142 
    144143        $sql = 'SELECT count(*) AS lnb, scl_id, scl_class,'; 
    145         if ($config->getConfig('ship_values')) 
     144        if (config::getConfig('ship_values')) 
    146145        { 
    147146            $sql .= ' sum(ifnull(ksv.shp_value,scl.scl_value)) AS lisk FROM kb3_kills kll 
     
    402401 
    403402                // Build our Post 
    404                 $config = new config(KB_SITE); 
    405                 $set_colours = unserialize($config->getConfig('forum_post_colours'));   //load colour settings 
     403                $set_colours = unserialize(config::getConfig('forum_post_colours'));    //load colour settings 
    406404                if(!is_array($set_colours)) { $set_colours = array(); }                                 // if the settings have been reset create an empty array so as not to brake the code later on 
    407                 $set_styles = unserialize($config->getConfig('forum_post_styles'));             //load style settings 
     405                $set_styles = unserialize(config::getConfig('forum_post_styles'));              //load style settings 
    408406                if(!is_array($set_styles)) { $set_styles = array(); }                                   // if the settings have been reset create an empty array so as not to brake the code later on 
    409                 $set_isk = $config->getConfig('forum_post_isk',$_POST['isk']);                  // load isk setting 
     407                $set_isk = config::getConfig('forum_post_isk',$_POST['isk']);                   // load isk setting 
    410408                 
    411409                //print_r($set_styles); 
     
    443441                $style_close = ""; 
    444442                }                
    445                 $order = $config->getConfig('forum_post_order'); 
     443                $order = config::getConfig('forum_post_order'); 
    446444                 
    447445                if($order == "first"){ 
  • dev/mods/forum_post/forum_post.php

    r207 r212  
    1 popup| <?        
     1popup| <?php     
    22require_once('common/includes/class.killlist.php'); 
    33require_once('common/includes/class.killlisttable.php'); 
  • dev/mods/forum_post/settings.php

    r207 r212  
    1 <? 
     1<?php 
    22require_once( "common/admin/admin_menu.php" ); 
    33require_once("common/includes/class.ship.php"); 
     
    2424if(isset($_POST['Reset'])) 
    2525{ 
    26 $config->setConfig('forum_post_colours',""); 
    27 $config->setConfig('forum_post_styles',""); 
     26config::setConfig('forum_post_colours',""); 
     27config::setConfig('forum_post_styles',""); 
    2828$confirm = "<strong>Settings Reset</strong><br/>"; 
    2929} 
     
    5656         
    5757        } 
    58 $config->setConfig('forum_post_colours',serialize($forum_post_colours) ); 
    59 $config->setConfig('forum_post_styles',serialize($forum_post_styles)); 
    60 $config->setConfig('forum_post_isk',$_POST['isk']); 
    61 $config->setConfig('forum_post_order',$_POST['order']); 
     58config::setConfig('forum_post_colours',serialize($forum_post_colours) ); 
     59config::setConfig('forum_post_styles',serialize($forum_post_styles)); 
     60config::setConfig('forum_post_isk',$_POST['isk']); 
     61config::setConfig('forum_post_order',$_POST['order']); 
    6262 
    6363$confirm = "<strong>Settings Saved</strong><br/>"; 
     
    6868$html .= $confirm; 
    6969 
    70 $set_colours = unserialize($config->getConfig('forum_post_colours'));   //load colour settings 
     70$set_colours = unserialize(config::getConfig('forum_post_colours'));    //load colour settings 
    7171if(!is_array($set_colours)) { $set_colours = array(); }                                 // if the settings have been reset create an empty array so as not to brake the code later on 
    72 $set_styles = unserialize($config->getConfig('forum_post_styles'));             //load style settings 
     72$set_styles = unserialize(config::getConfig('forum_post_styles'));              //load style settings 
    7373if(!is_array($set_styles)) { $set_styles = array(); }                                   // if the settings have been reset create an empty array so as not to brake the code later on 
    74 $set_isk = $config->getConfig('forum_post_isk',$_POST['isk']);                  // load isk setting 
     74$set_isk = config::getConfig('forum_post_isk',$_POST['isk']);                   // load isk setting 
    7575 
    7676//print_r($set_styles); 
     
    142142         
    143143        Place ship class at start or end of each line?<br/>'; 
    144         if($config->getConfig('forum_post_order') != "last"){ 
     144        if(config::getConfig('forum_post_order') != "last"){ 
    145145         
    146146        $html .= '<input name="order" type="radio" value="first" checked="checked"/>Start<br/> 
  • dev/mods/ingame_mod/igb.php

    r193 r212  
    44require_once("common/includes/class.killlist.php"); 
    55require_once("common/includes/class.killlisttable.php"); 
    6 require_once("common/includes/globals.php"); 
    76 
    87function mktable($klist, $limit)  
  • dev/mods/ingame_mod/settings.php

    r206 r212  
    1 <? 
     1<?php 
    22require_once( "common/admin/admin_menu.php" ); 
    33 
  • dev/mods/known_members/corp_detail.php

    r206 r212  
    535535$menubox->addOption("link","Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); 
    536536 
    537 $killboard = $page->killboard_; 
    538 $config = $killboard->getConfig(); 
    539 if ($config->getKillPoints()) 
     537if (config::getKillPoints()) 
    540538    $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
    541539$menubox->addOption("link","Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); 
  • dev/mods/known_members/settings.php

    r193 r212  
    11<?php 
    2 require_once("common/includes/class.page.php"); 
    32require_once("common/admin/admin_menu.php"); 
    43 
  • dev/mods/signature_generator/sig_list.php

    r190 r212  
    11<?php 
    2 require_once('common/includes/class.page.php'); 
    3  
    42$page = new Page('Signature Listing'); 
    53