本文整理汇总了PHP中Phpfox::isAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::isAdmin方法的具体用法?PHP Phpfox::isAdmin怎么用?PHP Phpfox::isAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::isAdmin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteCategory
/**
* Deletes a category
* @param int $iId
* @return bool
*/
public function deleteCategory($iId)
{
Phpfox::isAdmin(true);
$this->database()->delete(Phpfox::getT('app_category'), 'category_id = ' . (int) $iId);
$this->database()->delete(Phpfox::getT('app_category_data'), 'category_id = ' . (int) $iId);
return true;
}
示例2: getBulletins
/**
* Gets the bulletins to show in the entry block, this complies with the admin panel settings for
* how many to show in front page and if the bulletins are private or not, also with the cache time out
* Private bulletins are never cached or it would lead to too many cache files.
* @param $iId integer User id for which we filter, we check if this user has permission to see every message or we filter out
* @return array
*/
public function getBulletins($iId)
{
// we need to show all the bulletins that this user can see
// we need to know if the admin has set it so only friends can view bulletins
if (Phpfox::getParam('bulletin.is_bulletin_public') || Phpfox::isAdmin()) {
// check the cache first
// we do a simple get
if (Phpfox::getParam('bulletin.bulletin_do_cache')) {
$sCacheId = $this->cache()->set('bulletin');
if (!($aRows = $this->cache()->get($sCacheId, Phpfox::getParam('bulletin.cache_time_out')))) {
$aRows = $this->database()->select('b.bulletin_id, b.view_id, b.title, b.time_stamp, b.total_comment, b.total_attachment, ' . Phpfox::getUserField())->from($this->_sTable, 'b')->join(Phpfox::getT('user'), 'u', 'u.user_id = b.user_id')->order('b.time_stamp DESC')->where('b.view_id = 0')->limit(Phpfox::getParam('bulletin.how_many_show_in_front_page'))->execute('getSlaveRows');
if (!empty($aRows)) {
foreach ($aRows as $iKey => $aRow) {
$aRows[$iKey]['posted_on'] = Phpfox::getPhrase('bulletin.posted_on_time_stamp_by_user_link', array('item_time_stamp' => Phpfox::getTime(Phpfox::getParam('bulletin.bulletin_view_timestamp'), $aRow['time_stamp']), 'user' => $aRow));
}
$this->cache()->save($sCacheId, $aRows);
}
}
return $aRows;
}
$aRows = $this->database()->select('b.bulletin_id, b.title, b.view_id, b.time_stamp, b.total_comment, b.total_attachment, ' . Phpfox::getUserField())->from($this->_sTable, 'b')->join(Phpfox::getT('user'), 'u', 'u.user_id = b.user_id')->order('b.time_stamp DESC')->limit(Phpfox::getParam('bulletin.how_many_show_in_front_page'))->execute('getSlaveRows');
foreach ($aRows as $iKey => $aRow) {
$aRows[$iKey]['posted_on'] = Phpfox::getPhrase('bulletin.posted_on_time_stamp_by_user_link', array('item_time_stamp' => Phpfox::getTime(Phpfox::getParam('bulletin.bulletin_view_timestamp'), $aRow['time_stamp']), 'user' => $aRow));
}
return $aRows;
}
// Private bulletins, cache the ones this oner can see
$aRows = $this->database()->select('DISTINCT b.bulletin_id, b.title, b.view_id, b.time_stamp, b.total_comment, b.total_attachment, ' . Phpfox::getUserField())->from($this->_sTable, 'b')->join(Phpfox::getT('friend'), 'f', '(f.friend_user_id = ' . (int) $iId . ' AND f.user_id = b.user_id) OR b.user_id = ' . (int) $iId)->join(Phpfox::getT('user'), 'u', 'b.user_id = u.user_id')->order('b.time_stamp DESC')->limit(Phpfox::getParam('bulletin.how_many_show_in_front_page'))->execute('getSlaveRows');
foreach ($aRows as $iKey => $aRow) {
$aRows[$iKey]['posted_on'] = Phpfox::getPhrase('bulletin.posted_on_time_stamp_by_user_link', array('item_time_stamp' => Phpfox::getTime(Phpfox::getParam('bulletin.bulletin_view_timestamp'), $aRow['time_stamp']), 'user' => $aRow));
}
return $aRows;
}
示例3: compose
public function compose()
{
Phpfox::isUser(true);
$aUser = Phpfox::getService('user')->get($this->get('user_id'), true);
$this->setTitle(Phpfox::getPhrase('interact.interact_with_user', array('fname' => $aUser['full_name'])));
if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'interact.can_interact')) {
echo Phpfox::getPhrase('interact.unable_privacy');
return false;
}
if (Phpfox::getParam('interact.interact_friends_only')) {
if (!Phpfox::getService('friend')->isFriend($aUser['user_id'], Phpfox::getUserId())) {
echo Phpfox::getPhrase('interact.unable_friend');
return false;
}
}
if (Phpfox::getUserParam('interact.enable_interactions')) {
$iAllowed = Phpfox::getUserParam('interact.send_per_hour');
if ($iAllowed != 0) {
$iHourSent = Phpfox::getLib('database')->select('COUNT(id)')->from(Phpfox::getT('interactions_main'))->where('is_reply = 0 AND sender_id = ' . Phpfox::getUserId() . ' AND time >= ' . (time() - 3600))->execute('getSlaveField');
if (!Phpfox::isAdmin() && $iHourSent >= $iAllowed && $this->get('reply') == 0) {
echo Phpfox::getPhrase('interact.flood_control', array('allowed' => $iAllowed));
return false;
}
}
$iItemId = 0;
if ($this->get('item_id')) {
$iItemId = $this->get('item_id');
}
Phpfox::getBlock('interact.compose', array('int_id' => $this->get('int_id'), 'user_id' => $this->get('user_id'), 'item_id' => $iItemId, 'is_reply' => $this->get('reply') ? $this->get('reply') : 0));
echo '<script type="text/javascript">$Core.loadInit();</script>';
} else {
echo Phpfox::getPhrase('interact.no_permission');
return false;
}
}
示例4: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
Phpfox::isAdmin(true);
if (!($aLog = Phpfox::getService('core.admincp')->getAdminLoginLog($this->request()->get('login_id')))) {
return false;
}
$this->template()->assign(array('aLog' => $aLog));
}
示例5: deleteNoFollow
public function deleteNoFollow()
{
Phpfox::isAdmin(true);
foreach ((array) $this->get('id') as $iId) {
Phpfox::getService('admincp.seo.process')->deleteNoFollow($iId);
$this->remove('#js_id_row_' . $iId);
}
$this->call('$(\'#js_check_box_all\').attr(\'checked\', false);');
}
示例6: canMessageUser
/**
* This function validates the permission to send a PM to another user, it
* takes into account the user group setting: mail.can_compose_message
* the privacy setting by the receiving user: mail.send_message
* and if the receiving user is blocked by the sender user or viceversa
* Also checks on other user group based restrictions
* @param int $iUser The user id of the member trying to send a message
* @return boolean true if its ok to send the message, false otherwise
*/
public function canMessageUser($iUser)
{
(($sPlugin = Phpfox_Plugin::get('mail.service_mail_canmessageuser_1')) ? eval($sPlugin) : false);
if (isset($bCanOverrideChecks))
{
return true;
}
// 1. user group setting:
if (!Phpfox::getUserParam('mail.can_compose_message'))
{
return false;
}
// 2. Privacy setting check
$iPrivacy = $this->database()->select('user_value')
->from(Phpfox::getT('user_privacy'))
->where('user_id = ' . (int)$iUser . ' AND user_privacy = "mail.send_message"')
->execute('getSlaveField');
if (!empty($iPrivacy) && !Phpfox::isAdmin())
{
if ($iPrivacy == 4) // No one
{
return false;
}
else if($iPrivacy == 1 && !Phpfox::isUser()) // trivial case
{
return false;
}
else if ($iPrivacy == 2 && !Phpfox::getService('friend')->isFriend(Phpfox::getUserId(), $iUser, false)) // friends only
{
return false;
}
}
// 3. Blocked users
if (!Phpfox::isAdmin() && (Phpfox::getService('user.block')->isBlocked(Phpfox::getUserId(), $iUser) > 0 || Phpfox::getService('user.block')->isBlocked($iUser, Phpfox::getUserId()) > 0))
{
return false;
}
// 4. Sending message to oneself vs the setting mail.can_message_self
if ($iUser == Phpfox::getUserId() && !Phpfox::getUserParam('mail.can_message_self'))
{
return false;
}
// 5. User group setting (different from check 2 since that is user specific)
if ((Phpfox::getUserParam('mail.restrict_message_to_friends') == true)
&& (Phpfox::getService('friend')->isFriend(Phpfox::getUserId(), $iUser, false) == false)
&& (Phpfox::getUserParam('mail.override_restrict_message_to_friends') == false))
{
return false;
}
// then its ok
return true;
}
示例7: dumpCache
public function dumpCache()
{
Phpfox::isAdmin(true);
$aFiles = Phpfox::getLib('file')->getAllFiles(PHPFOX_DIR_CACHE);
foreach ($aFiles as $sFile) {
unlink($sFile);
}
$aFiles = Phpfox::getLib('file')->getAllFiles(PHPFOX_DIR_CACHE);
$this->html('#dump_cache_button_text', Phpfox::getPhrase('sysop.dump_cache') . ' (' . count($aFiles) . ' ' . Phpfox::getPhrase('sysop.files') . ')');
$this->call('blinkStatus("cache_dump_status");');
}
示例8: _view
private function _view($sView)
{
switch ($sView) {
case 'pending_entries':
Phpfox::isUser(true);
if (!Phpfox::isAdmin()) {
$this->search()->setCondition('AND en.status = 0 and ct.user_id = ' . PHpfox::getUserId());
} else {
$this->search()->setCondition('AND en.status = 0 ');
}
break;
default:
Phpfox::isUser(true);
$this->search()->setCondition('AND en.user_id = ' . Phpfox::getUserId());
break;
}
}
示例9: updateRewrites
/** This function updates the site wide rewrites, not the redirects.
* This is called from AdminCP -> Tools -> SEO -> URL Rewrite
* @version 3.7.0
* @param $aRewrites array [ {rewrite_id: #, original_url: string, replacement_url : string }, {... ]
*/
public function updateRewrites($aRewrites)
{
Phpfox::isAdmin(true);
$oParse = Phpfox::getLib('parse.input');
foreach ($aRewrites as $aRewrite) {
if (!isset($aRewrite['rewrite_id']) || !isset($aRewrite['remove']) && (!isset($aRewrite['original_url']) || !isset($aRewrite['replacement_url']))) {
continue;
}
if (!isset($aRewrite['remove']) && strpos($aRewrite['original_url'], ' ') !== false) {
Phpfox_Error::set('This is not a valid url: "' . $aRewrite['original_url'] . '"');
continue;
}
if (!isset($aRewrite['remove']) && strpos($aRewrite['replacement_url'], ' ') !== false) {
Phpfox_Error::set('This is not a valid url: "' . $aRewrite['replacement_url'] . '"');
continue;
}
// Invalid params from the otiringal url
if (isset($aRewrite['original_url'])) {
$aRewrite['original_url'] = str_replace('_', '', $aRewrite['original_url']);
}
if (is_numeric($aRewrite['rewrite_id']) && $aRewrite['rewrite_id'] > 0 && (int) $aRewrite['rewrite_id'] == $aRewrite['rewrite_id']) {
if (isset($aRewrite['remove'])) {
$this->database()->delete(Phpfox::getT('rewrite'), 'rewrite_id = ' . (int) $aRewrite['rewrite_id']);
} else {
$aRewrite['original_url'] = trim($aRewrite['original_url'], '/');
$aRewrite['replacement_url'] = trim($aRewrite['replacement_url'], '/');
$this->database()->update(Phpfox::getT('rewrite'), array('url' => $oParse->clean($aRewrite['original_url']), 'replacement' => $oParse->clean($aRewrite['replacement_url'])), 'rewrite_id = ' . (int) $aRewrite['rewrite_id']);
}
} else {
$aRewrite['original_url'] = trim($aRewrite['original_url'], '/');
$aRewrite['replacement_url'] = trim($aRewrite['replacement_url'], '/');
$this->database()->insert(Phpfox::getT('rewrite'), array('url' => $oParse->clean($aRewrite['original_url']), 'replacement' => $oParse->clean($aRewrite['replacement_url'])));
}
}
$iCacheId = Phpfox::getLib('cache')->set('rewrite');
Phpfox::getLib('cache')->remove($iCacheId);
$iReverseCacheId = Phpfox::getLib('cache')->set('rewrite_reverse');
Phpfox::getLib('cache')->remove($iReverseCacheId);
return true;
}
示例10: process
/**
* This controller orchestrates to register a new application
*/
public function process()
{
$bIsAdd = $bIsEdit = false;
Phpfox::getUserParam('apps.can_add_app', true);
if (!Phpfox::getParam('apps.enable_api_support')) {
//return Phpfox_Error::display('No api');
}
if ($aVals = $this->request()->getArray('app')) {
$bIsAdd = true;
$aApp = Phpfox::getService('apps.process')->addApp($aVals);
if ($aApp == false) {
$this->template()->assign(array('sErrorMessage' => Phpfox_Error::get()));
} else {
$this->url()->send('apps.add', array('id' => $aApp['app_id']), Phpfox::getPhrase('apps.app_successfully_created'));
}
}
if (($iId = $this->request()->getInt('id')) && $this->request()->get('req2') == 'add') {
// is editing an app
$aApp = Phpfox::getService('apps')->getAppById($iId);
$this->template()->assign('aForms', $aApp);
$bIsEdit = true;
$aMenus = array('general' => Phpfox::getPhrase('apps.general'), 'photo' => Phpfox::getPhrase('apps.photo'), 'url' => Phpfox::getPhrase('apps.url'));
$this->template()->buildPageMenu('js_apps_block', $aMenus, array('link' => Phpfox::permalink('apps', $aApp['app_id'], $aApp['app_title']), 'phrase' => Phpfox::getPhrase('apps.view_this_app')));
if ($aVals = $this->request()->getArray('val')) {
if (Phpfox::getService('apps.process')->updateApp($aVals, $aApp)) {
$this->url()->send('apps.add', array('id' => $aApp['app_id']), Phpfox::getPhrase('apps.successfully_updated_the_app'));
}
}
// check that this user is owner of the app
// we can have a user group setting here
if ($aApp['user_id'] != Phpfox::getUserId() && !Phpfox::isAdmin()) {
Phpfox_Error::display(Phpfox::getPhrase('apps.you_are_not_allowed_to_edit_this_app'));
} else {
$this->template()->assign(array('aApp' => $aApp))->setHeader(array('index.js' => 'module_apps'));
}
}
$aCategories = Phpfox::getService('apps.category')->getAllCategories();
$this->template()->setTitle($bIsEdit ? Phpfox::getPhrase('apps.editing_app') . ': ' . $aApp['app_title'] : Phpfox::getPhrase('apps.create_an_app'))->setFullSite()->setBreadcrumb(Phpfox::getPhrase('apps.apps'), $this->url()->makeUrl('apps'))->setBreadcrumb($bIsEdit ? Phpfox::getPhrase('apps.editing_app') . ': ' . $aApp['app_title'] : Phpfox::getPhrase('apps.create_an_app'), $this->url()->makeUrl('apps.add'), true)->assign(array('aCategories' => $aCategories));
}
示例11: updateApp
/**
* This function is called from the add controller when a user submitted an edited
* version of their app.
* @param type $aVals
* @param type $aApp
*/
public function updateApp($aVals)
{
// get the app and make sure this user is allowed to edit it
$aApp = Phpfox::getService('apps')->getAppById($aVals['app_id']);
if (empty($aApp) || ($aApp['user_id'] != Phpfox::getUserId() && !Phpfox::isAdmin()))
{
return Phpfox_Error::set(Phpfox::getPhrase('apps.cannot_edit_this_app'));
}
$oParse = Phpfox::getLib('parse.input');
$sUrl = rtrim($oParse->clean($aVals['app_url']), '/') . '/';
if (!preg_match('/^(http|https):\/\/(.*)$/i', $sUrl))
{
return Phpfox_Error::set(Phpfox::getPhrase('apps.please_provide_a_valid_url'));
}
$this->database()->update(Phpfox::getT('app'), array(
'app_title' => $oParse->clean($aVals['title']),
'app_description' => $oParse->clean($aVals['description']),
'app_url' => $sUrl
), 'app_id = ' . $aApp['app_id']);
if (!empty($_FILES['image']['name']))
{
// Upload this picture before deleting the old one
$oFile = Phpfox::getLib('file');
$oImage = Phpfox::getLib('image');
Phpfox::getLib('file')->load('image');
$sFileName = $oFile->upload('image', Phpfox::getParam('app.dir_image'), $aApp['app_id']);
$this->database()->update(Phpfox::getT('app'), array('image_path' => $sFileName), 'app_id = ' . $aApp['app_id']);
// Create thumbnail
$oImage->createThumbnail(Phpfox::getParam('app.dir_image') . sprintf($sFileName, ''), Phpfox::getParam('app.dir_image') . sprintf($sFileName, '_200'), 200, 200);
$iSize = 50;
$oImage->createThumbnail(Phpfox::getParam('app.dir_image') . sprintf($sFileName, ''), Phpfox::getParam('app.dir_image') . sprintf($sFileName, '_' . $iSize), $iSize, $iSize);
$oImage->createThumbnail(Phpfox::getParam('app.dir_image') . sprintf($sFileName . '', ''), Phpfox::getParam('app.dir_image') . sprintf($sFileName, '_square'), $iSize, $iSize, false);
// update the image from the database
$this->database()->update(Phpfox::getT('app'), array('image_path' => $sFileName), 'app_id = ' . $aApp['app_id']);
// now we can delete the old image
if (!empty($aApp['image_path']))
{
if (file_exists(Phpfox::getParam('app.dir_image') . sprintf($aApp['image_path'], '')))
{
Phpfox::getLib('file')->unlink(Phpfox::getParam('app.dir_image') . sprintf($aApp['image_path'], ''));
}
if (file_exists(Phpfox::getParam('app.dir_image') . sprintf($aApp['image_path'], '_' . $iSize)))
{
Phpfox::getLib('file')->unlink(Phpfox::getParam('app.dir_image') . sprintf($aApp['image_path'], '_' . $iSize));
}
}
}
// update the category for this app
$this->database()->delete(Phpfox::getT('app_category_data'), 'app_id = ' . $aApp['app_id']);
$this->database()->insert(Phpfox::getT('app_category_data'), array(
'category_id' => (int)$aVals['category'],
'app_id' => $aApp['app_id']
));
return true;
}
示例12: clearIgnore
public function clearIgnore()
{
Phpfox::isAdmin();
Phpfox::getService('generator.image.process')->clearIgnoreList();
$this->call('alert("Ignore list cleared.");');
}
示例13: getMenu
//.........这里部分代码省略.........
Phpfox::getLib('cache')->save($sUserMenuCache, $aUserMenusCache);
}
}
foreach ($aMenus as $iKey => $aMenu) {
if (substr($aMenu['url'], 0, 1) == '#') {
$aMenus[$iKey]['css_name'] = 'js_core_menu_' . str_replace('#', '', str_replace('-', '_', $aMenu['url']));
}
if (($aMenu['url'] == 'ad' || $aMenu['url'] == 'ad.index') && !Phpfox::getUserParam('ad.can_create_ad_campaigns')) {
unset($aMenus[$iKey]);
continue;
}
if ($aMenu['url'] == 'mail.compose' && Phpfox::getUserParam('mail.restrict_message_to_friends') && !Phpfox::isModule('friend')) {
unset($aMenus[$iKey]);
continue;
}
if (isset($aUserMenusCache[$aMenu['menu_id']])) {
$aMenus[$iKey]['is_force_hidden'] = true;
}
/*
if (Phpfox::isModule('pages') && (Phpfox::getService('pages')->isViewMode() || defined('PHPFOX_IS_PAGES_VIEW')) && $aMenu['url'] == 'photo.add')
{
$aPage = Phpfox::getService('pages')->getPage();
$aMenus[$iKey]['url'] = 'photo.add.module_pages.item_' . $aPage['page_id'];
}
*/
// Bug: http://www.phpfox.com/tracker/view/14383/
if (defined('PHPFOX_IS_PAGES_VIEW')) {
if (Phpfox::isModule('pages') && $aMenu['url'] == 'blog.add') {
$iPage = $this->_aVars['aPage']['page_id'];
$aMenus[$iKey]['url'] = 'blog.add.module_pages.item_' . $iPage;
}
if (Phpfox::isModule('pages') && $aMenu['url'] == 'event.add') {
$iPage = $this->_aVars['aPage']['page_id'];
$aMenus[$iKey]['url'] = 'event.add.module_pages.item_' . $iPage;
}
if (Phpfox::isModule('pages') && $aMenu['url'] == 'music.add') {
$iPage = $this->_aVars['aPage']['page_id'];
$aMenus[$iKey]['url'] = 'music.add.module_pages.item_' . $iPage;
}
if (Phpfox::isModule('pages') && $aMenu['url'] == 'video.add') {
$iPage = $this->_aVars['aPage']['page_id'];
$aMenus[$iKey]['url'] = 'video.add.module_pages.item_' . $iPage;
}
if (Phpfox::isModule('pages') && $aMenu['url'] == 'photo.add') {
$iPage = $this->_aVars['aPage']['page_id'];
$aMenus[$iKey]['url'] = 'photo.add.module_pages.item_' . $iPage;
}
}
if ($aMenu['url'] == $oReq->get('req1') || empty($aMenu['url']) && $oReq->get('req1') == PHPFOX_MODULE_CORE || $this->_sUrl !== null && $this->_sUrl == $aMenu['url'] || str_replace('/', '.', $oReq->get('req1') . $oReq->get('req2')) == str_replace('.', '', $aMenu['url'])) {
$aMenus[$iKey]['is_selected'] = true;
}
if ($aMenu['url'] == 'admincp') {
if (!Phpfox::isAdmin()) {
unset($aMenus[$iKey]);
continue;
}
} else {
if (!empty($aMenu['disallow_access'])) {
$aUserGroups = unserialize($aMenu['disallow_access']);
if (in_array(Phpfox::getUserBy('user_group_id'), $aUserGroups)) {
unset($aMenus[$iKey]);
continue;
}
}
if (isset($aMenu['children']) && is_array($aMenu['children'])) {
foreach ($aMenu['children'] as $iChildMenuMain => $aChildMenuMain) {
if (!empty($aChildMenuMain['disallow_access'])) {
$aUserGroups = unserialize($aChildMenuMain['disallow_access']);
if (in_array(Phpfox::getUserBy('user_group_id'), $aUserGroups)) {
unset($aMenus[$iKey]['children'][$iChildMenuMain]);
//break;
}
}
}
}
}
if (isset($this->_aNewUrl[$sConnection])) {
$aMenus[$iKey]['url'] = $this->_aNewUrl[$sConnection][0] . '.' . implode('.', $this->_aNewUrl[$sConnection][1]) . '.' . $aMenu['url'];
}
if (isset($this->_aRemoveUrl[$sConnection][$aMenu['url']])) {
unset($aMenus[$iKey]);
continue;
}
if ($sConnection == 'explore') {
$aMenus[$iKey]['module_image'] = $this->getStyle('image', 'module/' . $aMenu['module'] . '.png');
if (!file_exists(str_replace(Phpfox::getParam('core.path'), PHPFOX_DIR, $aMenus[$iKey]['module_image']))) {
unset($aMenus[$iKey]['module_image']);
}
}
if (isset($aMenu['children'])) {
foreach ($aMenu['children'] as $iChildKey => $aChild) {
if ($aChild['m_connection'] == 'video.index' && $aChild['url'] == 'video.upload' && !Phpfox::getParam('video.allow_video_uploading')) {
unset($aMenus[$iKey]['children'][$iChildKey]);
}
}
}
}
return $aMenus;
}
示例14: showDenyUser
/**
* Shows the "pop up" when denying a user from the adminCP
*/
public function showDenyUser()
{
Phpfox::isAdmin(true);
$iUser = (int) $this->get('iUser');
Phpfox::getBlock('user.admincp.denyUser', array('iUser' => $iUser));
}
示例15: isAdmin
public function isAdmin()
{
return \Phpfox::isAdmin();
}