예제 #1
0
 protected function build_content_part(rsPage $Page, rsContainer $Container)
 {
     $text = explode('<!-- pagebreak -->', str_replace('<p><!-- pagebreak --></p>', '<!-- pagebreak -->', $Page->get_content()));
     $Container->subordinate('h1', $Page->get_description() == '' ? $Page->get_title() : $Page->get_description());
     $Content = $Container->subordinate('div', array('class' => 'content'));
     $Content->subordinate('div', array('class' => 'text'), $text[0]);
     $this->build_bloglist($Content);
     $Content->subordinate('div', array('class' => 'text'), $text[1]);
     return $Content;
 }
 protected function build_doceditor(rsContainer $Container, $docid)
 {
     $Doc = new rsPage($docid, $this->db);
     $Container->subordinate('h2', 'Dokument &quot;' . $Doc->get_title() . '&quot; bearbeiten');
     $TemplateSelect = $Container->subordinate('div', array('class' => 'fieldset', 'style' => 'float: right;'), 'Template: ')->subordinate('select', array('id' => 'doctemplate'));
     $Container->subordinate('div', array('class' => 'fieldset', 'style' => 'float: right; clear: right;'), 'Link: ')->subordinate('a', array('href' => basename($_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']) . '/../../?i=' . $docid, 'target' => '_blank'), 'index.php?i=' . $docid);
     $Container->subordinate('div', array('class' => 'fieldset'), 'Titel: ')->subordinate('input', array('type' => 'text', 'size' => 25, 'id' => 'doctitle', 'value' => $Doc->get_title()));
     $Container->subordinate('div', array('class' => 'fieldset'), 'Untertitel: ')->subordinate('input', array('type' => 'text', 'size' => 30, 'id' => 'docdescription', 'value' => $Doc->get_description()));
     foreach (scandir('../templates/') as $file) {
         $file = explode('.', $file);
         if ($file[1] == 'template' && $file[2] == 'php') {
             $attributes = array('value' => $file[0]);
             if ($Doc->get_template() == $file[0]) {
                 $attributes['selected'] = 'true';
             }
             $TemplateSelect->subordinate('option', $attributes, str_replace('_', ' ', $file[0]));
         }
     }
     $Container->subordinate('p')->subordinate('textarea', array('id' => 'doccontent', 'name' => 'doccontent', 'style' => 'width: 898px; height: 402px;'), $Doc->get_content());
     $Container->subordinate('p')->subordinate('input', array('type' => 'button', 'onClick' => 'save_doc(' . $docid . ')', 'value' => 'Speichern'))->subordinate('input', array('type' => 'button', 'onClick' => 'hide_doceditor()', 'value' => 'Abbrechen'))->subordinate('span', array('id' => 'editorOptions'), 'Graphischer Editor <input type="checkbox" onChange="toggle_editor()" checked />');
 }
예제 #3
0
 protected function build_content_part(rsPage $Page, rsContainer $Container)
 {
     $Container->subordinate('h1', $Page->get_description() == '' ? $Page->get_title() : $Page->get_description());
     $Content = $Container->subordinate('div', array('class' => 'content'));
     $Content->subordinate('div', array('class' => 'text'), $Page->get_content());
     return $Content;
 }
 protected function build_participating_groups(rsContainer $Container)
 {
     $participating_groups = $this->groupmembersdb->get('SELECT * FROM `%TABLE` WHERE `userid` = ' . $this->Benutzer->get('id'));
     if (count($participating_groups) > 0) {
         $Container->subordinate('p', 'Mitglied in folgenden Gruppen...');
         $Groups = $Container->subordinate('ul');
         foreach ($participating_groups as $row) {
             $groupdata = $this->groupsdb->getRow('`id` = ' . $row['groupid']);
             $Li = $Groups->subordinate('li');
             $Li->subordinate('a', array('href' => '?i=' . $this->docid . '&g=' . $groupdata['id']), $groupdata['name']);
             $Grouppage = new rsPage($groupdata['docid'], $this->groupsdb);
             $Li->subordinate('span', array('class' => ''), $Grouppage->get_description());
         }
     }
 }