<?php

include("eff_setup2.php");
$smarty = new EFFSmarty;
//$smarty->assign('title','DMCA Archive');
$smarty->assign('breadcrumb','false');
$issue = array("IP" => "/IP/", "DMCA" => "/IP/DMCA/");
//$smarty->assign('cc',"false");
$smarty->assign('issue',$issue);

$content  = '

<div id="featuretext">

';

$filename = isset($_GET['f']) ? basename($_GET['f']) : 'index.html';
if ($filename == "unintended_consequences.html") {
  // we want this file to redirect to the latest version
  header("Location: http://www.eff.org/wp/unintended-consequences-ten-years-under-dmca");
  exit();
}
if (substr($filename, -4) != "html") { $content .= "<pre>\n"; }


// get title
preg_match("/(title.*>)(.*?)(<\/title)/i",$content, $title);
if (isset($title[2])) { $smarty->assign('title',$title[2]); } 

// remove title
$tag = "title";
$content = preg_replace("/<" . $tag . ">(.|\s)*?<\/" . $tag . ">/","",$content);


$content .= implode('', file($filename));

$content .= '

</div>
';

global $REQUEST_URI;
$smarty->assign('content',$content);
$smarty->display('generic.tpl',$REQUEST_URI);

?>
