Révision cfe1a39e
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_client2_8_to_9.form.php | ||
---|---|---|
50 | 50 |
} |
51 | 51 |
} |
52 | 52 |
else { |
53 |
print "Aucun epack existant pour ce client ... mais peut etre qu'on peut le trouver quand meme ..."; |
|
53 |
//print "Aucun epack existant pour ce client ... mais peut etre qu'on peut le trouver quand meme ...";
|
|
54 | 54 |
$query_sc = "SELECT * FROM glpi_entities WHERE ID='" . $fk_entitee_enduser . "' AND parentID='" . $fk_entitee_client . "'"; |
55 | 55 |
$result_sc = $DB->query($query_sc); |
56 | 56 |
$data_sc = $DB->fetch_array($result_sc); |
57 |
print $query_sc; |
|
58 |
print "<br />"; |
|
57 |
// print $query_sc;
|
|
58 |
// print "<br />";
|
|
59 | 59 |
if(count($data_sc) > 1) { |
60 | 60 |
//On peut recoller les morceaux, les epacks 8.08 ne sont pas toujours rattaché au compte client ... |
61 |
print "on rattache"; |
|
61 |
// print "on rattache";
|
|
62 | 62 |
$query_c = "UPDATE glpi_plugin_anet_epacks SET FK_client='" . $fk_entitee_client . "' WHERE FK_enduser='" . $fk_entitee_enduser . "' AND FK_client='0'"; |
63 |
print $query_c; |
|
63 |
// print $query_c;
|
|
64 | 64 |
$result_c = $DB->query($query_c); |
65 | 65 |
$data_c = $DB->fetch_array($result_c); |
66 |
print "Actualisez la page pour appliquer le correctif en cours"; |
|
66 |
// print "Actualisez la page pour appliquer le correctif en cours";
|
|
67 | 67 |
} |
68 | 68 |
} |
69 | 69 |
|
... | ... | |
84 | 84 |
$code=$prefix . rand(1000,9999) . "-" . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . "-" . rand(1000,9999); |
85 | 85 |
$password=rand(1000,9999) . "-" . rand(1000,9999); |
86 | 86 |
$query="INSERT into glpi_plugin_anet_epacks(creation_date,expiration_date,code,password) values( '0000-00-00' ,'2010-12-31','$code','$password');"; |
87 |
print $query; |
|
87 |
// print $query;
|
|
88 | 88 |
$DB->query($query);// or die($DB->error()); |
89 | 89 |
} |
90 | 90 |
exit; |
... | ... | |
113 | 113 |
if($_POST['clientdirect'] == 1) { |
114 | 114 |
$addquery3 = ",FK_activation='$fk_entitee_client',FK_client='$fk_entitee_client',FK_enduser='$fk_entitee_enduser'"; |
115 | 115 |
} |
116 |
$query3="UPDATE glpi_plugin_anet_epacks set FK_clientderyxeo='$fk_entitee',creation_date='" . date("Y-m-d") . "'" . $addquery3 . " WHERE ID='" . $data['ID'] . "';"; |
|
116 |
$query3="UPDATE glpi_plugin_anet_epacks set FK_clientderyxeo='$fk_entitee_client',creation_date='" . date("Y-m-d") . "'" . $addquery3 . " WHERE ID='" . $data['ID'] . "';"; |
|
117 |
|
|
117 | 118 |
$DB->query($query3) or die($DB->error()); |
118 | 119 |
|
119 | 120 |
//On créé un fichier local pour archive ... |
Formats disponibles : Unified diff