Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $DB_host = "localhost";
- $DB_user = "root";
- $DB_pass = "";
- $DB_name = "dbpdo";
- try
- {
- $DB_con = new PDO("mysql:host{$DB_host}; dbname={$DB_name}",$DB_user,$DB_pass);
- $DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }
- catch (PDOException $e)
- {
- echo $e->getMessage();
- }
- include_once 'class.crud.php';
- $crud = new crud($DB_con);
- ?>
- <?php include_once 'dbconfig.php'; ?>
- <?php include_once 'header.php'; ?>
- <div class="clearfix"></div>
- <div class="container">
- <a href="add-data.php" class="btn btn-large btn-info"><i class="glyphicon glyphicon-plus"></i> Gravar</a>
- </div><!--container-->
- <div class="clearfix"></div><br />
- <div class="container">
- <table class='table table-border table-responsive'>
- <tr>
- <th>#</th>
- <th>Nome</th>
- <th>Sobrenome</th>
- <th>Email</th>
- <th>Telefone</th>
- <th colspan="2" align="center">Ação</th>
- </tr>
- <?php
- $query="SELECT * FROM tbl_usuarios";
- $record_per_page=3;
- $newquery=$crud->paging($query,$records_per_page);
- $crud->dataview($newquery);
- ?>
- <tr>
- <td colspan="7" align="center">
- <div class="pagination-wrap">
- <?php $crud->paginglink($query,$record_per_page); ?>
- </div><!--pagination-wrap-->
- </td>
- </tr>
- </table>
- </div><!--container-->
- <?php include_once 'footer.php';?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement