コード例 #1
0
ファイル: meeting.php プロジェクト: aveseb/opsweekly
    }
}
$time_requested = getOrSetRequestedDate();
$my_username = getUsername();
$start_end = getWeekRange($time_requested);
$start_ts = $start_end[0];
$end_ts = $start_end[1];
$oncall_period = getOnCallWeekRange($time_requested);
$oncall_start = $oncall_period[0];
$oncall_end = $oncall_period[1];
$protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
$permalink = "{$protocol}{$_SERVER['SERVER_NAME']}/meeting.php?week={$start_ts}";
$page_title = getTeamName() . " Weekly Updates - Meeting View";
include_once 'phplib/header.php';
include_once 'phplib/nav.php';
$root_url = getTeamUrl();
?>

<script>
function setDateToLastWeek() {
    $.post("meeting.php", { date: '<?php 
echo date("r", strtotime("1 week ago"));
?>
' }, function() { window.location.href = 'meeting.php'} );
}
</script>

<div class="container">
<h1><?php 
echo getTeamName();
?>
コード例 #2
0
ファイル: base.php プロジェクト: KevinMGranger/opsweekly
$tag_to_badge = array("action" => "success", "noaction" => "important", "" => "default");
$nagios_alert_tags = array("" => "Untagged", "issue" => "Action Taken: Service Issue (View clean)", "issuetimeperiod" => "Action Taken: Service Issue, timeperiod inappropriate (View clean)", "viewissue" => "Action Taken: View issue (network/site outage, service health questionable)", "incorrecttimeperiod" => "No Action Taken: Timeperiod not appropriate", "downtimeexpired" => "No Action Taken: Work ongoing, downtime expired", "downtimenotset" => "No Action Taken: Work ongoing, downtime not set", "thresholdincorrect" => "No Action Taken: Threshold adjustment required", "checkfaulty" => "No Action Taken: Check is faulty/requires modification", "na" => "N/A");
$nagios_tag_categories = array("" => "Untagged", "action" => "Action Taken", "noaction" => "No Action Taken");
$nagios_tag_category_map = array("issue" => "action", "issuetimeperiod" => "action", "viewissue" => "action", "incorrecttimeperiod" => "noaction", "downtimeexpired" => "noaction", "downtimenotset" => "noaction", "thresholdincorrect" => "noaction", "checkfaulty" => "noaction");
$locales = array("UK" => "Europe/London", "ET" => "America/New_York", "PT" => "America/Los_Angeles");
$sleep_states = array(-1 => "Unknown", 0 => "Awake", 1 => "Asleep");
$sleep_state_icons = array(0 => "icon-eye-open", 1 => "icon-eye-close");
$sleep_state_levels = array(-1 => "Unknown", 1 => "NREM Stage 1", 2 => "NREM Stage 2", 3 => "NREM Stage 3", 4 => "REM");
// Test to make sure we can handle this team
// .. and handle dev
$fqdn = isset($fqdn) ? $fqdn : $_SERVER['HTTP_HOST'];
$fqdn = preg_replace($dev_fqdn, $prod_fqdn, $fqdn);
if (!($team_data = getTeam($fqdn))) {
    die("I don't know what to do with this FQDN, please add it to config.php");
}
$ROOT_URL = getTeamUrl();
if (!function_exists('getUsername')) {
    die("You haven't taught opsweekly how to authenticate users! Please check user_auth.php or information in the README");
}
function getOrSetRequestedDate()
{
    session_start();
    if (isset($_POST['date'])) {
        $_SESSION['opsweekly_requested_date'] = $_POST['date'];
    }
    $date = isset($_SESSION['opsweekly_requested_date']) ? $_SESSION['opsweekly_requested_date'] : "now";
    return $date;
}
function getTimezoneSetting()
{
    global $locales;