Johannes Hentunen wrote:

> Hi.
> Just installed Nadmin and got this error after loggin in:
> Parse error: parse error in
> snippet:///hklc_adminsite_host/argv0/navigation/navigation on line 225
>
> The whole html is attached. Ideas?
>

There is a missing ?> at the end of the file - Is this M2 running on
PHP4? - you will need to upgrade to M3a to fix all the bugs........



> Thanks.
>
> -J-
>
>    ----------------------------------------------------------------
>
> Parse error: parse error in
> snippet:///hklc_adminsite_host/argv0/navigation/navigation on line 225
>
> ?><?
>  mgd_include_snippet($set[snippetpath]."/lib/menu_functions" );
>
>  unset($menuitemslist);
>  $menudirobj=mgd_get_snippetdir_by_path($set[snippetpath]."/menu");
>  if ($menudirobj)
>  $menudirlist=mgd_list_snippetdirs($menudirobj->id);
>  if ($menudirlist) {
>  while ($menudirlist->fetch()) {
>     unset($tempmenu);
>     if (ereg("([0-9]+),([^,]+),(.*)",$menudirlist->name,$temparray)) {
>
>       $tempmenu[position]=$temparray[1];
>       $tempmenu[name]=$temparray[2];
>       $tempmenu[title]=hklc_translate($temparray[3]);
>     } elseif (ereg("([0-9]+),(.*)",$menudirlist->name,$temparray)) {
>       $tempmenu[position]=$temparray[1];
>       $tempmenu[name]=$temparray[2];
>       $tempmenu[title]=hklc_translate($temparray[2]);
>     } else {
>      $tempmenu[position]=99;
>      $tempmenu[name]=$menudirlist->name;
>      $tempmenu[title]=hklc_translate($menudirlist->name);
>     }
>     $tempmenu[description]=$menudirlist->description;
>    $menuitemslist[]=$tempmenu;
>  }
>  }
>
> $snippetmenumodulelist=mgd_list_snippetdirs(0);
> if ($snippetmenumodulelist)
>      while ($snippetmenumodulelist->fetch())
> {
>       if ("/".$snippetmenumodulelist->name != $set[snippetpath])
>  {
>
> $menudirobj=mgd_get_snippetdir_by_path("/".$snippetmenumodulelist->name."/menu");
>
>  if ($menudirobj)
>  {
>   $menudirlist=mgd_list_snippetdirs($menudirobj->id);
>   if ($menudirlist) {
>    while ($menudirlist->fetch()) {
>      unset($tempmenu);
>     if (ereg("([0-9]+),([^,]+),(.*)",$menudirlist->name,$temparray)) {
>
>       $tempmenu[position]=$temparray[1];
>       $tempmenu[name]=$temparray[2];
>       $tempmenu[title]=hklc_translate($temparray[3]);
>     } elseif (ereg("([0-9]+),(.*)",$menudirlist->name,$temparray)) {
>       $tempmenu[position]=$temparray[1];
>       $tempmenu[name]=$temparray[2];
>       $tempmenu[title]=hklc_translate($temparray[2]);
>     } else {
>      $tempmenu[position]=99;
>      $tempmenu[name]=$menudirlist->name;
>      $tempmenu[title]=hklc_translate($menudirlist->name);
>     }
>      $tempmenu[description]=$menudirlist->description;
>     $menuitemslist[]=$tempmenu;
>    }
>   }
>  }
>  }
> }
> function cmp ($a, $b) {
>     if ($a[position] == $b[position]) return 0;
>     return ($a[position] < $b[position]) ? -1 : 1;
> }
> if (count($menuitems)>1)
> usort($menuitemslist, "cmp");
>
> reset($menuitemslist);
> while (list($k,$v)=each($menuitemslist))
> {
>  if (permissioncheck($v[name])) {
>   $menuitems[$v[name]]=$v[title];
>   $typeitems[$v[name]]=$v[name];
>  }
> }
>
>
> if ($set[techpac]==1 && $menuitems[styles])
> $menuitems[styles]="Templates";
> if ($set[techpac]==1 && $menuitems[groups]) $menuitems[groups]="Groups
> & Users";
>
> $argv[1]=strtolower($argv[1]);
> if ($argv[1]=="top" || $argv[1]=="bottom")
> {
>   $tpl = new FastTemplate();
>   $tpl->define( array( body   => "navigation_".strtolower($argv[1]),
>                        navigationtpl   =>  "element_navigation"
>   ));
>   $type=$argv[2];
>
>   switch ($argv[1])
>   {
>      case "top":
>           unset($element);
>           $found=0;
>           reset($menuitems);
>           while (list($key,$val)=each($menuitems))
>           {
>              if ($key!=$type)
>                 $element[$key]=$val;
>              else
>                 { $name=$val;$type=$key;$found=1; break; }
>           }
>           if (count($element)>0)
>            {
>              $bgcolor1="bgcolor='#006699'";
>              $background1="width='100%'";
>              $bgcolor2="bgcolor='#CCCCCC'";
>
> $background2="background='/fimages/images/menu_back.gif'";
>
> mgd_include_snippet($set[snippetpath]."/argv0/navigation/browse_navigation");
>
>              $bgcolor3="bgcolor='#CCCCCC'";
>
> $background3="background='/fimages/images/menu_back.gif'";
>           $lastcol="<td $bgcolor3 class='menubar'
> $background3>&nbsp;</td>";
>            }
>           else {
>            $tpl->assign(navigation,"");
>            $bgcolor3="bgcolor='#006699'";
>            $background3="width='100%'";
>           $lastcol="";
>           }
>           if (!$found) {
>             $tpl->define_dynamic( "found" , "body" );
>             $tpl->clear_dynamic("found");
>           }
>           if ((!$set[admin] && $type!="news" ) || ($set[company]==""
> && $type=="news") ) {
>             $tpl->define_dynamic( "adminuseronly" , "body" );
>             $tpl->clear_dynamic("adminuseronly");
>           }
>           $temparray=new_items($type);
>           $new1=$temparray[new1];
>           $new2=$temparray[new2];
>           $newtype1=$temparray[newtype1];
>           $newtype2=$temparray[newtype2];
>           $newtype=$temparray[newtype];
>           break;
>      case "bottom":
>           unset($element);
>           $found=0;
>           reset($menuitems);
>           while (list($key,$val)=each($menuitems))
>           {
>              if ($found) $element[$key]=$val;
>              if ($key==$type) $found=1;
>           }
>           if (count($element)>0)
>           {
>              $bgcolor1="#FFFFFF";
>              $background1="width='100%'";
>              $bgcolor2="bgcolor='#CCCCCC'";
>
> $background2="background='/fimages/images/menu_back.gif'";
>
> mgd_include_snippet($set[snippetpath]."/argv0/navigation/browse_navigation");
>
>           }
>           else
>            $tpl->assign(navigation,"");
>           break;
>   }
>   $tpl->assign(array (
>         mgdroot => $mgdroot,
>         name => $name,
>         typeurl => $typeurl,
>         type => $type,
>         currname => $currname,
>         currtype => $currtype,
>         new1 => $new1,
>         newtype1 => $newtype1,
>         new2 => $new2,
>         newtype2 => $newtype2,
>         newtype => $newtype,
>         bgcolor => $bgcolor3,
>         background => $background3,
>         lastcol=>$lastcol,
>         previewbase => $previewbase
>       ));
>    $tpl->parse(BODY, "body");
>    $tpl->FastPrint();
>
> } else {
>   $type=$argv[1];
>
>   reset($menuitems);
>   $pos=0;
>   while (list($key,$val)=each($menuitems))
>   {
>     if ($key==$type) break;
>     $pos++;
>   }
>   $top=61+$pos*19;
>   $bottom=(count($menuitems)-$pos-1)*19;
>   $typeurl=$typeitems[$type];
>   if (!$typeurl) $top-=42;
> ?><html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <?
> if ($set[techpac]==1 && $refresh=="Y")
> {
>
> refreshitems=array("company"=>"sitegroup","groups"=>"group","websites"=>"hosts",
>
>                "styles"=>"style","news"=>"topic","mail"=>"mail",
>
> "snippets"=>"snippet","import"=>"import","reports"=>"report" );
> if ($refreshitems[$type])
> {
> ?>
> <script language="JavaScript">
> <!--
> parent.editing.location='<? echo $mgdroot; ?>/rcs/browse/?type=<? echo
> $refreshitems[$type]; ?>';
> //-->
> </script>
> <?
> }
> }
> ?>
> </head>
> <frameset rows="&(top);,1*,&(bottom);" frameborder="NO" border="0"
> framespacing="0">
>   <frame name="menu1" scrolling="NO" noresize
> src="&(mgdroot);/rcs/navigation/top/&(type);" marginwidth="0"
> marginheight="0" >
>   <frame name="list" scrolling="AUTO" noresize marginwidth="0"
> marginheight="0"
> src="&(mgdroot);/rcs/tree/&(typeurl);/&(openid);?openedlist=&(openedlist);">
>
>   <frame name="menu2" scrolling="NO" noresize
> src="&(mgdroot);/rcs/navigation/bottom/&(type);" marginwidth="0"
> marginheight="0" >
> </frameset>
> <noframes>
> <body bgcolor="#FFFFFF">
> </body>
> </noframes>
> </html>
> <? }
>  <?
>
>    ----------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to