Ejemplo n.º 1
0
Archivo: bugs.php Proyecto: jfmc/logen
<?php

require_once 'common.php';
require_once 'bug_common.php';
create_session();
html_start('WebLogen - Bug List', '', '', 0, "Bug List");
?>
<table>
<tr>
<th>ID</th><th>Stage</th><th>Submit Date</th><th>Status</th>
</tr>
<?php 
$result = get_bug_summaries();
while ($row = mysql_fetch_assoc($result)) {
    $id = $row['bugid'];
    $stage = number2stage($row['stage']);
    $date = $row['sdate'];
    $status = number2status($row['status']);
    echo "<tr><td><a href='bug_view.php?id={$id}'>{$id}</a></td>";
    echo "<td>{$stage}</td><td>{$date}</td><td>{$status}</td></tr>\n";
}
echo '</table>';
html_end();
Ejemplo n.º 2
0
create_session();
if (!isset($_GET['id'])) {
    die('No bug selected');
}
// Non numbers get converted to 0 and we don't want negative bug numbers
$id = intval($_GET['id']);
if ($id <= 0) {
    die('Invalid bug selected');
}
html_start("WebLogen - View Bug {$id}", '', '', 0, "View Bug {$id}");
$result = get_bug_details($id);
if (!$result) {
    echo "<b>Bug {$id} does not exist</b>\n";
} else {
    $stageno = $result['stage'];
    $stage = number2stage($stageno);
    $date = $result['sdate'];
    $status = number2status($result['status']);
    $email = htmlspecialchars($result['email']);
    $comment = htmlspecialchars($result['comment']);
    $plfile = htmlspecialchars($result['plfile']);
    $annfile = htmlspecialchars($result['annfile']);
    $error = htmlspecialchars($result['errortext']);
    $goal = htmlspecialchars($result['goal']);
    $recreateable = bug_recreateable($stageno);
    echo "<table id='buglist'>\n<tr><th>Bug id:</th><td>{$id}</td></tr>\n";
    echo "<tr><th>Status:</th><td>{$status}</td></tr>\n";
    echo "<tr><th>Stage:</th><td>{$stage}</td></tr>\n";
    echo "<tr><th>Submitter Email:</th><td>{$email}</td></tr>\n";
    echo "<tr><th>Submit Date:</th><td>{$date}</td></tr>\n";
    echo "<tr><th>Comment:</th><td>{$comment}</td></tr>\n";