SHARE
TWEET

Untitled

a guest Apr 17th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php while($rec=mysqli_fetch_assoc($qry)) {
  2.  
  3.   $daily = explode('#$#',$rec['daily']);
  4.   $monthly = explode('#$#',$rec['monthly']);
  5.   $remark = explode('#$#',$rec['remark']);
  6.   $rowspan = count($daily)>count($monthly) ? count($daily) : count($monthly);
  7.   echo '<tr>';
  8.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' align=center>'.$no.'</td>';
  9.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' align=center>'.$rec['LineOther'].'</td>';
  10.  
  11.   $TypeProduksi = $PartID = $QtyPlanning = array();
  12.   foreach($monthly as $idx => $val) {
  13.   list($TypeProduksi[],$PartID[],$QtyPlanning[]) = explode('#&#',$val);
  14.   $totmonthlyplan+=implode('', $QtyPlanning); //totalmonthlyplan
  15.   }
  16.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' >'.implode('<div class="tbcellspacing"></div>',$TypeProduksi).'</td>';
  17.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' >'.implode('<div class="tbcellspacing"></div>',$PartID).'</td>';
  18.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' align=center>'.implode('<div class="tbcellspacing"></div>')."ASSY".'</td>';
  19.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' align=center>'.implode('<div class="tbcellspacing"></div>',$QtyPlanning).'</td>';
  20.  
  21.   $TypeProduksi = $PartID = $QtyPlanning = array();
  22.   foreach($daily as $idx => $val) {
  23.   list($TypeProduksi[],$PartID[],$QtyPlanning[]) = explode('#&#',$val);
  24.   $totdailyplan+=implode('', $QtyPlanning); //totaldailyplan
  25.   }
  26.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').'>'.implode('<div class="tbcellspacing"></div>',$TypeProduksi).'</td>';
  27.    echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').'>'.implode('<div class="tbcellspacing"></div>',$PartID).'</td>';
  28.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' align=center>'.implode('<div class="tbcellspacing"></div>',$QtyPlanning).'</td>';
  29.  
  30. $PartID = '';$Remark = array();
  31.   foreach($remark as $idx => $val) {
  32.     list($PartID,$Remark[]) = explode('#&#',$val);
  33.   }
  34.   echo '<td'.($rowspan>1?' rowspan='.$rowspan:'').' style="width:450px" contenteditable="true">'.implode('<div class="tbcellspacing"></div>',$Remark).'</td>'; // hasilnya Remark 1
  35.  
  36.  
  37.   echo '</tr>';
  38.  
  39.   for($i=1;$i<count($Remark);$i++) {  // hasilnya sisa record Remark 2 ...
  40.     echo '<tr></tr>';
  41.   }
  42.  
  43.   $no++;
  44.  
  45. }
  46. echo '</tbody>
  47. <tfoot style="font-weight: bold;"">
  48. <tr>                                                    
  49.        <th colspan="5" class="text-center">Total</th>
  50.        <td class="text-center">'.number_format($totmonthlyplan,0,'.','.').'</td>
  51.        <th colspan="2" class="text-center"></th>
  52.        <td class="text-center">'.number_format($totdailyplan,0,'.','.').'</td>
  53.        <td class="text-center"></td>
  54.    </tr>
  55. </tfoot>
  56. </table>';
  57.  
  58.  
  59.     } ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top