-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_func_info.php
34 lines (29 loc) · 998 Bytes
/
_func_info.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
<?php
$homepage = "index.php";
$devicepage = "device.php";
$editdevicepage = "edit_device.php";
$device_detail = "device_detail.php";
$_mdevicepage = "_manage_device.php";
$dbhost = "10.71.10.71";
$dbaccount = "ddp";
$dbpassword = "ddprocks";
$dbname = "ddp";
$tb_device = "device";
$tb_use = "user";
$tb_data = "data";
$tb_datatype = "datatype";
$dbcon = mysqli_connect($dbhost, $dbaccount, $dbpassword, $dbname) or die("Fail to connect to database: " . mysqli_connect_error());
function gotoThePage($page) { //Not appropriate for the pure PHP page without HTML outputs;
echo "<script language='javascript' type='text/javascript'> window.location.href='" . $page . "'</script>";
}
function devicePicPath($type) {
$picPath = "pic/";
switch($type) {
case 1: return $picPath."humiSen.png";
case 2: return $picPath."lightSen.png";
case 3: return $picPath."temSen.png";
default: break;
}
return $picPath."DefaultSen.png";
}
?>