public function getMemberNotifications($memberID, $config, $dbConnection = null)
 {
     $memberNotifications = null;
     try {
         $memberNotifications = new MemberNotifications();
         $rawBandMemberNotifications = BandMemberNotificationDao::selectBandMemberNotifications($memberID, $dbConnection);
         $memberNotifications->setVariable(MemberNotifications::BAND_MEMBER_NOTIFICATIONS, NotificationController::processBandMemberNotifications($rawBandMemberNotifications, $config));
     } catch (Exception $ex) {
         echo "addBandMember error: " . $ex->getMessage();
         $memberNotifications = null;
     }
     return $memberNotifications;
 }
 public function deactivateBandMember($memberID, $bandID, $notificationTypeID, $dbConnection = null)
 {
     $processed = false;
     try {
         $bandMember = new BandMember();
         $bandMember->setVariable(BandMember::BAND_ID, $bandID);
         $bandMember->setVariable(BandMember::MEMBER_ID, $memberID);
         $bandMember->setVariable(BandMember::ACTIVE, 2);
         if (BandMemberDao::updateBandMember($memberID, $bandMember, $dbConnection)) {
             if (NotificationController::removeBandMemberNotification($memberID, $bandID, $notificationTypeID, $dbConnection)) {
                 $processed = true;
             }
         }
     } catch (Exception $ex) {
         echo "deactivateBandMember error: " . $ex->getMessage();
         $processed = false;
     }
     return $processed;
 }
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "common_includes.php.inc");
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "controllers%notification_controller.php");
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "constants%notification_constants.php");
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "daos%band_member_notification_dao.php");
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "objects%band_member_notification.php");
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "objects%member_notifications.php");
require_once $config->getIncludeURL(Config::INCLUDES_PATH, "objects%notification.php");
$bandDetails = null;
$editable = false;
$memberID = null;
$error = false;
$errorCode = 0;
try {
    $dbConnection = DatabaseUtilities::getDatabaseConnection();
    //Get the current user's ID and details.
    $memberID = LoginController::getLoggedInMemberID($dbConnection);
    if ($memberID == null) {
        header("Location: login.php");
        exit;
    } else {
        $memberNotifications = NotificationController::getMemberNotifications($memberID, $config, $dbConnection);
        require_once $config->getIncludeURL(Config::INCLUDES_PATH, "views%my%notifications_view.php");
    }
} catch (Exception $ex) {
    $error = true;
    $errorCode = 1;
}
$dbConnection = null;
if ($error == true) {
    //        ErrorUtilities::errorRedirect($errorCode);
}
<?php

/**
 * Created by PhpStorm.
 * User: Haziq
 * Date: 1/2/2016
 * Time: 1:01 PM
 */
require_once $_SERVER['DOCUMENT_ROOT'] . '/matrimonialweb/Controller/ProfessionController.php';
$data = array();
if (isset($_POST['notificationId'])) {
    $notificationId = $_POST['notificationId'];
    if (strlen($notificationId) > 0) {
        $Object = new NotificationController();
        $data = $Object->seenNotification($notificationId);
    } else {
        array_push($data, ["Status" => "error", "Message" => "Incorrect notification Id detected"]);
    }
} else {
    array_push($data, ["Status" => "error", "Message" => "Something went wrong :("]);
}
echo json_encode($data);
 /**
  * _showadminmenu() function returns html text for the administration button bar
  *
  * @access public
  * @global string $homedir
  * @global string $scriptname
  * @global string $surveyid
  * @global string $setfont
  * @global string $imageurl
  * @global int $surveyid
  * @return string $adminmenu
  */
 public function _showadminmenu($aData)
 {
     // We don't wont the admin menu to be shown in login page
     if (!Yii::app()->user->isGuest) {
         // Default password notification
         if (Yii::app()->session['pw_notify'] && Yii::app()->getConfig("debug") < 2) {
             Yii::app()->session['flashmessage'] = gT("Warning: You are still using the default password ('password'). Please change your password and re-login again.");
         }
         // Count active survey
         $aData['dataForConfigMenu']['activesurveyscount'] = $aData['activesurveyscount'] = Survey::model()->permission(Yii::app()->user->getId())->active()->count();
         // Count survey
         $aData['dataForConfigMenu']['surveyscount'] = Survey::model()->count();
         // Count user
         $aData['dataForConfigMenu']['userscount'] = User::model()->count();
         // Count tokens and deactivated surveys
         $tablelist = Yii::app()->db->schema->getTableNames();
         foreach ($tablelist as $table) {
             if (strpos($table, Yii::app()->db->tablePrefix . "old_tokens_") !== false) {
                 $oldtokenlist[] = $table;
             } elseif (strpos($table, Yii::app()->db->tablePrefix . "tokens_") !== false) {
                 $tokenlist[] = $table;
             } elseif (strpos($table, Yii::app()->db->tablePrefix . "old_survey_") !== false) {
                 $oldresultslist[] = $table;
             }
         }
         if (isset($tokenlist) && is_array($tokenlist)) {
             $activetokens = count($tokenlist);
         } else {
             $activetokens = 0;
         }
         //Check if have a comfortUpdate key
         if (getGlobalSetting('emailsmtpdebug') != null) {
             $aData['dataForConfigMenu']['comfortUpdateKey'] = gT('Activated');
         } else {
             $aData['dataForConfigMenu']['comfortUpdateKey'] = gT('None');
         }
         $aData['dataForConfigMenu']['activetokens'] = $activetokens;
         $aData['sitename'] = Yii::app()->getConfig("sitename");
         $updateModel = new UpdateForm();
         $updateNotification = $updateModel->updateNotification;
         $aData['showupdate'] = Yii::app()->getConfig('updatable') && $updateNotification->result && !$updateNotification->unstable_update;
         // Fetch extra menus from plugins, e.g. last visited surveys
         $aData['extraMenus'] = $this->fetchExtraMenus($aData);
         // Get notification menu
         $surveyId = isset($aData['surveyid']) ? $aData['surveyid'] : null;
         Yii::import('application.controllers.admin.NotificationController');
         $aData['adminNotifications'] = NotificationController::getMenuWidget($surveyId, true);
         $this->getController()->renderPartial("/admin/super/adminmenu", $aData);
     }
 }
<?php

/**
 * Created by PhpStorm.
 * User: Haziq
 * Date: 1/2/2016
 * Time: 12:59 PM
 */
require_once $_SERVER['DOCUMENT_ROOT'] . '/matrimonialweb/Controller/ProfessionController.php';
$Object = new NotificationController();
$result = $Object->getNotification();
echo json_encode($result);