Old 02-22-2005   #1 (permalink)
Registered User
 
fewtion's Avatar
 
Join Date: Feb 2005
Posts: 5

PHP template Help

I want to convert my site to PHP, and I want to use a php template.
I have down the tut on biorust and it all works, i can change a link and it changes on every page. There is only one prob, I cant display the content . can someone tell what i need to do to fix this prob.
fewtion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-22-2005   #2 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
what happens when you run the script? do you get an error message at all?
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-22-2005   #3 (permalink)
Registered User
 
fewtion's Avatar
 
Join Date: Feb 2005
Posts: 5

Fewtion

I do now cause i have been playing with it a bit, but when i first did it was fine.
fewtion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-24-2005   #4 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
if u are not sooo lazy,can u post ur mai page here?we can check it for u ,may be theres some problem with ' or "
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-24-2005   #5 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
we can't help you unless you post us the code you are using. that's like trying to build a house in the dark.
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-26-2005   #6 (permalink)
Registered User
 
fewtion's Avatar
 
Join Date: Feb 2005
Posts: 5

Site Code

Here is the main page code- the content always stuffs up... http://fewtion.fe.funpic.org/index.php?p=aboutme <-- as u can


Code:
<head>havent included head 
<imageready slices> not included

<DIV id=Layer1
style="Z-INDEX: 1; LEFT: 207; WIDTH: 583; POSITION: absolute; TOP: 284; HEIGHT: 451">
<font color=#336699 face=verdana size=1><p>
<?php
$page=$_GET['p']; 
if (($page == "home") or ($page =="")) { include('home.php'); 
} else if($page == "home") { include('home.php');
} else if($page == "aboutme") { include('aboutme.php');
 } else if($page == "actions") { include('actions.php');
} else if($page == "affiliates") { include('affiliates.php');
} else if($page == "anime") { include('anime.php');
} else if($page == "basic") { include('basic.php');
} else if($page == "brushes") { include('brushes.php');
} else if($page == "downloads") { include('downloads.php');
} else if($page == "enterpics") { include('enterpics.php');
} else if($page == "fonts") { include('fonts.php');
} else if($page == "gfx") { include('gfx.php');
} else if($page == "graphics") { include('graphics.php');
} else if($page == "layouts") { include('layouts.php');
} else if($page == "linkme") { include('linkme.php');
} else if($page == "msn1") { include('msn1.php');
} else if($page == "photography") { include('photography.php');
} else if($page == "photoshop") { include('photoshop.php');
} else if($page == "plugins") { include('plugins.php');
} else if($page == "portfolio") { include('portfolio.php');
} else if($page == "services") { include('services.php');
} else if($page == "sigs") { include('sigs.php');
} else if($page == "sigs1") { include('sigs1.php');
} else if($page == "sigs2") { include('sigs2.php');
} else if($page == "terms") { include('terms.php');
} else if($page == "tutorials") { include('tutorials.php');
} else if($page == "user") { include('user.php');
} else if($page == "fireeffect") { include('fireeffect.php');
} else if($page == "abstractgrunge") { include('abstractgrunge.php');
} else if($page == "bluemetal") { include('bluemetal.php');
} else if($page == "cellulardeath") { include('cellulardeath.php');
}
?>

<p><BR>
&nbsp;</a></FONT></p>
</DIV>
</center>
</FONT>
</DIV>
<DIV id=Layer2
style="Z-INDEX: 4; LEFT: 830; WIDTH: 154; POSITION: absolute; TOP: 600; HEIGHT: 264">
<a target="_blank" href="http://www.vizion-art.nl.tt/">
<img border="0" src="images/affiliatebuttons/vizion-affiliate.jpg" width="88" height="31"></a><a target="_blank" href="http://www.jmdesigns.tk/"><img border="0" src="images/affiliatebuttons/jmdesigns.gif" width="88" height="31"></a><a target="_blank" href="http://www.hostultra.com/~MadCat"><img border="0" src="images/affiliatebuttons/Banner1.gif" width="88" height="31"></a><a target="_blank" href="http://www.dawnofdesign.info/"><img border="0" src="images/affiliatebuttons/dawnlink.gif" width="88" height="31"></a><a target="_blank" href="http://faith27870.tripod.com/hiruma2"><img border="0" src="images/affiliatebuttons/animation2.gif" width="88" height="31"></a><a target="_blank" href="http://www.amvslash.com/"><img border="0" src="images/affiliatebuttons/amvslash.gif" width="88" height="31"></a>
<font color=#336699 face=verdana size=1>

