<% //====== Feed PAGE LOGIC ===================================== // Copyright 2005 SiC. All Rights Reserved. // Last Update: 2005-03-19 16:37:20 //============================================================ var sqlWHERE=""; // Generate a list of hidden categories for(var i=0;i0){ sqlWHERE += " AND tLog.log_id="+input["id"]; } } // Load Comments from DB when needed var comments; if(input["id"]>0){ var strSQL = "SELECT TOP 10 tComm.comm_id, tComm.log_id, tComm.comm_author, tComm.comm_content, tComm.comm_postTime, tComm.comm_ubbFlags, tLog.log_title FROM [blog_Article] tLog, [blog_Comment] tComm WHERE tLog.log_id=tComm.log_id AND tLog.log_mode=1 AND tLog.log_id="+input["id"]+" AND tComm.comm_hidden=false"+sqlWHERE+" ORDER BY tComm.comm_postTime DESC"; comments = connBlog.query(strSQL); if(!comments) comments=new Array(); for(var i=0;i0){ sqlWHERE += " AND tLog.log_catID="+input["cat"]; } } // Check if output selected content only if(input["selected"]=="true"){ sqlWHERE += " AND tLog.log_selected=true"; } // Load articles from DB when needed var articles; if(input["cat"]>0||input["selected"]=="true"){ var strSQL = "SELECT TOP 10 tLog.log_id, tLog.log_catid, tLog.log_title, tLog.log_authorid, tLog.log_author, tLog.log_mode, tLog.log_ubbFlags, tLog.log_postTime, tLog.log_content0 FROM [blog_Article] tLog WHERE tLog.log_mode=1"+sqlWHERE+" ORDER BY tLog.log_postTime DESC"; articles = connBlog.query(strSQL); if(!articles) articles=""; }else{ articles=theCache.recentArticles; } if(input["type"]=="js"){ // Output article with JS template outputJS(articles); }else{ // Output article with RSS2 template outputRSS2(articles); } } %>