// require_once(DIR_WS_CLASSES . 'news.php'); $news_list_by_author_sql=' select n.article_id, nt.news_article_text, n.news_image, nt.news_article_name from ' . TABLE_NEWS_ARTICLES . ' n left join ' . TABLE_NEWS_ARTICLES_TEXT . ' nt on (n.article_id = nt.article_id and nt.language_id = \'' . (int)$_SESSION['languages_id'] . '\') and n.news_status = \'1\'' . 'order by article_id desc limit 4'; $news = $db->Execute($news_list_by_author_sql); if ($news->RecordCount() > 0) { $i = 0; $article_array = array(); while (!$news->EOF) { $article_array[$i] = array( 'articleId' => $news->fields['article_id'], 'articleName' => zen_trunc_string($news->fields['news_article_name'],120), 'articletext' => zen_trunc_string($news->fields['news_article_text'],200), 'articleimg' => zen_image(DIR_WS_IMAGES . $news->fields['news_image'], $news->fields['news_image_text'], '400', '300', ' align="right" class="articleImage"'), ); $i++; $news->MoveNext(); } //end while } else { $articlesNotFound = true; } ?>