<?

// Page Variables
$page_title = "- Weekly Column";


// Library files
include ("/public/html/internetworkers/lib/page.lib"); // page default variables
include ($page_root."lib/font.lib"); // Font Adjuster
include ($page_root."cgi-bin/pw1.cgi");


include ($page_root."tpl/header.tpl"); 
include ($page_root."tpl/nav.tpl"); 

?>
			
				
			<?print "$Font $FontFace $FontColorBody $FontSizeLarger";?><b>Weekly Column</b></font>
			<br><a href="/internetworkers/column/s_browse.php3"><?print "$Font $FontFace $FontColorBodyLink $FontSizeSmall";?>Column Archive</font></a><br><br>
			   
<?				$pub_date = date("Y-m-d");
				$link = mysql_connect("mysql.ibiblio.org", "komejo", "$dbpw");
				$result = mysql_list_tables ("InterNetWorkers");
				$tb_names[$i] = mysql_tablename ($result, "0");

			if ($article_view != ""){	
				$query_string = " = \"$article_view\" ";
				$query_string2 = " = \"published\" ";
				$Find_jobs = mysql_query ("SELECT * FROM weekly_column WHERE row $query_string AND auth $query_string2 AND published_on <= CURDATE() ORDER BY published_on DESC LIMIT 1");
			} else { 
				$query_string = " != \"\" ";
				$query_string2 = " = \"published\" ";
				$Find_jobs = mysql_query ("SELECT * FROM weekly_column WHERE row $query_string AND auth $query_string2 AND published_on <= CURDATE() ORDER BY published_on DESC LIMIT 1");
			};	
				//echo mysql_errno().": ".mysql_error()."<BR>"; 
				//print "SELECT * FROM weekly_column WHERE row $query_string AND auth $query_string2 AND MONTH(published_on) = 5 ORDER BY published_on DESC LIMIT 1";
				
				// return the results of the query into ordered rows and perform any tweaking as needed.
				while($row = mysql_fetch_array($Find_jobs)) {

					if ($row[9] != ""){
						$col_author = "$Font $FontColorBody $FontSizeSmall by <a href=\"mailto: $row[9]\">$Font $FontColorBodyLink $FontSizeSmall$row[1]</font></a></font>";
					} else {
						$col_author = "$Font $FontColorBody $FontSizeSmall by $row[1]</font>";
					};
					
					if ($row[3] != ""){
						$row[3] = "$Font $FontFace $FontColorBody $FontSizeMedium<b>$row[3]</b></font>";
					};
					
					print "
						$Font $FontFace $FontColorBody $FontSizeLarge<b>$row[2]</b><br>
						$row[3]<br><br>
						$col_author</font>, $Font $FontFace $FontColorBody $FontSizeSmall $row[5]<br>
						<blockquote>$Font $FontFace $FontColorBody $FontSizeMedium$row[6]</blockquote>
						";
					};
				print "<br>";
				mysql_close ($link);
				?>

	
<?
include ($page_root."tpl/footer.tpl"); 
?>
