-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes_view.php
80 lines (53 loc) · 2.04 KB
/
notes_view.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
include_once('connect.php');
include_once('functions.php');
session_start();
if(!isset($_SESSION['curr_id'])){header("Location: index.php");}
if(isset($_GET['p_id'])){
$n_id = $_GET['p_id'];
}
$table = $_SESSION['curr_id'].'notes';
$query = "SELECT * FROM $table WHERE id = $n_id";
$result = $connection->query($query);
confirmQuery($result);
$row = $result->fetch_assoc();
$note_id = $row['id'];
$note_title = $row['title'];
$note_content = $row['noteContent'];
$note_priority = $row['priority'];
$note_label = $row['labels'];
$note_image = $row['imgPath'];
$note_e_time = $row['editTime'];
$note_c_time = $row['createTime'];
?>
<?php include_once('includes/header.php'); ?>
<!-- Navigation -->
<?php include_once('includes/navigation.php') ?>
<!-- Content -->
<div class="container">
<div class="row">
<!-- Note View -->
<div class="col-lg-8">
<!-- Title -->
<h1><?php echo $note_title; ?></h1>
<!-- label -->
<p class="lead"><?php echo "Label: " .$note_label; ?></p>
<hr>
<p style="text-align:right;">
Priority: <?php echo $note_priority; ?>
</p>
<!-- Date/Time -->
<p><span class="glyphicon glyphicon-time"></span> Created on <?php echo $note_c_time; ?></p>
<p><span class="glyphicon glyphicon-time"></span> Edited on <?php echo $note_e_time; ?></p>
<hr>
<!-- Image -->
<img class="img-responsive" src="<?php echo "uploads/" . $note_image; ?>" alt="">
<hr>
<!-- Content -->
<p class="lead"><?php echo $note_content; ?></p>
<hr>
</div>
<!-- Sidebar -->
<?php include_once('includes/sidebar_edit.php') ?>
<!-- Footer -->
<?php include_once('includes/footer.php') ?>