Projet

Général

Profil

Révision fa2eb127

Voir les différences:

plugins/anet_epacks/front/plugin_anet_epacks.config.form.php
38 38
  srand();
39 39
  $code=$prefix . rand(1000,9999) . "-" . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . "-" . rand(1000,9999);
40 40
  $password=rand(1000,9999) . "-" . rand(1000,9999);
41
  $query="INSERT into glpi_plugin_anet_epacks values('','','','2010-12-31','$code','$password',0,0,0,0);";
41
  $query="INSERT into glpi_plugin_anet_epacks values('','','','2011-12-31','$code','$password',0,0,0,0);";
42 42
  //print "<p>" . $query . "</p>";
43 43
  //exit;
44 44
  $DB->query($query);// or die($DB->error());
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_activated.form.php
68 68
$odf->setVars('clientfinalville', $data['g4dtown'], true, 'UTF-8');
69 69

  
70 70
if(preg_match("/avenant_contrat_partenaire/i",$_GET['mode'])) {
71
  $odf->setVars('cname', "ABE10-" . $data['code'], true, 'UTF-8');
71
  $odf->setVars('cname', "ABE11-" . $data['code'], true, 'UTF-8');
72 72

  
73 73
  $query2 = "SELECT * FROM glpi_contracts WHERE FK_entities='" . $data['g2id'] . "' AND name LIKE '%-ENR20'";
74 74
  $result2 = $DB->query($query2);
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_client2.form.php
50 50
   $fk_entitee = $_POST['FK_entitee'];
51 51

  
52 52
  //Un pack non attribué
53
  $query="SELECT * FROM glpi_plugin_anet_epacks WHERE FK_clientderyxeo='0' AND creation_date='0000-00-00' AND code LIKE 'ABE10%' LIMIT 1;";
53
  $query="SELECT * FROM glpi_plugin_anet_epacks WHERE FK_clientderyxeo='0' AND creation_date='0000-00-00' AND code LIKE 'ABE11%' LIMIT 1;";
54 54
  //$DB->query($query) or die($DB->error());
55 55
  $result = $DB->query($query);
56 56
  $data=$DB->fetch_array($result);
......
60 60
    print "On vient d'en créer un nouveau, re-essayez ...";
61 61
    global $DB;
62 62
    $nb_packs = 1;
63
    $prefix = "ABE10-01-";
63
    $prefix = "ABE11-01-";
64 64
    for($i = 0; $i < $nb_packs; $i++) {
65 65
      srand();
66 66
      $code=$prefix . rand(1000,9999) . "-" . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . "-" . rand(1000,9999);
67 67
      $password=rand(1000,9999) . "-" . rand(1000,9999);
68
      $query="INSERT into glpi_plugin_anet_epacks(creation_date,expiration_date,code,password) values( '0000-00-00' ,'2010-12-31','$code','$password');";
68
      $query="INSERT into glpi_plugin_anet_epacks(creation_date,expiration_date,code,password) values( '0000-00-00' ,'2011-12-31','$code','$password');";
69 69
      print $query;
70 70
      $DB->query($query);// or die($DB->error());
71 71
    }
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_client2_8_to_9.form.php
71 71
 }
72 72

  
73 73
//Un pack non attribué
74
$query="SELECT * FROM glpi_plugin_anet_epacks WHERE FK_clientderyxeo='0' AND creation_date='0000-00-00' AND code LIKE 'ABE10%' LIMIT 1;";
74
$query="SELECT * FROM glpi_plugin_anet_epacks WHERE FK_clientderyxeo='0' AND creation_date='0000-00-00' AND code LIKE 'ABE11%' LIMIT 1;";
75 75
//$DB->query($query) or die($DB->error());
76 76
$result = $DB->query($query);
77 77
$data=$DB->fetch_array($result);
......
81 81
  print "<p>Génération automatique d'un nouveau epack, actualisez la page et tout devrait marcher ...</p>";
82 82
  global $DB;
83 83
  $nb_packs = 1;
84
  $prefix = "ABE10-01-";
84
  $prefix = "ABE11-01-";
85 85
  for($i = 0; $i < $nb_packs; $i++) {
86 86
    srand();
87 87
    $code=$prefix . rand(1000,9999) . "-" . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . "-" . rand(1000,9999);
88 88
    $password=rand(1000,9999) . "-" . rand(1000,9999);
89
    $query="INSERT into glpi_plugin_anet_epacks(creation_date,expiration_date,code,password) values( '0000-00-00' ,'2010-12-31','$code','$password');";
89
    $query="INSERT into glpi_plugin_anet_epacks(creation_date,expiration_date,code,password) values( '0000-00-00' ,'2011-12-31','$code','$password');";
90 90
    //    print $query;
91 91
    $DB->query($query);// or die($DB->error());
92 92
  }

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux