root/dev/common/includes/class.killboard.php @ 317

Revision 239, 0.8 KB (checked in by ralle030583, 15 years ago)

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

Line 
1<?php
2
3class Killboard
4{
5    function hasCampaigns($active = false)
6    {
7        $qry = new DBQuery();
8        $sql = "select ctr_id
9                 from kb3_contracts
10                 where ctr_campaign = 1
11                   and ctr_site = '".KB_SITE."'";
12        if ($active) $sql .= " and ( ctr_ended is null or now() <= ctr_ended )";
13        $qry->execute($sql);
14        return ($qry->recordCount() > 0);
15    }
16
17    function hasContracts($active = false)
18    {
19        $qry = new DBQuery();
20        $sql = "select ctr_id
21                 from kb3_contracts
22                 where ctr_campaign = 0
23                   and ctr_site = '".KB_SITE."'";
24        if ($active) $sql .= " and ( ctr_ended is null or now() <= ctr_ended )";
25        $qry->execute($sql);
26        return ($qry->recordCount() > 0);
27    }
28}
29?>
Note: See TracBrowser for help on using the browser.