Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
abc_aircraft_management/config.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
49 lines (46 sloc)
1.16 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
ini_set('date.timezone','Asia/Manila'); | |
date_default_timezone_set('Asia/Manila'); | |
session_start(); | |
require_once('initialize.php'); | |
require_once('classes/DBConnection.php'); | |
require_once('classes/SystemSettings.php'); | |
$db = new DBConnection; | |
$conn = $db->conn; | |
function redirect($url=''){ | |
if(!empty($url)) | |
echo '<script>location.href="'.base_url .$url.'"</script>'; | |
} | |
function validate_image($file){ | |
if(!empty($file)){ | |
// exit; | |
if(is_file(base_app.$file)){ | |
return base_url.$file; | |
}else{ | |
return base_url.'dist/img/no-image-available.png'; | |
} | |
}else{ | |
return base_url.'dist/img/no-image-available.png'; | |
} | |
} | |
function isMobileDevice(){ | |
$aMobileUA = array( | |
'/iphone/i' => 'iPhone', | |
'/ipod/i' => 'iPod', | |
'/ipad/i' => 'iPad', | |
'/android/i' => 'Android', | |
'/blackberry/i' => 'BlackBerry', | |
'/webos/i' => 'Mobile' | |
); | |
//Return true if Mobile User Agent is detected | |
foreach($aMobileUA as $sMobileKey => $sMobileOS){ | |
if(preg_match($sMobileKey, $_SERVER['HTTP_USER_AGENT'])){ | |
return true; | |
} | |
} | |
//Otherwise return false.. | |
return false; | |
} | |
ob_end_flush(); | |
?> |