Skip to content

Commit

Permalink
Merge pull request #66 from PluginsOCSInventory-NG/fixinstall
Browse files Browse the repository at this point in the history
Fix bugs
  • Loading branch information
gillesdubois authored Jun 17, 2020
2 parents e6043fb + adf095c commit 7e881d7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 38 deletions.
85 changes: 48 additions & 37 deletions cd_officepack/cd_officepack.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,52 @@
// 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;
}
print_item_header($l->g(23004));
if (!isset($protectedPost['SHOW']))
$protectedPost['SHOW'] = 'NOSHOW';
$form_name="officepack";
$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( $l-g(23005) => 'PRODUCT',
$l->g(23006) => 'OFFICEVERSION',
$l->g(23007) => 'TYPE',
$l->g(23008) => 'OFFICEKEY',
);
$list_col_cant_del=$list_fields;
$default_fields= $list_fields;
$sql=prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM officepack WHERE (hardware_id = $systemid)";
array_push($sql['ARG'],$systemid);
$tab_options['ARG_SQL']=$sql['ARG'];
$tab_options['ARG_SQL_COUNT']=$systemid;
ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del);
echo close_form();
if ($ajax){
ob_end_clean();
tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options);
ob_start();
}
if(AJAX) {
parse_str($protectedPost['ocs']['0'], $params);
$protectedPost+=$params;
ob_start();
$ajax = true;
} else {
$ajax=false;
}

print_item_header($l->g(23004));

if (!isset($protectedPost['SHOW'])) {
$protectedPost['SHOW'] = 'NOSHOW';
}

$form_name="officepack";
$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( $l->g(23005) => 'PRODUCT',
$l->g(23006) => 'OFFICEVERSION',
$l->g(23007) => 'TYPE',
$l->g(23008) => 'OFFICEKEY',
);

$list_col_cant_del=$list_fields;
$default_fields= $list_fields;

$sql=prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM officepack WHERE (hardware_id = $systemid)";
array_push($sql['ARG'],$systemid);

$tab_options['ARG_SQL']=$sql['ARG'];
$tab_options['ARG_SQL_COUNT']=$systemid;

ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del);

echo close_form();

if ($ajax) {
ob_end_clean();
tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options);
ob_start();
}
?>
2 changes: 1 addition & 1 deletion infos.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author" : ["Guillaume PROTET", "Gilles DUBOIS", "Stephane PAUTREL"],
"contributor" : [],
"supportedAgent" : ["Windows"],
"version" : "3.1.1",
"version" : "3.2",
"licence" : "GPLv2",
"description" : {
"fr" : "Remonte les clés Microsoft Office",
Expand Down

0 comments on commit 7e881d7

Please sign in to comment.