function construct_faq_jump($parent = 0, $depth = 0) { global $ifaqcache, $faqcache, $faqjumpbits, $faqparent, $vbphrase, $vbulletin; if (!is_array($ifaqcache["{$parent}"])) { return; } foreach ($ifaqcache["{$parent}"] as $key1 => $faq) { $optiontitle = str_repeat('--', $depth) . ' ' . $faq['title']; $optionvalue = 'faq.php?' . $vbulletin->session->vars['sessionurl'] . "faq={$parent}#faq_{$faq['faqname']}"; $optionselected = iif($faq['faqname'] == $faqparent, ' ' . 'selected="selected"'); eval('$faqjumpbits .= "' . fetch_template('option') . '";'); if (is_array($ifaqcache["{$faq['faqname']}"])) { construct_faq_jump($faq['faqname'], $depth + 1); } } }
function construct_faq_jump($parent = 0, $depth = 0) { global $ifaqcache, $faqcache, $faqjumpbits, $faqparent, $vbphrase, $vbulletin; if (!is_array($ifaqcache["$parent"])) { return; } foreach($ifaqcache["$parent"] AS $key1 => $faq) { $optiontitle = str_repeat('--', $depth) . ' ' . $faq['title']; $optionvalue = 'faq.php?' . $vbulletin->session->vars['sessionurl'] . "faq=$parent#faq_$faq[faqname]"; $optionselected = iif($faq['faqname'] == $faqparent, ' ' . 'selected="selected"'); $faqjumpbits .= render_option_template($optiontitle, $optionvalue, $optionselected, $optionclass); if (is_array($ifaqcache["$faq[faqname]"])) { construct_faq_jump($faq['faqname'], $depth + 1); } } }