Advertisement
Guest User

css print

a guest
Mar 30th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 13.96 KB | None | 0 0
  1. <?
  2. include "dblogin.php";
  3. $huurid=$_GET['huurid'];
  4. $fietstype=$_GET['fietstype'];
  5. $subtype=$_GET['subid'];
  6. $naam=$_GET['naam'];
  7. $huurdatum=$_GET['huurdatum'];
  8. $postcodehuisnummer=$_GET['postcodehuisnummer'];
  9.  
  10. ?>
  11.  
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  13. <html xmlns="http://www.w3.org/1999/xhtml">
  14. <head>
  15. <SCRIPT language=JavaScript>
  16. window.print();
  17. </SCRIPT>
  18. <style type="text/css" media="all">@import "styleprint.css";</style>
  19. <BODY TEXT="#336699">
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21. <title>Vriewieler orderbon</title><style type="text/css">
  22. <!
  23. .stijl1 {
  24.     font-family: Arial, Helvetica, sans-serif;
  25.     font-size: 12px;
  26.     line-height: 0px;
  27.     align: center;
  28. }
  29.  
  30. >
  31. </style></head>
  32. <div id="container">
  33.    <div id="header">
  34.    
  35. <body>
  36. <p><img src="images/kop.png" alt="Kop" class="kop"/></p>
  37.    
  38. <p align="center"><strong><span class="stijl1">Fietshuur order, <?echo date("d-m-Y H:i", time());?></span></strong></p>
  39. <br>
  40. <table width="80%">
  41. <?    
  42.   $query20="SELECT * FROM huur WHERE ID2 = $huurid";
  43.     $result20=mysql_query($query20) or die ("klantgegevens niet kunnen ophalen. Fout: ".mysql_error());
  44.     while ($row20=mysql_fetch_array($result20))
  45.     {
  46.     $naam=$row20['naam'];
  47.     $postcodehuisnummer=$row20['Postcodehuisnummer'];
  48.     }
  49. ?>
  50. <td><strong><span class="stijl1">  Klantnaam: <?echo $naam;?></span></strong><br><tr>
  51. <td>  <span class="stijl1">  Postcode + huisnummer: <?echo $postcodehuisnummer;?></span><br><tr>
  52. <td>  <span class="stijl1">  Huurdatum: <?echo date("d-m-Y", time());?></span>
  53. </table>
  54. </div>
  55. <div id="body">
  56.    
  57.  <table width="100%" border="0">
  58.     <tr>
  59.         <td valign="top"><b>
  60.         </b>
  61.             <br>
  62.             <table border="0">
  63.     <?
  64.  
  65.     echo "<td colspan=\"1\"><div class=\"note\">Categorie:</div></td>";
  66.     echo "<td colspan=\"2\"><div class=\"note\">Type:</div></td>";
  67.     echo "<td colspan=\"3\"><div class=\"note\">Einddatum:</div></td>";
  68.     echo "<td colspan=\"1\"><div class=\"note\">Prijs:</div></td>";
  69.  
  70.     echo "<tr>";
  71.    
  72.     $result0= mysql_query("SELECT * FROM huur WHERE ID2 = $huurid");
  73.     $count= mysql_num_rows($result0);
  74.     $totaal = $huurid + $count;
  75.     $id1 = $huurid;
  76.    
  77.         //borg weergeven
  78.     echo "<td>";
  79.    
  80.     echo " Borg";
  81.     echo "<td>";
  82.     echo " Totaalprijs borg";
  83.     echo "<td>";
  84.     echo "<td>";
  85.     echo "<td><td>";
  86.    
  87.     echo "<td>";
  88.     //Borgberekening
  89.     $query="SELECT * FROM huur WHERE ID2 = $huurid ORDER BY Borga DESC LIMIT 1";
  90.     $result9=mysql_query($query) or die ("Volgende fout: ".mysql_error());
  91.     while ($row9=mysql_fetch_array($result9))
  92.     {
  93.     $hoogste_borg=$row9['Borga'];
  94.     $vervallen_borg=$row9['Borgb'];
  95.     }
  96.     $query="SELECT ID2, SUM(Borgb) FROM huur WHERE ID2 = $huurid";
  97.     $result3=mysql_query($query) or die ("hoogste borg SUM niet gelukt, door volgende fout: ".mysql_error());
  98.     $row3=mysql_fetch_array($result3);
  99.     $totaleborgb=$row3['SUM(Borgb)'];
  100.    
  101.     $werkelijkeborg=$hoogste_borg+$totaleborgb-$vervallen_borg;
  102.     echo "€ ".$werkelijkeborg;
  103.     echo "<tr>";
  104.    
  105.    
  106.  
  107.     while($id1 < $totaal )              
  108.         {
  109.  
  110.    
  111.    
  112.     $result2 = mysql_query("SELECT * FROM huur WHERE ID = $id1");
  113.     $klant= mysql_fetch_array($result2);
  114.  
  115.     $cat= $klant["productid"];
  116.     $sub= $klant["subid"];
  117.     $id1 = $id1 + 1;
  118.  
  119. switch($cat)
  120. {
  121.   case "1":    
  122.   $result1= mysql_query("SELECT * FROM herenfietsen WHERE ID = $sub");
  123.  
  124.  
  125.     $c= 0;
  126.         while($row1= mysql_fetch_array($result1))              
  127.         {
  128.             $c++;
  129. ?>        <td>
  130.           <?echo " Herenfiets";?>
  131.           <?echo "<td>";?>
  132.                    
  133.           <?php
  134.           $row1['Type'] = str_replace('+','<br>', $row1['Type']);
  135.           ?>
  136.                     <?echo $row1["Type"];?>
  137.                     <td><td>
  138.                     <?
  139.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  140.                     $row3 = mysql_fetch_array($result3);
  141.          
  142.           $aantaldagen = $row3['dagen'];
  143.           $aantaldagen = $aantaldagen-1;
  144.                    
  145.                     $startDate = $huurdatum;
  146.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  147.  
  148.                    
  149.                     ?>
  150.                     <td>
  151.                     <td>
  152.                     <td>
  153.                    
  154.                     <?
  155.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  156.                     $row3 = mysql_fetch_array($result3);
  157.                     echo "€ ".$row3["Prijs"];
  158.                     ?>
  159.                     <tr>
  160.                    
  161. <? 
  162.         }
  163.  
  164.   break;
  165.  
  166.   case "2":
  167.   $result4= mysql_query("SELECT * FROM damesfietsen WHERE ID = $sub");
  168.  
  169.     $c= 0;
  170.         while($row4= mysql_fetch_array($result4))              
  171.         {
  172.             $c++;
  173. ?>        <tr>
  174.           <td>
  175.      
  176.           <?echo " Damesfiets";?>
  177.           <?echo "<td>";?>
  178.                     <?php
  179.           $row4["Naam"] = str_replace('+','<br>', $row4["Naam"]);
  180.           ?>
  181.                     <?
  182.                     echo $row4["Naam"];?>
  183.                     <td><td>
  184.                     <?
  185.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  186.                     $row3 = mysql_fetch_array($result3);
  187.          
  188.           $aantaldagen = $row3['dagen'];
  189.           $aantaldagen = $aantaldagen-1;
  190.                    
  191.                     $startDate = $huurdatum;
  192.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  193.                     ?>
  194.                     <td><td><td>
  195.                     <?
  196.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  197.                     $row3 = mysql_fetch_array($result3);
  198.                     echo "€ ".$row3["Prijs"];
  199.                     ?>
  200.  
  201.                     <tr>
  202. <?     
  203.         }
  204.  
  205.   break;
  206.  
  207.   case "3":
  208.   $result3= mysql_query("SELECT * FROM mtb WHERE ID = $sub");
  209.  
  210.     $c= 0;
  211.         while($row5= mysql_fetch_array($result3))              
  212.         {
  213.             $c++;
  214. ?>        <tr>
  215.           <td>
  216.           <?echo " Mountainbike";?>
  217.           <?echo "<td>";?>
  218.           <?php
  219.           $row5["Naam"] = str_replace('+','<br>', $row5["Naam"]);
  220.           ?>
  221.                     <?echo $row5["Naam"];?>
  222.                     <td><td>
  223.                     <?
  224.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  225.                     $row3 = mysql_fetch_array($result3);
  226.          
  227.           $aantaldagen = $row3['dagen'];
  228.           $aantaldagen = $aantaldagen-1;
  229.                    
  230.                     $startDate = $huurdatum;
  231.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  232.                     ?>
  233.                     <td><td><td>
  234.                     <?
  235.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  236.                     $row3 = mysql_fetch_array($result3);
  237.                     echo "€ ".$row3["Prijs"];
  238.                     ?>
  239.                     <tr>
  240.  
  241. <?     
  242.         }
  243.  
  244.   break;
  245.  
  246.   case "4":
  247.   $result4= mysql_query("SELECT * FROM mtbkind WHERE ID = $sub");
  248.  
  249.     $c= 0;
  250.         while($row4= mysql_fetch_array($result4))              
  251.         {
  252.             $c++;
  253. ?>        <tr>
  254.           <td>
  255.           <?echo " Kinder-mountainbike";?>
  256.           <?echo "<td>";?>
  257.                     <?php
  258.           $row4["Naam"] = str_replace('+','<br>', $row4["Naam"]);
  259.           echo  $row4["Naam"];
  260.           ?>
  261.                     <?echo $row1["Naam"];?>
  262.                     <td><td>
  263.                     <?
  264.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  265.                     $row3 = mysql_fetch_array($result3);
  266.          
  267.           $aantaldagen = $row3['dagen'];
  268.           $aantaldagen = $aantaldagen-1;
  269.                    
  270.                     $startDate = $huurdatum;
  271.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  272.                     ?>
  273.                     <td><td><td>
  274.                     <?
  275.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  276.                     $row3 = mysql_fetch_array($result3);
  277.                     echo "€ ".$row3["Prijs"];
  278.                     ?>
  279.  
  280.                     <tr>
  281.  
  282. <?     
  283.         }
  284.  
  285.   break;
  286.  
  287.   case "5":
  288.   $result1= mysql_query("SELECT * FROM tandems WHERE ID = $sub");
  289.  
  290.     $c= 0;
  291.         while($row1= mysql_fetch_array($result1))              
  292.         {
  293.             $c++;
  294. ?>        <tr>
  295.           <td>
  296.           <?echo " Tandems";?>
  297.           <?echo "<td>";?>
  298.                     <?php
  299.           $row1["Naam"] = str_replace('+','<br>', $row1["Naam"]);
  300.           ?>
  301.                     <?echo $row1["Naam"];?>
  302.                     <td><td>
  303.                     <?
  304.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  305.                     $row3 = mysql_fetch_array($result3);
  306.                    
  307.                     $aantaldagen = $row3['dagen'];
  308.           $aantaldagen = $aantaldagen-1;
  309.                    
  310.                     $startDate = $huurdatum;
  311.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  312.                     ?>
  313.                     <td><td><td>
  314.                     <?
  315.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  316.                     $row3 = mysql_fetch_array($result3);
  317.                     echo "€ ".$row3["Prijs"];
  318.                     ?>
  319.                
  320.  
  321.                     <tr>
  322.  
  323. <?     
  324.         }
  325.  
  326.   break;
  327.  
  328.   case "6":
  329.   $result1= mysql_query("SELECT * FROM jongensfietsen WHERE ID = $sub");
  330.     $c= 0;
  331.         while($row1= mysql_fetch_array($result1))              
  332.         {
  333.             $c++;
  334. ?>        <tr>  
  335.           <td>
  336.           <?echo " Kinderfiets jongen";?>
  337.           <?echo "<td>";?>
  338.                      <?php
  339.           $row1["Naam"] = str_replace('+','<br>', $row1["Naam"]);
  340.           ?>
  341.                     <?echo $row1["Naam"];?>
  342.                     <td><td>
  343.                     <?
  344.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  345.                     $row3 = mysql_fetch_array($result3);
  346.                    
  347.                     $aantaldagen = $row3['dagen'];
  348.           $aantaldagen = $aantaldagen-1;
  349.                    
  350.                     $startDate = $huurdatum;
  351.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  352.                     ?>
  353.                     <td><td><td>
  354.                     <?
  355.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  356.                     $row3 = mysql_fetch_array($result3);
  357.                     echo "€ ".$row3["Prijs"];
  358.                     ?>
  359.  
  360.                     <tr>
  361.  
  362. <?     
  363.         }
  364.  
  365.   break;
  366.  
  367.   case "7":
  368.   $result1= mysql_query("SELECT * FROM meisjesfietsen WHERE ID = $sub");
  369.  
  370.  
  371.     $c= 0;
  372.         while($row1= mysql_fetch_array($result1))              
  373.         {
  374.             $c++;
  375. ?>        <tr>
  376.           <td>
  377.           <?echo " Kinderfiets meisje";?>
  378.           <?echo "<td>";?>
  379.                     <?php
  380.           $row1["Naam"] = str_replace('+','<br>', $row1["Naam"]);
  381.           ?>
  382.                     <?echo $row1["Naam"];?>
  383.                     <td><td>
  384.                     <?
  385.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  386.                     $row3 = mysql_fetch_array($result3);
  387.                    
  388.                     $aantaldagen = $row3['dagen'];
  389.           $aantaldagen = $aantaldagen-1;
  390.                    
  391.                     $startDate = $huurdatum;
  392.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  393.                     ?>
  394.                     <td><td><td>
  395.                     <?
  396.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  397.                     $row3 = mysql_fetch_array($result3);
  398.                     echo "€ ".$row3["Prijs"];
  399.                     ?>
  400.  
  401.                     <tr>
  402.  
  403. <?     
  404.         }
  405.  
  406.   break;
  407.  
  408.   case "8":
  409.   $result1= mysql_query("SELECT * FROM kind_divers WHERE ID = $sub");
  410.  
  411.     $c= 0;
  412.         while($row1= mysql_fetch_array($result1))              
  413.         {
  414.             $c++;
  415. ?>        <tr>
  416.           <td>
  417.           <?echo " Kind-diversen";?>
  418.           <?echo "<td>";?>
  419.                     <?php
  420.           $row1["Naam"] = str_replace('+','<br>', $row1["Naam"]);
  421.           ?>
  422.                     <?echo $row1["Naam"];?>
  423.                     <td><td>
  424.                     <?
  425.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  426.                     $row3 = mysql_fetch_array($result3);
  427.                    
  428.                     $aantaldagen = $row3['dagen'];
  429.           $aantaldagen = $aantaldagen-1;
  430.                    
  431.                     $startDate = $huurdatum;
  432.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  433.                     ?>
  434.                     <td><td><td>
  435.                     <?
  436.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  437.                     $row3 = mysql_fetch_array($result3);
  438.                     echo "€ ".$row3["Prijs"];
  439.                     ?>
  440.  
  441.                     <tr>
  442.  
  443. <?     
  444.         }
  445.  
  446.   break;
  447.  
  448.   case "9":
  449.   $result1= mysql_query("SELECT * FROM accessoires WHERE ID = $sub");
  450.  
  451.     $c= 0;
  452.         while($row1= mysql_fetch_array($result1))              
  453.         {
  454.             $c++;
  455. ?>        <tr>
  456.           <td>
  457.           <?echo " Accessoires";?>
  458.           <?echo "<td>";?>
  459.                      <?php
  460.           $row1["Naam"] = str_replace('+','<br>', $row1["Naam"]);
  461.           ?>
  462.                     <?echo $row1["Naam"];?>
  463.                     <td><td>
  464.                     <?
  465.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  466.                     $row3 = mysql_fetch_array($result3);
  467.                    
  468.                     $aantaldagen = $row3['dagen'];
  469.           $aantaldagen = $aantaldagen-1;
  470.                    
  471.                     $startDate = $huurdatum;
  472.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  473.                     ?>
  474.                     <td><td><td>
  475.                     <?
  476.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  477.                     $row3 = mysql_fetch_array($result3);
  478.                     echo "€ ".$row3["Prijs"];
  479.                     ?>
  480.  
  481.                     <tr>
  482.  
  483. <?     
  484.         }
  485.  
  486.   break;
  487.  
  488.   case "10":
  489.   $result1= mysql_query("SELECT * FROM elekrisch WHERE ID = $sub");
  490.  
  491.     $c= 0;
  492.         while($row1= mysql_fetch_array($result1))              
  493.         {
  494.             $c++;
  495. ?>        <tr>
  496.           <td>
  497.           <?echo " Elektrisch";?>
  498.           <?echo "<td>";?>
  499.                     <?php
  500.           $row1["Naam"] = str_replace('+','<br>', $row1["Naam"]);
  501.           ?>
  502.                     <?echo $row1["Type"];?>
  503.                     <td><td>
  504.                     <?
  505.                     $result3= mysql_query("SELECT dagen FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  506.                     $row3 = mysql_fetch_array($result3);
  507.                    
  508.                     $aantaldagen = $row3['dagen'];
  509.           $aantaldagen = $aantaldagen-1;
  510.                    
  511.                     $startDate = $huurdatum;
  512.                     echo date("d-m-Y", strtotime("$startDate + $aantaldagen days"));
  513.                     ?>
  514.                     <td><td><td>
  515.                     <?
  516.                     $result3= mysql_query("SELECT Prijs FROM huur WHERE subid = $sub AND ID = ($id1 - 1)");
  517.                     $row3 = mysql_fetch_array($result3);
  518.                     echo "€ ".$row3["Prijs"];
  519.                     ?>
  520.  
  521.                     <tr>
  522.                     <?     
  523.         }
  524.  
  525.   break;
  526.  
  527.  
  528.         }
  529.  
  530. }
  531. ?>
  532.                 <td>
  533.                 <td>
  534.                 <?
  535.                 echo "<b>";
  536.                 echo "Totaalprijs: ";
  537.                 echo "<td>";
  538.                 echo "<td><td><td><td>";
  539.                 $query="SELECT ID2, SUM(Prijs) FROM huur WHERE ID2 = $huurid";
  540.                 $result3=mysql_query($query) or die ("Volgende fout: ".mysql_error());
  541.                 $row3=mysql_fetch_array($result3);
  542.                 $totalehuur=$row3['SUM(Prijs)'];
  543.                 $totaalprijs=$totalehuur+$werkelijkeborg;
  544.                 echo "<b>€ ".$totaalprijs."</b>";
  545.                 echo "</b>";
  546.                 ?> 
  547.                 </table>
  548.         </td>
  549.     <tr>
  550.    
  551.    
  552. </table>
  553.  
  554. </body></div>
  555. <div id="footer">
  556. <p><img src="images/voet.png" alt="Kop" class="voet"/></p>
  557.  
  558. </div>
  559.  
  560. </div>
  561. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement