ztealmax Posted December 13, 2006 Share Posted December 13, 2006 hi im trying to show my content within my layout:[url=http://x101.indivi.se/index.php?part=news]http://x101.indivi.se/index.php?part=news[/url]When i click the links they dont show up within my layout, not sure what im doing wrong here...here is my index.php:[code]<html><head><title>PHP</title><link rel="stylesheet" href="x101_themes/standard/theme.css" type="text/css"></head><body bgcolor="#cccccc" topmargin="0" marginheight="0"> <table width="90%" border="0" align="center" height="90%" style="border: 2px solid #000000" bgcolor="#ffffff" cellpadding="2" cellspacing="0"> <tr valign="middle" align="center"> <td colspan="3" height="60" background="logo.gif"> </td> </tr> <tr> <td height="5" colspan="3"><img src="x101_images/pix.gif" width="1" height="5"></td> </tr> <tr> <td width="100" valign="top"> <table width="100%" align="center"> <tr> <td valign="top"><b> » <a href="index.php?part=news">News</a><br> » <a href="index.php?part=links">Links</a><br> » <a href="index.php?part=forum">Forum</a><br> » <a href="index.php?part=downloads">Downloads</a><br> » <a href="index.php?part=members">Members</a><br> </b> </td> </tr> </table> </td> <td valign="top" background="x101_images/dot1.gif" width="5"> </td> <td width="295" valign="top"><? if ($_GET['part'] == "news") { require_once("news.php");?> <? } elseif ($_GET['part'] == "links") { ?> Links<? } elseif ($_GET['part'] == "forum") { ?> Forum<? } elseif ($_GET['part'] == "downloads") { ?> Downloads<? } elseif ($_GET['part'] == "members") { ?> Members<? } else { ?> Welcome<? } ?> </td> </tr> <tr> <td height="2" colspan="3"><img src="x101_images/pix.gif" height="2"></td> </tr> </table></html>[/code]and here is the code for listing files:[code]?php $this = $PHP_SELF; $dir = $DOCUMENT_ROOT."x101_news/"; $files = opendir($dir); $file_list = array(); $file_sort = array(); if(empty($sort))$sort="date"; if(empty($r)) $r=1; $cnt = 1; while ($file = readdir($files)) { $full_path = $dir."/".$file; if(!is_dir($full_path)) { $ext = explode(".",$file); $i=count($ext); if($i>1)$file_details["ext"] = strtolower($ext[$i-1]); $file_details["name"] = $ext[0]; $file_details["date"] = filectime($full_path); $file_list[$cnt] = $file_details; $key = strtolower($file_details[$sort]); $file_sort[$cnt] = $key; $cnt++; } } if($r)arsort($file_sort); else asort($file_sort); ?><link href="../webmax.css" rel="stylesheet" type="text/css"><table width="465" border="0" cellpadding="3" cellspacing="0" class="bodytext"> <tr> <td width="174"><?php print($this);?><?php print(!$r);?>Name</td> <td width="141"><?php print($this);?><?php print(!$r);?>Date</td> </tr> <tr bgcolor="#0033CC"> <td height="3" colspan="5"> </td> </tr><?php while(list($key, $value)=each($file_sort)){ $value = $file_list[$key];?> <tr> <td width="174"><a href="read.php?text=x101_news/<?php print($value["name"]);?>"><?php print($value["name"]);?></a></td> <td width="141"><?php print(date("Y/m/d H:i",$value["date"]));?></td> </tr><?php}?></table>[/code]and finally the code for reading the files:[code]<?php// set file to read$file = $_GET['text'];// open file $fh = fopen($file, 'r') /*or die('Could not open file!')*/;// read file contents$data = fread($fh, filesize($file)) /*or die('Could not read file!')*/;// close file fclose($fh); // print file contents echo $data; ?>[/code] Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 13, 2006 Author Share Posted December 13, 2006 If you don't understand what im asking, please ask ;) Quote Link to comment Share on other sites More sharing options...
trq Posted December 13, 2006 Share Posted December 13, 2006 [quote]If you don't understand what im asking, please ask[/quote]It might help if you asked a question first. Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 13, 2006 Author Share Posted December 13, 2006 [quote author=thorpe link=topic=118412.msg483920#msg483920 date=1165995786][quote]If you don't understand what im asking, please ask[/quote]It might help if you asked a question first.[/quote]thought i did [code][b]Topic: How do i place content from my internal links within layout? [/b] hi im trying to show my content within my layout:http://x101.indivi.se/index.php?part=newsWhen i click the links they dont show up within my layout, not sure what im doing wrong here...[/code]well the question is how can i make it so when i click on my news links they show up within my layout "Right side of the menu" /Content area Quote Link to comment Share on other sites More sharing options...
ztealmax Posted December 13, 2006 Author Share Posted December 13, 2006 Well against my better judgement i went and used iframes ;)so now it works!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.