本文整理汇总了PHP中Phpfox::getComponent方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getComponent方法的具体用法?PHP Phpfox::getComponent怎么用?PHP Phpfox::getComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::getComponent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewMore
public function viewMore()
{
Phpfox::getComponent('search.index', array(), 'controller');
$this->remove('#feed_view_more');
$this->append('#js_feed_content', $this->getContent(false));
$this->call('$Core.loadInit();');
}
示例2: widget
public function widget()
{
$this->setTitle(Phpfox::getPhrase('pages.widgets'));
Phpfox::getComponent('pages.widget', array(), 'controller');
($sPlugin = Phpfox_Plugin::get('pages.component_ajax_widget')) ? eval($sPlugin) : false;
echo '<script type="text/javascript">$Core.loadInit();</script>';
}
示例3: process
/**
* Controller
*/
public function process()
{
($sPlugin = Phpfox_Plugin::get('quiz.component_controller_profile_process_start')) ? eval($sPlugin) : false;
$this->setParam('bIsProfile', true);
Phpfox::getComponent('quiz.index', array('bNoTemplate' => true), 'controller');
($sPlugin = Phpfox_Plugin::get('quiz.component_controller_profile_process_end')) ? eval($sPlugin) : false;
}
示例4: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$this->setParam('bIsProfile', true);
$aUser = $this->getParam('aUser');
$this->template()->setMeta('keywords', Phpfox::getPhrase('blog.full_name_s_blogs', array('full_name' => $aUser['full_name'])));
$this->template()->setMeta('description', Phpfox::getPhrase('blog.full_name_s_blogs_on_site_title', array('full_name' => $aUser['full_name'], 'site_title' => Phpfox::getParam('core.site_title'))));
Phpfox::getComponent('blog.index', array('bNoTemplate' => true), 'controller');
}
示例5: showQuickContact
public function showQuickContact()
{
// Phpfox::getUserParam('');
$iUserId = Phpfox::getParam('pages.admin_in_charge_of_page_claims');
if (empty($iUserId)) {
return Phpfox_Error::display(Phpfox::getPhrase('contact.no_admin_has_been_set_to_handle_this_type_of_issues'));
}
Phpfox::getComponent('mail.compose', array('claim_page' => true, 'page_id' => $this->get('page_id'), 'id' => $iUserId), 'controller');
}
示例6: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$this->setParam('bIsProfile', true);
$aUser = $this->getParam('aUser');
if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'video.display_on_profile'))
{
return Phpfox_Error::display(Phpfox::getPhrase('video.videos_for_this_profile_is_set_to_private'));
}
Phpfox::getComponent('video.index', array('bNoTemplate' => true), 'controller');
}
示例7: process
public function process()
{
Phpfox::getLib('setting')->setParam(array('profiles.url_image' => Phpfox::getParam('core.url_pic') . 'profiles/'));
$mUser = $this->request()->get('req2');
$sSection = $this->request()->get('req3');
$bIsPublicItemView = false;
if (Phpfox::isPublicView()) {
if (!empty($sSection) && Phpfox::isModule($sSection) && $sSection != 'designer' && Phpfox::hasCallback($sSection, 'getItemView') && Phpfox::callback($sSection . '.getItemView') === true) {
$bIsPublicItemView = true;
}
}
if (!$mUser) {
if (Phpfox::isUser()) {
$this->url()->send('profile');
} else {
Phpfox::isUser(true);
}
}
$aExtraProfile = Phpfox::getService('profiles')->getProfile($mUser);
if (count($aExtraProfile) == 0) {
return Phpfox::getLib('module')->setController('error.404');
}
$aUser = Phpfox::getService('user')->get($aExtraProfile['user_id']);
$this->setParam('aExtraProfile', $aExtraProfile);
$this->template()->assign(array('aExtraProfile' => $aExtraProfile));
if (Phpfox::getService('user.block')->isBlocked($aExtraProfile['user_id'], Phpfox::getUserId()) && !Phpfox::getUserParam('user.can_override_user_privacy')) {
$this->url()->send($aUser['user_name']);
}
if (!Phpfox::getService('user.privacy')->hasAccess($aExtraProfile['user_id'], 'profile.view_profile')) {
$this->url()->send($aUser['user_name']);
}
if (!empty($sSection) && $sSection == 'photo') {
$this->setParam('aParentModule', array('module_id' => 'profiles', 'item_id' => $aExtraProfile['extra_id'], 'url' => $this->url()->makeUrl('profiles', $aExtraProfile['title_url'])));
$this->template()->setTitle($aExtraProfile['title'])->setBreadcrumb($aExtraProfile['title'], $this->url()->makeUrl('profiles', $aExtraProfile['title_url']));
$this->url()->aRewrite['photo/add/'] = 'profiles/redirect/photo/add/' . $aExtraProfile['extra_id'];
$this->url()->aReverseRewrite['profiles/redirect/photo/add/' . $aExtraProfile['extra_id']] = 'photo/add/';
}
Phpfox::getUserParam('profile.can_view_users_profile', true);
$this->template()->setHeader('cache', array('profile.css' => 'style_css', 'feed.js' => 'module_feed'));
$this->template()->setMeta('description', Phpfox::getPhrase('profiles.meta_description', array('extra_name' => $aExtraProfile['title'], 'site_title' => Phpfox::getParam('core.site_title'), 'meta_description_profile' => Phpfox::getParam('core.meta_description_profile'))));
$sPageTitle = $aExtraProfile['title'];
$this->setParam('aFeed', array('comment_type_id' => 'profiles', 'privacy' => 0, 'comment_privacy' => 0, 'item_id' => $aExtraProfile['extra_id'], 'like_type_id' => 'profiles', 'feed_is_liked' => isset($aExtraProfile['is_liked']) ? $aExtraProfile['is_liked'] : false, 'user_id' => $aExtraProfile['user_id'], 'total_comment' => $aExtraProfile['total_comment'], 'total_like' => 0, 'feed_link' => $this->url()->makeUrl('profiles', $aExtraProfile['title_url']), 'feed_title' => $aExtraProfile['title'], 'feed_display' => 'view', 'report_module' => 'profiles', 'report_phrase' => Phpfox::getPhrase('profiles.report_this_profile')));
$this->template()->setTitle($sPageTitle)->setEditor(array('load' => 'simple', 'wysiwyg' => Phpfox::isModule('comment') && Phpfox::getParam('comment.wysiwyg_comments') && Phpfox::getUserParam('comment.wysiwyg_on_comments')))->setUrl('profiles')->setHeader('cache', array('comment.css' => 'style_css', 'pager.css' => 'style_css', 'jquery/plugin/jquery.scrollTo.js' => 'static_script', 'quick_edit.js' => 'static_script', 'jquery/plugin/jquery.highlightFade.js' => 'static_script'));
if ($this->request()->get('update')) {
$this->template()->setHeader('<script type="text/javascript">window.parent.tb_remove();</script>');
}
Phpfox::getComponent('photo.index', array('bNoTemplate' => true), 'controller');
$this->setParam('global_moderation', array('name' => 'photo', 'ajax' => 'profiles.moderation', 'menu' => array(array('phrase' => Phpfox::getPhrase('photo.delete'), 'action' => 'delete'), array('phrase' => Phpfox::getPhrase('photo.approve'), 'action' => 'approve'))));
}
示例8: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$this->setParam('bIsProfile', true);
if ($this->request()->get('req3') == 'albums')
{
$this->template()->assign('sReq3', 'albums');
Phpfox::getComponent('photo.albums', array('bNoTemplate' => true), 'controller');
}
else
{
$this->template()->assign('sReq3', 'photo');
Phpfox::getComponent('photo.index', array('bNoTemplate' => true), 'controller');
}
}
示例9: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$this->setParam('bIsProfile', true);
if ($sPlugin = Phpfox_Plugin::get('photo.component_controller_profile_1')) {
eval($sPlugin);
if (isset($mReturnFromPlugin)) {
return $mReturnFromPlugin;
}
}
$aUser = $this->getParam('aUser');
$aInfo = array('total_albums' => Phpfox::getService('photo.album')->getAlbumCount($aUser['user_id']), 'total_photos' => $aUser['total_photo']);
$bShowPhotos = $this->request()->get('req3') != 'albums';
if ($this->request()->get('req3') == '') {
$bShowPhotos = Phpfox::getParam('photo.in_main_photo_section_show') != 'albums';
}
$this->template()->setHeader(array('profile.css' => 'module_photo'))->assign(array('aInfo' => $aInfo, 'bShowPhotos' => $bShowPhotos, 'sLinkPhotos' => $this->url()->makeUrl($aUser['user_name'] . '.photo.photos'), 'sLinkAlbums' => $this->url()->makeUrl($aUser['user_name'] . '.photo.albums')));
if ($this->request()->get('req3') == 'albums') {
$this->template()->assign('sReq3', 'albums');
Phpfox::getComponent('photo.albums', array('bNoTemplate' => true), 'controller');
} else {
$this->template()->assign('sReq3', 'photo');
Phpfox::getComponent('photo.index', array('bNoTemplate' => true), 'controller');
}
}
示例10: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
if (Phpfox::getParam('photo.show_info_on_mouseover')) {
$this->template()->setHeader(array('index.css' => 'module_photo', 'index.js' => 'module_photo'));
}
if (defined('PHPFOX_IS_USER_PROFILE') || defined('PHPFOX_IS_PAGES_VIEW')) {
$aUser = !defined('PHPFOX_IS_PAGES_VIEW') ? $this->getParam('aUser') : $this->getParam('aPage');
$bShowPhotos = $this->request()->get('req3') != 'albums' || $this->request()->get('req4') != 'albums';
if ($this->request()->get('req3') == '' || $this->request()->get('req4') == '') {
$bShowPhotos = Phpfox::getParam('photo.in_main_photo_section_show') != 'albums';
}
if (defined('PHPFOX_IS_PAGES_VIEW')) {
$this->template()->setHeader(array('photo.css' => 'module_pages'));
if (empty($aUser['vanity_url'])) {
$aUser['user_name'] = 'pages.' . $aUser['page_id'];
} else {
$aUser['user_name'] = $aUser['vanity_url'];
}
$aUser['profile_page_id'] = 0;
$aInfo = array('total_albums' => Phpfox::callback('pages.getAlbumCount', $aUser['page_id']), 'total_photos' => Phpfox::callback('pages.getPhotoCount', $aUser['page_id']));
} else {
$aInfo = array('total_albums' => Phpfox::getService('photo.album')->getAlbumCount($aUser['user_id']), 'total_photos' => $aUser['total_photo']);
}
$bSpecialMenu = !defined('PHPFOX_IS_AJAX_CONTROLLER');
$this->template()->assign(array('bSpecialMenu' => $bSpecialMenu, 'aInfo' => $aInfo, 'bShowPhotos' => $bShowPhotos, 'sLinkPhotos' => $this->url()->makeUrl($aUser['user_name'] . '.photo.photos'), 'sLinkAlbums' => $this->url()->makeUrl($aUser['user_name'] . '.photo.albums')));
} else {
$this->template()->assign(array('bSpecialMenu' => false));
}
if (Phpfox::getParam('photo.show_info_on_mouseover') && isset($aUser['use_timeline']) && $aUser['use_timeline']) {
$this->template()->setFullSite();
}
if (!$this->request()->get('delete') && defined('PHPFOX_IS_PAGES_VIEW') && ($this->request()->get('req3') == 'albums' || $this->request()->get('req4') == 'albums')) {
Phpfox::getComponent('photo.albums', array('bNoTemplate' => true), 'controller');
return;
}
if ((defined('PHPFOX_IS_USER_PROFILE') || !defined('PHPFOX_IS_USER_PROFILE')) && $this->request()->get('req3') != 'photos' && !in_array($this->request()->get('view'), array('my', 'photos', 'pending')) && !is_numeric($this->request()->get('req2')) && Phpfox::getParam('photo.in_main_photo_section_show') == 'albums' && !$this->request()->get('delete') && !$this->request()->get('search-id')) {
Phpfox::getComponent('photo.albums', array('bNoTemplate' => true), 'controller');
return;
}
$sAssert = $this->request()->get('req4', false);
if (($this->request()->get('req3') == 'photos' || $this->request()->get('req3') == 'albums') && $sAssert == false) {
} else {
if (defined('PHPFOX_IS_USER_PROFILE') && ($sLegacyTitle = $this->request()->get('req3')) && !empty($sLegacyTitle)) {
if (($sLegacyPhoto = $this->request()->get('req4')) && !empty($sLegacyPhoto)) {
$aLegacyItem = Phpfox::getService('core')->getLegacyItem(array('field' => array('photo_id', 'title'), 'table' => 'photo', 'redirect' => 'photo', 'title' => $sLegacyPhoto));
} else {
$aLegacyItem = Phpfox::getService('core')->getLegacyItem(array('field' => array('album_id', 'name'), 'table' => 'photo_album', 'redirect' => 'photo.album', 'title' => $sLegacyTitle, 'search' => 'name_url'));
}
}
}
Phpfox::getUserParam('photo.can_view_photos', true);
if ($this->request()->get('req2') == 'category') {
$_SESSION['photo_category'] = $this->request()->get('req3');
$this->template()->setHeader(array('<script type="text/javascript"> var sPhotoCategory = "' . $this->request()->get('req3') . '"; </script>'))->assign(array('sPhotoCategory' => $this->request()->get('req3')));
} else {
$_SESSION['photo_category'] = '';
}
$aParentModule = $this->getParam('aParentModule');
if (($iRedirectId = $this->request()->getInt('redirect')) && ($aPhoto = Phpfox::getService('photo')->getForEdit($iRedirectId))) {
if ($aPhoto['group_id']) {
$aGroup = Phpfox::getService('group')->getGroup($aPhoto['group_id'], true);
$this->url()->send('group', array($aGroup['title_url'], 'photo', 'view', $aPhoto['title_url']));
} else {
$this->url()->send($aPhoto['user_name'], array('photo', $aPhoto['album_id'] ? $aPhoto['album_url'] : 'view', $aPhoto['title_url']));
}
}
if (($iRedirectAlbumId = $this->request()->getInt('aredirect')) && ($aAlbum = Phpfox::getService('photo.album')->getForEdit($iRedirectAlbumId))) {
$this->url()->send($aAlbum['user_name'], array('photo', $aAlbum['name_url']));
}
if (($iUnFeature = $this->request()->getInt('unfeature')) && Phpfox::getUserParam('photo.can_feature_photo')) {
if (Phpfox::getService('photo.process')->feature($iUnFeature, 0)) {
$this->url()->send('photo', null, Phpfox::getPhrase('photo.photo_successfully_unfeatured'));
}
}
if (empty($aParentModule) && $this->request()->get('req1') == 'pages') {
$aParentModule = array('module_id' => 'pages', 'item_id' => $this->request()->get('req2'), 'url' => Phpfox::getService('pages')->getUrl($this->request()->get('req2')));
define('PHPFOX_IS_PAGES_VIEW', true);
}
if ($aParentModule === null && $this->request()->getInt('req2') > 0) {
return Phpfox::getLib('module')->setController('photo.view');
}
if (($sLegacyTitle = $this->request()->get('req2')) && !empty($sLegacyTitle) && !is_numeric($sLegacyTitle)) {
if ((defined('PHPFOX_IS_USER_PROFILE') || defined('PHPFOX_IS_PAGES_VIEW')) && $sLegacyTitle == 'photo') {
} else {
if ($this->request()->get('req3') != '') {
$sLegacyTitle = $this->request()->get('req3');
}
$aLegacyItem = Phpfox::getService('core')->getLegacyItem(array('field' => array('category_id', 'name'), 'table' => 'photo_category', 'redirect' => 'photo.category', 'title' => $sLegacyTitle, 'search' => 'name_url'));
}
}
$bIsUserProfile = false;
if (defined('PHPFOX_IS_AJAX_CONTROLLER') || defined('PHPFOX_LOADING_DELAYED')) {
if ($this->request()->get('profile_id', null) !== null) {
$aUser = Phpfox::getService('user')->get($this->request()->get('profile_id'));
$bIsUserProfile = true;
$this->setParam('aUser', $aUser);
} else {
//.........这里部分代码省略.........
示例11: exit
*
* @copyright [PHPFOX_COPYRIGHT]
* @author Raymond Benc
* @package Phpfox
* @version $Id: token.php 7004 2013-12-20 14:23:28Z Raymond_Benc $
*/
// Make sure we are running PHP5
if (version_compare(phpversion(), '5', '<') === true) {
exit('phpFox 2 or higher requires PHP 5 or newer.');
}
ob_start();
/**
* Key to include phpFox
*
*/
define('PHPFOX', true);
/**
* Directory Seperator
*
*/
define('PHPFOX_DS', DIRECTORY_SEPARATOR);
/**
* phpFox Root Directory
*
*/
define('PHPFOX_DIR', dirname(__FILE__) . PHPFOX_DS);
define('PHPFOX_START_TIME', array_sum(explode(' ', microtime())));
// Require phpFox Init
require PHPFOX_DIR . 'include' . PHPFOX_DS . 'init.inc.php';
Phpfox::getComponent('api.token', array(), 'controller');
ob_end_flush();
示例12: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
Phpfox::getUserParam('organization.can_view_browse_organization', true);
$mId = $this->request()->getInt('req2');
if (!($aOrganization = Phpfox::getService('organization')->getForView($mId))) {
return Phpfox_Error::display(Phpfox::getPhrase('organization.the_organization_you_are_looking_for_cannot_be_found'));
}
if ($this->request()->get('req3') != '') {
$this->template()->assign(array('bRefreshPhoto' => true));
}
if (Phpfox::getUserParam('organization.can_moderate_organization') || $aOrganization['is_admin']) {
} else {
if ($aOrganization['view_id'] != '0') {
return Phpfox_Error::display(Phpfox::getPhrase('organization.the_organization_you_are_looking_for_cannot_be_found'));
}
}
if ($aOrganization['view_id'] == '2') {
return Phpfox_Error::display(Phpfox::getPhrase('organization.the_organization_you_are_looking_for_cannot_be_found'));
}
if (Phpfox::isMobile()) {
$aPageMenus = Phpfox::getService('organization')->getMenu($aOrganization);
$aFilterMenu = array();
foreach ($aPageMenus as $aPageMenu) {
$aFilterMenu[$aPageMenu['phrase']] = $aPageMenu['url'];
}
$this->template()->buildSectionMenu('organization', $aFilterMenu);
}
if (Phpfox::getUserBy('profile_organization_id') <= 0 && Phpfox::isModule('privacy')) {
Phpfox::getService('privacy')->check('organization', $aOrganization['organization_id'], $aOrganization['user_id'], $aOrganization['privacy'], isset($aOrganization['is_friend']) ? $aOrganization['is_friend'] : 0);
}
$bCanViewPage = true;
// http://www.phpfox.com/tracker/view/15190/
$sCurrentModule = Phpfox::getLib('url')->reverseRewrite($this->request()->get($this->request()->get('req1') == 'organization' ? 'req3' : 'req2'));
Phpfox::getService('organization')->buildWidgets($aOrganization['organization_id']);
if ($aOrganization['designer_style_id']) {
$this->template()->setStyle(array('style_id' => $aOrganization['designer_style_id'], 'style_folder_name' => $aOrganization['designer_style_folder'], 'theme_folder_name' => $aOrganization['designer_theme_folder'], 'theme_parent_id' => $aOrganization['theme_parent_id'], 'total_column' => $aOrganization['total_column'], 'l_width' => $aOrganization['l_width'], 'c_width' => $aOrganization['c_width'], 'r_width' => $aOrganization['r_width']));
}
($sPlugin = Phpfox_Plugin::get('organization.component_controller_view_build')) ? eval($sPlugin) : false;
$this->setParam('aParentModule', array('module_id' => 'organization', 'item_id' => $aOrganization['organization_id'], 'url' => Phpfox::getService('organization')->getUrl($aOrganization['organization_id'], $aOrganization['title'], $aOrganization['vanity_url'])));
if (isset($aOrganization['is_admin']) && $aOrganization['is_admin']) {
define('PHPFOX_IS_ORGANIZATION_ADMIN', true);
}
$sModule = $sCurrentModule;
// http://www.phpfox.com/tracker/view/15190/
if (empty($sModule) && !empty($aOrganization['landing_organization'])) {
$sModule = $aOrganization['landing_organization'];
$sCurrentModule = $aOrganization['landing_organization'];
}
($sPlugin = Phpfox_Plugin::get('organization.component_controller_view_assign')) ? eval($sPlugin) : false;
if (isset($aOrganization['use_timeline']) && $aOrganization['use_timeline']) {
$aPageMenus = Phpfox::getService('organization')->getMenu($aOrganization);
if (!defined('ORGANIZATION_TIME_LINE')) {
define('ORGANIZATION_TIME_LINE', true);
}
$aOrganization['user_name'] = $aOrganization['title'];
$this->template()->setFullSite()->assign(array('aUser' => $aOrganization, 'aProfileLinks' => $aPageMenus))->setHeader(array('<script type="text/javascript">oParams["keepContent4"] = false;</script>'));
}
$this->setParam('aOrganization', $aOrganization);
$this->template()->assign(array('aOrganization' => $aOrganization, 'sCurrentModule' => $sCurrentModule, 'bCanViewOrganization' => $bCanViewPage, 'iViewCommentId' => $this->request()->getInt('comment-id'), 'bHasPermToViewOrganizationFeed' => Phpfox::getService('organization')->hasPerm($aOrganization['organization_id'], 'organization.view_browse_updates')))->setHeader('cache', array('profile.css' => 'style_css', 'pages.css' => 'style_css', 'organization.js' => 'module_organization', 'player/flowplayer/flowplayer.js' => 'static_script'));
if (Phpfox::isMobile()) {
$this->template()->setBreadcrumb($aOrganization['title'], Phpfox::getService('organization')->getUrl($aOrganization['organization_id'], $aOrganization['title'], $aOrganization['vanity_url']), true);
}
$this->setParam('aCallbackShoutbox', array('module' => 'organization', 'item' => $aOrganization['organization_id']));
if ($bCanViewPage && $sModule != 'photo' && $sModule && Phpfox::isModule($sModule) && Phpfox::hasCallback($sModule, 'getOrganizationSubMenu') && !$this->request()->getInt('comment-id')) {
if (Phpfox::hasCallback($sModule, 'canViewOrganizationSection') && !Phpfox::callback($sModule . '.canViewOrganizationSection', $aOrganization['organization_id'])) {
return Phpfox_Error::display(Phpfox::getPhrase('organization.unable_to_view_this_section_due_to_privacy_settings'));
}
$this->template()->assign('bIsOrganizationViewSection', true);
$this->setParam('bIsOrganizationViewSection', true);
$this->setParam('sCurrentOrganizationModule', $sModule);
Phpfox::getComponent($sModule . '.index', array('bNoTemplate' => true), 'controller');
} elseif ($bCanViewPage && $sModule != 'photo' && $sModule && Phpfox::getService('organization')->isWidget($sModule) && !$this->request()->getInt('comment-id')) {
define('PHPFOX_IS_ORGANIZATION_WIDGET', true);
$this->template()->assign(array('aWidget' => Phpfox::getService('organization')->getWidget($sModule)));
} else {
$sSubController = $this->request()->get('req3');
if ($sSubController == 'info') {
return Phpfox::getComponent('organization.info', array('bNoTemplate' => true), 'controller');
} else {
if ($sSubController == 'volunteer') {
return Phpfox::getComponent('organization.volunteer', array('bNoTemplate' => true), 'controller');
} else {
if ($sSubController == 'photo') {
return Phpfox::getComponent('organization.photo', array('bNoTemplate' => true), 'controller');
}
}
}
$bCanPostComment = true;
if ($sCurrentModule == 'pending') {
$this->template()->assign('aPendingUsers', Phpfox::getService('organization')->getPendingUsers($aOrganization['organization_id']));
$this->setParam('global_moderation', array('name' => 'organization', 'ajax' => 'organization.moderation', 'menu' => array(array('phrase' => Phpfox::getPhrase('organization.delete'), 'action' => 'delete'), array('phrase' => Phpfox::getPhrase('organization.approve'), 'action' => 'approve'))));
}
if (Phpfox::getService('organization')->isAdmin($aOrganization)) {
define('PHPFOX_FEED_CAN_DELETE', true);
}
if (Phpfox::getUserId()) {
$bIsBlocked = Phpfox::getService('user.block')->isBlocked($aOrganization['user_id'], Phpfox::getUserId());
//.........这里部分代码省略.........
示例13: composeProcess
public function composeProcess()
{
Phpfox::isUser(true);
$this->errorSet('#js_ajax_compose_error_message');
$oObject = Phpfox::getComponent('mail.compose', null, 'controller');
$this->call('$(\'#\' + tb_get_active()).find(\'.js_box_content:first\').html(\'<div class="message">' . str_replace("'", "\\'", Phpfox::getPhrase('mail.your_message_was_successfully_sent')) . '</div>\'); setTimeout(\'tb_remove();\', 2000);');
}
示例14: composeProcess
public function composeProcess()
{
Phpfox::isUser(true);
$this->errorSet('#js_ajax_compose_error_message');
$oObject = Phpfox::getComponent('mail.compose', null, 'controller');
if ($oObject->getReturn())
{
$this->call('$(\'#\' + tb_get_active()).find(\'.js_box_content:first\').html(\'<div class="message">Your message was successfully sent</div>\'); setTimeout(\'tb_remove();\', 2000);');
}
}
示例15: view
public function view()
{
Phpfox::getComponent('photo.view', array(), 'controller');
$aHeaderFiles = Phpfox::getLib('template')->getHeader(true);
$aPhrases = Phpfox::getLib('template')->getPhrases();
$sLoadFiles = '';
$sEchoData = '';
foreach ($aHeaderFiles as $sHeaderFile) {
if (preg_match('/<style(.*)>(.*)<\\/style>/i', $sHeaderFile)) {
continue;
}
$sHeaderFile = strip_tags($sHeaderFile);
$sNew = preg_replace('/\\s+/', '', $sHeaderFile);
if (empty($sNew)) {
continue;
}
if (substr($sNew, 0, 13) == 'oTranslations') {
continue;
}
if (strpos($sHeaderFile, 'custom.css') !== false) {
continue;
}
$sLoadFiles .= '\'' . str_replace("'", "\\'", $sHeaderFile) . '\',';
}
$sLoadFiles = rtrim($sLoadFiles, ',');
$sContent = $this->getContent(false);
if (count($aPhrases) && is_array($aPhrases)) {
$sPhrases = '<script type="text/javascript">';
foreach ($aPhrases as $sKey => $sValue) {
$sPhrases .= 'oTranslations[\'' . $sKey . '\'] = \'' . str_replace("'", "\\'", $sValue) . '\';';
}
$sPhrases .= '</script>';
echo $sPhrases;
}
echo '<script type="text/javascript">$Core.loadStaticFiles([' . $sLoadFiles . ']);</script>';
echo $sContent;
echo '<script type="text/javascript">$Core.loadInit();</script>';
}