Merge lp:~pieroliste/ocsinventory-ocsreports/trunk into lp:ocsinventory-ocsreports

Proposed by Pierfrancesco Passerini
Status: Merged
Merged at revision: 602
Proposed branch: lp:~pieroliste/ocsinventory-ocsreports/trunk
Merge into: lp:ocsinventory-ocsreports
Diff against target: 647 lines (+205/-207)
10 files modified
install.php (+6/-9)
plugins/language/english/english.txt (+8/-8)
plugins/language/french/french.txt (+3/-2)
plugins/language/italian/italian.txt (+8/-8)
plugins/main_sections/ms_all_soft/ms_all_soft.php (+4/-4)
plugins/main_sections/ms_dict/ms_dict.php (+1/-1)
plugins/main_sections/ms_groups/ms_groups.php (+3/-3)
plugins/main_sections/ms_logs/ms_logs.php (+2/-2)
plugins/main_sections/ms_teledeploy/ms_custom_pack.php (+169/-169)
plugins/main_sections/ms_teledeploy/ms_tele_popup_active.php (+1/-1)
To merge this branch: bzr merge lp:~pieroliste/ocsinventory-ocsreports/trunk
Reviewer Review Type Date Requested Status
OCS Inventory Dev Team Pending
Review via email: mp+45005@code.launchpad.net

Description of the change

Some cosmetic fix and languages updates
HAPPY NEW YEAR !!

To post a comment you must log in.
602. By Erwan

