示例#1
0
	<link rel="stylesheet" href="vertical-timeline/css/reset.css">
	<link rel="stylesheet" href="vertical-timeline/css/style.css">
	<script src="vertical-timeline/js/modernizr.js"></script>
</head>
<?php 
include "start_check.php";
if ($_SESSION['page'] != 'check_width') {
    header('Location: check_width_and_send_to.php?user='******'&page=hws_waiting_assessment') and exit;
}
$_SESSION['page'] = "other";
?>
<body>
<div class="container">
<?php 
include "main_menu.php";
$MyUnappreciatedHomeworks = UnappreciatedHomeworks(Get_Logged_users_id());
echo '<div id = "my_page" style = "background: rgba(243, 243, 243, 0.4);margin-top:50px;">';
while ($CurrentUnappreciatedHomeworkID = mysql_fetch_array($MyUnappreciatedHomeworks)) {
    if ($_GET["height"] > $_GET["width"]) {
        PrintHWInfoInTableByID($CurrentUnappreciatedHomeworkID[0], $timezone, $EditMode, $username, Get_Logged_users_id());
    } else {
        PrintHomeworksTimeline($CurrentUnappreciatedHomeworkID[0], $timezone, $EditMode, $username, Get_Logged_users_id());
    }
}
echo '</div>';
?>



</body>
示例#2
0
$SQL = "SELECT DISTINCT COUNT(homeworks.Date) FROM homeworks,user,uh WHERE user.Name = '" . $username . "' AND uh.HWID = homeworks.UID AND uh.USERID = user.UID AND ((homeworks.Data LIKE '%" . $searched_string . "%') OR (homeworks.Title LIKE '%" . $searched_string . "%')) ORDER BY homeworks.Date DESC";
$result3 = mysql_query($SQL);
$row3 = mysql_fetch_array($result3);
echo '<div class="page-header">';
echo '<h1 style = "font-size:40px;color:#635d5c;">Търсене за "' . $searched_string . '"<small id = "smalltag" style = "color:#635d5c;"> (резултати: ' . $row3[0] . ')</small></h1>';
echo '</div>';
if ($row3[0] <= 0) {
    echo 'Няма съвпадения';
} else {
    $SQL = "SELECT DISTINCT homeworks.UID FROM homeworks WHERE ((homeworks.Data LIKE '%" . $searched_string . "%') OR (homeworks.Title LIKE '%" . $searched_string . "%')) ORDER BY homeworks.Date DESC";
    $result = mysql_query($SQL);
    $counter = 0;
    while ($row = mysql_fetch_array($result)) {
        $counter++;
        if ($_GET["height"] > $_GET["width"]) {
            PrintHWInfoInTableByID($row[0], $timezone, $EditMode, $username, Get_Logged_users_id());
        } else {
            PrintHomeworksTimeline($row[0], $timezone, $EditMode, $username, Get_Logged_users_id());
        }
        //echo $row[0];
        //echo $row[1];
        //echo $row[2];
        //echo $row[3];
    }
}
?>
	
</div>

</body>
</html>