Advertisement
Guest User

Conv

a guest
May 19th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.02 KB | None | 0 0
  1. <?php
  2. ini_set('display_errors', 0);
  3. error_reporting(E_ALL);
  4. require_once('config/connect.php');
  5. include_once('functions/conv_sql_search.php');
  6. ?>
  7.  
  8. <!doctype html>
  9. <html>
  10. <head>
  11. <meta charset="iso-8859-1">
  12. <title>MPF - Mercado Pessoa F&iacute;sica</title>
  13. </head>
  14. <?php include_once('config/themes.php'); ?>
  15. <script>
  16.     function contato(el){
  17.         var currentId = $(el).attr('id');
  18.         $("#modal-"+currentId).modal('show');
  19.     }
  20.     $(function () {
  21.       $('[data-toggle="tooltip"]').tooltip()
  22.     })
  23. </script>
  24. <body>
  25.  
  26. <!-- Menu Superior -->
  27. <?php include_once ('config/header-menu.php'); ?>
  28.  
  29. <!-- Campo de Busca -->
  30. <div class="row">
  31.     <div class="col-md-6 col-md-offset-3">
  32.         <div class="panel panel-primary">
  33.             <div align="center" class="panel-body">
  34.                 <form action="conv_busca.php" method="get" name="form1" class="form-inline" id="form1">
  35.                     <div class="form-group">
  36.                         <input name="q" type="text" class="form-control" id="q" form="form1" value="<?= $_GET['q']; ?>" size="30" maxlength="255" />&nbsp;
  37.                         <input type="submit" class="btn btn-primary" form="form1" value="Buscar" />
  38.                     </div>
  39.                 </form>
  40.             </div>
  41.         </div>
  42.     </div>
  43. </div>
  44.     <!-- #FIM Campo de Busca -->
  45.    
  46.     <br>
  47.    
  48.     <!-- Resultados -->
  49.     <div class="row">
  50.     <?php
  51.         if($rows_rslt_query_all == 0){
  52.             $txt = "<div align=\"center\">";
  53.             $txt .= "Nenhum Convenio foi encontrado!";
  54.             $txt .= "</div>";
  55.             echo $txt;
  56.         }else{
  57.             include_once ('functions/conv_table_results.php');
  58.         } ?>
  59.     <!-- #FIM Resultados -->
  60.             </div>
  61.     <br>
  62.     <!-- Paginação -->
  63.     <div align="center">
  64.         <nav>
  65.             <ul class="pagination pagination-sm">
  66.             <li <?php if($_GET['p'] <= 1){ echo "class=\"disabled\""; } ?>>
  67.                 <a <?php if($_GET['p'] > 1 ){ echo "href=\"?q=".$busca."&p=".($pgn_atual-1)."\""; } ?> aria-label="First">
  68.                     <span aria-hidden="true">&laquo;</span>
  69.                 </a>
  70.             </li>
  71.             <?php
  72.                 for($i = 1 ; $i <= $pgn_total ; $i++ ){
  73.             ?>
  74.            
  75.             <li <?php if($i == $pgn_atual){ echo "class=\"active\""; } ?>>
  76.                 <a href="?q=<?= $busca; ?>&p=<?= $i; ?>"><?php print str_pad($i, 2, "0", 0); if($i == $_GET['p']){echo "<span class=\"sr-only\">(current)</span>"; } ?></a>
  77.             </li>
  78.             <?php
  79.             }
  80.             ?>
  81.             <li <?php if($_GET['p'] <= 1){ echo "class=\"disabled\""; } ?>>
  82.                 <a <?php if($_GET['p'] > 1 ){ echo "href=\"?q=".$busca."&p=".($pgn_atual+1)."\""; } ?> aria-label="First">
  83.                     <span aria-hidden="true">&raquo;</span>
  84.                 </a>
  85.             </li>
  86.             </ul>  
  87. </div>
  88.     <!-- #FIM Paginação -->
  89. </body>
  90. </html>
  91. <?php
  92.     mysql_free_result($query_db);
  93.     mysql_free_result($query_db_all);  
  94. ?>
  95.  
  96. -------------------------------------------------- themes.php -----------------------------------------------------
  97.  
  98. <script src="js/jquery.js" type="text/javascript"></script>
  99. <script src="js/bootstrap.js" type="text/javascript"></script>
  100. <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement