Strange bug (?), please help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • krunkelgarten

    #1

    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=="Ondern emersType"){

    ## 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($handl e);

    foreach ($the_array as $Company) {

    include_once ("ondernemer s/$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=\"#AEAE AE\"><img
    src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
    <td height=\"1\" bgcolor=\"#AEAE AE\"><img
    src=\"./img/spacer.gif\" width=\"100%\" height=\"1\"
    border=\"0\"></td>
    <td width=\"1\" height=\"1\" bgcolor=\"#AEAE AE\"><img
    src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
    </tr>
    <tr>
    <td width=\"1\" height=\"1\" bgcolor=\"#AEAE AE\"><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=\"F FFFFF\" ><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=\"F FFFFF\">onderne ming:</td>
    <td class=\"bodytit le\" bordercolor=\"F FFFFF\">$Name</td>
    </tr>
    <tr>
    <td align=\"right\" valign=\"top\" class=\"subtext \"
    height=\"11\" bordercolor=\"F FFFFF\">adres:</td>
    <td rowspan=\"2\" bordercolor=\"F FFFFF\" class=\"bodytex t\"
    valign=\"top\"> $Adress<br>
    $Postal<br>
    $Place</td>
    </tr>
    <tr>
    <td align=\"right\" valign=\"middle \" class=\"subtext \"
    bordercolor=\"F FFFFF\"></td>
    </tr>
    <tr>
    <td align=\"right\" valign=\"middle \" class=\"subtext \"
    bordercolor=\"F FFFFF\">website :</td>
    <td bordercolor=\"F FFFFF\"><a href=\"$SiteAdr ess\"
    class=\"bodylin k\" onFocus=\"this. blur()\"
    target=\"_blank \">$Site</a></td>
    </tr>
    <tr>
    <td align=\"right\" valign=\"middle \" class=\"subtext \"
    bordercolor=\"F FFFFF\">email:</td>
    <td bordercolor=\"F FFFFF\"><a href=\"mailto:$ CompanyEmail\"
    class=\"bodylin k\" onFocus=\"this. blur()\">$Email </a></td>
    </tr>
    </table>
    </td>
    <td width=\"1\" height=\"1\" bgcolor=\"#AEAE AE\"><img
    src=\"./img/spacer.gif\" width=\"1\" height=\"100%\"
    border=\"0\"></td>
    </tr>
    <tr>
    <td width=\"1\" height=\"1\" bgcolor=\"#AEAE AE\"><img
    src=\"./img/spacer.gif\" width=\"1\" height=\"1\" border=\"0\"></td>
    <td height=\"1\" bgcolor=\"#AEAE AE\"><img
    src=\"./img/spacer.gif\" width=\"100%\" height=\"1\"
    border=\"0\"></td>
    <td width=\"1\" height=\"1\" bgcolor=\"#AEAE AE\"><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=\"bodytex t\">
    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
  • Chung Leong

    #2
    Re: Strange bug (?), please help


    Uzytkownik "krunkelgar ten" <krunkelgarten@ hotmail.com> napisal w wiadomosci
    news:8767e62e.0 403280005.6bea5 583@posting.goo gle.com...[color=blue]
    > 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.
    >[/color]

    A syntax error in ondernemers/fashion/maxin/info.php it looks like.


    Comment

    • krunkelgarten

      #3
      Re: Strange bug (?), please help

      Yes it was, thanx a lot.
      A bit sloppy of me..

      Thanks again!

      Greetings Krunkelgarten

      Comment

      Working...