ok i need to join all this pages to make 1 neat code


Posted on 16th Feb 2014 07:03 pm by admin

i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i want it to have diff pages for each guide but all the code on 1 page i just dont know how to do it, i will post page each page here

main page
Code: <?php $ShowBookmark = "False"; include 'Include/Header.php'; ?>
<div class="hd2"><font color=#666666><strong><center>Tv Guide</center></strong></font></div>
<?
// Prints something like: 10th 2009f November 2009
$thedate = date('l dS F Y');
echo '
<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/sabc1-icon.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-sabc1.php">Sabc 1</b></font></a>

</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/sabc2-icon.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-sabc2.php">Sabc 2</b></font></a>


</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/sabc3-icon.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-sabc3.php">Sabc 3</b></font></a>


</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/etv-icon.jpg"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-etv.php">Etv</b></font></a>

</td></tr>
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/tvguide/mnet-icon.jpg"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide-Mnet.php">Mnet</b></font></a>

</td></tr>


</table>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="index.php?cmd=100">Back</b></font></a>

</td></tr>
</table>
<hr>
<?php include 'Include/Footer.php'; Log_Hit("TvGuide"); ?>
this is sabc 1
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[2];

$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;

}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/sabc1.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-sabc1"); ?>


this is sabc 2
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[3];
$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;
}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/sabc2.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-sabc2"); ?>

this is sabc 3
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[4];
$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;
}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/sabc3.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-sabc3"); ?>


this is etv
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[5];

$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;

}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker, $position)) !== false) {
$position += $openingMarkerLength;
if (($closingMarkerPosition = strpos($text, $closingMarker, $position)) !== false) {
$result[] = substr($text, $position, $closingMarkerPosition - $position);
$position = $closingMarkerPosition + $closingMarkerLength;
}
}
return $result;
}
?>
<div class="hd2"><center><font color=#666666><strong><img src="Images/tvguide/etv.jpg"></strong></font></center></div>

<?
// Prints the date
$thedate = date('l dS F Y');
echo '<center><font face="Verdana" size="2" color="blue"><u>' .$thedate. '</center></u></font>';
?>

<font face="Verdana" size="2"><?php echo GetGuide(); ?></font>

<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="TvGuide.php">Back</b></font></a>

</td></tr>
</table>
<hr>

<?php include 'Include/Footer.php'; Log_Hit("TvGuide-etv"); ?>

and this is mnet
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';

function GetGuide() {
$url = "http://mysite.com";
$RawData = @file_get_contents($url) or die('Could not access file: $url');
$Table = ExData($RawData,'<div style="font-size:12px; padding-top:15px; padding-left:9px">',"</div>");

$FGuide = $Table[1];
$i=2;
$upper = 60;

while ($i <= $upper) {
$FGuide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $FGuide);
$i++;
}
$FGuide = str_replace('0', '<font face="Verdana" color="red" size="2">0</font>', $FGuide);
$FGuide = str_replace(1, '<font face="Verdana" color="red" size="2">1</font>', $FGuide);
$FGuide = str_replace(':', '<font face="Verdana" color="green" size="2">:</font>', $FGuide);

return $FGuide;
}

function ExData($text, $openingMarker, $closingMarker) {
$openingMarkerLength = strlen($openingMarker);
$closingMarkerLength = strlen($closingMarker);
$result = array();
$position = 0;
while (($position = strpos($text, $openingMarker

No comments posted yet

Your Answer:

Login to answer
282 Like 11 Dislike
Previous forums Next forums
Other forums

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

Help with email validation please...
Hi,
Please could you help.
I have a register.php login page where users register, the detail

Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.

Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.
I know that if I chang

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: function createthumb($name,$filename,$n

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

CURL question
i am wondering if it's possible to use multi curl with login something like

login once to web

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash