-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
106 lines (96 loc) · 3.36 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
# Enable all errors, we want clean code
error_reporting(E_ALL);
ini_set("display_errors", 1);
# Includes
include 'functions.php';
include 'classes/task.php';
include 'classes/step.php';
include 'classes/potato.php';
include 'classes/segment.php';
# Declare Constants
define('RELEASEDIRECTORY', 'potatoes/');
define('CURRENTDATE', date('l, m/d/Y g:i:s a'));
# Declare Variables
$done = false;
# Get Potatoes
$potatoes = getPotatoes();
$activePotatoes = getActivePotatoes($potatoes);
$inactivePotatoes = getInactivePotatoes($potatoes);
$selectedPotato = getSelectedPotato($activePotatoes);
if ($selectedPotato) {
$totalTime = $selectedPotato->getSecondsFromStartToLaunch();
$t = timeDifference($selectedPotato->goalLaunchDate, CURRENTDATE);
$percent = ($t / $totalTime * 100);
$Overtime = FALSE;
if ($percent <= 0) {
$Overtime = TRUE;
$totalTime = timeDifference(CURRENTDATE, $selectedPotato->startDate);
}
}
$PERCENTEXCESS = 0; # This variable needs to go away, it currently sorta determines the width of things.
$selectedPotato = processPOST($_POST, $selectedPotato); # Do processing on any POST variables.
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Potato - Deployment Tracker</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<?php if ($done) {
echo '<meta http-equiv="refresh" content="5; URL=index.php" />';
} ?>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="js/jquery-2.0.3.js"></script>
<script src="js/jquery-ui.js"></script>
<script>
$(function () {
$("#date").datepicker();
});
</script>
</head>
<body>
<div id="wrapper">
<header>
<a href="index.php"><img src="images/logo.png" alt="logo"/></a>
<h2>Potato</h2>
</header>
<div id="PotatoHeader">
<div id="Version">
<a href="index.php"><img src="images/character.png" alt="character"/></a>
<?php
if ($selectedPotato) {
echo '<h1>' . $selectedPotato->name . '</h1>';
echo '<h6>Start Date: ', $selectedPotato->startDate, '</h6>';
echo '<h6>Goal Date: ', $selectedPotato->goalLaunchDate, '</h6>';
} else {
echo 'No Potato Selected';
echo '<h6>Start Date: N/A</h6>';
echo '<h6>Goal Date: N/A</h6>';
}
?>
</div>
<?php if ($selectedPotato) { ?>
<div id="Team">
<h6>Total Time B&R: 2 days (22%)</h6>
<h6>Total Time Release Manager: 1 day (30%)</h6>
<h6>Total Time Ops: 2 hours (20%)</h6>
<h6>Total Time QA: 15 hours (10%)</h6>
</div>
<?php } ?>
</div>
<div id="content">
<div id="navigation">
<div class="padder">
<h1>Switch Active Potato</h1>
<?php
foreach ($activePotatoes as $Potato) {
echo "<h4><a href=\"index.php?selectedPotato=" . $Potato->name . "\">" . $Potato->name . "</a></h4>";
}
?>
<h4>Notes</h4>
<h1><a href="create.php">Create Release</a></h1>
<h1>View Historical</h1>
</div>
</div>
<div id="page" style="">
<div class="padder">