Example #1
0
 private function AllInbox($start)
 {
     $start = (int) $start;
     //echo $start;
     $getLast5Inbox = parent::select('admin_inbox', '*', '', '`timestamp` DESC LIMIT ' . $start . ',5');
     if (count($getLast5Inbox) > 0) {
         $this->UnSeenInbox();
         $this->countAllInbox = '<li><p class="red">' . $this->countAllInbox . '</p></li>';
         for ($k = 0; $k < count($getLast5Inbox); $k++) {
             $Link = parent::$CONFIG['adminURL'] . LANG . '/inbox/' . $getLast5Inbox[$k]['inboxID'];
             $text = new ADMIN_TRANSLATION(LANG, $getLast5Inboxs[$k]['subject'], 1, 0);
             $diferenceTime = (int) parent::$CONFIG['timeSeconds'] - (int) $getLast5Inbox[$k]['timeSeconds'];
             $this->countAllInbox .= '<li>
                             <a href="' . $Link . '">
                                 <span class="subject">
                                 <span class="from">' . $getLast5Inbox[$k]['emailFrom'] . '</span>
                                 <span class="time">' . $diferenceTime . '</span>
                                 </span>
                                 <span class="message">' . $text . '</span>
                             </a>
                         </li>';
         }
         $this->countAllInbox = '<li>
                             <a href="#' . $Link . '" data-target="Modal" onclick=Modal("ShowInbox")>' . new ADMIN_TRANSLATION(LANG, 'allinbox', 1, 0) . '</a>
                         </li>';
     } else {
         $this->countAllInbox = '<li><a href="#">' . new ADMIN_TRANSLATION(LANG, 'NoInbox', 1, 0) . '</a></li>';
     }
 }
 private function AllNotifications($start)
 {
     $start = (int) $start;
     //echo $start;
     $getLast5Notifications = parent::select('admin_notifications', '*', '', '`timestamp` DESC LIMIT ' . $start . ',5');
     if (count($getLast5Notifications) > 0) {
         $this->UnSeenNotifications();
         $this->countAllNotifiactions = '<li><p class="yellow">' . $this->countAllNotifiactions . '</p></li>';
         for ($k = 0; $k < count($getLast5Notifications); $k++) {
             if (!empty($getLast5Notifications[$k]['Link'])) {
                 $Link = $getLast5Notifications[$k]['Link'];
             } else {
                 $Link = '#';
             }
             $text = new ADMIN_TRANSLATION(LANG, $getLast5Notifications[$k]['notificationTitleLang'], 1, 0);
             $diferenceTime = (int) parent::$CONFIG['timeSeconds'] - (int) $getLast5Notifications[$k]['timeSeconds'];
             $this->countAllNotifiactions .= '<li>
                             <a href="#Modal" data-tager="Modal" onclick=Modal("' . $Link . '")>
                                 <span class="label label-danger"><i class="fa fa-' . $getLast5Notifications['Icon'] . '"></i></span>
                                 ' . $text . '
                                 <span class="small italic">' . $diferenceTime . '</span>
                             </a>
                         </li>';
         }
         $this->countAllNotifiactions = '<li>
                             <a href="#Modal" data-target="Modal" onclick=Modal("ShowNotifications")>' . new ADMIN_TRANSLATION(LANG, 'allnotifications', 1, 0) . '</a>
                         </li>';
     } else {
         $this->countAllNotifiactions = '<li><a href="#">' . new ADMIN_TRANSLATION(LANG, 'NoNotifications', 1, 0) . '</a></li>';
     }
 }
Example #3
0
 private function AllDates($start)
 {
     $start = (int) $start;
     //echo $start;
     $getLast5Celebrations = parent::select('admin_calendar', '*', '`timeHappendSeconds`>="' . CONFIGURATION::$CONFIG['timeSeconds'] . '" AND `isEnabled`="1"', '`timeHappened` DESC LIMIT ' . $start . ',5');
     if (count($getLast5Celebrations) > 0) {
         $this->CountNewCelebrations();
         $this->countAllCallendar = '<li><p class="green">' . $this->countAllCallendar . '</p></li>';
         for ($k = 0; $k < count($getLast5Celebrations); $k++) {
             $text = new ADMIN_TRANSLATION(LANG, $getLast5Celebrations[$k]['caledarName'], 1, 0);
             $diferenceTime = (int) parent::$CONFIG['timeSeconds'] - (int) $getLast5Celebrations[$k]['timeSeconds'];
             $this->countAllCallendar .= '<li>
                             <a href="#Modal" data-tager="Modal" onclick=Modal("")>                                   
                                 ' . $text . '
                                 <span class="small italic">' . $getLast5Celebrations['timeHappened'] . '</span>
                             </a>
                         </li>';
         }
         $this->countAllCallendar = '<li>
                             <a href="#Modal" data-target="Modal" onclick=Modal("ShowCalendar")>' . new ADMIN_TRANSLATION(LANG, 'allcalendar', 1, 0) . '</a>
                         </li>';
     } else {
         $this->countAllCallendar = '<li><a href="#">' . new ADMIN_TRANSLATION(LANG, 'NoCalendar', 1, 0) . '</a></li>';
     }
 }
 private function FindPageInDB()
 {
     $thisUser = new USER($_SESSION['userID']);
     $getPage = parent::select('modules', '*', "`moduleTitle`='{$this->MODULE}' AND `isEnabled`='1' AND (`adminPanel`='1' OR `adminPanel`='2') AND (`accessGroup` IN ('" . $thisUser->GROUP . "') OR `accessUsers` IN ('" . $thisUser->USERID . "'))", '');
     if (count($getPage) == 0) {
         header("HTTP/1.0 404 Not Found");
         require_once dirname(__FILE__) . '/../../common/views/404.php';
         exit;
     } elseif (!empty($this->PAGE_)) {
         $getPage = parent::select('modules', '*', "`moduleTitle`='{$this->MODULE}' AND `isEnabled`='1' AND `adminPanel`='1' AND (`accessGroup` IN ('" . $thisUser->GROUP . "') OR `accessUsers` IN ('" . $thisUser->USERID . "'))", '');
         if (count($getPage) == 0) {
             header("HTTP/1.0 404 Not Found");
             require_once dirname(__FILE__) . '/../../common/views/404.php';
             exit;
         } else {
             self::$PAGE = $getPage[0];
         }
     } else {
         self::$PAGE = $getPage[0];
     }
 }
Example #5
0
 private function ShowMenu()
 {
     $getParents = parent::select('admin_menu', '*', "`isEnabled`='1' AND `Parent`='0'", '`Order`');
     if (count($getParents) > 0) {
         $this->MenuContext = '';
         for ($k = 0; $k < count($getParents); $k++) {
             $parent = $getParents[$k]['menuID'];
             $getMenu = parent::select('admin_menu', '*', "`isEnabled`='1' AND `Parent`='{$parent}'", '`Order`');
             if (count($getMenu) == 0) {
                 if ($getParents[$k]['Modal'] == 0) {
                     $this->MenuContext .= ' <li>
                   <a href="' . ADMIN_CONFIGURATION::$CONFIG['adminURL'] . LANG . '/' . $getParents[$k]['Link'] . '" data-toggle="link">
                       <i class="fa fa-' . $getParents[$k]['Icon'] . '"></i>
                       <span>' . new ADMIN_TRANSLATION(LANG, $getParents[$k]['menuTitleLang'], 1, 0) . '</span>
                   </a>
               </li>';
                 } else {
                     $this->MenuContext .= ' <li>
                   <a data-toggle="modal" href="#myModal" onclick="Modal(' . "'" . $getParents[$k]['Link'] . "'" . ')">
                       <i class="fa fa-' . $getParents[$k]['Icon'] . '"></i>
                       <span>' . new ADMIN_TRANSLATION(LANG, $getParents[$k]['menuTitleLang'], 1, 0) . '</span>
                   </a>
               </li>';
                 }
             } else {
                 $this->MenuContext .= '<li class="sub-menu">
                   <a href="#">
                       <i class="fa fa-' . $getParents[$k]['Icon'] . '"></i>
                       <span>' . new ADMIN_TRANSLATION(LANG, $getParents[$k]['menuTitleLang'], 1, 0) . '</span>
                   </a><ul class="sub">';
                 for ($i = 0; $i < count($getMenu); $i++) {
                     $this->MenuContext .= '<li><a  href="' . ADMIN_CONFIGURATION::$CONFIG['adminURL'] . LANG . '/' . $getMenu[$i]['Link'] . '" data-toggle="link">' . new ADMIN_TRANSLATION(LANG, $getMenu[$i]['menuTitleLang'], 1, 0) . '</a></li>';
                 }
                 $this->MenuContext .= '</ul></li>';
             }
         }
     }
 }