<p>
&nbsp;<center>
<p><BR>
&nbsp;</a></FONT></p>
</DIV>
</center>
</FONT>
</DIV>
<DIV id=Layer3
style="Z-INDEX: 4; LEFT: 830; WIDTH: 153; POSITION: absolute; TOP: 864; HEIGHT: 296">
<a target="_blank" href="http://www.jmdesigns.tk/">
<img border="0" src="jmdesingadd.gif" width="153" height="218"></a>
<font color=#336699 face=verdana size=1>

<p>
&nbsp;<center>
<p><BR>
&nbsp;</a></FONT></p>
</DIV>
</center>
</FONT>
</DIV>
<DIV id=Layer12
style="Z-INDEX: 4; LEFT: 13; WIDTH: 166; POSITION: absolute; TOP: 281; HEIGHT: 391">
<font face=verdana size=1 color="#ffffff">

<iframe name="I1" src="http://86066.myshoutbox.com" target="_self" width="153" height="260">
Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>
 </font>
   &nbsp;<font color=#336699 face=verdana size=1><p>
&nbsp;<center>
<p><BR>
&nbsp;</a></FONT></p>
</DIV>
<DIV id=Layer4
style="Z-INDEX: 4; LEFT: 17; WIDTH: 152; POSITION: absolute; TOP: 598; HEIGHT: 216">
<a target="_blank" href="http://www.auroragfx.tk">
<img border="0" src="images/affiliatebuttons/aurora.jpg" width="88" height="31"></a><a target="_blank" href="http://biorust.com/"><img border="0" src="images/affiliatebuttons/biorust2.gif" width="88" height="31"></a><a target="_blank" href="http://funpic.org/"><img border="0" src="newaff/funpic2.png" width="88" height="31"></a><a target="_blank" href="http://www.good-tutorials.com/"><img border="0" src="newaff/88x31_green.gif" width="88" height="31"></a><a target="_blank" href="http://www.coreftp.com"><img border="0" src="images/affiliatebuttons/coreftp.jpg" width="88" height="31"></a><a target="_blank" href="http://gmail.com/"><img border="0" src="images/affiliatebuttons/gmail.jpg" width="88" height="31"></a><font size="1" color="#FFFFFF" face="Verdana"><a style="text-decoration: none; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" href="mailto:fewtion@gmail.com?subject=Free Gmail"><font color="#FFFFFF">Free 
Gmail</font></a></font>
<font color=#336699 face=verdana size=1>

<p>
<p><BR>
&nbsp;</a></FONT></p>
</DIV>
</center>
</FONT>
</DIV>
<p>
&nbsp;<center>
<p><BR>
&nbsp;</a></FONT></p>
</DIV>
</center>
</FONT>
</DIV>
</body>
</html>
Edit - I put your code in the [code] tag. It's easier to read/follow.

Last edited by ConceptualMind; 02-27-2005 at 05:44 AM.
fewtion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-26-2005   #7 (permalink)
Red Dawn
 
BlodoPKNZ's Avatar
 
Join Date: May 2004
Location: Eastern Europe
Posts: 302

To speak you the truth, i dont see a problem. BTW your php code kinda sucks for updating, you could always do it like this preferably:

Code:
$site_main = 'home.php';
if (!$_GET['p']) {
include($site_main);
} else {
$incfile = $_GET['act'] . '.php';
if (file_exists( basename( $incfile ) )) { 
include($incfile);
} else {
include($site_main);
}
}
I only constructed this code now though, but it works i can assure you.

The basename func doesnt allow the address to be screwed into displaying data from a different folder, also the script checks if the file exists (if it doesnt it just displays $site_main). If youre handy you can even add a preg_match to check for a 'www' or a 'http' in the string so as to prevent using data from another server by a user maliciously or strip up the html and slashes.
Although he probably wont get far with the folder restriction in place.
__________________
BlodoPKNZ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-26-2005   #8 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
Sorry to tell u this,but i cant get ur problem too,coul you ple tell us more about ur problem.Here i will tell u some of my experiences on this.
Blodo codes works just well,but i have surfed over the web and i found that many peoples dont know that the link like this --> "../" will up 1 folder
For exmaple ,u`r coding in a file which stored in a folder and outside that folder is indec.php,but u want to access that index.php so this will work --> <a href='../index.php></a>
---Whatever,i still cant help you,sorry about that.
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-26-2005   #9 (permalink)
Red Dawn
 
BlodoPKNZ's Avatar
 
Join Date: May 2004
Location: Eastern Europe
Posts: 302

Yes thats why the basename function is used. It prevents accessing files from anywhere other then the folder where the php file is executed.
__________________
BlodoPKNZ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 04:59 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT