Advertisement
touhid_xml

Pond Survey Report

Jan 8th, 2017
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="bn-BD">
  3. <head>
  4.         <?php
  5.     $css = base_url()."assets/css/";
  6.     $js = base_url()."assets/js/";
  7.     $img = base_url()."assets/img/";
  8.    
  9.     ?>
  10. <meta charset="UTF-8">
  11. <title>সরকারি/বেসরকারি পুকুর জরিপ ছক</title>
  12. <link rel="stylesheet" href="<?php echo $css . "/report_print.css"; ?>" type="text/css">
  13.     <script src="<?php echo $js . "jquery-1.12.4.min.js" ?>"></script>
  14. </head>
  15.  
  16. <body>
  17. <div class="search">
  18. <?php echo form_open("",array('id'=> 'searchform'));?>
  19. মাছ চাষের ধরন / প্রযুক্তি <select id="fishtype" name="fish_type">
  20.         <option value="" selected="selected">নির্বাচন করুন</option>
  21.         <?php foreach($tech as $key => $value): ?>
  22.         <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
  23.         <?php endforeach; ?>
  24.     </select>
  25.     ||
  26.         পুকুরের ধরন
  27.         <select name="pond_type">
  28.             <option value="" selected="selected">নির্বাচন করুন</option>
  29. <?php foreach($pond_type as $key => $value): ?>
  30.             <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
  31.             <?php endforeach; ?>
  32.         </select>
  33.     ||
  34.     মালিকানার ধরন
  35.     <select name="ownership_type">
  36.         <option value="" selected="selected">নির্বাচন করুন</option>
  37.         <?php foreach($ownership as $key => $value): ?>
  38.             <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
  39.         <?php endforeach; ?>
  40.     </select>
  41.  
  42.   || <button type="submit">Search</button>
  43.     <?php echo form_close(); ?>
  44. </div>
  45.     <table>
  46.        
  47.             <tr>
  48.                 <td rowspan="2">ক্র নং</td>
  49.                 <td rowspan="2">চাষীর ছবি</td>
  50.                 <td rowspan="2">মৎস্য চাষী/ প্রতিষ্ঠানের নাম</td>
  51.                 <td rowspan="2">ক) পিতা/স্বামীর নাম<br />খ) মাতার নাম</td>
  52.                 <td rowspan="2">ঠিকানা</td>
  53.                 <td rowspan="2">পুকুরের নাম</td>
  54.                 <td colspan="2">পুকুরের</td>
  55.                 <td rowspan="2">মালিকানার ধরন</td>
  56.                 <td rowspan="2">পুকুরের ধরন</td>
  57.                 <td rowspan="2">মাছ চাষের ধরন/প্রযুক্তি</td>
  58.                 <td rowspan="2">গত বছর হেক্টর প্রতি মাছের উৎপাদন (মে. টন)</td>
  59.                 <td rowspan="2">প্রতি হেক্টরে মাছের উৎপাদন (মে. টন)</td>
  60.                 <td rowspan="2">অন্যান্য মাছের মোট উৎপাদন (মে. টন)</td>
  61.                 <td rowspan="2">পুকুরের মোট মাছের উৎপাদন (মে. টন)</td>
  62.  
  63.                 <td rowspan="2">মন্তব্য</td>
  64.                
  65.                
  66.             </tr>
  67.             <tr>
  68.    
  69.                 <td>সংখ্যা (টি)</td><td>আয়তন (হেক্টর)</td>
  70.                
  71.             </tr>
  72.             <?php
  73.             $sl = 1;
  74.             $totalProductionLastYear = 0;
  75.             $grandTotalProduction = 0;
  76.             $total_other_fish_production = 0;
  77.             $total_production_per_hector = 0;
  78.             $total_production =0;
  79.             $grandTotalVolume = 0;
  80.             foreach($owner_list as $owner):
  81.  
  82.                 $fish_type = null;
  83.                 $ownership_type = null;
  84.                 $pond_typex = null;
  85.  
  86.                 if($this->input->post("fish_type") != ""){
  87.                     $fish_type = $this->input->post("fish_type");
  88.                 }
  89.                 if($this->input->post("pond_type") != ""){
  90.                     $pond_typex = $this->input->post("pond_type");
  91.                 }
  92.                 if($this->input->post("ownership_type") != ""){
  93.                     $ownership_type = $this->input->post("ownership_type");
  94.                 }
  95.  
  96.  
  97.                 $ponds =  $this->Pond_survey_model->filterPond($owner['id'],$fish_type,$pond_typex,$ownership_type);
  98.  
  99.                 if(empty($ponds)) {
  100.                 }else{
  101.                     $total_volume = array_sum(array_map(function ($item) {
  102.                         return $item['pond_volume'];
  103.  
  104.                     }, $ponds));
  105.  
  106.                     $current_production = array_sum(array_map(function ($item) {
  107.                         return $item['current_production'];
  108.  
  109.                     }, $ponds));
  110.  
  111.                     $other_fish_production = array_sum(array_map(function ($item) {
  112.                         return $item['other_fish_production'];
  113.  
  114.                     }, $ponds));
  115.  
  116.                     $productionLastYear = array_sum(array_map(function ($item) {
  117.                         return $item['production_last_year'];
  118.  
  119.                     }, $ponds));
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                     $total_production += ( $total_volume * $productionLastYear ) + $other_fish_production;
  127.                    //$totalProductionLastYear += $current_production;
  128.  
  129.                     $total_production_per_hector += $current_production;
  130.  
  131.                     $totalProductionLastYear += $productionLastYear;
  132.                     $total_other_fish_production += $other_fish_production;
  133.  
  134.                     $grandTotalVolume  += $total_volume;
  135.                    // $grandTotalProduction += $total_production ;
  136.  
  137.                     $total_pond = count($ponds);
  138.  
  139.                     ?>
  140.                     <tr>
  141.                         <td style="width: 2%;"><?php echo str_replace(range(0, 9), $bn_digits, $sl) ?></td>
  142.                         <td style="width: 5%"><img style="max-width: 100px; max-height: 100px;"
  143.                                                    src="<?php echo base_url() . "upload/farmer/";
  144.                                                    echo ($owner['owner_pic']) ? $owner['owner_pic'] : "no-pic.jpg"; ?>">
  145.                         </td>
  146.                         <td style="width: 10%"><?php echo $owner['farmer_name']; ?> <br /><?php echo $owner['mobile_no'] ?></td>
  147.                         <td style="width: 10%;">
  148.                             ক) <?php echo $owner['father_name']; ?><br>
  149.                             খ) <?php echo $owner['mother_name']; ?>
  150.                         </td>
  151.                         <td style="width: 8%"><?php echo $owner['address']; ?></td>
  152.                         <td style="width: 5%"><?php
  153.                             $slp = 1;
  154.                             foreach ($ponds as $pond) {
  155.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . str_replace(range(0, 9), $bn_digits, $pond['pond_name']) . "<br />\n";
  156.  
  157.                                 $slp++;
  158.                             }
  159.                             ?></td>
  160.                         <td style="width: 2%"><?php echo str_replace(range(0, 9), $bn_digits, $total_pond); ?></td>
  161.                         <td style="width: 5%"><?php
  162.                             $slp = 1;
  163.                             foreach ($ponds as $pond) {
  164.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . str_replace(range(0, 9), $bn_digits, $pond['pond_volume']) . "<br />\n";
  165.  
  166.                                 $slp++;
  167.                             }
  168.                             ?></td>
  169.                         <td style="width: 5%"><?php
  170.                             $slp = 1;
  171.                             foreach ($ponds as $pond) {
  172.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . $ownership[$pond['ownership_type']] . "<br />\n";
  173.  
  174.                                 $slp++;
  175.                             }
  176.                             ?></td>
  177.                         </td>
  178.                         <td style="width: 5%"><?php
  179.                             $slp = 1;
  180.                             foreach ($ponds as $pond) {
  181.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . $pond_type[(int)$pond['pond_type']] . "<br />\n";
  182.  
  183.                                 $slp++;
  184.                             }
  185.                             ?></td>
  186.                         <td style="width: 8%"><?php
  187.                             $slp = 1;
  188.                             foreach ($ponds as $pond) {
  189.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . $tech[$pond['fish_type']] . "<br />\n";
  190.  
  191.                                 $slp++;
  192.                             }
  193.                             ?></td>
  194.                         <td style="width: 5%"><?php
  195.                             $slp = 1;
  196.                             foreach ($ponds as $pond) {
  197.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . str_replace(range(0, 9), $bn_digits, number_format((float)$pond['production_last_year'], 2, '.', '')) . "<br />\n";
  198.  
  199.                                 $slp++;
  200.                             }
  201.                             ?></td>
  202.                         <td style="width: 5%"><?php
  203.                             $slp = 1;
  204.                             foreach ($ponds as $pond) {
  205.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . str_replace(range(0, 9), $bn_digits, number_format((float)$pond['current_production'], 2, '.', '')) . "<br />\n";
  206.  
  207.                                 $slp++;
  208.                             }
  209.                             ?></td>
  210.                         <td style="width: 5%"><?php
  211.                             $slp = 1;
  212.                             foreach ($ponds as $pond) {
  213.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . str_replace(range(0, 9), $bn_digits, number_format((float)$pond['other_fish_production'], 2, '.', '')) . "<br />\n";
  214.  
  215.                                 $slp++;
  216.                             }
  217.                             ?></td>
  218.                         <td style="width: 5%"><?php
  219.                             $slp = 1;
  220.                             foreach ($ponds as $pond) {
  221.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . str_replace(range(0, 9), $bn_digits, number_format(($pond['production_last_year'] * $pond['pond_volume']) + $pond['other_fish_production'], 2, '.', '')) . "<br />\n";
  222.  
  223.                                 $slp++;
  224.                             }
  225.                             ?></td>
  226.  
  227.                         <td style="width: 5%"><?php
  228.                             $slp = 1;
  229.                             foreach ($ponds as $pond) {
  230.                                 echo str_replace(range(0, 9), $bn_digits, $slp) . ") " . $pond['comment'] . "<br />\n";
  231.  
  232.                                 $slp++;
  233.                             }
  234.                             ?></td>
  235.  
  236.  
  237.                     </tr>
  238.                     <?php
  239.                     $sl++;
  240.                 }
  241.             endforeach; ?>
  242.        <tr class="total">
  243.            <td>***</td>
  244.            <td>***</td>
  245.            <td>***</td>
  246.            <td>***</td>
  247.            <td>***</td>
  248.            <td>***</td>
  249.            <td>***</td>
  250.            <td><?php echo str_replace(range(0, 9), $bn_digits, $total_volume); ?></td>
  251.            <td>***</td>
  252.            <td>***</td>
  253.            <td>***</td>
  254.            <td><?php echo str_replace(range(0, 9), $bn_digits, $totalProductionLastYear); ?></td>
  255.            <td><?php echo str_replace(range(0, 9), $bn_digits, $total_production_per_hector); ?></td>
  256.            <td><?php echo str_replace(range(0, 9), $bn_digits, $total_other_fish_production); ?></td>
  257.  
  258.  
  259.  
  260.  
  261.            <td><?php echo str_replace(range(0, 9), $bn_digits, ($grandTotalVolume * $totalProductionLastYear) + $total_other_fish_production); ?></td>
  262.            <td>***</td>
  263.        </tr>
  264.     </table>
  265.  
  266. </body>
  267.  
  268. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement