<label for="subject_visible" class="col-sm-2 control-label">Visible</label> <div class="col-sm-3"> <input type="radio" class="radio-inline" id="subject_visible" name="subject_visible" value="0"> No <input type="radio" class="radio-inline" id="subject_visible" name="subject_visible" value="1"> Yes </div> </div> <div class="form-group"> <label for="subject_parent" class="col-sm-2 control-label">Parent</label> <div class="col-sm-10"> <select class="form-control" name="subject_parent" id="subject_parent"> <?php $subject_set = get_main_subjects('parent'); echo '<option value="0">No Parent</option>'; while ($subject_id = mysql_fetch_array($subject_set)) { if ($subject_id['nav_id'] == 1) { echo "<option value=\"{$subject_id['id']}\">{$subject_id['name']}</option>"; } } ?> </select> </div> </div> <div class="form-group"> <label for="subject_content" class="col-sm-2 control-label">Subject Content</label> <div class="col-sm-10">
<div class="form-group"> <label for="page_name" class="col-sm-2 control-label">Page Title</label> <div class="col-sm-10"> <input type="text" class="form-control" id="page_name" name="page_name" value="<?php echo $sel_page['page_name']; ?> " placeholder="Page Title"> </div> </div> <div class="form-group"> <label for="subject_id" class="col-sm-2 control-label">Subject Position</label> <div class="col-sm-5"> <select class="form-control" name="subject_id" id="subject_id"> <?php $subject_set = get_main_subjects(); echo "<option></option>"; while ($subject_id = mysql_fetch_array($subject_set)) { echo "<option value=\"{$subject_id['id']}\""; if ($sel_page['subject_id'] == $subject_id['id']) { echo " selected=\"selected\""; } echo ">{$subject_id['name']}</option>"; } ?> </select> </div> <label for="page_position" class="col-sm-2 control-label">Page Position</label> <div class="col-sm-3"> <select class="form-control" name="page_position" id="page_position">
function get_navigation($nav_id, $nav) { global $sel_subject; global $sel_page; $subject_parent = get_main_subjects('parent'); if ($nav == 'sidebar') { while ($subject = mysql_fetch_array($subject_parent)) { if ($subject['nav_id'] == $nav_id) { echo '<li class="list-group-item no-padding'; if ($subject['id'] == $sel_subject['id']) { echo ' active">'; } else { echo '">'; } $link = '<a href="' . site_options('link') . 'content.php?subject=' . urlencode($subject['id']) . '">'; $link .= $subject['name']; $link .= '</a>'; echo $link; echo '<ul>'; $subject_child = get_main_subjects('child'); while ($child = mysql_fetch_array($subject_child)) { if ($subject['id'] == $sel_subject['id'] && $subject['id'] == $child['parent_id']) { $link = '<li><a '; $link .= 'href="' . site_options('link') . 'content.php?subject=' . urlencode($subject['id']) . '&child=' . urlencode($child['id']) . '">'; $link .= $child['name']; $link .= '</a>'; echo $link; echo '</li>'; } } /*$pages = get_subjects_for_pages($subject['id']); while($page = mysql_fetch_array($pages)){ if($subject['id'] == $sel_subject['id']){ $link = '<li><a '; if($page['id'] == $sel_page['id']){ $link .= 'class="active" '; } $link .= 'href="'. site_options('link') .'content.php?subject=' . urlencode($subject['id']) . '&page=' . urlencode($page['id']) . '">'; $link .= $page['page_name']; $link .= '</a>'; echo $link; echo '</li>'; } }*/ echo '</ul>'; echo '</li>'; } } } elseif ($nav == 'top') { while ($subject = mysql_fetch_array($subject_parent)) { if ($subject['nav_id'] == $nav_id) { echo '<li>'; if ($subject['id'] == $sel_subject['id']) { echo '<li class="active">'; } else { echo '<li>'; } $link = '<a href="' . site_options('link') . 'content.php?subject=' . urlencode($subject['id']) . '">'; $link .= $subject['name']; $link .= '</a>'; echo $link; echo '</li>'; } } } else { echo '<li><a href="#">No Slot Selected</a></li>'; } }