本文整理汇总了PHP中ossn_print函数的典型用法代码示例。如果您正苦于以下问题:PHP ossn_print函数的具体用法?PHP ossn_print怎么用?PHP ossn_print使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ossn_print函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ossn_trigger_message
$add->gender = $user['gender'];
$add->birthdate = $user['birthdate'];
$add->usertype = $user['type'];
if (!$add->isUsername($user['username'])) {
ossn_trigger_message(ossn_print('username:error'), 'error');
redirect(REF);
}
if (!$add->isPassword()) {
ossn_trigger_message(ossn_print('password:error'), 'error');
redirect(REF);
}
if ($add->isOssnUsername()) {
ossn_trigger_message(ossn_print('username:inuse'), 'error');
redirect(REF);
}
if ($add->isOssnEmail()) {
ossn_trigger_message(ossn_print('email:inuse'), 'error');
redirect(REF);
}
//check if email is valid email
if (!$add->isEmail()) {
ossn_trigger_message(ossn_print('email:invalid'), 'error');
redirect(REF);
}
if ($add->addUser()) {
ossn_trigger_message(ossn_print('account:created'), 'success');
redirect(REF);
} else {
ossn_trigger_message(ossn_print('account:create:error:admin'), 'error');
redirect(REF);
}
示例2: ossn_search_page
function ossn_search_page($pages)
{
$page = $pages[0];
if (empty($page)) {
$page = 'search';
}
ossn_trigger_callback('page', 'load:search');
switch ($page) {
case 'search':
$query = input('q');
$type = input('type');
$title = ossn_print("search:result", array($query));
if (empty($type)) {
$params['type'] = 'users';
} else {
$params['type'] = $type;
}
$type = $params['type'];
if (ossn_is_hook('search', "type:{$type}")) {
$contents['contents'] = ossn_call_hook('search', "type:{$type}", array('q' => input('q')));
}
$contents = array('content' => ossn_plugin_view('search/pages/search', $contents));
$content = ossn_set_page_layout('search', $contents);
echo ossn_view_page($title, $content);
break;
default:
ossn_error_page();
break;
}
}
示例3: 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();
}
}
示例4: profile_about_user_page
/**
* Register user about page
*
* @return string
*/
function profile_about_user_page($hook, $type, $return, $params)
{
$page = $params['subpage'];
if ($page == 'about') {
$content = ossn_plugin_view('profile/about', $params);
echo ossn_set_page_layout('module', array('title' => ossn_print('aboutuser'), 'content' => $content));
}
}
示例5: 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);
}
示例6: ossn_user_block_menu
/**
* User block menu item in profile.
*
* @return void;
* @access private;
*/
function ossn_user_block_menu($name, $type, $params)
{
$user = ossn_user_by_guid(ossn_get_page_owner_guid());
if (OssnBlock::isBlocked(ossn_loggedin_user(), $user)) {
$unblock = ossn_site_url("action/unblock/user?user={$user->guid}", true);
ossn_register_menu_link('block', ossn_print('user:unblock'), $unblock, 'profile_extramenu');
} else {
$block = ossn_site_url("action/block/user?user={$user->guid}", true);
ossn_register_menu_link('block', ossn_print('user:block'), $block, 'profile_extramenu');
}
}
示例7: 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);
}
示例8: ossn_site_pages
function ossn_site_pages($pages)
{
$page = $pages[0];
if (empty($page)) {
redirect(REF);
}
$OssnSitePages = new OssnSitePages();
switch ($page) {
case 'about':
$OssnSitePages->pagename = 'about';
$OssnSitePages = $OssnSitePages->getPage();
if (isset($OssnSitePages->description)) {
$params['contents'] = html_entity_decode(html_entity_decode($OssnSitePages->description));
}
$params['title'] = ossn_print('site:about');
$title = $params['title'];
$contents = array('content' => ossn_view('components/OssnSitePages/pages/page', $params));
$content = ossn_set_page_layout('contents', $contents);
echo ossn_view_page($title, $content);
break;
case 'terms':
$OssnSitePages->pagename = 'terms';
$OssnSitePages = $OssnSitePages->getPage();
if (isset($OssnSitePages->description)) {
$params['contents'] = html_entity_decode(html_entity_decode($OssnSitePages->description));
}
$params['title'] = ossn_print('site:terms');
$title = $params['title'];
$contents = array('content' => ossn_view('components/OssnSitePages/pages/page', $params));
$content = ossn_set_page_layout('contents', $contents);
echo ossn_view_page($title, $content);
break;
case 'privacy':
$OssnSitePages->pagename = 'privacy';
$OssnSitePages = $OssnSitePages->getPage();
if (isset($OssnSitePages->description)) {
$params['contents'] = html_entity_decode(html_entity_decode($OssnSitePages->description));
}
$params['title'] = ossn_print('site:privacy');
$title = $params['title'];
$contents = array('content' => ossn_view('components/OssnSitePages/pages/page', $params));
$content = ossn_set_page_layout('contents', $contents);
echo ossn_view_page($title, $content);
break;
default:
ossn_error_page();
break;
}
}
示例9: ossn_poke_notification
/**
* User notification menu item
*
* @return void;
* @access private;
*/
function ossn_poke_notification($name, $type, $return, $params)
{
$notif = $params;
$baseurl = ossn_site_url();
$user = ossn_user_by_guid($notif->poster_guid);
$user->fullname = "<strong>{$user->fullname}</strong>";
$img = "<div class='notification-image'><img src='{$baseurl}avatar/{$user->username}/small' /></div>";
$type = 'poke';
$type = "<div class='ossn-notification-icon-poke'></div>";
if ($notif->viewed !== NULL) {
$viewed = '';
} elseif ($notif->viewed == NULL) {
$viewed = 'class="ossn-notification-unviewed"';
}
$url = $user->profileURL();
$notification_read = "{$baseurl}notification/read/{$notif->guid}?notification=" . urlencode($url);
return "<a href='{$notification_read}'>\n\t <li {$viewed}> {$img} \n\t\t <div class='notfi-meta'> {$type}\n\t\t <div class='data'>" . ossn_print("ossn:notifications:{$notif->type}", array($user->fullname)) . '</div>
</div></li>';
}
示例10: sendInvitation
/**
* Send emails to provided addresses
*
* @return bool;
*/
public function sendInvitation()
{
$email = $this->address;
$message = strip_tags($this->message);
$message = html_entity_decode($message, ENT_QUOTES, "UTF-8");
$message = ossn_restore_new_lines($message);
$user = ossn_loggedin_user();
if (!isset($user->guid) || empty($email)) {
return false;
}
$site = ossn_site_settings('site_name');
$url = ossn_site_url();
if (empty($message)) {
$params = array($url, $user->profileURL(), $user->fullname);
$message = ossn_print('com:ossn:invite:mail:message:default', $params);
} else {
$params = array($site, $user->fullname, $message, $url, $user->profileURL());
$message = ossn_print("com:ossn:invite:mail:message", $params);
}
$subject = ossn_print("com:ossn:invite:mail:subject", array($site));
return $this->NotifiyUser($email, $subject, $message);
}
示例11: ossn_trigger_upgrades
/**
* Trigger upgrade / Run upgrade
*
* @return void;
* @access private
*/
function ossn_trigger_upgrades()
{
if (!ossn_isAdminLoggedin()) {
ossn_error_page();
}
$upgrades = ossn_get_process_upgrade_files();
if (!is_array($upgrades) || empty($upgrades)) {
ossn_trigger_message(ossn_print('upgrade:not:available'), 'error', 'admin');
redirect('administrator');
return false;
}
foreach ($upgrades as $upgrade) {
$file = ossn_route()->upgrade . "upgrades/{$upgrade}";
if (!(include_once $file)) {
throw new exception(ossn_print('upgrade:file:load:error'));
}
}
//need to reset cache files
if (ossn_site_settings('cache') !== 0) {
ossn_trigger_css_cache();
ossn_trigger_js_cache();
}
return true;
}
示例12: elseif
} elseif ($group->membership == OSSN_PRIVATE) {
$close = 'selected';
$open = '';
}
?>
<option value='2' <?php
echo $open;
?>
> <?php
echo ossn_print('public');
?>
</option>
<option value='1' <?php
echo $close;
?>
> <?php
echo ossn_print('close');
?>
</option>
</select>
<input type="hidden" name="group" value="<?php
echo $group->guid;
?>
"/>
<input type="submit" value="<?php
echo ossn_print('save');
?>
" class="ossn-button ossn-button-submit"/>
<?php
echo ossn_plugin_view('output/url', array('text' => ossn_print('delete'), 'href' => ossn_site_url("action/group/delete?guid={$group->guid}"), 'class' => 'button-grey delete-group ossn-make-sure', 'action' => true));
示例13: ossn_print
?>
</div>
<div class="message-form">
<form action="#" class="message-form-form" id="message-send-<?php
echo $params['user']->guid;
?>
"
method="post">
<textarea name="message" placeholder='Enter text here'></textarea>
<input type="hidden" name="to" value="<?php
echo $params['user']->guid;
?>
"/>
<div class="controls">
<input type="submit" value="<?php
echo ossn_print('send');
?>
"/>
</div>
</form>
</div>
</div>
</div>
<audio id="ossn-chat-sound" src="<?php
echo ossn_site_url("components/OssnMessages/sound/pling.mp3");
?>
"
preload="auto"></audio>
示例14: ossn_user_by_guid
<?php
/**
* Open Source Social Network
*
* @package (Informatikon.com).ossn
* @author OSSN Core Team <info@opensource-socialnetwork.org>
* @copyright 2014 iNFORMATIKON TECHNOLOGIES
* @license General Public Licence http://www.opensource-socialnetwork.org/licence
* @link http://www.opensource-socialnetwork.org/licence
*/
$user = ossn_user_by_guid(input('guid'));
if (!$user) {
ossn_trigger_message(ossn_print('admin:user:validate:error'), 'error');
redirect(REF);
}
$code = $user->activation;
if ($user->ValidateRegistration($code)) {
ossn_trigger_message(ossn_print('admin:user:validated'));
} else {
ossn_trigger_message(ossn_print('admin:user:validate:error'), 'error');
}
redirect(REF);
示例15: ossn_print
<?php
/**
* Open Source Social Network
*
* @package (Informatikon.com).ossn
* @author OSSN Core Team <info@opensource-socialnetwork.org>
* @copyright 2014 iNFORMATIKON TECHNOLOGIES
* @license General Public Licence http://www.opensource-socialnetwork.org/licence
* @link http://www.opensource-socialnetwork.org/licence
*/
$menus = $params['menu'];
echo "<div class='ossn-menu-search'>";
echo '<div class="title">' . ossn_print('result:type') . '</div>';
foreach ($menus as $menu => $val) {
foreach ($val as $link) {
$menu = str_replace(':', '-', $link['text']);
$icon = ossn_site_url() . "components/OssnSearch/images/{$menu}.png";
$text = ossn_print($link['text']);
$link = $link['href'];
echo "<li><a href='{$link}'>\n\t\t<img src='{$icon}' /> \n\t\t<div class='text'>{$text}</div>\n\t\t</a>\n\t\t</li>";
}
}
echo '</div>';