mv_computer_detail($pluginame[0]);
        $result = mv_server_side($pluginame[0]);
        if ($result) {
            exec_plugin_soap_client($pluginame[0], 1);
        }
        if ($isok) {
            echo "<center>\n\t\t\t\t<div id='my-alert-' class='alert alert-success fade in' role='alert'>Plugin " . $pluginame[0] . " installed</div>\n\t\t\t</center>";
        } else {
            echo "<center>\n\t\t\t<div id='my-alert-top_msg_alert' class='alert alert-danger fade in' role='alert'>Error : " . $pluginame[0] . " is an invalid plugin, check your sources.\n\t\t\t\t\t<br> Installation aborted ! </div>\n\t\t\t</center>";
        }
    } else {
        echo "<center>\t\n    <div id='my-alert-top_msg_alert' class='alert alert-danger fade in' role='alert'>\t\n\t\t<div onmouseout='hidden_me();' onmouseover='show_me('Put your plugins into the download dir in the OCSreports.');'>\n\t\t\tThis plugin has been already installed.</div>\n    </div>\n\t</center>";
    }
}
// Plugins Tab
printEnTete("Installed Plugins");
$form_name = "show_all_plugins";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('ID' => 'id', $l->g(7002) => 'name', $l->g(7003) => 'version', $l->g(7004) => 'licence', $l->g(7005) => 'author', 'Required OCS ver.' => 'verminocs', $l->g(7006) => 'reg_date');
$tab_options['FILTRE'] = array_flip($list_fields);
$tab_options['FILTRE']['NAME'] = $l->g(49);
asort($tab_options['FILTRE']);
$list_fields['SUP'] = 'ID';
$list_fields['CHECK'] = 'ID';
$list_col_cant_del = array('SUP' => 'SUP', 'CHECK' => 'CHECK');
$default_fields = array($l->g(7002) => $l->g(7002), $l->g(7003) => $l->g(7003), $l->g(7004) => $l->g(7005), $l->g(7006), $l->g(7006));
$sql = prepare_sql_tab($list_fields, $list_col_cant_del);
//====================================================================================
// 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
//====================================================================================
/*
 * Rules for redistribution servers
 */
if ($_SESSION['OCS']["use_redistribution"] == 1) {
    require_once 'require/function_rules.php';
    printEnTete($l->g(673));
    echo "<br>";
    //only for Super Admin
    //DEL RULE
    if ($protectedPost['SUP_PROF'] != "") {
        delete_rule($protectedPost['SUP_PROF']);
        $tab_options['CACHE'] = 'RESET';
    }
    //ADD new rule
    if ($protectedPost['ADD_RULE']) {
        add_rule($protectedPost['RULE_NAME'], $protectedPost);
        $tab_options['CACHE'] = 'RESET';
    }
    //modif rule
    if ($protectedPost['MODIF_RULE']) {
        $name_exist = verify_name($protectedPost['RULE_NAME'], "and rule != " . $protectedPost['OLD_MODIF']);
        if (isset($afus)) {
            fusionne($afus);
        }
    }
}
//restriction for profils?
if ($_SESSION['OCS']['mesmachines']) {
    $tab_id_mes_machines = computer_list_by_tag('', 'ARRAY');
    if ($tab_id_mes_machines == "ERROR") {
        echo $l->g(923);
        break;
    }
} else {
    $tab_id_mes_machines = "";
}
printEnTete($l->g(199));
/************************  hostname double ***************************************/
$sql_doublon['hostname'] = "select NAME val from hardware ";
$arg_doublon['hostname'] = array();
if (isset($tab_id_mes_machines) and $tab_id_mes_machines != "") {
    $sql = mysql2_prepare($sql_doublon['hostname'] . ' where id in ', $arg_doublon['hostname'], $tab_id_mes_machines);
    $sql_doublon['hostname'] = $sql['SQL'];
    $arg_doublon['hostname'] = $sql['ARG'];
}
$sql_doublon['hostname'] .= "  group by NAME having count(NAME)>1";
/************************  serial number double ***************************************/
$sql_doublon['ssn'] = "select SSN val from bios,hardware h where h.id=bios.hardware_id and SSN not in (select serial from blacklist_serials) ";
$arg_doublon['ssn'] = array();
if (isset($tab_id_mes_machines) and $tab_id_mes_machines != "") {
    $sql = mysql2_prepare($sql_doublon['ssn'] . ' and hardware_id in ', $arg_doublon['ssn'], $tab_id_mes_machines);
    $sql_doublon['ssn'] = $sql['SQL'];
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
//BEGIN SHOW ACCOUNTINFO
require_once 'require/function_commun.php';
require_once 'require/function_admininfo.php';
$info_tag = find_info_accountinfo('1', 'COMPUTERS');
if (is_array($info_tag)) {
    foreach ($info_tag as $key => $value) {
        $info_value_tag = accountinfo_tab($value['id']);
        if (is_array($info_value_tag)) {
            $tab_options['REPLACE_VALUE'][$value['comment']] = $info_value_tag;
        }
    }
}
//END SHOW ACCOUNTINFO
printEnTete($l->g(616) . " " . $protectedGet["id"]);
if ($protectedPost['newtag'] != "") {
    if (isset($protectedPost['use_generic_0'])) {
        if (is_array($info_value_tag)) {
            $arg = str_replace(array("*", "?"), "", $protectedPost["newtag"]);
            $array_result = find_value_in_field(1, $arg);
        } else {
            $arg = str_replace(array("*", "?"), array("%", "_"), $protectedPost["newtag"]);
            $sql = "select distinct TAG from accountinfo where TAG like '%s'";
            $res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
            while ($val_account_data = mysqli_fetch_array($res)) {
                $array_result[] = $val_account_data['TAG'];
            }
        }
    } else {
        $array_result[] = $protectedPost["newtag"];
Example #5
0
         $sql = $sql['SQL'] . " from accountinfo a,hardware h left join devices d on d.hardware_id=h.id";
         $sql .= " where a.hardware_id=h.id and (d.ivalue=1 or d.ivalue=2) and d.name='IPDISCOVER' and d.tvalue='%s'";
     }
     array_push($tab_options['ARG_SQL'], $protectedGet['value']);
     $default_fields['NAME'] = 'NAME';
     $default_fields[$l->g(34)] = $l->g(34);
     $default_fields[$l->g(24)] = $l->g(24);
     $default_fields[$l->g(25)] = $l->g(25);
     $default_fields[$l->g(275)] = $l->g(275);
     $tab_options['ARG_SQL_COUNT'] = array($protectedGet['value']);
     $tab_options['FILTRE']['h.name'] = $l->g(49);
     $tab_options['FILTRE']['h.userid'] = $l->g(24);
     $tab_options['FILTRE']['h.osname'] = $l->g(25);
     $tab_options['FILTRE']['h.ipaddr'] = $l->g(34);
 }
 printEnTete($title);
 echo "<br><br>";
 $tab_options['LBL']['MAC'] = $l->g(95);
 $list_col_cant_del = array($l->g(66) => $l->g(66), 'SUP' => 'SUP', 'MODIF' => 'MODIF');
 $table_name = "IPDISCOVER_" . $protectedGet['prov'];
 $form_name = $table_name;
 echo open_form($form_name);
 $result_exist = tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $sql, $form_name, 80, $tab_options);
 $fipdisc = "ipdiscover-util.pl";
 $values = look_config_default_values(array('IPDISCOVER_IPD_DIR'));
 $IPD_DIR = $values['tvalue']['IPDISCOVER_IPD_DIR'] . "/ipd";
 if ($scriptPresent = @stat($fipdisc)) {
     $filePresent = true;
     if (!is_executable($fipdisc)) {
         $msg_info = $fipdisc . " " . $l->g(341);
     } else {
        if ($result) {
            exec_plugin_soap_client($pluginame[0], 1);
        }
        if ($isok) {
            $msg = $l->g(6003) . " " . $pluginame[0] . " " . $l->g(7013);
            msg_success($msg);
        } else {
            $msg = $l->g(2001) . " " . $pluginame[0] . " " . $l->g(7011) . "<br>" . $l->g(7012);
            msg_error($msg);
        }
    } else {
        msg_error($l->g(7010));
    }
}
// Plugins Tab
printEnTete($l->g(7009));
$form_name = "show_all_plugins";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('ID' => 'id', $l->g(7002) => 'name', $l->g(7003) => 'version', $l->g(7004) => 'licence', $l->g(7005) => 'author', 'Required OCS ver.' => 'verminocs', $l->g(7006) => 'reg_date');
$tab_options['FILTRE'] = array_flip($list_fields);
$tab_options['FILTRE']['NAME'] = $l->g(49);
asort($tab_options['FILTRE']);
$list_fields['SUP'] = 'ID';
$list_fields['CHECK'] = 'ID';
$list_col_cant_del = array('SUP' => 'SUP', 'CHECK' => 'CHECK');
$default_fields = array($l->g(7002) => $l->g(7002), $l->g(7003) => $l->g(7003), $l->g(7004) => $l->g(7005), $l->g(7006), $l->g(7006));
$sql = prepare_sql_tab($list_fields, $list_col_cant_del);
Example #7
0
    $tab_options['POPUP_SIZE']['IDENTIFIE'] = "width=900,height=600";
    $tab_options['REPLACE_WITH_CONDITION']['INVENTORIE']['&nbsp'] = '0';
    $tab_options['REPLACE_WITH_CONDITION']['IPDISCOVER']['&nbsp'] = '0';
    $tab_options['REPLACE_WITH_CONDITION']['NON_INVENTORIE']['&nbsp'] = '0';
    $tab_options['REPLACE_WITH_CONDITION']['IDENTIFIE']['&nbsp'] = '0';
    $tab_options['REPLACE_WITH_CONDITION']['PERCENT_BAR']['&nbsp'] = array('IDENTIFIE' => '0', 'NON_INVENTORIE' => '100');
    $tab_options['LBL']['LBL_RSX'] = $l->g(863);
    $tab_options['LBL']['RSX'] = $l->g(869);
    $tab_options['LBL']['INVENTORIE'] = $l->g(364);
    $tab_options['LBL']['NON_INVENTORIE'] = $l->g(365);
    $tab_options['LBL']['IPDISCOVER'] = $l->g(312);
    $tab_options['LBL']['IDENTIFIE'] = $l->g(366);
    $tab_options['LBL']['PERCENT_BAR'] = $l->g(1125);
    //you can modify your subnet if ipdiscover is local define
    if ($_SESSION['OCS']["ipdiscover_methode"] == "OCS" and $_SESSION['OCS']['CONFIGURATION']['IPDISCOVER'] == "YES") {
        $tab_options['LIEN_LBL']['LBL_RSX'] = 'index.php?' . PAG_INDEX . '=' . $pages_refs['ms_admin_ipdiscover'] . '&head=1&value=';
        $tab_options['LIEN_CHAMP']['LBL_RSX'] = 'ID';
        $tab_options['LIEN_TYPE']['LBL_RSX'] = 'POPUP';
        $tab_options['POPUP_SIZE']['LBL_RSX'] = "width=700,height=500";
    }
    $tab_options['NO_LIEN_CHAMP']['IDENTIFIE'] = array(0);
    $tab_options['NO_TRI']['LBL_RSX'] = 'LBL_RSX';
    $val_count = count_noinv_network_devices($dpt[$protectedPost['DPT_CHOISE']]);
    $strEnTete = $_SESSION['OCS']["ipdiscover_id"] . " " . $dpt[$protectedPost['DPT_CHOISE']] . " <br>";
    $strEnTete .= "<br>(<font color='red'>" . $val_count . "</font> " . $l->g(219) . ")";
    echo "<br><br>";
    printEnTete($strEnTete);
    echo "<br><br>";
    $result_exist = tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $arg['SQL'], $form_name, 80, $tab_options);
}
echo close_form();
Example #8
0
<?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 'require/function_stats.php';
$form_name = "stats";
$table_name = $form_name;
printEnTete($l->g(1251));
echo open_form($form_name);
$plugin = false;
$stats = '';
foreach ($_SESSION['OCS']['URL'] as $name => $lbl) {
    if (substr($name, 0, 9) == 'ms_stats_' and $_SESSION['OCS']['DIRECTORY'][$name] == 'ms_stats') {
        $plugin = true;
        require_once $name . ".php";
    }
}
if ($plugin) {
    //Create the chart - Column 3D Chart with data from strXML variable using dataXML method
    onglet($data_on, $form_name, "onglet", 4);
    echo '<div class="mlt_bordure" >';
    echo $stats;
    echo "</div>";
} else {
Example #9
0
    if ($protectedPost["ACTION"] == "DEL_NOT") {
        $result_line_delete = find_device_line('NULL', $protectedGet["stat"]);
    }
    if (isset($result_line_delete) and is_array($result_line_delete)) {
        require 'require/function_telediff.php';
        desactive_packet($result_line_delete['HARDWARE_ID'], $result_line_delete['IVALUE'][0]);
    }
}
$form_name = "show_stats";
$table_name = $form_name;
echo open_form($form_name);
$sql = "SELECT name FROM download_available WHERE fileid='%s'";
$arg = $protectedGet["stat"];
$res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
$row = mysql_fetch_object($res);
printEnTete($l->g(498) . " <b>" . $row->name . "</b> (" . $l->g(296) . ": " . $protectedGet["stat"] . " )");
//count max values for stats
$sql_count = "SELECT COUNT(id) as nb \n\t\t\tFROM devices d, download_enable e \n\t\t\tWHERE e.fileid='%s'\n \t\t\t\tAND e.id=d.ivalue \n\t\t\t\tAND name='DOWNLOAD' \n\t\t\t\tAND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')";
$arg = $protectedGet["stat"];
$rescount = mysql2_query_secure($sql_count, $_SESSION['OCS']["readServer"], $arg);
$row = mysql_fetch_object($rescount);
$total = $row->nb;
if ($total <= 0) {
    msg_error($l->g(837));
    require_once FOOTER_HTML;
    die;
}
$sqlStats = "SELECT COUNT(id) as nb, tvalue as txt \n\t\t\t\tFROM devices d, download_enable e \n\t\t\t\tWHERE e.fileid='%s'\n\t \t\t\t\tAND e.id=d.ivalue \n\t\t\t\t\tAND name='DOWNLOAD' \n\t\t\t\t\tAND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')\n\t\t\t\t\tand tvalue not like '%s'\n\t\t\t\t\tand tvalue not like '%s'\n\t\t\t\t\tand tvalue is not null \n\t\t\t\t\tgroup by tvalue\n\t\t\tunion\n\t\t\t\tSELECT COUNT(id) as nb, '%s' \n\t\t\t\tFROM devices d, download_enable e \n\t\t\t\tWHERE e.fileid='%s'\n\t \t\t\t\tAND e.id=d.ivalue \n\t\t\t\t\tAND name='DOWNLOAD' \n\t\t\t\t\tAND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')\n\t\t\t\t\tand (tvalue like '%s'\n\t\t\t\t\tor tvalue  like '%s')\n\t\t\tunion\n\t\t\t\tSELECT COUNT(id) as nb, '%s' \n\t\t\t\tFROM devices d, download_enable e \n\t\t\t\tWHERE e.fileid='%s'\n\t \t\t\t\tAND e.id=d.ivalue \n\t\t\t\t\tAND name='DOWNLOAD' \n\t\t\t\t\tAND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')\n\t\t\t\t\tand tvalue is null";
$arg = array($arg, 'EXIT_CODE%', 'ERR%', $l->g(573), $arg, 'EXIT_CODE%', 'ERR%', $l->g(482), $arg);
$resStats = mysql2_query_secure($sqlStats . " ORDER BY nb DESC", $_SESSION['OCS']["readServer"], $arg);
$i = 0;
Example #10
0
<?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 'require/function_stats.php';
$form_name = "plugins";
$table_name = $form_name;
printEnTete($l->g(6000));
echo open_form($form_name);
$plugin = false;
$showit = false;
foreach ($_SESSION['OCS']['URL'] as $name => $lbl) {
    if (substr($name, 0, 11) == 'ms_plugins_' and $_SESSION['OCS']['DIRECTORY'][$name] == 'ms_plugins' and in_array($name, $_SESSION['OCS']['PAGE_PROFIL'])) {
        $plugin = true;
        $list_plugin[] = $name . ".php";
        require_once $name . ".php";
    }
}
if ($plugin) {
    onglet($data_on, $form_name, "onglet", 4);
    echo '<div class="mlt_bordure" >';
    $showit = true;
    foreach ($list_plugin as $key => $name) {
        require $name;
// 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;
}
printEnTete("Office Key Manager");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "officekey";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('Product' => 'PRODUCT', 'Office Version' => 'OFFICEVERSION', 'Type' => 'TYPE', 'Office Key' => 'OFFICEKEY');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM officepack WHERE 1";
array_push($sql['ARG'], $systemid);
Example #12
0
    //apache user can be write in this directory?
    $rep_ok = is_writable($document_root);
    if (!$rep_ok) {
        msg_error($l->g(1007) . " " . $document_root . " " . $l->g(1004) . ".<br>" . $l->g(1005));
        return;
    }
    $protectedPost['document_root'] = $document_root;
}
echo "<input type='hidden' name='document_root' value='" . $protectedPost['document_root'] . "'>\t  \n\t <input type='hidden' id='timestamp' name='timestamp' value='" . $protectedPost['timestamp'] . "'>";
echo "<script language='javascript'>\n\t\tfunction verif()\n\t\t {\n\t\t\tvar msg = '';\n\t\t\tchamps = new Array('NAME','DESCRIPTION','OS','PROTOCOLE','PRIORITY','ACTION','ACTION_INPUT','REDISTRIB_USE');\n\t\t\tchamps_OS = new Array('NOTIFY_USER','NEED_DONE_ACTION');\n\t\t\tchamps_ACTION=new Array('teledeploy_file');\n\t\t\tchamps_REDISTRIB_USE=new Array('REDISTRIB_PRIORITY');\n\t\t\tchamps_NOTIFY_USER=new Array('NOTIFY_TEXT','NOTIFY_COUNTDOWN','NOTIFY_CAN_ABORT','NOTIFY_CAN_DELAY');\n\t\t\tchamps_NEED_DONE_ACTION=new Array('NEED_DONE_ACTION_TEXT');\n\t\t\t\n\n\n\t\t\n\t\t\tfor (var n = 0; n < champs.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById(champs[n]).value == ''){\n\t\t\t\t document.getElementById(champs[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tfor (var n = 0; n < champs_OS.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('OS').value == 'WINDOWS' && document.getElementById(champs_OS[n]).value == ''){\n\t\t\t\t document.getElementById(champs_OS[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_OS[n]).style.backgroundColor = '';\n\t\t\t}\n\t\t\tfor (var n = 0; n < champs_ACTION.length; n++)\n\t\t\t{\n\t\t\t\tvar name_file=document.getElementById(champs_ACTION[n]).value;\n\t\t\t\tname_file=name_file.toUpperCase();\n\t\t\t\tif (document.getElementById(\"OS\").value == 'WINDOWS')\n\t\t\t\t\tvar debut=name_file.length-3;\n\t\t\t\telse\n\t\t\t\t\tvar debut=name_file.length-6;\n\t\t\t\tif (document.getElementById('ACTION').value != 'EXECUTE' && document.getElementById(champs_ACTION[n]).value == ''){\n\t\t\t\t\talert('" . $l->g(602) . "');\n\t\t\t\t \tdocument.getElementById(champs_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t \tmsg='NULL';\n\t\t\t\t }\n\t\t\t\telse if (document.getElementById('ACTION').value != 'EXECUTE' && name_file.substring(debut,name_file.length) != 'ZIP' && document.getElementById(\"OS\").value == 'WINDOWS'){\n\t\t\t\t\talert('" . $l->g(1231) . "');\n\t\t\t\t\tdocument.getElementById(champs_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t\tmsg='NULL';\n\t\t\t\t}else if (document.getElementById('ACTION').value != 'EXECUTE' && name_file.substring(debut,name_file.length) != 'TAR.GZ' && document.getElementById(\"OS\").value != 'WINDOWS'){\n\t\t\t\t\talert('" . $l->g(1232) . "');\n\t\t\t\t\tdocument.getElementById(champs_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t\tmsg='NULL';\n\t\t\t\t}\n\t\t\t\t document.getElementById(champs_ACTION[n]).style.backgroundColor = '';\n\n\t\t\t}\n\t\t\t\n\t\t\tfor (var n = 0; n < champs_REDISTRIB_USE.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('REDISTRIB_USE').value == 1 && document.getElementById(champs_REDISTRIB_USE[n]).value == ''){\n\t\t\t\t document.getElementById(champs_REDISTRIB_USE[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_REDISTRIB_USE[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tfor (var n = 0; n < champs_NOTIFY_USER.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('NOTIFY_USER').value == 1 && document.getElementById(champs_NOTIFY_USER[n]).value == ''){\n\t\t\t\t document.getElementById(champs_NOTIFY_USER[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_NOTIFY_USER[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tfor (var n = 0; n < champs_NEED_DONE_ACTION.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('NEED_DONE_ACTION').value == 1 && document.getElementById(champs_NEED_DONE_ACTION[n]).value == ''){\n\t\t\t\t document.getElementById(champs_NEED_DONE_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_NEED_DONE_ACTION[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tif (msg != ''){\n\t\t\talert ('" . $l->g(1001) . "');\n\t\t\treturn false;\n\t\t\t}else\n\t\t\treturn true;\t\t\t\n\t\t}\n\t</script>";
echo "<div ";
if ($protectedPost['valid']) {
    echo " style='display:none;'";
}
echo ">";
printEnTete($l->g(434));
echo "<br>";
$activate = option_conf_activate('TELEDIFF_WK');
//If workflow for teledeploy is activated
//We show only the package we can create
if ($activate) {
    msg_info($l->g(1105) . "<br>" . $l->g(1106) . "<br>" . $l->g(1107));
    //get all request with the status "Create a Package"
    $conf_creat_Wk = look_config_default_values(array('IT_SET_NIV_CREAT'));
    $info_dde_statut_creat = info_dde(find_dde_by_status($conf_creat_Wk['tvalue']['IT_SET_NIV_CREAT']));
    if ($info_dde_statut_creat != '') {
        $array_id_fields = find_id_field(array('NAME_TELEDEPLOY', 'PRIORITY', 'NOTIF_USER', 'REPORT_USER', 'INFO_PACK'));
        //build the seach
        $id_name = "fields_" . $array_id_fields['NAME_TELEDEPLOY']->id;
        $id_description = "fields_" . $array_id_fields['INFO_PACK']->id;
        $id_priority = "fields_" . $array_id_fields['PRIORITY']->id;