Exemple #1
0
/**
 * control 
 * 
 * The controlling structure for this script.
 * 
 * @return void
 */
function control()
{
    global $book;
    if (isset($_GET['add'])) {
        displayAddForm();
    } elseif (isset($_POST['addsubmit'])) {
        displayAddSubmit();
    } else {
        displayMain();
    }
}
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
		<title>Better YouTube Setup Interest</title>

		<meta name="description" content="Better YouTube">
		<meta name="author" content="Seungmin Lee">
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
		<link rel="stylesheet" href="css/main.css">
		<link rel="stylesheet" href="css/videoPage.css" />
	</head>
	<body>
	<?php 
displayMain($outstr);
if (isset($_POST['submitted'])) {
    addInterestToDB($_COOKIE['loginCookieUser']);
}
?>
  
</html>

<?php 
function displayMain($outstr)
{
    ?>
		<?php 
    echo $outstr;
    ?>
		</strong></h1>
<!--		<link rel="stylesheet" href="css/videoPage.css"> -->
		<script data-cfasync="false">
		  (function(a,b,c,d,e){var f=a+"Q";b[a]=b[a]||{};b[a][d]=b[a][d]||function(){
		  (b[f]=b[f]||[]).push(arguments)};a=c.getElementsByTagName(e)[0];c=c.createElement(e);c.async=1;
		  c.src="//static.reembed.com/data/scripts/g_6356_58f0daab6a34633708903d3faaa954af.js";
		  a.parentNode.insertBefore(c,a)})("reEmbed",window,document,"setupPlaylist","script");
		</script>
		
		
	</head>
	<body>
	
	<?php 
//Default interest will be entertainment
$interest = isset($_GET['op']) ? $_GET['op'] : 'entertainment';
displayMain($interest);
?>
  
</html>
<?php 
function displayMain($interest)
{
    API($interest);
}
function API($interest)
{
    //Dynamic PlaylistID's for each interests
    $interestURL = array('entertainment' => 'PL6AvGVQTyD4pkvWg6M7Qhw4KDLAmrZhBM', 'science' => 'PLtbKV3u_fpiQh9l5kjU3hwGo3Gx4a0VkH', 'food' => 'PL48XRvWqT9sLMVkdisx27-li-Ov9Nmtcm', 'music' => 'PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI', 'sports' => 'PL8fVUTBmJhHJDAtZwiIOooPRurN0hna-j', 'popular' => 'PLrEnWoR732-BHrPp_Pm8_VleD68f9s14-');
    $playlistID = $interestURL[$interest];
    $maxResults = 10;
    $key = "AIzaSyA5MBqoEn8yaaMVsMFzuzKwtIo671Aza6Y";
Exemple #4
0
          <a href="logout.php">Logout</a>
        </li>
	  </ul>
    </nav>
  </div>
</header>
	
	<h1 class="blaBigger"> <strong> BetterTube's Main Page </strong> </h1>
	<h2 class="bla"> welcome back, <span class = "text-danger"> <?php 
echo $outstr;
?>
 ! </span></h2><br><br>
	
	<h3> <span class = "text-info"> your interests are: </span></h3>
		<?php 
displayMain();
?>
	</body>
  
</html>

<?php 
function displayMain()
{
    ?>
		
		
		
		
		<nav id="menu">