Changeset 239 for dev

Show
Ignore:
Timestamp:
09/19/07 15:00:16 (15 years ago)
Author:
ralle030583
Message:

possible fix for problems with top navigation
and not shown entries for campaigns and contract cause
of probs with killboard::hasCampaign() / hasContract()

Location:
dev/common
Files:
8 modified

Legend:

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

    r207 r239  
    33require_once('common/admin/admin_menu.php'); 
    44 
    5 $killboard = new Killboard(KB_SITE); 
    65$page = new Page(); 
    76$page->setAdmin(); 
  • dev/common/admin/admin_mods.php

    r213 r239  
    33 
    44$page = new Page('Administration - Mods'); 
    5 $killboard = new Killboard(KB_SITE); 
    65$page->setAdmin(); 
    76 
  • dev/common/awards.php

    r229 r239  
    5858$html .= "<td valign=top align=center>".$tkbox->generate()."</td>"; 
    5959// top scorers 
    60 $killboard = $page->killboard_; 
    6160if (config::get('kill_points')) 
    6261{ 
  • dev/common/corp_detail.php

    r233 r239  
    407407$menubox->addOption("link","Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); 
    408408 
    409 $killboard = $page->killboard_; 
    410409if (config::get('kill_points')) 
    411410    $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
  • dev/common/includes/class.killboard.php

    r213 r239  
    11<?php 
    2 require_once('common/includes/class.config.php'); 
    32 
    43class Killboard 
    54{ 
    6     function Killboard($site) 
    7     { 
    8         $this->qry_ = new DBQuery(); 
    9  
    10         $this->site_ = $site; 
    11         $this->config_ = new Config($site); 
    12     } 
    13  
    14     function isSuspended() 
    15     { 
    16         $this->execQuery(); 
    17         return $this->row_['rtl_suspended'] == "1"; 
    18     } 
    19  
    20     function getConfig() 
    21     { 
    22         $this->execQuery(); 
    23         return $this->config_; 
    24     } 
    25  
    265    function hasCampaigns($active = false) 
    276    { 
     
    309                 from kb3_contracts 
    3110                 where ctr_campaign = 1 
    32                    and ctr_site = '".$this->site_."'"; 
     11                   and ctr_site = '".KB_SITE."'"; 
    3312        if ($active) $sql .= " and ( ctr_ended is null or now() <= ctr_ended )"; 
    3413        $qry->execute($sql); 
     
    4221                 from kb3_contracts 
    4322                 where ctr_campaign = 0 
    44                    and ctr_site = '".$this->site_."'"; 
     23                   and ctr_site = '".KB_SITE."'"; 
    4524        if ($active) $sql .= " and ( ctr_ended is null or now() <= ctr_ended )"; 
    4625        $qry->execute($sql); 
    4726        return ($qry->recordCount() > 0); 
    4827    } 
    49  
    50     function execQuery() 
    51     { 
    52     } 
    5328} 
    5429?> 
  • dev/common/includes/globals.php

    r234 r239  
    11<?php 
    22// current subversion revision 
    3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 234 $', $match); 
     3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 239 $', $match); 
    44define('SVN_REV', $match[1]); 
    55 
  • dev/common/index.php

    r192 r239  
    2323// many ppl had issues with pear and relative paths 
    2424require_once('common/includes/db.php'); 
     25require_once('common/includes/class.config.php'); 
    2526require_once('common/includes/class.killboard.php'); 
    2627require_once('common/includes/class.page.php'); 
  • dev/common/register.php

    r206 r239  
    11<?php 
    2 $killboard = new Killboard(KB_SITE); 
    32$page = new Page('User - Registration'); 
    43