$table->addColumn(new ActionsColumn(array($detail_url => 'glyphicon glyphicon-edit', $delete_url => 'glyphicon glyphicon-remove'), 'name'));
if (AJAX) {
    $ajax = true;
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    $data = array();
    foreach ($profiles as $profile) {
        $profileData = array();
        foreach ($table->getColumns() as $name => $col) {
            $profileData[$name] = $col->format($profile);
        }
        $data[] = $profileData;
    }
    // JSON OUTPUT
    $response = array('customized' => false, 'draw' => $_POST['draw'], 'data' => $data, 'recordsFiltered' => count($profiles), 'recordsTotal' => count($profiles));
    echo json_encode($response);
} else {
    $ajax = false;
    require_once 'views/users_views.php';
    require_once 'require/function_search.php';
    require_once 'require/tables/TableRenderer.php';
    // HTML OUTPUT
    show_users_left_menu('ms_profiles');
    echo '<div class="right-content">';
    echo '<div class="mlt_bordure">';
    echo '<h3>' . $l->g(1401) . '</h3>';
    $table_renderer = new TableRenderer();
    $table_renderer->show($table, $profiles);
    echo '</div>';
    echo '</div>';
}
<?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_add_user');
    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(373)) {
        msg_error($msg);
    } else {
        msg_success($l->g(1186));
    }
}
admin_user();
if (!AJAX) {
    echo '</div>';
}
<?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
//====================================================================================
global $l;
if (!AJAX) {
    require_once 'views/users_views.php';
    require_once 'views/profile_create_form.php';
    show_users_left_menu('ms_add_profile');
    echo '<div class="right-content">';
    if (!is_writable(DOCUMENT_REAL_ROOT . '/config/profiles')) {
        msg_error($l->g(2116));
    } else {
        show_profile_create_form();
    }
    echo '</div>';
} else {
    require_once 'lib/profile_functions.php';
    if (!is_writable(DOCUMENT_REAL_ROOT . '/config/profiles')) {
        $response = array('status' => 'error', 'message' => $l->g(2116));
    } else {
        if ($errors = validate_profile_create_form($_POST)) {
            $response = array('status' => 'error', 'message' => $l->g(1404), 'errors' => $errors);
        } else {
Пример #4
0
// 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) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
    require_once 'views/users_views.php';
    show_users_left_menu('ms_users');
    echo '<div class="right-content">';
    echo '<div class="mlt_bordure">';
    echo '<h3>' . $l->g(1400) . '</h3>';
}
require_once 'require/function_search.php';
require_once 'require/function_users.php';
// Définition des onglets
$profiles = get_profile_labels();
$data_on = $profiles;
$data_on[4] = $l->g(244);
if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_PROFIL') == 'YES') {
    $data_on[5] = $l->g(1146);
}
$form_name = "admins";
$tab_options = $protectedPost;