<table width="<?php echo $this->etude['type'] == "pdf" ? '100%' : '80%'; ?> " align="center"> <tr> <td style="padding-top: 20px;">A valoir en votre aimable règlement de <?php echo $totalTtc; ?> <?php echo $totalTtc > 1 ? 'Euros' : 'Euro'; ?> .</td> </tr> <tr> <td style="padding-left: 150px;"><?php echo int2str($totalTtc); ?> .</td> </tr> <tr> <td style="padding-top: 20px;">Par chèque à l’ordre de <?php echo $this->setting1eachtimeDocument; ?> ,</td> </tr> <tr> <td>Ou par virement bancaire aux coordonnées suivantes :</td> </tr> <tr> <td><?php
$pdf->addSiege("Siege Social:", "12bis Av. Tarak Ibn Ziad.\n" . "El Menzah V\n" . "2037 Ariana - Tunisie", "TEL"); //$pdf->fact_dev( "Constrat ", "TEMPO" ); $pdf->cont_loc("CONTRAT DE LOCATION\n" . "DE\n" . "MATERIEL MEDICAL {$ref}"); $pdf->clausecontrattxt(">> Clauses du Contrat au Verso >>"); //$pdf->addDate( "$today"); $pdf->Image('img/Sigle.jpg', 27, 5, -680); $pdf->Image('img/LOGO.jpg', 10, 5, -680); //$pdf->addClient("CL01"); //$pdf->addPageNumber("1"); $pdf->addClientAdresse("Nom : {$nom_client} \nAdresse : {$adresse_client} \nTel : {$tel_client} \nGSM : {$gsm_client} \nCIN N : {$cin_client} - Tunis,le : {$date_cin}"); $pdf->addbenificiaire("M/Mme : {$nom_ben}\nAdresse : {$adresse_ben}\nTel : {$tel_ben}\nCIN N : {$cin_ben}"); $pdf->totalettctva($total_htva, $total_tva, $total_ttc, $total_caution); //$accompte=300; $pdf->Accompte($accompte); $pdf->transport($transport); $let = strtoupper(int2str($total_ttc)); $pdf->contratenttelettre("{$let}"); $cols = array("Ord." => 11, "DESIGNATION" => 70, "Periode" => 20, "Qte" => 9, "P.U. HT" => 25, "MT H.T." => 27, "Caution/Unite" => 28); $pdf->addCols2($cols); $cols = array("Ord." => "L", "DESIGNATION" => "L", "Periode" => "C", "Qte" => "C", "P.U. HT" => "R", "MT H.T." => "R", "Caution/Unite" => "C"); $y = 109; $req2 = "select * from ligne_commande where id_commande ={$id}"; $oPDOStatements2 = $connect->query($req2); // Le résultat est un objet de la classe PDOStatement $oPDOStatements2->setFetchMode(PDO::FETCH_ASSOC); //retourne true on success, false otherwise. $k = 0; $nbPage = 1; while ($data = $oPDOStatements2->fetch()) { $id_produit = $data['id_produit']; $id_lit = $data['id_lit'];
function int2str($a) { $millimes = substr(number_format($a, 3, ',', ' '), -3); $convert = explode('.', $a); if (isset($convert[1]) && $convert[1] != '') { return int2str($convert[0]) . ' Dinars' . ' et ' . $millimes . ' Millimes'; } if ($a < 0) { return 'moins ' . int2str(-$a); } if ($a < 17) { switch ($a) { case 0: return 'zero'; case 1: return 'un'; case 2: return 'deux'; case 3: return 'trois'; case 4: return 'quatre'; case 5: return 'cinq'; case 6: return 'six'; case 7: return 'sept'; case 8: return 'huit'; case 9: return 'neuf'; case 10: return 'dix'; case 11: return 'onze'; case 12: return 'douze'; case 13: return 'treize'; case 14: return 'quatorze'; case 15: return 'quinze'; case 16: return 'seize'; } } else { if ($a < 20) { return 'dix-' . int2str($a - 10); } else { if ($a < 100) { if ($a % 10 == 0) { switch ($a) { case 20: return 'vingt'; case 30: return 'trente'; case 40: return 'quarante'; case 50: return 'cinquante'; case 60: return 'soixante'; case 70: return 'soixante-dix'; case 80: return 'quatre-vingt'; case 90: return 'quatre-vingt-dix'; } } elseif (substr($a, -1) == 1) { if ((int) ($a / 10) * 10 < 70) { return int2str((int) ($a / 10) * 10) . '-et-un'; } elseif ($a == 71) { return 'soixante-et-onze'; } elseif ($a == 81) { return 'quatre-vingt-un'; } elseif ($a == 91) { return 'quatre-vingt-onze'; } } elseif ($a < 70) { return int2str($a - $a % 10) . '-' . int2str($a % 10); } elseif ($a < 80) { return int2str(60) . '-' . int2str($a % 20); } else { return int2str(80) . '-' . int2str($a % 20); } } else { if ($a == 100) { return 'cent'; } else { if ($a < 200) { return int2str(100) . ' ' . int2str($a % 100); } else { if ($a < 1000) { return int2str((int) ($a / 100)) . ' ' . int2str(100) . ' ' . int2str($a % 100); } else { if ($a == 1000) { return 'mille'; } else { if ($a < 2000) { return int2str(1000) . ' ' . int2str($a % 1000) . ' '; } else { if ($a < 1000000) { return int2str((int) ($a / 1000)) . ' ' . int2str(1000) . ' ' . int2str($a % 1000); } else { if ($a == 1000000) { return 'millions'; } else { if ($a < 2000000) { return int2str(1000000) . ' ' . int2str($a % 1000000) . ' '; } else { if ($a < 1000000000) { return int2str((int) ($a / 1000000)) . ' ' . int2str(1000000) . ' ' . int2str($a % 1000000); } } } } } } } } } } } } }
echo $this->setting1eachtimeDocument; ?> </strong> dans le cadre de la présente convention est fixé d’un commun accord à <?php echo strip_tags(trim($this->etude['budget_fsi']), '<strong><u><ol><li><ul><sup><em><h1><h2><h3><h4><h5><h6>'); ?> Euros Hors Taxes (<?php echo int2str($this->etude['budget_fsi']); ?> Euros Hors Taxes) correspondant à <?php echo strip_tags(trim($this->etude['je']), '<strong><u><ol><li><ul><sup><em><h1><h2><h3><h4><h5><h6>'); ?> (<?php echo int2str($this->etude['je']); ?> ) Jour(s)-Etude, conformément à la législation applicable aux Junior-Entreprises.</p> </td> </tr> <tr> <td> <p> De plus, les frais engagés pour la réalisation de l’étude sont à la charge du commanditaire sous réserve de la présentation des justificatifs correspondants. Les frais de déplacement seront en particulier remboursés sur la base du kilomètre fiscal fixé à 0.46 Euros Hors Taxes. </p> </td>
function Print_Flop() { global $STATIC; $szHtml = ''; $gameinfo = mysql_fetch_assoc(MQuery("SELECT name,small_blind,big_blind,last_win,round FROM mpp_games WHERE id='" . GAMEID . "';")); $szHtml .= "Game name: " . $gameinfo['name'] . "<br>\n"; $szHtml .= "Round: " . $gameinfo['round'] . "<br>\n"; $szHtml .= "SB: € " . int2str($gameinfo['small_blind']) . ", BB: € " . int2str($gameinfo['big_blind']) . "<br>\n<br>\n\n"; $poker = new PokerTexasHoldem(); if ($gameinfo['last_win']) { $x = explode(":", $gameinfo['last_win'], 2); $hand = $poker->make_readable_hand($x[1]); $uids = explode(",", $x[0]); $users = array(); foreach ($uids as $uid) { $q = MQuery("SELECT name FROM mpp_players WHERE uid='" . $uid . "' AND gid='" . GAMEID . "';"); if (mysql_num_rows($q)) { $users[] = mysql_result($q, 0, 'name'); } } $szHtml .= "<font color=\"lime\">Last win: [<b>" . implode(",", $users) . "</b>], with [<b>" . $hand . "</b>]</font><br/>\n"; } $szHtml .= "PUBLIC CARDS:<br>"; $a = MQuery("SELECT * FROM mpp_cards WHERE gid='" . GAMEID . "' AND uid=99;"); $arrOpenCards = array(); while ($b = mysql_fetch_assoc($a)) { $arrOpenCards[] = $b['card']; } if (mysql_num_rows($a)) { $szHtml .= $poker->print_cards_with_imgs($arrOpenCards) . "<br/>\n<br/>\n"; } else { $szHtml .= "No Flop Yet<br/>\n<br/>\n"; } if (READY_GAME) { $utq = MQuery("SELECT name FROM mpp_players WHERE gid='" . GAMEID . "' AND uid='" . UID_AAN_DE_BEURT . "';"); if (!mysql_num_rows($utq)) { $userturn = '<span style="color:#f00;">! ! E R R O R ! !</span>'; } else { $userturn = '<u>' . mysql_result($utq, 0, 'name') . '</u>'; } $szHtml .= "It's <b title=\"UID = " . UID_AAN_DE_BEURT . "\">" . $userturn . "</b>'s turn!<br/>\n<br/>\n"; $bets = get_bets(); $szHtml .= "MONEY TO CALL: € " . int2str(max($bets)) . "<br>\n"; $szHtml .= "MONEY IN POT: € " . int2str(array_sum($bets)) . "<br/>\n"; } $szHtml .= '<br/>' . EOL . '<a href="?action=logout">logout</a>'; return $szHtml; }
function int2str($a) { $chiffre = explode('.', $a); if (isset($chiffre[1]) && $chiffre[1] != '') { return int2str($chiffre[0]) . ' et ' . int2str($chiffre[1]) . ' centimes'; } $chiffre2 = explode(',', $a); if (isset($chiffre2[1]) && $chiffre2[1] != '') { return int2str($chiffre2[0]) . ' et ' . int2str($chiffre2[1]) . ' centimes'; } if ($a < 0) { return 'moins ' . int2str(-$a); } if ($a < 17) { switch ($a) { case 0: return 'zero'; case 1: return 'un'; case 2: return 'deux'; case 3: return 'trois'; case 4: return 'quatre'; case 5: return 'cinq'; case 6: return 'six'; case 7: return 'sept'; case 8: return 'huit'; case 9: return 'neuf'; case 10: return 'dix'; case 11: return 'onze'; case 12: return 'douze'; case 13: return 'treize'; case 14: return 'quatorze'; case 15: return 'quinze'; case 16: return 'seize'; } } else { if ($a < 20) { return 'dix-' . int2str($a - 10); } else { if ($a < 100) { if ($a % 10 == 0) { switch ($a) { case 20: return 'vingt'; case 30: return 'trente'; case 40: return 'quarante'; case 50: return 'cinquante'; case 60: return 'soixante'; case 70: return 'soixante-dix'; case 80: return 'quatre-vingt'; case 90: return 'quatre-vingt-dix'; } } else { if ($a < 70) { return int2str($a - $a % 10) . '-' . int2str($a % 10); } else { if ($a < 80) { return int2str(60) . '-' . int2str($a % 20); } else { return int2str(80) . '-' . int2str($a % 20); } } } } else { if ($a == 100) { return 'cent'; } else { if ($a < 200) { return int2str(100) . ($a % 100 != 0 ? ' ' . int2str($a % 100) : ''); } else { if ($a < 1000) { return int2str((int) ($a / 100)) . ' ' . int2str(100) . ' ' . ($a % 100 != 0 ? int2str($a % 100) : ''); } else { if ($a == 1000) { return 'mille'; } else { if ($a < 2000) { return int2str(1000) . ($a % 1000 != 0 ? ' ' . int2str($a % 1000) : ''); } else { if ($a < 1000000) { return int2str((int) ($a / 1000)) . ' ' . int2str(1000) . ' ' . ($a % 1000 != 0 ? int2str($a % 1000) : ''); } else { return $a; } } } } } } } } } }
function int2str($a) { if ($a < 17) { switch ($a) { case 1: return 'UN'; case 2: return 'DEUX'; case 3: return 'TROIS'; case 4: return 'QUATRE'; case 5: return 'CINQ'; case 6: return 'SIX'; case 7: return 'SEPT'; case 8: return 'HUIT'; case 9: return 'NEUF'; case 10: return 'DIX'; case 11: return 'ONZE'; case 12: return 'DOUZE'; case 13: return 'TREIZE'; case 14: return 'QUATORZE'; case 15: return 'QUINZE'; case 16: return 'SEIZE'; } } else { if ($a < 20) { return 'DIX-' . int2str($a - 10); } else { if ($a < 100) { if ($a % 10 == 0) { switch ($a) { case 20: return 'VINGT'; case 30: return 'TRENTE'; case 40: return 'QUARANTE'; case 50: return 'CINQUANTE'; case 60: return 'SOIXANTE'; case 70: return 'SOINXANTE-DIX'; case 80: return 'QUATRE-VINGT'; case 90: return 'QUATRE-VINGT-DIX'; } } elseif (substr($a, -1) == 1) { if ((int) ($a / 10) * 10 < 70) { return int2str((int) ($a / 10) * 10) . '-ET-UN'; } elseif ($a == 71) { return 'SOIXANTE ET ONZE'; } elseif ($a == 81) { return 'QUATRE VINGT UN'; } elseif ($a == 91) { return 'QUATRE VINGT ONZE'; } } elseif ($a < 70) { return int2str($a - $a % 10) . '-' . int2str($a % 10); } elseif ($a < 80) { return int2str(60) . '-' . int2str($a % 20); } else { return int2str(80) . '-' . int2str($a % 20); } } else { if ($a == 100) { return 'CENT'; } else { if ($a < 200) { return int2str(100) . ' ' . int2str($a % 100); } else { if ($a < 1000) { return int2str((int) ($a / 100)) . ' ' . int2str(100) . ' ' . int2str($a % 100); } else { if ($a == 1000) { return 'MILLE'; } else { if ($a < 2000) { return int2str(1000) . ' ' . int2str($a % 1000) . ' '; } else { if ($a < 1000000) { return int2str((int) ($a / 1000)) . ' ' . int2str(1000) . ' ' . int2str($a % 1000); } else { if ($a == 1000000) { return 'MILLION'; } else { if ($a < 2000000) { return int2str(1000000) . ' ' . int2str($a % 1000000) . ' '; } else { if ($a < 1000000000) { return int2str((int) ($a / 1000000)) . ' ' . int2str(1000000) . ' ' . int2str($a % 1000000); } else { if ($a == 1000000000) { return 'MILLIARD'; } else { if ($a < 2000000000) { return int2str(1000000000) . ' ' . int2str($a % 1000000000) . ' '; } } } } } } } } } } } } } } }