コード例 #1
0
ファイル: meeting.php プロジェクト: aveseb/opsweekly
    ?>
' }).done(function(data) {
                $('#oncall-stats').html(data);
            });
        </script>
        <?php 
}
?>

        <h2>Weekly Updates</h2>
        <?php 
if (!($updates = getGenericWeeklyReportsForWeek($start_ts, $end_ts))) {
    echo insertNotify("error", "No Weekly Updates have been entered yet this week");
} else {
    foreach ($updates as $update) {
        echo formatWeeklyReportForPrint($update);
    }
}
?>

        <h2>Fin</h2>
        <p>You have reached the end of the meeting report! </p>
        <button class="btn btn-primary" onClick="$('#weekly-notes').submit()">Save Meeting Notes</button>
        <a class="btn btn-success" href="<?php 
echo $ROOT_URL;
?>
/index.php"><i class="icon-white icon-home"></i> Home</a>
        <br />
        <br />
    </div>
</div>
コード例 #2
0
ファイル: base.php プロジェクト: KevinMGranger/opsweekly
function formatSearchResults(array $results, $search_type, $highlight_term, $limit = 0, $start = 0)
{
    // If only a limited number of results is required, reduce the array down to that number.
    if ($limit != 0) {
        $results = array_slice($results, $start, $limit);
    }
    switch ($search_type) {
        case 'service':
        case 'hostname':
            $results = highlightSearchQuery($results, $highlight_term, $search_type);
            $html = printOnCallTableHeader();
            foreach ($results as $n) {
                $html .= formatOnCallRowForPrint($n);
            }
            $html .= printOnCallTableFooter();
            break;
        case 'report':
            $results = highlightSearchQuery($results, $highlight_term, 'report');
            foreach ($results as $result) {
                $html .= formatWeeklyReportForPrint($result);
            }
            break;
        case 'notes':
            $results = highlightSearchQuery($results, $highlight_term, 'notes');
            foreach ($results as $result) {
                $html .= formatMeetingNotesForPrint($result, true);
            }
            break;
        default:
            return false;
    }
    return $html;
}