} } ?> <?php if (isset($_POST['submit_exam'])) { clear_exam($exam_id); foreach ($_POST as $key => $value) { $arr = explode("_", $key); if ($arr[0] == 'checkbox') { $question_id = $arr[1]; add_question_to_exam($question_id, $exam_id); } } header("Location: " . pageURL()); } ?> <html> <head> <title>Edit Exam</title> </head> <body> <h3><?php echo $exam_name; ?> </h3> <hr/>
function displayMenuFromItems($items, $depth, $parent, $ismenu) { if ($items) { echo "\n" . '<ul id="' . ($ismenu ? "menu" : "mc_submenu_" . $parent) . '" class="mc_menu mc_depth_' . $depth . '">' . "\n"; foreach ($items as $item) { $class = ""; if ($item["type"] == "wordpress") { if (is_page($item["value"])) { $class = "current_page_item"; } } else { if (curPageURL() == $item["value"] || curPageURL() == $item["value"] . "/") { $class = "current_page_item"; } } $pos = strpos(pageURL(), '#'); /*if(isset($_GET['cat']) || isset($_GET['p']) || isset($_GET['m']) || isset($_GET['author']) || $pos != false) { $urlAddon = 'index.php'; } else { $urlAddon = ''; }*/ if (!isset($_GET['cat']) && !isset($_GET['p']) && !isset($_GET['m']) && !isset($_GET['author']) && ($pos != false || pageURL() == get_bloginfo('url') . '/') || pageURL() == get_bloginfo('url')) { $findHash = strpos($item['value'], '#'); if ($findHash != false) { $item['value'] = substr($item['value'], $findHash); } } echo '<li id="menu_item_' . $item["id"] . '" class="mc_menu_item ' . ($item["type"] == "wordpress" ? "wordpress_link" : "external_link") . ' ' . $class . '"><a href="' . $urlAddon . resolveURL($item) . '" title="' . ($ismenu ? $item["id"] : $parent) . '" rel="' . $item["target"] . '" class="change_section panel ' . (count($item["subitems"]) > 0 ? 'submenu' : '') . '">' . $item["title"] . '</a>'; if ($depth > 0) { displayMenuFromItems($item["subitems"], $depth - 1, $item["id"], false); } echo '</li>' . "\n"; } echo '</ul>' . "\n"; } }