Example #1
0
    ?>
        <div class="alert alert-block alert-info">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <h4>Welcome to the Weekly <?php 
    echo getTeamName();
    ?>
 Meeting</h4>
            Below is a compilation of all the things that happened for the selected week. Notes can be written below and they will be saved with that week's data for future reference.  <br />
        </div>

        <?php 
}
?>
        <div class="pull-right"><div class="btn-group"><a class="btn" role="button" data-toggle="modal" href="#permalink-modal"><i class="icon-bookmark"></i> Permalink</a></div></div>
        <?php 
if ($results = checkForPreviousMeetingNotes(generateMeetingNotesID($start_ts, $end_ts))) {
    $previous_timestamp = $results['timestamp'];
    $previous_user = $results['user'];
    $previous_report = $results['notes'];
    echo "<h2>Meeting Notes <small>taken by {$previous_user} at the " . getTeamName() . " Meeting held on " . date("l jS F Y", $previous_timestamp);
} else {
    echo "<h2>Meeting Notes <small>you are taking at the " . getTeamName() . " Meeting today (" . date("l jS F Y") . ")";
    $previous_report = null;
}
?>
        </small></h2>
        <form action="<?php 
echo $ROOT_URL;
?>
/add_meeting_notes.php" method="POST" id="weekly-notes">
        <textarea class="textarea span12" name="weeklynotes" placeholder="Enter Meeting Notes, e.g. Hiring, Launches, Corp IT information" style="height: 200px">
Example #2
0
<?php

include_once 'phplib/base.php';
if (!db::connect()) {
    echo "Database connection failed, cannot continue. ";
} else {
    $timestamp = time();
    $username = getUsername();
    $range_start = db::escape($_POST['range_start']);
    $range_end = db::escape($_POST['range_end']);
    $report_id = generateMeetingNotesID($range_start, $range_end);
    $notes = db::escape($_POST['weeklynotes']);
    $query = "INSERT INTO meeting_notes (report_id, range_start, range_end, timestamp, user, notes) VALUES ('{$report_id}', '{$range_start}', '{$range_end}', '{$timestamp}', '{$username}', '{$notes}')";
    if (!db::query($query)) {
        echo "Database update failed, error: " . db::error();
    } else {
        Header("Location: {$ROOT_URL}/index.php?meeting_done=hellyeah");
    }
}