 |
 |
 |
 |
 |
| Author |
Message |
Miro
Joined: 05 Apr 2006 Posts: 43
|
|
Includes... |
|
In my former question I got som help from FI-DD... It helpt me a lot... Thanx FI-DD
I wonder now if this way to write the code is correct or how do I should write? I've checked the read me file but I couldn't find an answer there.
<?PHP
$static['number'] = "20";
$static['category'] = "2";
$static['template'] = "left";
include $cutepath.'/show_news.php';
?>
.
.
.
<?php
if ($do == 'search'){ include $cutepath.'/search.php';}
elseif ($do == 'news'){ $static['category'] = "2"; $static['template'] = "Headlines"; $static['number'] = "30";
$static['skip'] = "20"; include $cutepath.'/show_news.php';}
elseif ($do == 'sport'){ $static['category'] = "3"; $static['template'] = "Headlines"; $static['number'] = "30"; include $cutepath.'/show_news.php';}
else { $category = "1"; $number = 1; include $cutepath.'/show_news.php';}
?>
.
.
.
<a href="<?=$config_http_script_dir; ?>/index.php/?do=news">News </a>
<a href="<?=$config_http_script_dir; ?>/index.php/?do=news">Sport </a>
----------------------------------------
Thanx again
|
|
| Mon Apr 24, 2006 5:06 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
Ramon
Joined: 12 Oct 2005 Posts: 551 Location: Hoogeveen, NL |
|
|
|
Replace
 |  | <a href="<?=$config_http_script_dir; ?>/index.php/?do=news">News </a>
<a href="<?=$config_http_script_dir; ?>/index.php/?do=news">Sport </a> |
With
 |  | <a href="<?=$config_http_script_dir; ?>/index.php?do=news">News </a>
<a href="<?=$config_http_script_dir; ?>/index.php?do=sport">Sport </a> |
That's the only flaw i notice
|
|
| Mon Apr 24, 2006 10:42 pm |
|
 |
Miro
Joined: 05 Apr 2006 Posts: 43
|
|
|
|
Thank you Ramon for your reply, but unfortunately it didn't solv the problem... I'll explain a little more about it:
I've 6 includes in my index.php which each shows [$number] articles automaticly... apart from that I've a navigation menu on the right side <a href="<?=$config_http_script_dir; ?>/index.php?do=news">News </a>.
the 6 includes works perfectly... but when I click for example on News in the menu it wont work properly. somtimes after a few seconds I get som error that this side will not open. PLEASE HELP... I've been searching for this problem but still no result.
I can mention that this problem appears mostly in Internet Explorer and rarely in Firefox.
|
|
| Mon Apr 24, 2006 11:29 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
|
In my opinion it can't be a script problem. Either a script works or it doesn't. But there's no script that works "sometimes" - unless the environment (server/browser/connection...) of the script changes.
|
|
| Tue Apr 25, 2006 5:47 pm |
|
 |
Miro
Joined: 05 Apr 2006 Posts: 43
|
|
|
|
Hello agian,
I've been in contact with the supplier of the place for my site and they says it must be a problem with the code. Here'e my code... I've been searching by my self and I cannot find the problem. please help me find the bug...
 |  | <?php
