Projet

Général

Profil

Révision 3e3ac5b4

Voir les différences:

plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_activated.form.php
52 52
$odf->setVars('date', strftime("%A %e %B %Y"),'true', 'UTF-8');
53 53

  
54 54
//Les coordonnées du client de ryxeo
55
$odf->setVars('correspondant', utf8_decode($data['g2name']));
56
$odf->setVars('adresse', utf8_decode($data['g2daddress']));
55
$odf->setVars('correspondant', $data['g2name'], true, 'UTF-8');
56
$odf->setVars('adresse', $data['g2daddress'], true, 'UTF-8');
57 57
$odf->setVars('cp', $data['g2dpostcode']);
58
$odf->setVars('ville', utf8_decode($data['g2dtown']));
58
$odf->setVars('ville', $data['g2dtown'], true, 'UTF-8');
59 59

  
60
$odf->setVars('client', utf8_decode($data['g3name']));
61
$odf->setVars('clientadresse', utf8_decode($data['g3daddress']));
60
$odf->setVars('client', $data['g3name'], true, 'UTF-8');
61
$odf->setVars('clientadresse', $data['g3daddress'], true, 'UTF-8');
62 62
$odf->setVars('clientcp', $data['g3dpostcode']);
63
$odf->setVars('clientville', utf8_decode($data['g3dtown']));
63
$odf->setVars('clientville', $data['g3dtown'], true, 'UTF-8');
64 64

  
65
$odf->setVars('clientfinal', utf8_decode($data['g4name']));
66
$odf->setVars('clientfinaladresse', utf8_decode($data['g4daddress']));
65
$odf->setVars('clientfinal', $data['g4name'], true, 'UTF-8');
66
$odf->setVars('clientfinaladresse', $data['g4daddress'], true, 'UTF-8');
67 67
$odf->setVars('clientfinalcp', $data['g4dpostcode']);
68
$odf->setVars('clientfinalville', utf8_decode($data['g4dtown']));
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', utf8_decode("ABE10-" . $data['code']));
71
  $odf->setVars('cname', "ABE10-" . $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);
......
77 77
  //print_r($data2);
78 78
  //exit;
79 79

  
80
  $odf->setVars('globalcname', utf8_decode($data2['name']));
80
  $odf->setVars('globalcname', $data2['name'], true, 'UTF-8');
81 81

  
82
  $odf->setVars('epack', utf8_decode($data['code']));
82
  $odf->setVars('epack', $data['code'], true, 'UTF-8');
83 83
  setlocale(LC_TIME, "fr_FR");
84 84
  $timestamp = strtotime($_GET['date']);
85 85
  $odf->setVars('datedebut', strftime("%A %e %B %Y",$timestamp),'true', 'UTF-8');
......
91 91
    //a faire / décider 
92 92
  }
93 93

  
94
  $odf->setVars('correspondantadresse', utf8_decode($data['g2daddress']));
94
  $odf->setVars('correspondantadresse', $data['g2daddress'], true, 'UTF-8');
95 95
  $odf->setVars('correspondantcp', $data['g2dpostcode']);
96
  $odf->setVars('correspondantville', utf8_decode($data['g2dtown']));
96
  $odf->setVars('correspondantville', $data['g2dtown'], true, 'UTF-8');
97 97

  
98
  $odf->setVars('correspondanttype', utf8_decode("____________________"));
99
  $odf->setVars('correspondantcapital', utf8_decode("____________________"));
100
  $odf->setVars('correspondantrcs', utf8_decode("____________________"));
101
  $odf->setVars('correspondantsiret', utf8_decode("____________________"));
102
  $odf->setVars('correspondantcontact', utf8_decode("____________________"));
98
  $odf->setVars('correspondanttype', "____________________", true, 'UTF-8');
99
  $odf->setVars('correspondantcapital', "____________________", true, 'UTF-8');
100
  $odf->setVars('correspondantrcs', "____________________", true, 'UTF-8');
101
  $odf->setVars('correspondantsiret', "____________________", true, 'UTF-8');
102
  $odf->setVars('correspondantcontact', "____________________", true, 'UTF-8');
