mirror of
https://github.com/ClaytonWWilson/FightHub.git
synced 2025-12-15 15:18:46 +00:00
removed all debugging echo calls, character and player names now display separately
This commit is contained in:
parent
c4c6992e7c
commit
468aa4a64d
BIN
.index.php.swp
BIN
.index.php.swp
Binary file not shown.
20
index.php
20
index.php
@ -30,7 +30,7 @@ function writeEntryforIndex() {
|
|||||||
die('<p>Connection failed: <p>' . mysql_error());
|
die('<p>Connection failed: <p>' . mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<font color="#FF3D5"><p>Connect1ed successfully</p></font>';
|
//echo '<font color="#FF3D5"><p>Connect1ed successfully</p></font>';
|
||||||
|
|
||||||
// $sql = 'SELECT video_id, video_url, video_name, username, date_upload, date_video, video_length, description, characters, players, game, stage, approved FROM video';
|
// $sql = 'SELECT video_id, video_url, video_name, username, date_upload, date_video, video_length, description, characters, players, game, stage, approved FROM video';
|
||||||
|
|
||||||
@ -57,13 +57,14 @@ function writeEntryforIndex() {
|
|||||||
|
|
||||||
//Format for video_url
|
//Format for video_url
|
||||||
//Get substring from url after '='
|
//Get substring from url after '='
|
||||||
$split = explode("=", $row['video_url']);
|
$splitUrl = explode("=", $row['video_url']);
|
||||||
|
|
||||||
|
$splitChar = explode(",", $row['characters']);
|
||||||
|
$splitPlay = explode(",", $row['players']);
|
||||||
|
|
||||||
echo "<!-- Entry 1 -->" .
|
echo "<!-- Entry 1 -->" .
|
||||||
"<div id=\"video-item\">" .
|
"<div id=\"video-item\">" .
|
||||||
"<iframe width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/$split[1]\" frameborder=\"0\"" .
|
"<iframe width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/$splitUrl[1]\" frameborder=\"0\"" .
|
||||||
|
|
||||||
"allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"" .
|
"allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"" .
|
||||||
"allowfullscreen>" .
|
"allowfullscreen>" .
|
||||||
@ -83,14 +84,14 @@ function writeEntryforIndex() {
|
|||||||
|
|
||||||
|
|
||||||
"<tr>" .
|
"<tr>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitPlay[0]</td>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitChar[0]</td>" .
|
||||||
"</tr>" .
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
"<tr>" .
|
"<tr>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitPlay[1]</td>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitChar[1]</td>" .
|
||||||
"</tr>" .
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ function writeEntryforIndex() {
|
|||||||
"</div>" .
|
"</div>" .
|
||||||
|
|
||||||
"</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> ".
|
||||||
@ -128,6 +129,7 @@ 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++;
|
||||||
}
|
}
|
||||||
|
|||||||
15
search.php
15
search.php
@ -32,7 +32,7 @@ function writeEntryforIndex() {
|
|||||||
die('<p>Connection failed: <p>' . mysql_error());
|
die('<p>Connection failed: <p>' . mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<font color="#FF3D5"><p>Connect1ed successfully</p></font>';
|
//echo '<font color="#FF3D5"><p>Connect1ed successfully</p></font>';
|
||||||
|
|
||||||
// $sql = 'SELECT video_id, video_url, video_name, username, date_upload, date_video, video_length, description, characters, players, game, stage, approved FROM video';
|
// $sql = 'SELECT video_id, video_url, video_name, username, date_upload, date_video, video_length, description, characters, players, game, stage, approved FROM video';
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ function writeEntryforIndex() {
|
|||||||
// mysqli_select_db('fighthubdata');
|
// mysqli_select_db('fighthubdata');
|
||||||
//echo 'hello';
|
//echo 'hello';
|
||||||
$search = $_GET['query'];
|
$search = $_GET['query'];
|
||||||
echo $search;
|
//echo $search;
|
||||||
|
|
||||||
$retval = mysqli_query( $conn, "select * from video where characters like '%$search%' OR players like '%$search%' OR description like '%$search%' OR game like '%$search%' OR stage like '%$search%' OR video_name like '%$search%'");
|
$retval = mysqli_query( $conn, "select * from video where characters like '%$search%' OR players like '%$search%' OR description like '%$search%' OR game like '%$search%' OR stage like '%$search%' OR video_name like '%$search%'");
|
||||||
//echo 'test';
|
//echo 'test';
|
||||||
@ -63,7 +63,8 @@ function writeEntryforIndex() {
|
|||||||
//Format for video_url
|
//Format for video_url
|
||||||
//Get substring from url after '='
|
//Get substring from url after '='
|
||||||
$split = explode("=", $row['video_url']);
|
$split = explode("=", $row['video_url']);
|
||||||
|
$splitChar = explode(",", $row['characters']);
|
||||||
|
$splitPlay = explode(",", $row['players']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -88,15 +89,15 @@ function writeEntryforIndex() {
|
|||||||
|
|
||||||
|
|
||||||
"<tr>" .
|
"<tr>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitPlay[0]</td>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitChar[0]</td>" .
|
||||||
"</tr>" .
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"<tr>" .
|
"<tr>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['players']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitPlay[1]</td>" .
|
||||||
"<td class=\"data\" id=\"table-border\">{$row['characters']}</td>" .
|
"<td class=\"data\" id=\"table-border\">$splitChar[1]</td>" .
|
||||||
"</tr>" .
|
"</tr>" .
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user