<?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');
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; if (dhIsLogin()) { dhRedirect('index'); } if (dhIsPost()) { $isValid = dhValid(array('fullname' => 'required', 'name' => 'required', 'pass' => 'required', 'pass2' => array('required' => true, 'equal' => 'pass'), 'question' => 'required', 'anwser' => 'required')); if ($isValid) { dhQueryInsert('users', array('fullname' => dhPost('fullname'), 'name' => dhPost('name'), 'pass' => md5(dhPost('pass')), 'question' => dhPost('question'), 'anwser' => dhPost('anwser'), 'register' => time())); dhRedirect('register-success', array('name', dhPost('name'))); } } dhTheme('register');
<?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');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <title><?php echo dhConfig('siteName'); ?> </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="/themes/garland/favicon.ico" type="image/x-icon" /> <?php dhTheme('styles'); ?> </head> <body class="<?php echo dhIsLogin() ? 'sidebar-left' : ''; ?> "> <div id="header-region" class="clear-block"></div> <div id="wrapper"> <div id="container" class="clear-block"> <div id="header"> <div id="logo-floater"><h1><a href="<?php echo dhUrl('index'); ?> " title="<?php echo dhConfig('siteName'); ?> "><img src="/themes/garland/images/logo.png" alt="<?php echo dhConfig('siteName'); ?>
<div id="edit-name-wrapper" class="form-item"> <label for="edit-name"><?php echo dhLang('Nombre de Usuario:'); ?> <span class="form-required" title="<?php echo dhLang('Este campo es requerido.'); ?> ">*</span></label> <input type="text" id="edit-name" name="name" class="form-text required<?php echo dhNValid('name') ? ' error' : ''; ?> " maxlength="60" size="60" value="<?php echo dhPost('name'); ?> " /> <div class="description"><?php echo dhLang('Ingrese su nombre de usuario.'); ?> </div> </div> <input type="submit" class="form-submit" value="<?php echo dhLang('Recuperar Clave'); ?> " /> </div> </form> </div> <?php dhTheme('footer');
<?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'); }
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; if (dhIsLogin()) { dhRedirect('index'); } $loginFail = false; if (dhIsPost()) { $name = dhPost('name'); $pass = dhPost('pass'); $isValid = dhValid(array('name' => 'required', 'pass' => 'required')); $pass = md5($pass); if ($isValid) { $data = dhQuery("SELECT u.id_users\n FROM users u\n WHERE u.name = '{$name}'\n AND u.pass = '******'"); if ($data) { dhLogin($data[0]['id_users']); dhQueryUpdate('users', array('login' => time()), "id_users={$data[0]['id_users']}"); dhRedirect('index'); } $loginFail = true; } } dhTheme('login');
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; if (!dhIsLogin()) { dhRedirect('login'); } dhTheme('index');
$root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; if (!dhIsLogin()) { dhRedirect('index'); } if (dhHasGet('action')) { switch (dhGet('action')) { case 'add': include_once "{$root}/networks-add.php"; exit; break; case 'edit': include_once "{$root}/networks-edit.php"; exit; break; case 'delete': include_once "{$root}/networks-delete.php"; exit; break; } } if (dhHasGet('n')) { $networks = dhQuery("SELECT n.id_networks\n , n.netname\n , n.created\n , n.modified\n FROM networks n\n WHERE n.id_networks = '" . dhGet('n') . "'"); if ($networks) { $network = array_shift($networks); } } dhTheme('networks');
<?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'))) { $netid = dhPost('netid', 0); $netname = dhPost('netname', 'WORKGROUP'); dhQueryUpdate('networks', array('netname' => $netname), "id_networks = '" . $netid . "'"); if (dhConfig('useModRewrite')) { dhRedirect('networks', array('n' => $netid)); } else { dhRedirect('networks', array('edit' => urlencode($netname))); } } } if (dhHasGet('n')) { $netid = dhGet('n'); } $networks = dhQuery("SELECT n.id_networks\n , n.netname\n FROM networks n\n WHERE n.id_networks = '{$netid}'\n AND n.id_users = '" . dhUID() . "'"); if ($networks) { $network = array_shift($networks); } dhTheme('networks-edit');