470,874 Members | 1,457 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.

Strange bug (?), please help

Hi there, I've developed a site for a group of companies.
And they wanted their adresses etc. on the site.
The site is http://fmf.centrumweertpromotion.nl/

When you click on the 2nd thing from the left in the menu,
and then click 'fashion' you get a view of all the involved
companies. To keep it easy to update, i made a folder for every
company with their logo and a info.php-file with their address
etc. in it. The BIG PROBLEM is that i get "marienel" twice though
the "marienel" should be the address of Maxin, the logo is the right
one, but the address is wrong. The info.php in both of those folders
is right.

I use the next code to sort thhings out:

if ($Page=="OndernemersType"){

## start gallery stuff
function GetCompany()
{
global $Type;
$the_array = Array();
$handle = opendir("./ondernemers/$Type/");

## define what isn't a gallery
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") { /* as descripted below: these
"files" will not be added to the array */
$the_array[] = $file;
}
}

closedir($handle);

foreach ($the_array as $Company) {

include_once ("ondernemers/$Type/$Company/info.php");

echo "<img src=\"img/spacer.gif\" width=\"1\" height=\"10\">
<table width=\"370\" height=\"100\" border=\"0\" cellpadding=\"0\"
cellspacing=\"0\">
<tr>
<td width=\"1\" height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
<td height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"100%\" height=\"1\"
border=\"0\"></td>
<td width=\"1\" height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
</tr>
<tr>
<td width=\"1\" height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"1\" height=\"100%\"
border=\"0\"></td>
<td>
<table width=\"350\" border=\"0\" cellpadding=\"0\"
cellspacing=\"3\">
<tr>
<td rowspan=\"5\" width=\"100\" height=\"100\"
bordercolor=\"FFFFFF\" ><img
src=\"./ondernemers/$Type/$Company/logo.gif\" width=\"90\"
height=\"90\" title=\"$Name\" border=\"0\"></td>
<td align=\"right\" valign=\"middle\" width=\"10\"
class=\"subtext\" bordercolor=\"FFFFFF\">onderneming:</td>
<td class=\"bodytitle\" bordercolor=\"FFFFFF\">$Name</td>
</tr>
<tr>
<td align=\"right\" valign=\"top\" class=\"subtext\"
height=\"11\" bordercolor=\"FFFFFF\">adres:</td>
<td rowspan=\"2\" bordercolor=\"FFFFFF\" class=\"bodytext\"
valign=\"top\">$Adress<br>
$Postal<br>
$Place</td>
</tr>
<tr>
<td align=\"right\" valign=\"middle\" class=\"subtext\"
bordercolor=\"FFFFFF\"></td>
</tr>
<tr>
<td align=\"right\" valign=\"middle\" class=\"subtext\"
bordercolor=\"FFFFFF\">website:</td>
<td bordercolor=\"FFFFFF\"><a href=\"$SiteAdress\"
class=\"bodylink\" onFocus=\"this.blur()\"
target=\"_blank\">$Site</a></td>
</tr>
<tr>
<td align=\"right\" valign=\"middle\" class=\"subtext\"
bordercolor=\"FFFFFF\">email:</td>
<td bordercolor=\"FFFFFF\"><a href=\"mailto:$CompanyEmail\"
class=\"bodylink\" onFocus=\"this.blur()\">$Email</a></td>
</tr>
</table>
</td>
<td width=\"1\" height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"1\" height=\"100%\"
border=\"0\"></td>
</tr>
<tr>
<td width=\"1\" height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
<td height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"100%\" height=\"1\"
border=\"0\"></td>
<td width=\"1\" height=\"1\" bgcolor=\"#AEAEAE\"><img
src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
</tr>
</table>";
}
};
echo "<table border=\"0\" cellspacing=\"0\" width=\"100%\"
cellpadding=\"0\"><tr>
<td height=\"20\" align=\"left\" valign=\"top\"><img
src=\"img/spacer.gif\" width=\"1\" height=\"20\"></td>
</tr>
<td>
<span class=\"bodytext\">
Onderstaande ondernemers nemen deel aan <i>food meets fashion</i> :
</span></td>
</tr>
<tr><td>";
GetCompany();
echo "</td></tr></table>";};
REALLY HOPE SOMEONE CAN HELP ME OUT!!!

greetings, krunkelgarten
Jul 17 '05 #1
2 1527

Uzytkownik "krunkelgarten" <kr***********@hotmail.com> napisal w wiadomosci
news:87**************************@posting.google.c om...
Hi there, I've developed a site for a group of companies.
And they wanted their adresses etc. on the site.
The site is http://fmf.centrumweertpromotion.nl/

When you click on the 2nd thing from the left in the menu,
and then click 'fashion' you get a view of all the involved
companies. To keep it easy to update, i made a folder for every
company with their logo and a info.php-file with their address
etc. in it. The BIG PROBLEM is that i get "marienel" twice though
the "marienel" should be the address of Maxin, the logo is the right
one, but the address is wrong. The info.php in both of those folders
is right.


A syntax error in ondernemers/fashion/maxin/info.php it looks like.
Jul 17 '05 #2
Yes it was, thanx a lot.
A bit sloppy of me..

Thanks again!

Greetings Krunkelgarten
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Martin Feuersteiner | last post: by
11 posts views Thread by Mike C# | last post: by
31 posts views Thread by Simply_Red | last post: by
16 posts views Thread by Victor | last post: by
3 posts views Thread by Tomasz J | last post: by
1 post views Thread by shaneal | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.