Beispiel #1
0
function newsDisp()
{
    if (isset($_GET['Slug'])) {
        $newsSlug = $_GET['Slug'];
    } else {
        $errorMsg = 'You must provide a valid url.';
        include '../view/errorPage.php';
    }
    $row = getNewsItem($newsSlug);
    if ($row == false) {
        $errorMsg = 'This item was not found.';
        include '../view/errorPage.php';
    } else {
        include '../view/newsDisp.php';
    }
}
Beispiel #2
0
        ?>
');
				document.messageform.text.focus();
				return false;
			}
			<?php 
    }
    ?>
			return true;
		}
	</script>
	<?php 
    print "<br /><form name=\"messageform\" method=\"post\" action=\"editnews.php?action=save&news_id=" . $news_id . "\" onsubmit=\"return checkForm(this);";
    print "\">\n";
    if ($news_id) {
        $news = getNewsItem($news_id);
    } else {
        $news = array();
        $news["username"] = $username;
        $news["date"] = client_time();
        $news["title"] = "";
        $news["text"] = "";
    }
    print "<input type=\"hidden\" name=\"username\" value=\"" . $news["username"] . "\" />\n";
    print "<input type=\"hidden\" name=\"date\" value=\"" . $news["date"] . "\" />\n";
    print "<table>\n";
    print "<tr><td align=\"right\">" . $pgv_lang["title"] . "</td><td><input type=\"text\" name=\"title\" size=\"50\" value=\"" . $news["title"] . "\" /><br /></td></tr>\n";
    print "<tr><td valign=\"top\" align=\"right\">" . $pgv_lang["article_text"] . "<br /></td>";
    print "<td>";
    if ($useFCK) {
        // use FCKeditor module
Beispiel #3
0
<?php

include_once 'database/connection.php';
include_once 'database/news.php';
include_once 'database/comments.php';
$id = $_GET['id'];
$content = getNewsItem($id);
$comments = getComments($id);
include "templates/header.php";
include "templates/view_news.php";
include "templates/footer.php";
?>

Beispiel #4
0
function newsDisp()
{
    if (isset($_GET['Slug'])) {
        $newsSlug = $_GET['Slug'];
    } else {
        $errorMsg = 'You must provide a valid url.';
        include '../view/errorPage.php';
    }
    $row = getNewsItem($newsSlug);
    if ($row == false) {
        $errorMsg = 'This item was not found.';
        include '../view/errorPage.php';
    } else {
        if ($row['EditUserID'] != null) {
            $temp = getNewsEditUserID($row['NewsID']);
            $editUserName = $temp[0];
        }
        include '../view/newsDisp.php';
    }
}
Beispiel #5
0
<?php

include_once 'database/news.php';
$id = $_GET['id'];
$news_content = getNewsItem($id);
include_once 'templates/header.php';
include_once 'templates/edit_news.php';
include_once 'templates/footer.php';