Only one image for welcome new board

Former-commit-id: a8effda6019c394a9a2d15fbf4998490867b3b02
This commit is contained in:
marcos.alconada 2019-05-14 17:13:44 +02:00
parent 9501187ebc
commit bc849c16fb
2 changed files with 5 additions and 3 deletions

View File

@ -199,11 +199,13 @@ if (!empty($all_data)) {
foreach ($news as $article) { foreach ($news as $article) {
$text_bbdd = io_safe_output($article['text']); $text_bbdd = io_safe_output($article['text']);
$text = html_entity_decode($text_bbdd); $text = html_entity_decode($text_bbdd);
hd($text, true);
echo '<tr><th class="green_title">'.$article['subject'].'</th></tr>'; echo '<tr><th class="green_title">'.$article['subject'].'</th></tr>';
echo '<tr><td>'.__('by').' <b>'.$article['author'].'</b> <i>'.ui_print_timestamp($article['timestamp'], true).'</i> '.$comparation_suffix.'</td></tr>'; echo '<tr><td>'.__('by').' <b>'.$article['author'].'</b> <i>'.ui_print_timestamp($article['timestamp'], true).'</i> '.$comparation_suffix.'</td></tr>';
echo '<tr><td class="datos">'; echo '<tr><td class="datos">';
if ($article['id_news'] == 1) {
echo '<center><img src="./images/welcome_image.png" alt="img colabora con nosotros - Support" width="191" height="207"></center>'; echo '<center><img src="./images/welcome_image.png" alt="img colabora con nosotros - Support" width="191" height="207"></center>';
}
echo nl2br($text); echo nl2br($text);
echo '</td></tr>'; echo '</td></tr>';
} }

View File

@ -2668,7 +2668,7 @@ function get_news($arguments)
case 'mysql': case 'mysql':
case 'postgresql': case 'postgresql':
$sql = sprintf( $sql = sprintf(
"SELECT subject,timestamp,text,author "SELECT id_news,subject,timestamp,text,author
FROM tnews WHERE id_group IN (%s) AND FROM tnews WHERE id_group IN (%s) AND
modal = %s AND modal = %s AND
(expire = 0 OR (expire = 1 AND expire_timestamp > '%s')) (expire = 0 OR (expire = 1 AND expire_timestamp > '%s'))