<tr> <td>' . $p->t('news/text') . '</td> <td><textarea name="text_' . $lang . '" rows="15" cols="80">' . $text . '</textarea></td> </tr> <tr> <td>' . $p->t('news/veroeffentlichen') . '</td> <td><input type="checkbox" name="sichtbar_' . $lang . '" ' . ($sichtbar == true ? 'checked' : '') . '></td> </tr> </table>'; echo '</div>'; } //Anlegen von Uebersetzungen if ($news->content_id != '') { echo '<div id="add">'; $content = new content(); if (!($vorhandene_sprachen = $content->getLanguages($news->content_id))) { die($content->errormsg); } $sprache_obj = new sprache(); $sprache_obj->getAll(true); //Wenn noch nicht alle Uebersetzungen vorhanden sind, //wird ein Link zum Erstellen der Uebersetzung angezeigt. if (count($vorhandene_sprachen) < count($sprache_obj->result)) { echo $p->t('news/uebersetzunganlegen'); foreach ($sprache_obj->result as $row) { if (!in_array($row->sprache, $vorhandene_sprachen)) { echo '<br /><a style="color:#008381" href="' . $_SERVER['PHP_SELF'] . '?news_id=' . $news_id . '&action=add_uebersetzung&lang=' . $row->sprache . '">' . $row->bezeichnung_arr[$sprache] . '</a>'; } } } else { echo '<br />' . $p->t('news/uebersetzungenvorhanden') . '<br />';
/** * Header fuer Content */ function drawheader() { global $content_id, $action, $sprache, $version, $action, $filterstr; //vorhandene Versionen dieser Sprache anzeigen $content = new content(); $content->loadVersionen($content_id, $sprache); echo '<table width="100%"> <tr> <td width="33%">'; echo 'Versionen: '; foreach ($content->result as $row) { if ($version == '') { $version = $row->version; } if ($version == $row->version) { $class = 'marked'; } else { $class = ''; } echo ' <a href="' . $_SERVER['PHP_SELF'] . '?content_id=' . $content_id . '&sprache=' . $sprache . '&version=' . $row->version . '&action=' . $action . '&filter=' . implode(' ', $filterstr) . '" class="' . $class . '" style="' . ($row->sichtbar ? '' : 'color:grey') . '">'; echo $row->version; echo '</a>, '; } echo '<br>'; //vorhandene Sprachen dieses Contents anzeigen $content = new content(); if (!($vorhandene_sprachen = $content->getLanguages($content_id, $version))) { die($content->errormsg); } echo 'Sprachen: '; foreach ($vorhandene_sprachen as $lang) { if ($sprache == $lang) { $class = 'marked'; } else { $class = ''; } echo ' <a href="' . $_SERVER['PHP_SELF'] . '?content_id=' . $content_id . '&sprache=' . $lang . '&action=' . $action . '&filter=' . implode(' ', $filterstr) . '" class="' . $class . '">'; //&version='.$version.' echo $lang; echo '</a>,'; } echo '</td><td align="center" width="33%">'; echo '<form action="' . $_SERVER['PHP_SELF'] . '?content_id=' . $content_id . '&sprache=' . $sprache . '&action=' . $action . '&filter=' . implode(' ', $filterstr) . '&method=add_newversion" method="POST">'; echo '<input type="submit" value="Neue Version anlegen">'; echo '</form>'; echo '</td><td align="right" width="33%">'; $sprache_obj = new sprache(); $sprache_obj->getAll(); //Wenn noch nicht alle Uebersetzungen vorhanden sind, //wird ein Formular zum Erstellen der Uebersetzung angezeigt. if (count($vorhandene_sprachen) != count($sprache_obj->result)) { echo '<form action="' . $_SERVER['PHP_SELF'] . '?content_id=' . $content_id . '&action=' . $action . '&filter=' . implode(' ', $filterstr) . '&method=add_uebersetzung" method="POST">'; echo 'Übersetzung in <SELECT name="sprache">'; foreach ($sprache_obj->result as $row) { if (!in_array($row->sprache, $vorhandene_sprachen)) { echo '<option value="' . $row->sprache . '">' . $row->bezeichnung_arr[$sprache] . '</option>'; } } echo '</SELECT>'; echo '<input type="submit" value="anlegen">'; echo '</form>'; } echo '</td></tr>'; echo '</table><hr>'; echo get_content_link('prefs', 'Eigenschaften') . ' | '; echo get_content_link('content', 'Inhalt') . ' | '; echo get_content_link('rights', 'Rechte') . ' | '; echo get_content_link('childs', 'Childs') . ' | '; echo get_content_link('history', 'History') . ' | '; echo get_content_link('delete', 'Delete'); }