Unknown column 'articles_id' in 'field list'
if (!defined("IN_FUSION")) { die("Access Denied"); }
include LOCALE.LOCALESET."articles_cats.php";
//////////SETTINGS/////////////////////////////////////////////
//Single or double column news 1 == Single || 0 == Double collumn
$single = 0;
// Number of news displayed
$items_per_page = 4;
// Counter for Displaying News in 2 Columns NO NEED TO CHANGE THIS.
$counter = 3;
/////////////SETTINGS END /////////////////////////////////////
$i = 0;
if (!isset($_GET['readmore']) || !isnum($_GET['readmore'])) {
$rows = dbcount("(articles_id)", DB_ARTICLES, groupaccess('articles_visibility')."
AND (articles_start='0'||articles_start<=".time().")
AND (articles_end='0'||articles_end>=".time().")
AND articles_draft='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$result = dbquery(
"SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status, articles_news
FROM ".DB_articles." tn
LEFT JOIN ".DB_USERS." tu ON tn.articles_name=tu.user_id
LEFT JOIN ".DB_ARTICLES_CATS." tc ON tn.articles_cat=tc.articles_cat_id
WHERE ".groupaccess('articles_visibility')." AND (articles_start='0'||articles_start<=".time().")
AND (articles_end='0'||articles_end>=".time().") AND articles_draft='0'
GROUP BY articles_id
ORDER BY articles_sticky DESC, articles_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page
);
$numrows = dbrows($result);
if ($single !=="1") {
echo "<table valign='top' cellpadding='0' cellspacing='2' width='100%' border='0'>\n<tr>\n";
}
while ($data = dbarray($result)) {
$i++;
$comments = dbcount("(comment_id)", DB_COMMENTS." WHERE comment_type='N' AND comment_hidden='0' AND comment_item_id='".$data['articles_id']."'");
$articles_cat_image = "";
$articles_subject = "<a name='articles_".$data['articles_id']."' id='articles_".$data['articles_id']."'></a>".stripslashes($data['articles_subject']);
$articles_cat_image = "<a href='".($settings['articles_image_link'] == 0 ? "articles_cats.php?cat_id=".$data['articles_cat'] : BASEDIR."articles.php?readmore=".$data['articles_id'] )."'>";
if ($data['articles_image_t2'] && $settings['articles_image_frontpage'] == 0) {
$articles_cat_image .= "<img src='".IMAGES_N_T.$data['articles_image_t2']."' alt='".$data['articles_subject']."' class='articles-category' /></a>";
} elseif ($data['articles_cat_image']) {
$articles_cat_image .= "<img src='".get_image("nc_".$data['articles_cat_name'])."' alt='".$data['articles_cat_name']."' class='articles-category' /></a>";
} else {
$articles_cat_image = "";
}
$articles_articles = $data['articles_breaks'] == "y" ? nl2br(stripslashes($data['articles_articles'])) : stripslashes($data['articles_articles']);
$articles_info = array(
"articles_id" => $data['articles_id'], "user_id" => $data['user_id'],
"user_name" => $data['user_name'], "user_status" => $data['user_status'],
"articles_date" => $data['articles_datestamp'], "cat_id" => $data['articles_cat'],
"articles_articles" => $data['articles_articles'], "cat_name" => $data['articles_cat_name'],
"cat_image" => $articles_cat_image, "articles_subject" => $data['articles_subject'],
"articles_ext" => $data['articles_extended'] ? "y" : "n", "articles_reads" => $data['articles_reads'],
"articles_comments" => $comments, "articles_allow_comments" => $data['articlesnews_allow_comments'],
"articles_sticky" => $data['articles_sticky']
);
if ($single =="1") {
echo "<!--articles_prepost_".$i."-->\n";
render_articles($articles_subject, $articles_articles, $articles_info);
}else{
echo "<td style='vertical-align: top; width: 50%;'>\n";
echo "<!--articles_prepost_".$i."-->\n";
render_articles($articles_subject, $articles_articles, $articles_info);
echo "</td>\n";
if ($counter % 2 == 0){ echo "</tr>\n<tr>\n"; }
$counter++;
}
}
if ($single !=="1") {
echo "</tr>\n</table>";
}
echo "<!--sub_articles_idx-->\n";
if ($rows > $items_per_page) echo "<div style='margin-top:5px; text-align: center;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div><br />\n";
} else {
opentable($locale['global_030']);
echo "<div style='text-align: center;'><br />\n".$locale['global_031']."<br /><br />\n</div>\n";
closetable();
}
}
?>
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
1 participant
Notifications
You are not receiving notifications from this thread.
Related Questions