Exemple #1
0
     $content = user_settings();
 } elseif ($p == "login") {
     $title = login_title();
     $content = guest_login();
 } elseif ($p == "register") {
     $title = register_title();
     $content = guest_register();
 } elseif ($p == "logout") {
     $title = logout_title();
     $content = guest_logout();
 } elseif ($p == "admin_questions") {
     $title = admin_questions_title();
     $content = admin_questions();
 } elseif ($p == "admin_user") {
     $title = admin_user_title();
     $content = admin_user();
 } elseif ($p == "admin_arrive") {
     $title = admin_arrive_title();
     $content = admin_arrive();
 } elseif ($p == "admin_active") {
     $title = admin_active_title();
     $content = admin_active();
 } elseif ($p == "admin_free") {
     $title = admin_free_title();
     $content = admin_free();
 } elseif ($p == "admin_news") {
     require_once realpath(__DIR__ . '/../includes/pages/admin_news.php');
     $content = admin_news();
 } elseif ($p == "admin_rooms") {
     $title = admin_rooms_title();
     $content = admin_rooms();
Exemple #2
0
        admin_blog($conn);
        break;
    case 'add_blog':
        add_blog();
        break;
    case 'admin_change_show':
        admin_change_show();
        break;
    case 'admin_blog_del':
        admin_blog_del();
        break;
    case 'admin_login':
        admin_login();
        break;
    case 'admin_user':
        admin_user();
        break;
    case 'cancel_login':
        cancel_login();
        break;
    default:
        echo "似乎你正在用不一样的方法看源代码呢!";
}
/*
 * 统计数据
 */
function admin_index_num($conn)
{
    //
    //检测是否登录了
    $username_md5 = md5("username");
<?php

//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
require_once 'require/function_users.php';
if (isset($protectedPost['Valid_modif'])) {
    $protectedPost['ACCESSLVL'] = $_SESSION['OCS']['lvluser'];
    $protectedPost['ID'] = $_SESSION['OCS']["loggeduser"];
    $protectedPost['MODIF'] = $_SESSION['OCS']["loggeduser"];
    $msg = add_user($_POST, get_profile_labels());
    if ($msg != $l->g(374)) {
        msg_error($msg);
    } else {
        msg_success($l->g(1186));
    }
}
$form_name = "pass";
echo open_form($form_name);
admin_user($_SESSION['OCS']["loggeduser"], true);
echo close_form();
Exemple #4
0
}
//ajout d'un user
if (isset($protectedPost['Valid_modif_x'])) {
    $ok = add_user($protectedPost, $list_profil);
    if ($ok == $l->g(373) or $ok == $l->g(374)) {
        unset($_SESSION['OCS']['DATA_CACHE'], $protectedPost['ID'], $protectedPost['FIRSTNAME'], $protectedPost['LASTNAME'], $protectedPost['ACCESSLVL'], $protectedPost['COMMENTS'], $protectedPost['PASSWORD'], $protectedPost['MODIF']);
        $tab_options['CACHE'] = 'RESET';
        msg_success($ok);
    } else {
        msg_error($ok);
    }
}
echo '<div class="mlt_bordure" >';
//add user or modif
if ($protectedPost['onglet'] == 4 or isset($protectedPost['MODIF']) and $protectedPost['MODIF'] != '') {
    admin_user($protectedPost['MODIF']);
} elseif ($protectedPost['onglet'] == 5 and $_SESSION['OCS']['CONFIGURATION']['MANAGE_PROFIL'] == 'YES') {
    admin_profil($form_name);
} else {
    echo "<tr><td align=center>";
    //affichage
    $list_fields = array('ID' => 'ID', $l->g(49) => 'FIRSTNAME', $l->g(996) => 'LASTNAME', $l->g(66) => 'NEW_ACCESSLVL', $l->g(51) => 'COMMENTS', $l->g(1117) => 'EMAIL', $l->g(607) => 'USER_GROUP', 'SUP' => 'ID', 'MODIF' => 'ID', 'CHECK' => 'ID');
    $list_col_cant_del = array('ID' => 'ID', 'SUP' => 'SUP', 'MODIF' => 'MODIF', 'CHECK' => 'CHECK');
    $default_fields = $list_fields;
    $queryDetails = 'SELECT ';
    foreach ($list_fields as $key => $value) {
        if ($key != 'SUP' and $key != 'MODIF' and $key != 'CHECK') {
            $queryDetails .= $value . ',';
        }
    }
    $queryDetails = substr($queryDetails, 0, -1);
<?php

//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (!AJAX) {
    require_once 'views/users_views.php';
    show_users_left_menu('ms_users');
    echo '<div class="right-content">';
}
require_once 'require/function_users.php';
if (isset($protectedPost['Valid_modif'])) {
    $msg = add_user($_POST, get_profile_labels());
    if ($msg != $l->g(374)) {
        msg_error($msg);
    } else {
        msg_success($l->g(1186));
    }
}
admin_user($_GET['user_id']);
if (!AJAX) {
    echo '</div>';
}