Пример #1
0
function news_edit($link, $id, $title, $text, $author)
{
    if (trim($title) == '' || trim($text) == '') {
        return false;
    }
    $shorttext = news_intro($text) . " ...";
    $query = "UPDATE news SET title='" . mysqli_real_escape_string($link, $title) . "', short_text = '" . mysqli_real_escape_string($link, $shorttext) . "', text ='" . mysqli_real_escape_string($link, $text) . "', author ='" . mysqli_real_escape_string($link, $author) . "' WHERE id =" . $id;
    $res = mysqli_query($link, $query);
    if (!$res) {
        die(mysqli_error($link));
    }
}
Пример #2
0
<?php

echo '<table class="newsboard" >';
// update by Dimitri
echo '<tr>';
echo '<th>';
echo LanguageValidation::iMsg("intro.news.record", news_date($News), $News['News_Account_Pseudo']);
//"News publiée le " .. " Par " .. "";
//echo "News publiée le " . news_date($News). " Par " .$News['News_Account_Pseudo']. "";
echo '</th>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<h4>' . $News['News_Title'] . '</h4>';
echo '<p>' . news_intro($News) . '</p>';
echo '' . news_message($News) . '';
echo '</td>';
echo '</tr>';
//none affiche un espace vide entre les news
echo '<tr><td class="none" ></td></tr>';
if (verif_connect(true)) {
    echo "<tr><th>" . LanguageValidation::iMsg("label.comment.content") . "</th></tr>";
    //Message
    echo '<tr><td>' . news_comment_form($News) . '</td></tr>';
    //none affiche un espace vide entre les news
    echo '<tr><td class="none" ></td></tr>';
}
if (!empty($list_comment)) {
    foreach ($list_comment as $comment) {
        echo '<tr>';
        echo '<th>';
Пример #3
0
<?php

//Search and display game news
$list_news = list_db("list_news", array('date' => "{$year}-{$month}%"));
echo '<table class="newsboard" >';
foreach ($list_news as $News) {
    // update by Dimitri
    echo '<tr>';
    echo '<th>';
    echo LanguageValidation::iMsg("intro.news.record", news_date($News), $News['News_Account_Pseudo']);
    //"News publiée le " .. " Par " .. "";
    echo '</th>';
    echo '</tr>';
    echo '<tr>';
    echo '<td>';
    echo '<h4>' . $News['News_Title'] . '</h4>';
    echo '' . news_intro($News) . '';
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td>' . news_details_form($News) . '</td>';
    echo '</tr>';
    //none affiche un espace vide entre les news
    echo '<tr><td class="none" ></td></tr>';
}
echo '</table>';