コード例 #1
0
 public function drawSubTitle($subtitle = null)
 {
     if (DEBUGTMP) {
         printf('<font size=-2>%s</font><br />', __METHOD__);
     }
     if ($subtitle) {
         return parent::drawSubTitle($subtitle);
     }
     switch ($this->getMode()) {
         case 'creation':
             $subtitle = sprintf('%s: <b>%s</b>&nbsp;&nbsp;&nbsp;%s: <b>%s</b>', _('Server'), $this->getServer()->getName(), _('Container'), htmlspecialchars($this->container));
             if ($this->template_id) {
                 $subtitle .= '<br />';
                 $subtitle .= sprintf('%s: <b>%s</b>', _('Template'), $this->template->getID() != 'none' ? $this->template->getTitle() : _('Default'));
                 if ($this->template->getName()) {
                     $subtitle .= sprintf(' (<b>%s</b>)', $this->template->getName(false));
                 }
             }
             break;
         case 'modification':
             $subtitle = sprintf('%s: <b>%s</b>&nbsp;&nbsp;&nbsp;%s: <b>%s</b>', _('Server'), $this->getServer()->getName(), _('Distinguished Name'), htmlspecialchars($this->dn));
             if ($this->template_id) {
                 $subtitle .= '<br />';
                 $subtitle .= sprintf('%s: <b>%s</b>', _('Template'), $this->template->getID() != 'none' ? $this->template->getTitle() : _('Default'));
                 if ($this->template->getName()) {
                     $subtitle .= sprintf(' (<b>%s</b>)', $this->template->getName(false));
                 }
             }
             break;
     }
     parent::drawSubTitle($subtitle);
 }
コード例 #2
0
ファイル: QueryRender.php プロジェクト: dannylsl/phpLDAPadmin
 public function drawSubTitle($subtitle = null)
 {
     if (is_null($subtitle)) {
         $server = $this->getServer();
         $subtitle = sprintf('%s: <b>%s</b>', _('Server'), $server->getName());
         if ($this->template) {
             $subtitle .= '<br />';
             $subtitle .= sprintf('%s: <b>%s</b>', 'Query', $this->template->getID() != 'none' ? $this->template->getTitle() : _('Default'));
             if ($this->template->getName()) {
                 $subtitle .= sprintf(' (<b>%s</b>)', $this->template->getName(false));
             }
         }
     }
     parent::drawSubTitle($subtitle);
 }
コード例 #3
0
 function getNewRender()
 {
     $pr = new PageRender($this->config->getTemplatesDir(), $this->config->getDefaultTemplateName());
     $pr->setMetas(array());
     return $pr;
 }