GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — minuteit/view_circulars.php at master · rachetm/minuteit

Expand file tree

/

view_circulars.php

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
256 lines (234 loc) · 10.1 KB
/

view_circulars.php

Copy path

File metadata and controls

256 lines (234 loc) · 10.1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<?php
session_start();
require_once 'include/db.php';
date_default_timezone_set('Asia/Kolkata');
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
function circ_deet($row = null)
{
if ($row != null) {
$date = explode("-", $row['c_date']);
$c_date = $date[2] . "-" . $date[1] . "-" . $date[0];
$date = explode("-", $row['m_date']);
$m_date = $date[2] . "-" . $date[1] . "-" . $date[0];
echo '<div class="row" id="circ_' . $row['c_id'] . '">
<div class="col-lg-12">
<div class="tile">
<div class="table-responsive tablecon">
<table class="table table-borderless">
<tbody>
<tr><td><b>Circular Date</b></td><td>' . $c_date . '</td></tr>
<tr><td><b>Agenda</b></td><td class="info">' . nl2br($row['agenda']) . '</td></tr>
<tr><td><b>Venue</b></td><td>' . $row['venue'] . '</td></tr>
<tr><td><b>Meeting Date</b></td><td>' . $m_date . '</td></tr>
<tr><td><b>Meeting Time</b></td><td>' . timeConvert($row['time']) . '</td></tr>';
echo '</tbody>
</table>
</div>
<div class="row float-xl-right">';
// <div class="col-auto mb-2">
// <form class="form-inline" action="email_circ.php" method="GET">
// <input type="hidden" name="c_id" value=' . $row['c_id'] . '>
// <button class="btn btn-warning" type="submit"><span class="fa fa-envelope fa_cus mb-1"></span>Email</button>
// </form>
// </div>
echo '<div class="col-auto">
<form class="form-inline" action="docGenerate.php" method="POST">
<input type="hidden" name="id" value="' . $row['c_id'] . '">
<input type="hidden" name="type" value="circular">
<button class="btn btn-info doc_download" type="submit"><span class="fa fa-file-word fa_cus mb-1"></span>Download</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="border-top my-3 mx-5" id="meet_' . $row['c_id'] . '_hr' . '"></div>';
} else {
$date = explode("-", $_POST['datepick']);
$date = $date[2] . "-" . $date[1] . "-" . $date[0];
echo '<div class="row">
<div class="col-lg-12">
<div class="table-responsive tablecon">
<table class="table table-borderless">
<tbody>
<tr><td style="text-align:center">No records found for <b>' . $date . '</b></td>
</tbody>
</table>
</div>
</div>
</div>';
}
}
function timeConvert($time)
{
$explodedTime = explode(":", $time);
// $suffix = " a.m";
if ($explodedTime[0] > 12)
{
if( ($explodedTime[0] >= 22 ))
{
$time = ($explodedTime[0] - 12);
$time .= ":".$explodedTime[1];
$suffix = " p.m";
}
else
{
$time = ($explodedTime[0] - 12) % 10;
$time .= ":" . $explodedTime[1];
$suffix = " p.m";
}
}
else if ($explodedTime[0] <= 12)
{
if( ($explodedTime[0]) >= 10)
{
$time = $explodedTime[0];
$time .= ":".$explodedTime[1];
if($explodedTime[0] == 12)
$suffix = " p.m";
else
$suffix = " a.m";
}
else {
$time = $explodedTime[0] % 10;
$time .= ":" . $explodedTime[1];
$suffix = " a.m";
}
}
$time .= $suffix;
return $time;
}
function display($con)
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$stmt = $con->prepare("SELECT * FROM `circulars` WHERE `c_date` = ? ORDER BY `c_date` DESC, `m_date` DESC");
$date = $_POST['datepick'];
$stmt->bind_param("s", $date);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows == 0) {
circ_deet(null);
} else {
while ($row = $result->fetch_assoc()) {
circ_deet($row);
}
}
} else {
$stmt = $con->prepare("SELECT * FROM `circulars` ORDER BY `c_date` DESC, `m_date` DESC");
$stmt->execute();
$result = $stmt->get_result();
while ($row = $result->fetch_assoc()) {
circ_deet($row);
}
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MinuteIt • Meetings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/home.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="src/all.css">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:400,300,600" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,700,900" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet">
</head>
<style>
.remaining-content span {
display: none;
}
@media (min-width: 992px) {
.container {
margin-bottom: 30px;
}
}
</style>
<body>
<?php
include "navbar.php";
include "modals.php";
?>
<div class="container" id="msgcon">
<span id="msg"></span>
<?php
if (isset($_SESSION['message']) and !empty($_SESSION['message'])) {
echo "<div class='alert alert-" . $_SESSION['type'] . "'>" . $_SESSION['message'] . "</div>";
unset($_SESSION['message']);
$_SESSION['error'] = 0;
}
?>
</div>
<div class="container" id="filter">
<div class="container row"><a class="btn btn-primary" href="home.php" id="back"><span class="fa fa-chevron-left mr-2 mb-1"></span>Back</a></div>
<form action="view_circulars.php" method="post">
<div class="form-row">
<div class="col-auto mb-2">
<input class="form-control" id="date" type="date" name="datepick" required="">
</div>
<div class="col-auto">
<button type="submit" class="btn btn-success"><span class="fa fa-filter fa_cus mb-1"></span>Filter</button>
</div>
<div class="col-auto">
<button type="button" onclick="location.href='view_circulars.php'" class="btn btn-danger"><span class="fa fa-times fa_cus mb-1"></span>Remove Filter</button>
</div>
</div>
</form>
</div>
<div class="container">
<?php
display($con);
?>
</div>
<script src="src/jquery-3.3.1.min.js"></script>
<script src="js/formatting.js"></script>
<script src="js/add_rmv_group.js"></script>
<script src="js/group_data_fetch.js"></script>
<script src="js/grp_members_manage.js"></script>
<script src="js/member_manage.js"></script>
<script src="js/add_action.js"></script>
<script src="js/modal_autofocus.js"></script>
<script src="js/persistentFormData.js"></script>
<script src="js/docGenerate.js"></script>
<script src="src/popper.min.js"></script>
<script src="src/bootstrap.min.js"></script>
<script>
var showChar = 100;
var ellipsestext = "...";
var moretext = "See More";
var lesstext = "See Less";
$('.info').each(function() {
var content = $(this).html();
if (content.length > showChar) {
var show_content = content.substr(0, showChar);
var hide_content = content.substr(showChar, content.length - showChar);
var html = show_content + '<span class="moreelipses">' + ellipsestext + '</span><span class="remaining-content"><span>' + hide_content + '</span>&nbsp;&nbsp;<a href="" class="morelink">' + moretext + '</a></span>';
$(this).html(html);
}
});
$(".morelink").click(function() {
if ($(this).hasClass("less")) {
$(this).removeClass("less");
$(this).html(moretext);
} else {
$(this).addClass("less");
$(this).html(lesstext);
}
$(this).parent().prev().toggle();
$(this).prev().toggle();
return false;
});
</script>
</body>
</html>
<?php
} else {
$_SESSION['message'] = "You are logged out. Please login to continue!";
$_SESSION['type'] = 'danger';
header('Location: ./index.php');
}
?>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.