本文整理汇总了PHP中PHPWS_Core::atHome方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Core::atHome方法的具体用法?PHP PHPWS_Core::atHome怎么用?PHP PHPWS_Core::atHome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPWS_Core
的用法示例。
在下文中一共展示了PHPWS_Core::atHome方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runTime
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: runTime
public function runTime(\Request $request)
{
if (\Current_User::isLogged()) {
\election\Controller\User::loadNavBar();
}
if (\PHPWS_Core::atHome()) {
\election\Controller\User::welcomeScreen($this);
}
}
示例3: runTime
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:
<?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:
* 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: header
<?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: view
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:
<?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: showSide
/**
* 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&action=view">%s</a>', dgettext('blog', 'Recent blog entries'));
$content = PHPWS_Template::process($tpl, 'blog', 'recent_view.tpl');
Layout::add($content, 'blog', 'recent_entries');
}