function IHaveThisSubjectInSubjectList($userid, $hwid) { $MyCurrentHomeworkIfno = returnHomeworkInfoByID($_GET["hwid"]); $SQL = "SELECT usersubjectlist.SUBJECTLISTID FROM usersubjectlist WHERE usersubjectlist.USERID = " . $userid; $MySubjectListResult = mysql_query($SQL); $MySubjectListIDS = mysql_fetch_array($MySubjectListResult); $IhaveIt = 0; $MySubjectIDsArray = explode(",", $MySubjectListIDS[0]); for ($counter = 0; $counter < sizeof($MySubjectIDsArray) - 1; $counter++) { $SQL = "SELECT subjects.Name, subjects.UID FROM subjects WHERE subjects.UID = " . $MySubjectIDsArray[$counter]; //echo '<p>'.$SQL.'</p>'; $MySubjectNameResult = mysql_query($SQL); $MySubjectName = mysql_fetch_array($MySubjectNameResult); if ($MySubjectName[0] == $MyCurrentHomeworkIfno["MainInfo"]["Title"]) { $IhaveIt = 1; $SubjectID = $MySubjectName[1]; } //echo $MySubjectName[0]." = ".$MyCurrentHomeworkIfno["MainInfo"]["Title"]; } if ($IhaveIt == 0) { $SubjectID = 0; } //echo '<p style = "margin-top:10%;">'.$SubjectID.'</p>'; return $SubjectID; }
$time_for_solving = $_POST["time_for_solving"]; $assessment = 0; $pleasure = $_POST["pleasure"]; $length = $_POST["length"]; $learned = $_POST["learned"]; $cheat = $_POST["cheat"]; $SubjectID = $_POST["SubjectID"]; $SomePersonalText = $_POST["SomePersonalText"]; $SomePersonalText = FixURLsData($SomePersonalText); //(GMT -5:00) EST (U.S. & Canada) $current_date_time = gmdate("Y-m-j H:i:s", time() + 3600 * ($timezone + date("I"))); $SQL = "INSERT INTO solvedhomeworks (USERID, HWID, TimeForSolve, Assessment, PleasureInPercents, LengthInPages, LearnedInPercents, IfCheating, Date, SomePersonalText, SubjectID) VALUES (" . $num_of_found_users_with_this_psw[1] . ", " . $_SESSION["hwid"] . ", " . $time_for_solving . ", " . $assessment . ", " . $pleasure . ", " . $length . ", " . $learned . ", " . $cheat . ", '" . $current_date_time . "', '" . $SomePersonalText . "', " . $SubjectID . ")"; //echo $SQL; $result = mysql_query($SQL); include "some_external_phps/return_hw_info_by_id.php"; $MyHomeworkInfoArray = returnHomeworkInfoByID($_SESSION["hwid"]); $sentence = $MyHomeworkInfoArray["SolveSentences"][$solvers_id[0]]; $percents = $MyHomeworkInfoArray["SolvingsPercents"][$solvers_id[0]]; $SomePersonalText = $MyHomeworkInfoArray["Solvings"][$solvers_id[0]]["SomePersonalText"]; $date = " "; echo '<div class="list-group">'; echo '<a href="#" class="list-group-item active">'; echo '<h4 class="list-group-item-heading">Благодарим ви за информацията :)!</h4>'; echo '<p class="list-group-item-text">' . $current_date_time . '</p>'; echo '</a>'; echo '<a href="#" class="list-group-item unactive">'; include "some_external_phps/show_solved_info.php"; echo '</a>'; echo '</div>'; } ?>
function PrintHWInfoInTableByID($hwid, $timezone, $EditMode, $username, $loggeduserid) { $MyCurrentHomeworkIfno = returnHomeworkInfoByID($hwid); //print_r($MyCurrentHomeworkIfno); if ($MyCurrentHomeworkIfno["MainInfo"]["Date"] == gmdate("Y-m-d", time() + 3600 * ($timezone + date("I")))) { $weekday2 = '(днес) '; } else { $weekday2 = ""; } if ($MyCurrentHomeworkIfno["MainInfo"]["Type"] == 0) { $Label1 = "Реших това домашно"; $Label2 = "Решено от"; } else { if ($MyCurrentHomeworkIfno["MainInfo"]["Type"] == 1) { $Label1 = "Взех този изпит"; $Label2 = "Взет от"; } else { if ($MyCurrentHomeworkIfno["MainInfo"]["Type"] == 2) { $Label1 = "Изпълних тази задача"; $Label2 = "Изпълнено от"; } } } echo '<div id = "Curriculum" style = "margin-top:5%;">'; echo '<table style = "font-family:Arial;color:#837d7c;">'; echo '<thead>'; echo '<tr style = "font-weight:bold;">'; echo '<th colspan="2" style = "font-size:17px;">'; echo "<p>" . ConvertWeekday($MyCurrentHomeworkIfno["MainInfo"]["WEEKDAY"]) . "</p>"; echo '<p style = "font-weight:normal;">' . $weekday2 . $MyCurrentHomeworkIfno["MainInfo"]["Date"] . "</p>"; echo '</th>'; echo '</tr>'; echo '</thead>'; echo '<tbody>'; echo '<tr>'; echo '<td>'; if (CheckIfUserIsSolver($loggeduserid, $hwid) == 0) { $SQL = "SELECT user.Name FROM user WHERE user.Password = '******'"; $current_logged_in_username_result = mysql_query($SQL); $current_logged_in_username = mysql_fetch_array($current_logged_in_username_result); echo '<p style = "text-align:left;"><a style = "color:red;font-weight:bold;" href = "solve_homework.php?hwid=' . $hwid . '&user='******'"><span class="glyphicon glyphicon-ok"></span> Нерешено</a></li>'; } else { echo '<p style = "text-align:left;"><a style = "color:green;font-weight:bold;" href = "#"><span class="glyphicon glyphicon-ok"></span> Решено</a></li>'; } echo '</td>'; echo '</tr>'; echo '<tr style = "background-color:#635e5d;color:#d2c9c6;">'; echo '<td>'; $FullTitle = ReturnTypeOfHWinWords($MyCurrentHomeworkIfno["MainInfo"]["Type"]) . " по " . $MyCurrentHomeworkIfno["MainInfo"]["Title"]; echo mb_substr($FullTitle, 0, 24); echo '</td>'; echo '</tr>'; echo '<tr style = "background:#635e5d;">'; echo '<td>'; if (strlen($MyCurrentHomeworkIfno["MainInfo"]["IMGURL"]) <= 0) { $MyCurrentHomeworkIfno["MainInfo"]["IMGURL"] = "themes/no-image.jpg"; } echo '<a href = "' . $MyCurrentHomeworkIfno["MainInfo"]["IMGURL"] . '" rel="lightbox" > <div class="frame-square" style = "display: inline-block;vertical-align: top; padding: 10px;width: 200px; height: 200px;margin-right: .5em;margin-bottom: .3em;"> <div class="crop" style = " height: 100%;overflow: hidden;position: relative;"> <img style = " display: block;width: 100%; height: 100%;margin: auto;position: absolute;top: -100%;right: -100%;bottom: -100%;left: -100%;border:solid #d2c9c6;"src="' . $MyCurrentHomeworkIfno["MainInfo"]["IMGURL"] . '"> </div> </div> </a>'; echo '</td>'; echo '<tr style = "background:#635e5d;">'; echo '<td>'; echo '<ul style="background-color: #635e5d;width:100%;padding-right:10px;padding-left:10px;padding-top:10px;padding-bottom:0px;overflow-y: scroll; height:150px;"><p style = "background:#635e5d;color:#d2c9c6;font-size:20px;">'; echo $MyCurrentHomeworkIfno["MainInfo"]["Data"]; echo '</p></ul>'; echo '</td>'; echo '</tr>'; if ($EditMode == 1) { echo '<tr style = "background:#837d7c;">'; echo '<td >'; echo '<p style = "text-align:left;"><a style = "color:#d2c9c6;font-weight:bold;" href="delete_hw_confirm.php?hwid=' . $hwid . '&class=' . $username . '"><span class="glyphicon glyphicon-trash"></span> Изтрий </a></p>'; echo '<p style = "text-align:left;"><a style = "color:#d2c9c6;font-weight:bold;" href="edit_hw.php?hwid=' . $hwid . '&class=' . $username . '"><span class="glyphicon glyphicon-pencil"></span> Редактирай</a></p>'; echo '</td>'; echo '</tr>'; } echo '<tr style = "background:#837d7c;height:60px;">'; echo '<td >'; echo '<p style = "text-align:left;"><a style = "color:#d2c9c6;font-weight:bold;" href = "add_assessment_to_hw.php?hwid=' . $hwid . '"><span class = "glyphicon glyphicon-stats"></span> Вашата оценка - ' . CheckMyAssessmentForHWWithID($hwid, $loggeduserid) . '</a></p>'; $SQL = "SELECT COUNT(solvedhomeworks.UID) FROM solvedhomeworks WHERE solvedhomeworks.HWID = " . $hwid; $result4 = mysql_query($SQL); $number_of_solvers = mysql_fetch_array($result4); if ($number_of_solvers[0] > 0) { echo '<p style = "text-align:left;"><a style = "color:#d2c9c6;font-weight:bold;" href="homework_solvers.php?hwid=' . $hwid . '&user='******'"><span class="glyphicon glyphicon-pencil"></span> ' . $Label2 . ' ' . $number_of_solvers[0] . '</a></p>'; } echo '</td>'; echo '</tr>'; echo '</tr>'; echo '</tbody>'; echo '</table>'; echo '</div>'; }
function PrintMyWeekDropdownButtons($done_array1, $EditMode, $username, $width, $leftmargin, $WeekDayFullOrNot, $timezone) { echo '<style>.btn-group {width:' . ($width - $leftmargin) / sizeof($done_array1) . '%;}.btn btn-default dropdown-toggle{width: 100%;}</style>'; echo '<div style = "margin-left: ' . $leftmargin . '%;width:' . ($width - $leftmargin) . '%;">'; foreach ($done_array1 as $value) { if ($value[0] == gmdate("Y-m-d", time() + 3600 * ($timezone + date("I")))) { $buttonClass = "btn btn-success dropdown-toggle"; } else { $buttonClass = "btn btn-default dropdown-toggle"; } echo '<div class="btn-group"><button type="button" class="' . $buttonClass . '" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'; $timestamp = strtotime($value[0]); $weekday = date("w", $timestamp); echo ConvertWeekdayFromPhp($weekday, $WeekDayFullOrNot); echo '<span class="caret"></span>'; echo '</button>'; if ($_GET["height"] > $_GET["width"]) { $MyDropdownMenuWidth = 200; } else { $MyDropdownMenuWidth = 300; } echo '<ul class="dropdown-menu" style = "background-color: white;width:' . $MyDropdownMenuWidth . 'px;padding-right:10px;padding-left:10px;padding-top:10px;padding-bottom:0px;overflow-y: scroll; height:320px;">'; $SQL = "SELECT homeworks.UID FROM homeworks, user, uh WHERE homeworks.Date = '" . $value[0] . "' AND homeworks.UID = uh.HWID AND user.UID = uh.USERID AND user.Name = '" . $username . "'"; $result4 = mysql_query($SQL); $SQL = "SELECT COUNT(homeworks.UID) FROM homeworks, user, uh WHERE homeworks.Date = '" . $value[0] . "' AND homeworks.UID = uh.HWID AND user.UID = uh.USERID AND user.Name = '" . $username . "'"; $result5 = mysql_query($SQL); $number_of_hws = mysql_fetch_array($result5); if ($number_of_hws[0] <= 0) { echo '<p><a href="#">Няма нищо</a></p>'; } else { while ($homework_info = mysql_fetch_array($result4)) { $MyHomeworkInfoArray = returnHomeworkInfoByID($homework_info[0]); $myHeadingBackgroundColor = "white"; $TextColor = "black"; $myHeadingContent = "NULL"; if ($MyHomeworkInfoArray["MainInfo"]["Type"] == 0) { $myHeadingBackgroundColor = "#86cf4b"; $myHeadingContent = "Домашно"; $headingPadding = 19; } else { if ($MyHomeworkInfoArray["MainInfo"]["Type"] == 1) { $myHeadingBackgroundColor = "#4ba8cf"; $myHeadingContent = "Изпит"; $headingPadding = 24; } else { if ($MyHomeworkInfoArray["MainInfo"]["Type"] == 2) { $myHeadingBackgroundColor = "#dd8043"; $myHeadingContent = "Напомняне"; $headingPadding = 24; } } } if (Get_Logged_users_id()) { $SQL = "SELECT COUNT(solvedhomeworks.UID) FROM solvedhomeworks WHERE solvedhomeworks.HWID = " . $homework_info[0] . " AND solvedhomeworks.USERID = " . Get_Logged_users_id(); //echo $SQL; $IfISolvedResult = mysql_query($SQL); $MyIfISolved = mysql_fetch_array($IfISolvedResult); if ($MyIfISolved[0] > 0) { $myHeadingBackgroundColor = "#673e7a"; //echo "USERID = ".Get_Logged_users_id(); $TextColor = "white"; } } if ($EditMode == 1) { $Trash = '<a href="delete_hw_confirm.php?hwid=' . $homework_info[0] . '&class=' . $username . '&page=homeworks_time_chart" style = "text-decoration:none;color:white;font-size:13px;padding:4px;"><span class="glyphicon glyphicon-trash"></span> </a>'; $Pencil = '<a href="edit_hw.php?hwid=' . $homework_info[0] . '&class=' . $username . '" style = "text-decoration:none;color:white;font-size:13px;"><span class="glyphicon glyphicon-pencil"></span> </a>'; } else { $Trash = ""; $Pencil = ""; } echo '<p style = "padding-bottom:15px;padding-top:3px;color:' . $TextColor . ';background-color:' . $myHeadingBackgroundColor . ';text-left:center;font-size:16px;border-radius:3px;border:solid #837d7c;">' . $Trash . $Pencil . '<a href="comments.php?hwid=' . $homework_info[0] . '" style = "text-decoration:none;color:white;font-size:13px;"><span class="glyphicon glyphicon-comment"></span> ' . $MyHomeworkInfoArray["MainInfo"]["NumOfComments"]; if ($MyHomeworkInfoArray["MainInfo"]["NumOfSolvers"] > 0) { echo '<a href="homework_solvers.php?hwid=' . $homework_info[0] . '&user='******'" style = "text-decoration:none;color:white;font-size:13px;"><span class="glyphicon glyphicon-stats"></span> ' . $MyHomeworkInfoArray["MainInfo"]["NumOfSolvers"]; echo '</a>'; } if (CheckIfUserIsSolver(Get_Logged_users_id(), $homework_info[0]) == 0) { $SQL = "SELECT user.Name FROM user WHERE user.Password = '******'"; //echo $SQL; $current_logged_in_username_result = mysql_query($SQL); $current_logged_in_username = mysql_fetch_array($current_logged_in_username_result); echo '<a href="' . 'solve_homework.php?hwid=' . $homework_info[0] . '&user='******'" style = "text-decoration:none;color:white;font-size:13px;"><span class="glyphicon glyphicon-ok"></span> '; echo '</a>'; } echo '<span style = "padding-left:' . $headingPadding . '%;">' . $myHeadingContent . '<span></p>'; echo '<div style = "padding:0px;">'; echo '<a href="#" style = "text-decoration:none;"><p style = "margin-top:-12px;padding:3px;padding-bottom:15px;padding-top:5px;text-align:center;background-color:#837d7c;color:#d2c9c6;font-weight:bold;">' . $MyHomeworkInfoArray["MainInfo"]["Title"] . '</p></a>'; if (strlen($MyHomeworkInfoArray["MainInfo"]["IMGURL"]) > 0) { echo '<div style = "background-color:#d2c9c6;border:solid #837d7c;border-bottom:none;margin-top:-10px;margin-bottom:-6px;color:#837d7c;font-size:15px;">'; echo '<a href = "' . $MyHomeworkInfoArray["MainInfo"]["IMGURL"] . '" rel="lightbox"><img src = "' . $MyHomeworkInfoArray["MainInfo"]["IMGURL"] . '" style = "border:solid #9f9593;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;margin-bottom:10px;" width = "100%"></a>'; echo '</div>'; } if (strlen($MyHomeworkInfoArray["MainInfo"]["Data"]) >= 0) { echo '<div style = "background-color:#d2c9c6;border:solid #837d7c;border-top:none;padding-left:4px;padding-right:4px;padding-bottom:15px;padding-top:12px;margin-top:-10px;margin-bottom:-6px;color:#837d7c;font-size:15px;"><p>' . $MyHomeworkInfoArray["MainInfo"]["Data"] . "</p>"; echo '</div>'; } //echo '<li><a href="#">'.$homework_info[2].'</a></li>'; echo '</div>'; echo '<div style = "margin-bottom:10px;">'; $MyPercentage = $MyHomeworkInfoArray["MainInfo"]["Rank"] * 25; echo '<div id="progressbar">'; echo '<div style = "width: ' . $MyPercentage . '%;color:#837d7c;font-weight:bold;">'; echo $MyPercentage . '%'; echo '</div>'; echo '</div>'; echo '</div>'; } } echo '</ul>'; echo '</div>'; } unset($value); echo '</div>'; }
if ($eoweek == "EvenWeekID") { $eoweek = "OddWeekID"; } } } //echo "Принтирай програмата на ".$_GET["user"]." за ".$eoweek." ".$tomorrow; echo '<div id = "CurriculumMain">'; PrintCurriculum($_GET["user"], $eoweek, $tomorrow, "- утре"); echo "</div>"; echo "</div>"; $SQL = "SELECT homeworks.UID FROM homeworks WHERE homeworks.Date = '" . $today_date . "'"; //echo $SQL; $MyHomeworksIdsResult = mysql_query($SQL); while ($MyHomeworksIds = mysql_fetch_array($MyHomeworksIdsResult)) { //echo $MyHomeworksIds[0]; $MyHomeworkInfoArray = returnHomeworkInfoByID($MyHomeworksIds[0]); //PrintMyHomeworkData($MyHomeworkInfoArray); } ?> <?php function PrintMyHomeworkData($MyHomeworkInfoArray) { echo '<div style = "font-size:20px;color:black;">'; echo "<p>//START PRINTING MAININFO</p>"; echo "<p>Публикувано от " . $MyHomeworkInfoArray["MainInfo"]["Name"] . "</p>"; echo "<p>Заглавие " . $MyHomeworkInfoArray["MainInfo"]["Title"] . "</p>"; echo "<p>Описание " . $MyHomeworkInfoArray["MainInfo"]["Data"] . "</p>"; echo "<p>Дата " . $MyHomeworkInfoArray["MainInfo"]["Date"] . "</p>"; echo "<p>Тип " . $MyHomeworkInfoArray["MainInfo"]["Type"] . "</p>"; echo "<p>Важност " . $MyHomeworkInfoArray["MainInfo"]["Rank"] . "</p>";
function PrintHomeworksTimeline($hwid, $timezone, $EditMode, $username, $loggeduserid) { //echo "ENTERRRR"; $MyHomeworkInfo = returnHomeworkInfoByID($hwid); //print_r($MyHomeworkInfo); if ($MyHomeworkInfo["MainInfo"]["Date"] == gmdate("Y-m-d", time() + 3600 * ($timezone + date("I")))) { $weekday2 = '(днес) '; } else { $weekday2 = ""; } echo '<div class="cd-timeline-block">'; switch ($MyHomeworkInfo["MainInfo"]["Rank"]) { case 1: $img_bg_color = ""; break; case 2: $img_bg_color = "picture"; break; case 3: $img_bg_color = "location"; break; case 4: $img_bg_color = "movie"; break; } echo '<div class="cd-timeline-img cd-' . $img_bg_color . '" style = "z-index:600;">'; $margin_top = "margin-top: 30px;"; $class_zoom = 'class="zoom_img"'; if (strlen($MyHomeworkInfo["MainInfo"]["IMGURL"]) <= 0) { echo '<img src="vertical-timeline/img/cd-icon-picture.svg" alt="Picture">'; } else { echo '<div ' . $class_zoom . ' style = "' . $margin_top . ' position:relative;">'; echo '<a href = "' . $MyHomeworkInfo["MainInfo"]["IMGURL"] . '" rel="lightbox"><img style= "border-width:thin; border-style: solid;background-color:#afb7c3;border-color: white;border-radius:15px;" src="' . $MyHomeworkInfo["MainInfo"]["IMGURL"] . '" alt="HomeWork image" width="100%" height="100%"></a>'; echo '</div>'; } echo '</div> <!-- cd-timeline-img -->'; echo '<style>#MyHWBOX {background-color:#837d7c; border:solid white;border-width:2px;} #MyHWBOX:hover{background-color:#968e8d;}</style>'; echo '<div class="cd-timeline-content" id = "MyHWBOX">'; $type_of_event = ReturnTypeOfHWinWords($MyHomeworkInfo["MainInfo"]["Type"]); if ($EditMode == 0) { echo ' <h2 style = "background-color:#d2c9c6; padding:10px; font-size:30px; color:#837d7c; border-radius:10px; font-family: Hattori; font-weight:bold;">' . $type_of_event . " по " . $MyHomeworkInfo["MainInfo"]["Title"] . '</h2>'; } else { echo '<div class="dropdown" style = "float:left;padding-right:10px;margin-top:-6px;">'; echo '<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style = "width:100%;background:#d2c9c6; color:#837d7c; font-weight:bold; border-radius:20px; font-size:25px; font-family: Hattori; font-weight:bold;">'; echo '<span class="glyphicon glyphicon-wrench"></span>'; echo '</button>'; echo '<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">'; echo '<li><a href="delete_hw_confirm.php?hwid=' . $hwid . '&class=' . $username . '"><span class="glyphicon glyphicon-trash"></span> Изтрий</a></li>'; echo '<li><a href="edit_hw.php?hwid=' . $hwid . '&class=' . $username . '"><span class="glyphicon glyphicon-pencil"></span> Редактирай</a></li>'; echo '</ul>'; echo '</div>'; echo '<h2 style = "background-color:#d2c9c6; padding:10px; font-size:30px; color:#837d7c; border-radius:10px; font-family: Hattori; font-weight:bold;">'; echo $type_of_event . " по " . $MyHomeworkInfo["MainInfo"]["Title"]; echo '</h2>'; } $SQL = "SELECT (user.UID) FROM user WHERE user.Name = '" . $username . "'"; $result4 = mysql_query($SQL); $user_id = mysql_fetch_array($result4); echo '<div class="dropdown" style = "width:130px;padding-right:10px;margin-top:10px;">'; echo '<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style = "min-width:100%;color:#837d7c; background:#d2c9c6; font-weight:bold; border-radius:7px; font-size:16px; font-family: Hattori; font-weight:bold; margin-top:-22px;">'; if (CheckIfUserIsSolver(Get_Logged_users_id(), $hwid) == 1) { echo '<span style = "color:green;" class = "glyphicon glyphicon-ok"> Решено</span></a>'; } else { echo '<span style = "color:red;" class = "glyphicon glyphicon-remove"> Нерешено</span>'; } echo '</button>'; echo '<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">'; if ($MyHomeworkInfo["MainInfo"]["Type"] == 0) { $Label1 = "Реших това домашно"; $Label2 = "решили това домашно"; } else { if ($MyHomeworkInfo["MainInfo"]["Type"] == 1) { $Label1 = "Взех този изпит"; $Label2 = "взели този изпит"; } else { if ($MyHomeworkInfo["MainInfo"]["Type"] == 2) { $Label1 = "Изпълних тази задача"; $Label2 = "изпълнили тази задача"; } } } if (CheckIfUserIsSolver($loggeduserid, $hwid) == 0) { $SQL = "SELECT user.Name FROM user WHERE user.Password = '******'"; $current_logged_in_username_result = mysql_query($SQL); $current_logged_in_username = mysql_fetch_array($current_logged_in_username_result); echo '<li><a style = "color:green;" href = "solve_homework.php?hwid=' . $hwid . '&user='******'"><span class="glyphicon glyphicon-ok"></span> ' . $Label1 . '</a></li>'; } $SQL = "SELECT COUNT(solvedhomeworks.UID) FROM solvedhomeworks WHERE solvedhomeworks.HWID = " . $hwid; $result4 = mysql_query($SQL); $number_of_solvers = mysql_fetch_array($result4); if ($number_of_solvers[0] > 0) { echo '<li><a href="homework_solvers.php?hwid=' . $hwid . '&user='******'"><span class="glyphicon glyphicon-pencil"></span> Виж всички ' . $Label2 . ' (' . $number_of_solvers[0] . ')</a></li>'; } echo '</ul>'; echo '</div>'; echo ' <p style = "color:#514d4b; font-family: Arial; font-size:20px; margin-top:20px;">' . $MyHomeworkInfo["MainInfo"]["Data"] . '</p>'; echo '<p>'; echo '<style>#CommentsButton{ text-decoration: none; font-size:18px;color:#d2c9c6; font-family: Arial; font-size:20px; margin-top:3px; }#CommentsButton:hover{ color:#4f4b4a; }</style>'; echo '<a href="comments.php?hwid=' . $hwid . '" id = "CommentsButton" style = "">'; echo '<span class="glyphicon glyphicon-comment"></span>'; echo ' Коментари ' . $MyHomeworkInfo["MainInfo"]["NumOfComments"] . '</a></p>'; echo '<p><a href="add_assessment_to_hw.php?hwid=' . $hwid . '" id = "CommentsButton" style = "">'; echo '<span class="glyphicon glyphicon-stats"></span>'; echo ' Вашата оценка - ' . CheckMyAssessmentForHWWithID($hwid, $loggeduserid) . '</a></p>'; echo '<span class="cd-date"><h1 style="color:#6f6967;font-family: MyDays;font-size:22px;font-weight:bold;">' . ConvertWeekday($MyHomeworkInfo["MainInfo"]["WEEKDAY"]) . ' <small id = "smalltag" style = "font-family:Arial;color:black;font-size:15px;">' . $weekday2 . $MyHomeworkInfo["MainInfo"]["Date"] . '</small></h1></span>'; echo '</div> <!-- cd-timeline-content -->'; echo '</div> <!-- cd-timeline-block -->'; }
// header('Location: check_width_and_send_to.php?user='******'&page='.$current_page_is) and exit; // } $_SESSION['page'] = "other"; ?> <div class="container"> <?php include "main_menu.php"; ?> <div id = "my_page" style = "background: rgba(243, 243, 243, 0.4);"> <?php include "some_external_phps/return_hw_info_by_id.php"; $MyHomeworkInfoArray = returnHomeworkInfoByID($_GET["hwid"]); echo '<section id="cd-timeline" class="cd-container">'; for ($count = 0; $count < sizeof($MyHomeworkInfoArray["Solvings"]); $count++) { $currentUserID = $MyHomeworkInfoArray["SolversIDs"][$count]; $myCurrentArray = $MyHomeworkInfoArray["Solvings"]; //print_r($solvers_names); if ($MyHomeworkInfoArray["MainInfo"]["NumOfSolvers"] <= 0) { echo 'Никой не е решил още това домашно :('; } else { $UserInfo = ReturnALLUserInfoByIdOrByName($myCurrentArray[$MyHomeworkInfoArray["SolversIDs"][$count]]["Name"]); echo '<div class="cd-timeline-block"> <div class="cd-timeline-img cd-picture">'; echo '<a href = "home.php?user='******'">'; echo '<div class="zoom_img_urls" class = "thumb1" style = "float:left;margin-top:-20px;margin-left:-12px;border:solid #d2c9c6;border-radius:50%;width:90px;height:90px;background: url(' . $UserInfo["IMGURL"] . ') 50% 50% no-repeat;background-size: 100% 100%;z-index:100;">'; echo '</div>'; echo '</a>';
<div class="container"> <?php include "main_menu.php"; include "some_external_phps/return_hw_info_by_id.php"; ?> <?php if ($EditMode == 1) { $Trash = '<a href="delete_hw_confirm.php?hwid=' . $_GET['hwid'] . '&class=' . $username . '&page=homeworks_time_chart" style = "text-decoration:none;color:white;font-size:15px;padding:4px;"><span class="glyphicon glyphicon-trash"></span> </a>'; $Pencil = '<a href="edit_hw.php?hwid=' . $_GET['hwid'] . '&class=' . $username . '" style = "text-decoration:none;color:white;font-size:15px;"><span class="glyphicon glyphicon-pencil"></span> </a>'; } else { $Trash = ""; $Pencil = ""; } $MyHomeworkInfoArray = returnHomeworkInfoByID($hwid); echo '<div id = "my_page" style = "background: rgba(243, 243, 243, 0.4);">'; echo '<div class="page-header">'; switch ($MyHomeworkInfoArray["MainInfo"]["WEEKDAY"]) { case 0: $weekday = 'ЗА ПОНЕДЕЛНИК'; break; case 1: $weekday = 'ЗА ВТОРНИК'; break; case 2: $weekday = 'ЗА СРЯДА'; break; case 3: $weekday = 'ЗА ЧЕТВЪРТЪК'; break;