O30P Clan Site
Navigation
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Users Online
bullet.gif Guests Online: 1

bullet.gif Members Online: 0

bullet.gif Total Members: 148
bullet.gif Newest Member: john liberator
View Thread
blank.gif
O30P Clan Site » Software/Hardware help » Software/Hardware help
 Print Thread
help plz in PHP revers function for menu
Lagz_bagz
Soory for shit englishd5

mysql table - page: id,url,name,type_id

child type_id - id of parent

[img]http://i68.fastpic.ru/thumb/2014/1106/b5/24d10b00e3bc53541ecbf83d149599b5.jpeg[/img] is not a valid Image.

I mean i can't hide not selected category of menu, only show all
Edited by Lagz_bagz on 06-11-2014 11:10
 
Zax
Uhmmmm.....errrr.......17?
 
Lagz_bagz
Zaxy, what u mean? d5
 
Zax
It means I have no idea d5

Is there not a php forum that you can maybe download scripts from other web designers? I'll have a look when I get home.
 
mdmazing
****s sake you never heard of Google?
 
Lagz_bagz
mdmazing wrote:

****s sake you never heard of Google?

Pff, i ask it the Mock, wft u all come here?f2d3
In russ google dont find, english for me is too hardd5
 
Lagz_bagz
Ok, I find decision d9f4f3 thread can close, TY all d5
 
Zax
Post the answer Lagz. Was it 17?
 
Lagz_bagz
Too hard to explain this shit :) i add array with parents tree in coll for all pages, then do this script

$res = mysql_query("SELECT parents,url FROM page WHERE url='".dataprocessing($params[0])."' LIMIT 1");
$r = mysql_fetch_array($res);
$mass = explode('|',$r['parents']);


function left_menus($array,$parent,$mass)
{
global $params;
foreach($array as $item)
{
if($item['type_id']!=$parent) continue;
$return .= '<a href="/'.$item['url'].'">'.$item['menu'].'</a>'."\n";

if(in_array($item['id'],$mass)) $return .= left_menus($array,$item['id'],$mass);
}
return $return;
}


$resultMenu = mysql_query("SELECT * FROM page ORDER BY menu");
$arrayMenu = array();
while($rowMenu = mysql_fetch_array($resultMenu))
{
$arrayMenu[] = $rowMenu;
}

:D
 
mdmazing
lmfao Lag you crack me up d3
 
Lagz_bagz
Mdm, this is my fkng job d3
 
mdmazing
Rather you than me bud ;-)
 
Jump to Forum:
blank.gif
capmain-b-left.pngcapmain-b-right.png
Member Poll
Would you play with bots (not aimbots) on the server?

Yes
Yes
53% [17 Votes]

No
No
31% [10 Votes]

Maybe
Maybe
16% [5 Votes]

Votes: 32
You must login to vote.
Started: 18.01.17

Polls Archive
Shoutbox
You must login to post a message.

02-01-2024 18:28
Happy New Year!

02-01-2024 17:53
Hello everyone! Greetings from Finland! Happy 2024!

23-12-2023 20:06
[*WOD*]Pablo rampage added to photo gallery

16-11-2023 21:39
h3

04-11-2023 12:31
More likely O60

1,697,723 unique visits