Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correções de segurança Equipe laje 241204 #828

Merged
merged 12 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion classes/Personalizacao_campo.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function display_img(){
</tr>');
}

//Começar por aqui
public function display_txt(){
// Caso o tipo seja um Texto
echo('
Expand All @@ -99,7 +100,7 @@ public function display_txt(){
</div>
</td>
<td class="v-center"><div>' . $this->getNome() . '</div></td>
<td>' . $this->getConteudo() . '</td>
<td>' . htmlspecialchars($this->getConteudo()) . '</td>
<td style="display: none;"><textarea name="txt" class="text-area" rows="5"></textarea><input style="display: none;" name="id" value="' . $this->getId() . '" readonly></td>
</tr>
</form>');
Expand Down
9 changes: 5 additions & 4 deletions classes/Personalizacao_display.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,20 @@ private function getQuery($q){
return $res->fetchAll(PDO::FETCH_ASSOC);
}

//Começar por aqui
public function display_txt(){
$result = $this->getQuery("select * from selecao_paragrafo where nome_campo='" . $this->getCampo() . "';");
if (count($result) == 1){
$this->setConteudo($result[0]['paragrafo']);
echo('
<div><h1>' . $this->getCampo() . '</h1></div>
<p>' . nl2br($this->getConteudo()) . '</p>
<p>' . nl2br(htmlspecialchars($this->getConteudo())) . '</p>
');
}else{
$this->setConteudo(NO_DATA);
echo('
<div><h1>' . $this->getCampo() . '</h1></div>
<p>' . nl2br($this->getConteudo()) . '</p>
<p>' . nl2br(htmlspecialchars($this->getConteudo())) . '</p>
');
}
}
Expand All @@ -98,10 +99,10 @@ public function display_str(){
$result = $this->getQuery("select * from selecao_paragrafo where nome_campo='" . $this->getCampo() . "';");
if (count($result) == 1){
$this->setConteudo($result[0]['paragrafo']);
echo(nl2br($this->getConteudo()));
echo(nl2br(htmlspecialchars($this->getConteudo())));
}else{
$this->setConteudo(NO_DATA);
echo(nl2br($this->getConteudo()));
echo(nl2br(htmlspecialchars($this->getConteudo())));
}
}

Expand Down
Loading