Atualizando registros
This commit is contained in:
parent
fccf70af03
commit
a7ceb759d4
2 changed files with 3 additions and 73 deletions
70
vendor/controller/main/Main.class.php
vendored
70
vendor/controller/main/Main.class.php
vendored
|
|
@ -383,76 +383,6 @@ class Main
|
|||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** paginação */
|
||||
public function pagination(int $numberRecords, int $start, int $max, int $page, string $queryString, string $message, string $form=null)
|
||||
{
|
||||
|
||||
/** Quantidade de registros junto ao banco de dados */
|
||||
$this->numberRecords = $numberRecords;
|
||||
$this->start = $start;
|
||||
$this->max = $max;
|
||||
$this->page = $page;
|
||||
$this->queryString = $queryString;
|
||||
$this->message = $message;
|
||||
$this->form = $form;
|
||||
|
||||
/** Número de colunas para a paginação */
|
||||
$this->pagination = $this->LoadConfigPublic()->{'app'}->{'datagrid'}->{'pagination'};
|
||||
|
||||
/** Define o número de colunas de acordo com a quantidade de registros */
|
||||
$this->paginationColumns = ceil($this->numberRecords / $this->max);
|
||||
|
||||
/** Verifica se é para gerar a paginação */
|
||||
if($this->paginationColumns > 1){
|
||||
|
||||
/** Prepara a paginação de registros */
|
||||
$this->nav = '<nav>';
|
||||
$this->nav .= '<ul class="pagination justify-content-center">';
|
||||
|
||||
/** Verifica se o número de colunas de paginação é superior a quantidade de paginas na tela */
|
||||
if($this->paginationColumns > $this->pagination){
|
||||
|
||||
$this->nav .= ' <li class="page-item '. ($this->page == 0 ? "disabled" : "" ).'">';
|
||||
$this->nav .= ' <a class="page-link" href="#" onclick="request(\''.$this->queryString.'&start='.( ($this->start/$this->max).'&page='.($this->page-1) ).'&\'+$(\''.$this->form.'\').serialize(), \'#loadContent\', true, \'\', 0, \'\', \''.$this->message.'\', \'random\', \'circle\', \'sm\', true);">Anterior</a>';
|
||||
$this->nav .= ' </li>';
|
||||
|
||||
}
|
||||
|
||||
/** Lista o número de paginas e seus respectivos links */
|
||||
$i=0;
|
||||
for($p = ($this->page*$this->pagination); $p < $this->paginationColumns; $p++){
|
||||
|
||||
$this->nav .= ' <li class="page-item '.( ($p*$max) == $this->start ? 'active' : '' ).'"><a class="page-link" href="#" onclick="request(\''.$this->queryString.'&start='.($p*$this->max).'&page='.$this->page.'&\'+$(\''.$this->form.'\').serialize(), \'#loadContent\', true, \'\', 0, \'\', \''.$this->message.'\', \'random\', \'circle\', \'sm\', true);">'.($p+1).'</a></li>';
|
||||
|
||||
if(($i+1) == $this->pagination){
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
}
|
||||
|
||||
/** Verifica se o número de colunas de paginação é superior a quantidade de paginas na tela */
|
||||
if($this->paginationColumns > $this->pagination){
|
||||
|
||||
$this->nav .= ' <li class="page-item '.( ($p+1) == $this->paginationColumns ? "disabled" : "" ).'">';
|
||||
$this->nav .= ' <a class="page-link" href="#" onclick="request(\''.$this->queryString.'&start='.( ($p*$this->max)+$this->max.'&page='.($this->page+1) ).'&\'+$(\''.$this->form.'\').serialize(), \'#loadContent\', true, \'\', 0, \'\', \''.$this->message.'\', \'random\', \'circle\', \'sm\', true);">Próximo</a>';
|
||||
$this->nav .= ' </li>';
|
||||
|
||||
}
|
||||
|
||||
$this->nav .= ' </ul>';
|
||||
$this->nav .= '</nav>';
|
||||
|
||||
}
|
||||
|
||||
/** Retorna o objeto de paginação */
|
||||
return $this->nav;
|
||||
}
|
||||
|
||||
public function CentimeterToPoint($centimeter)
|
||||
{
|
||||
|
|
|
|||
6
vendor/model/Host.class.php
vendored
6
vendor/model/Host.class.php
vendored
|
|
@ -16,21 +16,21 @@ class Host
|
|||
/** Pego o usuário de acesso **/
|
||||
public function getUser()
|
||||
{
|
||||
#return $user = (string)"softw846_backup";
|
||||
|
||||
return $user = (string)"mysql";
|
||||
}
|
||||
|
||||
/** Pego a senha de acesso **/
|
||||
public function getPassword()
|
||||
{
|
||||
#return $password = (string)"@Sun147oi.";
|
||||
|
||||
return $password = (string)"sun147oi";
|
||||
}
|
||||
|
||||
/** Pego o charset de acesso **/
|
||||
public function getCharset()
|
||||
{
|
||||
#return $charset = (string)"charset=utf8";
|
||||
|
||||
return $charset = (string)"charset=utf8";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue