本文整理汇总了PHP中ossn_isLoggedin函数的典型用法代码示例。如果您正苦于以下问题:PHP ossn_isLoggedin函数的具体用法?PHP ossn_isLoggedin怎么用?PHP ossn_isLoggedin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ossn_isLoggedin函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ossn_profile
function ossn_profile()
{
//pages
ossn_register_page('u', 'profile_page_handler');
ossn_register_page('avatar', 'avatar_page_handler');
ossn_register_page('cover', 'cover_page_handler');
//css and js
ossn_extend_view('css/ossn.default', 'components/OssnProfile/css/profile');
ossn_extend_view('js/opensource.socialnetwork', 'components/OssnProfile/js/OssnProfile');
//actions
if (ossn_isLoggedin()) {
ossn_register_action('profile/photo/upload', __OSSN_PROFILE__ . 'actions/photo/upload.php');
ossn_register_action('profile/cover/upload', __OSSN_PROFILE__ . 'actions/cover/upload.php');
ossn_register_action('profile/cover/reposition', __OSSN_PROFILE__ . 'actions/cover/reposition.php');
ossn_register_action('profile/edit', __OSSN_PROFILE__ . 'actions/edit.php');
}
//callback
ossn_register_callback('page', 'load:search', 'ossn_search_users_link');
ossn_register_callback('page', 'load:profile', 'ossn_profile_load_event');
//hooks
ossn_add_hook('newsfeed', "left", 'profile_photo_newsefeed', 1);
ossn_add_hook('profile', 'subpage', 'profile_user_friends');
ossn_add_hook('search', 'type:users', 'profile_search_handler');
ossn_add_hook('profile', 'subpage', 'profile_edit_page');
ossn_add_hook('profile', 'modules', 'profile_modules');
//notifications
ossn_add_hook('notification:view', 'like:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
ossn_add_hook('notification:view', 'comments:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:29,代码来源:ossn_com.php
示例2: profile_access_validate
/**
* Profile Access Validate
*
* @return void;
* @access private;
*/
function profile_access_validate($callback, $type, $params)
{
if (!ossn_isLoggedin()) {
ossn_trigger_message(ossn_print('profile:access:error'), 'error');
redirect();
}
}
开发者ID:kreativmind,项目名称:ossn-signup-age-tool,代码行数:13,代码来源:ossn_com.php
示例3: ossn_loggedin_user
/**
* Get a logged in user entity
*
* @return object
*/
function ossn_loggedin_user()
{
if (ossn_isLoggedin()) {
return forceObject($_SESSION['OSSN_USER']);
}
return false;
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:12,代码来源:ossn.lib.users.php
示例4: ossn_photos_initialize
/**
* Initialize Photos Component
*
* @return void;
* @access private;
*/
function ossn_photos_initialize()
{
//css
ossn_extend_view('css/ossn.default', 'components/OssnPhotos/css/photos');
//js
ossn_extend_view('js/opensource.socialnetwork', 'components/OssnPhotos/js/OssnPhotos');
//hooks
ossn_add_hook('profile', 'subpage', 'ossn_profile_photos_page');
ossn_add_hook('profile', 'modules', 'profile_modules_albums');
ossn_add_hook('notification:view', 'like:entity:file:ossn:aphoto', 'ossn_notification_like_photo');
ossn_add_hook('notification:view', 'comments:entity:file:ossn:aphoto', 'ossn_notification_like_photo');
ossn_add_hook('photo:view', 'profile:controls', 'ossn_profile_photo_menu');
ossn_add_hook('photo:view', 'album:controls', 'ossn_album_photo_menu');
//actions
if (ossn_isLoggedin()) {
ossn_register_action('ossn/album/add', __OSSN_PHOTOS__ . 'actions/album/add.php');
ossn_register_action('ossn/photos/add', __OSSN_PHOTOS__ . 'actions/photos/add.php');
ossn_register_action('profile/photo/delete', __OSSN_PHOTOS__ . 'actions/photo/profile/delete.php');
ossn_register_action('photo/delete', __OSSN_PHOTOS__ . 'actions/photo/delete.php');
}
//callbacks
ossn_register_callback('page', 'load:profile', 'ossn_profile_menu_photos');
ossn_register_callback('delete', 'profile:photo', 'ossn_photos_likes_comments_delete');
ossn_register_callback('delete', 'album:photo', 'ossn_photos_likes_comments_delete');
ossn_profile_subpage('photos');
ossn_register_page('album', 'ossn_album_page_handler');
ossn_register_page('photos', 'ossn_photos_page_handler');
$url = ossn_site_url();
if (ossn_isLoggedin()) {
$user_loggedin = ossn_loggedin_user();
$icon = ossn_site_url('components/OssnPhotos/images/photos-ossn.png');
ossn_register_sections_menu('newsfeed', array('text' => ossn_print('photos:ossn'), 'url' => $user_loggedin->profileURL('/photos'), 'section' => 'links', 'icon' => $icon));
}
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:40,代码来源:ossn_com.php
示例5: ossn_notifications
/**
* Initialize Notification Component
*
* @return void;
* @access private
*/
function ossn_notifications()
{
//css
ossn_extend_view('css/ossn.default', 'css/notifications');
//js
ossn_extend_view('js/opensource.socialnetwork', 'js/OssnNotifications');
//pages
ossn_register_page('notification', 'ossn_notification_page');
ossn_register_page('notifications', 'ossn_notifications_page');
//callbacks
ossn_register_callback('like', 'created', 'ossn_notification_like');
ossn_register_callback('wall', 'post:created', 'ossn_notification_walltag');
ossn_register_callback('annotations', 'created', 'ossn_notification_annotation');
ossn_register_callback('user', 'delete', 'ossn_user_notifications_delete');
//hooks
ossn_add_hook('notification:add', 'comments:post', 'ossn_notificaiton_comments_post_hook');
ossn_add_hook('notification:add', 'like:post', 'ossn_notificaiton_comments_post_hook');
ossn_add_hook('notification:add', 'like:annotation', 'ossn_notificaiton_like_annotation_hook');
ossn_add_hook('notification:add', 'comments:entity', 'ossn_notificaiton_comment_entity_hook');
ossn_add_hook('notification:add', 'like:entity', 'ossn_notificaiton_comment_entity_hook');
//tag post with a friend, doesn't show in friend's notification #589
ossn_add_hook('notification:add', 'wall:friends:tag', 'ossn_notificaiton_walltag_hook');
if (ossn_isLoggedin()) {
ossn_extend_view('ossn/js/head', 'notifications/js/autocheck');
ossn_register_action('notification/mark/allread', __OSSN_NOTIF__ . 'actions/markread.php');
}
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:33,代码来源:ossn_com.php
示例6: ossn_groups
/**
* Initialize Groups Component
*
* @return void;
* @access private
*/
function ossn_groups()
{
//group css
ossn_extend_view('css/ossn.default', 'css/groups');
//group js
ossn_extend_view('js/opensource.socialnetwork', 'js/groups');
//group pages
ossn_register_page('group', 'ossn_group_page');
ossn_register_page('groups', 'ossn_groups_page');
ossn_group_subpage('members');
ossn_group_subpage('edit');
ossn_group_subpage('requests');
//group hooks
ossn_add_hook('group', 'subpage', 'group_members_page');
ossn_add_hook('group', 'subpage', 'group_edit_page');
ossn_add_hook('group', 'subpage', 'group_requests_page');
ossn_add_hook('newsfeed', "left", 'ossn_add_groups_to_newfeed');
ossn_add_hook('search', 'type:groups', 'groups_search_handler');
ossn_add_hook('notification:add', 'comments:post:group:wall', 'ossn_notificaiton_groups_comments_hook');
ossn_add_hook('notification:add', 'like:post:group:wall', 'ossn_notificaiton_groups_comments_hook');
ossn_add_hook('notification:view', 'group:joinrequest', 'ossn_group_joinrequest_notification');
//group actions
if (ossn_isLoggedin()) {
ossn_register_action('group/add', __OSSN_GROUPS__ . 'actions/group/add.php');
ossn_register_action('group/edit', __OSSN_GROUPS__ . 'actions/group/edit.php');
ossn_register_action('group/join', __OSSN_GROUPS__ . 'actions/group/join.php');
ossn_register_action('group/delete', __OSSN_GROUPS__ . 'actions/group/delete.php');
ossn_register_action('group/member/approve', __OSSN_GROUPS__ . 'actions/group/member/request/approve.php');
ossn_register_action('group/member/cancel', __OSSN_GROUPS__ . 'actions/group/member/request/cancel.php');
ossn_register_action('group/member/decline', __OSSN_GROUPS__ . 'actions/group/member/request/decline.php');
ossn_register_action('group/cover/upload', __OSSN_GROUPS__ . 'actions/group/cover/upload.php');
ossn_register_action('group/cover/reposition', __OSSN_GROUPS__ . 'actions/group/cover/reposition.php');
}
//callbacks
ossn_register_callback('page', 'load:group', 'ossn_group_load_event');
ossn_register_callback('page', 'load:profile', 'ossn_profile_load_event');
ossn_register_callback('page', 'load:search', 'ossn_group_search_link');
ossn_register_callback('user', 'delete', 'ossn_user_groups_delete');
//group list in newsfeed sidebar mebu
$groups_user = ossn_get_user_groups(ossn_loggedin_user());
if ($groups_user) {
foreach ($groups_user as $group) {
$icon = ossn_site_url('components/OssnGroups/images/group.png');
ossn_register_sections_menu('newsfeed', array('text' => $group->title, 'url' => ossn_group_url($group->guid), 'section' => 'groups', 'icon' => $icon));
unset($icon);
}
}
//add gorup link in sidebar
ossn_register_sections_menu('newsfeed', array('text' => ossn_print('add:group'), 'url' => 'javascript::;', 'params' => array('id' => 'ossn-group-add'), 'section' => 'groups', 'icon' => ossn_site_url('components/OssnGroups/images/add.png')));
//my groups link
/* ossn_register_sections_menu('newsfeed', array(
'text' => 'My Groups',
'url' => 'javascript::;',
'section' => 'groups',
'icon' => ossn_site_url('components/OssnGroups/images/manages.png')
));*/
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:63,代码来源:ossn_com.php
示例7: verified_account_init
function verified_account_init()
{
if (ossn_isLoggedin()) {
ossn_register_action('verified/user', __OSSN_VERIF__ . 'actions/user/verified.php');
ossn_register_action('unverify/user', __OSSN_VERIF__ . 'actions/user/unverify.php');
}
ossn_extend_view('css/ossn.default', 'css/verified-account');
ossn_extend_view('js/opensource.socialnetwork', 'js/jquery.tipsy');
}
开发者ID:sathish4fri,项目名称:verified-account,代码行数:9,代码来源:ossn_com.php
示例8: blog_init
function blog_init()
{
if (ossn_isLoggedin()) {
ossn_register_action('blog/add', BLOG . 'actions/add.php');
ossn_register_action('blog/edit', BLOG . 'actions/edit.php');
ossn_register_action('blog/delete', BLOG . 'actions/delete.php');
}
ossn_register_callback('page', 'load:search', 'ossn_blpg_search_link');
ossn_register_callback('user', 'delete', 'ossn_user_blog_delete');
}
开发者ID:sathish4fri,项目名称:Blog,代码行数:10,代码来源:ossn_com.php
示例9: ossn_invite_pagehandler
/**
* Invite page handler
*
* @note Please don't call this function directly in your code.
*
* @return mixed
* @access private
*/
function ossn_invite_pagehandler()
{
if (!ossn_isLoggedin()) {
ossn_error_page();
}
$title = ossn_print('com:ossn:invite:friends');
$contents['content'] = ossn_view('components/OssnInvite/pages/invite');
$content = ossn_set_page_layout('newsfeed', $contents);
echo ossn_view_page($title, $content);
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:18,代码来源:ossn_com.php
示例10: severpages
function severpages($pages)
{
if (!ossn_isLoggedin()) {
ossn_error_page();
}
$title = ossn_print('com:ossn:severload');
//give a exact path to file <components/serverpages/pages/serverload>
$contents['content'] = ossn_view('components/serverpages/pages/severload');
$content = ossn_set_page_layout('contents', $contents);
echo ossn_view_page($title, $content);
}
开发者ID:alexmwiti,项目名称:componets,代码行数:11,代码来源:ossn_com.php
示例11: ossn_block
/**
* Initialize the block component.
*
* @return void;
* @access private;
*/
function ossn_block()
{
//callbacks
ossn_register_callback('page', 'load:profile', 'ossn_user_block_menu', 100);
//hooks
ossn_add_hook('page', 'load', 'ossn_user_block');
//actions
if (ossn_isLoggedin()) {
ossn_register_action('block/user', __OSSN_BLOCK__ . 'actions/user/block.php');
ossn_register_action('unblock/user', __OSSN_BLOCK__ . 'actions/user/unblock.php');
}
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:18,代码来源:ossn_com.php
示例12: ossn_poke
/**
* Initialize the poke component.
*
* @return void;
* @access private;
*/
function ossn_poke()
{
//css
ossn_extend_view('css/ossn.default', 'components/OssnPoke/css/poke');
//actions
if (ossn_isLoggedin()) {
ossn_register_action('poke/user', __OSSN_POKE__ . 'actions/user/poke.php');
}
//hooks
ossn_add_hook('notification:view', 'ossnpoke:poke', 'ossn_poke_notification');
//profile menu
ossn_register_callback('page', 'load:profile', 'ossn_user_poke_menu', 1);
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:19,代码来源:ossn_com.php
示例13: ossn_likes
/**
* Initialize Likes Component
*
* @return void;
* @access private
*/
function ossn_likes()
{
if (ossn_isLoggedin()) {
ossn_register_action('post/like', __OSSN_LIKES__ . 'actions/post/like.php');
ossn_register_action('post/unlike', __OSSN_LIKES__ . 'actions/post/unlike.php');
ossn_register_action('annotation/like', __OSSN_LIKES__ . 'actions/annotation/like.php');
ossn_register_action('annotation/unlike', __OSSN_LIKES__ . 'actions/annotation/unlike.php');
}
ossn_extend_view('js/opensource.socialnetwork', 'components/OssnLikes/js/OssnLikes');
ossn_extend_view('css/ossn.default', 'components/OssnLikes/css/likes');
ossn_register_callback('post', 'delete', 'ossn_post_like_delete');
ossn_register_callback('comment', 'delete', 'ossn_comment_like_delete');
ossn_register_callback('annotation', 'delete', 'ossn_comment_like_delete');
ossn_register_callback('user', 'delete', 'ossn_user_likes_delete');
ossn_register_page('likes', 'ossn_likesview_page_handler');
ossn_add_hook('notification:view', 'like:annotation', 'ossn_like_annotation');
ossn_add_hook('post', 'likes', 'ossn_post_likes');
ossn_add_hook('post', 'likes:entity', 'ossn_post_likes_entity');
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:25,代码来源:ossn_com.php
示例14: option_trips_init
function option_trips_init()
{
//Hooks
ossn_add_hook('profile', 'modules', 'profile_modules_trips');
//Funció pq aparegui el modul inferior "profile_modules_trips($hook, $type, $module, $params)"
ossn_add_hook('profile', 'subpage', 'profile_trips_page');
//Actions
ossn_register_action('optiontrips/getmaptrips', __OSSN_TRIPS__ . 'actions/map/get.php');
//Registre petició lat. long. mapa perfil
ossn_register_action('trip/addPhoto', __OSSN_TRIPS__ . 'actions/addPhoto.php');
//Acció per afegir les fotos en el formulari de viatges
//Callbacks
ossn_register_callback('page', 'load:profile', 'profile_menu_trips');
//Afageix en el menú de navegació superior la opció viatges
ossn_register_page('trip', 'trip_page_handler');
//CSS i JS
//Afegir capçalera styles i scripts
ossn_extend_view('css/ossn.default', 'css/trips-style');
//Registre JS
ossn_new_js('trips', 'js/OptionTrips');
//Carrega JS extern
ossn_load_external_js('maps.google');
//Carrega API Google
//ossn_load_js('mapa.viatgers');
if (ossn_isLoggedin()) {
//Si ha iniciat sessió apreix les diferents accions
//ossn_extend_view('js/opensource.socialnetwork', 'js/OptionTrips');
ossn_load_js('trips');
ossn_register_action('trips/add', __OSSN_TRIPS__ . 'actions/add.php');
//Afageix un nou viatge a la base de dades
}
ossn_profile_subpage('trips');
ossn_register_page('trip', 'trip_page_handler');
$url = ossn_site_url();
if (ossn_isLoggedin()) {
//Si ha iniciat sessió
$user_loggedin = ossn_loggedin_user();
//URL actual de l'usuari
$icon = ossn_site_url('components/OptionTrips/images/live_logo.png');
//Afegir enllaç menú sidebar(left)
ossn_register_sections_menu('newsfeed', array('text' => ossn_print('trips:ossn'), 'url' => $user_loggedin->profileURL('/trips'), 'section' => 'links', 'icon' => $icon));
}
}
开发者ID:tricotrin,项目名称:OptionTrips,代码行数:43,代码来源:ossn_com.php
示例15: ossn_friend_picker
/**
* Friends Picker
*
* @return false|null|mixed data
* @access public
*/
function ossn_friend_picker()
{
header('Content-Type: application/json');
if (!ossn_isLoggedin()) {
exit;
}
$user = new OssnUser();
$friends = $user->getFriends(ossn_loggedin_user()->guid);
if (!$friends) {
return false;
}
foreach ($friends as $users) {
$p['first_name'] = $users->first_name;
$p['last_name'] = $users->last_name;
$p['imageurl'] = ossn_site_url("avatar/{$users->username}/smaller");
$p['id'] = $users->guid;
$usera[] = $p;
}
echo json_encode($usera);
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:26,代码来源:ossn_com.php
示例16: ossn_profile
/**
* Initialize Profile Component
*
* @return void;
* @access private;
*/
function ossn_profile()
{
//pages
ossn_register_page('u', 'profile_page_handler');
ossn_register_page('avatar', 'avatar_page_handler');
ossn_register_page('cover', 'cover_page_handler');
//css and js
ossn_extend_view('css/ossn.default', 'css/profile');
ossn_extend_view('js/opensource.socialnetwork', 'js/OssnProfile');
//actions
if (ossn_isLoggedin()) {
ossn_register_action('profile/photo/upload', __OSSN_PROFILE__ . 'actions/photo/upload.php');
ossn_register_action('profile/cover/upload', __OSSN_PROFILE__ . 'actions/cover/upload.php');
ossn_register_action('profile/cover/reposition', __OSSN_PROFILE__ . 'actions/cover/reposition.php');
ossn_register_action('profile/edit', __OSSN_PROFILE__ . 'actions/edit.php');
ossn_register_menu_item('topbar_dropdown', array('name' => 'account_settings', 'text' => ossn_print('account:settings'), 'href' => ossn_loggedin_user()->profileURL('/edit')));
}
//callback
ossn_register_callback('page', 'load:search', 'ossn_search_users_link');
ossn_register_callback('page', 'load:profile', 'ossn_profile_load_event');
ossn_register_callback('delete', 'profile:photo', 'ossn_profile_delete_photo_wallpost');
ossn_register_callback('delete', 'profile:cover:photo', 'ossn_profile_delete_photo_wallpost');
//hooks
ossn_add_hook('newsfeed', "sidebar:left", 'profile_photo_newsefeed', 1);
ossn_add_hook('profile', 'subpage', 'profile_user_friends');
ossn_add_hook('search', 'type:users', 'profile_search_handler');
ossn_add_hook('profile', 'subpage', 'profile_edit_page');
ossn_add_hook('profile', 'modules', 'profile_modules');
ossn_add_hook('wall:template', 'profile:photo', 'ossn_wall_profile_photo');
ossn_add_hook('wall:template', 'cover:photo', 'ossn_wall_profile_cover_photo');
//notifications
ossn_add_hook('notification:view', 'like:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
ossn_add_hook('notification:view', 'comments:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
//subpages of profile
ossn_profile_subpage('friends');
ossn_profile_subpage('edit');
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:43,代码来源:ossn_com.php
示例17: ossn_display_system_messages
?>
vendors/jquery/jquery.tokeninput.js"></script>
</head>
<body>
<div class="ossn-halt ossn-light"></div>
<div class="ossn-message-box"></div>
<div class="ossn-viewer" style="display:none"></div>
<div class="ossn-system-messages">
<?php
echo ossn_display_system_messages();
?>
</div>
<?php
if (!ossn_isLoggedin()) {
?>
<div class="ossn-header">
<div class="inner">
<a href="<?php
echo ossn_site_url();
?>
">
<div class="ossn-logo"></div>
</a>
<?php
echo ossn_view_form('login', array('id' => 'ossn-header-login', 'action' => ossn_site_url('action/user/login'), 'method' => 'post'));
?>
</div>
</div>
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:31,代码来源:page.php
示例18: ossn_messages_page
function ossn_messages_page($pages)
{
if (!ossn_isLoggedin()) {
ossn_error_page();
}
$OssnMessages = new OssnMessages();
$page = $pages[0];
if (empty($page)) {
$page = 'messages';
}
switch ($page) {
case 'message':
$username = $pages[1];
if (!empty($username)) {
$user = ossn_user_by_username($username);
if (empty($user->guid)) {
ossn_error_page();
}
$title = ossn_print('ossn:message:between', array($user->fullname));
$OssnMessages->markViewed($user->guid, ossn_loggedin_user()->guid);
$params['data'] = $OssnMessages->get(ossn_loggedin_user()->guid, $user->guid);
$params['user'] = $user;
$params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid);
$contents = array('content' => ossn_plugin_view('messages/pages/view', $params));
$content = ossn_set_page_layout('media', $contents);
echo ossn_view_page($title, $content);
} else {
ossn_error_page();
}
break;
case 'all':
$params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid);
$active = $params['recent'][0];
if (isset($active->message_to) && $active->message_to == ossn_loggedin_user()->guid) {
$getuser = $active->message_from;
}
if (isset($active->message_from) && $active->message_from == ossn_loggedin_user()->guid) {
$getuser = $active->message_to;
}
if (isset($getuser)) {
$user = ossn_user_by_guid($getuser);
$OssnMessages->markViewed($getuser, ossn_loggedin_user()->guid);
$params['data'] = $OssnMessages->get(ossn_loggedin_user()->guid, $getuser);
$params['user'] = $user;
}
$contents = array('content' => ossn_plugin_view('messages/pages/messages', $params));
if (!isset($getuser)) {
$contents = array('content' => ossn_plugin_view('messages/pages/messages-none'));
}
$title = ossn_print('messages');
$content = ossn_set_page_layout('media', $contents);
echo ossn_view_page($title, $content);
break;
case 'getnew':
$username = $pages[1];
$guid = ossn_user_by_username($username)->guid;
$messages = $OssnMessages->getNew($guid, ossn_loggedin_user()->guid);
if ($messages) {
foreach ($messages as $message) {
$user = ossn_user_by_guid($message->message_from);
$message = $message->message;
$params['user'] = $user;
$params['message'] = $message;
echo ossn_plugin_view('messages/templates/message-send', $params);
}
$OssnMessages->markViewed($guid, ossn_loggedin_user()->guid);
echo '<script>Ossn.playSound();</script>';
}
break;
case 'getrecent':
$params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid);
echo ossn_plugin_view('messages/templates/message-with', $params);
break;
default:
ossn_error_page();
break;
}
}
开发者ID:sthefanysoares,项目名称:Social-Network,代码行数:78,代码来源:ossn_com.php
示例19: foreach
<?php
/**
* Open Source Social Network
*
* @package (Informatikon.com).ossn
* @author OSSN Core Team <[email protected]>
* @copyright 2014 iNFORMATIKON TECHNOLOGIES
* @license General Public Licence http://www.opensource-socialnetwork.org/licence
* @link http://www.opensource-socialnetwork.org/licence
*/
$entityextra = $params['menu'];
if ($entityextra && ossn_isLoggedin()) {
if (!empty($entityextra)) {
foreach ($entityextra as $menu) {
foreach ($menu as $link) {
$class = "entity-menu-extra-" . $link['name'];
if (isset($link['class'])) {
$link['class'] = $class . ' ' . $link['class'];
} else {
$link['class'] = $class;
}
unset($link['name']);
$link = ossn_plugin_view('output/url', $link);
echo $link;
}
}
}
}
开发者ID:ntmtri23,项目名称:lienminh365,代码行数:29,代码来源:entityextra.php
示例20: ossn_comment_page
/**
* Comment page for viewing comment photos
*
* @access private;
*/
function ossn_comment_page($pages)
{
$page = $pages[0];
switch ($page) {
case 'image':
if (!empty($pages[1]) && !empty($pages[2])) {
$file = ossn_get_userdata("annotation/{$pages[1]}/comment/photo/{$pages[2]}");
header('Content-Type: image/jpeg');
if (is_file($file)) {
echo ossn_resize_image($file, 300, 300);
} else {
ossn_error_page();
}
} else {
ossn_error_page();
}
break;
case 'attachment':
header('Content-Type: application/json');
if (isset($_FILES['file']['tmp_name']) && ossn_isLoggedin()) {
$file = $_FILES['file']['tmp_name'];
$unique = time() . '-' . substr(md5(time()), 0, 6) . '.jpg';
$newfile = ossn_get_userdata("tmp/photos/{$unique}");
$dir = ossn_get_userdata("tmp/photos/");
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}
if (move_uploaded_file($file, $newfile)) {
$file = base64_encode(ossn_string_encrypt($newfile));
echo json_encode(array('file' => base64_encode($file), 'type' => 1));
exit;
}
}
echo json_encode(array('type' => 0));
break;
case 'staticimage':
$image = base64_decode(input('image'));
if (!empty($image)) {
$file = ossn_string_decrypt(base64_decode($image));
header('content-type: image/jpeg');
$file = rtrim(ossn_validate_filepath($file), '/');
if (is_file($file)) {
echo file_get_contents($file);
} else {
ossn_error_page();
}
} else {
ossn_error_page();
}
break;
}
}
开发者ID:emnaborgi,项目名称:RS,代码行数:57,代码来源:ossn_com.php
注:本文中的ossn_isLoggedin函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论