<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
  
  <title>Straight Edge Life</title>
  <description>The Journal Of A Straight Edge Man In America. An informal and friendly view into what it's like to live a drug and alcohol free life in America. Site includes a weblog and journal, photo galleries, reviews of music, books, and a great list of quotes from famous and unfamous alike.</description>
  <link>http://www.straight-edge-life.com</link>
  <copyright>Ari Denison 2003-2004, All Rights Reserved</copyright>
  
  <?LassoScript //[
  
////////////////////// CONTENT FOR RSS /////////////////////////////////////////
  
  include:'includes/config.lasso', -encodeNONE;
  
////////////////////// NOTIFY //////////////////////////////////////////////////
  
  if:(var:'id');
    var:'body'='CLIENT IP: ' + (client_ip) + '.  PAGE VISITED: http://' + (server_name) + '/SXE/' + (var:'id');
  else;
    var:'body'='CLIENT IP: ' + (client_ip) + '.';
  /if;
    
/////////////////// PROCESS ////////////////////////////////////////////////////

  if:(var:'id');
    var:'sql'='SELECT id, text, title, entry_date, content_type FROM content WHERE content_type != "Personal" AND content_type != "Links" AND id = "' + (var:'id') + '" ORDER BY id DESC LIMIT 1;';
  else;
    var:'sql'='SELECT id, text, title, entry_date, content_type FROM content WHERE content_type != "Personal" AND content_type != "Links" ORDER BY id DESC LIMIT 10 ;';
  /if;
  
  inline:
    -inlinename='RSSCONTENT',
	-database=$siteDatabase,
	-username=$siteUsername,
	-password=$sitePassword,
	-SQL=$sql;
	// output:(Found_Count) + ',' + (error_currenterror), -encodeNONE;	
	
	var:'newsDate'=(date:(field:'entry_date'))->(Format:'%B %d, %Y');	  
	
  /inline;  

    records: -inlinename='RSSCONTENT';
 	
 	// STRIP ALL HTML FROM ENTRIES
 	
 	var:'text'=(field:'text');
 	var:'text'=(string_replaceregexp: (var:'text'), -find='<("[^"]*"|\'[^\']*\'|[^\'">])*>', -replace='');
	var:'text'=(encode_smart:(string_extract: (var:'text'), -startposition='1', -endposition='250'));
 	
 	var:'title'=(field:'title');
 	var:'title'=(string_replaceregexp: (var:'title'), -find='<("[^"]*"|\'[^\']*\'|[^\'">])*>', -replace='', -ignorecase);
 	
 	var:'description'=(field:'content_type');
 	var:'description'=(string_replaceregexp: (var:'description'), -find='<("[^"]*"|\'[^\']*\'|[^\'">])*>', -replace='', -ignorecase);
 	
 	output:'<item>', -encodeNONE;
    
    output:'<title>' + (var:'title') + '</title>', -encodeNONE;
    
    output:'<description>' + (var:'content_type') + ' : ' + (var:'text') + '... </description>', -encodeNONE;
	
	output:'<link>http://www.straight-edge-life.com/SXE/' + (field:'id') + '</link>', -encodeNONE;
	
	output:'</item>', -encodeNONE;
	
	/records;

    //]
  ?>
  
  </channel>
</rss>