コード例 #1
0
 /**
  * @param integer page_id
  * @param integer change
  */
 function TextPage($page_id, $change = 0)
 {
     if (empty($page_id)) {
         return;
     }
     if ($change == 0) {
         $sql = "SELECT *\r\n\t\t\t\t\tFROM " . DB_PREFIX . "pages_text\r\n\t\t\t\t\tWHERE page_id = {$page_id}";
     } else {
         $sql = "SELECT *\r\n\t\t\t\t\tFROM (" . DB_PREFIX . "pages_history page\r\n\t\t\t\t\tLEFT JOIN " . DB_PREFIX . "pages_text_history text ON text.page_id = page.id ) \r\n\t\t\t\t\tWHERE page.page_id={$page_id}\r\n\t\t\t\t\tORDER BY  page.page_date ASC\r\n\t\t\t\t\tLIMIT " . ($change - 1) . ",1";
     }
     if ($page_result = db_result($sql)) {
         $page = mysql_fetch_object($page_result);
         if ($change == 0) {
             $this->Text = $page->text_page_text;
             $this->HTML = $page->text_page_html;
         } else {
             $this->Text = $page->text_page_text;
             $this->HTML = convertToPreHtml($page->text_page_text);
         }
     }
 }
コード例 #2
0
function page_pageeditor()
{
    global $admin_lang, $actual_user_lang, $_SERVER, $actual_user_id, $extern_action, $extern_page_name, $extern_page_title, $extern_page_lang, $extern_page_parentid, $extern_page_edit, $extern_page_text, $extern_page_visible, $extern_show_hidden_pages, $extern_show_deleted_pages, $extern_sure;
    $out = "\t\t\t<h3>" . $admin_lang['pageeditor'] . "</h3><hr />\r\n";
    //$page_name = $extern_page_name;
    //$page_title = $extern_page_title;
    //$page_lang = $extern_page_lang;
    //$page_parentid = '';
    if (!isset($extern_page_name)) {
        $extern_page_name = '';
    }
    if (!isset($extern_page_title)) {
        $extern_page_title = '';
    }
    if (!isset($extern_page_lang)) {
        $extern_page_lang = '';
    }
    if (!isset($extern_page_parentid)) {
        $extern_page_parentid = '';
    }
    if (!isset($extern_action)) {
        $extern_action = '';
    }
    if ($extern_action == 'add_new') {
        if (!isset($extern_page_edit)) {
            $extern_page_edit = '';
        }
        if (!isset($extern_page_visible)) {
            $extern_page_visible = '';
        }
        if ($extern_page_name != '' && $extern_page_title != '' && $extern_page_lang != '') {
            $a_visible = array('public', 'private', 'hidden');
            if (!in_array($extern_page_visible, $a_visible)) {
                $extern_page_visible = $a_visible[0];
            }
            $extern_page_name = strtolower($extern_page_name);
            $extern_page_name = str_replace(' ', '_', $extern_page_name);
            $sql = "SELECT page_name\r\n\t\t\t\t\tFROM " . DB_PREFIX . "pages_content\r\n\t\t\t\t\tWHERE page_name='{$extern_page_name}'";
            $page_result = db_result($sql);
            if (!($page_data = mysql_fetch_object($page_result))) {
                $sql = "INSERT INTO " . DB_PREFIX . "pages_content (page_name, page_type, page_title, page_text, page_lang, page_html, page_parent_id, page_creator, page_created, page_visible)\r\n\t\t\t\t\tVALUES ('{$extern_page_name}', 'text', '{$extern_page_title}', '', '{$extern_page_lang}', '', '{$extern_page_parentid}', '{$actual_user_id}', '" . mktime() . "','{$extern_page_visible}')";
                db_result($sql);
            }
            if ($extern_page_edit == 'on') {
                header('Location: ' . $_SERVER['PHP_SELF'] . '?page=pageeditor&action=edit&page_name=' . $extern_page_name);
            } else {
                header('Location: ' . $_SERVER['PHP_SELF'] . '?page=pageeditor');
            }
        }
    } elseif ($extern_action == 'update') {
        if (!isset($extern_page_text)) {
            $extern_page_text = '';
        }
        if ($extern_page_name != '' && $extern_page_title != '' && $extern_page_text != '') {
            $html = convertToPreHtml($extern_page_text);
            $sql = "SELECT *\r\n\t\t\t\t\tFROM " . DB_PREFIX . "pages_content\r\n\t\t\t\t\tWHERE page_name='{$extern_page_name}'";
            $old_result = db_result($sql);
            if ($old = mysql_fetch_object($old_result)) {
                if ($old->page_text != $extern_page_text || $old->page_title != $extern_page_title) {
                    if ($old->page_text != '') {
                        $sql = "INSERT INTO " . DB_PREFIX . "sitedata_history (name, title, text, lang, type, creator, date)\r\n\t\t\t\t\t\t\tVALUES ('{$extern_page_name}', '{$old->page_title}', '{$old->page_text}', '{$old->page_lang}', 'text',{$old->page_creator}, '{$old->page_created}')";
                        db_result($sql);
                    }
                    $sql = "UPDATE " . DB_PREFIX . "pages_content\r\n\t\t\t\t\t\t\tSET page_title= '{$extern_page_title}', page_text='{$extern_page_text}', page_html='{$html}', page_creator='{$actual_user_id}', page_created='" . mktime() . "'\r\n\t\t\t\t\t\t\tWHERE page_name='{$extern_page_name}'";
                    db_result($sql);
                    $out = 'Der Eintrag sollte gespeichert sein';
                }
            }
        }
    } elseif ($extern_action == 'new') {
        $out .= "\t\t\t<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">\r\n\t\t\t\t<fieldset>\r\n\t\t\t\t<legend>Neue Seite</legend>\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"pageeditor\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"add_new\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\tName/Kürzel:\r\n\t\t\t\t\t\t\t<span class=\"info\">Mit diesem Kürzel wird auf die Seite zugegriffen und dient es zur eindeutigen Identifizierung der Seite.</span>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"page_name\" value=\"" . $extern_page_name . "\" maxlength=\"20\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\tTitel:\r\n\t\t\t\t\t\t\t<span class=\"info\">Der Titel wird später in der Titelleiste des Browsers angezeigt.</span>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"page_title\" maxlength=\"100\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $admin_lang['language'] . ":\r\n\t\t\t\t\t\t\t<span class=\"info\">Der Text soll in der gewählten Sprache geschrieben werden.</span>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select name=\"page_lang\">\r\n\t\t\t\t\t\t\t\t<option value=\"de\">Deutsch</option>\r\n\t\t\t\t\t\t\t\t<option value=\"en\">Englisch</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\tZugang:\r\n\t\t\t\t\t\t\t<span class=\"info\">Wer soll sich die Seite später anschauen können?<br />\r\n\t\t\t\t\t\t\tJeder (öffentlich), nur ausgewählte Benutzer (privat) oder soll die Seite nur erstellt werden um sie später zu veröffentlichen (versteckt)?</span>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select name=\"page_visible\">\r\n\t\t\t\t\t\t\t\t<option value=\"public\">Öffentlich</option>\r\n\t\t\t\t\t\t\t\t<option value=\"private\">Privat</option>\r\n\t\t\t\t\t\t\t\t<option value=\"hidden\">Versteckt</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\tUnterseite von:\r\n\t\t\t\t\t\t\t<span class=\"info\">TODO</span>\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select name=\"page_parentid\">\r\n\t\t\t\t\t\t\t\t<option value=\"0\">Keiner</option>\r\n";
        $sql = "SELECT page_name, page_title, page_id\r\n\t\t\t\tFROM " . DB_PREFIX . "pages_content WHERE page_visible!='deleted'\r\n\t\t\t\tORDER BY page_name ASC";
        $pages = db_result($sql);
        while ($pageinfo = mysql_fetch_object($pages)) {
            $out .= "\t\t\t\t\t\t<option value=\"" . $pageinfo->page_id . "\">" . $pageinfo->page_title . "(" . $pageinfo->page_name . ")</option>\r\n";
        }
        $out .= "\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\tBearbeiten?\r\n\t\t\t\t\t\t\t<span class=\"info\">Soll die Seite nach dem Erstellen bearbeitet werden oder soll wieder auf die Übersichtseite zurückgekehrt werden?</span>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td><input type=\"checkbox\" name=\"page_edit\" checked=\"true\"/></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t\t\t\t<input type=\"reset\" class=\"button\" value=\"Zurücksetzen\" />&nbsp;\r\n\t\t\t\t\t\t\t<input type=\"submit\" class=\"button\" value=\"Erstellen\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</fieldset>\r\n\t\t\t</form>";
    } elseif ($extern_action == 'delete') {
        if (!isset($extern_sure)) {
            $extern_sure = '';
        }
        $sql = "SELECT *\r\n\t\t\t\tFROM " . DB_PREFIX . "pages_content\r\n\t\t\t\tWHERE page_name='{$extern_page_name}'";
        $exists_result = db_result($sql);
        $exists = null;
        if (!($exists = mysql_fetch_object($exists_result))) {
            $out .= "\t\t\tDer Eintag existiert garnicht, das löschen kann man sich also sparen<br />\r\n\t\t\t<a href=\"" . $PHP_SELF . "?page=pageeditor\">" . $admin_lang['ok'] . "</a>";
            return $out;
        }
        if ($extern_sure == 1) {
            $sql = "INSERT INTO " . DB_PREFIX . "sitedata_history (name, title, text, lang, type, creator, date)\r\n\t\t\t\t\tVALUES ('{$extern_page_name}', '{$exists->page_title}', '{$exists->page_text}', '{$exists->page_lang}', 'text', {$exists->page_creator}, '{$exists->page_created}')";
            db_result($sql);
            $sql = "UPDATE " . DB_PREFIX . "pages_content\r\n\t\t\t\t\tSET  page_visible='deleted', page_text='', page_html='', page_creator='{$actual_user_id}', page_created='" . mktime() . "'\r\n\t\t\t\t\tWHERE page_name='{$extern_page_name}'";
            db_result($sql);
            header("Location: " . $_SERVER['PHP_SELF'] . "?page=pageeditor&action=tree");
        } else {
            $out .= "\t\t\tMöchten sie die Seite &quot;" . $exists->page_title . " (" . $exists->page_name . ")&quot; wirklich löschen?<br />\r\n\t\t\t\t<a href=\"" . $_SERVER['PHP_SELF'] . "?page=pageeditor&amp;action=delete&amp;sure=1&amp;page_name=" . $extern_page_name . "\">" . $admin_lang['yes'] . "</a> <a href=\"" . $_SERVER['PHP_SELF'] . "?page=pageeditor\">" . $admin_lang['no'] . "</a>";
        }
    } elseif ($extern_action == 'tree') {
        $show_deleted = false;
        $show_hidden = false;
        if (isset($extern_show_hidden_pages)) {
            $show_hidden = $extern_show_hidden_pages == 'on';
        }
        if (isset($extern_show_deleted_pages)) {
            $show_deleted = $extern_show_deleted_pages == 'on';
        }
        if ($extern_page_lang == '') {
            $extern_page_lang = $actual_user_lang;
        }
        $out .= "\t\t\t<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"get\">\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"pageeditor\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"tree\" />\r\n\t\t\t\t<select name=\"page_lang\">\r\n\t\t\t\t\t<option value=\"de\"";
        if ($extern_page_lang == "de") {
            $out .= " selected=\"selected\"";
        }
        $out .= ">" . $admin_lang['de'] . "</option>\r\n\t\t\t\t\t<option value=\"en\"";
        if ($extern_page_lang == "en") {
            $out .= " selected=\"selected\"";
        }
        $out .= ">" . $admin_lang['en'] . "</option>\r\n\t\t\t\t</select><br />\r\n\t\t\t\t<input type=\"checkbox\" name=\"show_hidden_pages\"";
        if ($show_hidden) {
            $out .= " checked=\"true\"";
        }
        $out .= "/>" . $admin_lang['show hidden'] . "<br />\r\n\t\t\t\t<input type=\"checkbox\" name=\"show_deleted_pages\"";
        if ($show_deleted) {
            $out .= " checked=\"true\"";
        }
        $out .= "/>" . $admin_lang['show deleted'] . "<br />\r\n\t\t\t\t<input type=\"submit\" class=\"button\" value=\"" . $admin_lang['show'] . "\" />\r\n\t\t\t</form>";
        $out .= generatePagesTree(0, "\t\t\t", $extern_page_lang, $show_deleted, $show_hidden);
    } elseif ($extern_action == 'edit') {
        $sql = "SELECT *\r\n\t\t\tFROM " . DB_PREFIX . "pages_content\r\n\t\t\tWHERE page_name='{$extern_page_name}'";
        $page_result = db_result($sql);
        if ($page_data = mysql_fetch_object($page_result)) {
            $out .= "\t\t\t<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\">\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"pageeditor\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"page_name\" value=\"" . $page_data->page_name . "\" />\r\n\t\t\t\t<input type=\"text\" name=\"page_title\" value=\"" . $page_data->page_title . "\" /><br />\r\n\t\t\t\t<script type=\"text/javascript\" language=\"JavaScript\" src=\"system/functions.js\"></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\">\r\n\t\t\t\t\twriteButton(\"img/button_fett.png\",\"Formatiert Text Fett\",\"**\",\"**\",\"Fetter Text\",\"f\");\r\n\t\t\t\t\twriteButton(\"img/button_kursiv.png\",\"Formatiert Text kursiv\",\"//\",\"//\",\"Kursiver Text\",\"k\");\r\n\t\t\t\t\twriteButton(\"img/button_unterstrichen.png\",\"Unterstreicht den Text\",\"__\",\"__\",\"Unterstrichener Text\",\"u\");\r\n\t\t\t\t\twriteButton(\"img/button_ueberschrift.png\",\"Markiert den Text als Überschrift\",\"=== \",\" ===\",\"Überschrift\",\"h\");\r\n\t\t\t\t</script><br />\r\n\t\t\t\t<textarea id=\"editor\" class=\"edit\" name=\"page_text\">" . $page_data->page_text . "</textarea>\r\n\t\t\t\t<input type=\"reset\" value=\"Zurücksetzten\" />\r\n\t\t\t\t<input type=\"submit\" value=\"Speichern\" />\r\n\t\t\t</form>";
        } else {
            header("Location: " . $_SERVER['PHP_SELF'] . "?page=pageeditor&action=new&page_name=" . $extern_page_name);
        }
    } elseif ($extern_action == 'info') {
        if ($extern_page_name == '') {
            header("Location: " . $_SERVER['PHP_SELF'] . "?page=pageeditor");
        }
        $sql = "SELECT *\r\n\t\t\t\tFROM " . DB_PREFIX . "pages_content\r\n\t\t\t\tWHERE page_name='{$extern_page_name}'";
        $actual_result = db_result($sql);
        $sql = "SELECT *\r\n\t\t\t\tFROM " . DB_PREFIX . "sitedata_history\r\n\t\t\t\tWHERE name='{$extern_page_name}'\r\n\t\t\t\tORDER BY id DESC";
        $olds_result = db_result($sql);
        $actual = mysql_fetch_object($actual_result);
        $out .= "\t\t\tName: " . $actual->page_name . "<br />\r\n\t\t\tTitel: " . $actual->page_title . "<br />\r\n\t\t\t<fieldset><legend>Text</legend>" . $actual->page_html . "</fieldset>\r\n\t\t\tLetzte Veränderung von: " . getUserById($actual->page_creator) . "<br />\r\n\t\t\tinsgesamt " . mysql_num_rows($olds_result) . " Veränderungen<br />";
    } else {
        // home site etc.
        $out .= "<a href=\"" . $_SERVER['PHP_SELF'] . "?page=pageeditor&amp;action=new\">Neue Seite</a><br />\r\n";
        $out .= "<a href=\"" . $_SERVER['PHP_SELF'] . "?page=pageeditor&amp;action=tree\">Übersicht</a><br />\r\n";
        $out .= "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"get\">\r\n\t\t<input type=\"hidden\" name=\"page\" value=\"pageeditor\" />\r\n\t\t<input type=\"hidden\" name=\"action\" value=\"edit\" />\r\n\t\t<select name=\"page_name\">";
        $sql = "SELECT page_name, page_title, page_id\r\n\t\t\t\tFROM " . DB_PREFIX . "pages_content\r\n\t\t\t\tWHERE page_visible!='deleted' AND page_type='text'\r\n\t\t\t\tORDER BY page_name ASC";
        $sites = db_result($sql);
        while ($siteinfo = mysql_fetch_object($sites)) {
            $out .= "\t\t\t\t\t\t<option value=\"" . $siteinfo->page_name . "\">" . $siteinfo->page_title . "(" . $siteinfo->page_name . ")</option>\r\n";
        }
        $out .= "\t\t\t\t\t\t\t</select>\r\n\t\t<input type=\"submit\" class=\"button\" value=\"Öffnen\" /> \r\n\t\t</form>";
    }
    return $out;
}
コード例 #3
0
function page_articles()
{
    global $admin_lang, $extern_action, $extern_sure, $extern_title, $extern_text, $extern_image, $extern_description, $extern_id, $_SERVER, $actual_user_id, $actual_user_showname;
    if (!isset($extern_action)) {
        $extern_action = '';
    }
    $out = "\t\t\t<h3>" . $admin_lang['articles'] . "</h3><hr />\r\n";
    //
    // delete the selected entrie
    //
    if ($extern_action == "delete") {
        if (isset($extern_sure)) {
            if ($extern_sure == 1) {
                db_result("DELETE FROM " . DB_PREFIX . "articles WHERE article_id=" . $extern_id);
            }
        } else {
            $result = db_result("SELECT * FROM " . DB_PREFIX . "articles WHERE article_id=" . $extern_id);
            $row = mysql_fetch_object($result);
            $out .= "Den News Eintrag &quot;" . $row->article_title . "&quot; wirklich löschen?<br />\r\n\t\t\t<a href=\"admin.php?page=articles&amp;action=delete&amp;id=" . $extern_id . "&amp;sure=1\" title=\"Wirklich Löschen\">ja</a> &nbsp;\r\n\t\t\t<a href=\"admin.php?page=articles\" title=\"Nicht Löschen\">nein</a>";
            return $out;
        }
    } elseif ($extern_action == "new") {
        if ($extern_title != "" && $extern_description != "" && $extern_text) {
            $sql = "INSERT INTO " . DB_PREFIX . "articles\r\n\t\t\t\t\t(article_title, article_description, article_text, article_html, article_creator, article_date)\r\n\t\t\t\t\tVALUES ('{$extern_title}', '{$extern_description}', '{$extern_text}', '" . convertToPreHtml($extern_text) . "', '{$actual_user_id}', '" . mktime() . "')";
            db_result($sql);
        }
    } elseif ($extern_action == "update") {
        if ($extern_title != "" && $extern_description != "" && $extern_text != "" && $extern_id != 0) {
            $sql = "UPDATE " . DB_PREFIX . "articles SET \r\n\t\t\t\t\tarticle_title= '{$extern_title}', \r\n\t\t\t\t\tarticle_description= '{$extern_description}', \r\n\t\t\t\t\tarticle_text= '{$extern_text}',\r\n\t\t\t\t\tarticle_html= '" . convertToPreHtml($extern_text) . "',\r\n\t\t\t\t\tarticle_date= '" . mktime() . "' \r\n\t\t\t\t\tWHERE article_id=" . $extern_id;
            db_result();
        }
    }
    if ($extern_action != "edit") {
        $out .= "\t\t\t<form method=\"post\" action=\"admin.php\">\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"articles\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"new\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel: <span class=\"info\">Hier den Titel des Artikels eingeben</span></td>\r\n\t\t\t\t\t\t<td><input type=\"text\" name=\"title\" maxlength=\"100\" value=\"\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Beschreibung: <span class=\"info\">Hier eine Zusammenfassung in einem Satz eingeben.</span></td>\r\n\t\t\t\t\t\t<td><input type=\"text\" name=\"description\" maxlength=\"200\" value=\"\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text: <span class=\"info\">Hier den gesammten Text des Artikels eingeben.</span></td>\r\n\t\t\t\t\t\t<td><textarea cols=\"60\" rows=\"6\" name=\"text\"></textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als " . $actual_user_showname . " &nbsp;</td><td><input type=\"submit\" class=\"button\" value=\"Senden\" />&nbsp;<input type=\"reset\" class=\"button\" value=\"Zurücksetzen\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\r\n";
    }
    if (isset($extern_id) && $extern_action == "edit") {
        $sql = "SELECT * FROM " . DB_PREFIX . "articles WHERE article_id={$extern_id}";
        $result = db_result($sql);
        $row = mysql_fetch_object($result);
        $out .= "\t\t\t<form method=\"post\" action=\"admin.php\">\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"articles\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel: <span class=\"info\">Hier den Titel des Artikels eingeben</span></td>\r\n\t\t\t\t\t\t<td><input type=\"text\" name=\"title\" maxlength=\"10\" value=\"" . $row->article_title . "\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Beschreibung: <span class=\"info\">Hier eine Zusammenfassung in einem Satz eingeben.</span></td>\r\n\t\t\t\t\t\t<td><input type=\"text\" name=\"description\" maxlength=\"60\" value=\"" . $row->article_description . "\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text: <span class=\"info\">Hier den gesammten Text des Artikels eingeben.</span></td>\r\n\t\t\t\t\t\t<td><textarea cols=\"60\" rows=\"6\" name=\"text\">" . $row->article_text . "</textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als " . $actual_user_showname . " &nbsp;</td><td><input type=\"submit\" class=\"button\" value=\"Speichern\" />&nbsp;<input type=\"reset\" class=\"button\" value=\"Zurücksetzen\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\r\n";
    }
    $out .= "\t\t\t<form method=\"post\" action=\"admin.php\">\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"articles\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel:</td>\r\n\t\t\t\t\t\t<td>Beschreibung:</td>\r\n\t\t\t\t\t\t<td>Text:</td>\r\n\t\t\t\t\t\t<td>" . $admin_lang['date'] . "</td>\r\n\t\t\t\t\t\t<td>" . $admin_lang['creator'] . ":</td>\r\n\t\t\t\t\t\t<td>" . $admin_lang['actions'] . ":</td>\r\n\t\t\t\t\t</tr>\r\n";
    //
    // write all news entries
    //
    $result = db_result("SELECT * FROM " . DB_PREFIX . "articles");
    while ($row = mysql_fetch_object($result)) {
        if ($extern_id == $row->article_id && $extern_action == "edit") {
        } else {
            $out .= "\t\t\t\t\t<tr ID=\"dateid" . $row->article_id . "\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $row->article_title . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $row->article_description . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $row->article_html . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . date("d.m.Y", $row->article_date) . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . getUserByID($row->article_creator) . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t\t\t\t<a href=\"admin.php?page=articles&amp;action=edit&amp;id=" . $row->article_id . "#dateid" . $row->article_id . "\" title=\"Bearbeiten\">Bearbeiten</a>\r\n\t\t\t\t\t\t\t&nbsp;<a href=\"admin.php?page=articles&amp;action=delete&amp;id=" . $row->article_id . "\" title=\"Löschen\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n";
        }
    }
    $out .= "\t\t\t\t</table>\r\n\t\t\t</form>";
    return $out;
}