当前位置: 首页>>代码示例>>PHP>>正文


PHP ossn_trigger_message函数代码示例

本文整理汇总了PHP中ossn_trigger_message函数的典型用法代码示例。如果您正苦于以下问题:PHP ossn_trigger_message函数的具体用法?PHP ossn_trigger_message怎么用?PHP ossn_trigger_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ossn_trigger_message函数的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);
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:31,代码来源:add.php

示例2: ossn_trigger_upgrades

/**
 * Trigger upgrade / Run upgrade
 *
 * @return void;
 * @access private
 */
function ossn_trigger_upgrades()
{
    if (!ossn_isAdminLoggedin()) {
        ossn_kill_upgrading();
        ossn_error_page();
    }
    $upgrades = ossn_get_process_upgrade_files();
    if (!is_array($upgrades) || empty($upgrades)) {
        ossn_trigger_message(ossn_print('upgrade:not:available'), 'error');
        ossn_kill_upgrading();
        redirect('administrator');
    }
    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;
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:31,代码来源:ossn.lib.upgrade.php

示例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();
    }
}
开发者ID:kreativmind,项目名称:ossn-signup-age-tool,代码行数:13,代码来源:ossn_com.php

示例4: ossn_uservalidate_pagehandler

/**
 * Register a uservalidation page
 * @pages:
 *       uservalidate,
 *
 * @return bool
 */
function ossn_uservalidate_pagehandler($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        echo ossn_error_page();
    }
    switch ($page) {
        case 'activate':
            if (!empty($pages[1]) && !empty($pages[2])) {
                $user = new OssnUser();
                $user->guid = $pages[1];
                if ($user->ValidateRegistration($pages[2])) {
                    ossn_trigger_message(ossn_print('user:account:validated'), 'success');
                    redirect();
                } else {
                    ossn_trigger_message(ossn_print('user:account:validate:fail'), 'success');
                    redirect();
                }
            }
            break;
    }
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:29,代码来源:ossn.lib.users.php

示例5: input

$days = input('num_days');
if (!empty($days)) {
    for ($x = 1; $x <= $days; $x++) {
        $paramDay[$x]['from'] = input("from-" . $x . "");
        $paramDay[$x]['to'] = input("to-" . $x . "");
    }
} else {
    $paramDay[0]['from'] = input('from-1');
    $paramDay[0]['to'] = input('to-1');
}
if ($add->setTrip($params)) {
    $setDay = true;
    // if(!empty($paramDay[0]['from'])) { //Si existeix el vector
    $idTrip = $add->getLastTrip()->id_trip;
    //Recull id viatge inserit
    //Inserta itinerari
    foreach ($paramDay as $dayValues) {
        $add->setTripDay($idTrip, $dayValues);
    }
    // }
    if ($setDay) {
        ossn_trigger_message(ossn_print('form:trip:add:created'), 'success');
        redirect(REF);
    } else {
        ossn_trigger_message(ossn_print('form:trip:create:fail'), 'error');
        redirect(REF);
    }
} else {
    ossn_trigger_message(ossn_print('form:trip:create:fail'), 'error');
    redirect(REF);
}
开发者ID:tricotrin,项目名称:OptionTrips,代码行数:31,代码来源:add.php

示例6: OssnAds

<?php

/**
 * Open Source Social Network
 *
 * @package   Open Source Social Network
 * @author    Open Social Website Core Team <info@informatikon.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$delete = new OssnAds();
$entites = $_REQUEST['entites'];
foreach ($entites as $entity) {
    $entity = get_ad_entity((int) $entity);
    if (empty($entity->guid)) {
        ossn_trigger_message(ossn_print('ad:delete:fail'), 'error');
    } else {
        if (!$delete->deleteAd($entity->guid)) {
            ossn_trigger_message(ossn_print('ad:delete:fail'), 'error');
        } else {
            ossn_trigger_message(ossn_print('ad:deleted', array($entity->title)), 'success');
        }
    }
}
redirect(REF);
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:26,代码来源:delete.php

示例7: OssnGroup

<?php

/**
 * Open Source Social Network
 *
 * @packageOpen Source Social Network
 * @author    Open Social Website Core Team <info@informatikon.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$add = new OssnGroup();
$group = input('group');
if (empty($group)) {
    ossn_trigger_message(ossn_print('member:add:error'), 'error');
    redirect(REF);
}
if ($add->sendRequest(ossn_loggedin_user()->guid, $group)) {
    ossn_trigger_message(ossn_print('memebership:sent'), 'success');
    redirect("group/{$group}");
} else {
    ossn_trigger_message(ossn_print('memebership:sent:fail'), 'error');
    redirect(REF);
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:24,代码来源:join.php

示例8: showFileUploadError

 /**
  * showFileUploadError
  * Show file upload errors
  *
  * @return void
  */
 public function showFileUploadError()
 {
     if (empty($this->redirect)) {
         $this->redirect = REF;
     }
     if (isset($this->file) && $this->file['error'] !== UPLOAD_ERR_OK) {
         ossn_trigger_message($this->getFileUploadError($this->file['error']), 'error');
         redirect($this->redirect);
     }
 }
开发者ID:emnaborgi,项目名称:RS,代码行数:16,代码来源:OssnFile.php

