<h2>Other <?=$keyword;?> related Articles</h2>

<p align="left">
<?php
	include("./datas/config.php");
	$dir = realpath("./datas/articles/");
  if ($handle = opendir($dir)) {
    while (false !== ($file = readdir($handle))) {
      // If this is not the directory or parent directory,
      if ($file != "." && $file != ".."&& $file !="wfbtrash" && $file!="wfb.php") {
        // Get URL for the article  	 
        $url = "permalink.php?article=" . urlencode($file);
        // Convert hyphens to spaces 
        $title = str_replace("-", " ", $file);
        // Convert underscores to spaces
        $title = str_replace("_", " ", $title);
        // Remove file extension, if present
        $title = eregi_replace("\..*$", "", $title);
        // Convert to title case    		
        $title = ucwords($title);
        // Add article link to array
        $article_link[] = "<a href=\"$url\">$title</a><br />";
      }
    }
    closedir($handle);
  }
  
 $article_limit=5;
    
  	mt_srand((double)microtime() * 1000000);
    for ($article_idx = 0; $article_idx < $article_limit; $article_idx++) {
      $article_number = rand(0, count($article_link) - 1);
      echo $article_link[$article_number];
      unset($article_link[$article_number]);
      $article_link = array_values($article_link);
    }  
 
?>
</p>
<h3>Do you want to contribute to our site : submit your articles <a href="submitarticle.php">HERE</a></h3>
This space can be enabled / disabled from your admin panel!
