Skip to content

Commit

Permalink
Een grootte fout met een geweldige oplossing
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-The-Great committed Nov 17, 2020
1 parent 3aa5d8c commit 2f5e52a
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 66 deletions.
82 changes: 82 additions & 0 deletions Documenten/video.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 17, 2020 at 03:42 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.22

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `MijnDatabase`
--

-- --------------------------------------------------------

--
-- Table structure for table `video`
--

CREATE TABLE `video` (
`Video_ID` int(11) NOT NULL,
`Naam` varchar(128) NOT NULL,
`File` varchar(256) NOT NULL,
`Thumbnail` varchar(256) NOT NULL,
`CategorieID` int(11) NOT NULL,
`KanaalID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `video`
--

INSERT INTO `video` (`Video_ID`, `Naam`, `File`, `Thumbnail`, `CategorieID`, `KanaalID`) VALUES
(9, 'titletje', 'videoplayback.mp4', 'Photo on 21-11-2019 at 15.53.jpg', 4, 27);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `video`
--
ALTER TABLE `video`
ADD PRIMARY KEY (`Video_ID`),
ADD KEY `KanaalID` (`KanaalID`),
ADD KEY `CategorieID` (`CategorieID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `video`
--
ALTER TABLE `video`
MODIFY `Video_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `video`
--
ALTER TABLE `video`
ADD CONSTRAINT `video_ibfk_1` FOREIGN KEY (`KanaalID`) REFERENCES `kanaal` (`Kanaal_ID`),
ADD CONSTRAINT `video_ibfk_2` FOREIGN KEY (`CategorieID`) REFERENCES `categorie` (`Categorie_ID`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
23 changes: 1 addition & 22 deletions components/login.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
session_start();
require('php/database.php');
//query om de categorien te vinden in de database
$query = "SELECT * FROM `categorie`";
Expand All @@ -23,23 +22,16 @@
<fieldset id="tab011">
<div class="bg-light">
<h5 class="text-center mb-4 mt-0 pt-4">Sign in</h5>
<<<<<<< HEAD
<form method="POST" action="php/inlog_verwerk.php">
=======
<form method="POST" action="php/login_verwerk.php">
<div class="form-group">
<label>Email</label>
<input type="mail" name="email" class="form-control" id="email" placeholder="[email protected]">
</div>
>>>>>>> feature-video-toevoegen
<div class="form-group">
<label>Username</label>
<input name="username" id="username" class="form-control" placeholder="Peter857" type="text">
</div>
<<<<<<< HEAD
=======

>>>>>>> feature-video-toevoegen
<div class="form-group">
<label>Password</label>
<input name="password" id="password" class="form-control" placeholder="********" type="password">
Expand Down Expand Up @@ -104,17 +96,4 @@
</div>
</div>
</div>
<<<<<<< HEAD
<script defer src="js/login.js"></script>
</div>
=======
</div>
</div>
</div>
</div>
<?php
require('components/scripts.php');
?>
<script defer src="js/login.js"></script>
</div>
>>>>>>> feature-video-toevoegen
</div>
3 changes: 1 addition & 2 deletions components/navigation.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<nav class="navbar navbar-expand-xl justify-content-between navbar-dark bg-twitch mb-4">
<span id="menu-toggle" style="cursor: pointer;" class="navbar-toggler-icon mr-3"></span>
<nav class="navbar navbar-expand-xl justify-content-between navbar-dark bg-twitch" id="navbartrying">
<a class="navbar-brand nav-item mr-auto" href="./">
<img src="img/logo.png" class="img-fluid socialguys rounded" alt="Social Guys"> <no class="text-blank">Social Guys</no>
</a>
Expand Down
1 change: 1 addition & 0 deletions components/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/fontawsome.js"></script>
<script src="js/login.js"></script>
<script src="js/wrapper.js"></script>
10 changes: 10 additions & 0 deletions components/sidebar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="bg-twitch rounded" id="sidebar-wrapper">
<div class="list-group list-group-flush">
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Subscriptions</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Channel</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Channel</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Channel</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Channel</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Channel</a>
</div>
</div>
9 changes: 7 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ a.bg-acc:focus,a.bg-acc:hover,button.bg-acc:focus,button.bg-acc:hover{
/* Hier is een sidebar-wrapper die ik heb gevonden plus hier kunnen we een sidebar maken */
#sidebar-wrapper {
min-height: 100vh!important;
margin-left: -15rem;
margin-top: 6.1rem!important;
-webkit-transition: margin .25s ease-out!important;
-moz-transition: margin .25s ease-out!important;
-o-transition: margin .25s ease-out!important;
Expand Down Expand Up @@ -68,6 +68,9 @@ margin-left: 0;
margin-left: -15rem;
}
}
#navbartrying{
margin-left: -15rem!important;
}
/* Carousel base class */
.carousel {
margin-bottom: 4rem;
Expand All @@ -78,11 +81,13 @@ margin-left: 0;
}
.carousel-item {
height: 32rem;

}
.carousel-item > img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
margin: 0;
max-width: 100%;
height: 32rem;
}
47 changes: 17 additions & 30 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,54 +15,41 @@
</head>

<body class="bg-back">
<div class="d-flex" id="wrapper">
<div class="bg-twitch" id="sidebar-wrapper">
<div class="sidebar-heading text-white">Social Guys</div>
<div class="list-group list-group-flush">
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Dashboard</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Shortcuts</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Overview</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Events</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Profile</a>
<a href="#" class="list-group-item list-group-item-action text-white bg-dark">Status</a>
</div>
</div>
<div id="page-content-wrapper">
<div class="d-flex">
<?php require("components/sidebar.php");?>
<div id="page-content-wrapper">
<?php require("components/navigation.php");?>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div id="myCarousel" class="ml-5 mr-5 mt-5 carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="0" class="active"></li></a>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img"><rect width="100%" height="100%" fill="#777"/></svg>
<img class="img-fluid w-100" src="uploads/Thumbnail/mario.png" alt="First slide">
<div class="container">
<div class="carousel-caption text-left">
<h1>Example headline.</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p>
<div class="carousel-caption">
<a href="index.php" class="text-light"><h1>Super mario Odyssey</h1>
<p>Cool mario game</p></a>
</div>
</div>
</div>
<div class="carousel-item">
<svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img"><rect width="100%" height="100%" fill="#777"/></svg>
<img class="img-fluid w-100" src="uploads/Thumbnail/minecraft.png" alt="First slide">
<div class="container">
<div class="carousel-caption">
<h1>Another example headline.</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p>
<div class="carousel-caption text-light">
<a href="index.php" class="text-light"><h1>Minecraft Java</h1>
<p>Download minecraft today to join us and get a 50% discount on purchase</p></a>
</div>
</div>
</div>
<div class="carousel-item">
<svg class="bd-placeholder-img" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img"><rect width="100%" height="100%" fill="#777"/></svg>
<img class="img-fluid w-100" src="uploads/Thumbnail/zelda.png" alt="First slide">
<div class="container">
<div class="carousel-caption text-right">
<h1>One more for good measure.</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p>
<div class="carousel-caption text-light">
<a href="index.php" class="text-light"><h1>Breath of the wild 2</h1>
<p>The new zelda game is coming out are you excited</p></a>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions js/wrapper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$("#menu-toggle").click(function(event) {
/*$("#menu-toggle").click(function(event) {
event.preventDefault();
$("#wrapper").toggleClass("toggled");
});
});*/
7 changes: 2 additions & 5 deletions kanaal.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<<<<<<< HEAD
<?php
require 'php/database.php';

//zoek de id in de url
$id = $_GET['id'];
$id = 1;

//query voor de om de video op te halen
$query = "SELECT * FROM video WHERE KanaalID = ". $id;
Expand Down Expand Up @@ -66,7 +65,6 @@
echo $foutmelding;
}
?>
=======
<?php
require 'php/database.php';

Expand Down Expand Up @@ -153,5 +151,4 @@
</div>
<?php require("components/scripts.php");?>
</body>
</html>
>>>>>>> feature-video-toevoegen
</html>
Binary file added uploads/thumbnail/mario.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/thumbnail/minecraft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/thumbnail/zelda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions video_toevoegen.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@
</select>
<p>Video file:</p>
<input type="file" name="video" ><br>
<<<<<<< HEAD
<p>Thumbnail:</p>
<input type="file" name="thumbnail" ><br>
=======
>>>>>>> feature-video-toevoegen
<input type="submit" name="uploaden" value="Upload">
</form>
</body>
Expand Down

0 comments on commit 2f5e52a

Please sign in to comment.