-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
353 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
class Etiquetas{ | ||
private $a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8,$res; | ||
function getRes(){ | ||
return $this->res; | ||
} | ||
function getA1(){ | ||
return $this->a1; | ||
} | ||
function getA2(){ | ||
return $this->a2; | ||
} | ||
function getA3(){ | ||
return $this->a3; | ||
} | ||
function getA4(){ | ||
return $this->a4; | ||
} | ||
function getA5(){ | ||
return $this->a5; | ||
} | ||
function getA6(){ | ||
return $this->a6; | ||
} | ||
function getA7(){ | ||
return $this->a7; | ||
} | ||
function getA8(){ | ||
return $this->a8; | ||
} | ||
function etq($curso,$Nome_cur,$Num_mat,$Nome_civil,$Fin,$Ain,$Fev,$Aev,$sistema){ | ||
$this->a1 = "<td class='xl72' >$curso</td> | ||
<td class='xl73' >$Nome_cur</td>"; | ||
$this->a2 ="<td class='xl74' colspan='2' >$Num_mat</td>"; | ||
$this->a3 ="<td class='xl76' colspan='2' >$Nome_civil</td>"; | ||
$this->a4 ="<td class='xl78' colspan='2' >$Fin</td>"; | ||
$this->a5 ="<td class='xl80' colspan='2' >$Ain</td>"; | ||
$this->a6 ="<td class='xl80' colspan='2'>$Fev</td>"; | ||
$this->a7 ="<td class='xl80' colspan='2'>$Aev</td>"; | ||
$this->a8 ="<td class='xl80' colspan='2'>$sistema</td>"; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,59 @@ | ||
<!DOCTYPE html><html lang='pt-br'> | ||
<head><meta charset='utf-8'><style>#Modelo_body{ | ||
background-color: inherit; | ||
} | ||
#Modelo_body table{ | ||
padding:0px 0px; | ||
width:8cm; | ||
height:7cm; | ||
border-collapse:collapse; | ||
background-color: inherit; | ||
} | ||
#Modelo_body table{ | ||
padding:0px 0px; | ||
width:16cm; | ||
height:7cm; | ||
border-collapse:collapse; | ||
border:1px solid black; | ||
} | ||
#Modelo_body .xl72{ | ||
font-weight: bold; | ||
font-size: 45px; | ||
height:1.5cm; | ||
width:3.5cm; | ||
border:1px solid black; | ||
} | ||
#Modelo_body .xl73{ | ||
width:4.5cm; | ||
font-size: 20px; | ||
border:1px solid black; | ||
} | ||
#Modelo_body .xl72{ | ||
} | ||
#Modelo_body td{ | ||
border-right:.5pt solid black; | ||
border-bottom:.5pt solid black; | ||
border-bottom-style:hairline; | ||
} | ||
#Modelo_body .xl74{ | ||
text-align:left; | ||
height:1cm; | ||
font-weight: bold; | ||
font-size: 45px; | ||
height:1.5cm; | ||
width:3.5cm; | ||
border:1px solid black; | ||
} | ||
#Modelo_body .xl73{ | ||
width:4.5cm; | ||
font-size: 20px; | ||
border:1px solid black; | ||
} | ||
#Modelo_body td{ | ||
border-right:.5pt solid black; | ||
border-bottom:.5pt solid black; | ||
border-bottom-style:hairline; | ||
} | ||
#Modelo_body .xl74{ | ||
text-align:left; | ||
height:1cm; | ||
font-weight: bold; | ||
font-size: 30px; | ||
font-size: 30px; | ||
|
||
|
||
} | ||
#Modelo_body .xl76{ | ||
height:1cm; | ||
font-size:18px; | ||
} | ||
#Modelo_body .xl76{ | ||
height:1cm; | ||
font-size:18px; | ||
|
||
} | ||
#Modelo_body .xl78{ | ||
height:1cm; | ||
font-size:15px; | ||
} | ||
#Modelo_body .xl78{ | ||
height:1cm; | ||
font-size:15px; | ||
|
||
} | ||
#Modelo_body .xl80{ | ||
font-size:11px; | ||
height:0.5cm; | ||
} | ||
</style> | ||
} | ||
#Modelo_body .xl80{ | ||
font-size:11px; | ||
height:0.5cm; | ||
} | ||
</style> | ||
<title>Etiquetas</title> | ||
</head> | ||
<body id ='Modelo_body'> | ||
<table><tbody><tr> | ||
<td class='xl72' >FA01</td> | ||
<td class='xl73' >Administração</td> | ||
</tr> | ||
<tr> | ||
<td class='xl74' colspan='2' >19330059</td> | ||
</tr> | ||
<tr> | ||
<td class='xl76' colspan='2' >LUCIANA SAMPAIO MARINHO</td> | ||
</tr> | ||
<tr> | ||
<td class='xl78' colspan='2' >PSM - Processo Seletivo Macro</td> | ||
</tr> | ||
<tr > | ||
<td class='xl80' colspan='2' >1993/ 2° Semestre</td></tr> | ||
<tr > | ||
<td class='xl80' colspan='2'>Formado</td></tr> | ||
<tr > | ||
<td class='xl80' colspan='2'>2007/ 2° Semestre</td></tr> | ||
<tr> | ||
<td class='xl80' colspan='2'>SIE</td></tr></tbody></table> </body> | ||
<table><tbody><tr><td class='xl72' >FA01</td> | ||
<td class='xl73' >Administração</td><td class='xl72' >FA01</td> | ||
<td class='xl73' >Administração</td></tr><tr><td class='xl74' colspan='2' >21950147</td><td class='xl74' colspan='2' >20330269</td></tr><tr><td class='xl76' colspan='2' >ROSENELBE ARCANJO PINHEIRO</td><td class='xl76' colspan='2' >ROSEMARY GOMES NUNES</td></tr><tr><td class='xl78' colspan='2' >PSE - Portador de Diploma</td><td class='xl78' colspan='2' >PSM - Processo Seletivo Macro</td></tr><tr><td class='xl80' colspan='2' >2019/ 1° Semestre</td><td class='xl80' colspan='2' >2003/ 1° Semestre</td></tr><tr><td class='xl80' colspan='2'>Sem Evasão</td><td class='xl80' colspan='2'>Formado</td></tr><tr><td class='xl80' colspan='2'></td><td class='xl80' colspan='2'>2008/ 1° Semestre</td></tr><tr><td class='xl80' colspan='2'>SIE</td><td class='xl80' colspan='2'>SIE</td></tr><tr><td class='xl72' >AV01</td> | ||
<td class='xl73' >Alunos avulsos</td></tr><tr><td class='xl74' colspan='2' >20270037</td></tr><tr><td class='xl76' colspan='2' >ELAINE ALMEIDA SANTOS BARROS</td></tr><tr><td class='xl78' colspan='2' >Aluno Avulso</td></tr><tr><td class='xl80' colspan='2' >2002/ 2° Semestre</td></tr><tr><td class='xl80' colspan='2'>Excluído</td></tr><tr><td class='xl80' colspan='2'>2004/ 2° Semestre</td></tr><tr><td class='xl80' colspan='2'>SIE</td></tr></tbody></table> </body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,6 @@ | |
|
||
$tabela ="<table><tbody>".$tabela."</tbody></table>"; | ||
|
||
|
||
|
||
?> | ||
|
||
<?php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<?php | ||
require_once 'Classes/Alunos.php'; | ||
require_once 'Classes/Etiquetas.php'; | ||
$var = $_GET['etq']; | ||
$var = explode(',',$var); | ||
$contador = 0; | ||
$tabela =""; | ||
while (isset($var[$contador])) { | ||
$al = new Aluno(); | ||
$al -> pesquisa_banco2($var[$contador]); | ||
$et = new Etiquetas(); | ||
$et -> etq($al->getCod(),$al->getNome_cur(),$al->getNum_mat(),$al->getNome_civil(),$al->getFin(),$al->getAin(),$al->getFev(),$al->getAev(),$al->getSistema()); | ||
$a1="<tr>"; | ||
$a2="<tr>"; | ||
$a3="<tr>"; | ||
$a4="<tr>"; | ||
$a5="<tr>"; | ||
$a6="<tr>"; | ||
$a7="<tr>"; | ||
$a8="<tr>"; | ||
$a1 .=$et->getA1(); | ||
$a2 .=$et->getA2(); | ||
$a3 .=$et->getA3(); | ||
$a4 .=$et->getA4(); | ||
$a5 .=$et->getA5(); | ||
$a6 .=$et->getA6(); | ||
$a7 .=$et->getA7(); | ||
$a8 .=$et->getA8(); | ||
if(isset($var[$contador+1])){ | ||
$al2 = new Aluno(); | ||
$al2 -> pesquisa_banco2($var[1]); | ||
$et2 = new Etiquetas(); | ||
$et2 -> etq($al2->getCod(),$al->getNome_cur(),$al2->getNum_mat(),$al2->getNome_civil(),$al2->getFin(),$al2->getAin(),$al2->getFev(),$al2->getAev(),$al2->getSistema()); | ||
$a1 .=$et2->getA1(); | ||
$a2 .=$et2->getA2(); | ||
$a3 .=$et2->getA3(); | ||
$a4 .=$et2->getA4(); | ||
$a5 .=$et2->getA5(); | ||
$a6 .=$et2->getA6(); | ||
$a7 .=$et2->getA7(); | ||
$a8 .=$et2->getA8(); | ||
} | ||
$a1.="</tr>"; | ||
$a2.="</tr>"; | ||
$a3.="</tr>"; | ||
$a4.="</tr>"; | ||
$a5.="</tr>"; | ||
$a6.="</tr>"; | ||
$a7.="</tr>"; | ||
$a8.="</tr>"; | ||
$tabela .= $a1.$a2.$a3.$a4.$a5.$a6.$a7.$a8; | ||
$contador = $contador+2; | ||
} | ||
|
||
$tabela ="<table><tbody>".$tabela."</tbody></table>"; | ||
|
||
$style = "#Modelo_body{ | ||
background-color: inherit; | ||
} | ||
#Modelo_body table{ | ||
padding:0px 0px; | ||
width:16cm; | ||
height:7cm; | ||
border-collapse:collapse; | ||
border:1px solid black; | ||
} | ||
#Modelo_body .xl72{ | ||
font-weight: bold; | ||
font-size: 45px; | ||
height:1.5cm; | ||
width:3.5cm; | ||
border:1px solid black; | ||
} | ||
#Modelo_body .xl73{ | ||
width:4.5cm; | ||
font-size: 20px; | ||
border:1px solid black; | ||
} | ||
#Modelo_body td{ | ||
border-right:.5pt solid black; | ||
border-bottom:.5pt solid black; | ||
border-bottom-style:hairline; | ||
} | ||
#Modelo_body .xl74{ | ||
text-align:left; | ||
height:1cm; | ||
font-weight: bold; | ||
font-size: 30px; | ||
} | ||
#Modelo_body .xl76{ | ||
height:1cm; | ||
font-size:18px; | ||
} | ||
#Modelo_body .xl78{ | ||
height:1cm; | ||
font-size:15px; | ||
} | ||
#Modelo_body .xl80{ | ||
font-size:11px; | ||
height:0.5cm; | ||
} | ||
"; | ||
|
||
$html = "<!DOCTYPE html><html lang='pt-br'>\n"; | ||
$html .= "\t<head><meta charset='utf-8'><style>$style</style>\n"; | ||
$html .= "\t\t<title>Etiquetas</title>\n"; | ||
$html .= "\t</head>\n"; | ||
$html .= "\t<body id ='Modelo_body'>\n"; | ||
$html .= "$tabela"; | ||
$html .= "\t</body>\n"; | ||
$html .= "</html>\n"; | ||
|
||
|
||
|
||
$arquivo = "Etiqueta.html"; | ||
// Configurações header para forçar o download | ||
file_put_contents($arquivo, $html); | ||
|
||
set_time_limit(0); | ||
$arquivoLocal = '/opt/lampp/htdocs/Arq_V2/'.$arquivo; | ||
if (!file_exists($arquivoLocal)) { | ||
exit; | ||
} | ||
$novoNome = 'Etq_geradas.html'; | ||
header('Content-Description: File Transfer'); | ||
header('Content-Disposition: attachment; filename="'.$novoNome.'"'); | ||
header('Content-Type: application/octet-stream'); | ||
header('Content-Transfer-Encoding: binary'); | ||
header('Content-Length: ' . filesize($arquivo)); | ||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); | ||
header('Pragma: public'); | ||
header('Expires: 0'); | ||
// Envia o arquivo para o cliente | ||
readfile($arquivo); | ||
exit; | ||
|
||
?> |
Oops, something went wrong.