Add this to your css
Code:
.tvg {
width: 600px;
margin-right: auto;
margin-left: auto;
}
.cal_tv {
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
Add this to main function
Code:
function re_brac($string){
$data = preg_replace("/\([^)]+\)/","",$string);
$originals = array("-");
$replacements = array("");
return str_ireplace($originals, $replacements, $data);
}
if (!isset($HTTP_POST_VARS) && isset($_POST))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
}
Create a new file called " tv_guide.php " and copy and save the below code.
Code:
<?php
/**
**************************
** FreeTSP Version: 1.0 **
**************************
** http://www.freetsp.info
** https://github.com/Krypto/FreeTSP
** Licence Info: GPL
** Copyright (C) 2010 FreeTSP v1.0
** A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
** Project Leaders: Krypto, Fireknight.
**/
require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR . 'function_main.php');
require_once (FUNC_DIR . 'function_vfunctions.php');
require_once (FUNC_DIR . 'function_user.php');
require_once (FUNC_DIR . 'function_bbcode.php');
db_connect();
logged_in();
site_header();
$action = $HTTP_GET_VARS["date"];
switch ($action)
{
case tomorrow:
$wd = 'Tomorrow';
$feedUrl = 'http://www.tvrage.com/myrss.php?date=tomorrow';
break;
case yesterday:
$wd = 'Yesterday';
$feedUrl = 'http://www.tvrage.com/myrss.php?date=yesterday';
break;
default:
$wd = 'Today';
$feedUrl = 'http://www.tvrage.com/myrss.php';
}
echo "<h2><div class='head_font'><center>TvGuide ($wd)</center></div></h2>";
echo '<table align="center" width="700"><tr><td>';
echo '<table width="300" align="center" class="tvg_button">
<tr>
<td height="102" class="cal_tv"><a href="tv_guide.php?date=yesterday"><img src="/images/yes.png" alt="yes" width="100" height="100" border="0"></a></td>
<td class="cal_tv"><a href="tv_guide.php?date=today"><img src="/images/today.png" alt="to" width="100" height="100" border="0"></a></td>
<td class="cal_tv"><a href="tv_guide.php?date=tomorrow"><img src="/images/tom.png" alt="tom" width="100" height="100" border="0"></a></td>
</tr>
</table>';
$rawFeed = file_get_contents($feedUrl);
//print($rawFeed);
$anobii = new SimpleXmlElement($rawFeed);
$breakholder = 0;
foreach ($anobii->children() as $channel) {
echo "<div class='tvg'><ul style = \"list-style-type:none; float: left; padding-left: 0px; \">";
foreach ($channel->item as $node) {
$itemcount2 = $node -> count();
if ($breakholder == 0) {
if ($itemcount2 < 3) {
$image = $node -> image;
echo "<li style = \"list-style-type:none; width: 275px; float: left; min-height: 300px; padding-right:5px; \"><h2 style=\"width: 275px;\"><a href=\"" . $node -> link . "\">" . $node -> title . "</a></h2><ul style=\"text-align: left; min-height: 300px; border: 1px solid #CCCCCC;width: 100%;list-style-type: none;margin: 0px;padding: 0px;\">\n";
} else {
echo "<li style= \"margin: 0px;\"><a href=\"" . $node -> link . "\">" . $node -> title . "</a></li>\n";
$breakholder = 1;
}
} else {
if ($itemcount2 < 3) {
echo "</ul></li><li style = \"list-style-type:none; width: 275px; float: left; min-height: 300px; padding-right:5px; \"><h2 style=\"width: 275px;\"><a href=\"browe.php?search=\">" . $node -> title . "</a></h2><ul style=\"text-align: left; min-height: 300px; border: 1px solid #CCCCCC;width: 100%;list-style-type: none;margin: 0px;padding: 0px;\">\n";
} else { $name = $node -> title;
echo '<li><a href="/browse.php?search=' . re_brac($name) . '"><p>' . $name . '</p></a></li>';
}
}
}
echo "</ul></li></div>";
}
echo '</td></tr></table>';
site_footer();
?>
Screen
The icons are in the attachment