示例9: input

//walltype is user
$OssnWall->name = 'user';
//getting some inputs that are required for wall post
$post = input('post');
$friends = input('friends');
$location = input('location');
$privacy = input('privacy');
//validate wall privacy
$privacy = ossn_access_id_str($privacy);
if (!empty($privacy)) {
    $access = input('privacy');
} else {
    $access = OSSN_FRIENDS;
}
if ($OssnWall->Post($post, $friends, $location, $access)) {
    if (ossn_is_xhr()) {
        $guid = $OssnWall->getObjectId();
        $get = $OssnWall->GetPost($guid);
        if ($get) {
            $get = ossn_wallpost_to_item($get);
            ossn_set_ajax_data(array('post' => ossn_wall_view_template($get)));
        }
    }
    //no need to show message on success.
    //3.x why not? $arsalanshah
    ossn_trigger_message(ossn_print('post:created'));
    redirect(REF);
} else {
    ossn_trigger_message(ossn_print('post:create:error'), 'error');
    redirect(REF);
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:31,代码来源:user.php

示例10: input

<?php

/**
 *    OpenSource-SocialNetwork
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://opensource-socialnetwork.com/licence
 * @link      http://www.opensource-socialnetwork.com/licence
 */
$loggedout = input('l');
if (empty($loggedout)) {
    session_destroy();
    redirect(ossn_build_token_url('action/admin/logout?l=1'));
}
if ($loggedout == 1) {
    ossn_trigger_message(ossn_print('logged:out'), 'success');
    redirect('../');
}
开发者ID:rhondamoananui,项目名称:nzfc,代码行数:20,代码来源:logout.php

示例11: OssnPoke

<?php

/**
 * Open Source Social Network
 *
 * @package   Open Source Social Network
 * @author    Open Social Website Core Team <info@informatikon.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$poke = new OssnPoke();
$user = input('user');
if ($poke->addPoke(ossn_loggedin_user()->guid, $user)) {
    ossn_trigger_message(ossn_print('user:poked'), 'success');
    redirect(REF);
} else {
    ossn_trigger_message(ossn_print('user:poke:error'), 'error');
    redirect(REF);
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:20,代码来源:poke.php

示例12: input

<?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
 */
$theme = input('theme');
$delete = new OssnThemes();
if (strtolower($delete->getActive()) == strtolower($theme)) {
    ossn_trigger_message(ossn_print('theme:delete:active'), 'error');
    redirect(REF);
}
if ($delete->deletetheme($theme)) {
    ossn_trigger_message(ossn_print('theme:deleted'), 'success');
    redirect(REF);
} else {
    ossn_trigger_message(ossn_print('theme:delete:error'), 'error');
    redirect(REF);
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:24,代码来源:delete.php

示例13: input

<?php

/**
 *    OpenSource-SocialNetwork
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <info@opensource-socialnetwork.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://opensource-socialnetwork.com/licence
 * @link      http://www.opensource-socialnetwork.com/licence
 */
$photoid = input('id');
$delete = ossn_photos();
$delete->photoid = $photoid;
$photo = $delete->GetPhoto($delete->photoid);
if ($photo->owner_guid == ossn_loggedin_user()->guid || ossn_isAdminLoggedin()) {
    if ($delete->deleteProfilePhoto()) {
        ossn_trigger_message(ossn_print('photo:deleted:success'), 'success');
        redirect();
    } else {
        ossn_trigger_message(ossn_print('photo:delete:error'), 'error');
        redirect();
    }
} else {
    ossn_trigger_message(ossn_print('photo:delete:error'), 'error');
    redirect();
}
开发者ID:alibasli,项目名称:Social-Network-PHP-Joomla,代码行数:27,代码来源:delete.php

示例14: OssnGroup

<?php

/**
 * Open Source Social Network
 *
 * @packageOpen Source Social Network
 * @author    Open Social Website Core Team <info@informatikon.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$add = new OssnGroup();
$params['owner_guid'] = ossn_loggedin_user()->guid;
$params['name'] = input('groupname');
$params['description'] = input('description');
$params['privacy'] = input('privacy');
if ($add->createGroup($params)) {
    ossn_trigger_message(ossn_print('group:added'), 'success');
    redirect("group/{$add->getGuid()}");
} else {
    ossn_trigger_message(ossn_print('group:add:fail'), 'error');
    redirect(REF);
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:23,代码来源:add.php

示例15: OssnGroup

<?php

/**
 * Open Source Social Network
 *
 * @package   Open Source Social Network
 * @author    Open Social Website Core Team <info@informatikon.com>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$add = new OssnGroup();
$group = input('group');
$user = input('user');
if (ossn_get_group_by_guid($group)->owner_guid !== ossn_loggedin_user()->guid) {
    ossn_trigger_message(ossn_print('member:add:error'), 'error');
    redirect(REF);
}
if ($add->approveRequest($user, $group)) {
    ossn_trigger_message(ossn_print('member:added'), 'success');
    redirect(REF);
} else {
    ossn_trigger_message(ossn_print('member:add:error'), 'error');
    redirect(REF);
}
开发者ID:aidovoga,项目名称:opensource-socialnetwork,代码行数:25,代码来源:approve.php


注:本文中的ossn_trigger_message函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。