File:  [Local Repository] / db / prgsrc / drupal / modules / chgk_db / classes / DbEditors.class.php
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Sun May 23 09:31:39 2010 UTC (13 years, 11 months ago) by roma7
Branches: MAIN
CVS tags: HEAD
Editors changes

<?php
require_once dirname(__FILE__).'/DbEditor.class.php';

class DbEditors {
    private $db;
    private $years;
    public function __construct() {
        $this->db = new DbDatabase();
    }
    private function loadPeople() {
       $this->people = array();
        $res = $this->db->getAllEditorsRes();
        while ($line = db_fetch_object($res)) {
            $this->people[] = DbEditor::newFromRow($line);
        }
    }


    public function getAllHtml() {
        $output = '';
        $this->loadPeople();
        foreach ($this->people as $person) {
            $output.= "<p>".$person->getLink()."</p>";
        }

/*            $ares = db_query("SELECT * FROM Tournaments
                LEFT JOIN P2T ON (P2T.Tour = Tournaments.Id)
                WHERE P2T.Author = '".$line->CharId."' ORDER BY PlayedAt DESC, Title LIMIT 5");
            $output.="<ul>";
            while ($row = db_fetch_object($ares)) {
                $tour = DBPackage::newFromRow($row);
                $output.="<li>".$tour->getFullTitle()."</li>\n";
            }
            if ($line->TNumber>5) {
                $output.= "<li>...</li>";
            }
            $output .= "</ul>";
        }*/
        return $output;
    }
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>