diff --git a/Classes/Alunos.php b/Classes/Alunos.php index e1d859a..6eb89c9 100644 --- a/Classes/Alunos.php +++ b/Classes/Alunos.php @@ -44,10 +44,10 @@ function getAev(){ function getSistema(){ return $this->sistema; } - function pesquisa_banco(){ + function pesquisa_banco($ma){ $pdo = new PDO( 'mysql:host=localhost;dbname=Al', 'root', '' ); $pdo -> query("SET NAMES UTF8"); - $stmt = $pdo->prepare("SELECT *,COUNT(*) FROM Alunos WHERE Num_mat LIKE '$this->matricula%'"); + $stmt = $pdo->prepare("SELECT *,COUNT(*) FROM Alunos WHERE Num_mat LIKE '$ma%'"); $stmt->execute(array('id','Cod_cur','Num_mat','Nome_civil','Nome_cur','Fin','Fev','Ain','Aev','sistema','Nome_social','COUNT(*)')); $resultado = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($resultado as $item){ diff --git a/Classes/Etiquetas.php b/Classes/Etiquetas.php new file mode 100644 index 0000000..d72c468 --- /dev/null +++ b/Classes/Etiquetas.php @@ -0,0 +1,43 @@ +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 = "$curso + $Nome_cur"; + $this->a2 ="$Num_mat"; + $this->a3 ="$Nome_civil"; + $this->a4 ="$Fin"; + $this->a5 ="$Ain"; + $this->a6 ="$Fev"; + $this->a7 ="$Aev"; + $this->a8 ="$sistema"; + } +} +?> diff --git a/Etiqueta.html b/Etiqueta.html index b2bd484..c40380c 100644 --- a/Etiqueta.html +++ b/Etiqueta.html @@ -1,76 +1,59 @@ +} +#Modelo_body .xl80{ + font-size:11px; + height:0.5cm; +} + Etiquetas - - - - - - - - - - - - - - - - - - - - -
FA01Administração
19330059
LUCIANA SAMPAIO MARINHO
PSM - Processo Seletivo Macro
1993/ 2° Semestre
Formado
2007/ 2° Semestre
SIE
+ + + +
FA01AdministraçãoFA01Administração
2195014720330269
ROSENELBE ARCANJO PINHEIROROSEMARY GOMES NUNES
PSE - Portador de DiplomaPSM - Processo Seletivo Macro
2019/ 1° Semestre2003/ 1° Semestre
Sem EvasãoFormado
2008/ 1° Semestre
SIESIE
AV01Alunos avulsos
20270037
ELAINE ALMEIDA SANTOS BARROS
Aluno Avulso
2002/ 2° Semestre
Excluído
2004/ 2° Semestre
SIE
diff --git a/css/es.css b/css/es.css index 11d160b..25a46df 100644 --- a/css/es.css +++ b/css/es.css @@ -258,6 +258,51 @@ border-radius:25px; left:20%; top:120px; } +#estilo_mult_etq{ + position: absolute; + top:340px; + left:20%; + height: 60px; + width:800px; +} +#adicinat{ + position: absolute; + top:280px; + left:20%; + height: 60px; + width:760px; +} +#gerar_tqtas{ + position: absolute; + top:480px; + left:20%; + height: 60px; + width:760px; +} +#gerar_tqtas input{ + font-size: 25px; + text-align: center; + border: 1px solid black; + border-radius: 15px; + height: 50px; + width:100%; +} +#adicinat input{ + font-size: 25px; + text-align: center; + border: 1px solid black; + border-radius: 15px; + height: 50px; + width:100%; +} +#estilo_mult_etq form input{ + font-size: 25px; + text-align: center; + border: 1px solid black; + border-radius: 15px; + height: 50px; + width:95%; +} #verificar_ad_uso form{ margin:5px; width:100%; diff --git a/etq_uni.php b/etq_uni.php index bf55bb0..f38593c 100644 --- a/etq_uni.php +++ b/etq_uni.php @@ -42,8 +42,6 @@ $tabela ="".$tabela."
"; - - ?> 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=""; +$a2=""; +$a3=""; +$a4=""; +$a5=""; +$a6=""; +$a7=""; +$a8=""; +$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.=""; +$a2.=""; +$a3.=""; +$a4.=""; +$a5.=""; +$a6.=""; +$a7.=""; +$a8.=""; +$tabela .= $a1.$a2.$a3.$a4.$a5.$a6.$a7.$a8; + $contador = $contador+2; +} + +$tabela ="".$tabela."
"; + +$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 = "\n"; + $html .= "\t\n"; + $html .= "\t\tEtiquetas\n"; + $html .= "\t\n"; + $html .= "\t\n"; + $html .= "$tabela"; + $html .= "\t\n"; + $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; + +?> diff --git a/mult_etq.php b/mult_etq.php new file mode 100644 index 0000000..f86f2e7 --- /dev/null +++ b/mult_etq.php @@ -0,0 +1,71 @@ + + + + +Mult etiquetas + + "a"){ + echo ""; +} +?> + + +
+ + +
+
+ + +
+
+
+

+ +
+
+ + +
+ +
"; +} +if(isset($_POST['bt_pesq'])){ +$ma = $_POST['matri']; +$al = new Aluno(); +$al->pesquisa_banco($ma); +$al->exibir(); + +if(isset($_GET['etq'])){ + $id = $_GET['etq'].",".$al->getId(); +}else{ + $id =$al->getId() ; +} +echo "
+
+ +
"; +} + +?> diff --git a/pg_res_pes_mat.php b/pg_res_pes_mat.php index be08a54..65addfb 100644 --- a/pg_res_pes_mat.php +++ b/pg_res_pes_mat.php @@ -18,7 +18,7 @@ $ma = preg_replace("/\s+/","",$ma); $al = new Aluno(); $al -> setMatricula($ma); - $al->pesquisa_banco(); + $al->pesquisa_banco($ma); } ?> diff --git a/tela_inicial.php b/tela_inicial.php index f6b8c7e..b42b2cd 100644 --- a/tela_inicial.php +++ b/tela_inicial.php @@ -79,6 +79,9 @@ function ajax(){
  • Alterar senha
  • Alterar tema
  • =2){ + echo "
  • Gerar etiquetas
  • "; + } if ($_SESSION['acesso']==4){ echo "
  • Adicionar documentos
  • "; echo "
  • Adicionar registro
  • ";