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