<?
session_start(); 
if($v==1){
include("stilos/config.inc.php");
  include("../clases/BDConexion.php");
  include("../clases/clsPer.php");
  include("funcion/funciones.php");
  include("Funciones.php");

  $objPer=new clsPer;
  }
?>
<table width="834" border="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><div align="left">
      <table width="709" border="1" cellpadding="0" cellspacing="0" style="<?=$stylo['tabla']?>" bgcolor="<?=$c_fondo['fondo tabla']?>" bordercolor="<?=$bordetabla?>">
        <tr class="lblCampoBlanco" bgcolor="<?=$c_fondo_tr["fondo tr"]?>">
          <?
				$mess=substr($fecha1,3,2);
		  		$anio=substr($fecha1,6,4);
				$day="01";
				
				$mesess=$month;
				$anioss=$year;
				$diass=date(d);
				$ultimodia=date("t",mktime(0,0,0,$mesess,1,$anioss));
				$fecha1=$days1."-".$mesess."-".$anioss;
				//$fecha2=$ultimodia."-".$mesess."-".$anioss;
				$fecha2=$days."-".$mesess."-".$anioss;
				$horast=0;
			/* 	$rspcp=$objPer->TransHrs1(extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				while($rowpcp=$objPer->NextRow($rspcp)){
					$rsht=$objPer->getHorasxMes($rowpcp['mat_trans'],extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				  	$rowht=$objPer->NextRow($rsht);
					
					$rsct=$objPer->getConsolCombusTMes($rowpcp['mat_trans'],extraerfechamysql($fecha1),extraerfechamysql($fecha2));
					$rowct=$objPer->NextRow($rsct);
					
					$rsthi=$objPer->getHoraIndisponible($rowpcp['mat_trans'],extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				    $rowthi=$objPer->NextRow($rsthi);
					
					if($rowpcp['tipohora']=='T'){ $th=$rowht['horastec'];}elseif($rowpcp['tipohora']=='V'){ $th=$rowht['horasvol'];}
					
					if($rowpcp['tipohora']=='V'){
						if($rowpcp['horamaxtra']!=0){
							$dind=$rowthi['horasv']/$rowpcp['horamaxtra'];
						}
					}elseif($rowpcp['tipohora']=='T'){
						if($rowpcp['horamaxtra']!=0){
							$dind=$rowthi['horastec']/$rowpcp['horamaxtra'];
						}
					}						
					if($matricula=='OB-317'){
					echo $ctotalcal=((round($th)/3)*$rowpcp['tarifav']);
					}elseif($matricula=='OB-1842 P'){
						if(($rowpcp['dias_indotor']-$dind)>=0){ $dindcal=0;}elseif(($rowpcp['dias_indotor']-$dind)<0){ $dindcal=($rowpcp['dias_indotor']-$dind);}
					$th=round($th,1);//-0.03;
					$cdi=$rowpcp['tarifa']/30;  //$cdi=costo diario de indisponibilidad
					$dic=$dindcal; //$dic=dia de indisponibilidad calculado
					$cfm=$rowpcp['tarifa']+$cdi*$dic;   // $cfm=costo fijo mensional
					////////////////////////////////////////////////////////////////////////////////////
					if($th<=40){$ci1=40*1000;}else{$ci1=40*1000;}
					if($th>40){ 
						if($th<60){
						$hi=$th-40;
						}else{
						$hi=19;
						}
					$ci2=$hi*2500;
					}else{$ci2=0;}
					if($th>=60){
						$hi3=$th-60;
						$ci3=$hi3*2400;
					}else{$ci3=0;}
					
					echo $ctotalcal=$cfm+($ci1+$ci2+$ci3);
					////////////////////////////////////////////////////////////////////////////////////
					}elseif($matricula=='C-GKHL'){
						if(($rowpcp['dias_indotor']-$dind)>=0){ $dindcal=0;}elseif(($rowpcp['dias_indotor']-$dind)<0){ $dindcal=($rowpcp['dias_indotor']-$dind);}
						$th=round($th,1);//-0.03;
						$cdi=$rowpcp['tarifa']/30;  //$cdi=costo diario de indisponibilidad
						$dic=$dindcal; //$dic=dia de indisponibilidad calculado
						$cfm=$rowpcp['tarifa']+$cdi*$dic;   // $cfm=costo fijo mensional
						////////////////////////////////////////////////////////////////////////////////////
						if($th<=120){$ci1=$th*2400;}
						elseif($th>120{$ci2=($th-120)*2400;}
						echo $ctotalcal=$cfm+($ci1+$ci2);
					}elseif($matricula=='CFIGR'){
						if(($rowpcp['dias_indotor']-$dind)>=0){ $dindcal=0;}elseif(($rowpcp['dias_indotor']-$dind)<0){ $dindcal=($rowpcp['dias_indotor']-$dind);}
						$th=round($th,1);//-0.03;
						$cdi=$rowpcp['tarifa']/30;  //$cdi=costo diario de indisponibilidad
						$dic=$dindcal; //$dic=dia de indisponibilidad calculado
						$cfm=$rowpcp['tarifa']+$cdi*$dic;   // $cfm=costo fijo mensional
						////////////////////////////////////////////////////////////////////////////////////
						if($th<=120){$ci1=120*2800;}
						elseif($th>120{$ci2=($th-120)*3190;}
						echo $ctotalcal=$cfm+($ci1+$ci2);
					}else{
					if($rowpcp['horamaxtra']!=''){
						
							if($dind>$rowpcp['dias_indotor']){
								$diaind=$dind;														
								echo $ctotalcal=round((($rowpcp['tarifa']*(30-$diaind)/30)+(round($th,1)*$rowpcp['tarifah'])),2);
							}elseif($dind<=$rowpcp['dias_indotor']){
								$diaind=0;								
								echo $ctotalcal=round((($rowpcp['tarifa']*(30-$diaind)/30)+(round($th,1)*$rowpcp['tarifah'])),2);
							}					
						}
					}
					
					
					$horast+=$th;
								
					
				} */ 
				
				/* $rstipohora=$objPer->getConsolVuelosHrs(extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				$rowtipohora=$objPer->NextRow($rstipohora); */
				
				
				/* $rst=$objPer->getTransTarifa($matricula); 
				$rowt=$objPer->NextRow($rst);				
					
				$rsthi=$objPer->getHoraIndisponible($matricula,extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				$rowthi=$objPer->NextRow($rsthi); */				
				?>
          <td width="298"><div align="center">Centros de costos </div></td>
          <? for($j=$days1;$j<=$days;$j++){?>
          <td width="44"><div align="center">
              <?=$j?>
          </div></td>
          <? }?>
          <td width="85"><div align="center">Total Horas x CC </div></td>
          <td width="103"><div align="center">%</div></td>
          <td width="59"><div align="center"></div></td>
          <td width="106"><div align="center">
              <div align="center"></div>
          </div></td>
        </tr>
	<?
	$n=0;
					//extraerfechamysql($fecha1),extraerfechamysql($fecha2)
	$rscd=$objPer->manpercardiasTHrs(extraerfechamysql($fecha1),extraerfechamysql($fecha2));
	$totalfilas=$objPer->totalrows($rscd);
	while($rowcd=$objPer->NextRow($rscd)){
	$n++;
	$tothorascc1=0;
	$sumap=0; 
	
	?>
        <tr class="lblCampo">
          <td><div align="left">
              <?=$rowcd['ccosto']?>
          </div></td>
          <? for($i=$days1;$i<=$days;$i++){?>
          <td><div align="center">
              <? 
			  $t=0;
			  $ctotalcal=0;
			  if($rowcd['ccosto']){
			  
			      $rsdt=$objPer->TransHrs($rowcd['ccosto'],$anioss."-".$mesess."-".$i);
				  while($rowdt=$objPer->NextRow($rsdt)){
				  
				  /* $rstv=$objPer->manpercarHrsTecVol($rowdt['mat_trans'],extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				  $rowtv=$objPer->NextRow($rstv); */
				  
				  $rstipohora=$objPer->getConsolVuelos($rowdt['mat_trans'],extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				  $rowtipohora=$objPer->NextRow($rstipohora);
			  	
				  $rshd=$objPer->getHorasxDia($rowdt['mat_trans'],$anioss."-".$mesess."-".$i);
				  $rowhd=$objPer->NextRow($rshd);
				  
				  $rspcdc=$objPer->manpercarpesodiscc1($rowdt['mat_trans'],$rowcd['ccosto'],$anioss."-".$mesess."-".$i);
				  $rowpcdc=$objPer->NextRow($rspcdc);
				  
				  $rspcdt=$objPer->manpercarpesodish($rowdt['mat_trans'],$anioss."-".$mesess."-".$i);
				  $rowpcdt=$objPer->NextRow($rspcdt);	
				  
				  $rsthi=$objPer->getHoraIndisponible($rowdt['mat_trans'],extraerfechamysql($fecha1),extraerfechamysql($fecha2));
				  $rowthi=$objPer->NextRow($rsthi);		  	  
				  
				  if(($rowpcdt['dispesototal']!='') || ($rowpcdt['dispesototal']!=0)){
				   if($rowhd['horastec']!=NULL){ 
				  if($rowtipohora['tipohora']=='T'){ $tipoh=$rowhd['horastec'];$tipohora=$rowtv['horatec'];}else{$tipoh=$rowhd['horasvol']; $tipohora=$rowtv['horavol'];}
				  //$t=round(($rowpcdc['dispercar']/$rowpcdt['dispesototal'])*$tipoh*60,3);
				  $t=$t+round(($rowpcdc['dispercar']/$rowpcdt['dispesototal'])*$tipoh*60,4)."<br>";
				  $tt1=round(($rowpcdc['dispercar']/$rowpcdt['dispesototal'])*$tipoh*60,4);
				  $sumap+=$rowpcdc['dispercar'];
				  $tothorascc1+=$tt1;
				  
				  if($rowtipohora['tipohora']=='V'){
						if($rowdt['horamaxtra']!=0){
							$dind=$rowthi['horasv']/$rowdt['horamaxtra'];
						}
					}elseif($rowtipohora['tipohora']=='T'){
						if($rowdt['horamaxtra']!=0){
							$dind=$rowthi['horastec']/$rowdt['horamaxtra'];
						}
					}						
					if($matricula=='OB-317'){
						$ctotalcal+=((round($t)/3)*$rowdt['tarifav']);
					}elseif($matricula=='OB-1842 P'){
						if(($rowdt['dias_indotor']-$dind)>=0){ $dindcal=0;}elseif(($rowdt['dias_indotor']-$dind)<0){ $dindcal=($rowdt['dias_indotor']-$dind);}
					$t=$t;//-0.03;
					$cdi=$rowdt['tarifa']/30;  //$cdi=costo diario de indisponibilidad
					$dic=$dindcal; //$dic=dia de indisponibilidad calculado
					$cfm=$rowdt['tarifa']+$cdi*$dic;   // $cfm=costo fijo mensional
					////////////////////////////////////////////////////////////////////////////////////
					if($t<=40){$ci1=40*1000;}else{$ci1=40*1000;}
					if($t>40){ 
						if($t<60){
						$hi=$t-40;
						}else{
						$hi=20;
						}
					$ci2=$hi*2500;
					}else{$ci2=0;}
					if($t>=60){
						$hi3=$t-60;
						$ci3=$hi3*2400;
					}else{$ci3=0;}
					
						$ctotalcal+=$cfm+($ci1+$ci2+$ci3);
					////////////////////////////////////////////////////////////////////////////////////
					}elseif($matricula=='C-GKHL'){
						if(($rowdt['dias_indotor']-$dind)>=0){ $dindcal=0;}elseif(($rowdt['dias_indotor']-$dind)<0){ $dindcal=($rowdt['dias_indotor']-$dind);}
						$t=$t;//-0.03;
						$cdi=$rowdt['tarifa']/30;  //$cdi=costo diario de indisponibilidad
						$dic=$dindcal; //$dic=dia de indisponibilidad calculado
						$cfm=$rowdt['tarifa']+$cdi*$dic;   // $cfm=costo fijo mensional
						////////////////////////////////////////////////////////////////////////////////////
						if($t<=120){$ci1=$t*2400;}
						elseif($t>120){$ci2=($t-120)*2400;}
							$ctotalcal+=$cfm+($ci1+$ci2);
					}elseif($matricula=='CFIGR'){
						if(($rowdt['dias_indotor']-$dind)>=0){ $dindcal=0;}elseif(($rowdt['dias_indotor']-$dind)<0){ $dindcal=($rowdt['dias_indotor']-$dind);}
						$t=$t;//-0.03;
						$cdi=$rowdt['tarifa']/30;  //$cdi=costo diario de indisponibilidad
						$dic=$dindcal; //$dic=dia de indisponibilidad calculado
						$cfm=$rowdt['tarifa']+$cdi*$dic;   // $cfm=costo fijo mensional
						////////////////////////////////////////////////////////////////////////////////////
						if($t<=120){$ci1=120*2800;}
						elseif($t>120){$ci2=($t-120)*3190;}
							$ctotalcal+=$cfm+($ci1+$ci2);
					}else{
					if($rowdt['horamaxtra']!=''){
						
							if($dind>$rowdt['dias_indotor']){
								$diaind=$dind;														
									$ctotalcal+=round((($rowdt['tarifa']*(30-$diaind)/30)+(round($t,1)*$rowdt['tarifah'])),2);
							}elseif($dind<=$rowdt['dias_indotor']){
								$diaind=0;								
									$ctotalcal+=round((($rowdt['tarifa']*(30-$diaind)/30)+(round($t,1)*$rowdt['tarifah'])),2);
							}					
						}
					}
				  
				  if($i==1){ $A1[]=$ctotalcal;}
				  if($i==2){ $A2[]=$ctotalcal;}
				  if($i==3){ $A3[]=$ctotalcal;}
				  if($i==4){ $A4[]=$ctotalcal;}
				  if($i==5){ $A5[]=$ctotalcal;}
				  if($i==6){ $A6[]=$ctotalcal;}
				  if($i==7){ $A7[]=$ctotalcal;}
				  if($i==8){ $A8[]=$ctotalcal;}
				  if($i==9){ $A9[]=$ctotalcal;}
				  if($i==10){ $A10[]=$ctotalcal;}
				  if($i==11){ $A11[]=$ctotalcal;}
				  if($i==12){ $A12[]=$ctotalcal;}
				  if($i==13){ $A13[]=$ctotalcal;}
				  if($i==14){ $A14[]=$ctotalcal;}
				  if($i==15){ $A15[]=$ctotalcal;}
				  if($i==16){ $A16[]=$ctotalcal;}
				  if($i==17){ $A17[]=$ctotalcal;}
				  if($i==18){ $A18[]=$ctotalcal;}
				  if($i==19){ $A19[]=$ctotalcal;}
				  if($i==20){ $A20[]=$ctotalcal;}
				  if($i==21){ $A21[]=$ctotalcal;}
				  if($i==22){ $A22[]=$ctotalcal;}
				  if($i==23){ $A23[]=$ctotalcal;}
				  if($i==24){ $A24[]=$ctotalcal;}
				  if($i==25){ $A25[]=$ctotalcal;}
				  if($i==26){ $A26[]=$ctotalcal;}
				  if($i==27){ $A27[]=$ctotalcal;}
				  if($i==28){ $A28[]=$ctotalcal;}
				  if($i==29){ $A29[]=$ctotalcal;}
				  if($i==30){ $A30[]=$ctotalcal;}
				  if($i==31){ $A31[]=$ctotalcal;}			  				  
				  	
				   }   
					 }else{
					 "&nbsp;";
					 }
					 
				  }
				  
				} 	  
					  echo $ctotalcal;
					  /* $divisora=60;
					  $minutosa=60;
					   
					  $tminutosa=$minutosa*(round($t)/60);    
					  $cocientea=floor($tminutosa/$divisora);
					  
					  $restoa=$tminutosa%$divisora;
					  if($restoa<10){
					  	if($cocientea.":0".$restoa!='0:00'){
					  		echo $cocientea.":0".$restoa."<br>";
						}
					  }else{
					  	if($cocientea.":0".$restoa!='0:00'){
					  		echo $cocientea.":".$restoa."<br>";
						}
					  }  */
					 
				  ?>
          </div></td>
          <? }?>
          <td><div align="center">
              <?
				  
				  /* echo calcular_horas_formato_inversa(round($tothorascc1)/60);
				  $tothorascc1/60;
				  $totalhoracol=round($tothorascc1,1);
				  $totalhoracol1+=$totalhoracol; */
				  ?>
          </div></td>
          <td><div align="center">
              <?
					/* round(($tothorascc1)/60,1)."<br>";
					round($horast,1)."<br>";
					echo round(round($tothorascc1/60,1)/round($horast,1)*100,1); */
					?>
          </div></td>
          <td><div align="center">
            <? 					 
					/* if($rowt['tipohora']=='V'){
						if($rowt['horamaxtra']!=0){
							$dind=$rowthi['horasv']/$rowt['horamaxtra'];
						}
					}elseif($rowt['tipohora']=='T'){
						if($rowt['horamaxtra']!=0){
							$dind=$rowthi['horastec']/$rowt['horamaxtra'];
						}
					}						
					if($matricula=='OB-317'){
					echo $ctotalcal=((round($tipohora)/3)*$rowt['tarifav']);
					}elseif($matricula=='OB-1842 P'){
					$tipohora=round($tipohora,1);//-0.03;
					$cdi=$rowt['tarifa']/30;  //$cdi=costo diario de indisponibilidad
					$dic=$dind-$rowt['dias_indotor']; //$dic=dia de indisponibilidad calculado
					$cfm=$rowt['tarifa']-$cdi*$dic;   // $cfm=costo fijo mensional
					////////////////////////////////////////////////////////////////////////////////////
					if($tipohora<=40){$ci1=40*1000;}else{$ci1=40*1000;}
					if($tipohora>40){ 
						if($tipohora<60){
						$hi=$tipohora-40;
						}else{
						$hi=19;
						}
					$ci2=$hi*2500;
					}else{$ci2=0;}
					if($tipohora>=60){
						$hi3=$tipohora-60;
						$ci3=$hi3*2400;
					}else{$ci3=0;}
					
					echo $ctotalcal=$cfm+($ci1+$ci2+$ci3);
					////////////////////////////////////////////////////////////////////////////////////
					}else{
					if($rowt['horamaxtra']!=''){
						
							if($dind>$rowt['dias_indotor']){
								$diaind=$dind;														
								echo $ctotalcal=round((($rowt['tarifa']*($ultimodia-$diaind)/$ultimodia)+(round($tipohora,1)*$rowt['tarifah'])),2);
							}elseif($dind<=$rowt['dias_indotor']){
								$diaind=0;								
								echo $ctotalcal=round((($rowt['tarifa']*($ultimodia-$diaind)/$ultimodia)+(round($tipohora,1)*$rowt['tarifah'])),2);
							}					
						}
					}  				 */	 	
					?>
          </div></td>
          <td><div align="center">
					<?					
					/* echo $dcc=number_format((($porcentaje1/100)*$ctotalcal),2,'.','');
					//echo $porcentaje1;
					$dcct=$dcct+$dcc; */
					?>
          </div></td>
        </tr>
        <? }$objPer->Liberar($rscd);?>
        <tr class="lblCampoBlanco" bgcolor="<?=$c_fondo_tr["fondo tr"]?>">
          <td>Total Horas  </td>
          <? for($z=$days1;$z<=$days;$z++){?>
          <td><div align="center">
              <?
				  if($z==1){if(isset($A1)){foreach($A1 as $b1){$sumab1+=$b1;} echo $sumab1;}}
				  if($z==2){if(isset($A2)){foreach($A2 as $b2){$sumab2+=$b2;} echo $sumab2;}}
				  if($z==3){if(isset($A3)){foreach($A3 as $b3){$sumab3+=$b3;} echo $sumab3;}}
				  if($z==4){if(isset($A4)){foreach($A4 as $b4){$sumab4+=$b4;}}}
				  if($z==5){if(isset($A5)){foreach($A5 as $b5){$sumab5+=$b5;}}}
				  if($z==6){if(isset($A6)){foreach($A6 as $b6){$sumab6+=$b6;}}}
				  if($z==7){if(isset($A7)){foreach($A7 as $b7){$sumab7+=$b7;}}}
				  if($z==8){if(isset($A8)){foreach($A8 as $b8){$sumab8+=$b8;}}}
				  if($z==9){if(isset($A9)){foreach($A9 as $b9){$sumab9+=$b9;}}}
				  if($z==10){if(isset($A10)){foreach($A10 as $b10){$sumab10+=$b10;}}}
				  if($z==11){if(isset($A11)){foreach($A11 as $b11){$sumab11+=$b11;}}}
				  if($z==12){if(isset($A12)){foreach($A12 as $b12){$sumab12+=$b12;}}}
				  if($z==13){if(isset($A13)){foreach($A13 as $b13){$sumab13+=$b13;}}}
				  if($z==14){if(isset($A14)){foreach($A14 as $b14){$sumab14+=$b14;}}}
				  if($z==15){if(isset($A15)){foreach($A15 as $b15){$sumab15+=$b15;}}}
				  if($z==16){if(isset($A16)){foreach($A16 as $b16){$sumab16+=$b16;}}}
				  if($z==17){if(isset($A17)){foreach($A17 as $b17){$sumab17+=$b17;}}}
				  if($z==18){if(isset($A18)){foreach($A18 as $b18){$sumab18+=$b18;}}}
				  if($z==19){if(isset($A19)){foreach($A19 as $b19){$sumab19+=$b19;}}}
				  if($z==20){if(isset($A20)){foreach($A20 as $b20){$sumab20+=$b20;}}}
				  if($z==21){if(isset($A21)){foreach($A21 as $b21){$sumab21+=$b21;}}}
				  if($z==22){if(isset($A22)){foreach($A22 as $b22){$sumab22+=$b22;}}}
				  if($z==23){if(isset($A23)){foreach($A23 as $b23){$sumab23+=$b23;}}}
				  if($z==24){if(isset($A24)){foreach($A24 as $b24){$sumab24+=$b24;}}}
				  if($z==25){if(isset($A25)){foreach($A25 as $b25){$sumab25+=$b25;}}}
				  if($z==26){if(isset($A26)){foreach($A26 as $b26){$sumab26+=$b26;}}}
				  if($z==27){if(isset($A27)){foreach($A27 as $b27){$sumab27+=$b27;}}}
				  if($z==28){if(isset($A28)){foreach($A28 as $b28){$sumab28+=$b28;}}}
				  if($z==29){if(isset($A29)){foreach($A29 as $b29){$sumab29+=$b29;}}}
				  if($z==30){if(isset($A30)){foreach($A30 as $b30){$sumab30+=$b30;}}}
				  if($z==31){if(isset($A31)){foreach($A31 as $b31){$sumab31+=$b31;}}}
				  ?>
          </div></td>
          <? }?>
          <td><div align="center">
              <?
				  echo calcular_horas_formato_inversa(round($totalhoracol1)/60)."/".round(round($totalhoracol1)/60,2);
				  ?>
          </div></td>
          <td><div align="center">
            <?
					//echo $tper;
					echo "100.00";
					?>
          </div></td>
          <td><div align="center"></div></td>
          <td><div align="center">
              <?
				  //$dcct
				  echo $ctotalcal;
				  ?>
          </div></td>
        </tr>
        <tr class="lblCampoBlanco" bgcolor="<?=$c_fondo_tr["fondo tr"]?>">
          <td><div align="left">JP-1 Facturable  Iquitos </div></td>
          <? for($y=$days1;$y<=$days;$y++){?>
          <td><div align="center">
              <? 
				  $rscombusi=$objPer->getConsolCombusT($anioss."-".$mesess."-".$y,'IQUITOS');
				  $rowcombusi=$objPer->NextRow($rscombusi);
				  echo $rowcombusi['combus'];
				  $totcombusi+=$rowcombusi['combus'];
				  ?>
          </div></td>
          <? }?>
          <td><div align="center">
            <?=$totcombusi?>
          </div></td>
          <td><div align="center"></div></td>
          <td><div align="center"></div></td>
          <td><div align="center"></div></td>
        </tr>
        <tr class="lblCampoBlanco" bgcolor="<?=$c_fondo_tr["fondo tr"]?>">
          <td><div align="left">JP-1 Facturable LBC </div></td>
          <? for($o=$days1;$o<=$days;$o++){?>
          <td><div align="center">
              <? 
				  $rscombusnl=$objPer->getConsolCombusT($anioss."-".$mesess."-".$o,'LBC');
				  $rowcombusnl=$objPer->NextRow($rscombusnl);
				  echo $rowcombusnl['combus'];
				  $totcombusnl+=$rowcombusnl['combus'];
				  ?>
          </div></td>
          <? }?>
          <td><div align="center">
              <?=$totcombusnl?>
          </div></td>
          <td><div align="center"></div></td>
          <td><div align="center"></div></td>
          <td><div align="center"></div></td>
        </tr>
      </table>
    </div></td>
  </tr>
  <tr>
    <td><div align="center">
      <table width="450" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="104"><div align="right">
              <input type="button" name="Submit2" value=".:Imprimir:." style="<?=$stylo['st2']?>" class="botira" onClick="javascript:print_1('p_hrs_xcc_cuerpo_print.php?month=<?=$month?>&amp;year=<?=$year?>&days=<?=$days?>&days1=<?=$days1?>',800,600)" />
          </div></td>
          <td width="93">&nbsp;</td>
          <td width="104"><div align="left">
              <input type="button" name="Submit22" value=".:    Salir    :." style="<?=$stylo['st2']?>" class="botira" onClick="volver();" />
          </div></td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>

