Révision 7c20505e
config/config_db.php | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
class DB extends DBmysql { |
3 |
var $dbhost = '192.168.100.1';
|
|
3 |
var $dbhost = 'localhost';
|
|
4 | 4 |
var $dbuser = 'glpiu'; |
5 | 5 |
var $dbpassword = 'F2D6nxPRA6HC'; |
6 | 6 |
var $dbdefault = 'glpi'; |
plugins/anet_epacks/front/plugin_anet_epacks.config.form.php | ||
---|---|---|
47 | 47 |
|
48 | 48 |
commonFooter(); |
49 | 49 |
?> |
50 |
|
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_client2.form.php | ||
---|---|---|
57 | 57 |
|
58 | 58 |
if($data['code'] == "") { |
59 | 59 |
print "Erreur, il n'y a plus de pack disponible ... "; |
60 |
print "On vient d'en créer un nouveau, re-essayez ...";
|
|
60 |
print "On vient d'en créer un nouveau, actualisez la page pour l'utiliser ...";
|
|
61 | 61 |
global $DB; |
62 | 62 |
$nb_packs = 1; |
63 | 63 |
$prefix = "ABE11-01-"; |
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_revendeur2.form.php | ||
---|---|---|
21 | 21 |
global $DB; |
22 | 22 |
|
23 | 23 |
//Un pack non attribué |
24 |
$query="SELECT * FROM glpi_plugin_anet_epacks WHERE FK_clientderyxeo='0' AND creation_date='0000-00-00' AND code LIKE 'ENR09%' LIMIT 1;";
|
|
24 |
$query="SELECT * FROM glpi_plugin_anet_epacks WHERE FK_clientderyxeo='0' AND creation_date='0000-00-00' AND code LIKE 'RVD11%' LIMIT 1;";
|
|
25 | 25 |
//$DB->query($query) or die($DB->error()); |
26 | 26 |
$result = $DB->query($query); |
27 | 27 |
$data=$DB->fetch_array($result); |
28 | 28 |
|
29 | 29 |
if($data['code'] == "") { |
30 | 30 |
print "Erreur, il n'y a plus de pack disponible ... "; |
31 |
print "On vient d'en créer un nouveau, actualisez la page pour l'utiliser ..."; |
|
32 |
$nb_packs = 1; |
|
33 |
$prefix = "RVD11-01-"; |
|
34 |
for($i = 0; $i < $nb_packs; $i++) { |
|
35 |
srand(); |
|
36 |
$code=$prefix . rand(1000,9999) . "-" . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . "-" . rand(1000,9999); |
|
37 |
$password=rand(1000,9999) . "-" . rand(1000,9999); |
|
38 |
$query="INSERT into glpi_plugin_anet_epacks(creation_date,expiration_date,code,password) values( '0000-00-00' ,'2011-12-31','$code','$password');"; |
|
39 |
print $query; |
|
40 |
$DB->query($query);// or die($DB->error()); |
|
41 |
} |
|
31 | 42 |
exit; |
32 |
}
|
|
43 |
} |
|
33 | 44 |
|
34 | 45 |
$odf->setVars('code', $data['code']); |
35 | 46 |
$odf->setVars('password', $data['password']); |
plugins/anet_migration/front/plugin_anet_migration.index.php | ||
---|---|---|
59 | 59 |
<td>" . $data2['code'] . "</td> |
60 | 60 |
<td>" . $data2['ladate'] . "</td> |
61 | 61 |
<td align=\"left\">" . $data2['etape'] . "</td> |
62 |
<td>" . $data2['message'] . "</td> |
|
62 |
<td align=\"left\">" . $data2['message'] . "</td>
|
|
63 | 63 |
</tr>\n"; |
64 | 64 |
} |
65 | 65 |
print local_make_array_footer(); |
Formats disponibles : Unified diff