Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/07/2010, 15:14
Avatar de carlos_belisario
carlos_belisario
Colaborador
 
Fecha de Ingreso: abril-2010
Ubicación: Venezuela Maracay Aragua
Mensajes: 3.156
Antigüedad: 14 años, 11 meses
Puntos: 461
Respuesta: fdpf control pagina

bueno asi es solo copie esa parte del codigo ya que hay otros reportes ahi, ah tambien cambie los campos ya para q no me cree problemas en el trabajo espero a alguien le sirva
Código PHP:
<?php 
                        $peracaActu
=$peraca['periodo'];            

                        
$conperaca=$conect->consulta2("select distinct periodo,semestre from tablaNotas where cedula='$cedula' and periodo<>'$peracaActu'");

                        
$i=0;

                        while(
$reg=mysql_fetch_array($conperaca))

                        {    

                            
$peracas[$i]=$reg['periodo'];

                            
$semestre[$i]=$reg['semestre'];

                            
$peracade[$i]=$reg['semestre']."-".$reg['periodo'];

                            
$i=$i+1;                        

                        }    

                        
$cant=mysql_num_rows($conperaca);

                        
$totalpuntos=0;    

                        
$this->Image('../../../logo_unefa.jpg',15,5,25);

                        
$this->SetFont('Times','',12);

                        
$titulo="REPÚBLICA BOLIVARIANA DE VENEZUELA";    

                        
$this->Cell(0,5,$titulo,0,0,'C');

                        
$this->Ln();

                        
$this->Cell(0,5,"datos institucion",0,0,'C');

                        
$this->Ln();

                        
$this->Ln();

                        
$this->Ln();                        

                        
$this->SetFont('Times','B',18);

                        
$this->Cell(0,5,"RECORD ACADÉMICO",0,0,'C');

                        
$this->Ln();

                        
$this->Ln();

                        
$this->Ln();

                        
$this->SetFont('Times','',10);

                        
$this->Cell(0,5,"ESTUDIANTE: ".$nombres."  CÉDULA DE IDENTIDAD: ".$cedula."      MATRÍCULA: ".$alumno['fecing']."-".$codesp."-".$cedula,0,0,'J');

                        
$this->Ln();

                        
$this->Cell(0,5,"CARRERA: ".$carrera."  SEMESTRE: ".$semestre_act."      PENSUM VIGENCIA: ".$pensum1,0,0,'J');

                         
$this->Ln();

                        
$this->Ln();

                        
$this->setFont('arial','B','10');

                        

                        
$crediEquivalencia=0;                                    

                        for(
$a=0;$a<$cant;$a++)

                        {                            

                            
$data=array();

                            
$reg=$conect->consulta2("SELECT distinct tablaNotas.condic as condic,tablaNotas.codmat as codmat,tablaMaterias.nommat as nommat,tablaNotas.notdef as notdef,tablaNotas.notrep as notrep,tablaMaterias.credito as credito from tablaNotas inner join tablaMaterias where tablaNotas.periodo='$peracas[$a]' and tablaNotas.semestre='$semestre[$a]' and tablaNotas.cedula='$cedula' and tablaNotas.espe=tablaMaterias.espe and tablaNotas.mat=materi.mat");

                            
$cantidad_mat=mysql_num_rows($reg);

                            while(
$regis=mysql_fetch_assoc($reg))

                            {

                                
$totalcredito=$totalcredito+$regis['credito'];

                                switch(
$regis['condic'])// establecemos la condicion en la que esta inscrita la materia

                                
{

                                    case 
"N"$condicion=" ";

                                    break;

                                    case 
"L"$condicion="PARALELO";

                                    break;

                                    case 
"P"$condicion="REPITENCIA";

                                    break;

                                    case 
"R"$condicion="REPARO";

                                    break;

                                    case 
"G"$condicion="REPARO-PENDIENTE";

                                    break;

                                    case 
"A"$condicion="APROBO";

                                    break;

                                    case 
"Q"$condicion="REPROBO";

                                    break;        

                                    case 
"W"$condicion="NOTA NO CONSIGNADA (FINAL)";

                                    break;        

                                    case 
"F"$condicion="NOTA NO CONSIGNADA (REPITENCIA)";

                                    break;        

                                    case 
"Z"$condicion="NOTA NO CONSIGNADA (PARALELO)";

                                    break;        

                                }

//                                echo $regis['condic'];

                                
if($regis['condic']!="E")

                                {

                                    
$crediCur=$crediCur+$regis['credito'];

                                }

                                if(
$regis['condic']=="A" || $regis['condic']=="Q" || $regis['condic']=="E")

                                {

                                    if(
$regis['condic']=="E")

                                    {

                                        
$crediEquivalencia=$crediEquivalencia+1;

                                    }                                    

                                    
$puntos=0;

                                }

                                if(
$regis['condic']=="N")

                                {

                                    
$puntos=$regis['credito']*$regis['notdef'];

                                    
$totalpuntos=$totalpuntos+$puntos;

                                    
//echo     $puntos." ".$totalpuntos."<br>";                                

                                
}    

                                if(
$regis['condic']=="R" || $regis['condic']=="G")

                                {

                                    
$puntos=$regis['credito']*$regis['notrep'];

                                    
$totalpuntos=$totalpuntos+$puntos;

                                }

                                if(
$regis['condic']=="L" || $regis['condic']=="P")

                                {

                                    
$puntos=$regis['credito']*($regis['notrep']-$regis['notdef']);

                                    if(
$puntos<0)

                                    {

                                        
$puntos=$puntos*(-1);

                                    }                                                        

                                    
$totalpuntos=$totalpuntos+$puntos;

                                }                                                                    

                                
$data[]=array_merge($regis,array('obv'=>$condicion),array('puntos'=>$puntos));    

                            }
#fin del while    de proceso de datos

                            
$cantidad_aaa=$cantidad_aaa+$cantidad_mat+3;

                            
$indice=$totalpuntos/$totalcredito;

                            
$indice=number_format($indice,2);

                            
$header=array('Cod. Materia','Nombre Materia','Def.','Rep','U.C','Puntos','Observación');                    //$headers=array('Cod. Materia','Nombre Materia','Sem','U.C.','Condicion','Seccion');        



                            
$this->setFont('Arial','',10);

                            
$this->Cell(0,5,"Semestre: ".$peracade[$a],0,0,'J');

                             
$this->Ln();

                            
$this->tablaRecord($header,$data);

                            
$this->Ln();                                

                            
$this->Cell(0,5,"                                                                                                            Acumulado....................................".$totalcredito."       ".$totalpuntos."     Indice Acumulado:".$indice,0,0,'J');                                

                            
$this->Ln();    

                            
$this->Ln();                    

                            if(
$cantidad_aaa>19 || $cantidad_aaa==19)# aqui hago la validacion para la cantidad de espacios noc xq no kiso agarrarme el >= entonces lo puc asi 

                            
{

                                
$cantidad_aaa=0;

                                if(
$cant!=$a+1)

                                {

                                    
$this->addPage();

                                    
$this->setFont('Arial','','12');

                                    
$this->Cell(0,7,"                    ESTUDIANTE: ".$nombres,0,0,'J');

                                    
$this->Ln();

                                    
$this->Cell(0,7,"                    CÉDULA DE IDENTIDAD No.: ".$cedula."     MATRÍCULA: ".$alumno['fecing']."-".$codesp."-".$cedula,0,0,'J');

                                    
$this->Ln();

                                    
$this->Cell(0,7,"                    CARRERA: ".$carrera."      SEMESTRE: ".$semestre_act,0,0,'J');

                                    
$this->Ln();

                                    
$this->Ln();                        

                                }                                

                            }            

                        }
