Ejemplo n.º 1
0
<?php

// +---------------------------------------------------------------------------+
// | This file is part of the Openology FrameWork                              |
// | Copyright (c) 2004-2005 Openology.org Team                                |
// |                                                                           |
// | For the full copyright and license information, please view the COPYRIGHT |
// | file that was distributed with this source code. If the COPYRIGHT file is |
// | missing, please visit Openology homepage: http://www.openology.org/       |
// +---------------------------------------------------------------------------+
//
// $Id:
include_once OOO_APP_CLASSES . '/base_users.php';
$user_id = $_SESSION["session_User"];
$user = new base_users($DB);
$user->id = $user_id;
$arr_data = $user->selectbase_users();
$smarty->assign('login_username', $arr_data['username']);
$smarty->assign('config_theme_dir', OOO_APP_WEB_THEMES . $config['theme']['dir']);
$smarty->assign('charset', $conf['header']['charset']);
$smarty->assign('extra_html_head', $extra_html_head);
$smarty->assign('OOO_APP_WEB_JS', OOO_APP_WEB_JS);
Ejemplo n.º 2
0
<?php

// +---------------------------------------------------------------------------+
// | This file is part of the Openology FrameWork                              |
// | Copyright (c) 2004-2005 Openology.org Team                                |
// |                                                                           |
// | For the full copyright and license information, please view the COPYRIGHT |
// | file that was distributed with this source code. If the COPYRIGHT file is |
// | missing, please visit Openology homepage: http://www.openology.org/       |
// +---------------------------------------------------------------------------+
//
// $Id:
include_once OOO_APP_CLASSES . '/base_users.php';
$base_user = new base_users($DB);
$base_user->change_id = $_POST['id'];
$arr_data = $base_user->selectbase_userbyChange_id();
if (count($arr_data)) {
    $second = time() - $arr_data['over_time'];
    if ($second <= 1800) {
        $base_user->id = $arr_data['id'];
        $base_user->password = md5($_POST['password']);
        $base_user->changePassword();
        $base_user->clearChange();
        header("Location: index.php?op=forgotresult&result=2");
        exit;
    } else {
        header("Location: index.php?op=forgotresult&result=3");
        exit;
    }
}
header("Location: index.php?op=forgotresult&result=4");
Ejemplo n.º 3
0
<?php

// +---------------------------------------------------------------------------+
// | This file is part of the Openology FrameWork                              |
// | Copyright (c) 2004-2005 Openology.org Team                                |
// |                                                                           |
// | For the full copyright and license information, please view the COPYRIGHT |
// | file that was distributed with this source code. If the COPYRIGHT file is |
// | missing, please visit Openology homepage: http://www.openology.org/       |
// +---------------------------------------------------------------------------+
//
// $Id:
include_once OOO_APP_CLASSES . '/base_users.php';
$base_user = new base_users($DB);
$base_user->username = $_POST['username'];
$base_user->password = $_POST['md5password'];
$arr_result = $base_user->checkLogin();
if ($arr_result != 0) {
    $ID = $arr_result['id'];
    session_register("session_User");
    $_SESSION["session_User"] = $ID;
}
header("Location: index.php");
// +---------------------------------------------------------------------------+
// | This file is part of the Openology FrameWork                              |
// | Copyright (c) 2004-2005 Openology.org Team                                |
// |                                                                           |
// | For the full copyright and license information, please view the COPYRIGHT |
// | file that was distributed with this source code. If the COPYRIGHT file is |
// | missing, please visit Openology homepage: http://www.openology.org/       |
// +---------------------------------------------------------------------------+
//
// $Id:
include_once OOO_LIB . '/phpmailer/class.phpmailer.php';
include_once OOO_APP_CLASSES . '/base_users.php';
include_once OOO_APP_CLASSES . '/user.php';
$email = $_POST['email'];
$base_user = new base_users($DB);
$base_user->username = $email;
$arr_data = $base_user->selectbase_userbyUsername();
if (!count($arr_data)) {
    header("Location: index.php?op=forgotresult&result=0");
    exit;
}
$user = new user($DB);
$user->id = $arr_data['id'];
$arr_user = $user->selectuser();
$change_id = rand(100000, 999999);
$url = 'http://' . HTTP_SERVER . $_SERVER['REQUEST_URI'] . '?op=changepassword&id=' . $change_id;
$arr_email['body'] = str_replace('{url}', $url, $arr_email['body']);
$base_user->id = $arr_data['id'];
$base_user->change_id = $change_id;
$base_user->over_time = time();
Ejemplo n.º 5
0
// +---------------------------------------------------------------------------+
// | This file is part of the Openology FrameWork                              |
// | Copyright (c) 2004-2005 Openology.org Team                                |
// |                                                                           |
// | For the full copyright and license information, please view the COPYRIGHT |
// | file that was distributed with this source code. If the COPYRIGHT file is |
// | missing, please visit Openology homepage: http://www.openology.org/       |
// +---------------------------------------------------------------------------+
//
// $Id:
include_once OOO_APP_CLASSES . '/user.php';
include_once OOO_APP_CLASSES . '/base_users.php';
include_once OOO_LIB . '/phpgacl/gacl.class.php';
include_once OOO_LIB . '/phpgacl/gacl_api.class.php';
$gacl_api = new gacl_api($gacl_options);
$base_user = new base_users($DB);
$user = new user($DB);
if ($op == 'deleteuser') {
    $arr_id = $_POST['delete'];
    for ($i = 0; $i < count($arr_id); $i++) {
        $user->id = $arr_id[$i];
        $user->deleteuser();
        $base_user->id = $user->id;
        $base_user->deletebase_users();
        $id = $gacl_api->get_object_id('users', $user->id, 'ARO');
        $gacl_api->del_object($id, 'ARO', true);
    }
} else {
    $base_user->username = $_POST['email'];
    $base_user->password = md5($_POST['password']);
    if ($op == 'createuser') {