<?php 
/*
*   Members page. Used to renew subscription.
*
*
*     Author: Alex Scott
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: Member display page
*    FileName $RCSfile$
*    Release: 3.1.8PRO ($Revision: 3749 $)
*
* Please direct bug reports,suggestions or feedback to the cgi-central forums.
* http://www.cgi-central.net/forum/
*                                                                          
* aMember PRO is a commercial software. Any distribution is strictly prohibited.
*                                                                                 
*/

include('./config.inc.php');
$t = & new_smarty();
$t->assign('config', $config);
$_product_id = array('ONLY_LOGIN');
//print_r($_product_id);
include($config['plugins_dir']['protect'] . '/php_include/check.inc.php');
if (($_SESSION['_amember_user']['email_verified'] < 0) && ($config['verify_email'])){
    $u = $_SESSION['_amember_user'];
    $v = md5($u['member_id'].$u['login'].$u['email']);
    fatal_error(sprintf(_MEMBER_ERROR_1,"<br />","<br />","<br />","<a href='resend.php?member_id={$_SESSION[_amember_id]}&v=$v'>",
    "</a>"), 1);
}


/// redirect to make F5 key (Refresh) working
if (strlen($_POST['amember_pass']) && ($_SERVER["REQUEST_METHOD"] == 'POST')){
    $url = $PHP_SELF;
    srand(time());
    if (!preg_match('/\?/', $url))
        $url .= "?id=". $_SESSION['_amember_id'];
    html_redirect($url, 0, _MEMBER_PLEASE_WAIT, _MEMBER_REDIRECTING);
    exit();
}
if(!$_GET['action'])
 {
    $member_products = $_SESSION['_amember_products'];
foreach ((array)$member_products as $k => $pr){
    $member_products[$k]['url'] = add_password_to_url($pr['url']);
    foreach ((array)$pr['add_urls'] as $u=>$kk){
        $uu=add_password_to_url($u, $member_login_pw);
        unset($member_products[$k]['add_urls'][$u]);
        $member_products[$k]['add_urls'][$uu] = $kk;
    }
}
 
  // echo $row;

  $id=$_SESSION['_amember_id'];
    $t->assign('report',sle_report($id));
   echo $aaa;
     $t->display('report.html');
}
elseif($_GET['action']=='show_report')
{
 
   //  echo $_SERVER['QUERY_STRING']  ;
  
   $t->display('show_report.html');
}
elseif($_GET['action']=='show_uptime')
{
   $t->display('show_uptime.html');
}
elseif($_GET['action']=='show_response')
{
    $t->display('show_response.html');
}
?>
