Example #1
0
 public function SwitchToSubTid($extracted)
 {
     if (($pos = strrpos($this->_tid, '`')) !== FALSE) {
         $tid0 = substr($this->_tid, 0, $pos + 1);
         $tid = substr($this->_tid, $pos + 1);
     } else {
         $tid0 = '';
         $tid = $this->_tid;
     }
     $tbl = DTblDef::getInstance()->GetTblDef($tid);
     $subtbls = $tbl->Get(DTbl::FLD_SUBTBLS);
     $newkey = $extracted->GetChildVal($subtbls[0]);
     $subtid = '';
     if ($newkey != NULL) {
         if ($newkey == '0' || !isset($subtbls[$newkey])) {
             $subtid = $subtbls[1];
         } else {
             $subtid = $subtbls[$newkey];
         }
     }
     $this->_tid = $tid0 . $subtid;
 }
Example #2
0
 private function print_tbl($tid, $dlayer, $disp)
 {
     $tbl = DTblDef::getInstance()->GetTblDef($tid);
     $tbl->PrintHtml($dlayer, $disp);
     if (($linked = $tbl->Get(DTbl::FLD_LINKEDTBL)) != NULL) {
         if ($this->_linked_tbls == NULL) {
             $this->_linked_tbls = $linked;
         } else {
             $this->_linked_tbls = array_merge($this->_linked_tbls, $linked);
         }
     }
 }