-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsprints.php
125 lines (93 loc) · 3.43 KB
/
sprints.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
<?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 sponsorship requests
//===========================
$sql_sprints = "SELECT ";
$sql_sprints .= "id, ";
$sql_sprints .= "subject, ";
$sql_sprints .= "DATE_FORMAT(open_agendas.when, '%b %D - %I:%i %p') AS date, ";
$sql_sprints .= "coordinator, ";
$sql_sprints .= "content, ";
$sql_sprints .= "DATE_FORMAT(created_at, '%b %d') ";
$sql_sprints .= "FROM open_agendas ";
$sql_sprints .= "WHERE type = 'sprint' ";
$sql_sprints .= "AND accepted = 1 ";
$sql_sprints .= "AND conference_id = 2";
$total_sprints = @mysql_query($sql_sprints, $connection) or die("Error #". mysql_errno() . ": " . mysql_error());
$total_found_sprints = @mysql_num_rows($sql_sprints);
$row_color=($row_count%2)?$row_1:$row_2;
do {
if ($row['subject'] != '')
{
$display_open_agenda .="
<h3><a href=\"sprint_detail.php?id=" . $row['id'] . "\">" . $row['subject'] . "</a></h3>
<p><label>Coordinator:</label> " . $row['coordinator'] . "</p>
" . myTruncate(Markdown($row['content']),300) . "";
if (strlen(Markdown($row['content'])) > 300 )
{
$display_open_agenda .=" <a href=\"sprint_detail.php?id=" . $row['id'] . "\"> more</a>";
}
$display_open_agenda .="<hr />";
}
$row_color=($row_count%2)?$row_1:$row_2;
$row_count++;
}
while($row = mysql_fetch_array($total_sprints));
?>
<!DOCTYPE html>
<html>
<?php $thisPage="Sprints"; ?>
<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 Sprints</h1>
<h2>Two Days of Awesome Hacking!</h2>
<p>SciPy 2013 will continue the tradition of two days of Code Sprints following the main conference program. Core developers of many of our favorite tools will be in town, so what better time to get involved with their development? Whether it’s your first time or your fiftieth, there’s nothing quite like sitting down at a table with people you may have only seen on mailing lists and Twitter. The SciPy sprint committee is calling for proposals for hosted sprints following the main sessions of the conference on June 28th-29th.</p>
<p>To suggest a Sprint, click the Suggest a Sprint button.</p>
<form method="get" name="form2" action="suggest_sprint.php">
<div style="display: block; width: 10em; margin: 0 auto;">
<input type="submit" name="Submit" value="Suggest a Sprint">
</div>
</form>
<hr />
<div id="open_agenda">
<table id="registrants_table" width="600">
<?php echo $display_open_agenda ?>
</table>
</div>
</section>
<div style="clear:both;"></div>
<footer id="page_footer">
<?php include('inc/page_footer.php') ?>
</footer>
</div>
</body>
</html>