File:  [Local Repository] / db / prgsrc / drupal / modules / chgk_db / classes / DbEditors.class.php
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sat Apr 24 21:45:50 2010 UTC (14 years, 2 months ago) by roma7
Branches: MAIN
CVS tags: HEAD
Version 2 big update

    1: <?php
    2: require_once dirname(__FILE__).'/DbEditor.class.php';
    3: 
    4: class DbEditors {
    5:     private $db;
    6:     public function __construct() {
    7:         $this->db = new DbDatabase();
    8:     }
    9:     public function getAllHtml() {
   10:         $output = '';
   11:         $res = $this->db->getAllEditorsRes();
   12:         while ($line = db_fetch_object($res)) {
   13:             $this->people[] = DbEditor::newFromRow($line);
   14:         }
   15:         foreach ($this->people as $person) {
   16:             $output.= "<p>".$person->getLink()."</p>";
   17:         }
   18: 
   19: /*            $ares = db_query("SELECT * FROM Tournaments
   20:                 LEFT JOIN P2T ON (P2T.Tour = Tournaments.Id)
   21:                 WHERE P2T.Author = '".$line->CharId."' ORDER BY PlayedAt DESC, Title LIMIT 5");
   22:             $output.="<ul>";
   23:             while ($row = db_fetch_object($ares)) {
   24:                 $tour = DBPackage::newFromRow($row);
   25:                 $output.="<li>".$tour->getFullTitle()."</li>\n";
   26:             }
   27:             if ($line->TNumber>5) {
   28:                 $output.= "<li>...</li>";
   29:             }
   30:             $output .= "</ul>";
   31:         }*/
   32:         return $output;
   33:     }
   34: }

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