forked from bopoda/fl-ru-damp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcatmenu.php
47 lines (44 loc) · 2.15 KB
/
catmenu.php
1
2
3
4
5
6
7
8
9
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
39
40
41
42
43
44
45
46
47
<?
if ($uid && !is_emp()) {
if($specs = professions::GetProfessionsByUser($uid, FALSE))
$specs = professions::GetMirroredProfs(implode(',', $specs));
}
?>
<ul id="accordion">
<li class="all-employers"><a href="/employers/">Ðàáîòîäàòåëè</a></li>
<li class="all-lancers"><a href="/freelancers">Âñå ôðèëàíñåðû</a></li>
<? $iter = 0;
$size = sizeof($profs);
$prof = $profs[$iter++];
$grnum = 0;
while ($iter <= $size){
if (!$prof) break;
$lastgrname = $prof['groupname'];
if (!$lastgrname) break;
$proj_groups[] = array('name' => $lastgrname, 'id' => $prof['groupid']);
$num = 1; ?>
<li>
<a href="javascript:void(null);" class="toggler"><?=$prof['groupname']?></a>
<ul class="element" id="submenu<?=$iter?>">
<?
do {
$in_spec = FALSE; // ($uid && ((is_array($specs) && in_array($prof['id'], $specs)))); ?>
<li<?=($prof['id'] == $prof_id ? ' class="active"' : '')?>>
<?if($num==1){?><script type="text/javascript">initCI('submenu<?=$iter?>')</script><?}?><span class="prf-cnt"><?=$prof['count']?></span><a href="/freelancers/<?=$prof['link']?>/"><?=$prof['profname']?></a><? if ($in_spec) { ?> <span class="prf-this">← <span>Âû çäåñü</span></span><? } ?>
</li>
<?
if ($prof['id'] == $prof_id) {
$cur_prof = $prof;
$group_id = $prof['groupid'];
$gr_init_num = $grnum;
}
$prof = $profs[$iter++];
$num++;
} while ($lastgrname == $prof['groupname']) ?>
</ul>
</li>
<?
$grnum++;
} ?>
</ul>
<script type="text/javascript">asynccall('initCtg(<?=(isset($gr_init_num)?$gr_init_num:-1)?>)')</script>