mirror of
https://github.com/ClaytonWWilson/FightHub.git
synced 2025-12-18 08:08:47 +00:00
working styles for index.php and search.php. Index.php still prints all data from a row
This commit is contained in:
parent
2fdf8b8409
commit
c4c6992e7c
BIN
.index.php.swp
Normal file
BIN
.index.php.swp
Normal file
Binary file not shown.
61
index.php
61
index.php
@ -46,15 +46,71 @@ function writeEntryforIndex() {
|
|||||||
}
|
}
|
||||||
//echo '<font color="blue">not death</font>';
|
//echo '<font color="blue">not death</font>';
|
||||||
|
|
||||||
$search = $_GET['query'];
|
//$search = $_GET['query'];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
echo "<div class=\"video-list-container\"> ";
|
||||||
while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {
|
while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {
|
||||||
|
|
||||||
if($i > 9){
|
if($i > 9){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Format for video_url
|
||||||
|
//Get substring from url after '='
|
||||||
|
$split = explode("=", $row['video_url']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo "<!-- Entry 1 -->" .
|
||||||
|
"<div id=\"video-item\">" .
|
||||||
|
"<iframe width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/$split[1]\" frameborder=\"0\"" .
|
||||||
|
|
||||||
|
"allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"" .
|
||||||
|
"allowfullscreen>" .
|
||||||
|
"</iframe>" .
|
||||||
|
|
||||||
|
|
||||||
|
"<a href=\"{$row['video_url']}\">{$row['video_name']}</a>" .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"<div id=\"players-characters\">" .
|
||||||
|
"<table>" .
|
||||||
|
"<tr>" .
|
||||||
|
"<td class=\"header\">Players</td>" .
|
||||||
|
"<td class=\"header\">Characters</td>" .
|
||||||
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
|
"<tr>" .
|
||||||
|
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
||||||
|
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
||||||
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
|
"<tr>" .
|
||||||
|
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
||||||
|
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
||||||
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
|
"</table>" .
|
||||||
|
"</div>" .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"<div id=\"game-stage\">" .
|
||||||
|
"<p>{$row['game']}</p>" .
|
||||||
|
"<p>{$row['stage']}</p>" .
|
||||||
|
"</div>" .
|
||||||
|
|
||||||
|
|
||||||
|
"<div id=\"description\">" .
|
||||||
|
"<p>{$row['description']}</p>".
|
||||||
|
"</div>" .
|
||||||
|
|
||||||
|
"</div> ";
|
||||||
|
|
||||||
echo "<font color='#FF3D53'> VIDEO ID :{$row['video_id']} <br> ".
|
echo "<font color='#FF3D53'> VIDEO ID :{$row['video_id']} <br> ".
|
||||||
"VIDEO URL : {$row['video_url']} <br> ".
|
"VIDEO URL : {$row['video_url']} <br> ".
|
||||||
"VIDEO NAME : {$row['video_name']} <br> ".
|
"VIDEO NAME : {$row['video_name']} <br> ".
|
||||||
@ -75,6 +131,7 @@ function writeEntryforIndex() {
|
|||||||
mysqli_close($conn);
|
mysqli_close($conn);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
echo "</div>";
|
||||||
}
|
}
|
||||||
writeEntryforIndex();
|
writeEntryforIndex();
|
||||||
|
|
||||||
|
|||||||
94
search.php
94
search.php
@ -1,6 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
echo "<link rel='stylesheet' type='text/css' href='main.css' />";
|
|
||||||
<title>FightHub - Home</title>
|
<title>FightHub - Home</title>
|
||||||
<link rel="stylesheet" href="main.css">
|
<link rel="stylesheet" href="main.css">
|
||||||
</head>
|
</head>
|
||||||
@ -53,7 +53,7 @@ function writeEntryforIndex() {
|
|||||||
|
|
||||||
|
|
||||||
// $i = 9;
|
// $i = 9;
|
||||||
|
echo "<div class=\"video-list-container\"> ";
|
||||||
while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {
|
while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {
|
||||||
|
|
||||||
// if($i > 9){
|
// if($i > 9){
|
||||||
@ -61,60 +61,64 @@ function writeEntryforIndex() {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//Format for video_url
|
//Format for video_url
|
||||||
|
//Get substring from url after '='
|
||||||
<div class="video-list-container">
|
$split = explode("=", $row['video_url']);
|
||||||
<!-- Entry 1 -->
|
|
||||||
<div id="video-item">
|
|
||||||
<iframe width="640" height="360" src="https://www.youtube.com/embed/eCI8eAbq-4c" frameborder="0"
|
|
||||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
||||||
allowfullscreen>
|
|
||||||
</iframe>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="https://www.youtube.com/watch?v=eCI8eAbq-4c">Video Title Here</a>
|
|
||||||
|
|
||||||
|
|
||||||
//Format for player and characters
|
echo "<!-- Entry 1 -->" .
|
||||||
<div id="players-characters">
|
"<div id=\"video-item\">" .
|
||||||
<table>
|
"<iframe width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/$split[1]\" frameborder=\"0\"" .
|
||||||
<tr>
|
"allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"" .
|
||||||
<td class="header">Players</td>
|
"allowfullscreen>" .
|
||||||
<td class="header">Characters</td>
|
"</iframe>" .
|
||||||
</tr>
|
|
||||||
|
|
||||||
//Player1, character1 data
|
|
||||||
<tr>
|
|
||||||
<td class="data" id="table-border">Player1</td>
|
|
||||||
<td class="data" id="table-border">Character1</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
//Player2, character2 data
|
"<a href=\"{$row['video_url']}\">{$row['video_name']}</a>" .
|
||||||
<tr>
|
|
||||||
<td class="data" id="table-border">Player2</td>
|
|
||||||
<td class="data" id="table-border">Character2</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
//Game and stage
|
"<div id=\"players-characters\">" .
|
||||||
//
|
"<table>" .
|
||||||
<div id="game-stage">
|
"<tr>" .
|
||||||
<p>Game Name</p>
|
"<td class=\"header\">Players</td>" .
|
||||||
<p>Stage Name</p>
|
"<td class=\"header\">Characters</td>" .
|
||||||
</div>
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
<div id="description">
|
"<tr>" .
|
||||||
<p>The description goes here.......</p>
|
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
||||||
</div>
|
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
||||||
|
"</tr>" .
|
||||||
//</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"<tr>" .
|
||||||
|
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
||||||
|
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
||||||
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
|
"</table>" .
|
||||||
|
"</div>" .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"<div id=\"game-stage\">" .
|
||||||
|
"<p>{$row['game']}</p>" .
|
||||||
|
"<p>{$row['stage']}</p>" .
|
||||||
|
"</div>" .
|
||||||
|
|
||||||
|
|
||||||
|
"<div id=\"description\">" .
|
||||||
|
"<p>{$row['description']}</p>".
|
||||||
|
"</div>" .
|
||||||
|
|
||||||
|
|
||||||
|
"</div> ";
|
||||||
|
|
||||||
|
/*
|
||||||
echo "<font color='#FF3D53'> VIDEO ID :{$row['video_id']} <br> ".
|
echo "<font color='#FF3D53'> VIDEO ID :{$row['video_id']} <br> ".
|
||||||
"VIDEO URL : {$row['video_url']} <br> ".
|
"VIDEO URL : {$row['video_url']} <br> ".
|
||||||
"VIDEO NAME : {$row['video_name']} <br> ".
|
"VIDEO NAME : {$row['video_name']} <br> ".
|
||||||
@ -132,10 +136,14 @@ function writeEntryforIndex() {
|
|||||||
|
|
||||||
|
|
||||||
echo "<font color='#FF3D53'>Fetched data successfully\n</font>";
|
echo "<font color='#FF3D53'>Fetched data successfully\n</font>";
|
||||||
|
|
||||||
|
*/
|
||||||
mysqli_close($conn);
|
mysqli_close($conn);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
echo "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
writeEntryforIndex();
|
writeEntryforIndex();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user