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


PHP member_auth函数代码示例

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


在下文中一共展示了member_auth函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CheckLogged

 function CheckLogged()
 {
     global $logged;
     if (!$logged['member'] && !$logged['admin']) {
         member_auth(0);
     }
 }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:7,代码来源:BxDolBlogs.php

示例2: actionAdministration

 function actionAdministration($sSubaction = '', $sID = 0)
 {
     global $_page, $_page_cont;
     require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
     $logged['admin'] = member_auth(1, true, true);
     $iUnitID = $sSubaction == 'edit' && (int) $sID > 0 ? (int) $sID : 0;
     $iUnitID = bx_get('action') == 'edit' && (int) bx_get('ID') > 0 ? (int) bx_get('ID') : $iUnitID;
     if (isset($_POST['quotes_list']) && is_array($_POST['quotes_list'])) {
         // manage subactions
         foreach ($_POST['quotes_list'] as $sQuoteId) {
             $iQuoteId = (int) $sQuoteId;
             switch (true) {
                 case isset($_POST['action_delete']):
                     $this->_oDb->deleteUnit($iQuoteId);
                     break;
             }
         }
     }
     $iNameIndex = 9;
     $_page = array('name_index' => $iNameIndex, 'css_name' => array(), 'js_name' => array(), 'header' => _t('_adm_page_cpt_quotes'), 'header_text' => _t('_adm_box_cpt_quotes'));
     $_page_cont[$iNameIndex]['page_main_code'] = $this->getPostForm($iUnitID);
     $_page_cont[$iNameIndex]['page_main_code'] .= $this->getQuotesList();
     PageCodeAdmin();
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:24,代码来源:BxQuotesModule.php

示例3: member_auth

* http://creativecommons.org/licenses/by/3.0/
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'groups.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
// --------------- page variables and login
$_page['name_index'] = 72;
$_page['css_name'] = 'groups.css';
$logged['member'] = member_auth(0, true);
$memberID = (int) $_COOKIE['memberID'];
$_page['header'] = _t("_Create Group");
$_page['header_text'] = _t("_Create Group");
$_page['extra_js'] = $oTemplConfig->sTinyMceEditorCompactJS;
// --------------- page components
$_ni = $_page['name_index'];
$arrMember = getProfileInfo($memberID);
//db_arr( "SELECT `Status` FROM `Profiles` WHERE `ID`=$memberID" );
if ($arrMember['Status'] == 'Active') {
    $_page_cont[$_ni]['page_main_code'] = PageCompMainCode();
} else {
    $_page_cont[$_ni]['page_main_code'] = _t('_You must be active member to create groups');
}
// --------------- [END] page components
PageCode();
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:group_create.php

示例4: getActivityPage

 /**
  * Function will generate global spy's page (content activity only!);
  *
  * @param  : $sType (string) - type of activity;
  * @return : (text) - html presentation data;
  */
 function getActivityPage($sType = '')
 {
     //-- set search filters --//
     if ($sType) {
         $this->oSearch->aCurrent['restriction']['type']['value'] = $sType;
     }
     //search all events
     $this->oSearch->aCurrent['restriction']['viewed']['value'] = '';
     //--
     $sPageUrl = $this->sPathToModule;
     // define page's mode
     switch ($this->sSpyMode) {
         case 'friends_events':
             //-- if member not logged function will draw login form --//;
             if (!$this->iMemberId) {
                 return member_auth(0);
             }
             $this->oSearch->aCurrent['join'][] = array('type' => 'INNER', 'table' => $this->_oDb->sTablePrefix . 'friends_data', 'mainField' => 'id', 'onField' => 'event_id', 'joinFields' => array());
             $this->oSearch->aCurrent['restriction']['friends']['value'] = $this->iMemberId;
             $this->oSearch->aCurrent['restriction']['no_my']['value'] = $this->iMemberId;
             $sPageUrl .= '&mode=' . $this->sSpyMode;
             break;
         default:
     }
     // try to define activity type;
     if ($sType) {
         $sPageUrl .= '&spy_type=' . $sType;
     }
     // get data;
     $aActivites = $this->oSearch->getSearchData();
     $sActivites = $this->_proccesActivites($aActivites);
     $sOutputCode = $this->_oTemplate->getWrapper($this->sEventsWrapper, $aActivites ? $sActivites : MsgBox(_t('_Empty')), $this->oSearch->showPagination($sPageUrl));
     // if first page;
     if ($this->iPage == 1) {
         $sOutputCode = $this->getInitPart($sType) . $sOutputCode;
     }
     return $sOutputCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:44,代码来源:BxSpyModule.php

示例5: member_auth

*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profile_disp.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'sharing.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
$_page['extra_js'] = '';
$logged[admin] = member_auth(1);
$ADMIN = $logged[admin];
$_page['css_name'] = 'browse.css';
$_page['header'] = "Browse Music";
$_page['header_text'] = "Browse Music";
$_ni = $_page['name_index'];
$sType = 'Music';
if (isset($_POST['Check']) && is_array($_POST['Check'])) {
    foreach ($_POST['Check'] as $iKey => $iVal) {
        switch (true) {
            case isset($_POST['Delete']):
                deleteMedia((int) $iVal, $sType);
                break;
            case isset($_POST['Approve']):
                approveMedia((int) $iVal, $sType);
                break;
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:browseMusic.php

示例6: member_auth

* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
//$_page['name_index'] = 20;
$logged['admin'] = member_auth(1);
$_page['css_name'] = 'news.css';
function MemberPrintNews()
{
    global $site;
    global $short_date_format;
    $res = db_res("SELECT `ID`, DATE_FORMAT(`Date`, '{$short_date_format}' ) AS 'Date', `Header`, `Text` FROM `News` ORDER BY `Date` DESC");
    if (!$res) {
        return;
    }
    echo "<table cellspacing=1 cellpadding=2 class=small width='100%'>\n";
    if (!mysql_num_rows($res)) {
        echo "<tr class=panel><td align=center>No news available.</td></tr>\n";
    }
    while ($news_arr = mysql_fetch_array($res)) {
        $news_header = process_line_output($news_arr['Header']);
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:news.php

示例7: member_auth

*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'modules.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'tags.inc.php';
// --------------- page variables and login
$_page['name_index'] = 36;
$_page['css_name'] = 'change_status.css';
$logged['member'] = member_auth(0);
$_page['header'] = _t("_CHANGE_STATUS_H");
$_page['header_text'] = _t("_CHANGE_STATUS_H1", $site['title']);
// --------------- page components
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();
// --------------- [END] page components
PageCode();
// --------------- page components functions
/**
 * page code function
 */
function PageCompPageMainCode()
{
    global $dir;
    $member['ID'] = (int) $_COOKIE['memberID'];
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:change_status.php

示例8: CheckLogged

 function CheckLogged()
 {
     if (!getLoggedId()) {
         member_auth(0);
     }
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:6,代码来源:BxBlogsModule.php

示例9: MsgBox

* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
if (getParam("enable_aff") != 'on') {
    $sCode = MsgBox(_t('_affiliate_system_was_disabled'));
    $_page['name_index'] = 0;
    $_page_cont[0]['page_main_code'] = $sCode;
    PageCode();
    exit;
}
$logged['aff'] = member_auth(2);
$AFF = (int) $_COOKIE['affID'];
// - GET variables --------------
$_page['header'] = "Affiliate's insructions page";
$_page['header_text'] = "Affiliate's insructions page";
$_page['js'] = 1;
TopCodeAdmin();
ContentBlockHead("Link");
?>

<table class="text" cellspacing=0 cellpadding=4 width=500>
	<tr>
		<td align="center">Place following link on your site:</td>
	</tr>
	<tr>
		<td align="center"><input class="no" size="60" value="<?php 
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:help.php

示例10: actionCheckUpdates

 /**
  * Function will get new activity by type;
  *
  * @param  : $sMode (string) - page's mode (possible values : global, friends_events);
  * @param  : $iLastActivityId (integer) - last event's Id;
  * @param  : $sType (string) - activity type;
  * @return : (text) - html presentation data;
  */
 function actionCheckUpdates($sMode = 'global', $iLastActivityId = 0, $sType = '', $iProfileId = 0)
 {
     $sPageUrl = $this->sPathToModule;
     $iLastActivityId = (int) $iLastActivityId;
     $iProfileId = (int) $iProfileId;
     // set filter;
     if ($sType && $sType != 'all') {
         $this->oSearch->aCurrent['restriction']['type']['value'] = process_db_input($sType, BX_TAGS_STRIP);
     }
     if ($iProfileId) {
         // get only profile's activity;
         $this->oSearch->aCurrent['restriction']['only_me']['value'] = $iProfileId;
     }
     switch ($sMode) {
         case 'friends_events':
             //-- if member not logged function will draw login form --//;
             if (!$this->iMemberId) {
                 exit(member_auth(0));
             }
             $this->oSearch->aCurrent['join'][] = array('type' => 'INNER', 'table' => $this->_oDb->sTablePrefix . 'friends_data', 'mainField' => 'id', 'onField' => 'event_id', 'joinFields' => array());
             $this->oSearch->aCurrent['restriction']['friends']['value'] = $this->iMemberId;
             $this->oSearch->aCurrent['restriction']['no_my']['value'] = $this->iMemberId;
             $this->oSearch->aCurrent['restriction']['over_id']['value'] = $iLastActivityId;
             $sPageUrl .= '&mode=' . $this->sSpyMode;
             break;
         default:
             $this->oSearch->aCurrent['restriction']['id'] = array('field' => 'id', 'operator' => '>', 'value' => $iLastActivityId);
     }
     // get data;
     $aActivites = $this->oSearch->getSearchData();
     $aProccesedActivites = $this->_proccesActivites($aActivites, ' style="display:none" ', true);
     $aRet = array('events' => $aProccesedActivites, 'last_event_id' => $this->_oDb->getLastActivityId($sType));
     // draw builded data;
     echo json_encode($aRet);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:43,代码来源:BxSpyModule.php

示例11: checkLogin

 public static function checkLogin($sUser, $sPwd)
 {
     $iId = (int) BxDolXMLRPCUtil::getIdByNickname($sUser);
     $aProfile = getProfileInfo((int) $iId);
     if (!$aProfile || getParam('enable_dolphin_footer') == 'on') {
         return 0;
     }
     $_COOKIE["memberID"] = $iId;
     $_COOKIE["memberPassword"] = 32 == strlen($sPwd) ? sha1($sPwd . $aProfile['Salt']) : $sPwd;
     $iRet = ($GLOBALS['logged']['member'] = member_auth(0, false)) ? $iId : 0;
     bx_import('BxDolAlerts');
     $oZ = new BxDolAlerts('mobile', 'check_login', $iId, 0, array('password' => $sPwd, 'return_data' => &$iRet));
     $oZ->alert();
     return $iRet;
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:15,代码来源:BxDolXMLRPCUtil.php

示例12: check_logged

function check_logged()
{
    global $logged;
    $aAccTypes = array(1 => 'admin', 0 => 'member', 2 => 'aff', 3 => 'moderator');
    foreach ($aAccTypes as $key => $value) {
        if ($logged[$value] = member_auth($key, false)) {
            break;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:10,代码来源:admin.inc.php

示例13: CheckLogged

 function CheckLogged()
 {
     $iProfileId = isset($_COOKIE['memberID']) && ($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) ? (int) $_COOKIE['memberID'] : 0;
     if (!$iProfileId) {
         member_auth(0);
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:7,代码来源:BxAdsModule.php

示例14: member_auth

* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'modules.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
$ADMIN = member_auth(1, true, true);
$logged['admin'] = $ADMIN;
$_page['header'] = "Modules";
$_page['header_text'] = "Modules";
TopCodeAdmin();
/* Interface functions */
function PrintModulesListBlock()
{
    $res = db_res("SELECT * FROM `Modules` ORDER BY `Type` ASC");
    if (!$res) {
        return;
    }
    ?>
	<table cellspacing="1" cellpadding="2" class="small" width="100%">
<?php 
    if (!mysql_num_rows($res)) {
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:modules.php

示例15: SDAddEvent

 /**
  * function for New/Edit event
  * @return Text Result
  */
 function SDAddEvent($iEventID = -1)
 {
     //for update event
     //print $iEventID;
     global $dir;
     global $logged;
     global $site;
     if (!$logged['member'] && !$logged['admin']) {
         member_auth(0);
     }
     // collect information about current member
     $aMember['ID'] = (int) $_COOKIE['memberID'];
     $aMemberData = getProfileInfo($aMember['ID']);
     // common
     $sEventTitle = process_db_input($_POST['event_title']);
     $sEventDesc = $this->process_html_db_input($_POST['event_desc']);
     $sEventStatusMessage = process_db_input($_POST['event_statusmsg']);
     // event place
     $sEventCountry = process_db_input($_POST['event_country']);
     $sEventCity = process_db_input($_POST['event_city']);
     $EventPlace = process_db_input($_POST['event_place']);
     $sTags = process_db_input($_POST['event_tags']);
     $aTags = explodeTags($sTags);
     $sTags = implode(",", $aTags);
     $sPictureName = $sBaseName;
     $aScan = getimagesize($_FILES['event_photo']['tmp_name']);
     if (in_array($aScan[2], array(1, 2, 3, 6)) && 0 < strlen($_FILES['event_photo']['name'])) {
         $sCurrentTime = time();
         if ($iEventID == -1) {
             $sBaseName = 'g_' . $sCurrentTime . '_1';
         } else {
             $sBaseName = db_value("SELECT `PhotoFilename` FROM `SDatingEvents` WHERE `ID`={$iEventID} LIMIT 1");
             if ($sBaseName != "") {
                 if (ereg("([a-z0-9_]+)\\.", $sBaseName, $aRegs)) {
                     $sBaseName = $aRegs[1];
                 }
             } else {
                 $sBaseName = $sBaseName != "" ? $sBaseName : 'g_' . $sCurrentTime . '_1';
             }
         }
         $sExt = moveUploadedImage($_FILES, 'event_photo', $dir['tmp'] . $sBaseName, '', false);
         $sBaseName .= $sExt;
         $sPictureName = $sBaseName;
         $sThumbName = 'thumb_' . $sBaseName;
         $sIconName = 'icon_' . $sBaseName;
         // resize for thumbnail
         $vRes = imageResize($dir['tmp'] . $sBaseName, $dir['sdatingImage'] . $sThumbName, $this->iThumbSize, $this->iThumbSize);
         if ($vRes != IMAGE_ERROR_SUCCESS) {
             return SDATING_ERROR_PHOTO_PROCESS;
         }
         $vRes = imageResize($dir['tmp'] . $sBaseName, $dir['sdatingImage'] . $sPictureName, $this->iImgSize, $this->iImgSize);
         if ($vRes != IMAGE_ERROR_SUCCESS) {
             return SDATING_ERROR_PHOTO_PROCESS;
         }
         $vRes = imageResize($dir['tmp'] . $sBaseName, $dir['sdatingImage'] . $sIconName, $this->iIconSize, $this->iIconSize);
         if ($vRes != IMAGE_ERROR_SUCCESS) {
             return SDATING_ERROR_PHOTO_PROCESS;
         }
         unlink($dir['tmp'] . $sBaseName);
         chmod($dir['sdatingImage'] . $sPictureName, 0644);
         chmod($dir['sdatingImage'] . $sThumbName, 0644);
         chmod($dir['sdatingImage'] . $sIconName, 0644);
         $sEventPhotoFilename = process_db_input($sPictureName);
     } else {
         $sEventPhotoFilename = '';
     }
     $sPictureSQL = '';
     if ($iEventID > 0 && $sEventPhotoFilename != '') {
         $sPictureSQL = "`PhotoFilename` = '{$sEventPhotoFilename}',";
     }
     // event date
     $sEventStart = strtotime($_REQUEST['event_start']);
     if ($sEventStart == -1) {
         return SDATING_ERROR_WRONG_DATE_FORMAT;
     }
     if ($this->bAdminMode) {
         $sEventEnd = strtotime($_POST['event_end']);
         //if ( $sEventEnd == -1 )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         $sEventSaleStart = strtotime($_POST['event_sale_start']);
         //if ( $sEventSaleStart == -1 )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         $sEventSaleEnd = strtotime($_POST['event_sale_end']);
         //if ( $sEventSaleEnd == -1 )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         //if ( $sEventEnd < $sEventStart || $sEventSaleEnd < $sEventSaleStart || $sEventStart < $sEventSaleStart )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         $sEventEndVal = "FROM_UNIXTIME( {$sEventEnd} )";
         $sEventSaleStartVal = "FROM_UNIXTIME( {$sEventSaleStart} )";
         $sEventSaleEndVal = "FROM_UNIXTIME( {$sEventSaleEnd} )";
     } else {
         $sEventEndVal = 'NOW()';
         $sEventSaleStartVal = 'NOW()';
         $sEventSaleEndVal = 'NOW()';
     }
     // event responsible
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:101,代码来源:BxDolEvents.php


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