Example #1
0
function dhUID()
{
    if (dhIsLogin()) {
        return $_SESSION['dhUID'];
    } else {
        return false;
    }
}
Example #2
0
function dhMenu()
{
    if (dhIsLogin()) {
        $menu = array();
        $netmenu = array('label' => dhLang('Redes'), 'url' => 'networks', 'items' => array(array('label' => dhLang('Agregar'), 'url' => 'networks', 'params' => array('action' => 'add'))));
        $networks = dhNetworks();
        foreach ($networks as $network) {
            $netmenu['items'][] = array('label' => $network['netname'], 'url' => 'networks', 'params' => array('n' => $network['id_networks']));
        }
        $menu[] = $netmenu;
        $menu[] = array('label' => dhLang('Perfil'), 'url' => 'profile');
        return $menu;
    }
    return array();
}
Example #3
0
<?php

$root = realpath(dirname(__FILE__));
include_once "{$root}/config.php";
include_once "{$root}/common.php";
if (dhIsLogin()) {
    dhRedirect('index');
}
if (dhIsPost()) {
    $name = dhPost('name');
    if (dhValid(array('name' => 'required'))) {
        die('die');
    }
}
dhTheme('lostpassword');
Example #4
0
<?php

$root = realpath(dirname(__FILE__));
include_once "{$root}/config.php";
include_once "{$root}/common.php";
if (!dhIsLogin()) {
    dhRedirect('index');
}
if (dhIsPost()) {
    if (dhValid(array('netname' => 'required'))) {
        $netname = dhPost('netname', 'WORKGROUP');
        dhQueryInsert('networks', array('id_users' => dhUID(), 'netname' => $netname, 'created' => time()));
        if (dhConfig('useModRewrite')) {
            dhRedirect('networks');
        } else {
            dhRedirect('networks', array('success' => urlencode($netname)));
        }
    }
}
dhTheme('networks-add');
Example #5
0
<?php

$root = realpath(dirname(__FILE__));
include_once "{$root}/config.php";
include_once "{$root}/common.php";
if (dhHasGet('name') && !dhIsLogin()) {
    dhTheme('register-success');
} else {
    dhRedirect('index');
}