$protectedPost['multiSearch'] = $l->g(32); $protectedPost['Valid'] = 1; } $protectedPost['GET'] = $protectedGet['prov']; } //end need to delete this part... //initialisation du tableau //$list_fields_calcul=array(); //ouverture du formulaire echo open_form($form_name); if (isset($protectedPost['GET'])) { echo "<input type=hidden name='GET' value='" . $protectedPost['GET'] . "'>"; } //recherche des différents champs de accountinfo require_once 'require/function_admininfo.php'; $field_of_accountinfo = witch_field_more('COMPUTERS'); $optSelectField_account = array(); $opt2Select_account = array(); $sort_accountinfo = array(); $list_fields_account_info = array(); foreach ($field_of_accountinfo['LIST_FIELDS'] as $id => $lbl) { if ($field_of_accountinfo['LIST_NAME'][$id] == "TAG") { $name_field_accountinfo = "TAG"; $delfault_tag = $l->g(1210) . " " . $lbl; } else { $name_field_accountinfo = "fields_" . $id; } $sort_accountinfo['ACCOUNTINFO-' . $name_field_accountinfo] = $l->g(1210) . " " . $lbl; if (in_array($field_of_accountinfo['LIST_TYPE'][$id], array(0, 1, 3, 6))) { $optSelectField_account['ACCOUNTINFO-' . $name_field_accountinfo] = $sort_accountinfo['ACCOUNTINFO-' . $name_field_accountinfo]; //"Accinf: ".$lbl;
<?php global $l; /********************************* DEFINE ALL ALIAS FOR ALL TABLES *************************/ $alias_table = array('HARDWARE' => 'h', 'BIOS' => 'b', 'CONTROLLERS' => 'con', 'DRIVES' => 'dr', 'INPUT' => 'in', 'MEMORIES' => 'mem', 'MODEMS' => 'mod', 'MONITORS' => 'mon', 'ACCOUNTINFO' => 'a'); /********************************* DEFINE ALL LBL FOR ALL FIELDS **************************/ //search all fields for accountinfo require_once 'require/function_admininfo.php'; $accountinfo_data = witch_field_more('COMPUTERS'); $lbl_column['ACCOUNTINFO']['HARDWARE_ID'] = $l->g(949); foreach ($accountinfo_data['LIST_FIELDS'] as $id => $id_lbl) { if ($id != '1') { $lbl_column['ACCOUNTINFO']['fields_' . $id] = $l->g(1210) . " " . $id_lbl; } else { $lbl_column['ACCOUNTINFO']['TAG'] = $l->g(1210) . " " . $id_lbl; } } $default_column['ACCOUNTINFO'] = array('TAG'); //hardware $lbl_column['HARDWARE'] = array('ID' => $l->g(949), 'DEVICEID' => 'DEVICEID', 'NAME' => $l->g(729) . ": " . $l->g(23), 'WORKGROUP' => $l->g(33), 'USERDOMAIN' => $l->g(82) . ": " . $l->g(557), 'OSNAME' => $l->g(25) . ": " . $l->g(25), 'OSVERSION' => $l->g(25) . ": " . $l->g(275), 'OSCOMMENTS' => $l->g(25) . ": " . $l->g(286), 'PROCESSORT' => $l->g(54) . ": " . $l->g(350), 'PROCESSORS' => $l->g(54) . ": " . $l->g(569), 'PROCESSORN' => $l->g(54) . ": " . $l->g(351), 'MEMORY' => $l->g(568), 'SWAP' => $l->g(50), 'IPADDR' => $l->g(82) . ": " . $l->g(34), 'DNS' => $l->g(82) . ": DNS", 'DEFAULTGATEWAY' => 'DEFAULTGATEWAY', 'ETIME' => 'ETIME', 'LASTDATE' => "OCS: " . $l->g(46), 'LASTCOME' => "OCS: " . $l->g(352), 'QUALITY' => "OCS: " . $l->g(353), 'FIDELITY' => "OCS: " . $l->g(354), 'USERID' => $l->g(243) . ": " . $l->g(24), 'TYPE' => $l->g(66), 'DESCRIPTION' => $l->g(25) . ": " . $l->g(53), 'WINCOMPANY' => $l->g(355), 'WINOWNER' => $l->g(356), 'WINPRODID' => $l->g(111), 'WINPRODKEY' => $l->g(553), 'USERAGENT' => "OCS: " . $l->g(357), 'CHECKSUM' => 'CHECKSUM', 'SSTATE' => 'SSTATE', 'IPSRC' => 'IPSRC', 'UUID' => 'UUID'); $default_column['HARDWARE'] = array('NAME', 'WORKGROUP', 'OSNAME', 'USERID', 'MEMORY', 'LASTDATE', 'LASTCOME'); //bios $lbl_column['BIOS'] = array('HARDWARE_ID' => $l->g(949), 'SMANUFACTURER' => $l->g(273) . ": " . $l->g(64), 'SMODEL' => $l->g(273) . ": " . $l->g(284), 'SSN' => $l->g(273) . ": " . $l->g(36), 'TYPE' => $l->g(273) . ": " . $l->g(66), 'BMANUFACTURER' => $l->g(273) . ": " . $l->g(284), 'BVERSION' => $l->g(273) . ": " . $l->g(209), 'BDATE' => $l->g(273) . ": " . $l->g(210), 'ASSETTAG' => $l->g(273) . ": " . $l->g(216)); $default_column['BIOS'] = array('SMANUFACTURER', 'SSN', 'BMANUFACTURER'); //controllers $lbl_column['CONTROLLERS'] = array('HARDWARE_ID' => $l->g(949), 'MANUFACTURER' => $l->g(64), 'NAME' => $l->g(49), 'CAPTION' => 'Caption', 'DESCRIPTION' => $l->g(53), 'VERSION' => $l->g(277), 'TYPE' => $l->g(66)); $default_column['CONTROLLERS'] = array('MANUFACTURER', 'NAME', 'DESCRIPTION'); //drives $lbl_column['DRIVES'] = array('LETTER' => $l->g(85), 'TYPE' => $l->g(66), 'FILESYSTEM' => $l->g(86), 'TOTAL' => $l->g(87) . " (MB)", 'FREE' => $l->g(88) . " (MB)", 'NUMFILES' => 'NUMFILES', 'VOLUMN' => $l->g(70), 'CREATEDATE' => 'CREATEDATE'); $default_column['DRIVES'] = array('LETTER', 'TOTAL', 'FREE', 'VOLUMN'); //inputs
} } /********************END GESTION CACHE******************/ /********************MANAGE DOWNLOAD REDISTRIBUTION******************/ if (!isset($_SESSION['OCS']["use_redistribution"])) { $values = look_config_default_values(array('DOWNLOAD_REDISTRIB')); $_SESSION['OCS']['use_redistribution'] = $values['ivalue']['DOWNLOAD_REDISTRIB']; if (!isset($_SESSION['OCS']["use_redistribution"])) { $_SESSION['OCS']["use_redistribution"] = 1; } } /********************END DOWNLOAD REDISTRIBUTION******************/ /*********************************************GESTION OF LBL_TAG*************************************/ if (!isset($_SESSION['OCS']['TAG_LBL'])) { require_once 'require/function_admininfo.php'; $all_tag_lbl = witch_field_more('COMPUTERS'); foreach ($all_tag_lbl['LIST_NAME'] as $key => $value) { $_SESSION['OCS']['TAG_LBL'][$value] = $all_tag_lbl['LIST_FIELDS'][$key]; $_SESSION['OCS']['TAG_ID'][$key] = $value; } } /*******************************************GESTION OF PLUGINS (MAIN SECTIONS)****************************/ if (!isset($_SESSION['OCS']['profile'])) { $profile_config = 'config/profiles/' . $_SESSION['OCS']["lvluser"] . '.xml'; $profile_serializer = new XMLProfileSerializer(); $profile = $profile_serializer->unserialize($_SESSION['OCS']["lvluser"], file_get_contents($profile_config)); $_SESSION['OCS']['profile'] = $profile; } else { $profile = $_SESSION['OCS']['profile']; } if (!AJAX and (!isset($header_html) or $header_html != 'NO') and !isset($protectedGet['no_header'])) {
function pageTELEDIFF_WK($form_name) { global $l, $numeric, $sup1, $infos_status; //what ligne we need? $champs = array('IT_SET_PERIM' => 'IT_SET_PERIM', 'IT_SET_TAG_NAME' => 'IT_SET_TAG_NAME', 'IT_SET_NAME_TEST' => 'IT_SET_NAME_TEST', 'IT_SET_NAME_LIMIT' => 'IT_SET_NAME_LIMIT', 'IT_SET_NIV_CREAT' => 'IT_SET_NIV_CREAT', 'IT_SET_NIV_TEST' => 'IT_SET_NIV_TEST', 'IT_SET_NIV_REST' => 'IT_SET_NIV_REST', 'IT_SET_NIV_TOTAL' => 'IT_SET_NIV_TOTAL', 'IT_SET_MAIL' => 'IT_SET_MAIL', 'IT_SET_MAIL_ADMIN' => 'IT_SET_MAIL_ADMIN'); $values = look_config_default_values($champs); debut_tab(); ligne('IT_SET_NIV_CREAT', $l->g(1077), 'select', array('VALUE' => $values['tvalue']['IT_SET_NIV_CREAT'], 'SELECT_VALUE' => $infos_status['NIV_BIS'])); ligne('IT_SET_NIV_TEST', $l->g(1078), 'select', array('VALUE' => $values['tvalue']['IT_SET_NIV_TEST'], 'SELECT_VALUE' => $infos_status['NIV_BIS'])); ligne('IT_SET_NIV_REST', $l->g(1079), 'select', array('VALUE' => $values['tvalue']['IT_SET_NIV_REST'], 'SELECT_VALUE' => $infos_status['NIV_BIS'])); ligne('IT_SET_NIV_TOTAL', $l->g(1080), 'select', array('VALUE' => $values['tvalue']['IT_SET_NIV_TOTAL'], 'SELECT_VALUE' => $infos_status['NIV_BIS'])); ligne('IT_SET_MAIL', $l->g(1081), 'radio', array(1 => $l->g(455), 0 => $l->g(454), 'VALUE' => $values['ivalue']['IT_SET_MAIL'], 'JAVASCRIPT' => " onChange='document." . $form_name . ".submit();'")); if (isset($values['ivalue']['IT_SET_MAIL']) and $values['ivalue']['IT_SET_MAIL'] == 1) { $sql_list_group_user = "******"; $arg_list_group_user = '******'; $result_list_group_user = mysql2_query_secure($sql_list_group_user, $_SESSION['OCS']["readServer"], $arg_list_group_user); while ($value = mysql_fetch_array($result_list_group_user)) { $list_group_user[$value['IVALUE']] = $value['TVALUE']; } ligne('IT_SET_MAIL_ADMIN', $l->g(1082), 'select', array('VALUE' => $values['ivalue']['IT_SET_MAIL_ADMIN'], 'SELECT_VALUE' => $list_group_user)); } ligne('IT_SET_PERIM', $l->g(1083), 'radio', array(1 => 'TAG', 0 => 'GROUP', 'VALUE' => $values['ivalue']['IT_SET_PERIM'], 'JAVASCRIPT' => " onChange='document." . $form_name . ".submit();'")); if (!isset($values['ivalue']['IT_SET_PERIM']) or $values['ivalue']['IT_SET_PERIM'] == 0) { $sql_list_group = "select name from hardware where deviceid='%s'"; $arg_list_group = '_SYSTEMGROUP_'; $result_list_group = mysql2_query_secure($sql_list_group, $_SESSION['OCS']["readServer"], $arg_list_group); while ($value = mysql_fetch_array($result_list_group)) { $list_group[$value['name']] = $value['name']; } ligne('IT_SET_NAME_TEST', $l->g(1084), 'select', array('VALUE' => $values['tvalue']['IT_SET_NAME_TEST'], 'SELECT_VALUE' => $list_group)); ligne('IT_SET_NAME_LIMIT', $l->g(1085), 'select', array('VALUE' => $values['tvalue']['IT_SET_NAME_LIMIT'], 'SELECT_VALUE' => $list_group)); } else { require_once 'require/function_admininfo.php'; $info_account = witch_field_more('COMPUTERS'); $list_tag = $info_account['LIST_FIELDS']; ligne('IT_SET_TAG_NAME', $l->g(1086), 'select', array('VALUE' => $values['tvalue']['IT_SET_TAG_NAME'], 'SELECT_VALUE' => $list_tag)); ligne('IT_SET_NAME_TEST', $l->g(1087), 'input', array('VALUE' => $values['tvalue']['IT_SET_NAME_TEST'], 'SIZE' => 50, 'MAXLENGTH' => 50)); ligne('IT_SET_NAME_LIMIT', $l->g(1088), 'input', array('VALUE' => $values['tvalue']['IT_SET_NAME_LIMIT'], 'SIZE' => 50, 'MAXLENGTH' => 50)); } fin_tab($form_name); }