merge with passero branch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'install.php'
2--- install.php 2010-12-28 17:07:19 +0000
3+++ install.php 2011-01-02 18:01:25 +0000
4@@ -40,7 +40,7 @@
5 echo "<center><br><font color='green'><b>" . $l->g(2031) . " " .
6 $valUpd["tvalue"] .
7 " " . $l->g(2032) .
8- " (" . GUI_VER . ") " .
9+ " (" . GUI_VER . "). " .
10 $l->g(2033) . "</b></red><br></center>";
11
12 if( isset($fromdbconfig_out) && $fromdbconfig_out==true)
13@@ -99,13 +99,10 @@
14 $valBumf = return_bytes( $valTumf );
15
16 if( $valBumf>$valBpms )
17- $MaxAvail = $valTpms;
18+ $MaxAvail = trim($valTpms,"m");
19 else
20- $MaxAvail = $valTumf;
21-
22-echo "<br><center><font color=orange><b>" . $l->g(2040) .
23- " " . $MaxAvail .
24- "<br>" . $l->g(2041) . "</b></font></center>";
25+ $MaxAvail = trim($valTumf,"m");
26+echo "<br><center><font color=orange><b>" . $l->g(2040) . " " . $MaxAvail . $l->g(1240) . "<br>" . $l->g(2041) . "</b></font></center>";
27
28
29 if( isset($_POST["name"])) {
30@@ -134,7 +131,7 @@
31 }
32
33 if( ! $instOk ) {
34- echo "<br><b><font color=red size=2>".$l->g(2102)."</font></b>";
35+ echo "<br><b><font color=red size=2>".$l->g(2102)."<br></font></b>";
36 echo "<br><form name='fsub' action='install.php' method='POST'><table width='100%'>
37 <tr>
38 <td align='right' width='30%'>
39@@ -439,7 +436,7 @@
40 }
41
42 if( ! $erralter ) {
43- echo "</b></font></center><br><center><font color=green><b>" . $l->g(2063) . " (" . $nbconv . " " . $l->g(2064) . "</b></font></center>";
44+ echo "</b></font></center><br><center><font color=green><b>" . $l->g(2063) . " (" . $nbconv . " " . $l->g(2064) . ")" . "</b></font></center>";
45 }
46
47 if($nberr) {
48
49=== modified file 'plugins/language/english/english.txt'
50--- plugins/language/english/english.txt 2010-12-28 17:37:57 +0000
51+++ plugins/language/english/english.txt 2011-01-02 18:01:25 +0000
52@@ -26,6 +26,7 @@
53 49 Name
54 50 Swap
55 51 Comments
56+52 Visible
57 53 Description
58 54 Processor(s)
59 55 Number
60@@ -128,7 +129,7 @@
61 219 uninventoried network interfaces
62 220 deleted
63 221 IP gathering computers
64-222 Warning ! All selected computers are going to be merged in a single computer ! Are you sure ?
65+222 Warning ! All selected computers are going to be merged in a single computer! Are you sure?
66 223 Information
67 224 Value
68 225 Admininfo
69@@ -202,7 +203,7 @@
70 293 Network devices types
71 294 Subnet names
72 295 Click to edit
73-296 Uid
74+296 Id
75 297 Can't write in directory
76 298 All fields must be filled
77 299 Invalid IP adress (must be: x.x.x.x)
78@@ -227,7 +228,7 @@
79 318 DNS name
80 319 Network analyze results
81 320 This analyze was already done on
82-321 do you want to see cached data ?
83+321 do you want to see cached data?
84 322 Data from cache
85 323 generated on
86 324 HOSTS EVALUATED AS
87@@ -358,7 +359,7 @@
88 465 Package activation
89 466 WARNING: Can't find information file at
90 467 WARNING: Can't find fragments files at
91-468 Are you sure to want to activate this package ?
92+468 Are you sure to want to activate this package?
93 469 Package activated, it can now be affected
94 470 Https url
95 471 Fragments url
96@@ -415,7 +416,7 @@
97 522 Standard computer
98 523 Revert back to standard state
99 524 NEVER affect again
100-525 ARE YOU SURE ?
101+525 ARE YOU SURE?
102 526 NO COMPUTER AFFECTED
103 527 January
104 528 February
105@@ -783,7 +784,7 @@
106 895 TAG Modification
107 898 Add an annotation
108 899 Writer
109-900 Do you really want to delete selection ?
110+900 Do you really want to delete selection?
111 901 Action on the query result
112 902 Action on the result of selection
113 903 You must fill the explanation field
114@@ -1167,11 +1168,10 @@
115 2021 YOUR GUI LOGS DIRECTORY IS NOT WRITABLE
116
117
118-
119 2030 OCS-NG Inventory Installation
120 2031 Current installed version
121 2032 is lower than this version
122-2033 automatic install launched
123+2033 Automatic install launched.
124 2034 DB configuration not completed. Automatic install launched
125 2035 ERROR: Sessions for PHP is not properly installed.<br>Try installing the php-session package.
126 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util.
127
128=== modified file 'plugins/language/french/french.txt'
129--- plugins/language/french/french.txt 2010-12-28 17:07:19 +0000
130+++ plugins/language/french/french.txt 2011-01-02 18:01:25 +0000
131@@ -24,8 +24,9 @@
132 46 Dernier inventaire
133 48 Affichage système
134 49 Nom
135-50 Espace de Swap
136+50 Espace de Swap
137 51 Commentaires
138+52 Visible
139 53 Description
140 54 Processeur(s)
141 55 Nombre
142@@ -1168,7 +1169,7 @@
143 2030 Installation d'OCS-NG Inventory
144 2031 version actuellement installée
145 2032 est inférieur à cette version
146-2033 Installation automatique lancée
147+2033 Installation automatique lancée.
148 2034 Le fichiers de configuration de BDD n'est pas valide. Installation automatique lancée
149 2035 ERREUR: Les sessions pour PHP ne sont pas installées correctement. <br> Essayez d'installer le paquet php-session.
150 2036 AVERTISSEMENT: XML pour PHP n'est pas installé correctement, vous ne serez pas en mesure d'utiliser ipdiscover-util.
151
152=== modified file 'plugins/language/italian/italian.txt'
153--- plugins/language/italian/italian.txt 2010-12-28 17:37:57 +0000
154+++ plugins/language/italian/italian.txt 2011-01-02 18:01:25 +0000
155@@ -321,7 +321,7 @@
156 428 Distribuzione
157 429 Frequenza
158 430 Elaborazione di massa
159-431 Attivato
160+431 Attivare
161 432 Non notificato
162 433 Riguarda
163 434 Generatore pacchetti
164@@ -462,7 +462,7 @@
165 569 CPU (MHz)
166 570 Aiuto
167 571 Convalida tutti
168-572 Fatto
169+572 Eseguito
170 573 Errore
171 574 Statistiche
172 575 Non interessati non notificati
173@@ -710,7 +710,7 @@
174 822 Personalizzato
175 823 Predefinito
176 824 Attivazione di log dell'interfaccia
177-825 Directory di log
178+825 Directory dei log
179 826 Indirizzo dove trovare i file del pacchetto Teledeploy da attivare
180 827 Indirizzo dove trovare il file INFO del pacchetto da attivare
181 828 Cancella i computer il cui inventario è più vecchio di
182@@ -836,7 +836,7 @@
183 950 NOME FILE
184 951 CREATO IL
185 952 MODIFICATO IL
186-953 GRANDEZZA
187+953 DIMENSIONI
188 954 Si è verificata una perdita di sessione
189 955 NESSUN SISTEMA TROVATO NEL DATABASE
190 956 Tutti gli errori
191@@ -1167,8 +1167,8 @@
192
193 2030 Installazione OCS-NG Inventory
194 2031 La versione attualmente installata
195-2032 è precedente rispetto a questa versione
196-2033 è stata avviata l'installazione automatica
197+2032 è precedente a questa versione
198+2033 E' stata avviata l'installazione automatica.
199 2034 configurazione del DB incompleta. Lancio l'installazione automatica
200 2035 ERRORE: PHP sessions non installate correttamente.<br>Installa il pacchetto php-session.
201 2036 ATTENZIONE: l'estensione XML per PHP non installata correttamente, non sarai in grado di utilizzare ipdiscover-util.
202@@ -1226,8 +1226,8 @@
203 2093 Pulizia NETMAP...
204 2094 ERRORE: non posso pulire NETMAP
205 2095 linee NETMAP cancellate
206-2096 Per favore inserisci il nome dell'etichetta da inserire nella finestra di input dei client:
207-2097 Non inserire nulla se non vuoi far apparire il popup al lancio dell'agente
208+2096 Per favore inserisci il valore dell'etichetta che verrà mostrata nella finestra di input dei client:
209+2097 Non inserire nulla se non vuoi far apparire il popup ad ogni esecuzione dell'agente
210 2098 ERRORE: l'estensione ZIP per PHP non installata correttamente.<br>Prova ad abilitare la voce extension=php_zip.dll (Windows) rimuovendo il punto e virgola nel file php.ini, oppure prova ad installare il pacchetto libphp-pclzip (Linux).
211 2099 ERRORE: le credenziali MySQL fornite non hanno i diritti necessari per la creazione del database
212 2100 Aggiorna le informazioni degli account
213
214=== modified file 'plugins/main_sections/ms_all_soft/ms_all_soft.php'
215--- plugins/main_sections/ms_all_soft/ms_all_soft.php 2010-12-21 14:06:52 +0000
216+++ plugins/main_sections/ms_all_soft/ms_all_soft.php 2011-01-02 18:01:25 +0000
217@@ -191,15 +191,15 @@
218
219 echo "<br><div class='mvt_bordure'>";
220
221-echo "<b>".$l->g(735)."</b><BR>";
222+echo "<b>".$l->g(735)."</b><br><br>";
223 echo $l->g(382).": ".show_modif($protectedPost['NAME_RESTRICT'],'NAME_RESTRICT',0);
224 echo "&nbsp;".$l->g(381).": ".show_modif(array('<'=>'<','>'=>'>','='=>'='),'COMPAR',2);
225 echo show_modif($protectedPost['NBRE'],'NBRE',0,'',array('MAXLENGTH'=>100,'SIZE'=>10,'JAVASCRIPT'=>$numeric));
226 //echo "<input type='input' name='NBRE' value='".$protectedPost['NBRE']."' ".$numeric.">";
227- echo "<br><a href='index.php?".PAG_INDEX."=".$pages_refs['ms_soft_csv']."&no_header=1&soft=".$protectedPost['NAME_RESTRICT']."&nb=".$protectedPost['NBRE']."&comp=".htmlentities($protectedPost['COMPAR'])."'>".$l->g(183)." ".$l->g(765)."</a>";
228+echo "<br><a href='index.php?".PAG_INDEX."=".$pages_refs['ms_soft_csv']."&no_header=1&soft=".$protectedPost['NAME_RESTRICT']."&nb=".$protectedPost['NBRE']."&comp=".htmlentities($protectedPost['COMPAR'])."'><br>".$l->g(183)." ".$l->g(765)."<br></a>";
229 if ($protectedPost['COMPAR'] == '<' and $protectedPost['NBRE']<=15 and $protectedPost['NBRE'] != "")
230-echo "<br><a href='index.php?".PAG_INDEX."=".$pages_refs['ms_soft_csv']."&no_header=1&soft=".$protectedPost['NAME_RESTRICT']."&nb=".$protectedPost['NBRE']."&comp=".htmlentities($protectedPost['COMPAR'])."&all_computers=yes'>".$l->g(912)."</a>";
231- echo "<br><input type='submit' value='".$l->g(393)."' name='SUBMIT_FORM'><input type='submit' value='".$l->g(396)."' name='RESET'>";
232+echo "<br><a href='index.php?".PAG_INDEX."=".$pages_refs['ms_soft_csv']."&no_header=1&soft=".$protectedPost['NAME_RESTRICT']."&nb=".$protectedPost['NBRE']."&comp=".htmlentities($protectedPost['COMPAR'])."&all_computers=yes'>".$l->g(912)."</a><br>";
233+echo "<br><input type='submit' value='".$l->g(393)."' name='SUBMIT_FORM'><input type='submit' value='".$l->g(396)."' name='RESET'>";
234
235 echo '</div>';
236 echo '</div>';
237
238=== modified file 'plugins/main_sections/ms_dict/ms_dict.php'
239--- plugins/main_sections/ms_dict/ms_dict.php 2010-12-13 16:24:17 +0000
240+++ plugins/main_sections/ms_dict/ms_dict.php 2011-01-02 18:01:25 +0000
241@@ -257,7 +257,7 @@
242 }
243 echo "</td></tr>";
244 $search=show_modif(stripslashes($protectedPost['search']),"search",'0');
245-$trans= "<input name='all_item' id='all_item' type='checkbox' ".(isset($protectedPost['all_item'])? " checked ": "").">".$l->g(384);
246+$trans= "<input name='all_item' id='all_item' type='checkbox' ".(isset($protectedPost['all_item'])? " checked ": "").">".$l->g(384) . " ";
247 //r�cup�ration de toutes les cat�gories
248 $sql_list_categories="select distinct(formatted) name from dico_soft where formatted!=extracted";
249 $result_list_categories = mysql_query( $sql_list_categories, $_SESSION['OCS']["readServer"]);
250
251=== modified file 'plugins/main_sections/ms_groups/ms_groups.php'
252--- plugins/main_sections/ms_groups/ms_groups.php 2010-11-29 17:15:30 +0000
253+++ plugins/main_sections/ms_groups/ms_groups.php 2011-01-02 18:01:25 +0000
254@@ -82,9 +82,9 @@
255 $list_fields['CHECK']= 'ID';
256 $list_fields['SUP']= 'ID';
257 }
258-//changement de nom � l'affichage des champs
259-$tab_options['LBL']['CHECK']="Visible";
260-$tab_options['LBL']['GROUP_NAME']="Nom";
261+//changement de nom � l'affichage des champs
262+$tab_options['LBL']['CHECK']=$l->g(52);
263+$tab_options['LBL']['GROUP_NAME']=$l->g(49);
264
265 $table_name="LIST_GROUPS";
266 $default_fields= array('GROUP_NAME'=>'GROUP_NAME','DESCRIPTION'=>'DESCRIPTION','CREATE'=>'CREATE','NBRE'=>'NBRE','SUP'=>'SUP','CHECK'=>'CHECK');
267
268=== modified file 'plugins/main_sections/ms_logs/ms_logs.php'
269--- plugins/main_sections/ms_logs/ms_logs.php 2010-12-17 21:16:31 +0000
270+++ plugins/main_sections/ms_logs/ms_logs.php 2011-01-02 18:01:25 +0000
271@@ -36,8 +36,8 @@
272 }
273 $sql.="select '%s' ".$name.",'%s' ".$date_create.",'%s' ".$date_modif.",'%s' ".$size." union ";
274 array_push($arg,$value);
275- array_push($arg,$data['date_create'][$id]);
276- array_push($arg,$data['date_modif'][$id]);
277+ array_push($arg,rtrim($data['date_create'][$id],"."));
278+ array_push($arg,rtrim($data['date_modif'][$id],"."));
279 array_push($arg,round($data['size'][$id]/1024,3)." ".$l->g(516));
280 }
281 $sql=substr($sql,0,-6);
282
283=== modified file 'plugins/main_sections/ms_teledeploy/ms_custom_pack.php' (properties changed: +x to -x)
284--- plugins/main_sections/ms_teledeploy/ms_custom_pack.php 2010-12-06 17:01:53 +0000
285+++ plugins/main_sections/ms_teledeploy/ms_custom_pack.php 2011-01-02 18:01:25 +0000
286@@ -1,179 +1,179 @@
287 <?php
288-//====================================================================================
289-// OCS INVENTORY REPORTS
290-// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
291-// Web: http://www.ocsinventory-ng.org
292-//
293-// This code is open source and may be copied and modified as long as the source
294-// code is always made freely available.
295-// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
296-//====================================================================================
297-
298-require_once('require/function_telediff.php');
299-require_once('require/function_search.php');
300-require_once('require/function_telediff_wk.php');
301-//TELEDIFF_WK
302-$activate=option_conf_activate('TELEDIFF_WK');
303-if ($activate){
304- echo "<font color = green><b>" . $l->g(1105) . "
305- <br>" . $l->g(1108) . "</b></font>";
306- //recherche du niveau d'affectation du paquet
307- $conf_Wk=look_config_default_values(array('IT_SET_PERIM','IT_SET_NAME_TEST',
308- 'IT_SET_NAME_LIMIT','IT_SET_TAG_NAME',
309- 'IT_SET_NIV_TEST','IT_SET_NIV_REST'));
310- //savoir comment sont définis les périmètres
311- if ($conf_Wk['ivalue']['IT_SET_PERIM'] == 1){
312- $perim='TAG';
313- msg_warning($l->g(1190) . " " .$conf_Wk['tvalue']['IT_SET_NIV_REST']);
314- msg_info($l->g(1191) . " " .$perim);
315- }else{
316- $perim='GROUPS';
317- //si on vient de la page des groupes
318- if ($protectedGet['origine'] == "group"){
319- //recherche des infos du groupe
320- $queryMachine = "SELECT REQUEST,
321- CREATE_TIME,
322- NAME,
323- XMLDEF,
324- DESCRIPTION,LASTDATE,OSCOMMENTS,DEVICEID FROM hardware h left join groups g on g.hardware_id=h.id
325- WHERE ID='".$protectedGet['idchecked']."' AND (deviceid ='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')";
326- $result = mysql_query( $queryMachine, $_SESSION['OCS']["readServer"] ) or mysql_error($_SESSION['OCS']["readServer"]);
327- $item = mysql_fetch_object($result);
328- print_r($conf_Wk);
329- $msg_wk="";
330- //si ce groupe est défini comme un groupe de test
331- if ($item->NAME == $conf_Wk['tvalue']['IT_SET_NAME_TEST']){
332- $restrict=$conf_Wk['tvalue']['IT_SET_NIV_TEST'];
333- $msg_wk="<br>".$l->g(1192);
334- }
335- //si ce groupe est défini comme un groupe de périmètre restraint
336- if ($item->NAME == $conf_Wk['tvalue']['IT_SET_NAME_LIMIT']){
337- if (!isset($restrict))
338- $restrict=$conf_Wk['tvalue']['IT_SET_NIV_REST'];
339- $msg_wk="<br>".$l->g(1193);
340- }
341- //si le groupe n'est pas pris en compte dans le
342- //système de workflow de télédiff
343- if (!isset($restrict)){
344-
345- $msg_wk=$l->g(1194) . " " . $conf_Wk['tvalue']['IT_SET_NIV_REST'] . " " . $l->g(1195);
346-
347-
348- }
349-
350- }
351-
352-
353- }
354-
355-
356- if ($msg_wk != '')
357- msg_info($msg_wk);
358-
359-}
360-$form_name="pack_affect";
361-echo "<form name='".$form_name."' id='".$form_name."' method='POST' action=''>";
362-$list_id=multi_lot($form_name,$l->g(601));
363-
364-if ($protectedPost['SELECT'] != ''){
365- if ($protectedGet['origine'] == "group"){
366- $form_to_reload='config_group';
367- }elseif ($protectedGet['origine'] == "mach"){
368- $form_to_reload='config_mach';
369- }
370- if ($protectedPost['onglet'] == 'MACH')
371- $nb_affect=active_mach($list_id,$protectedPost['SELECT']);
372- if ($protectedPost['onglet'] == 'SERV_GROUP')
373- $nb_affect=active_serv($list_id,$protectedPost['SELECT'],$protectedPost['rule_choise']);
374- msg_success($nb_affect." ".$l->g(604));
375- if (isset($form_to_reload))
376- echo "<script language='javascript'> window.opener.document.".$form_to_reload.".submit();</script>";
377-}
378-if ($protectedPost['sens'] == "")
379- $protectedPost['sens']='DESC';
380-
381-
382-if ($protectedPost['onglet'] == "")
383-$protectedPost['onglet'] = 'MACH';
384-
385-
386-$def_onglets['MACH']=$l->g(980); //DYNAMICS GROUPS
387-$def_onglets['SERV_GROUP']=$l->g(981); //STATICS GROUPS
388-
389-//show tab
390-if ($list_id){
391- onglet($def_onglets,$form_name,'onglet',7);
392- echo "<table ALIGN = 'Center' class='onglet'><tr><td align =center><tr><td align =center>";
393- if ($protectedPost['onglet'] == 'SERV_GROUP'){
394- $sql_rules="select distinct rule,rule_name from download_affect_rules order by 1";
395- $res_rules = mysql_query( $sql_rules, $_SESSION['OCS']["readServer"] ) or die(mysql_error($_SESSION['OCS']["readServer"]));
396- $nb_rule=0;
397- while( $val_rules = mysql_fetch_array($res_rules)) {
398- $first=$val_rules['rule'];
399- $list_rules[$val_rules['rule']]=$val_rules['rule_name'];
400- $nb_rule++;
401- }
402- if ($nb_rule>1){
403- $select_choise=$l->g(668).show_modif($list_rules,'rule_choise',2,$form_name);
404- echo $select_choise;
405- }elseif($nb_rule == 1){
406- $protectedPost['rule_choise']=$first;
407- echo "<input type=hidden value='".$first."' name='rule_choise' id='rule_choise'>";
408- }elseif ($nb_rule == 0){
409- msg_error($l->g(982));
410- }
411- }
412-
413- if(($protectedPost['onglet'] == 'MACH')
414- or ($protectedPost['onglet'] == 'SERV_GROUP' and $protectedPost['rule_choise'] != '')){
415- //recherche de toutes les r�gles pour les serveurs de redistribution
416- $list_fields= array('FILE_ID'=>'e.FILEID',
417+//====================================================================================
418+// OCS INVENTORY REPORTS
419+// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
420+// Web: http://www.ocsinventory-ng.org
421+//
422+// This code is open source and may be copied and modified as long as the source
423+// code is always made freely available.
424+// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
425+//====================================================================================
426+
427+require_once('require/function_telediff.php');
428+require_once('require/function_search.php');
429+require_once('require/function_telediff_wk.php');
430+//TELEDIFF_WK
431+$activate=option_conf_activate('TELEDIFF_WK');
432+if ($activate){
433+ echo "<font color = green><b>" . $l->g(1105) . "
434+ <br>" . $l->g(1108) . "</b></font>";
435+ //recherche du niveau d'affectation du paquet
436+ $conf_Wk=look_config_default_values(array('IT_SET_PERIM','IT_SET_NAME_TEST',
437+ 'IT_SET_NAME_LIMIT','IT_SET_TAG_NAME',
438+ 'IT_SET_NIV_TEST','IT_SET_NIV_REST'));
439+ //savoir comment sont définis les périmètres
440+ if ($conf_Wk['ivalue']['IT_SET_PERIM'] == 1){
441+ $perim='TAG';
442+ msg_warning($l->g(1190) . " " .$conf_Wk['tvalue']['IT_SET_NIV_REST']);
443+ msg_info($l->g(1191) . " " .$perim);
444+ }else{
445+ $perim='GROUPS';
446+ //si on vient de la page des groupes
447+ if ($protectedGet['origine'] == "group"){
448+ //recherche des infos du groupe
449+ $queryMachine = "SELECT REQUEST,
450+ CREATE_TIME,
451+ NAME,
452+ XMLDEF,
453+ DESCRIPTION,LASTDATE,OSCOMMENTS,DEVICEID FROM hardware h left join groups g on g.hardware_id=h.id
454+ WHERE ID='".$protectedGet['idchecked']."' AND (deviceid ='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')";
455+ $result = mysql_query( $queryMachine, $_SESSION['OCS']["readServer"] ) or mysql_error($_SESSION['OCS']["readServer"]);
456+ $item = mysql_fetch_object($result);
457+ print_r($conf_Wk);
458+ $msg_wk="";
459+ //si ce groupe est défini comme un groupe de test
460+ if ($item->NAME == $conf_Wk['tvalue']['IT_SET_NAME_TEST']){
461+ $restrict=$conf_Wk['tvalue']['IT_SET_NIV_TEST'];
462+ $msg_wk="<br>".$l->g(1192);
463+ }
464+ //si ce groupe est défini comme un groupe de périmètre restraint
465+ if ($item->NAME == $conf_Wk['tvalue']['IT_SET_NAME_LIMIT']){
466+ if (!isset($restrict))
467+ $restrict=$conf_Wk['tvalue']['IT_SET_NIV_REST'];
468+ $msg_wk="<br>".$l->g(1193);
469+ }
470+ //si le groupe n'est pas pris en compte dans le
471+ //système de workflow de télédiff
472+ if (!isset($restrict)){
473+
474+ $msg_wk=$l->g(1194) . " " . $conf_Wk['tvalue']['IT_SET_NIV_REST'] . " " . $l->g(1195);
475+
476+
477+ }
478+
479+ }
480+
481+
482+ }
483+
484+
485+ if ($msg_wk != '')
486+ msg_info($msg_wk);
487+
488+}
489+$form_name="pack_affect";
490+echo "<form name='".$form_name."' id='".$form_name."' method='POST' action=''>";
491+$list_id=multi_lot($form_name,$l->g(601));
492+
493+if ($protectedPost['SELECT'] != ''){
494+ if ($protectedGet['origine'] == "group"){
495+ $form_to_reload='config_group';
496+ }elseif ($protectedGet['origine'] == "mach"){
497+ $form_to_reload='config_mach';
498+ }
499+ if ($protectedPost['onglet'] == 'MACH')
500+ $nb_affect=active_mach($list_id,$protectedPost['SELECT']);
501+ if ($protectedPost['onglet'] == 'SERV_GROUP')
502+ $nb_affect=active_serv($list_id,$protectedPost['SELECT'],$protectedPost['rule_choise']);
503+ msg_success($nb_affect." ".$l->g(604));
504+ if (isset($form_to_reload))
505+ echo "<script language='javascript'> window.opener.document.".$form_to_reload.".submit();</script>";
506+}
507+if ($protectedPost['sens'] == "")
508+ $protectedPost['sens']='DESC';
509+
510+
511+if ($protectedPost['onglet'] == "")
512+$protectedPost['onglet'] = 'MACH';
513+
514+
515+$def_onglets['MACH']=$l->g(980); //DYNAMICS GROUPS
516+$def_onglets['SERV_GROUP']=$l->g(981); //STATICS GROUPS
517+
518+//show tab
519+if ($list_id){
520+ onglet($def_onglets,$form_name,'onglet',7);
521+ echo "<table ALIGN = 'Center' class='onglet'><tr><td align =center><tr><td align =center>";
522+ if ($protectedPost['onglet'] == 'SERV_GROUP'){
523+ $sql_rules="select distinct rule,rule_name from download_affect_rules order by 1";
524+ $res_rules = mysql_query( $sql_rules, $_SESSION['OCS']["readServer"] ) or die(mysql_error($_SESSION['OCS']["readServer"]));
525+ $nb_rule=0;
526+ while( $val_rules = mysql_fetch_array($res_rules)) {
527+ $first=$val_rules['rule'];
528+ $list_rules[$val_rules['rule']]=$val_rules['rule_name'];
529+ $nb_rule++;
530+ }
531+ if ($nb_rule>1){
532+ $select_choise=$l->g(668).show_modif($list_rules,'rule_choise',2,$form_name);
533+ echo $select_choise;
534+ }elseif($nb_rule == 1){
535+ $protectedPost['rule_choise']=$first;
536+ echo "<input type=hidden value='".$first."' name='rule_choise' id='rule_choise'>";
537+ }elseif ($nb_rule == 0){
538+ msg_error($l->g(982));
539+ }
540+ }
541+
542+ if(($protectedPost['onglet'] == 'MACH')
543+ or ($protectedPost['onglet'] == 'SERV_GROUP' and $protectedPost['rule_choise'] != '')){
544+ //recherche de toutes les r�gles pour les serveurs de redistribution
545+ $list_fields= array('FILE_ID'=>'e.FILEID',
546 'INFO_LOC'=>'e.INFO_LOC',
547 'CERT_FILE'=>'e.CERT_FILE',
548 'CERT_PATH'=>'e.CERT_PATH',
549 //'PACK_LOC'=>'de.PACK_LOC',
550- 'PACK_NAME'=>'a.NAME',
551- 'PRIORITY'=>'a.PRIORITY',
552- 'COMMENT'=>'a.COMMENT',
553- 'OS_NAME'=>'a.OSNAME',
554- 'SIZE'=>'a.SIZE'
555+ $l->g(1037)=>'a.NAME',
556+ $l->g(1039)=>'a.PRIORITY',
557+ $l->g(51)=>'a.COMMENT',
558+ $l->g(274)=>'a.OSNAME',
559+ $l->g(953)." (KB)"=>'a.SIZE'
560 );
561-
562- if (!isset($nb_rule) or $nb_rule>0) {
563- if ($protectedPost['onglet'] != 'SERV_GROUP'){
564- $list_fields['PACK_LOC']='e.PACK_LOC';
565- $list_fields['ACTIVE_ID']='e.ID';
566- $list_fields['SELECT']='e.ID';
567- }else{
568- $list_fields['ACTIVE_ID']='e.FILEID';
569- $list_fields['SELECT']='e.FILEID';
570- }
571- } $table_name="LIST_PACK_SEARCH";//INSERT INTO devices(HARDWARE_ID, NAME, IVALUE) VALUES('".$val["h.id"]."', 'DOWNLOAD', $packid)
572- $default_fields= array('PACK_NAME'=>'PACK_NAME','PRIORITY'=>'PRIORITY','OS_NAME'=>'OS_NAME','SIZE'=>'SIZE','SELECT'=>'SELECT');
573- $list_col_cant_del=array('PACK_NAME'=>'PACK_NAME','SELECT'=>'SELECT');
574-
575- if ($protectedPost['onglet'] != 'SERV_GROUP'){
576- $default_fields['PACK_LOC']='PACK_LOC';
577- $list_col_cant_del['PACK_LOC']='PACK_LOC';
578- }
579-
580- $querypack = 'SELECT ';
581- if ($protectedPost['onglet'] == 'SERV_GROUP')
582- $querypack .= ' distinct ';
583- foreach ($list_fields as $key=>$value){
584- if($key != 'SELECT')
585- $querypack .= $value.',';
586- }
587- $querypack=substr($querypack,0,-1);
588- $querypack .= " from download_available a, download_enable e ";
589- if ($protectedPost['onglet'] == 'MACH')
590- $querypack .= "where a.FILEID=e.FILEID and e.SERVER_ID is null ";
591- else
592- $querypack .= ", hardware h where a.FILEID=e.FILEID and h.id=e.group_id and e.SERVER_ID is not null ";
593- $tab_options['QUESTION']['SELECT']=$l->g(699);
594- $tab_options['FILTRE']=array('e.FILEID'=>'Timestamp','a.NAME'=>$l->g(49));
595
596- $result_exist=tab_req($table_name,$list_fields,$default_fields,$list_col_cant_del,$querypack,$form_name,100,$tab_options);
597+ if (!isset($nb_rule) or $nb_rule>0) {
598+ if ($protectedPost['onglet'] != 'SERV_GROUP'){
599+ $list_fields['PACK_LOC']='e.PACK_LOC';
600+ $list_fields['ACTIVE_ID']='e.ID';
601+ $list_fields['SELECT']='e.ID';
602+ }else{
603+ $list_fields['ACTIVE_ID']='e.FILEID';
604+ $list_fields['SELECT']='e.FILEID';
605+ }
606+ } $table_name="LIST_PACK_SEARCH";//INSERT INTO devices(HARDWARE_ID, NAME, IVALUE) VALUES('".$val["h.id"]."', 'DOWNLOAD', $packid)
607+ $default_fields= array('PACK_NAME'=>'PACK_NAME','PRIORITY'=>'PRIORITY','OS_NAME'=>'OS_NAME','SIZE'=>'SIZE','SELECT'=>'SELECT');
608+ $list_col_cant_del=array('PACK_NAME'=>'PACK_NAME','SELECT'=>'SELECT');
609+
610+ if ($protectedPost['onglet'] != 'SERV_GROUP'){
611+ $default_fields['PACK_LOC']='PACK_LOC';
612+ $list_col_cant_del['PACK_LOC']='PACK_LOC';
613+ }
614+
615+ $querypack = 'SELECT ';
616+ if ($protectedPost['onglet'] == 'SERV_GROUP')
617+ $querypack .= ' distinct ';
618+ foreach ($list_fields as $key=>$value){
619+ if($key != 'SELECT')
620+ $querypack .= $value.',';
621+ }
622+ $querypack=substr($querypack,0,-1);
623+ $querypack .= " from download_available a, download_enable e ";
624+ if ($protectedPost['onglet'] == 'MACH')
625+ $querypack .= "where a.FILEID=e.FILEID and e.SERVER_ID is null ";
626+ else
627+ $querypack .= ", hardware h where a.FILEID=e.FILEID and h.id=e.group_id and e.SERVER_ID is not null ";
628+ $tab_options['QUESTION']['SELECT']=$l->g(699);
629+ $tab_options['FILTRE']=array('e.FILEID'=>'Timestamp','a.NAME'=>$l->g(49));
630+
631+ $result_exist=tab_req($table_name,$list_fields,$default_fields,$list_col_cant_del,$querypack,$form_name,100,$tab_options);
632 }
633 echo "</td></tr></table>";
634 }
635
636=== modified file 'plugins/main_sections/ms_teledeploy/ms_tele_popup_active.php'
637--- plugins/main_sections/ms_teledeploy/ms_tele_popup_active.php 2010-12-14 13:24:50 +0000
638+++ plugins/main_sections/ms_teledeploy/ms_tele_popup_active.php 2011-01-02 18:01:25 +0000
639@@ -66,7 +66,7 @@
640 fclose( $fragOk );
641
642 if (! $fragOk or ! $httpsOk){
643- $error .= "<br>".$l->g(468)."<br>";
644+ $error .= "<br>".$l->g(468)."<br><br>";
645 $error .= "<input type='submit' name='YES' value='".$l->g(455)."'>&nbsp&nbsp&nbsp<input type='submit' name='NO' value='".$l->g(454)."'>";
646 }
647 if ($error != '')

Subscribers

People subscribed via source and target branches