-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommunication.php
More file actions
177 lines (153 loc) · 5.49 KB
/
communication.php
File metadata and controls
177 lines (153 loc) · 5.49 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
session_start();
// Έλεγχος αν ο χρήστης είναι συνδεδεμένος
if (!isset($_SESSION['user_id'])) {
header('Location: index.php');
exit();
}
// Ανάκτηση στοιχείων του συνδεδεμένου χρήστη
$onoma = $_SESSION['onoma'];
$rolos = $_SESSION['rolos'];
?>
<!DOCTYPE html>
<html lang="el">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Επικοινωνία</title>
<style>
body {
font-family: sans-serif;
margin: 0;
padding: 0;
height: 100%;
background-color: #f0f0f0;
background-image: url("im2.jpg");
background-size: cover;
}
.container {
max-width: 1200px;
margin: 20px auto;
background-color: rgba(10, 9, 9, 0.9);
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: white;
margin-bottom: 20px;
}
.button-container {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
margin-bottom: 20px;
gap: 10px;
}
.button {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
background-color: #007bff;
color: #fff;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.button:hover {
background-color: #0056b3;
}
.logout {
display: flex;
justify-content: center;
}
.logout a {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
background-color: #ff4d4d;
color: #fff;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.logout a:hover {
background-color: #d43f3f;
}
.content {
text-align: center;
line-height: 1.6;
color: white;
}
form {
background-color: rgba(10, 9, 9, 0.9);
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
input[type="email"], input[type="text"], textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 5px;
box-sizing: border-box;
}
textarea {
height: 150px;
resize: vertical;
}
input[type="submit"] {
padding: 10px 20px;
background-color: #007bff;
color: black;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<h1>Επικοινωνία</h1>
<div class="button-container">
<a href="home.php" class="button">Αρχική Σελίδα</a>
<a href="announcement.php" class="button">Ανακοινώσεις</a>
<a href="communication.php" class="button">Επικοινωνία</a>
<a href="documents.php" class="button">Έγγραφα Μαθήματος</a>
<a href="homework.php" class="button">Εργασίες</a>
<?php if (isset($rolos) && $rolos === 'Tutor'): ?>
<a href="users.php" class="button">Χρήστες</a>
<?php endif; ?>
<div class="logout">
<a href="logout.php" class="button">Αποσύνδεση</a>
</div>
</div>
<div class="content">
<p>Συνδεδεμένος χρήστης: <?php echo htmlspecialchars($onoma); ?> (<?php echo htmlspecialchars($rolos); ?>)</p>
<p>Επιλέξτε έναν από τους παρακάτω τρόπους για να επικοινωνήσετε με τον καθηγητή:</p>
<h2>Web φόρμα</h2>
<p>Συμπληρώστε την παρακάτω φόρμα:</p>
<form action="send_email.php" method="post">
<label for="email">Email αποστολέα:</label><br>
<input type="email" id="email" name="email" required><br><br>
<label for="topic">Θέμα:</label><br>
<input type="text" id="topic" name="topic" required><br><br>
<label for="message">Μήνυμα:</label><br>
<textarea id="message" name="message" rows="10" cols="50" required></textarea><br><br>
<input type="submit" value="Αποστολή">
</form>
<h2>Email</h2>
<p>Μπορείτε επίσης να στείλετε email απευθείας στο: <a href="mailto:nova.thanos@gmail.com">nova.thanos@gmail.com</a></p>
</div>
</div>
</body>
</html>