Example #1
0
ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="description" content="NERDZ is a mix between a social network and a forum. You can share your code, enjoy information technology, talk about nerd stuff and more. Join in!" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('TERMS');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('terms');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/terms.php';
Example #2
0
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <meta name="keywords" content="nerdz, social network, user profile, paste, source code, programming" />
    <meta name="robots" content="index,follow" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('ERROR');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('error');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/error.php';
Example #3
0
<?php

ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
use NERDZ\Core\Db;
$user = new NERDZ\Core\User();
if (!$user->isLogged()) {
    die(NERDZ\Core\Utils::jsonResponse('error', $user->lang('REGISTER')));
}
$viewonline = empty($_SESSION['mark_offline']) ? '1' : '0';
if (Db::NO_ERRNO != Db::query(array('UPDATE "users" SET "last" = NOW(), "viewonline" = :on WHERE "counter" = :id', array(':on' => $viewonline, ':id' => $_SESSION['id'])), Db::FETCH_ERRNO)) {
    die(NERDZ\Core\Utils::jsonResponse('error', 'Time'));
}
if (!($o = Db::query(array('SELECT "remote_addr","http_user_agent" FROM "users" WHERE "counter" = :id', array(':id' => $_SESSION['id'])), Db::FETCH_OBJ))) {
    die(NERDZ\Core\Utils::jsonResponse('error', $user->lang('ERROR')));
}
if (empty($o->remote_addr) || empty($_SESSION['remote_addr']) || $o->remote_addr != $_SERVER['REMOTE_ADDR']) {
    if (Db::NO_ERRNO != Db::query(array('UPDATE "users" SET "remote_addr" = :addr WHERE "counter" = :id', array(':addr' => $_SERVER['REMOTE_ADDR'], ':id' => $_SESSION['id'])), Db::FETCH_ERRNO)) {
        die(NERDZ\Core\Utils::jsonResponse('error', 'IP'));
    }
    $_SESSION['remote_addr'] = $_SERVER['REMOTE_ADDR'];
}
if (empty($o->http_user_agent) || empty($_SESSION['http_user_agent']) || $o->http_user_agent != $_SERVER['HTTP_USER_AGENT']) {
    if (Db::NO_ERRNO != Db::query(array('UPDATE "users" SET "http_user_agent" = :uag WHERE "counter" = :id', array(':uag' => htmlspecialchars($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES, 'UTF-8'), ':id' => $_SESSION['id'])), Db::FETCH_ERRNO)) {
        die(NERDZ\Core\Utils::jsonResponse('error', 'UA'));
    }
    $_SESSION['http_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
}
die(NERDZ\Core\Utils::jsonResponse('ok', 'OK'));
Example #4
0
<?php

ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
$user = new NERDZ\Core\User();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
if (!$user->isLogged()) {
    die($user->lang('REGISTER'));
}
$user->getTPL()->draw('preferences/delete');
Example #5
0
<?php

ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
$user = new NERDZ\Core\User();
if (!$user->isLogged()) {
    die(NERDZ\Core\Utils::jsonResponse('error', $user->lang('REGISTER')));
}
if (!NERDZ\Core\Security::refererControl()) {
    die(NERDZ\Core\Utils::jsonResponse('error', $user->lang('ERROR')));
}
if (!NERDZ\Core\Security::csrfControl(isset($_POST['tok']) ? $_POST['tok'] : 0)) {
    die(NERDZ\Core\Utils::jsonResponse('error', $user->lang('ERROR') . ': token'));
}
$user->logout();
die(NERDZ\Core\Utils::jsonResponse('ok', $user->lang('LOGOUT_OK')));
Example #6
0
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <meta name="keywords" content="nerdz, social network, user profile, paste, source code, programming" />
    <meta name="description" content="NERDZ is a mix between a social network and a forum. You can share your code, enjoy information technology, talk about nerd stuff and more. Join in!" />
    <meta name="robots" content="index,follow" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('PROJECTS_LIST');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('projectslist');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/projectslist.php';
Example #7
0
<?php

ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
use NERDZ\Core\Db;
$user = new NERDZ\Core\User();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
if (!$user->isLogged()) {
    die($user->lang('REGISTER'));
}
if (!($obj = Db::query(array('SELECT * FROM "users" WHERE "counter" = ?', array($_SESSION['id'])), Db::FETCH_OBJ))) {
    die($user->lang('ERROR'));
}
$vals = [];
$vals['username_n'] = $obj->username;
$vals['name_n'] = $obj->name;
$vals['surname_n'] = $obj->surname;
$vals['timezone_n'] = $obj->timezone;
$vals['ismale_b'] = $obj->gender == 1;
$vals['email_n'] = $obj->email;
$now = date('o');
$vals['years_a'] = array_reverse(range($now - 100, $now - 1));
$vals['months_a'] = range(1, 12);
$vals['days_a'] = range(1, 31);
$date = explode('-', $obj->birth_date);
$vals['year_n'] = $date[0];
$vals['month_n'] = $date[1];
$vals['day_n'] = $date[2];
$vals['timezones_a'] = DateTimeZone::listIdentifiers();
$vals['tok_n'] = NERDZ\Core\Security::getCsrfToken('edit');
$user->getTPL()->assign($vals);
Example #8
0
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <meta name="keywords" content="nerdz, social network, user profile, paste, source code, programming" />
    <meta name="description" content="NERDZ is a mix between a social network and a forum. You can share your code, enjoy information technology, talk about nerd stuff and more. Join in!" />
    <meta name="robots" content="index,follow" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('PREVIEW');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('preview');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/preview.php';
Example #9
0
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <meta name="keywords" content="nerdz, share system" />
    <meta name="description" content="nerdz share system, tha share web pages from other sites" />
    <meta name="robots" content="index,follow" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('SHARE');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('share');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/share.php';
?>
Example #10
0
ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="description" content="NERDZ is a mix between a social network and a forum. You can share your code, enjoy information technology, talk about nerd stuff and more. Join in!" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('INFORMATIONS');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('informations');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/informations.php';
Example #11
0
ob_start('ob_gzhandler');
require_once $_SERVER['DOCUMENT_ROOT'] . '/class/autoload.php';
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('PREFERENCES');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('preferences');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/preferences/main.php';
Example #12
0
$user = new NERDZ\Core\User();
$tplcfg = $user->getTemplateCfg();
ob_start(array('NERDZ\\Core\\Utils', 'minifyHTML'));
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo $user->getBoardLanguage();
?>
">
    <head>
    <meta name="author" content="Paolo Galeone" />
    <meta name="keywords" content="nerdz, social network, user profile, paste, source code, programming" />
    <meta name="description" content="NERDZ is a mix between a social network and a forum. You can share your code, enjoy information technology, talk about nerd stuff and more. Join in!" />
    <meta name="robots" content="index,follow" />
    <title><?php 
echo NERDZ\Core\Utils::getSiteName(), ' - ', $user->lang('USERS_LIST');
?>
</title>
<?php 
$headers = $tplcfg->getTemplateVars('userslist');
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/common/jscssheaders.php';
?>
    </head>
    <?php 
ob_flush();
?>
<body>
    <div id="body">
<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/pages/userslist.php';