$date = new DateTime($today_date); $week = $date->format("W"); function getWeekday($date) { return date('w', strtotime($date)); } $today = getWeekday($today_date); $tomorrow = getWeekday($today_date) + 1; if ($week & 1) { $eoweek = "OddWeekID"; $Label = "<h1>Седмицата е нечетна</h1>"; } else { $eoweek = "EvenWeekID"; $Label = "<h1>Седмицата е четна</h1>"; } if (CheckIfHaveToShowOtherWeek(ReturnUserIdByUserName($username)) == 1) { $eoweek = "OtherWeekID"; $Label = "<h1>Седмицата е извънредна</h1>"; } //$eoweek = "OtherWeekID"; if ($EditMode == 1) { echo $button_to_render2; } $PercentWidth = ReturnPercentsOfShoolYear($username, $timezone); echo '<div id="progressbar" style = "margin-left:60px;">'; echo '<div style = "width: ' . $PercentWidth . '%;color:#514d4c;font-weight:bold;white-space: nowrap;">'; echo 'Учебна година ' . $PercentWidth . '%'; echo '</div>'; echo '</div>'; echo '<div style = "text-align:center;border:1px solid #c8ccc1;border-radius: 5px;padding: 10px;color: #243746;background-color: white;font-size:24;font-family:Arial ;font-weight: bold;">' . $Label . '</div>'; include "some_external_phps/print_curriculum.php";
<?php include "some_external_phps/checkIfHaveToShowOtherWeek.php"; include "some_external_phps/ReturnUserIDByUserName.php"; if (CheckIfHaveToShowOtherWeek(ReturnUserIdByUserName($_GET["user"])) == 0) { $PartOfLabel = '<span class="glyphicon glyphicon-ok"></span> Активирай'; } else { $PartOfLabel = '<span class="glyphicon glyphicon-remove"></span> Дективирай'; } $button_to_render2 = '<div><div class="dropdown" style = "float:left;padding-right:10px;"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style = "width:60px;height:72px;font-size:20px;"> <span class="glyphicon glyphicon-wrench"></span> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> <li><a href="ExchangeWeeks.php?user='******'"><span class="glyphicon glyphicon-random"></span> Размени четна с нечетна</a></li> <li><a href="DeactivateOrActivateOtherWeek.php?user='******'">' . $PartOfLabel . ' извънредната</a></li> </ul> </div>';