_initUserAuth($docArr); $this->UserAuth->checkLogin(); $this->db = S_db2::getInstance(); require_once 'class/Session.php'; if (Session::getData('admin_sect', 'tplLite' )){ $docArr['tpl'] = SiteMap::getPath('Doc/tpl/admin/lite.tpl'); }else { $docArr['tpl'] = SiteMap::getPath('Doc/tpl/admin/main.tpl'); } $this->Doc($docArr, $options); $this->_initMenu(); $this->_initSearchForm(); $this->_initFooter(); $this->_initSTSAuthLink(); require_once 'class/Session.php'; if ($error = Session::getData(CURR_PAGE, 'error') ){ Session::clearData(CURR_PAGE, 'error'); $this->addContent(array('tpl' => 'msg_error.tpl', 'text' => $error)); } $variableName = 'msg_error'; if ($error = Session::getData(CURR_PAGE, $variableName) ){ Session::clearData(CURR_PAGE, $variableName ); $this->addContent(array('tpl' => 'msg_error.tpl', 'text' => $error)); } if ($msg = Session::getData(CURR_PAGE, 'msg')){ Session::clearData(CURR_PAGE, 'msg'); $this->addContent(array('tpl' => 'msg.tpl', 'text' => $msg)); } } function _initUserAuth($docAdd) { $Admin = SiteMap::getObj('Admin/Admin.php', &$this); $this->UserAuth = SiteMap::getObj('Admin/AdminAuth.php', $docAdd, $Admin); } function _initMenu() { $adminMenu = array( array( 'title' => 'Admin Home', 'url' => 'admin', 'sub' => array(), ), array( 'title' => 'Site Content', 'url' => 'admin/cms', 'sub' => array( array('title' => 'Site Map', 'url' => 'admin/cms'), array('title' => 'MNCAR Focus', 'url' => 'admin/blog'), array('title' => 'Events', 'url' => 'admin/event'), array('title' => 'DoC Courses', 'url' => 'admin/event/doc'), array('title' => 'Ads and Sponsors', 'url' => 'admin/sponsor'), array('title' => 'Industry Terms', 'url' => 'admin/term'), array('title' => 'Membership FAQs', 'url' => 'admin/faq'), array('title' => 'Site Keywords', 'url' => 'admin/keyword'), array('title' => 'RSS Feeds', 'url' => 'admin/rss'), array('title' => 'Online Polls', 'url' => 'admin/poll'), array('title' => 'Sponsor Applications', 'url' => 'admin/sponsor-application'), array('title' => 'Welsh Downloads', 'url' => 'admin/welsh-download'), array('title' => 'Featured Properties', 'url' => 'admin/featured-property'), array('title' => 'Donations', 'url' => 'admin/battle-donation'), ), ), array( 'title' => 'Membership/Accounting', 'url' => 'admin/member', 'sub' => array( array('title' => 'Search Accounts', 'url' => 'admin/member'), array('title' => 'Membership Dues Calculator', 'url' => 'admin/dues-calculator'), array('title' => 'MNCAR Dues Report', 'url' => 'admin/dues-report'), array('title' => 'MNCAR-L Dues Report', 'url' => 'admin/mncar-l-dues-report'), array('title' => 'Exchange Dues Report', 'url' => 'admin/exchange-dues-report'), //array('title' => 'Member Invoices', 'url' => 'admin/member/invoice'), //array('title' => 'Location Invoices', 'url' => 'admin/location/invoice'), //array('title' => 'Send Membership Invoices', 'url' => 'admin/invoice-import'), array('title' => 'Daily Online Payments Report', 'url' => 'admin/event/report?action=dailyreport'), array('title' => 'Purchasable Member List', 'url' => 'admin/member?action=export_purchasable'), ), ), array( 'title' => 'Statistics & Usage', 'url' => 'admin/statistic', 'target' => '', 'sub' => array(), ), array( 'title' => 'Email System Management', 'url' => 'admin/email', 'sub' => array(), ), array( 'title' => 'Settings', 'url' => 'admin/settings', 'sub' => array( array('title' => 'General Site Settings', 'url' => 'admin/settings'), array('title' => 'Legal Agreement', 'url' => 'admin/legal-agreement'), //array('title' => 'Account Activation Legal Agreement', 'url' => 'admin/legal-agreement'), //array('title' => 'Broadcast Email Legal Agreement', 'url' => 'admin/legal-agreement-broadcast'), array('title' => 'Manage Admin Users', 'url' => 'admin/admin'), array('title' => 'Blocked NRDS ID', 'url' => 'admin/nrds-usage'), array('title' => 'Volunteer Groups', 'url' => 'admin/volunteer'), ), ), ); $this->assign('adminMenu', $adminMenu); return true; } function _initSearchForm() { $Search = SiteMap::getObj('AdminSearch/AdminSearch.php', null, $this); $Search_Show = SiteMap::getObj('AdminSearch/Show/Show.php', &$Doc, $Search, $this->_options); $search_data['pages'] = 'y'; $form = $Search_Show->getSearchForm(); $form->setDefaults(array('search' => $search_data)); $this->assign('_search_form', $form->exec()); } function _initFooter() { $footer = SiteMap::getObj('SiteFooter/SiteFooter.php'); $this->assign('_footer', $footer->get()); } function getStsLoginEnabled() { $sql = "SELECT a.stsLoginEnabled FROM {$this->db->tblzz_Admin} a WHERE a.id = " . $this->db->quote($this->UserAuth->getData('id'), 'integer') . " LIMIT 1"; $status = $this->db->queryOne($sql); return $status; } function _initSTSAuthLink() { require_once 'app/Settings/Settings.php'; $textLink = Settings::get('stsAuthLink'); if ($textLink && ($this->getStsLoginEnabled() == 'y')) { $this->assign('STS_AUTH_LINK', str_replace('{url}', BASE_URL . '/admin/sts', $textLink)); } } }