'; foreach ($mpr as $itemId) { if (!isset($menu['parents'][$itemId]) && (($menu["items"][$itemId]["access"] == 1 && (!$admin && !$client)) || $menu["items"][$itemId]["access"] == 2) || ($menu["items"][$itemId]["access"] == 3 && ($admin || $client))) { $html .= ''.$menu["items"][$itemId]["title"].''; } if (isset($menu['parents'][$itemId])) { $html .= ''.$menu["items"][$itemId]["title"].''; $html .= jak_build_menu($itemId, $menu, $active, $dropclass, $subclass, $dropclass, $subclass, $admin); $html .= ''; } } if ($admin) { $html .= 'Operator'; } $html .= ''; } return $html; } function produce_replacement($match) { $producerName = 'evaluate_'.strtolower($match[1]); return function_exists($producerName) ? $producerName() : null; } function evaluate_searchblock() { global $jkl; global $cms_text; global $BT_LANGUAGE; global $jakclient; global $jakclient; ob_start(); // Start output buffer capture. include(APP_PATH.'template/'.JAK_FRONT_TEMPLATE.'/tplblocks/searchblock.php'); // Include your template. $output = ob_get_contents(); // This contains the output of yourtemplate.php // Manipulate $output... ob_end_clean(); // Clear the buffer. return $output; // Print everything. } function evaluate_blognew() { global $jkl; global $jakdb; global $cms_text; global $BT_LANGUAGE; global $pageid; global $jakclient; ob_start(); // Start output buffer capture. include(APP_PATH.'template/'.JAK_FRONT_TEMPLATE.'/tplblocks/blognew.php'); // Include your template. $output = ob_get_contents(); // This contains the output of yourtemplate.php // Manipulate $output... ob_end_clean(); // Clear the buffer. return $output; // Print everything. } function evaluate_faqnew() { global $jkl; global $cms_text; global $jakdb; global $BT_LANGUAGE; global $jakclient; global $pageid; ob_start(); // Start output buffer capture. include(APP_PATH.'template/'.JAK_FRONT_TEMPLATE.'/tplblocks/faqnew.php'); // Include your template. $output = ob_get_contents(); // This contains the output of yourtemplate.php // Manipulate $output... ob_end_clean(); // Clear the buffer. return $output; // Print everything. } function evaluate_supportnew() { global $jkl; global $cms_text; global $jakdb; global $jakclient; global $jakuser; global $pageid; global $jakclient; ob_start(); // Start output buffer capture. include(APP_PATH.'template/'.JAK_FRONT_TEMPLATE.'/tplblocks/supportnew.php'); // Include your template. $output = ob_get_contents(); // This contains the output of yourtemplate.php // Manipulate $output... ob_end_clean(); // Clear the buffer. return $output; // Print everything. } function evaluate_contact() { global $jkl; global $cms_text; global $BT_LANGUAGE; global $pageid; global $jakclient; ob_start(); // Start output buffer capture. include(APP_PATH.'template/'.JAK_FRONT_TEMPLATE.'/tplblocks/contactform.php'); // Include your template. $output = ob_get_contents(); // This contains the output of yourtemplate.php // Manipulate $output... ob_end_clean(); // Clear the buffer. return $output; // Print everything. } // Get comments votes function jak_comment_votes($votes) { if (isset($votes) && $votes != 0) { if ($votes < 0) { return 'danger'; } else { return 'success'; } } else { return 'default'; } } function jak_build_comments($parent, $comm, $access, $session, $approve, $reply, $report, $status) { $html = ''; if (isset($comm['subcomm'][$parent])) { foreach ($comm['subcomm'][$parent] as $comID) { if (!isset($comm['subcomm'][$comID])) { $html .= '
'.$comm[
'.$comm["comm"][$comID]["username"].'

'.$comm["comm"][$comID]["message"].'

'.(($comm["comm"][$comID]["approve"] == 0 && ((!empty($comm["comm"][$comID]["session"]) && $session == $comm["comm"][$comID]["session"]) || $access)) ? '
'.$approve.'
' : '').(!$comm["comm"][$comID]["commentid"] ? '' : '').'
'.(JAK_USERISLOGGED && $status && !$comm["comm"][$comID]["commentid"] && $comm["comm"][$comID]["approve"] ? ' '.$reply.'' : '').' '.$comm["comm"][$comID]["created"].' '.$comm["comm"][$comID]["votes"].' '.($access ? ' ' : "").($report && $comm["comm"][$comID]["report"] == 0 ? ' ' : "").'
'; } if (isset($comm['subcomm'][$comID])) { $html .= '
'.$comm[
'.$comm["comm"][$comID]["username"].'

'.$comm["comm"][$comID]["message"].'

'.(JAK_USERISLOGGED && $status && !$comm["comm"][$comID]["commentid"] ? ' '.$reply.'' : '').' '.$comm["comm"][$comID]["created"].' '.$comm["comm"][$comID]["votes"].' '.($access ? ' ' : "").($report && $comm["comm"][$comID]["report"] == 0 ? ' ' : "").'
'; $html .= jak_build_comments($comID, $comm, $access, $session, $approve, $reply, $report, $status); $html .= '
'; if (!$comm["comm"][$comID]["commentid"]) { $html .= ''; } } } } return $html; } function jak_next_page($blogid, $opid, $perm, $lang) { global $jakdb; if ($perm) { $result = $jakdb->get("blog", ["id", "title"], ["AND" => ["id[>]" => $blogid, "opid" => $opid, "lang" => $lang, "active" => 1], "ORDER" => ["id" => "ASC"]]); } else { $result = $jakdb->get("blog", ["id", "title"], ["AND" => ["membersonly" => 0, "id[>]" => $blogid, "opid" => $opid, "lang" => $lang, "active" => 1], "ORDER" => ["id" => "ASC"]]); } if ($result) { return $result; } else return false; } function jak_previous_page($blogid, $opid, $perm, $lang) { global $jakdb; if ($perm) { $result = $jakdb->get("blog", ["id", "title"], ["AND" => ["id[<]" => $blogid, "opid" => $opid, "lang" => $lang, "active" => 1], "ORDER" => ["id" => "DESC"]]); } else { $result = $jakdb->get("blog", ["id", "title"], ["AND" => ["membersonly" => 0, "id[<]" => $blogid, "opid" => $opid, "lang" => $lang, "active" => 1], "ORDER" => ["id" => "DESC"]]); } if ($result) { return $result; } else return false; } ?>