include "lib/myconf.php";
if ($user->arr_rights[1]) {Header("Location: /index.php");exit;}
if (!$user->id) {Header("Location: /index.php");exit;}
if ($_POST) {
$gReferer = s($_POST['referer']);
}
else {
if (!$_GET['referer']) {
$gReferer = getenv("HTTP_REFERER");
}
else {$gReferer = s($_GET['referer']);}
}
if ($_POST['sbm']) {
if (!$_POST['subscr']) {
$gErr = 'Please choose subscription!
';
}
else {
if ($user->id) {
Header("Location: /detailspay.php?sub_id=" . (int) $_POST['subscr']);
exit;
}
else {
Header("Location: /details.php?sub_id=" . (int) $_POST['subscr']);
exit;
}
}
}
OpenCon();
$p = new SitePage();
$l_templ_array = array();$l_vals_array = array();
$l_templ_array[] = 'referer';$l_vals_array[] = $gReferer;
$l_temp_hiddens = '
';
$l_templ_array[] = 'common_hiddens';$l_vals_array[] = $l_temp_hiddens;
//$l_templ_array[] = 'cntr_options'; $l_vals_array[] = GetSqlOptions("SELECT * FROM countries ORDER BY nm ASC", $member_ref->values['countryid'], array('ALL' => array('val' => 0, 'nm' => '--- Choose ---')));
$l_templ_array[] = 'errmsg';$l_vals_array[] = $gErr;
$l_templ_array[] = 'referer';$l_vals_array[] = $gReferer;
/*
Email Story /
Print Page /
*/
$l_templ_array[] = 'trialstr';$l_vals_array[] = getStringForSubscribe(1, 0);
$p->SetContents('tpl/subscribe.tpl.php', 1, $l_vals_array, $l_templ_array);
$p->SetContents($p->content_merged, 0, $member_ref->labels[1], $member_ref->labels[0]);
$p->GetDetails();
$res = $gDb->query("SELECT id, nm FROM subscriptions ORDER BY id ASC");
$p->ReplaceCont(1, $res);
$p->ReplaceTag('redtag', 'About followthemedia.com');
if ($user->values['id']) {
$p->RemoveComment('NOT_LOGGED');
}
$p->Show();
CloseCon();
function CheckForm() {
global $gDb, $member_ref;
$lErr = '';
$lerrSeparator = '
';
$l_tmp = $member_ref->CheckMember();
if ($l_tmp['err']) {
$lErr .= $l_tmp['msg'];
}
return $lErr;
}
?>