Example #1
0
function getMenu($categoryId = 0)
{
    $children = mysql_query("SELECT id, title, menuTitle, override, slug, categoryId, type FROM " . DB_PREFIX . "content WHERE categoryId = " . (int) $categoryId . " AND menu = 1 AND status = 1 ORDER BY sort ASC");
    $items = array();
    while ($row = mysql_fetch_assoc($children)) {
        $items[] = '<li' . ($_GET['locationName'] == $row['slug'] ? ' class="current-menu-item"' : '') . '><a href="' . ($row['override'] ? $row['override'] : gen_seo_friendly_titles($row['slug']) . '.html') . '">' . ($row['menuTitle'] ? $row['menuTitle'] : $row['title']) . (isParent($row['id']) ? ' &nbsp;<i class="icon-angle-down"></i>' : '') . '</a>' . getMenu($row['id']) . '</li>';
    }
    if (count($items)) {
        return '<ul class="nav-menu dropdown-menu">' . implode('', $items) . '</ul>';
    } else {
        return '';
    }
}
Example #2
0
function getMenu($categoryId = 0, $level = 0)
{
    $children = mysql_query("SELECT id, title, menuTitle, override, slug, categoryId, type, siteIndex FROM " . DB_PREFIX . "content WHERE categoryId = " . (int) $categoryId . " AND menu = 1 AND status = 1 ORDER BY sort ASC");
    $items = array();
    while ($row = mysql_fetch_assoc($children)) {
        if ($row['siteIndex'] != 1) {
            $items[] = '<li class="' . ($_GET['locationName'] == $row['slug'] ? 'active' : '') . (isParent($row['id']) ? ' dropdown' : '') . '"><a href="' . ($row['override'] ? $row['override'] : gen_seo_friendly_titles($row['slug']) . '.html') . '"' . (isParent($row['id']) ? ' class="dropdown-toggle" data-toggle="dropdown"' : '') . '>' . ($row['menuTitle'] ? $row['menuTitle'] : $row['title']) . (isParent($row['id']) ? ' <b class="caret"></b>' : '') . '</a>' . getMenu($row['id'], $level + 1) . '</li>';
        }
    }
    if (count($items)) {
        return '<ul' . ($level < 1 ? ' class="nav navbar-nav navbar-right"' : ' class="dropdown-menu"') . '>' . implode('', $items) . '</ul>';
    } else {
        return '';
    }
}
Example #3
0
/**
 * @package:SMS
 * @helper::whoIs().
 * @Author:Techno Services
 */
function whoIs()
{
    $page = 'dashboard';
    if (isParent()) {
        $page = 'parents/parents-module';
    } elseif (isStudent()) {
        $page = 'students/students-module';
    } elseif (isTeacher()) {
        $page = 'teachers/teacher-module';
    }
    return $page;
}
            }
            $notificationList = json_decode(str_replace("\\", "", $_POST['notification_list']), true);
            $sendNotificationEmail = $_REQUEST['notify'] == "true";
            foreach ($notificationList as $email) {
                addToNotificationList($parentID == -1 ? $subID : $parentID, $email);
            }
            if ($sendNotificationEmail) {
                sendNotificationEmail($subID, $parentID);
            }
            break;
        case "delete_from_notification_list":
            $subID = $_REQUEST['submission_id'];
            // we deal with notification lists at the
            // parent level. Check if this submission
            // is not a parent.
            if (!isParent($subID)) {
                // not parent, get the parent
                $subID = getParent($subID);
            }
            $email = $_REQUEST['email'];
            delFromNotificationList($subID, $email);
            break;
    }
}
/*---------------------------------------------------------------*/
// functions
/*---------------------------------------------------------------*/
///
/// isParent
/// Check to see if the given submission is a parent
///