forked from nairAnhoJ/ArvieCSP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex2.php
More file actions
59 lines (50 loc) · 1.98 KB
/
index2.php
File metadata and controls
59 lines (50 loc) · 1.98 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
// include "./includes/auth/session.php";
session_start();
include_once ("./includes/config/conn.php");
$db= $conn;
date_default_timezone_set("Asia/Singapore");
$date = new DateTime();
$completeDateNow = $date->format('M d, Y');
$day = $date->format('D');
$timenow = date("h:i a");
// $sqlinsertTransact2= "INSERT INTO `points_report`( `member_id`, `date`, `time`, `month`, `year`, `points_earned`) VALUES ('1234','11-04-2022','$timenow','Nov','2022','10')";
// mysqli_query($conn, $sqlinsertTransact2);
// if($timenow=="07:00 am"){
// $sqlinsertTransact2= "INSERT INTO `points_report`( `member_id`, `date`, `time`, `month`, `year`, `points_earned`) VALUES ('1234','11-04-2022','$timenow','Nov','2022','10'))";
// mysqli_query($conn, $sqlinsertTransact2);
// }
header("login.php");
if(!isset( $_SESSION['loggedin'])){
header("location:./login.php");
}else{
if($_SESSION['permission']=='administ'){
header("location:./admin/index.php");
}
}
if(isset( $_SESSION['loggedin'])){
if($_SESSION['permission']=='administ'){
header("location:./admin/index.php");
}else{
header("location: ./user/index.php");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./styles/styles.css">
<!-- <link rel="stylesheet" href="./dist/output.css"> -->
<link rel="stylesheet" href="https://unpkg.com/flowbite@1.5.3/dist/flowbite.min.css" />
<title>Arvie Direct Sales</title>
<script src="./js/tailwind-3.1.8.js"></script>
<script src="https://unpkg.com/flowbite@1.5.3/dist/flowbite.js"></script>
<script src="./js/jquery-3.6.1.min.js"></script>
</head>
<body>
<?php include_once "./header.php"; echo $admin; ?>
</body>
</html>