-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
43 lines (38 loc) · 1014 Bytes
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
session_start();
error_reporting(E_ALL);
date_default_timezone_set('Asia/Colombo');
Global $con;
//$con = mysqli_connect("us-cdbr-azure-southcentral-f.cloudapp.net","bfe87d83d52bf6","4d3b3617","icareu16");
$con = mysqli_connect("localhost","root","","icareu");
//=== root folder
//$root = "/"; <=== for remote host
$root = "/wwwroot"; // <=== for local host
$timeoutPeriod = 1800; // in seconds
function loginCheck($username, $password){
return true;
}
function debug($string){
$handle = fopen("debugout.txt","a");
fwrite($handle,date('Y-m-d h:i:s A')." : ".$string."\n");
fclose($handle);
}
function initializeName($name){
try{
$parts = preg_split("~ ~",$name);
$init = '';
for ($i = 0; $i < count($parts)-1; $i++){
$init .= $parts[$i][0].'.';
}
return $init." ".$parts[count($parts)-1];
}
catch (Exception $e){
return $name;
}
}
function shortName($name){
$parts = preg_split("~ ~",$name);
$sname = $parts[count($parts)-2]." ".$parts[count($parts)-1];
return $sname;
}
?>