function PrintAChart($IdOfChart, $username, $strDateFrom, $strDateTo, $PrevMonth, $EditMode, $timezone) { $done_array1 = CollectData(1, $username, $strDateFrom, $strDateTo); $done_array0 = CollectData(0, $username, $strDateFrom, $strDateTo); $done_array2 = CollectData(2, $username, $strDateFrom, $strDateTo); $done_array_1 = CollectData(-100, $username, $strDateFrom, $strDateTo); //Empty data to skip cyan color in chart $done_array3 = CollectData(-1, $username, $strDateFrom, $strDateTo); $MyFinalArray = array($done_array1, $done_array0, $done_array2, $done_array_1, $done_array3); $MyChart = MakeMyChart($MyFinalArray, "Напрегнатост", "area", "c" . $IdOfChart); $MyDate = date_create($done_array1[6][0]); $MyLastDayOfThisWeekMonth = date_format($MyDate, "m"); $MyYearToShow = date_format($MyDate, "Y"); if ($MyLastDayOfThisWeekMonth != $PrevMonth) { echo '<div class="page-header">'; echo '<h1 style = "color:#837d7c;">' . ConvertMonthToWord($MyLastDayOfThisWeekMonth) . " " . $MyYearToShow . '</h1>'; echo '</div>'; } if ($_GET["width"] < 385 && $_GET["height"] > $_GET["width"]) { $MyWidth = 160; $MyLeftMargin = -30; } else { if ($_GET["width"] >= 385 && ($_GET["width"] < 530 && $_GET["height"] > $_GET["width"])) { $MyWidth = 140; $MyLeftMargin = -18; } else { if ($_GET["width"] >= 530 && $_GET["height"] > $_GET["width"]) { $MyWidth = 132; $MyLeftMargin = -13; } else { $MyWidth = 100; $MyLeftMargin = 0; } } } if ($_GET["height"] > $_GET["width"]) { $MyButtonWidth = 100; $MyButtonLeftMargin = 0; } else { $MyButtonWidth = $MyWidth; $MyButtonLeftMargin = 8; } $MyHeight = 75; PrintMyWeekDropdownButtons($MyFinalArray[0], $EditMode, $username, $MyButtonWidth, $MyButtonLeftMargin, 0, $timezone); echo '<div style="margin-left:' . $MyLeftMargin . '%;width:' . $MyWidth . '%;height:' . $MyHeight . '%; min-width:100px;">'; echo $MyChart; echo '</div>'; return $MyLastDayOfThisWeekMonth; }
?> "> </div> <div class="form-group" > <label for="text" id = "descURL" style = "font-family:Arial;margin:auto;margin-left:20px;font-size:25px;color:#d2c9c6;">Рожден ден</label> <select class="form-control" id = "MyInputBox" style = "margin-left:19px;float:left;width:40%;margin-right:13px;" name="Month"> <?php include "graphs/convert_month_to_word.php"; echo '<option value="0">Месец</option>'; for ($counter = 1; $counter <= 12; $counter++) { if ($counter < 10) { $Zero = "0"; } else { $Zero = ""; } echo '<option value="' . $Zero . $counter . '">' . ConvertMonthToWord($counter) . '</option>'; } ?> </select> <select class="form-control" id = "MyInputBox" style = "width:40%;" name="Day"> <option value="0">Ден</option> <?php for ($counter = 1; $counter <= 31; $counter++) { if ($counter < 10) { $Zero = "0"; } else { $Zero = ""; } echo '<option value="' . $Zero . $counter . '">' . $counter . '</option>'; } ?>