Example #1
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 #2
0
<?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');
Example #3
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 #4
0
?>
" method="post">
    <div>
      <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>
Example #5
0
?>
" method="post">
    <div>
      <div id="edit-netname-wrapper" class="form-item">
        <label for="edit-netname"><?php 
echo dhLang('Nombre de Red:');
?>
<span class="form-required" title="<?php 
echo dhLang('Este campo es requerido.');
?>
">*</span></label>
        <input type="text" id="edit-netname" name="netname" class="form-text required<?php 
echo dhNValid('netname') ? ' error' : '';
?>
" maxlength="90" size="60" value="<?php 
echo dhPost('netname');
?>
" />
        <div class="description"><?php 
echo dhLang('Ej: WORKGROUP.');
?>
</div>
      </div>
      <input type="submit" class="form-submit" value="<?php 
echo dhLang('Agregar Red');
?>
" />
    </div>
  </form>
</div>
Example #6
0
function dhValidEqual($var, $param)
{
    return $var == dhPost($param);
}
Example #7
0
<?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');
Example #8
0
?>
</div>
      </div>
      <div id="edit-anwser-wrapper" class="form-item">
        <label for="edit-anwser"><?php 
echo dhLang('Respuesta:');
?>
<span class="form-required" title="<?php 
echo dhLang('Este campo es requerido.');
?>
">*</span></label>
        <input type="text" id="edit-anwser" name="anwser" class="form-text required<?php 
echo dhNValid('anwser') ? ' error' : '';
?>
" maxlength="255" size="60" value="<?php 
echo dhPost('anwser');
?>
" />
        <div class="description"><?php 
echo dhLang('Respuesta a la pregunta anterior.');
?>
</div>
      </div>
      <input type="submit" class="form-submit" value="<?php 
echo dhLang('Registrese');
?>
" />
    </div>
  </form>
</div>