예제 #1
0
 public function runTime(\Request $request)
 {
     if (\PHPWS_Core::atHome()) {
         require_once PHPWS_SOURCE_DIR . 'mod/tailgate/conf/defines.php';
         \tailgate\Controller\User\Game::userStatusSidebar();
     }
 }
예제 #2
0
 public function runTime(\Request $request)
 {
     if (\Current_User::isLogged()) {
         \election\Controller\User::loadNavBar();
     }
     if (\PHPWS_Core::atHome()) {
         \election\Controller\User::welcomeScreen($this);
     }
 }
예제 #3
0
 public function runTime(\Request $request)
 {
     if (\Current_User::allow('sysinventory')) {
         \systemsinventory\Controller\System::loadAdminBar();
     }
     if (\PHPWS_Core::atHome() && \Current_User::isLogged()) {
         $path = $_SERVER['SCRIPT_NAME'] . '?module=systemsinventory';
         header('HTTP/1.1 303 See Other');
         header("Location: {$path}");
         exit;
     }
 }
예제 #4
0
<?php

/**
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 */
if (PHPWS_Core::atHome() && PHPWS_Settings::get('checkin', 'front_page')) {
    PHPWS_Core::initModClass('checkin', 'Checkin_User.php');
    $checkin = new Checkin_User();
    $checkin->process('checkin_form');
}
if (Current_User::allow('checkin')) {
    PHPWS_Core::initModClass('checkin', 'Checkin_Admin.php');
    $checkin_admin = new Checkin_Admin();
    $checkin_admin->menu();
}
예제 #5
0
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @package
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
if (!PHPWS_Settings::get('properties', 'roommate_only')) {
    if (PHPWS_Core::atHome()) {
        PHPWS_Core::initModClass('properties', 'User.php');
        $user = new Properties\User();
        $user->searchPanel();
        $user->propertyListing();
    }
    if (isset($_SESSION['Contact_User'])) {
        $_SESSION['Contact_User']->loginMenu();
    } else {
        require_once PHPWS_SOURCE_DIR . 'mod/properties/class/Contact_User.php';
        $form = \Properties\Contact_User::contactForm();
        $tpl = $form->getTemplate();
        $content = PHPWS_Template::process($tpl, 'properties', 'clogin.tpl');
        Layout::add($content, 'properties', 'contact_login');
    }
}
예제 #6
0
<?php

/***
 * Commenting this out for now.. Need to test more extensively when we can get r6test updated to latest phpws
if(!Current_User::isLogged() && isset($_SERVER['HTTP_SHIB_EP_PRINCIPALNAME'])) {
    NQ::simple('intern', INTERN_ERROR, "You have successfully signed in, but we have not setup your Internship Inventory account. Please contact the Career Development Center at 828-262-2180.");
    NQ::close();
}
*/
if (PHPWS_Core::atHome() && Current_User::isLogged()) {
    $path = $_SERVER['SCRIPT_NAME'] . '?module=appsync';
    header('HTTP/1.1 303 See Other');
    header("Location: {$path}");
    exit;
}
예제 #7
0
 public function view()
 {
     Layout::addStyle('pagesmith');
     if (Current_User::allow('pagesmith', 'edit_page', $this->id)) {
         MiniAdmin::add('pagesmith', $this->editLink(dgettext('pagesmith', 'Edit this page')));
         MiniAdmin::add('pagesmith', $this->frontPageToggle());
     }
     $this->loadTemplate();
     $this->_tpl->loadStyle();
     $this->flag();
     $this->loadSections();
     if (!empty($this->title) && !PHPWS_Core::atHome()) {
         Layout::addPageTitle($this->title);
     }
     if (!$this->hide_title) {
         $this->_content['page_title'] =& $this->title;
     }
     $anchor_title = $tpl['ANCHOR'] = preg_replace('/\\W/', '-', $this->title);
     if (Current_User::allow('pagesmith') && $this->_key->show_after > time()) {
         $tpl['SHOW_AFTER'] = t('Page hidden until %s', strftime('%F %H:%M', $this->_key->show_after));
     }
     $tpl['CONTENT'] = PHPWS_Template::process($this->_content, 'pagesmith', $this->_tpl->page_path . 'page.tpl');
     $this->pageLinks($tpl);
     if (PHPWS_Settings::get('pagesmith', 'back_to_top')) {
         $tpl['BACK_TO_TOP'] = sprintf('<a href="%s#%s">%s</a>', PHPWS_Core::getCurrentUrl(), $anchor_title, '<i class="fa fa-arrow-circle-up"></i> ' . dgettext('pagesmith', 'Back to top'));
     }
     $content = PHPWS_Template::process($tpl, 'pagesmith', 'page_frame.tpl');
     return $content;
 }
예제 #8
0
<?php

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
$mini_cal_display = PHPWS_Settings::get('calendar', 'display_mini');
if ($mini_cal_display == MINI_CAL_SHOW_ALWAYS || $mini_cal_display == MINI_CAL_SHOW_FRONT && PHPWS_Core::atHome()) {
    Layout::addStyle('calendar');
    $Calendar = new PHPWS_Calendar();
    $Calendar->loadUser();
    if (PHPWS_Settings::get('calendar', 'mini_grid')) {
        $lil_calendar = $Calendar->user->mini_month();
        Layout::add($lil_calendar, 'calendar', 'minimonth');
    }
    $upcoming = $Calendar->user->upcomingEvents();
    if ($upcoming) {
        Layout::add($upcoming, 'calendar', 'upcoming');
    }
}
예제 #9
0
 /**
  * Displays current blog entries to side box
  */
 public static function showSide()
 {
     switch (PHPWS_Settings::get('blog', 'show_recent')) {
         case 0:
             // don't show
             return;
         case 1:
             // home page only
             if (!PHPWS_Core::atHome()) {
                 return;
             }
             break;
         case 2:
             // everywhere
             break;
     }
     $db = new PHPWS_DB('blog_entries');
     $db->addWhere('sticky', 0);
     $limit = PHPWS_Settings::get('blog', 'blog_limit');
     $result = Blog_User::getEntries($db, $limit);
     if (!$result) {
         return false;
     }
     foreach ($result as $entry) {
         $tpl['entry'][] = array('TITLE' => sprintf('<a href="%s">%s</a>', $entry->getViewLink(true), $entry->title));
     }
     $tpl['RECENT_TITLE'] = sprintf('<a href="index.php?module=blog&amp;action=view">%s</a>', dgettext('blog', 'Recent blog entries'));
     $content = PHPWS_Template::process($tpl, 'blog', 'recent_view.tpl');
     Layout::add($content, 'blog', 'recent_entries');
 }