EVOLUTION-NINJA
Edit File: shade_master_data.php
<?php $cWarp=count($getwarp); $cWeft=count($getweft); ?> <?php foreach($getshadedata as $fresult) { //echo $fresult->shadeName;exit; ?> <h3 class="page-title"> Shade Master Details </h3> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Shade Type:</label> <div class="col-md-6 col-xs-7"> <?php echo $fresult->shadeType; ?> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Shade Name:</label> <div class="col-md-6 col-xs-7"> <?php echo $fresult->shadeName; ?> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Design:</label> <div class="col-md-6 col-xs-7"> <?php echo $fresult->design; ?> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Quality:</label> <div class="col-md-6 col-xs-7"> <?php echo $fresult->quality; ?> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Process Flow:</label> <div class="col-md-6 col-xs-7"> <?php echo $fresult->fabricType; ?> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Process Description:</label> <div class="col-md-6 col-xs-7"> <?php echo $fresult->fabricDescription; ?> </div> </div> </div> </div> <?php if($fresult->image !=""){?> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-6 col-xs-5">Image:</label> <div class="col-md-6 col-xs-7"> <img alt="" src="<?php echo base_url("$fresult->image");?>" class="img-responsive" style="height: 100px;width: 178px;"> </div> </div> </div> </div> <?php }?> <?php } ?> <br><br> <?php if($cWarp>0 && $cWeft>0) { ?> <table class="table table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Warp Color </th> <th> Warp Code </th> <th> Warp Quality </th> <th> Warp Specification </th> <th> Kora Wt </th> <th> Hanks </th> </tr> </thead> <tbody> <?php if($cWarp==0 && $cWeft==0) { echo '<tr>'; echo '<td colspan=4> NO DATA FOUND </td>'; echo '</tr>'; } else { //echo '<pre>';print_r($getwarp);exit; $i = 0; foreach($getwarp as $warp){ // if($i <= $cWeft){ echo '<tr>'; echo '<td> ' . $getsmwarp[$i]->warpColor . ' </td> <td> ' . $getsmwarp[$i]->warpCode . ' </td> <td> ' . $warp->Warp_Quality . ' </td> <td> ' . $warp->Warp_Specification . ' </td> <td> ' . $warp->Kora_Wt . ' </td> <td> ' . $warp->Hanks . ' </td>'; // } echo '</tr>'; $i ++; } } ?> </tbody> </table> <table class="table table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Weft Color </th> <th> Weft Code </th> <th> Weft Quality </th> <th> Weft Specification </th> <th> Kora Wt </th> <th> Hanks </th> </tr> </thead> <tbody> <?php //echo '<pre>';print_r($getsmwarp);exit; if($cWarp==0 && $cWeft==0) { echo '<tr>'; echo '<td colspan=4> NO DATA FOUND </td>'; echo '</tr>'; } else { $i = 0; foreach($getweft as $weft){ // if($i <= $cWeft){ echo '<tr>'; echo '<td> ' . $getsmweft[$i]->weftColor . ' </td> <td> ' . $getsmweft[$i]->weftCode . ' </td> <td> ' . $weft->Weft_Quality . ' </td> <td> ' . $weft->Weft_Specification . ' </td> <td> ' . $weft->Kora_Wt . ' </td> <td> ' . $weft->Hanks . ' </td>'; // } echo '</tr>'; $i ++; } } ?> </tbody> </table> <?php } else { ?> <table class="table table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Weft Color </th> <th> Weft Code </th> <th> Warp Color </th> <th> Warp Code </th> </tr> </thead> <tbody> <?php $cWarp=count($getsmwarp); $cWeft=count($getsmweft); //echo '<pre>';print_r($getsmwarp);exit; if($cWarp==0 && $cWeft==0) { echo '<tr>'; echo '<td colspan=4> NO DATA FOUND </td>'; echo '</tr>'; } else if($cWarp >= $cWeft) { $i = 0; foreach($getsmwarp as $warp){ echo ' <tr> <td> ' . $warp->warpColor . ' </td> <td> ' . $warp->warpCode . ' </td> '; if($i < $cWeft){ echo '<td> ' . $getsmweft[$i]->weftColor . ' </td> <td> ' . $getsmweft[$i]->weftCode . ' </td>'; } else{ echo '<td> </td> <td> </td>'; } echo '</tr>'; $i ++; } } else { $i = 0; foreach($getsmweft as $weft){ if($i < $cWarp){ echo '<tr>'; echo '<td> ' . $getsmwarp[$i]->warpColor . ' </td> <td> ' . $getsmwarp[$i]->warpCode . ' </td>'; } else{ echo '<td> </td> <td> </td>'; } echo ' <td> ' . $weft->weftColor . ' </td> <td> ' . $weft->weftCode . ' </td> '; echo '</tr>'; $i ++; } } ?> </tbody> </table> <?php } ?> <!-- <table class="table table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Warp Color </th> <th> Warp Code </th> <th> Weft Color </th> <th> Weft Code </th> </tr> </thead> <tbody> <?php $cWarp=count($getsmwarp); $cWeft=count($getsmweft); //echo '<pre>';print_r($getsmwarp);exit; if($cWarp >= $cWeft) { $i = 0; foreach($getsmwarp as $warp){ echo ' <tr> <td> ' . $warp->warpColor . ' </td> <td> ' . $warp->warpCode . ' </td> '; if($i < $cWeft){ echo '<td> ' . $getsmweft[$i]->weftColor . ' </td> <td> ' . $getsmweft[$i]->weftCode . ' </td>'; } else{ echo '<td> </td> <td> </td>'; } echo '</tr>'; $i ++; } } else { $i = 0; foreach($getsmweft as $weft){ if($i < $cWarp){ echo '<tr>'; echo '<td> ' . $getsmwarp[$i]->warpColor . ' </td> <td> ' . $getsmwarp[$i]->warpCode . ' </td>'; } else{ echo '<td> </td> <td> </td>'; } echo ' <td> ' . $weft->weftColor . ' </td> <td> ' . $weft->weftCode . ' </td> '; echo '</tr>'; $i ++; } } ?> </tbody> </table> <table class="table table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Warp Quality </th> <th> Warp Specification </th> <th> Kora Wt </th> <th> Hanks </th> </tr> </thead> <tbody> <?php foreach($getwarp as $warp){ echo ' <tr> <td> ' . $warp->Warp_Quality . ' </td> <td> ' . $warp->Warp_Specification . ' </td> <td> ' . $warp->Kora_Wt . ' </td> <td> ' . $warp->Hanks . ' </td> </tr> '; } ?> </tbody> </table> <table class="table table-bordered table-hover" id="sample_1"> <thead> <tr> <th> Weft Quality </th> <th> Weft Specification </th> <th> Kora Wt </th> <th> Hanks </th> </tr> </thead> <tbody> <?php foreach($getweft as $weft){ echo ' <tr> <td> ' . $weft->Weft_Quality . ' </td> <td> ' . $weft->Weft_Specification . ' </td> <td> ' . $weft->Kora_Wt . ' </td> <td> ' . $weft->Hanks . ' </td> </tr> '; } ?> </tbody> </table> -->