[go: up one dir, main page]

Menu

[r1]: / activate.php  Maximize  Restore  History

Download this file

43 lines (36 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*********************************************************************/
/* MineCobalt - Minecraft SMP Web Administration */
/* Copyright (c) 2011, Mark Randall @ MineCobalt */
/* All rights reserved. */
/*********************************************************************/
/* Please read licence.txt */
/*********************************************************************/
/* Pagename: activate.php */
/* Purpose: Allows the user to activate their account. */
/*********************************************************************/
session_start();
require(".settings/siteconfig.php");
require(".classes/mysql.php");
$sql = new mysql_connection($config['mysql']['username'], $config['mysql']['password'], $config['mysql']['hostname'], $config['mysql']['port'], $config['mysql']['database']);
require(".classes/smarty.php");
$smarty->debugging = false;
require(".settings/pageoptions.php");
require(".functions/members.php");
//Check to see if the user is logged in
member_check_loggedin($_SESSION['member_id'],"members.php");
if(member_check_active($_SESSION['member_id'])){
header("Location: members.php");
}else{
if(member_activate($_GET['id'],$_GET['uid'])){
header("Location: members.php");
}else{
echo "Error";
}
}
$smarty->assign('meta', '');
$smarty->assign('javascript', '');
$smarty->assign('css', '');
$smarty->assign('title', 'Ativate');
$smarty->display('page_activate.tpl');
?>