Exemplo n.º 1
0
 function GetTitle()
 {
     global $_elems, $cfg;
     $title = TTable::GetTitle();
     $id = $this->GetClientID();
     $_elems = false;
     if ($id) {
         $_elems = true;
         $title = $this->getClientTitle($id);
     }
     return $title;
 }
Exemplo n.º 2
0
 function GetTitle()
 {
     global $_elems, $_name, $cfg;
     $title = TTable::GetTitle();
     $id = (int) get('id');
     if (defined('LANG_SELECT') && LANG_SELECT) {
         $rows = sql_query("SELECT type, IF (name_" . lang() . " <> '', name_" . lang() . ", name_" . LANG_DEFAULT . ") as name FROM tree WHERE id=" . $id);
     } else {
         $rows = sql_query("SELECT type, name FROM tree WHERE id=" . $id);
     }
     $_elems = array();
     if ($rows) {
         $row = mysql_fetch_row($rows);
         $_elems = !empty($row[0]) && !empty($cfg['types'][$row[0]]['elements']) ? $cfg['types'][$row[0]]['elements'] : $cfg['types']['home']['elements'];
         $_name = $row[1];
         $title .= ' - "' . $row[1] . '"';
     }
     return $title;
 }