Beispiel #1
0
    redirect("index.php?error=No+Video+ID");
}
$id = $_GET['id'];
if (!youtube_validate_id($id)) {
    redirect("index.php?error=Invalid+Video+ID");
}
$edit = var_check($_GET['edit']);
$video = new Youtube($id);
$info = $video->retrieve_info();
if ($info == False) {
    redirect("index.php?error=Video+Doesn%27t+Exist");
}
$title = format_string(Config::Get("go.title"), array("ID" => $id, "TITLE" => $info['title']));
$description = format_string(Config::Get("go.description"), array("ID" => $id, "TITLE" => $info['title']));
$keywords = format_string(Config::Get("go.keywords"), array("ID" => $id, "TITLE" => $info['title']));
$stream = $video->get_best_stream();
$caption_url = sprintf("ajax/get_caption.php?id=%s&type=vtt%s", $id, $edit ? "&edit=True" : "");
$caption = "<span class=\"text-success\"><b>Caption</b></span>";
$craption = "<span class=\"text-danger\"><b>Craption</b></span>";
$caption_type = $edit ? $caption : $craption;
#$button_go_craption = "<a href=\"go.php?id=".$id."&edit=True\" id=\"caption\" class=\"btn btn-default btn-block btn-success\" title=\"Edit this Craption\">Edit this Craption</a>";
#$button_go_edit = "<a href=\"go.php?id=".$id."\" id=\"caption\" class=\"btn btn-default btn-block btn-danger\" title=\"Take a look at the original Craption\">Take a look at the original Craption</a>";
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
    <?php 
require_once "inc/head.php";
?>

    <body>