<?php

require_once '../include/config.php';
require_once $basedir . "/include/functions.php";
require_once $basedir . '/include/user_functions.php';
//ini_set('display_errors', 1);
//error_reporting(~0);
if (!$user_id) {
    // go to login page
    header('Location: ' . $baseurl . '#login');
    exit;
}
$settingsmenu = 'active';
$paymentmenu = 'active';
$pay_info = getPaymentInfo($user_id);
?>
<!DOCTYPE HTML>
<html>
<?php 
include $basedir . '/common/header.php';
?>
<body>

	<?php 
include $basedir . '/common/head.php';
?>


	<div class="container row">
		<?php 
include $basedir . '/common/myheadmenu.php';
    exit;
}
$private_key = $config['private_key'];
$hash = isset($_REQUEST['h']) ? $_REQUEST['h'] : 0;
$public_key = isset($_REQUEST['k']) ? $_REQUEST['k'] : 0;
$time = isset($_REQUEST['t']) ? $_REQUEST['t'] : 0;
$cc_id = (isset($_REQUEST['id']) and $_REQUEST['id']) ? $_REQUEST['id'] : 0;
$myhash = md5($public_key . $private_key . $time);
if ($hash != $myhash) {
    echo json_encode(array('error' => '1', 'status' => $lang[215]));
    exit;
}
if (!$cc_id) {
    exit;
}
$cc = getPaymentInfo(0, $cc_id);
if (!$cc) {
    header('Location: ' . $baseurl . '/settings/payment.php');
    exit;
}
$bill = $cc['ba'];
?>
<!DOCTYPE HTML>
<html>
<?php 
include $basedir . '/common/header.php';
?>
<body>

	<?php 
include $basedir . '/common/head.php';