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