Jump to content

route map


patva1

Recommended Posts

I get this error when I try to view the route map:  Parse error: syntax error, unexpected T_ELSE in /home/a8930745/public_html/phpvms/core/modules/RouteMap/RouteMap.php on line 31

I checked and double checked, and that particular part of the code is exactly as Nabeel said to make it. Any help is appreciated.

Link to comment
Share on other sites

Here it is

$shownroutes = array();

$centerlat = 0;

$centerlong = 0;

# Create map

foreach($allschedules as $schedule)

{

 

  $route = $schedule->depicao.$schedule->arricao;

 

  if(in_array($route, $shownroutes));

  {

    continue;

  }

                  else

  {

      $shownroutes[] = $route;

  }

Link to comment
Share on other sites

  • Administrators

It also seems like you're missing the closing bracket for the foreach()

Also, PLEASE indent!! After every { there should be an indent, you'll spot errors real fast:

$shownroutes = array();
      
$centerlat = 0;
$centerlong = 0;
      
# Create map
foreach($allschedules as $schedule)
{
       
       $route = $schedule->depicao.$schedule->arricao;
       
       if(in_array($route, $shownroutes))
       {
              continue;
        }
       else
       {
              $shownroutes[] = $route;
       }
}

Link to comment
Share on other sites

When I use that I get the following php error: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/a8930745/public_html/phpvms//core/templates/<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Route Map</title> </head> <body> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAmh5p1i5yMwpb66nDaOw1eRQwTXokuW8BVf_s5QXPuQRNUwc0eRRF4KMwcmpt4u7wbdAJNLbxS-w5jA" type="text/javascript" charset="utf-8"></script><script type="text/javascript" charset="utf-8"> //<![CDATA[ /************************************************* * Created with GoogleMapAPI 2.5 * Author: Monte Ohrt <monte AT ohrt DOT com> * Copyright 2005-2006 New Digital Group * http://www.phpinsider.com/php/code/GoogleMapAPI/ *************************************************/ var points = []; var markers = []; var counte in /home/a8930745/public_html/phpvms/core/classes/TemplateSet.class.php on line 95

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Seems like you're putting HTML in your title

Could you please explain what you mean/how to fix it. I think I understand what you are saying, but I want to be sure. I apologize for the extent of my questions, I am not very good at coding, as you can probably guess. Thanks for all of your help so far.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...