function ShowMenuChat($pagescreename, $pageurl, $pagename, $page, $style, $player) { require ('variables.php'); require ('variablesdb.php'); $menuString = ""; $menuString .= '<li'; $menuString .= ' id="'.$style.'"'; $menuString .= '><a href="'. $pageurl . '" target="_new">'; if ($page == "" . $pagename . "") { $menuString .= "<font class='menu-active'>"; } $menuString .= $pagescreename; $menuString .= "</font>"; $menuString .= "</a>"; $subNavArray = getSubNavArrayForPage($pagename, $player); if (!empty($subNavArray)) { $subMenuContent = '<ul>'; while ($subItem = current($subNavArray)) { $key = key($subNavArray); $url = $subItem[0]; if (strpos($url, $playerDummy) > 0) { $urlFormatted = str_replace($playerDummy, "?name=".$player, $url); } else { $urlFormatted = $url; } $text = $subItem[1]; $subMenuContent .= '<li><a href="'.$urlFormatted.'">'.$text.'</a></li>'; next($subNavArray); } $subMenuContent .= "</ul>"; $menuString .= $subMenuContent; } $menuString .= "</li>"; echo $menuString; }
echo '<td nowrap colspan="4" width="800" '.$tdstyle.'><p><b><a href="/profile.php?name='.$cookie_name.'">My Profile</a></b>'. ' <span class="grey-small">(only when logged in or by clicking other players name)</span></p><p>'; foreach ($subs as $sub) { $urlFormatted = str_replace($playerDummy, "?name=".$cookie_name, $sub[0]); echo '-- <a href="'.$urlFormatted.'">'.$sub[1].'</a><br>'; } echo "</p></td></tr><tr>"; } foreach ($pageinfos as $pageinfo) { if ($count > 0 && $count % 2 == 0) { echo "</tr><tr>"; } list($pagescreename, $pageurl, $pagename) = explode(":", $pageinfo); echo '<td width="200" '.$tdstyle.'><p><b><a href="'.$pageurl.'.php">'.$pagescreename.'</a></b></p><p>'; $subs = getSubNavArrayForPage($pagename, null); foreach ($subs as $sub) { echo '-- <a href="'.$sub[0].'">'.$sub[1].'</a><br>'; } echo "</p></td>"; $count++; ?> <? } ?> </tr> </table> <br> <?php
function getSubNavMenuString($pagename, $player) { require 'variables.php'; $subNavArray = getSubNavArrayForPage($pagename, $player); if (!empty($subNavArray)) { $subMenuContent = '<ul>'; while ($subItem = current($subNavArray)) { $key = key($subNavArray); $url = $subItem[0]; if (strpos($url, $playerDummy) > 0) { $urlFormatted = str_replace($playerDummy, "?name=" . $player, $url); } else { $urlFormatted = $url; } $text = $subItem[1]; $subMenuContent .= '<li><a href="' . $urlFormatted . '">' . $text . '</a></li>'; next($subNavArray); } $subMenuContent .= "</ul>"; return $subMenuContent; } }