File:  [Local Repository] / db / prgsrc / drupal / modules / chgk_db / classes / DbPackage / DbPackageChamp.class.php
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Mar 8 16:19:22 2010 UTC (14 years, 4 months ago) by roma7
Branches: MAIN
CVS tags: HEAD
Print version is added

    1: <?php
    2: 
    3: class DbPackageChamp extends DbPackage {
    4:   private $tours;
    5:   
    6:   protected function setId() {
    7:     $this->id = str_replace('.txt', '', $this->tour->FileName);
    8:   }
    9:   
   10:   public function getAll() {
   11:     $this->loadTours();
   12:   }
   13:   
   14:   private function loadTours() {
   15:     $res = $this->db->getToursRes($this->getDbId());
   16:     while ($row = $this->db->fetch_row($res)) {
   17:       $this->tours[$row->Number] = new DbPackageTour($row, $this);
   18:       $this->tours[$row->Number] -> loadQuestions();
   19:     }      
   20:   }
   21:   public function getPrintVersion() {
   22:       $this->loadTours();
   23:       $content = theme('chgk_db_champ_full', $this);
   24:      return theme('chgk_db_print', $this->getTitle(), $content);
   25:   }
   26:   
   27:   public function getTours() {
   28:       return $this->tours;
   29:   }
   30:   public function isSingleTour() {
   31:       return sizeof($this->tours)==1;
   32:   }
   33: }

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