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

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

single page with referrer to show correct page
I have a simple website with a couple of different pages. I would like to be able to in a div tag w

Change log of Cost centre change in Plant maintenance order
Hi,
How to view Change log of Cost centre in Plant maintenance order. Not visible thru 'Docume

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0

When using connection method: Cache with live

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

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