Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. if (!function_exists('clean')){
  4.   function clean($stringin){
  5.     $stringout = preg_replace('/[^0-9]/', '', $stringin);
  6.     $stringout = str_pad($stringout, '0', '0', STR_PAD_LEFT);
  7.     return $stringout;
  8.   }
  9. }
  10.  
  11. if (!function_exists('total_url')){
  12.   function total_url(){
  13.     $server = base_url();
  14.     $endereco = $_SERVER ['REQUEST_URI'];
  15.     return $server . $endereco;
  16.   }
  17. }
  18.  
  19.  
  20. if (!function_exists('flash_message')){
  21.   function flash_message(){
  22.     if (isset($_SESSION['message'])){
  23.       return
  24.         '<div class="alert alert-info" role="alert">' . $_SESSION['message'] .
  25.         '<button type="button" class="close" data-dismiss="alert" aria-label="Close">
  26.            <span aria-hidden="true">&times;</span>
  27.          </button>
  28.        </div>';
  29.     }
  30.   }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement