-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbofs.php
167 lines (126 loc) · 4.98 KB
/
bofs.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
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
<?php
session_start();
// Original PHP code by Chirp Internet: www.chirp.com.au
// Please acknowledge use of this code by including this header.
function myTruncate($string, $limit, $break=".", $pad="...")
{
// return with no change if string is shorter than $limit
if(strlen($string) <= $limit) return $string;
// is $break present between $limit and the end of the string?
if(false !== ($breakpoint = strpos($string, $break, $limit))) {
if($breakpoint < strlen($string) - 1) {
$string = substr($string, 0, $breakpoint) . $pad;
}
}
return $string;
}
include('inc/db_conn.php');
include_once "inc/markdown.php";
$row_1="odd";
$row_2="even";
$row_count=1;
//===========================
// pull bofs
//===========================
$sql_bofs = "SELECT ";
$sql_bofs .= "open_agendas.id, ";
$sql_bofs .= "subject, ";
$sql_bofs .= "DATE_FORMAT(open_agendas.when, '%b %D - %I:%i %p') AS date, ";
$sql_bofs .= "moderator, ";
$sql_bofs .= "content, ";
$sql_bofs .= "DATE_FORMAT(open_agendas.created_at, '%b %d'), ";
$sql_bofs .= "locations.name, ";
$sql_bofs .= "DATE_FORMAT(start_time, '%Y') AS start_year, ";
$sql_bofs .= "DATE_FORMAT(start_time, '%b') AS start_month, ";
$sql_bofs .= "DATE_FORMAT(start_time, '%d') AS start_day, ";
$sql_bofs .= "DATE_FORMAT(start_time, '%W') AS start_dow, ";
$sql_bofs .= "DATE_FORMAT(start_time, '%l:%i %p') AS start_time, ";
$sql_bofs .= "start_time AS start_order, ";
$sql_bofs .= "DATE_FORMAT(end_time, '%Y') AS end_year, ";
$sql_bofs .= "DATE_FORMAT(end_time, '%c') AS end_month, ";
$sql_bofs .= "DATE_FORMAT(end_time, '%d') AS end_day, ";
$sql_bofs .= "DATE_FORMAT(end_time, '%l:%i %p') AS end_time ";
$sql_bofs .= "FROM open_agendas ";
$sql_bofs .= "LEFT JOIN schedules ";
$sql_bofs .= "ON schedules.open_agenda_id = open_agendas.id ";
$sql_bofs .= "LEFT JOIN locations ";
$sql_bofs .= "ON location_id = locations.id ";
$sql_bofs .= "WHERE type = 'bof' ";
$sql_bofs .= "AND accepted = 1 ";
$sql_bofs .= "AND conference_id = 2 ";
$sql_bofs .= "ORDER BY start_order, subject";
$total_bofs = @mysql_query($sql_bofs, $connection) or die("Error #". mysql_errno() . ": " . mysql_error());
$total_found_bofs = @mysql_num_rows($sql_bofs);
$row_color=($row_count%2)?$row_1:$row_2;
do {
if ($row['subject'] != '')
{
$display_open_agenda .="
<h3><a href=\"bof_detail.php?id=" . $row['id'] . "\">" . $row['subject'] . "</a></h3>";
if($row['start_month'] != '')
{
$display_open_agenda .="<div class=\"cell, schedule_info\">" . $row['start_dow'] . "<br />
<div class=\"icon_date\" style=\"margin: 0 auto;\">" . $row['start_month'] . "<br /><span class=\"icon_date_day\">" . $row['start_day'] . "</span></div>
" . $row['start_time'] . "<br />
" . $row['end_time'] . "<br />
Room: <a href=\"location_floor_map.php\">" . $row['name'] . "</a>
</div>";
}
$display_open_agenda .="<p><label>Moderator:</label> " . $row['moderator'] . "</p>
" . myTruncate(Markdown($row['content']),350) . "";
if (strlen(Markdown($row['content'])) > 350 )
{
$display_open_agenda .="<a href=\"bof_detail.php?id=" . $row['id'] . "\"> View complete description</a>";
}
$display_open_agenda .="<div style=\"clear: both;\"></div><hr />";
}
$row_color=($row_count%2)?$row_1:$row_2;
$row_count++;
}
while($row = mysql_fetch_array($total_bofs));
?>
<!DOCTYPE html>
<html>
<?php $thisPage="Birds of Feather"; ?>
<head>
<?php include('inc/header.php') ?>
<link rel="shortcut icon" href="http://conference.scipy.org/scipy2013/favicon.ico" />
</head>
<body>
<div id="container">
<?php include('inc/page_headers.php') ?>
<section id="sidebar">
<?php include("inc/sponsors.php") ?>
</section>
<section id="main-content">
<h1>SciPy BoFs</h1>
<p>SciPy 2013 has plenty of opportunities to get together and discuss primary, tangential, or unrelated topics in an interactive, discussion setting.</p>
<p>In an effort to increase the opportunities for community building,
this year at SciPy the organizers would like to emphasize the use of
birds of a feather (BoFs) sessions. Our current vision for these
sessions include short presentations by a panel and a moderator with
the bulk of the time spent opening up the discussion to everyone in attendance. We
will organize a number of BoFs that are of general interest such as
state-of-the-project and BoFs based on the themes of the conference
and the mini-symposia topics.</p>
<p>We would like to solicit the community for ideas and organizers for
other BoF topics. Please include a small description of the BoF,
possible panelists, and whether you would be willing to moderate.</p>
<p>To suggest a Birds-of-a-Feather session click the Suggest a BoF button.</p>
<form method="get" name="form2" action="suggest_bof.php">
<div style="display: block; width: 10em; margin: 0 auto;">
<input type="submit" name="Submit" value="Suggest a BoF">
</div>
</form>
<hr />
<div id="open_agenda">
<?php echo $display_open_agenda ?>
</div>
</section>
<div style="clear:both;"></div>
<footer id="page_footer">
<?php include('inc/page_footer.php') ?>
</footer>
</div>
</body>
</html>