include "lib/myconf.php";
include "adm_ftm/lib/managemember.class.php";
if ($_POST) {
$gReferer = s($_POST['referer']);
}
else {
if (!$_GET['referer']) {
$gReferer = getenv("HTTP_REFERER");
}
else {$gReferer = s($_GET['referer']);}
}
OpenCon();
$p = new SitePage();
$l_templ_array = array();$l_vals_array = array();
$l_templ_array[] = 'referer';$l_vals_array[] = $gReferer;
//echo $gDocRoot . $gReferer;
$l_contents = file_get_contents($gDocRoot . $gReferer);
preg_match("/
(.*?)<\/title>/is", $l_contents, $matches);
$article_title= $matches[1];
$article_details = $matches[1];
if (preg_match("/(.*?)<\/p>/is", $l_contents, $matches)) {
if ($matches[1]) {
$article_details .= "
" . $matches[1];
}
}
if (preg_match("//is", $l_contents, $matches)) {
if ($matches[1]) {
$article_details .= "
" . $matches[1];
}
}
$l_templ_array[] = 'article_details';$l_vals_array[] = $article_details;
$l_templ_array[] = 'article_title';$l_vals_array[] = $article_title;
if ($user->id && $user->arr_rights[0]) {
$l_templ_array[] = 'member_id';$l_vals_array[] = $user->id;
}
else {
$l_templ_array[] = 'member_id';$l_vals_array[] = 0;
}
$p->SetContents('tpl/payonlypage.tpl.php', 1, $l_vals_array, $l_templ_array);
$p->GetDetails();
$p->ReplaceTag('redtag', 'About followthemedia.com');
if ($user->id && $user->arr_rights[0]) {
$p->RemoveComment('NOT_LOGGED');
}
else {
$p->RemoveComment('LOGGED_EXPIRED');
}
$p->Show();
CloseCon();
?>