<?php

require_once('config.php');

check_user();

check_activation(true);

$page = 'users';

require_once('classes/user.php');
require_once('classes/fb.php');

$user_class = new User();

$search_name    = '';
$search_status  = 'all';

$fb = new Facebook();

$fb_user = $fb->get_fb_user();


if(isset($_POST['submit']) && $_POST['submit'] == 'search_users')
{
    $search_name    = $_POST['search_name'];
    $search_status  = $_POST['user_status'];
}

$all_users = $user_class->getAllUsers($search_name, $search_status);

$user_status = 'all';

include('templates/users.php');