# fin del for de peracade                        

                        
$this->AddPage();

                        
$this->setFont('Arial','','12');

                        
$this->Cell(0,7,"                    ESTUDIANTE: ".$nombres,0,0,'J');

                        
$this->Ln();

                        
$this->Cell(0,7,"                    CÉDULA DE IDENTIDAD No.: ".$cedula."     MATRÍCULA: ".$alumno['fecing']."-".$codesp."-".$cedula,0,0,'J');

                        
$this->Ln();

                        
$this->Cell(0,7,"                    CARRERA: ".$carrera."      SEMESTRE: ".$semestre_act,0,0,'J');

                        
$this->Ln();                    

                        
$this->Ln();                    

                        
$this->Ln();                    

                        
$this->Cell(0,7,"Total de U.de Credito Cursadas:                 ".$crediCur,0,0,'J');    

                        
$this->Ln();

                        
$this->Cell(0,5,"Total de U/C Concedidas P/Equivalencia:      ".$crediEquivalencia,0,0,'J');    

                        
$this->Ln();

                        
$this->Cell(0,5,"                                                                   _______",0,0,'J');    

                        
$this->Ln();

                        
$this->Cell(0,7,"Total de Unidades de Credito:                     ".$totalcredito,0,0,'J');    

                        
$this->Ln();

                        
$this->Ln();

                        
$this->Cell(0,7,"Índice Académico:  ".$indice,0,0,'C');    

                        
$this->Ln();

                        
$this->Ln();

                        
$this->setFont('Arial','B','10');

                        
$this->Cell(0,7,"OBSERVACIONES: ",0,0,'J');    

                        
$this->Ln();

                        
$this->Ln();

                        
$this->Ln();

                        
$this->Ln();                        

                        
$this->Ln();

                        
$this->Ln();

                        
$this->Ln();

                        
$this->setFont('Arial','B','10');

                        
$this->Cell(0,5,"            _____________________________________",0,0,'L');

                        
$this->Ln();

                        
$this->Cell(0,5,"                 ".$datosSec['rango_min']." ".$datosSec['nombres'],0,0,'L');

                        
$this->Ln();                        

                        
$this->Cell(0,5,"                  ".$datosSec['cargo'],0,0,'L');

                        
$this->Ln();

                        
$this->Cell(0,5,"______________________________________________",0,0,'R');

                        
$this->Ln();

                        
$this->Cell(0,5,$datosDec['rango_min']." ".$datosDec['nombres']."        ",0,0,'R');

                        
$this->Ln();

                        
$this->Cell(0,5,$datosDec['cargo']."    ",0,0,'R');

//                        ."                  ".$datosDec['rango_min']." ".$datosDec['nombres']."   "
si no entienden algo me preguntan x aki o por privado xq el codigo es medio largo

Última edición por carlos_belisario; 23/07/2010 a las 19:49