<?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()) { 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');
<?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 (dhHasGet('n')) { $id = dhGet('n'); $networks = dhQuery("SELECT n.id_networks\n , n.netname\n FROM networks n\n WHERE n.id_networks = '{$id}'"); if ($networks) { $network = array_shift($networks); $netname = $network['netname']; dhQueryDelete('networks', "id_networks = '{$id}'"); if (dhConfig('useModRewrite')) { dhRedirect('networks'); } else { dhRedirect('networks', array('delete' => $netname)); } exit; } } dhRedirect('networks');
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; if (!dhIsLogin()) { dhRedirect('login'); } dhTheme('index');
<?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');