Ejemplo n.º 1
0
    }
    $from_email = $conf['from_email'];
    $subject = $vocables["{$lang}"]["subject_download"];
    $entetedate = "Date: " . date("l j F Y, G:i +0200") . "\n";
    $entetemail = "From: {$from_email} \n";
    $entetemail .= "Cc: \n";
    $entetemail .= "Bcc: \n";
    $entetemail .= "Reply-To: " . $conf['from_email'] . "\n";
    $entetemail .= "X-Mailer: PHP \n";
    $entetemail .= "Content-Type: text/html; charset=\"ISO-8859-1\\ \n";
    $entetemail .= "Date: {$entetedate}";
    $body = "<center><img src='" . $conf['img_for_email'] . "'/></center><br/><a href=\"" . $conf['url_redirection_download'] . "after_auth.php?id=" . $_GET['id'] . "&psw=" . trim($password) . "&folder=" . $folder . "&iv=" . $_GET['iv'] . "&key=" . $_GET['key'] . "&mail=" . $address . "\">" . $vocables["{$lang}"]['attachment_mail'] . "</a>";
    $body .= "<br/><table cellspacing='0' cellpadding='0'><tr>";
    $body .= "<td align='left'  width='100%'>( " . $vocables["{$lang}"]["attachment_available"] . " ";
    foreach ($file_list as $key2 => $value2) {
        $body .= raccourcirChaine($value2, 40) . " ";
    }
    $body .= ")</td>";
    if ($i < count($mails)) {
        mail($address, utf8_decode($subject), utf8_decode($body), $entetemail);
        echo "0";
        exit;
    } else {
        echo "1";
        exit;
    }
    echo "1";
}
?>

Ejemplo n.º 2
0
    function raccourcirChaine($chaine, $tailleMax)
  {
    
    $positionDernierEspace = 0;
    if( strlen($chaine) >= $tailleMax )
    {
      $chaine = substr($chaine,0,$tailleMax);
      $positionDernierEspace = strrpos($chaine,' ');
      $chaine = substr($chaine,0,$positionDernierEspace);
    }
    return $chaine;
  }
    

$facture= $api->API_Facture_Recupere_parId($id_facture);
    $date_facturation_commande = raccourcirChaine($facture->date_creation_facture, 11);
    $id_compte = (int)$facture->id_compte;
$compte=$api->API_Compte_Recuperer($id_compte);
    $titre_facturation = $compte->titre_facturation;
    $prenom_facturation = $compte->prenom_facturation;
    $nom_facturation = $compte->nom_facturation;
    $adresse_facturation = $compte->adresse_facturation;
    $codepostal_facturation = $compte->codepostal_facturation;
    $ville_facturation = $compte->ville_facturation;
    
    

ob_start();
?>

Ejemplo n.º 3
0
$var = $tmp_var . " | " . $folder . " | " . $frommail . " | " . $htpasswd . "\n";
fwrite($handle3, $var);
fclose($handle3);
//Listing des fichiers dans un tableau
$c_file = 0;
$dir = opendir($conf['absolute_path_download'] . "files/{$folder}/");
while ($file = readdir($dir)) {
    if ($file != '.' && $file != '..' && $file != '...' && $file != 'index.php' && !is_dir($conf['absolute_path_download'] . "files/{$folder}/" . $file) && $file != 'all_files_list.zip' && $file != '.htaccess' && $file != '.htpasswd' && $file != '.sender' && $file != '.messenger' && $file != 'mail.json') {
        $file_list[$c_file] = $file;
        $c_file++;
    }
}
$file_listing = null;
if ($c_file > 0) {
    foreach ($file_list as $key2 => $value2) {
        $file_listing .= raccourcirChaine($value2, 40) . " ";
    }
}
echo $conf['url_redirection_download'] . "?folder=" . $tmp_var . "&key=" . $key . "&iv=" . $iv . "|" . $file_listing;
//if we have a old sender, we sent mail with attachment
if (file_exists($conf['absolute_path_download'] . "files/" . $folder . "/.sender")) {
    $frommail = htmlspecialchars($_POST['fm']);
    $lang = $_POST['l'];
    $sender = file_get_contents($conf['absolute_path_download'] . "files/" . $folder . "/.sender");
    $subject = json_decode(file_get_contents($conf['absolute_path_download'] . "files/{$folder}/mail.json"), true);
    $subject = $subject['subject'];
    // finish by sending email to user with license key in it
    $subject = "Re : " . $subject;
    $entetedate = "Date: " . date("l j F Y, G:i +0200") . "\n";
    $entetemail = "From: {$frommail} \n";
    $entetemail .= "Cc: \n";
Ejemplo n.º 4
0
 
 <table>
      <thead>
         <tr>
             <td>Date</td>
             <td>Type</td>
             <td>Variation stockVente</td>
             <td>Variation stockVente previsionnel</td>
             
          </tr>   
      </thead>
      <tbody><?php 
         foreach($variationStocks as $variationStock) 
         { 
            ?><tr>
                <?php  $date=raccourcirChaine($variationStock->date_evnt_general, 11); ?>
                
                <td><?php echo $date;?></td>
                <td><?php echo $variationStock->evenement;?></td>
                <td><?php echo $variationStock->StockVente;?></td>
                <td><?php echo $variationStock->StockVentePrev;?></td>
             </tr><?php
         }
     ?></tbody>
 </table> 
<?php    
}
?>

    </body>
</html>
Ejemplo n.º 5
0
         <td>Produit</td>
         <td>Date Début</td>
         <td>Dernier Evênement</td>
         <td>Date Fin</td>
         <td>Semer</td>
         <td>Terminer</td>
         <td>Action</td>
     </tr>
 </thead>
 <tbody><?php
    foreach ($bdd->Cycle_Lister($tri_id_produit, $categorie, $date_debut_cycle, $est_terminer) as $cyclei)
    {
        ?><tr><?php
            $date_debut_cycle=raccourcirChaine($cyclei->date_debut_cycle, 11);
            $date_dernier_evnt=raccourcirChaine($cyclei->date_dernier_evnt, 11);
            $date_fin_cycle=raccourcirChaine($cyclei->date_fin_cycle, 11); ?>
            
            <td><?php echo $cyclei->id_cycle;?></td>
            <td><?php echo $cyclei->categorie.' - '.$cyclei->produit;?></td>
            <td><?php echo  $date_debut_cycle;?></td>
            <td><?php echo $date_dernier_evnt;?></td>
            <td><?php echo $date_fin_cycle;?></td>
            <td><?php echo $cyclei->est_semer ? 'Oui' : 'Non';?></td>
            <td><?php echo $cyclei->est_terminer ? 'Oui' : 'Non';?></td>
            <td>
                <a href="detail_cycle.php?id_cycle=<?php echo $cyclei->id_cycle;?>">+Details</a><?php
                if($cyclei->est_terminer!=true)
                {
                    if ($cyclei->est_semer==false)
                    {
                        ?><a href="SaisieEvnt.php?evnt_cycle=<?php echo $cyclei->id_cycle;?>&Freeze_evnt_cycle=1&evnt_typeevnt=4&Freeze_evnt_typeevnt=1">+Semis</a><?php