-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsprint_detail.php
103 lines (72 loc) · 2.11 KB
/
sprint_detail.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
<?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";
$id = $_GET['id'];
$row_1="odd";
$row_2="even";
$row_count=1;
//===========================
// pull open agenda item
//===========================
$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 id = $id";
$total_sprints = @mysql_query($sql_sprints, $connection) or die("Error #". mysql_errno() . ": " . mysql_error());
do {
if ($row['subject'] != '')
{
$display_sprints .="
<h1>" . $row['subject'] . "</h1>
<p>Date Time:</label> " . $row['date'] . "<label><br />
Coordinator:</label> " . $row['coordinator'] . "</p>
" . Markdown($row['content']) . "";
}
$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">
<?php echo $display_sprints ?>
</section>
<div style="clear:both;"></div>
<footer id="page_footer">
<?php include('inc/page_footer.php') ?>
</footer>
</div>
</body>
</html>