103 103

  
104 104

  
105 105
 }
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_client2.form.php
78 78
$odf->setVars('password', $data['password']);
79 79

  
80 80
setlocale(LC_TIME, "fr_FR");
81
$odf->setVars('date', strftime("%A %e %B %Y"));
81
$odf->setVars('date', strftime("%A %e %B %Y"), true, 'UTF-8');
82 82

  
83 83
$query2="SELECT * FROM glpi_entities, glpi_entities_data WHERE glpi_entities.ID=FK_entities AND glpi_entities.ID='$fk_entitee';";
84 84
//print $query2;
......
86 86
$result2 = $DB->query($query2);
87 87
$data2=$DB->fetch_array($result2);
88 88

  
89
$odf->setVars('correspondant', utf8_decode($data2['name']));
90
$odf->setVars('adresse', utf8_decode($data2['address']));
89
$odf->setVars('correspondant', $data2['name'], true, 'UTF-8');
90
$odf->setVars('adresse', $data2['address'], true, 'UTF-8');
91 91
$odf->setVars('cp', $data2['postcode']);
92
$odf->setVars('ville', utf8_decode($data2['town']));
92
$odf->setVars('ville', $data2['town'], true, 'UTF-8');
93 93

  
94 94
//On "grille" le epack pour eviter de l'affecter a qqn d'autre ... cas particulier du client direct
95 95
if($_POST['clientdirect'] == 1) {
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_maintenance3.form.php
49 49
  $odf = new odf("abuledu" . $niveau . ".odt");
50 50
  setlocale(LC_TIME, "fr_FR");
51 51
  error_reporting(E_ALL);
52
  $odf->setVars('date', strftime("%A %e %B %Y"));
52
  $odf->setVars('date', strftime("%A %e %B %Y"), true, 'UTF-8');
53 53

  
54 54
  //Cas spécial des contrats de partenaires ENR
55 55
  if($_GET['niveau'] == "maintenance-enr-partenaire") {
56 56

  
57 57
  }
58 58
  else {
59
    $odf->setVars('datedebut', strftime("%A %e %B %Y"));
59
    $odf->setVars('datedebut', strftime("%A %e %B %Y"), true, 'UTF-8');
60 60
    //$odf->setVars('datefin', strftime("%A %e %B %Y", mktime(0,0,0,date("n")-1,date("j"),date("Y")+3)));
61 61

  
62
    $odf->setVars('epacks', utf8_decode($epackstxt));
62
    $odf->setVars('epacks', $epackstxt, true, 'UTF-8');
63 63
  }
64 64

  
65 65
  $query2="SELECT * FROM glpi_entities, glpi_entities_data WHERE glpi_entities.ID=FK_entities AND glpi_entities.ID='$fk_entitee';";
......
68 68
  $result2 = $DB->query($query2);
69 69
  $data2=$DB->fetch_array($result2);
70 70
  
71
  $odf->setVars('cname',  utf8_decode($cname));
71
  $odf->setVars('cname',  $cname, true, 'UTF-8');
72 72
  
73
  $odf->setVars('client', utf8_decode($data2['name']));
74
  $odf->setVars('clienttype', utf8_decode("____________________"));
75
  $odf->setVars('clientcapital', utf8_decode("____________________"));
76
  $odf->setVars('clientrcs', utf8_decode("____________________"));
77
  $odf->setVars('clientsiret', utf8_decode("____________________"));
78
  $odf->setVars('clientadresse', utf8_decode($data2['address']));
73
  $odf->setVars('client', $data2['name'], true, 'UTF-8');
74
  $odf->setVars('clienttype', "____________________", true, 'UTF-8');
75
  $odf->setVars('clientcapital', "____________________", true, 'UTF-8');
76
  $odf->setVars('clientrcs', "____________________", true, 'UTF-8');
77
  $odf->setVars('clientsiret', "____________________", true, 'UTF-8');
78
  $odf->setVars('clientadresse', $data2['address'], true, 'UTF-8');
79 79
  $odf->setVars('clientcp', $data2['postcode']);
80
  $odf->setVars('clientville', utf8_decode($data2['town']));
81
  $odf->setVars('clientcontact', utf8_decode("____________________"));
80
  $odf->setVars('clientville', $data2['town'], true, 'UTF-8');
81
  $odf->setVars('clientcontact', "____________________", true, 'UTF-8');
82 82
  
83 83
  //On créé un fichier local pour archive ...
84 84
  $fichier = "contrats/" . date("Y-m-d") . "-abuledu-maintenance-" . $cname . ".odt";
plugins/anet_epacks/front/plugin_anet_epacks.generate_odt_revendeur2.form.php
36 36

  
37 37

  
38 38
setlocale(LC_TIME, "fr_FR");
39
$odf->setVars('date', strftime("%A %e %B %Y"));
39
$odf->setVars('date', strftime("%A %e %B %Y"), true, 'UTF-8');
40 40

  
41 41
//Les coordonnées du client
42 42
$fk_entitee = $_POST['FK_entitee'];
......
46 46
$result2 = $DB->query($query2);
47 47
$data2=$DB->fetch_array($result2);
48 48

  
49
$odf->setVars('correspondant', utf8_decode($data2['name']));
50
$odf->setVars('adresse', utf8_decode($data2['address']));
49
$odf->setVars('correspondant', $data2['name'], true, 'UTF-8');
50
$odf->setVars('adresse', $data2['address'], true, 'UTF-8');
51 51
$odf->setVars('cp', $data2['postcode']);
52
$odf->setVars('ville', utf8_decode($data2['town']));
52
$odf->setVars('ville', $data2['town'], true, 'UTF-8');
53 53

  
54 54
//On "grille" le epack pour eviter de l'affecter a qqn d'autre
55 55
$query3="UPDATE glpi_plugin_anet_epacks set FK_clientderyxeo='$fk_entitee',creation_date='" . date("Y-m-d") . "' WHERE ID='" . $data['ID'] . "';";

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux