- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
// START MY FOR MENU
$list_pages = preg_replace('/<li([^>]*)>/is', ' ', $output);
$list_pages = str_replace('</li>', '', $list_pages);
$list_pages = preg_replace('/<a/is', '</td><td class="menu"> <a$1', $list_pages);
if (isset($_GET['page_id']) AND !is_numeric($_GET['page_id'])) { exit("ERROR!"); }
$pd = mysql_real_escape_string($_GET['page_id']);
if(strstr($_SERVER['REQUEST_URI'], 'page_id='.$pd) == TRUE) {
$list_pages = preg_replace('/<\/td><td class=\"menu\"\> <a href=\"(http:\/\/'.$_SERVER["HTTP_HOST"].'\/\?page_id='.$pd.')/is', '</td><td class="menu_click"><a href="$1', $list_pages);
}
for($i=0; $i<sizeof($pages); $i++) {
$link = $pages[$i]->guid;
$lol = '';
if(strstr($_SERVER['REQUEST_URI'], '?') == TRUE) {
if ($link == 'http://'.$_SERVER['HTTP_HOST'].'/?'.$_SERVER['QUERY_STRING']) {
$list_pages = preg_replace('/<\/td><td class=\"menu\"\> <a href=\"(http:\/\/'.$_SERVER["HTTP_HOST"].'\/\?'.$_SERVER["QUERY_STRING"].')/is', '</td><td class="menu_click2"><a href="$1', $list_pages);
}
} else {
if ($link == 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']) {
$list_pages = preg_replace('/<\/td><td class=\"menu\"\> <a href=\"(http:\/\/'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"].')/is', '</td><td class="menu_click2"><a href="$1', $list_pages);
}
}
}
$output = $list_pages;
$str = preg_split("/<\/a\>/i", $output);
$moar = '';
for ($i=0; $i<sizeof($pages); $i++)
{
$moar .= preg_replace('/<\/td><td class=\"menu\"\> <a href=\"(.*)\" title=\"(.*)\">/is',
'</td><td class="menu" onclick="linkgo(\'$1\');" id="moar'.$i.'" onmouseover="menu1(\'moar'.$i.'\');" onmouseout="menu2(\'moar'.$i.'\');"> <a href="$1" title="$2">', $str[$i]);
$moar .= "</a>";
}
$output = $moar;
// END MY FOR MENU