Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (51 sloc) 1.536 kB
<?php
include('inc.php');
include('templates/header.php');
$graph = new Model_Graph(get('id'));
if($graph->userID != $user->id) {
echo 'error';
} else {
echo '<div style="padding: 30px;">';
echo '<h2>' . $graph->name() . '</h2>';
$data = $graph->getData();
foreach($data as $row) {
if($row['notes']) {
echo '<div id="note_' . $row['timestamp'] . '" style="display: none;" class="note" title="' . date('n/j/Y g:ia', ($row['timestamp']/1000)) . '">';
foreach($row['notes'] as $note) {
if($note['text'])
echo '<p>' . formatText($note['text']) . '</p>';
if($note['imageURL'])
echo '<p><img src="' . $note['imageURL'] . '" width="300" /></p>';
}
echo '</div>';
}
}
echo '<table>';
foreach($data as $row) {
echo '<tr>';
echo '<td style="font-size: 9pt; width: 140px;">';
if($row['notes'])
echo '<a href="javascript:void(0);" id="showNote_' . $row['timestamp'] . '" class="showNote">';
echo date('Y-m-d H:i:s', $row['timestamp']/1000);
if($row['notes'])
echo '</a>';
echo '</td>';
for($i=0; $i<$graph->numSeries; $i++) {
if(array_key_exists($i, $row['data']))
echo '<td>' . $row['data'][$i] . '</td>';
else
echo '<td>.</td>';
}
echo '</tr>';
}
echo '</table>';
echo '</div>';
}
?>
<script type="text/javascript">
$(".showNote").click(function(){
$("#note_" + $(this).attr("id").split("_")[1]).dialog({modal: true, draggable: false, width: 320});
});
</script>
<?php
include('templates/footer.php');
Jump to Line
Something went wrong with that request. Please try again.