示例#1
0
require_once 'system/nlb_user.class.php';
require_once 'system/nlb_config.class.php';
require_once 'system/nlb_blog.class.php';
require_once 'system/nlb_mail.class.php';
require_once 'system/text.class.php';
require_once 'ets.php';
$db = new sqldb2($DB_CONFIG);
$user = new nlb_user($db);
$config = new nlb_config($db);
$blog = new nlb_blog($db);
$user->checkLogin();
// check for loged in user.
if ($user->isLogedIn) {
    jsRedirect("index.php");
}
include $config->langfile();
$start = mymicrotime();
$text = new Text($_POST, array('username', 'password', 'confirm-password', 'email', 'template', 'timezone'), array('custom'));
$text->validate();
$clean = $text->clean;
$baddata = false;
$problems = array();
if (!empty($_POST)) {
    if ($text->is_missing_required) {
        $baddata = true;
    }
    // if there was good submitted data...
    if ($clean['password'] != $clean['confirm-password']) {
        $baddata = true;
        $problems[] = $l['reg-badpassword'];
    }
示例#2
0
require_once 'system/nlb_config.class.php';
require_once 'ets.php';
// Sweet template library
$start = mymicrotime();
$db = new sqldb2($DB_CONFIG);
$config = new nlb_config($db);
$user = new nlb_user($db);
// is someone trying to access a persons blog
$_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']);
if (!empty($_SERVER['QUERY_STRING']) && ($id = $user->getIdByName($_SERVER['QUERY_STRING'])) > -1) {
    // 	die($id);
    //jsRedirect( script_path . 'blog.php/user/' . $id );
    jsRedirect(build_link('blog.php', array('user' => $id)));
}
$user->checklogin();
require_once $config->langfile();
// include lang file
$b = new nlb_blog($db);
if ($user->isLogedIn) {
    // timezone settings
    $b->setDateOffset($config->get('server_timezone'), $user->get('timezone'));
}
$script_path = script_path;
$_PATH = fetch_url_data();
$action = 'news';
if (isset($_PATH['action'])) {
    $action = $_PATH['action'];
}
$ets = new stdClass();
switch ($action) {
    // Display Recent News news