firefly007 |
8th July 2014 16:55 |
TV Guide-- Requested by graaf
3 Attachment(s)
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:
/**
**************************
** 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 "TvGuide ($wd)";
echo '';
echo '';
$rawFeed = file_get_contents($feedUrl);
//print($rawFeed);
$anobii = new SimpleXmlElement($rawFeed);
$breakholder = 0;
foreach ($anobii->children() as $channel) {
echo "";
foreach ($channel->item as $node) {
$itemcount2 = $node -> count();
if ($breakholder == 0) {
if ($itemcount2 < 3) {
$image = $node -> image;
echo "\n";
} else { $name = $node -> title;
echo '' . $name . ' ';
}
}
}
echo " ";
}
echo ' | ';
site_footer();
?>
Screen
http://lookpic.com/O/i2/1784/MFphoxBm.png
The icons are in the attachment
|