Advertisement
Guest User

bussvolap

a guest
Dec 8th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.10 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <head>
  4.     <link type="text/css" rel="stylesheet" href="../design.css" />
  5. </head>
  6.  
  7. <body>
  8.  
  9. <?php
  10.  
  11. function inputDate(){
  12.                     define('TIMEZONE', 'Asia/Manila');
  13.                     date_default_timezone_set(TIMEZONE);
  14.                     return date('Y-m-d');
  15.                 }
  16.  
  17.         include 'con_test.php';
  18.  
  19.         echo "<table name='volAp' cellspacing='0' cellpadding='0' border='1' rules='rows' style='font-family:Calibri; margin:0 auto 0 auto; font-size:15px; text-align:center; padding:4px;'>
  20.                         <tr border='1'>
  21.                             <th>&nbsp;&nbsp;Products&nbsp;&nbsp;</th>
  22.                             <th>&nbsp;&nbsp;Real Estate&nbsp;&nbsp;</th>
  23.                             <th>&nbsp;&nbsp;TVR&nbsp;&nbsp;</th>
  24.                             <th>&nbsp;&nbsp;Auto Appraisal&nbsp;&nbsp;</th>
  25.                         </tr>";
  26.                        
  27.        
  28. // START OF Mortgage PRODUCT --------------------------------------------
  29.        
  30. // Mortgage - Real Estate
  31.         if ($result = $con->query("
  32.         SELECT `recID`
  33.             FROM `samprec`
  34.                 WHERE `recDate` = '".inputDate()."'
  35.                     AND `rec_prod` = 'Mortgage'
  36.                         AND `rec_proc` = 'Appraisal - Real Estate'")) {
  37.  
  38.             /* determine number of rows result set */
  39.             $row_cnt = $result->num_rows;
  40.  
  41.             printf("<tr><td>Mortgage</td> <td> %d </td>", $row_cnt);
  42.  
  43.             /* close result set */
  44.             $result->close();
  45.         }
  46.        
  47. // end of Mortgage - Real Estate
  48.        
  49. // Mortgage - TVR
  50.     if ($result = $con->query("
  51.         SELECT `recID`
  52.             FROM `samprec`
  53.                 WHERE `recDate` = '".inputDate()."'
  54.                     AND `rec_prod` = 'Mortgage'
  55.                         AND `rec_proc` = 'Appraisal - TVR'")) {
  56.  
  57.             /* determine number of rows result set */
  58.             $row_cnt = $result->num_rows;
  59.  
  60.             printf("<td>%d</td>", $row_cnt);
  61.  
  62.             /* close result set */
  63.             $result->close();
  64.         }
  65. // end of Mortgage TVR
  66.        
  67.     echo "<td> - </td></tr>";
  68.  
  69. // End OF Mortgage PRODUCT --------------------------------------------
  70.  
  71.  
  72. // START OF SME PRODUCT --------------------------------------------
  73.        
  74. // Mortgage - Real Estate
  75.         if ($result = $con->query("
  76.         SELECT `recID`
  77.             FROM `samprec`
  78.                 WHERE `recDate` = '".inputDate()."'
  79.                     AND `rec_prod` = 'SME'
  80.                         AND `rec_proc` = 'Appraisal - Real Estate'")) {
  81.  
  82.             /* determine number of rows result set */
  83.             $row_cnt = $result->num_rows;
  84.  
  85.             printf("<tr><td>SME</td> <td> %d </td>", $row_cnt);
  86.  
  87.             /* close result set */
  88.             $result->close();
  89.         }
  90.        
  91. // end of Mortgage - Real Estate
  92.        
  93. // Mortgage - TVR
  94.     if ($result = $con->query("
  95.         SELECT `recID`
  96.             FROM `samprec`
  97.                 WHERE `recDate` = '".inputDate()."'
  98.                     AND `rec_prod` = 'SME'
  99.                         AND `rec_proc` = 'Appraisal - TVR'")) {
  100.  
  101.             /* determine number of rows result set */
  102.             $row_cnt = $result->num_rows;
  103.  
  104.             printf("<td>%d</td>", $row_cnt);
  105.  
  106.             /* close result set */
  107.             $result->close();
  108.         }
  109. // end of Mortgage TVR
  110.        
  111.     echo "<td> - </td></tr>";
  112.  
  113. // End OF SME PRODUCT --------------------------------------------
  114.  
  115. // START OF Corpbank PRODUCT --------------------------------------------
  116.        
  117. // Mortgage - Real Estate
  118.         if ($result = $con->query("
  119.         SELECT `recID`
  120.             FROM `samprec`
  121.                 WHERE `recDate` = '".inputDate()."'
  122.                     AND `rec_prod` = 'Corpbank'
  123.                         AND `rec_proc` = 'Appraisal - Real Estate'")) {
  124.  
  125.             /* determine number of rows result set */
  126.             $row_cnt = $result->num_rows;
  127.  
  128.             printf("<tr><td>Corpbank</td> <td> %d </td>", $row_cnt);
  129.  
  130.             /* close result set */
  131.             $result->close();
  132.         }
  133.        
  134. // end of Mortgage - Real Estate
  135.        
  136. // Mortgage - TVR
  137.     if ($result = $con->query("
  138.         SELECT `recID`
  139.             FROM `samprec`
  140.                 WHERE `recDate` = '".inputDate()."'
  141.                     AND `rec_prod` = 'Corpbank'
  142.                         AND `rec_proc` = 'Appraisal - TVR'")) {
  143.  
  144.             /* determine number of rows result set */
  145.             $row_cnt = $result->num_rows;
  146.  
  147.             printf("<td>%d</td>", $row_cnt);
  148.  
  149.             /* close result set */
  150.             $result->close();
  151.         }
  152. // end of Mortgage TVR
  153.        
  154.     echo "<td> - </td></tr>";
  155.  
  156. // End OF Corpbank PRODUCT --------------------------------------------
  157.  
  158. // START OF Combank PRODUCT --------------------------------------------
  159.        
  160. // Mortgage - Real Estate
  161.         if ($result = $con->query("
  162.         SELECT `recID`
  163.             FROM `samprec`
  164.                 WHERE `recDate` = '".inputDate()."'
  165.                     AND `rec_prod` = 'Combank'
  166.                         AND `rec_proc` = 'Appraisal - Real Estate'")) {
  167.  
  168.             /* determine number of rows result set */
  169.             $row_cnt = $result->num_rows;
  170.  
  171.             printf("<tr><td>Combank</td> <td> %d </td>", $row_cnt);
  172.  
  173.             /* close result set */
  174.             $result->close();
  175.         }
  176.        
  177. // end of Mortgage - Real Estate
  178.        
  179. // Mortgage - TVR
  180.     if ($result = $con->query("
  181.         SELECT `recID`
  182.             FROM `samprec`
  183.                 WHERE `recDate` = '".inputDate()."'
  184.                     AND `rec_prod` = 'Combank'
  185.                         AND `rec_proc` = 'Appraisal - TVR'")) {
  186.  
  187.             /* determine number of rows result set */
  188.             $row_cnt = $result->num_rows;
  189.  
  190.             printf("<td>%d</td>", $row_cnt);
  191.  
  192.             /* close result set */
  193.             $result->close();
  194.         }
  195. // end of Mortgage TVR
  196.        
  197.     echo "<td> - </td></tr>";
  198.  
  199. // End OF Combank PRODUCT --------------------------------------------
  200.  
  201. // START OF CCD PRODUCT --------------------------------------------
  202.        
  203.  
  204.     echo "<tr><td>CCD</td> <td> - </td>";
  205.    
  206.     echo "<td> - </td>";
  207.        
  208. // CCD - Auto
  209.     if ($result = $con->query("
  210.         SELECT `recID`
  211.             FROM `samprec`
  212.                 WHERE `recDate` = '".inputDate()."'
  213.                     AND `rec_prod` = 'CCD'
  214.                         AND `rec_proc` = 'Appraisal - Auto'")) {
  215.  
  216.             /* determine number of rows result set */
  217.             $row_cnt = $result->num_rows;
  218.  
  219.             printf("<td>%d</td></tr>", $row_cnt);
  220.  
  221.             /* close result set */
  222.             $result->close();
  223.         }
  224. // end of CCD - Auto
  225.  
  226.  
  227. // End OF CCD PRODUCT --------------------------------------------
  228.  
  229. // START OF WAF PRODUCT --------------------------------------------
  230.        
  231.  
  232.     echo "<tr><td>WAF</td> <td> - </td>";
  233.    
  234.     echo "<td> - </td>";
  235.        
  236. // WAF - Auto
  237.     if ($result = $con->query("
  238.         SELECT `recID`
  239.             FROM `samprec`
  240.                 WHERE `recDate` = '".inputDate()."'
  241.                     AND `rec_prod` = 'WAF'
  242.                         AND `rec_proc` = 'Appraisal - Auto'")) {
  243.  
  244.             /* determine number of rows result set */
  245.             $row_cnt = $result->num_rows;
  246.  
  247.             printf("<td>%d</td></tr>", $row_cnt);
  248.  
  249.             /* close result set */
  250.             $result->close();
  251.         }
  252. // end of WAF - Auto
  253.  
  254.  
  255. // End OF WAF PRODUCT --------------------------------------------
  256.  
  257. // START OF PhilMay PRODUCT --------------------------------------------
  258.        
  259.  
  260.     echo "<tr><td>PhilMay</td> <td> - </td>";
  261.    
  262.     echo "<td> - </td>";
  263.        
  264. // CCD - Auto
  265.     if ($result = $con->query("
  266.         SELECT `recID`
  267.             FROM `samprec`
  268.                 WHERE `recDate` = '".inputDate()."'
  269.                     AND `rec_prod` = 'PhilMay'
  270.                         AND `rec_proc` = 'Appraisal - Auto'")) {
  271.  
  272.             /* determine number of rows result set */
  273.             $row_cnt = $result->num_rows;
  274.  
  275.             printf("<td>%d</td></tr>", $row_cnt);
  276.  
  277.             /* close result set */
  278.             $result->close();
  279.         }
  280. // end of PhilMay - Auto
  281.  
  282.  
  283. // End OF PhilMay PRODUCT --------------------------------------------
  284.  
  285.  
  286. // Start of Total --------------------------------------------
  287.  
  288. // Real Estate Total
  289.         if ($result = $con->query("
  290.         SELECT `recID`
  291.             FROM `samprec`
  292.                 WHERE `recDate` = '".inputDate()."'
  293.                         AND `rec_proc` = 'Appraisal - Real Estate'")) {
  294.  
  295.             /* determine number of rows result set */
  296.             $row_cnt = $result->num_rows;
  297.  
  298.             printf("<tr><td><b>Total</b></td> <td> %d </td>", $row_cnt);
  299.  
  300.             /* close result set */
  301.             $result->close();
  302.         }
  303.        
  304. // end of Real Estate Total
  305.  
  306. // Appraisal - TVR Total
  307.         if ($result = $con->query("
  308.         SELECT `recID`
  309.             FROM `samprec`
  310.                 WHERE `recDate` = '".inputDate()."'
  311.                         AND `rec_proc` = 'Appraisal - TVR'")) {
  312.  
  313.             /* determine number of rows result set */
  314.             $row_cnt = $result->num_rows;
  315.  
  316.             printf("<td> %d </td>", $row_cnt);
  317.  
  318.             /* close result set */
  319.             $result->close();
  320.         }
  321.        
  322. // end of Appraisal - TVR Total
  323.  
  324. // Appraisal - Auto Total
  325.         if ($result = $con->query("
  326.         SELECT `recID`
  327.             FROM `samprec`
  328.                 WHERE `recDate` = '".inputDate()."'
  329.                         AND `rec_proc` = 'Appraisal - Auto'")) {
  330.  
  331.             /* determine number of rows result set */
  332.             $row_cnt = $result->num_rows;
  333.  
  334.             printf("<td> %d </td></tr>", $row_cnt);
  335.  
  336.             /* close result set */
  337.             $result->close();
  338.         }
  339. // end of Appraisal - Auto Total
  340.  
  341. // End of Total --------------------------------------------
  342.  
  343.         echo "</table>";
  344. ?>
  345.  
  346.  
  347. </body>
  348.  
  349. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement