session_start();
if (session_is_registered("MM"))
{}
else
{
// if session check fails, invoke error handler
header("Location: login.php");
exit();
}
$title = isset($_GET['title']) ? $_GET['title'] : "";
include("../include/dbconfig.php");
$connection = mysql_connect($db_host, $db_user, $db_pass) or die ("Unable to connect!");
mysql_select_db($db_name);
$query = "SELECT Language, Description, URL_header from MM_titles where Title='$title'";
$result1 = mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error());
$row1 = mysql_fetch_row($result1);
$language = $row1[0];
$description = $row1[1];
$header = $row1[2];
?>
Language Learning Center -- Student Online Media Access
Sign Out
Student Online Audio/Video Access
If you see a blocked pop up like the picture on the left, click on the top part; then, click on "Run Add-on;" finally, click "Run".
Help Guideline For "Run Add-on"
print <<
$language - $title
END;
$query = "SELECT Name, File, Type from MM_media where Title = '$title' order by Name";
$result1 = mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error());
$col = 0;
while ($row1 = mysql_fetch_row($result1))
{
if ($col ==0)
{
print <<
END;
}
if ($row1[2] == 'Embed'){
print <<
END;
} else {
print <<
END;
}
$col++;
if ($col ==4)
{
print <<
END;
$col = 0;
}
}
while ($col <4)
{
print <<
END;
$col++;
}
if ($col ==4)
{
print <<
END;
}
?>