Beispiel #1
0
// Db
include 'config/db.php';
include_once 'root.php';
include_once 'lib/database.php';
include_once 'lib/auth.php';
include_once 'controllers/master_controller.php';
include_once 'controllers/users.php';
include_once 'models/master.php';
include_once 'models/user.php';
include_once 'models/topic.php';
$db = \Lib\Database::get_instance()->get_db();
$auth = \Lib\Auth::get_instance();
$register_controller = new \Controllers\Users_Controller();
//
$topics_model = new \Models\Topic_Model();
$user_model = new \Models\User_Model();
$message = '';
$message1 = '';
if (isset($_GET['mid'])) {
    $mid = $_GET['mid'];
    $user = $user_model->find(array('where' => 'id = "' . $mid . '"'));
    if (empty($user)) {
        header('Location: ' . DX_ROOT_URL);
        exit;
    }
} else {
    header('Location: ' . DX_ROOT_URL);
    exit;
}
$member = $user_model->get($mid);
$topics = $topics_model->find(array('where' => 'user_id = "' . $mid . '"'));
Beispiel #2
0
<?php

header('Content-Type: text/html; charset=utf-8');
// Db
include 'config/db.php';
include_once 'root.php';
include_once 'lib/database.php';
include_once 'lib/auth.php';
include_once 'controllers/master_controller.php';
include_once 'models/master.php';
include_once 'models/user.php';
$db = \Lib\Database::get_instance()->get_db();
$auth = \Lib\Auth::get_instance();
$user_model = new \Models\User_Model();
$users = $user_model->find();
if (isset($_GET['logout'])) {
    Lib\Auth::get_instance()->logout();
    header('Location: ' . DX_ROOT_URL);
}
$title = 'Members';
$template_file = 'views/members.php';
include 'views/layouts/default.php';