<?php 

function _greetin(){
date_default_timezone_set('Africa/lagos');
// 24-hour format of an hour without leading zeros (0 through 23)
$Hour = date('H');

if ( $Hour >= 1 && $Hour <= 11 ) {

  $salute = 'Good Morning   ';
} else if ( $Hour >= 12 && $Hour <= 16 ) {

  $salute = 'Good Afterrnoon  ';
} else if ( $Hour >= 17 || $Hour <= 22 ) {

  $salute = 'Good Evening   ';
}
else if ( $Hour >= 23 || $Hour <= 24 ) {

    $salute = 'Keeping Late Night?   ';
}
return $salute;
}

//
function random(){
$letters = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),0,2);
return rand(0000,9999).$letters;
}

function get_user(){ global $dbconn;
$get_logged_in = mysqli_query($dbconn,"SELECT * FROM login where username='{$_SESSION['sales']}' ");
return mysqli_fetch_assoc($get_logged_in);
}






?>