Пример #1
0
include "head.php";
include "config.php";
include "start_check.php";
include "some_external_phps/DeactivateActivateAndExchangeFunc.php";
include "some_external_phps/ReturnUserIDByUserName.php";
// if ($_SESSION['page'] != 'check_width'){
// header('Location: check_width_and_send_to.php?user='******'&page='.$current_page_is) and exit;
// }
$_SESSION['page'] = "other";
?>
<body>
<div class="container">
<?php 
include "main_menu.php";
?>

<div id = "my_page" style = "background: rgba(243, 243, 243, 0.4);">

<?php 
echo '<p style = "font-size:30px;font-family:Arial;background-color:white;padding:10px;border-radius:10px;text-align:center;">';
if ($EditMode == 1) {
    echo ExChangeWeeks(ReturnUserIdByUserName($username));
} else {
    echo "Нямате право да извършите това действиe!!! :/";
}
echo '</p>';
?>

</div>
</div>
</body>
Пример #2
0
<?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>';
$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";
include "some_external_phps/checkIfHaveToShowOtherWeek.php";
// if ($_SESSION['page'] != 'check_width'){
// header('Location: check_width_and_send_to.php?user='******'&page='.$current_page_is) and exit;
// }
$_SESSION['page'] = "other";
?>
<body>
<div class="container">
<?php 
include "main_menu.php";
?>

<div id = "my_page" style = "background: rgba(243, 243, 243, 0.4);">

<?php 
echo '<p style = "font-size:30px;font-family:Arial;background-color:white;padding:10px;border-radius:10px;text-align:center;">';
if ($EditMode == 1) {
    if (CheckIfHaveToShowOtherWeek(ReturnUserIdByUserName($username))) {
        echo DeactivateOtherWeek(ReturnUserIdByUserName($username));
    } else {
        echo ActivateOtherWeek(ReturnUserIdByUserName($username));
    }
} else {
    echo "Нямате право да извършите това действиe!!! :/";
}
echo '</p>';
?>

</div>
</div>
</body>