include 'head.php';
// pgt start
$pgt = new microTimer;
$pgt->start();
// end pgt start
$header = array(
'users' => 'Users',
'search' => 'Search',
'category' => 'Categories',
'archives' => 'Archives',
);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="<?=$config_http_script_dir; ?>/example/img/style.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=cute_get_link(array(), 'feed', 'rss'); ?>">
</head>
<body>
<table width="900" height="100%">
<tr>
<td height="94" colspan="3" valign="top"> <table width="900" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="900" background="<?=$config_http_script_dir; ?>/example/img/meny_01.jpg"> <form action="<?=$config_http_script_dir; ?>/admin.php" method="post">
<table width="250" border="0" align="right">
<tr>
<td width="69" class="latin"><div align="right">Name</div></td>
<td width="54"><div align="right">
<input name="username" type="text" class="input" size="10">
</div></td>
<td width="73" class="latin"><div align="right">Password</div></td>
<td width="50"><div align="right">
<input name="password" type="password" class="input" size="10">
</div></td>
<td width="4"></td>
</tr>
<tr>
<td colspan="3"> </td>
<td><div align="right">
<input name="Submit" type="submit" class="submit" value='Login' />
</div></td>
<td></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
<tr>
<td width="250" valign="top"><table width="230" border="0" align="center">
<tr>
<td width="190" height="20" bgcolor="#CF6F12"><?=cn_calendar(); ?></td>
</tr>
<tr>
<td>
<?PHP
$static['number'] = "20";
$static['category'] = "4";
$static['template'] = "left";
include $cutepath.'/show_news.php';
?></td>
</tr>
<tr>
<td> <div align="left" class="style1"><a href="<?=$config_http_script_dir; ?>/index.php/?do=news"><img src="skins/images/pil.gif" width="7" height="7" border="0" align="absmiddle"><strong>more</strong></a></div></td>
</tr>
</table>
<br>
<br></td>
<td width="480" height="410" valign="top"><br>
<table width="460" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<?php
if ($do == 'search'){ include $cutepath.'/search.php';}
elseif ($do == 'users'){$bgcolor = '#f7f7f7'; include $cutepath.'/show_users.php'; }
elseif ($do == 'category' and !$category){ echo cn_category();}
elseif ($do == 'archives'){ echo "<center>" . cn_archives();}
elseif ($do == 'sport'){ $static['category'] = "6"; $static['template'] = "Headlines"; include $cutepath.'/show_news.php';}
elseif ($do == 'news'){ $static['category'] = "4"; $static['template'] = "Headlines"; $static['number'] = "20"; $static['skip'] = "20"; include $cutepath.'/show_news.php';}
elseif ($do == 'music'){ $static['category'] = "5"; $static['template'] = "Headlines"; $static['number'] = "20"; include $cutepath.'/show_news.php';}
else { $category = "1"; $number = 1; include $cutepath.'/show_news.php';}
?>
</td>
</tr>
<tr>
<td width="230" valign="top">
<?PHP
$static['number'] = "1";
$static['category'] = "3";
$static['template'] = "middle";
include $cutepath.'/show_news.php';
?>
</td>
<td width="230" valign="top">
<?PHP
$static['number'] = "1";
$static['category'] = "2";
$static['template'] = "middle";
include $cutepath.'/show_news.php';
?> </td>
</tr>
</table>
<br>
<table width="460" border="0" align="center" cellpadding="0" cellspacing="0" dir="rtl">
<tr>
<td>
<?PHP
$static['number'] = "10";
$static['category'] = "5 , 6, 7";
$static['template'] = "middle2";
include $cutepath.'/show_news.php';
?>
</td>
</tr>
</table>
<br> </td>
<td width="170" valign="top"> <table width="150" border="0" align="center" class="tabell">
<tr>
<td>
<?PHP
$static['number'] = "1";
$static['category'] = "8";
$static['template'] = "foto";
include $cutepath.'/show_news.php';
?>
</td>
</tr>
<tr>
<td><a href="<?=$config_http_script_dir; ?>/index.php?do=sport">Sport</a></td>
</tr>
<tr>
<td><a href="<?=$config_http_script_dir; ?>/index.php?do=news">News</a></td>
</tr>
<tr>
<td><a href="<?=$config_http_script_dir; ?>/index.php?do=music">Music</a></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html> |
|
|
| Sat Apr 29, 2006 6:09 pm |
|
 |
Miro
Joined: 05 Apr 2006 Posts: 43
|
|
|
| Tue May 02, 2006 12:14 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
|
You have quite a few include codes. Start with one include code and see if it's working. Then add a second include code and see if it's working. Then add a third include code and ...
|
|
| Tue May 02, 2006 6:12 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|