Junior Spellweaver
- Joined
- Nov 11, 2012
- Messages
- 174
- Reaction score
- 84
Hey again ragezone x) I think you have seen a lot of me theese past few days / weeks but i wasn't sure about releasing this plugin att first beacuse i wanted my retro to be unique but i was thinking either i release it or someone is gonna steal it and rip it off taking all the cred so i am releasing it for all of you guys. In this plugin you will get acess to:
Housekeeping page/Script for this
A php code that displays the movie(s) at random with order by rand() so they become random
And finally you will get the sqls for it
Note: The Sqls are for all databases but the plugin is ajusted to revcms.
Screen:
Sqls:
Php code (put the code where you want it to display):
And finally the plugin for the housekeeping(create a new page and add this into it , adjust it to your housekeeping) :
And since some people maybe don't understand how this works its easy , you need to have a movie url
ex the movie link to divergent(
You can easily find the links by inspecting elements through google chrome . Movies can be found at streaming websites as swefilmer.com and movie4k.to
Hope you enjoy it & thanks for me
Housekeeping page/Script for this
A php code that displays the movie(s) at random with order by rand() so they become random
And finally you will get the sqls for it
Note: The Sqls are for all databases but the plugin is ajusted to revcms.
Screen:
Sqls:
PHP:
CREATE TABLE IF NOT EXISTS `movie` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`link` varchar(1000) NOT NULL,
PRIMARY KEY (`id`)
)
Php code (put the code where you want it to display):
PHP:
<?php
$query = mysql_query("SELECT * from movie ORDER BY RAND() DESC LIMIT 1");
while($movie = mysql_fetch_array($query)) {
$id = $movie['id'];
$link = $movie['link'];
?>
<iframe src="<?php echo $movie['link']; ?>" width="550px" height="200px;" frameborder="0"></iframe>
<?php } ?>
And finally the plugin for the housekeeping(create a new page and add this into it , adjust it to your housekeeping) :
PHP:
<?php
if (isset($_POST['movie_submit'])) {
if (!empty($_POST['movie_code'])) {
if (strlen($_POST['movie_code']) > 3) {
if (mysql_num_rows(mysql_query("SELECT * FROM `movie` WHERE `link` = '".filter($_POST['movie_code'])."'")) == 0) {
mysql_query("INSERT INTO `movie` (`link`) VALUES ('".filter($_POST['movie_code'])."')") or die(mysql_error());
echo '<div class="alert alert-success">You have added this movie without any problems!</div>';
}
else
echo '<div class="alert alert-danger">This movie already exits!</div>';
} else {
echo '<div class="alert alert-danger">The link must be more than 3 letters / numbers!</div>';
}
} else {
echo '<div class="alert alert-danger">Please add a movie!</div>';
}
}
?>
<center>
The link of the movie :
<br />
<form method="POST" action="#" class="form-horizontal" role="form">
<div class="form-group">
<textarea name="movie_code" class="form-control" placeholder="Länk">
</textarea></div>
<br />
<div class="form-group">
<input type="submit" name="movie_submit" value="Add Movie" class="btn btn-default">
</div>
</form></center>
<?php
$getMovie = mysql_query("SELECT * FROM `movie` ORDER BY `id` DESC");
if (mysql_num_rows($getMovie) > 0) { ?>
<table class="table table-striped">
<thead>
<tr>
<th nowrap="nowrap">Id</th>
<th nowrap="nowrap">Movie Link</th>
</tr>
</thead>
<tbody>
<?php
while ($movieData = mysql_fetch_array($getMovie)) {
echo '
<tr>
<td>'.$movieData['id'].'</td>
<td>'.$movieData['link'].'</td>
</tr>';
}
?>
</tbody>
</table>
<?php } else {
echo '<br/><br/><div class="alert alert-warning">They\'re currently isn\'t any movies.</div>';
}
?>
And since some people maybe don't understand how this works its easy , you need to have a movie url
ex the movie link to divergent(
You must be registered to see links
)You can easily find the links by inspecting elements through google chrome . Movies can be found at streaming websites as swefilmer.com and movie4k.to
Hope you enjoy it & thanks for me