예제 #1
0
파일: DB.php 프로젝트: bytemtek/znframework
 public function pagination($settings = array(), $output = true)
 {
     if (!is_array($settings)) {
         Error::set('Error', 'arrayParameter', '1.(settings)');
     }
     $limit = $this->pagination['limit'];
     $start = $this->pagination['start'];
     $settings['totalRows'] = $this->totalRows(true);
     $settings['limit'] = isset($limit) ? $limit : 10;
     $settings['start'] = isset($start) ? $start : NULL;
     $return = $output === true ? Pagination::create(NULL, $settings) : $settings;
     $this->pagination = array('start' => 0, 'limit' => 0);
     return $return;
 }
예제 #2
0
 public function pagination($table = '', $settings = array(), $returnType = 'object')
 {
     if (!is_array($settings)) {
         Error::set(lang('Error', 'arrayParameter', '1.(settings)'));
     }
     if (!empty($this->table)) {
         // Table yöntemi tanımlanmış ise
         // 1. parametre, 2. parametre olarak kullanılsın
         $returnType = $settings;
         $settings = $table;
         $table = $this->table;
         $this->table = NULL;
     }
     $limit = $this->pagination['limit'];
     $start = $this->pagination['start'];
     $this->calcFoundRows()->get($table);
     $result = $returnType === 'object' ? $this->result() : $this->resultArray();
     $return['result'] = $result;
     $return['totalRows'] = $this->totalRows();
     $settings['totalRows'] = $this->foundRows();
     $settings['limit'] = isset($limit) ? $limit : NULL;
     $settings['start'] = isset($start) ? $start : NULL;
     $return['create'] = Pagination::create(NULL, $settings);
     $return['settings'] = $settings;
     return $returnType === 'object' ? (object) $return : $return;
 }
예제 #3
0
파일: v.php 프로젝트: nylmarcos/estagio
            ?>
" class="btn btn-primary tool_tip" rel="tooltip" title="Clique para criar vincular"> Administrador </a></td>
							<td style="width: 30px;"><a href="~/usuario/vincular/<?php 
            echo $unidade->IdUnidade . '/' . $usuario->Id . '/3';
            ?>
"  class="btn btn-primary tool_tip" rel="tooltip" title="Clique para criar vincular"> Comum </a></td>
						<?php 
        }
        ?>
					</tr>
				<?php 
    }
    ?>
			<?php 
} else {
    ?>
				<tr>
					<td colspan="4">Não possui unidade cadastrada!</td>
				</tr>
			<?php 
}
?>
        </tbody>
    </table>
</div>
<div class="grid_12" style="text-align: center;">
	<?php 
echo Pagination::create('usuario/v/' . $usuario->Id . '/', $unidades->Total, $p);
?>
</div>
예제 #4
0
파일: index.php 프로젝트: nylmarcos/estagio
                        </td>
                        <td style="width: 30px;"><a href="javascript:void(0)" onclick="modal(<?php 
        echo $unidade->Id;
        ?>
,'unidade/excluir/','Tem certeza que deseja excluir a Unidade? ')" class="btn btn-danger tool_tip" rel="tooltip" title="Excluir"> <i class="icon-trash icon-white"></i></a></td>
                        <td style="width: 30px;"><a href="~/unidade/visualizar/<?php 
        echo $unidade->Id;
        ?>
" class="btn btn-success tool_tip" rel="tooltip" title="Visualizar"> <i class="icon-eye-open icon-white"></i></a></td>
                    </tr>
                <?php 
    }
    ?>
            <?php 
} else {
    ?>
                <tr>
                    <td colspan="4">Não possui unidade cadastrada!</td>
                </tr>
            <?php 
}
?>
        </tbody>
    </table>
</div>
<div class="grid_12" style="text-align: center;">
    <?php 
echo Pagination::create('unidade/index/', $unidades->Total, $p);
?>
</div>
예제 #5
0
    echo $user->getId();
    ?>
">
                                    <i class="halflings-icon white edit"></i>
                                </a>
                                <a class="btn btn-danger" href="deleteUser.php?id=<?php 
    echo $user->getId();
    ?>
">
                                    <i class="halflings-icon white trash"></i>
                                </a>
                            </td>
                        </tr>
                   <?php 
}
?>
                    </tbody>
                </table>
                <?php 
echo $pagination->create();
?>
            </div>
        </div><!--/span-->
    </div><!--/row-->




</div><!--/.fluid-container-->
<?php 
require_once 'common/footer.php';
예제 #6
0
파일: index.php 프로젝트: nylmarcos/estagio
    ?>
            <?php 
} else {
    ?>
                <tr>
                    <td colspan="4">Não possui unidade cadastrada!</td>
                </tr>
            <?php 
}
?>
        </tbody>
    </table>
</div>
<div class="grid_12" style="text-align: center;">
    <?php 
echo Pagination::create('usuario/index/', $usuarios->Total, $p);
?>
</div>

<div id="modal-help" class="modal hide">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">×</button>
		<h3 class="cliente-nome">AJUDA</h3>
	</div>
	<div class="modal-body">
		<table id="" class="table table-bordered table-striped table-condensed">
			<thead>
				<tr>
					<th style="text-align: center;">Imagem</th>
					<th style="text-align: center;">Significado</th>
				</tr>
예제 #7
0
<?php

include "./pagination.php";
$iLimit = 10;
$iPage = isset($_GET['page']) ? $_GET['page'] : 1;
$iStart = $iLimit * $iPage - $iLimit;
$oPaginate = new Pagination();
$aNames = $oPaginate->getNames($iStart, $iLimit);
$oPaginate->setCount($aNames['count']);
$oPaginate->setRange(3);
$oPaginate->setLimit($iLimit);
$oPaginate->setCurrentPage($iPage);
if ($aNames['count'] > 0) {
    foreach ($aNames['names'] as $r) {
        echo $r['name'] . '<br>';
    }
}
echo $oPaginate->create();