$stmtz = $mysqli->prepare("SELECT id FROM gameservers WHERE user_id = ?"); $stmtz->bind_param('i', $row[0]); $stmtz->execute(); $stmtz->bind_result($id_result); $stmtz->fetch(); $stmtz->close(); if ($id_result == 0 and $_SESSION['user_id'] != $row[0]) { $stmt = $mysqli->prepare("DELETE FROM users WHERE id = ?"); $stmt->bind_param('i', $row[0]); $stmt->execute(); $stmt->close(); msg_okay(_users_message_deleted); } elseif ($_SESSION['user_id'] == $row[0]) { msg_warning(_users_message_yourself); } else { msg_warning(_users_message_gameserver); } } elseif ($page == "users?edit-" . $row[0]) { if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['confirm'])) { $error = false; $msg = ""; $rank = 2; $name = htmlentities($_POST['name']); $email = htmlentities($_POST['email']); $password = htmlentities($_POST['pwd1']); if (isset($_POST['administrator'])) { $rank = 1; } if (!$_POST['pwd1'] == "") { if ($_POST['pwd1'] != $_POST['pwd2']) { $error = true;
function print_computers_real($systemid) { global $l, $list_fields, $list_col_cant_del, $default_fields, $tab_options, $protectedPost; if (isset($protectedPost["actshowgroup"]) and $protectedPost["modify"] != "") { foreach ($protectedPost as $key => $val) { //check65422 if (substr($key, 0, 5) == "check") { update_computer_group(substr($key, 5), $systemid, $protectedPost["actshowgroup"]); } } $tab_options['CACHE'] = 'RESET'; } //group 2.0 version $sql_group = "SELECT xmldef FROM groups WHERE hardware_id='%s'"; $arg = $systemid; $resGroup = mysql2_query_secure($sql_group, $_SESSION['OCS']["readServer"], $arg); $valGroup = mysql_fetch_array($resGroup); //group old version if (!$valGroup["xmldef"]) { $sql_group = "SELECT request FROM groups WHERE hardware_id='%s'"; $arg = $systemid; $resGroup = mysql2_query_secure($sql_group, $_SESSION['OCS']["readServer"], $arg); $valGroup = mysql_fetch_array($resGroup); $request = $valGroup["request"]; $tab_id = array(); $result_value = mysql_query($request, $_SESSION['OCS']["readServer"]) or die(mysql_error($_SESSION['OCS']["readServer"])); $fied_id_name = mysql_field_name($result_value, 0); while ($value = mysql_fetch_array($result_value)) { $tab_id[] = $value[$fied_id_name]; } } else { $tab_list_sql = regeneration_sql($valGroup["xmldef"]); $i = 1; $tab_id = array(); while ($tab_list_sql[$i]) { if ($tab_id != array()) { if (strtolower(substr($tab_list_sql[$i], 0, 19)) == "select distinct id ") { $tab_list_sql[$i] .= " and id in (" . implode(",", $tab_id) . ")"; } else { $tab_list_sql[$i] .= " and hardware_id in (" . implode(",", $tab_id) . ")"; } unset($tab_id); } $result_value = mysql_query(xml_decode($tab_list_sql[$i]), $_SESSION['OCS']["readServer"]) or die(mysql_error($_SESSION['OCS']["readServer"])); while ($value = mysql_fetch_array($result_value)) { $tab_id[] = $value["HARDWARE_ID"]; } $i++; } } if ($tab_id == array()) { msg_warning($l->g(766)); return false; } $form_name = "calcul_computer_groupcache"; $table_name = $form_name; echo "<font color=red><b>" . $l->g(927) . "</b></font>"; echo open_form($form_name); $queryDetails = "SELECT "; foreach ($list_fields as $lbl => $value) { $queryDetails .= $value . ","; } $queryDetails = substr($queryDetails, 0, -1) . " FROM hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id\n\t\t\t\t\t\twhere h.id in (" . implode(",", $tab_id) . ") and deviceid <> '_SYSTEMGROUP_' \n\t\t\t\t\t\t\t\t\t\tAND deviceid <> '_DOWNLOADGROUP_'"; if (isset($mesmachines) and $mesmachines != '') { $queryDetails .= $mesmachines; } $tab_options['FILTRE'] = array('h.NAME' => 'Nom'); tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $queryDetails, $form_name, 90, $tab_options); form_action_group($systemid); echo close_form(); }
$list_subnet = array(); } $list_subnet = array(0 => "") + $list_subnet; $default_values = array('RSX_NAME' => $protectedPost['RSX_NAME'], 'ID_NAME' => $list_subnet, 'ADD_IP' => $protectedPost['ADD_IP'], 'ADD_SX_RSX' => $protectedPost['ADD_SX_RSX']); form_add_subnet($title, $default_values, $form_name); } else { $sql = "select NETID,NAME,ID,MASK from subnet"; $list_fields = array('NETID' => 'NETID', $l->g(49) => 'NAME', 'ID' => 'ID', 'MASK' => 'MASK', 'MODIF' => 'NETID', 'SUP' => 'NETID'); //$list_fields['SUP']='ID'; $default_fields = $list_fields; $list_col_cant_del = $list_fields; $result_exist = ajaxtab_entete_fixe($list_fields, $default_fields, $tab_options, $list_col_cant_del); echo "<input type = submit value='" . $l->g(116) . "' name='ADD_SUB'>"; } } else { msg_warning($method); } } elseif ($protectedPost['onglet'] == 'ADMIN_TYPE') { if (isset($protectedPost['Reset_modif'])) { unset($protectedPost['MODIF']); } if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != '') { delete_type($protectedPost['SUP_PROF']); $tab_options['CACHE'] = 'RESET'; } if (isset($protectedPost['Valid_modif'])) { $result = add_type($protectedPost['TYPE_NAME'], $protectedPost['MODIF']); if ($result) { msg_error($result); $protectedPost['ADD_TYPE'] = "VALID"; } else {
}, features: { grid: { draw: [true, false], props: { "stroke-dasharray": "-" } }, legend: { horizontal: false, width: 80, height: 50, x: 220, y: 250, dotType: "circle", dotProps: { stroke: "white", "stroke-width": 2 }, borderProps: { opacity: 0.3, fill: "#c0c0c0", "stroke-width": 0 } } } }; </script>'; echo "</div><br>"; } else { msg_warning($l->g(989)); }
$fragOk = true; } } else { $fragOk = true; } if (!$fragOk) { $error .= $l->g(467) . " http://" . $protectedPost['FILE_SERV'] . "/" . $protectedGet["active"] . "/<br>"; } elseif ($fragAvail) { fclose($fragOk); } if (!$fragOk or !$httpsOk) { $error .= "<br>" . $l->g(468) . "<br><br>"; $error .= "<input type='submit' name='YES' value='" . $l->g(455) . "'>   <input type='submit' name='NO' value='" . $l->g(454) . "'>"; } if ($error != '') { msg_warning($error); } } if ($error == "" and isset($protectedPost['Valid_modif']) or isset($protectedPost['YES'])) { if ($protectedPost['choix_activ'] == "MAN") { activ_pack($protectedGet["active"], $protectedPost["HTTPS_SERV"], $protectedPost['FILE_SERV']); } if ($protectedPost['choix_activ'] == "AUTO") { activ_pack_server($protectedGet["active"], $protectedPost["HTTPS_SERV"], $protectedPost['FILE_SERV_REDISTRIB']); } echo "<script> alert('" . $l->g(469) . "');window.opener.document.packlist.submit(); self.close();</script>"; } if ($_SESSION['OCS']["use_redistribution"] == 1) { $list_choise['MAN'] = $l->g(650); $list_choise['AUTO'] = $l->g(649); $choix_activ = $l->g(514) . ' : ' . show_modif($list_choise, 'choix_activ', 2, $form_name) . "<br>";
<div class="col-lg-12"> <?php $query = "SELECT id FROM backup_server ORDER by id"; if ($result = $mysqli->query($query)) { /* fetch object array */ while ($row = $result->fetch_row()) { if ($page == "backup?delete-" . $row[0]) { $error = false; if ($error == false) { $stmt = $mysqli->prepare("DELETE FROM backup_server WHERE id = ?"); $stmt->bind_param('i', $row[0]); $stmt->execute(); $stmt->close(); msg_okay(_backup_message_removed); } else { msg_warning($msg); } } elseif ($page == "backup?edit-" . $row[0]) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['confirm'])) { $error = false; $name = htmlentities($_POST['name']); $type = htmlentities($_POST['type']); $ip = htmlentities($_POST['ip']); $port = htmlentities($_POST['port']); $user = htmlentities($_POST['user']); $password = htmlentities($_POST['password']); if (!preg_match("/^[a-zA-Z0-9._-]+\$/", $name)) { $msg = _addons_message_error_name . "<br>"; $error = true; }
//==================================================================================== /* * workflow for Teledeploy * */ require_once 'require/function_telediff_wk.php'; //TELEDIFF_WK $activate = option_conf_activate('TELEDIFF_WK'); if ($activate) { if (isset($protectedPost['MODIF']) and $protectedPost['MODIF'] != null) { $protectedPost['onglet'] = 2; } //print_r($protectedPost); $infos_status = list_status(); if ($infos_status['NIV_BIS'] == "") { msg_warning($l->g(1089)); } else { //define tab $data_on[1] = $l->g(1072); $data_on[2] = $l->g(1073); } if ($_SESSION['OCS']['CONFIGURATION']['TELEDIFF_WK'] == 'YES') { $data_on[4] = $l->g(107); } $form_name = "admins"; echo open_form($form_name); if (isset($data_on)) { onglet($data_on, $form_name, "onglet", 4); $table_name = $form_name; echo '<div class="mlt_bordure" >'; if ($protectedPost['onglet'] == 2) {
$hide_msg = true; } } } $stmt = $mysqli->prepare("SELECT name,name_internal,type,type_name,map_path,gameq,app_set_config,appid FROM templates WHERE id = ?"); $stmt->bind_param('i', $row[0]); $stmt->execute(); $stmt->bind_result($db_name, $db_internal, $db_type, $db_type_name, $db_path, $db_gameq, $db_app_set_config, $db_appid); $stmt->fetch(); $stmt->close(); echo '<form class="form-horizontal" action="index.php?page=templates?edit-' . $row[0] . '" method="post">'; ?> <div class="form-group"> <?php if ($limited == true and $hide_msg == false) { msg_warning(_template_limited); } ?> <label class="control-label col-sm-2"><?php echo _template_name; ?> /<?php echo _template_internal; ?> :</label> <div class="col-sm-3"> <?php if ($limited == true) { echo '<input type="text" class="form-control input-sm" name="name" value="' . $db_name . '" readonly="readonly">'; } else { echo '<input type="text" class="form-control input-sm" name="name" value="' . $db_name . '">';
function nb_page($form_name = '', $taille_cadre = '80', $bgcolor = '#C7D9F5', $bordercolor = '#9894B5', $table_name = '') { global $protectedPost, $l; //catch nb result by page if (isset($_SESSION['OCS']['nb_tab'][$table_name])) { $protectedPost["pcparpage"] = $_SESSION['OCS']['nb_tab'][$table_name]; } elseif (isset($_COOKIE[$table_name . '_nbpage'])) { $protectedPost["pcparpage"] = $_COOKIE[$table_name . '_nbpage']; } if ($protectedPost['old_pcparpage'] != $protectedPost['pcparpage']) { $protectedPost['page'] = 0; } if (!isset($protectedPost["pcparpage"]) or $protectedPost["pcparpage"] == "") { $protectedPost["pcparpage"] = PC4PAGE; } $html_show = "<table align=center width='80%' border='0' bgcolor=#f2f2f2>"; //gestion d"une phrase d'alerte quand on utilise le filtre if (isset($protectedPost['FILTRE_VALUE']) and $protectedPost['FILTRE_VALUE'] != '' and $protectedPost['RAZ_FILTRE'] != 'RAZ') { $html_show .= msg_warning($l->g(884)); } $html_show .= "<tr><td align=right>"; if (!isset($protectedPost['SHOW'])) { $protectedPost['SHOW'] = "SHOW"; } if ($protectedPost['SHOW'] == 'SHOW') { $html_show .= "<a href=# OnClick='pag(\"NOSHOW\",\"SHOW\",\"" . $form_name . "\");'><img src=image/no_show.png></a>"; } elseif ($protectedPost['SHOW'] != 'NEVER_SHOW') { $html_show .= "<a href=# OnClick='pag(\"SHOW\",\"SHOW\",\"" . $form_name . "\");'><img src=image/show.png></a>"; } $html_show .= "</td></tr></table>"; $html_show .= "<table align=center width='80%' border='0' bgcolor=#f2f2f2"; if ($protectedPost['SHOW'] == 'NOSHOW' or $protectedPost['SHOW'] == 'NEVER_SHOW') { $html_show .= " style='display:none;'"; } $html_show .= "><tr><td align=center>"; $html_show .= "<table cellspacing='5' width='" . $taille_cadre . "%' BORDER='0' ALIGN = 'Center' CELLPADDING='0' BGCOLOR='" . $bgcolor . "' BORDERCOLOR='" . $bordercolor . "'><tr><td align=center>"; $machNmb = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 50 => 50, 100 => 100, 200 => 200, 1000000 => $l->g(215)); $pcParPageHtml = $l->g(340) . ": " . show_modif($machNmb, 'pcparpage', 2, $form_name, array('DEFAULT' => 'NO')); $pcParPageHtml .= "</td></tr></table>\n\t</td></tr><tr><td align=center>"; $html_show .= $pcParPageHtml; if (isset($protectedPost["pcparpage"])) { $deb_limit = $protectedPost['page'] * $protectedPost["pcparpage"]; $fin_limit = $deb_limit + $protectedPost["pcparpage"] - 1; } $html_show .= "<input type='hidden' id='SHOW' name='SHOW' value='" . $protectedPost['SHOW'] . "'>"; if ($form_name != '') { echo $html_show; } return array("BEGIN" => $deb_limit, "END" => $fin_limit); }
if ($error == false) { $stmt = $mysqli->prepare("DELETE FROM dedicated WHERE id = ?"); $stmt->bind_param('i', $row["id"]); $stmt->execute(); $stmt->close(); $stmt = $mysqli->prepare("DELETE FROM jobs WHERE dedicated_id = ?"); $stmt->bind_param('i', $row["id"]); $stmt->execute(); $stmt->close(); msg_okay(_dedicated_deleted); } else { msg_warning($msg); } } elseif ($page == "rootserver?delete=" . $row["id"]) { //soonTM msg_warning("soonTM"); } } /* free result set */ $result->close(); } if ($page == "rootserver?add") { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['confirm'])) { $error = false; $status = 1; $name = htmlentities($_POST['name']); $ip = htmlentities($_POST['ip']); $port = htmlentities($_POST['port']); $user = htmlentities($_POST['user']); $password = htmlentities($_POST['password']);
echo "<table align='center'><th>"; echo open_form("PluginInstall"); $availablePlugins = scan_downloaded_plugins(); if (!empty($availablePlugins)) { echo "<select name='plugin'>"; foreach ($availablePlugins as $key => $value) { $name = explode(".", $value); $info = new SplFileInfo(PLUGINS_DL_DIR . "/" . $value); if ($info->getExtension() == "zip") { echo "<option value={$value} >{$name['0']}</option>"; } } echo "</select>"; echo "<input type='submit' value='Install'>"; } else { msg_warning($l->g(7014)); } echo close_form(); echo "</th></table>"; if (isset($protectedPost['plugin'])) { $pluginArchive = $protectedPost['plugin']; $bool = install($pluginArchive); if ($bool) { $pluginame = explode(".", $pluginArchive); $plugintab = array("name" => $pluginame[0]); $isok = check($plugintab); mv_computer_detail($pluginame[0]); $result = mv_server_side($pluginame[0]); if ($result) { exec_plugin_soap_client($pluginame[0], 1); }
// 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 { msg_warning($l->g(1262)); } echo close_form();
} } $queryDetails = substr($queryDetails, 0, -6); if (!isset($protectedPost['SHOW'])) { $protectedPost['SHOW'] = 'NOSHOW'; } if (!isset($protectedPost["pcparpage"])) { $protectedPost["pcparpage"] = 5; } $list_fields[$l->g(49)] = 'NAME'; $list_fields[$l->g(80)] = 'LBL'; if (!$no_delete) { $list_fields['SUP'] = 'NAME'; $list_fields['CHECK'] = 'NAME'; } else { msg_warning($_SESSION['OCS']['CONF_PROFILS_DIR'] . " " . $l->g(1006) . ". " . $l->g(1275)); } $list_col_cant_del = $list_fields; $default_fields = $list_col_cant_del; $are_result = tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $queryDetails, $form_name, 100, $tab_options); //traitement par lot if ($are_result) { if (!$no_delete) { del_selection($form_name); } if ($protectedGet['form']) { reloadform_closeme($protectedGet['form']); } } } elseif ($protectedPost['onglet'] == 2) { if ($no_delete) {
function tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $queryDetails, $form_name, $width = '100', $tab_options = '') { global $protectedPost, $l, $pages_refs; if (!$tab_options['AS']) { $tab_options['AS'] = array(); } if ($_SESSION['OCS']["tabcache"] == 0) { $tab_options['CACHE'] = 'RESET'; } echo "<script language='javascript'>\n\t\tfunction checkall()\n\t\t {\n\t\t\tfor(i=0; i<document." . $form_name . ".elements.length; i++)\n\t\t\t{\n\t\t\t\tif(document." . $form_name . ".elements[i].name.substring(0,5) == 'check'){\n\t\t\t if (document." . $form_name . ".elements[i].checked)\n\t\t\t\t\t\tdocument." . $form_name . ".elements[i].checked = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tdocument." . $form_name . ".elements[i].checked = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t</script>"; $link = $_SESSION['OCS']["readServer"]; //show select nb page $limit = nb_page($form_name, 100, "", "", $table_name); //you want to filter your result if (isset($tab_options['FILTRE'])) { $Details = filtre($tab_options['FILTRE'], $form_name, $queryDetails, $tab_options['ARG_SQL'], $tab_options['ARG_SQL_COUNT']); $queryDetails = $Details['SQL']; if (is_array($Details['ARG'])) { $tab_options['ARG_SQL'] = $Details['ARG']; } if (is_array($Details['ARG_COUNT'])) { $tab_options['ARG_SQL_COUNT'] = $Details['ARG_COUNT']; } } //by default, sort by column 1 if ($protectedPost['tri_' . $table_name] == "" or !in_array($protectedPost['tri_' . $table_name], $list_fields) and !in_array($protectedPost['tri_' . $table_name], $tab_options['AS'])) { $protectedPost['tri_' . $table_name] = 1; } //by default, sort ASC if ($protectedPost['sens_' . $table_name] == "") { $protectedPost['sens_' . $table_name] = 'ASC'; } //if data is signed and data = ip $tab_iplike = array('H.IPADDR', 'IPADDRESS', 'IP', 'IPADDR'); if (in_array(mb_strtoupper($protectedPost['tri_' . $table_name]), $tab_iplike)) { $queryDetails .= " order by INET_ATON(" . $protectedPost['tri_' . $table_name] . ") " . $protectedPost['sens_' . $table_name]; } elseif ($tab_options['TRI']['SIGNED'][$protectedPost['tri_' . $table_name]]) { $queryDetails .= " order by cast(" . $protectedPost['tri_' . $table_name] . " as signed) " . $protectedPost['sens_' . $table_name]; } elseif ($tab_options['TRI']['DATE'][$protectedPost['tri_' . $table_name]]) { if (isset($tab_options['ARG_SQL'])) { $queryDetails .= " order by STR_TO_DATE(%s,'%s') %s"; $tab_options['ARG_SQL'][] = $protectedPost['tri_' . $table_name]; $tab_options['ARG_SQL'][] = $tab_options['TRI']['DATE'][$protectedPost['tri_' . $table_name]]; $tab_options['ARG_SQL'][] = $protectedPost['sens_' . $table_name]; } else { $queryDetails .= " order by STR_TO_DATE(" . $protectedPost['tri_' . $table_name] . ",'" . $tab_options['TRI']['DATE'][$protectedPost['tri_' . $table_name]] . "') " . $protectedPost['sens_' . $table_name]; } } else { $queryDetails .= " order by " . $protectedPost['tri_' . $table_name] . " " . $protectedPost['sens_' . $table_name]; } if (isset($protectedPost["pcparpage"]) and $protectedPost["pcparpage"] <= 200) { $limit_result_cache = 200; $force_no_cache = false; } elseif (isset($protectedPost["pcparpage"])) { $limit_result_cache = $protectedPost["pcparpage"]; $force_no_cache = true; } //$tab_options['CACHE']='RESET'; //suppression de la limite de cache //si on est sur la m�me page mais pas sur le m�me onglet if ($_SESSION['OCS']['csv']['SQL'][$table_name] != $queryDetails or isset($tab_options['ARG_SQL']) and $tab_options['ARG_SQL'] != $_SESSION['OCS']['csv']['ARG'][$table_name]) { unset($protectedPost['page']); $tab_options['CACHE'] = 'RESET'; } //Delete cache if ($tab_options['CACHE'] == 'RESET' or isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != '' or isset($protectedPost['RESET']) and $protectedPost['RESET'] != '') { if ($_SESSION['OCS']['DEBUG'] == 'ON') { msg_info($l->g(5003)); } unset($_SESSION['OCS']['DATA_CACHE'][$table_name]); unset($_SESSION['OCS']['NUM_ROW'][$table_name]); } if (isset($_SESSION['OCS']['NUM_ROW'][$table_name]) and $_SESSION['OCS']['NUM_ROW'][$table_name] > $limit["BEGIN"] and $_SESSION['OCS']['NUM_ROW'][$table_name] <= $limit["END"] and !isset($_SESSION['OCS']['DATA_CACHE'][$table_name][$limit["END"]])) { if ($_SESSION['OCS']['DEBUG'] == 'ON') { msg_info($l->g(5004) . " " . $limit["END"] . " => " . ($_SESSION['OCS']['NUM_ROW'][$table_name] - 1)); } $limit["END"] = $_SESSION['OCS']['NUM_ROW'][$table_name] - 1; } if (isset($_SESSION['OCS']['DATA_CACHE'][$table_name][$limit["END"]]) and isset($_SESSION['OCS']['NUM_ROW'][$table_name])) { if ($_SESSION['OCS']['DEBUG'] == 'ON') { msg_info($l->g(5005)); } $var_limit = $limit["BEGIN"]; while ($var_limit <= $limit["END"]) { $sql_data[$var_limit] = $_SESSION['OCS']['DATA_CACHE'][$table_name][$var_limit]; $var_limit++; } $num_rows_result = $_SESSION['OCS']['NUM_ROW'][$table_name]; if (isset($_SESSION['OCS']['REPLACE_VALUE_ALL_TIME'])) { $tab_options['REPLACE_VALUE_ALL_TIME'] = $_SESSION['OCS']['REPLACE_VALUE_ALL_TIME']; } $result_data = gestion_donnees($sql_data, $list_fields, $tab_options, $form_name, $default_fields, $list_col_cant_del, $queryDetails, $table_name); $data = $result_data['DATA']; $entete = $result_data['ENTETE']; $correct_list_col_cant_del = $result_data['correct_list_col_cant_del']; $correct_list_fields = $result_data['correct_list_fields']; $i = 1; } else { //search static values if (isset($_SESSION['OCS']['SQL_DATA_FIXE'][$table_name])) { foreach ($_SESSION['OCS']['SQL_DATA_FIXE'][$table_name] as $key => $sql) { if (!isset($_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key])) { $arg = array(); } else { $arg = $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key]; } if ($table_name == "TAB_MULTICRITERE") { $sql .= " and hardware_id in (" . implode(',', $_SESSION['OCS']['ID_REQ']) . ") group by hardware_id "; //ajout du group by pour r�gler le probl�me des r�sultats multiples sur une requete //on affiche juste le premier crit�re qui match $result = mysql_query($sql, $_SESSION['OCS']["readServer"]); } else { //add sort on column if need it if ($protectedPost['tri_fixe'] != '' and strstr($sql, $protectedPost['tri_fixe'])) { $sql .= " order by '%s' %s"; array_push($protectedPost['tri_fixe'], $arg); array_push($protectedPost['sens_' . $table_name], $arg); } $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg); } while ($item = mysql_fetch_object($result)) { if ($item->HARDWARE_ID != "") { $champs_index = $item->HARDWARE_ID; } elseif ($item->FILEID != "") { $champs_index = $item->FILEID; } //echo $champs_index."<br>"; if (isset($tablename_fixe_value)) { if (strstr($sql, $tablename_fixe_value[0])) { $list_id_tri_fixe[] = $champs_index; } } foreach ($item as $field => $value) { if ($field != "HARDWARE_ID" and $field != "FILEID" and $field != "ID") { // echo "<br>champs => ".$field." valeur => ".$value; $tab_options['REPLACE_VALUE_ALL_TIME'][$field][$champs_index] = $value; } } } } if (isset($tab_options['REPLACE_VALUE_ALL_TIME'])) { $_SESSION['OCS']['REPLACE_VALUE_ALL_TIME'] = $tab_options['REPLACE_VALUE_ALL_TIME']; } } // print_r($tab_options['VALUE']); // print_r($list_id_tri_fixe); //on vide les valeurs pr�c�dentes //pour optimiser la place sur le serveur if (!isset($tab_options['SAVE_CACHE'])) { unset($_SESSION['OCS']['csv'], $_SESSION['OCS']['list_fields']); } $_SESSION['OCS']['csv']['SQL'][$table_name] = $queryDetails; if (isset($tab_options['ARG_SQL'])) { $_SESSION['OCS']['csv']['ARG'][$table_name] = $tab_options['ARG_SQL']; } //requete de count unset($_SESSION['OCS']['NUM_ROW']); if (!isset($_SESSION['OCS']['NUM_ROW'][$table_name])) { unset($_SESSION['OCS']['NUM_ROW']); if (!isset($tab_options['SQL_COUNT'])) { $querycount_begin = "select count(*) count_nb_ligne "; if (stristr($queryDetails, "group by") and substr_count($queryDetails, "group by") == 1) { $querycount_end = "," . substr($queryDetails, 6); } else { $querycount_end = stristr($queryDetails, 'from '); } $querycount = $querycount_begin . $querycount_end; } else { $querycount = $tab_options['SQL_COUNT']; } if (isset($tab_options['ARG_SQL_COUNT'])) { $resultcount = mysql2_query_secure($querycount, $link, $tab_options['ARG_SQL_COUNT']); } elseif (isset($tab_options['ARG_SQL'])) { $resultcount = mysql2_query_secure($querycount, $link, $tab_options['ARG_SQL']); } else { $resultcount = mysql2_query_secure($querycount, $link); } //if this query is only for show data (like : //select '%s' as NOM,'%s' as LIBELLE) if (!stristr($queryDetails, "from")) { unset($resultcount); } //En dernier recourt, si le count n'est pas bon, //on joue la requete initiale if (!$resultcount) { if (isset($tab_options['ARG_SQL'])) { $resultcount = mysql2_query_secure($queryDetails, $link, $tab_options['ARG_SQL']); } else { $resultcount = mysql2_query_secure($queryDetails, $link); } } if ($resultcount) { $num_rows_result = mysql_num_rows($resultcount); } //echo "<b>".$num_rows_result."</b>"; if ($num_rows_result == 1) { $count = mysql_fetch_object($resultcount); // echo $queryDetails; if ($count->count_nb_ligne > 0) { $num_rows_result = $count->count_nb_ligne; } } $_SESSION['OCS']['NUM_ROW'][$table_name] = $num_rows_result; } else { $num_rows_result = $_SESSION['OCS']['NUM_ROW'][$table_name]; if ($_SESSION['OCS']['DEBUG'] == 'ON') { msg_info($l->g(5007)); } } //echo $querycount; //FIN REQUETE COUNT if (isset($limit)) { if ($limit["END"] < $limit_result_cache) { $queryDetails .= " limit " . $limit_result_cache; } else { $queryDetails .= " limit " . floor($limit["END"] / $limit_result_cache) * $limit_result_cache . "," . $limit_result_cache; } } if (isset($tab_options['ARG_SQL'])) { $resultDetails = mysql2_query_secure($queryDetails, $link, $tab_options['ARG_SQL']); } else { $resultDetails = mysql2_query_secure($queryDetails, $link); } flush(); $i = floor($limit["END"] / $limit_result_cache) * $limit_result_cache; $index = $limit["BEGIN"]; $value_data_begin = $limit["BEGIN"]; $value_data_end = $limit["END"] + 1; //echo $num_rows_result; if ($index > $num_rows_result) { $value_data_end = $num_rows_result - 1; } //echo $queryDetails; while ($item = mysql_fetch_object($resultDetails)) { if ($i >= $index) { unset($champs_index); if ($item->ID != "") { $champs_index = $item->ID; } elseif ($item->FILEID != "") { $champs_index = $item->FILEID; } if (isset($list_id_tri_fixe)) { $index = $champs_index; } if ($index > $num_rows_result) { break; } //on arr�te le traitement si on est au dessus du nombre de ligne foreach ($item as $key => $value) { $sql_data_cache[$index][$key] = $value; if ($index < $value_data_end and $index >= $value_data_begin) { flush(); $sql_data[$index][$key] = $value; foreach ($list_fields as $key => $value) { if ($tab_options['VALUE'][$key]) { if ($tab_options['VALUE'][$key][$champs_index] == "" and isset($tab_options['VALUE_DEFAULT'][$key])) { $sql_data[$index][$value] = $tab_options['VALUE_DEFAULT'][$key]; } else { $sql_data[$index][$value] = $tab_options['VALUE'][$key][$champs_index]; } } } } //ajout des valeurs statiques foreach ($list_fields as $key => $value) { if ($tab_options['VALUE'][$key]) { if ($tab_options['VALUE'][$key][$champs_index] == "" and isset($tab_options['VALUE_DEFAULT'][$key])) { $sql_data_cache[$index][$value] = $tab_options['VALUE_DEFAULT'][$key]; } else { $sql_data_cache[$index][$value] = $tab_options['VALUE'][$key][$champs_index]; } } } } $index++; } $i++; } // if ($i == 1){ // $num_rows_result=1; // $_SESSION['OCS']['NUM_ROW'][$table_name]=1; // } flush(); //traitement du tri des r�sultats sur une valeur fixe if (isset($list_id_tri_fixe)) { $i = 0; //parcourt des id tri�s while ($list_id_tri_fixe[$i]) { if ($limit["BEGIN"] <= $i and $i < $limit["BEGIN"] + $limit_result_cache) { $sql_data_tri_fixe[$i] = $sql_data[$list_id_tri_fixe[$i]]; } $i++; } unset($sql_data); $sql_data = $sql_data_tri_fixe; } // print_r($sql_data_cache); //on vide le cache des autres tableaux //pour optimiser la place dispo sur le serveur unset($_SESSION['OCS']['DATA_CACHE']); if (!$force_no_cache) { $_SESSION['OCS']['DATA_CACHE'][$table_name] = $sql_data_cache; } $result_data = gestion_donnees($sql_data, $list_fields, $tab_options, $form_name, $default_fields, $list_col_cant_del, $queryDetails, $table_name); $data = $result_data['DATA']; $entete = $result_data['ENTETE']; $correct_list_col_cant_del = $result_data['correct_list_col_cant_del']; $correct_list_fields = $result_data['correct_list_fields']; } if ($num_rows_result > 0) { if (count($data) == 1 and (!isset($protectedPost['page']) or $protectedPost['page'] == 0)) { $num_rows_result = 1; } $title = $num_rows_result . " " . $l->g(90); if (isset($tab_options['LOGS'])) { addLog($tab_options['LOGS'], $num_rows_result . " " . $l->g(90)); } if (!isset($tab_options['no_download_result'])) { $title .= "<a href='index.php?" . PAG_INDEX . "=" . $pages_refs['ms_csv'] . "&no_header=1&tablename=" . $table_name . "&base=" . $tab_options['BASE'] . "'><small> (" . $l->g(183) . ")</small></a>"; } $result_with_col = gestion_col($entete, $data, $correct_list_col_cant_del, $form_name, $table_name, $list_fields, $correct_list_fields, $form_name); $no_result = tab_entete_fixe($result_with_col['entete'], $result_with_col['data'], $title, $width, "", array(), $tab_options); if ($no_result) { show_page($num_rows_result, $form_name); echo "<input type='hidden' id='tri_" . $table_name . "' name='tri_" . $table_name . "' value='" . $protectedPost['tri_' . $table_name] . "'>"; echo "<input type='hidden' id='tri_fixe' name='tri_fixe' value='" . $protectedPost['tri_fixe'] . "'>"; echo "<input type='hidden' id='sens_" . $table_name . "' name='sens_" . $table_name . "' value='" . $protectedPost['sens_' . $table_name] . "'>"; echo "<input type='hidden' id='SUP_PROF' name='SUP_PROF' value=''>"; echo "<input type='hidden' id='MODIF' name='MODIF' value=''>"; echo "<input type='hidden' id='SELECT' name='SELECT' value=''>"; echo "<input type='hidden' id='OTHER' name='OTHER' value=''>"; echo "<input type='hidden' id='ACTIVE' name='ACTIVE' value=''>"; echo "<input type='hidden' id='CONFIRM_CHECK' name='CONFIRM_CHECK' value=''>"; echo "<input type='hidden' id='OTHER_BIS' name='OTHER_BIS' value=''>"; echo "<input type='hidden' id='OTHER_TER' name='OTHER_TER' value=''>"; return TRUE; } else { return FALSE; } } else { echo "</td></tr></table>"; msg_warning($l->g(766)); return FALSE; } }
} //Error are detected if ($msg_header_error != array()) { js_tooltip(); $msg_tooltip = ''; foreach ($msg_header_error as $poub => $values) { if (isset($msg_header_error_sol[$poub])) { $tooltip = tooltip($msg_header_error_sol[$poub]); $msg_tooltip .= "<div " . $tooltip . ">" . $values . "</div>"; } } msg_error("<big>" . $l->g(1263) . "</big><br>" . $msg_tooltip, "top_msg_alert"); } //warning are detected if ($msg_header_warning != array()) { msg_warning(implode('<br>', $msg_header_warning), "top_msg_warning"); } } if (isset($_SESSION['OCS']['TRUE_USER'])) { msg_info($_SESSION['OCS']['TRUE_USER'] . " " . $l->g(889) . " " . $_SESSION['OCS']["loggeduser"]); } if (isset($_SESSION['OCS']["TRUE_mesmachines"])) { msg_info($l->g(890)); } echo "</td></tr></table></td></tr>"; if (!isset($_SESSION['OCS']["loggeduser"])) { echo "<tr><td colspan=20 align=right>"; require_once 'plugins/language/language.php'; echo "</td></tr>"; } echo "</table>";
} if ($list_id_groups != "") { $sql_my_msg = "select distinct g_c.group_id groups \n\t\t\t\t\tfrom accountinfo a ,groups_cache g_c\n\t\t\t\t\twhere g_c.HARDWARE_ID=a.HARDWARE_ID\n\t\t\t\t\t\tand\tg_c.GROUP_ID in (" . $list_id_groups . ")"; if (isset($_SESSION['OCS']['mesmachines']) and $_SESSION['OCS']['mesmachines'] != "") { $sql_my_msg .= " and " . $_SESSION['OCS']['mesmachines']; } $result_my_msg = mysqli_query($_SESSION['OCS']["readServer"], $sql_my_msg); while ($item_my_msg = mysqli_fetch_object($result_my_msg)) { foreach ($info_msg['ivalue'] as $key => $value) { if ($value == $item_my_msg->groups) { $msg_group[$key] = $info_msg['tvalue'][$key]; } } } if (isset($msg_group) and $msg_group != '') { msg_warning(implode('<br>', $msg_group)); } } } if ($ajax) { ob_end_clean(); if (isset($sql_field[$protectedPost["SHOW_ME"]]['SQL'])) { tab_req($list_fields, $default_fields, $list_col_cant_del, $sql_field[$protectedPost["SHOW_ME"]]['SQL'], $tab_options); } else { tab_req($list_fields, $default_fields, $list_col_cant_del, $sql['SQL'], $tab_options); } } ?>
} } } if (!isset($list_alpha[$protectedPost['onglet']])) { $protectedPost['onglet'] = $first; } $_SESSION['OCS']['REQ_ONGLET_SOFT'] = $sql_list_alpha; $_SESSION['OCS']['ONGLET_SOFT'] = $list_alpha; } $form_name = "all_soft"; $table_name = "all_soft"; echo open_form($form_name); onglet($_SESSION['OCS']['ONGLET_SOFT'], $form_name, "onglet", 20); echo '<div class="mlt_bordure" >'; if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != "" or isset($protectedPost['NBRE']) and $protectedPost['NBRE'] != "") { msg_warning($l->g(767)); } //use cache if ($_SESSION['OCS']["usecache"] == 1 and !(isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1)) { $search_soft['SQL'] = "select name,id from softwares_name_cache"; //$forcedRequest['SQL']=$search_soft['SQL']; $search_soft['SQL'] .= " where name like '%s'"; $search_soft['ARG'] = array($protectedPost['onglet'] . "%"); $and_where = " where "; if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != "") { //$forcedRequest['SQL'].= $and_where." name like '%s' "; //$forcedRequest['ARG']=array("%".$protectedPost['NAME_RESTRICT']."%"); $search_soft['SQL'] .= " and name like '%s' "; array_push($search_soft['ARG'], "%" . $protectedPost['NAME_RESTRICT'] . "%"); $and_where = " and "; }
$size = 'as size'; } else { $name = ''; $date_create = ''; $date_modif = ''; $size = ''; } $sql .= "select '%s' " . $name . ",'%s' " . $date_create . ",'%s' " . $date_modif . ",'%s' " . $size . " union "; array_push($arg, $value); array_push($arg, rtrim($data['date_create'][$id], ".")); array_push($arg, rtrim($data['date_modif'][$id], ".")); array_push($arg, round($data['size'][$id] / 1024, 3) . " " . $l->g(516)); } $sql = substr($sql, 0, -6); $list_fields = array('name' => 'name', $l->g(951) => 'date_create', $l->g(952) => 'date_modif', $l->g(953) => 'size'); $list_col_cant_del = $list_fields; $default_fields = $list_fields; // $sql= "select '%s' as function,%s from deploy"; $tab_options['ARG_SQL'] = $arg; $tab_options['LBL']['name'] = $l->g(950); $tab_options['LIEN_LBL']['name'] = 'index.php?' . PAG_INDEX . '=' . $pages_refs['ms_csv'] . '&no_header=1&log='; $tab_options['LIEN_CHAMP']['name'] = 'name'; $tab_options['LIEN_TYPE']['name'] = 'POPUP'; $tab_options['POPUP_SIZE']['name'] = "width=900,height=600"; printEntete($l->g(928)); echo "<br>"; tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $sql, $form_name, 80, $tab_options); echo close_form(); } else { msg_warning($l->g(766)); }
//activation des LOGS $tab_options['LOGS'] = 'SEARCH_RESULT'; $tab_options['form_name'] = $form_name; $tab_options['table_name'] = $table_tabname; ajaxtab_entete_fixe($list_fields, $default_fields, $tab_options, $list_col_cant_del); add_trait_select($list_fonct, $list_id, $form_name, $list_pag); echo "<input type='hidden' value='" . $protectedPost['Valid-search'] . "' name='Valid-search'>"; } elseif ($protectedPost['Valid-search'] != '') { $no_result = "NO RESULT"; } if ($no_result == "NO RESULT" and !isset($ERROR)) { //choix des fonctionnalitées pour les utilisateurs $list_fonct["image/groups_search.png"] = $l->g(583); $list_pag["image/groups_search.png"] = $pages_refs["ms_custom_groups"]; add_trait_select($list_fonct, $list_id, $form_name, $list_pag); msg_warning($l->g(42)); } if ($_SESSION['OCS']["mesmachines"] != '') { $list_id_computer = computer_list_by_tag(); } //pour tous les tableaux: //TABLE-NOMCHAMP =>lbl du champ //option: TABLE-NOMCHAMP-LBL => commentaire à ajouter après le champ de saisi //composotion du tableau // option: TABLE-NOMCHAMP-SELECT =>array des valeurs du champ select ou requete sql (affichage du select) // si option absente le select affiche array('exact'=> 'EXACTEMENT','ressemble'=>'RESSEMBLE','diff'=>'DIFFERENT') //a l'affichage on se retrouve avec le lbl du champ,un select et un champ de saisi $sort_list = array("NETWORKS-IPADDRESS" => $l->g(82) . ": " . $l->g(34), "NETWORKS-MACADDR" => $l->g(82) . ": " . $l->g(95), "SOFTWARES-NAME" => $l->g(20) . ": " . $l->g(49), "SOFTWARES-VERSION" => $l->g(20) . ": " . $l->g(277), "SOFTWARES-BITSWIDTH" => $l->g(20) . ": " . $l->g(1247), "SOFTWARES-PUBLISHER" => $l->g(20) . ": " . $l->g(69), "SOFTWARES-COMMENTS" => $l->g(20) . ": " . $l->g(51), "HARDWARE-DESCRIPTION" => $l->g(25) . ": " . $l->g(53), "HARDWARE-USERDOMAIN" => $l->g(82) . ": " . $l->g(557), "BIOS-BVERSION" => $l->g(273) . ": " . $l->g(209), "HARDWARE-USERID" => $l->g(243) . ": " . $l->g(49), "HARDWARE-OSCOMMENTS" => $l->g(25) . ": " . $l->g(51), "HARDWARE-OSVERSION" => $l->g(25) . ": " . $l->g(277), "NETWORKS-IPGATEWAY" => $l->g(82) . ": " . $l->g(207), "NETWORKS-IPSUBNET" => $l->g(82) . ": " . $l->g(331), "NETWORKS-IPDHCP" => $l->g(82) . ": " . $l->g(281), "BIOS-SSN" => $l->g(273) . ": " . $l->g(36), "BIOS-SMODEL" => $l->g(273) . ": " . $l->g(65), "HARDWARE-NAME" => $l->g(729) . ": " . $l->g(49), "HARDWARE-PROCESSORT" => $l->g(54) . " (old): " . $l->g(66), "BIOS-SMANUFACTURER" => $l->g(729) . ": " . $l->g(64), "MONITORS-SERIAL" => $l->g(554), "MONITORS-DESCRIPTION" => $l->g(556), "MONITORS-MANUFACTURER" => $l->g(555), "DRIVES-VOLUMN" => $l->g(92) . ": " . $l->g(964), "BIOS-BMANUFACTURER" => $l->g(273) . ": " . $l->g(284), "BIOS-BVERSION" => $l->g(273) . ": " . $l->g(277), "BIOS-ASSETTAG" => $l->g(273) . ": " . $l->g(216), "HARDWARE-LASTDATE" => "OCS: " . $l->g(46), "HARDWARE-LASTCOME" => "OCS: " . $l->g(820), "HARDWARE-WORKGROUP" => $l->g(82) . ": " . $l->g(33), "STORAGES-NAME" => $l->g(63) . ": " . $l->g(49), "STORAGES-SERIALNUMBER" => $l->g(63) . ": " . $l->g(36), "STORAGES-DISKSIZE" => $l->g(63) . ": " . $l->g(67), "PRINTERS-NAME" => $l->g(79) . ": " . $l->g(49), "PRINTERS-DRIVER" => $l->g(79) . ": " . $l->g(278), "PRINTERS-PORT" => $l->g(79) . ": " . $l->g(279), "PRINTERS-DESCRIPTION" => $l->g(79) . ": " . $l->g(53), "PRINTERS-SERVERNAME" => $l->g(79) . ": " . $l->g(1323), "PRINTERS-SHARENAME" => $l->g(79) . ": " . $l->g(1324), "PRINTERS-RESOLUTION" => $l->g(79) . ": " . $l->g(1325), "PRINTERS-COMMENT" => $l->g(79) . ": " . $l->g(51), "HARDWARE-ARCH" => $l->g(25) . ": " . $l->g(1247), "CPUS-MANUFACTURER" => $l->g(54) . ": " . $l->g(64), "CPUS-TYPE" => $l->g(54) . ": " . $l->g(66), "CPUS-SERIALNUMBER" => $l->g(54) . ": " . $l->g(36), "CPUS-SPEED" => $l->g(54) . ": " . $l->g(429), "CPUS-CORES" => $l->g(54) . ": " . $l->g(1317), "CPUS-L2CACHESIZE" => $l->g(54) . ": " . $l->g(1318), "CPUS-LOGICAL_CPUS" => $l->g(54) . ": " . $l->g(1314), "CPUS-VOLTAGE" => $l->g(54) . ": " . $l->g(1319), "CPUS-CURRENT_SPEED" => $l->g(54) . ": " . $l->g(1315), "CPUS-SOCKET" => $l->g(54) . ": " . $l->g(1316)); $optSelectField = array("NETWORKS-IPADDRESS" => $sort_list["NETWORKS-IPADDRESS"], "NETWORKS-MACADDR" => $sort_list["NETWORKS-MACADDR"], "SOFTWARES-NAME" => $sort_list["SOFTWARES-NAME"], "SOFTWARES-VERSION" => $sort_list["SOFTWARES-VERSION"], "SOFTWARES-BITSWIDTH" => $sort_list["SOFTWARES-BITSWIDTH"], "SOFTWARES-PUBLISHER" => $sort_list["SOFTWARES-PUBLISHER"], "SOFTWARES-COMMENTS" => $sort_list["SOFTWARES-COMMENTS"], "HARDWARE-DESCRIPTION" => $sort_list["HARDWARE-DESCRIPTION"], "HARDWARE-USERDOMAIN" => $sort_list["HARDWARE-USERDOMAIN"], "BIOS-BVERSION" => $sort_list["BIOS-BVERSION"], "HARDWARE-USERID" => $sort_list["HARDWARE-USERID"], "HARDWARE-OSCOMMENTS" => $sort_list["HARDWARE-OSCOMMENTS"], "HARDWARE-OSVERSION" => $sort_list["HARDWARE-OSVERSION"], "NETWORKS-IPGATEWAY" => $sort_list["NETWORKS-IPGATEWAY"], "NETWORKS-IPSUBNET" => $sort_list["NETWORKS-IPSUBNET"], "NETWORKS-IPDHCP" => $sort_list["NETWORKS-IPDHCP"], "BIOS-SSN" => $sort_list["BIOS-SSN"], "BIOS-SMODEL" => $sort_list["BIOS-SMODEL"], "HARDWARE-NAME" => $sort_list["HARDWARE-NAME"], "HARDWARE-PROCESSORT" => $sort_list["HARDWARE-PROCESSORT"], "BIOS-SMANUFACTURER" => $sort_list["BIOS-SMANUFACTURER"], "MONITORS-SERIAL" => $sort_list["MONITORS-SERIAL"], "MONITORS-DESCRIPTION" => $sort_list["MONITORS-DESCRIPTION"], "MONITORS-MANUFACTURER" => $sort_list["MONITORS-MANUFACTURER"], "DRIVES-VOLUMN" => $sort_list["DRIVES-VOLUMN"], "BIOS-BMANUFACTURER" => $sort_list["BIOS-BMANUFACTURER"], "BIOS-BVERSION" => $sort_list["BIOS-BVERSION"], "BIOS-ASSETTAG" => $sort_list["BIOS-ASSETTAG"], "PRINTERS-NAME" => $sort_list["PRINTERS-NAME"], "PRINTERS-DRIVER" => $sort_list["PRINTERS-DRIVER"], "PRINTERS-PORT" => $sort_list["PRINTERS-PORT"], "PRINTERS-DESCRIPTION" => $sort_list['PRINTERS-DESCRIPTION'], "PRINTERS-SERVERNAME" => $sort_list["PRINTERS-SERVERNAME"], "PRINTERS-SHARENAME" => $sort_list["PRINTERS-SHARENAME"], "PRINTERS-RESOLUTION" => $sort_list["PRINTERS-RESOLUTION"], "PRINTERS-COMMENT" => $sort_list["PRINTERS-COMMENT"], "HARDWARE-ARCH" => $l->g(25) . ": " . $l->g(1247), "HARDWARE-LASTDATE" => $sort_list["HARDWARE-LASTDATE"], "HARDWARE-LASTDATE-LBL" => "calendar", "HARDWARE-LASTDATE-SELECT" => array("small" => $l->g(346), "tall" => $l->g(347)), "HARDWARE-LASTCOME" => $sort_list["HARDWARE-LASTCOME"], "HARDWARE-LASTCOME-LBL" => "calendar", "HARDWARE-LASTCOME-SELECT" => array("small" => $l->g(346), "tall" => $l->g(347)), "HARDWARE-WORKGROUP" => $sort_list["HARDWARE-WORKGROUP"], "STORAGES-NAME" => $sort_list["STORAGES-NAME"], "STORAGES-SERIALNUMBER" => $sort_list["STORAGES-SERIALNUMBER"], "STORAGES-DISKSIZE" => $sort_list["STORAGES-DISKSIZE"], "STORAGES-DISKSIZE-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202)), "STORAGES-DISKSIZE-LBL" => "MB", "HARDWARE-ARCH" => $sort_list["HARDWARE-ARCH"], "CPUS-MANUFACTURER" => $sort_list["CPUS-MANUFACTURER"], "CPUS-SERIALNUMBER" => $sort_list["CPUS-SERIALNUMBER"], "CPUS-SOCKET" => $sort_list["CPUS-SOCKET"], "CPUS-TYPE" => $sort_list["CPUS-TYPE"], "CPUS-SPEED" => $sort_list["CPUS-SPEED"], "CPUS-SPEED-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202)), "CPUS-SPEED-LBL" => "MHz", "CPUS-CORES" => $sort_list["CPUS-CORES"], "CPUS-CORES-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202)), "CPUS-L2CACHESIZE" => $sort_list["CPUS-L2CACHESIZE"], "CPUS-L2CACHESIZE-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202)), "CPUS-LOGICAL_CPUS" => $sort_list["CPUS-LOGICAL_CPUS"], "CPUS-LOGICAL_CPUS-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202)), "CPUS-CURRENT_SPEED" => $sort_list["CPUS-CURRENT_SPEED"], "CPUS-CURRENT_SPEED-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202)), "CPUS-CURRENT_SPEED-LBL" => "MHz", "CPUS-VOLTAGE" => $sort_list["CPUS-VOLTAGE"], "CPUS-VOLTAGE-SELECT" => array("exact" => $l->g(410), "small" => $l->g(201), "tall" => $l->g(202))); //ajout des champs de accountinfo $optSelectField = array_merge($optSelectField_account, $optSelectField);
} //Error are detected if ($msg_header_error != array()) { js_tooltip(); $msg_tooltip = ''; foreach ($msg_header_error as $poub => $values) { if (isset($msg_header_error_sol[$poub])) { $tooltip = tooltip($msg_header_error_sol[$poub]); $msg_tooltip .= "<div " . $tooltip . ">" . $values . "</div>"; } } msg_error("<big>" . $l->g(1263) . "</big><br>" . $msg_tooltip); } //warning are detected if ($msg_header_warning != array()) { msg_warning(implode('<br>', $msg_header_warning)); } } if (isset($_SESSION['OCS']['TRUE_USER'])) { msg_info($_SESSION['OCS']['TRUE_USER'] . " " . $l->g(889) . " " . $_SESSION['OCS']["loggeduser"]); } if (isset($_SESSION['OCS']["TRUE_mesmachines"])) { msg_info($l->g(890)); } echo "</td><td align=right><table><tr><td align=center>\n\tVer. <b>" . GUI_VER_SHOW . "</b><br>"; //pass in debug mode if plugin debug exist if (isset($pages_refs['ms_debug'])) { $javascript = "OnClick='window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_debug'] . "&head=1\",\"debug\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=550,height=350\")'"; if (isset($_SESSION['OCS']['DEBUG']) and $_SESSION['OCS']['DEBUG'] == 'ON' or isset($_SESSION['OCS']['MODE_LANGUAGE']) and $_SESSION['OCS']['MODE_LANGUAGE'] == "ON") { echo "<b>" . GUI_VER . "/" . DB_NAME . "</b><br>"; echo "<a " . $javascript . "><img src=image/red.png></a><br>";