Location: PHPKode > projects > Tagging manager > version 1.02/archive.php
<?php
/**
 * display archived page from database (by meta-id)
 *
 * @author hide@address.com
 * @version 1.0
 * @package TaggingManager
 */
  $root_path = './';
  
  include_once($root_path.'config.php');
	  
  require_once($root_path.'includes/dbconn.php');
  require_once($root_path.'includes/functions.php');
  require_once($root_path.'includes/template.php');
  require_once($root_path.'includes/metadata.php');

    

isset($_GET['id']) ? $id=$_GET['id'] : $id = null;

$metaid = $id;

$it = new iter("SELECT * FROM `tm_archive` WHERE `active` = 1 AND `meta_id` = $metaid LIMIT 0, 1");
$item = $it->fetch();
$htmlarchive = $item->htmlarchive;
$original_url = $item->url;

$content = stripslashes($htmlarchive); // get content of page
$content = html_entity_decode($content); //IE fix? :-) 
$content = ereg_replace("<head>", "<head><base href='$original_url'>", $content);
$content = ereg_replace("<script src=\"".$location."/addme.php\" type=\"text/javascript\" charset=\"UTF-8\"></script>", "", $content);
$content = ereg_replace("<script charset=\"UTF-8\" type=\"text/javascript\" src=\"".$location."/addme.php\"></script>", "", $content);
$content = utf8_decode($content);

echo $content;
?>
Return current item: Tagging manager