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


PHP getVisitorIP函数代码示例

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


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

示例1: getVotedItems

 function getVotedItems()
 {
     $ip = getVisitorIP();
     $oDolVoting = new BxDolVoting($this->sType, 0, 0);
     $aVotedItems = $oDolVoting->getVotedItems($ip);
     return $this->reviewArray($aVotedItems, $oDolVoting->_aSystem['row_prefix'] . 'id');
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:7,代码来源:BxDolRate.php

示例2: serviceGetBlockFormRequest

 public function serviceGetBlockFormRequest()
 {
     if (!$this->_oConfig->isRequestInvite()) {
         return array('content' => MsgBox(_t('_bx_invites_err_not_available')));
     }
     $mixedAllowed = $this->isAllowedRequest(0);
     if ($mixedAllowed !== true) {
         return array('content' => MsgBox($mixedAllowed));
     }
     $sResult = '';
     $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_request'), $this->_oConfig->getObject('form_display_request_send'));
     $oForm->initChecker();
     if ($oForm->isSubmittedAndValid()) {
         $sIp = getVisitorIP();
         $iId = (int) $oForm->insert(array('nip' => ip2long($sIp), 'date' => time()));
         if ($iId !== false) {
             $sRequestsEmail = $this->_oConfig->getRequestsEmail();
             if (!empty($sRequestsEmail)) {
                 $sManageUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=invites-requests');
                 $aMessage = BxDolEmailTemplates::getInstance()->parseTemplate('bx_invites_request_form_message', array('sender_name' => bx_process_output($oForm->getCleanValue('name')), 'sender_email' => bx_process_output($oForm->getCleanValue('email')), 'sender_ip' => $sIp, 'manage_url' => $sManageUrl));
                 sendMail($sRequestsEmail, $aMessage['Subject'], $aMessage['Body'], 0, array(), BX_EMAIL_SYSTEM);
             }
             $sResult = MsgBox(_t('_bx_invites_msg_request_sent'));
         }
     }
     return array('content' => $sResult . $oForm->getCode());
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:27,代码来源:BxInvModule.php

示例3: check

 /**
  * Check captcha.
  */
 public function check()
 {
     $mixedResponce = bx_file_get_contents($this->sVerifyUrl, array('secret' => $this->_sKeyPrivate, 'response' => bx_process_input(bx_get('g-recaptcha-response')), 'remoteip' => getVisitorIP()));
     if ($mixedResponce === false) {
         return false;
     }
     $aResponce = json_decode($mixedResponce, true);
     if (isset($aResponce['success']) && $aResponce['success'] === true) {
         return true;
     }
     if (!empty($aResponce['error-codes'])) {
         $this->_error = $aResponce['error-codes'];
     }
     return false;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:18,代码来源:BxBaseCaptchaReCAPTCHANew.php

示例4: getBlockCode_RatedSet

 function getBlockCode_RatedSet()
 {
     $this->oMedia->clearFilters(array('activeStatus', 'allow_view', 'album_status', 'albumType'), array('albumsObjects', 'albums'));
     $this->oMedia->aCurrent['join']['rateTrack'] = array('type' => 'inner', 'table' => 'bx_sounds_voting_track', 'mainField' => 'ID', 'onField' => 'gal_id', 'joinFields' => array('gal_ip', 'gal_date'));
     $this->oMedia->aCurrent['paginate']['perPage'] = getParam($this->oMedia->aGlParamsSettings['previousRatedNumber']);
     $this->oMedia->aCurrent['sorting'] = 'voteTime';
     $sIp = getVisitorIP();
     $this->oMedia->aCurrent['restriction']['ip'] = array('value' => $sIp, 'field' => 'gal_ip', 'table' => 'bx_sounds_voting_track', 'operator' => '=');
     $sCode = $this->oMedia->displayResultBlock();
     if (strlen($sCode) > 0) {
         $sCode = $GLOBALS['oFunctions']->centerContent($sCode, '.sys_file_search_unit');
     } else {
         $sCode = MsgBox(_t("_Empty"));
     }
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:16,代码来源:BxSoundsRate.php

示例5: getBlockCode_RatedSet

 function getBlockCode_RatedSet()
 {
     $sMainPrefix = $this->oConfig->getMainPrefix();
     $this->oMedia->clearFilters(array('activeStatus', 'allow_view', 'album_status', 'albumType'), array('albumsObjects', 'albums'));
     $this->oMedia->aCurrent['join']['rateTrack'] = array('type' => 'inner', 'table' => $sMainPrefix . '_voting_track', 'mainField' => 'ID', 'onField' => 'gal_id', 'joinFields' => array('gal_ip', 'gal_date'));
     $this->oMedia->aCurrent['paginate']['perPage'] = $this->oConfig->getGlParam('number_previous_rated');
     $this->oMedia->aCurrent['sorting'] = 'voteTime';
     $sIp = getVisitorIP();
     $this->oMedia->aCurrent['restriction']['ip'] = array('value' => $sIp, 'field' => 'gal_ip', 'table' => $sMainPrefix . '_voting_track', 'operator' => '=');
     $this->oMedia->sTemplUnit = 'browse_unit_rater';
     $sCode = $this->oMedia->displayResultBlock();
     if (!$this->oMedia->aCurrent['paginate']['totalNum']) {
         $sCode = MsgBox(_t("_Empty"));
     }
     return array($sCode, array(), array(), false);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:16,代码来源:BxDolFilesRate.php

示例6: isIpBlocked

 /**
  * Check if IP is directly bloked by IP address or by IP address range
  *
  * @param $sCurIP IP to check, or empty for current IP
  * @return true - if IP is blocked; false - if IP is not blocked, or feature is not enabled, or it is run under cron
  */
 public function isIpBlocked($sCurIP = '')
 {
     if (defined('BX_DOL_CRON_EXECUTE')) {
         return false;
     }
     $iIPGlobalType = (int) getParam('bx_antispam_ip_list_type');
     if (BX_ANTISPAM_IP_TABLE_DISABLED == $iIPGlobalType) {
         return false;
     }
     if (!$sCurIP) {
         $sCurIP = getVisitorIP();
     }
     if ($this->isIpWhitelisted($sCurIP)) {
         return false;
     }
     if ($this->_isIpListed('deny', $sCurIP)) {
         return true;
     }
     return BX_ANTISPAM_IP_TABLE_ALL_BLOCKED_EXCEPT_LISTED == $iIPGlobalType ? true : false;
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:26,代码来源:BxAntispamIP.php

示例7: getUserIp

 public function getUserIp()
 {
     return getVisitorIP();
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:4,代码来源:BxBaseModNotificationsModule.php

示例8: addComment

function addComment($profileID)
{
    global $logged;
    global $oProfile;
    if ($logged['member']) {
        $record_sender = (int) $_COOKIE['memberID'];
    } else {
        return;
    }
    $period = 1;
    // time period before user can add another record (in minutes)
    $record_maxlength = 1600;
    // max length of record
    // Test if IP is defined
    $ip = getVisitorIP();
    if ($ip == '0.0.0.0') {
        return _t_err("_sorry, i can not define you ip adress. IT'S TIME TO COME OUT !");
    }
    // get record text
    $record_text = addslashes(clear_xss(trim(process_pass_data($_POST['commenttext']))));
    if (strlen($record_text) < 2) {
        return _t_err("_enter_message_text");
    }
    // Test if last message is old enough
    $last_count = db_value("SELECT COUNT(*) FROM `ProfilesComments` WHERE `IP` = '{$ip}' AND (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`Date`) < {$period}*60)");
    if ($last_count != 0) {
        return _t_err("_You have to wait for PERIOD minutes before you can write another message!", $period);
    }
    $replyTO = (int) $_POST['replyTO'];
    // Perform insertion
    $query = "\n\t\tINSERT INTO `ProfilesComments` SET\n\t\t\t`Date` = NOW(),\n\t\t\t`IP` = '{$ip}',\n\t\t\t`Sender` = {$record_sender},\n\t\t\t`Recipient` = {$oProfile->_iProfileID},\n\t\t\t`Text` = '{$record_text}',\n\t\t\t`New` = '1',\n\t\t\t`ReplyTO` = {$replyTO}\n\t\t";
    db_res($query);
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:33,代码来源:profile.php

示例9: actionWriteMessage

 /**
  * Write new message;
  * 
  * @return text (error message if have some troubles)
  */
 function actionWriteMessage()
 {
     if ($this->isShoutBoxAllowed($this->iMemberId, true)) {
         $sMessage = isset($_POST['message']) ? strip_tags(trim($_POST['message'])) : '';
         if ($sMessage) {
             // process smiles;
             if ($this->_oConfig->bProcessSmiles) {
                 $sMessage = $this->_processSmiles($sMessage);
             }
             // create new message;
             $this->_oDb->writeMessage($sMessage, $this->iMemberId, ip2long(getVisitorIP()));
             if ($this->_oConfig->iAllowedMessagesCount) {
                 // delete superfluous messages;
                 $iMessagesCount = $this->_oDb->getMessagesCount();
                 if ($iMessagesCount > $this->_oConfig->iAllowedMessagesCount) {
                     $this->_oDb->deleteMessages($iMessagesCount - $this->_oConfig->iAllowedMessagesCount);
                 }
             }
         } else {
             echo _t('_bx_shoutbox_message_empty');
         }
     } else {
         echo _t('_bx_shoutbox_access_denied');
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:30,代码来源:BxShoutBoxModule.php

示例10: checkPostValueForSystem

 function checkPostValueForSystem($aItem, $mValue)
 {
     switch ($aItem['Name']) {
         case 'Captcha':
             return $this->checkCaptcha($mValue) ? true : _t('_Captcha check failed');
             break;
         case 'Status':
             if (!in_array($mValue, $aItem['Values'])) {
                 return 'Status hack attempt!';
             }
             break;
         case 'TermsOfUse':
             $i = getParam(base64_decode('c3lzX2FudGlzcGFtX3NtYXJ0X2NoZWNr')) && bx_get('do_submit');
             bx_import('BxDolStopForumSpam');
             $oBxDolStopForumSpam = new BxDolStopForumSpam();
             if (2 == getParam('ipBlacklistMode') && bx_is_ip_blocked()) {
                 return _t('_Sorry, your IP been banned');
             } elseif ('on' == getParam('sys_dnsbl_enable') && 'block' == getParam('sys_dnsbl_behaviour') && bx_is_ip_dns_blacklisted('', 'join') || $i || $oBxDolStopForumSpam->isSpammer(array('email' => $_POST['Email'][0], 'ip' => getVisitorIP(false)), 'join')) {
                 return sprintf(_t('_sys_spam_detected'), BX_DOL_URL_ROOT . 'contact.php');
             } else {
                 return $mValue ? true : _t('_You must agree with terms of use');
             }
             break;
         case 'ProfilePhoto':
             if ($aItem['Mandatory'] && is_null($mValue)) {
                 return _t('_Please specify image file');
             }
             if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
                 return true;
             }
             $sFileName = $GLOBALS['dir']['tmp'] . $mValue;
             if ($mValue && !file_exists($sFileName)) {
                 // hack attempt
                 return 'No way! File not exists: ' . $sFileName;
             }
             $aSize = @getimagesize($sFileName);
             if ($mValue && !$aSize) {
                 @unlink($sFileName);
                 return _t('_Please specify image file');
             }
             if ($mValue && $aSize[2] != IMAGETYPE_GIF && $aSize[2] != IMAGETYPE_JPEG && $aSize[2] != IMAGETYPE_PNG) {
                 unlink($sFileName);
                 return _t('_Please specify image of JPEG, GIF or PNG format');
             }
             return true;
             break;
     }
     return true;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:49,代码来源:BxDolProfileFields.php

示例11: bx_import

 */
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
bx_import('BxRSS');
bx_import('BxDolAdminDashboard');
define('BX_DOL_ADMIN_INDEX', 1);
$bLogged = isLogged();
$bNeedCheck = $bLogged && isAdmin() && $_POST['relocate'] && strncasecmp($_POST['relocate'], BX_DOL_URL_ADMIN . 'license.php', strlen(BX_DOL_URL_ADMIN . 'license.php')) == 0;
if ($bNeedCheck || isset($_POST['ID']) && isset($_POST['Password'])) {
    $iId = getID($_POST['ID']);
    $sPassword = process_pass_data($_POST['Password']);
    if (!$bLogged) {
        $oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $iId, 'password' => $sPassword, 'ip' => getVisitorIP()));
        $oZ->alert();
    }
    if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
        echo check_password($iId, $sPassword, BX_DOL_ROLE_ADMIN, false) ? 'OK' : 'Fail';
    } else {
        if ($bNeedCheck || check_password($iId, $sPassword, BX_DOL_ROLE_ADMIN)) {
            if ($_POST['relocate'] && (strncasecmp($_POST['relocate'], BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)) == 0 || strncasecmp($_POST['relocate'], BX_DOL_URL_ADMIN . 'license.php', strlen(BX_DOL_URL_ADMIN . 'license.php')) == 0)) {
                $sUrlRelocate = $_POST['relocate'];
            } else {
                $sUrlRelocate = BX_DOL_URL_ADMIN . 'index.php';
            }
            $sUrlRelocate = bx_html_attribute($sUrlRelocate);
            $r = $l($a);
            eval($r($b));
            header('Content-Type: text/html; charset=utf-8');
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:31,代码来源:index.php

示例12: _createProfileRaw

 /**
  * Create new profile;
  *
  * @param  : $aProfileInfo (array) - some profile's information;
  *          @see : $this -> aFacebookProfileFields;
  *
  * @param  : $sAlternativeName (string) - profiles alternative nickname;
  * @return : error string or error or profile info array on success
  */
 function _createProfileRaw($aProfileInfo, $sAlternativeName = '', $isAutoFriends = true, $isSetLoggedIn = true)
 {
     //print_r($aProfileInfo); exit;
     $sCountry = '';
     $sCity = '';
     //-- join by invite only --//
     if (getParam('reg_by_inv_only') == 'on' && (!isset($_COOKIE['idFriend']) || getID($_COOKIE['idFriend']) == 0)) {
         return _t('_registration by invitation only');
     }
     //--
     // process the date of birth;
     if (isset($aProfileInfo['birthday'])) {
         $aProfileInfo['birthday'] = isset($aProfileInfo['birthday']) ? date('Y-m-d', strtotime($aProfileInfo['birthday'])) : '';
     }
     // generate new password for profile;
     //$sNewPassword = genRndPwd();
     //$sPasswordSalt =  genRndSalt();
     //$aProfileInfo['password'] = encryptUserPwd($sNewPassword,$sPasswordSalt);
     $aProfileInfo['password'] = md5("");
     //-- define user's country and city --//
     $aLocation = array();
     if (isset($aProfileInfo['location']['name'])) {
         $aLocation = $aProfileInfo['location']['name'];
     } else {
         if (isset($aProfileInfo['hometown']['name'])) {
             $aLocation = $aProfileInfo['hometown']['name'];
         }
     }
     $sCity = "";
     $sCountry = "";
     if ($aLocation) {
         $aCountryInfo = explode(',', $aLocation);
         $sCountry = $this->_oDb->getCountryCode(trim($aCountryInfo[1]));
         $sCity = trim($aCountryInfo[0]);
         //set default country name, especially for American brothers
         if ($sCity && !$sCountry) {
             $sCountry = $this->_oConfig->sDefaultCountryCode;
         }
     }
     //--
     //try define the user's email
     $sEmail = !empty($aProfileInfo['email']) ? $aProfileInfo['email'] : $aProfileInfo['proxied_email'];
     //print_r($sEmail);exit;
     //check email
     if ($this->_oDb->isEmailExisting($sEmail)) {
         return _t('_bx_facebook_error_email');
     }
     //ini_set("display_errors", "1");
     //print_r($aProfileInfo); exit;
     //-- fill array with all needed values --//
     $aProfileFields = array('FacebookProfile' => $aProfileInfo['id'], 'NickName' => $aProfileInfo['nick_name'] . $sAlternativeName, 'Email' => $sEmail, 'Sex' => isset($aProfileInfo['gender']) ? $aProfileInfo['gender'] : '', 'DateOfBirth' => isset($aProfileInfo['birthday']) ? $aProfileInfo['birthday'] : '', 'Password' => isset($aProfileInfo['password']) ? $aProfileInfo['password'] : '', 'FirstName' => isset($aProfileInfo['first_name']) ? $aProfileInfo['first_name'] : '', 'LastName' => isset($aProfileInfo['last_name']) ? $aProfileInfo['last_name'] : '', 'DescriptionMe' => isset($aProfileInfo['bio']) ? $aProfileInfo['bio'] : '', 'Interests' => isset($aProfileInfo['interests']) ? $aProfileInfo['interests'] : '', 'Religion' => isset($aProfileInfo['religion']) ? $aProfileInfo['religion'] : '', 'Country' => $sCountry, 'City' => $sCity);
     //--
     $aEdirectoryProfileFields = array('facebook_uid' => $aProfileInfo['id'], 'nickname' => $aProfileInfo['nick_name'] . $sAlternativeName, 'personal_message' => isset($aProfileInfo['bio']) ? $aProfileInfo['bio'] : '', 'facebook_image' => isset($aProfileInfo['picture']) ? $aProfileInfo['picture'] : '', 'facebook_image_width' => '100', 'facebook_image_height' => '100', 'location' => $sCity);
     $thisusername = $aProfileInfo['first_name'] . $aProfileInfo['last_name'];
     //$thisusername = utf8_encode ( $thisusername );
     $aAccountFields = array('facebook_username' => "facebook::" . $thisusername . "_" . $aProfileInfo['id'], 'username' => "facebook::" . $thisusername . "_" . $aProfileInfo['id'], 'has_profile' => 'y', 'active' => 'y', 'foreignaccount' => 'y', 'foreignaccount_done' => 'y', 'password' => isset($aProfileInfo['password']) ? $aProfileInfo['password'] : '', 'updated' => date('Y-m-d H:i:s'), 'entered' => date('Y-m-d H:i:s'), 'agree_tou' => '1');
     $aAccountProfileContactFields = array('username' => "facebook::" . $thisusername . "_" . $aProfileInfo['id'], 'has_profile' => 'y', 'nickname' => $aProfileInfo['first_name'] . " " . $aProfileInfo['last_name'], 'first_name' => isset($aProfileInfo['first_name']) ? $aProfileInfo['first_name'] : '', 'last_name' => isset($aProfileInfo['last_name']) ? $aProfileInfo['last_name'] : '', 'facebook_image_width' => '100', 'facebook_image_height' => '100');
     $aContactFields = array('email' => $sEmail, 'first_name' => isset($aProfileInfo['first_name']) ? $aProfileInfo['first_name'] : '', 'last_name' => isset($aProfileInfo['last_name']) ? $aProfileInfo['last_name'] : '', 'country' => $sCountry, 'city' => $sCity);
     bx_import('BxDolStopForumSpam');
     $oBxDolStopForumSpam = new BxDolStopForumSpam();
     if (2 == getParam('ipBlacklistMode') && bx_is_ip_blocked()) {
         return _t('_Sorry, your IP been banned');
     } elseif ('on' == getParam('sys_dnsbl_enable') && 'block' == getParam('sys_dnsbl_behaviour') && bx_is_ip_dns_blacklisted('', 'join facebook') || $oBxDolStopForumSpam->isSpammer(array('email' => $aProfileFields['Email'], 'ip' => getVisitorIP(false)), 'join facebook')) {
         return sprintf(_t('_sys_spam_detected'), BX_DOL_URL_ROOT . 'contact.php');
     }
     // check fields existence;
     foreach ($aProfileFields as $sKey => $mValue) {
         if (!$this->_oDb->isFieldExist($sKey)) {
             // (field not existence) remove from array;
             unset($aProfileFields[$sKey]);
         }
     }
     //-- add some system values --//
     $aProfileFields['Role'] = BX_DOL_ROLE_MEMBER;
     $aProfileFields['DateReg'] = date('Y-m-d H:i:s');
     // set current date;
     $aProfileFields['Salt'] = $sPasswordSalt;
     //--
     //check redirect page
     if ('join' == $this->_oConfig->sRedirectPage) {
         return array('profile_info_fb' => $aProfileInfo, 'profile_fields' => $aProfileFields, 'join_page_redirect' => true);
     }
     // create new profile;
     $iProfileId = $this->_oDb->createProfile($aProfileFields);
     $this->_oDb->EdirctorycreateProfile($aAccountFields, $aEdirectoryProfileFields, $aContactFields, $aAccountProfileContactFields);
     $oProfileFields = new BxDolProfilesController();
     //remember FB uid for created member
     $this->_oDb->saveFbUid($iProfileId, $aProfileInfo['id']);
     // check profile status;
     if (getParam('autoApproval_ifNoConfEmail') == 'on') {
         if (getParam('autoApproval_ifJoin') == 'on') {
//.........这里部分代码省略.........
开发者ID:rxjucse,项目名称:BoonexFacebookConnectModule,代码行数:101,代码来源:BxFaceBookConnectModule.php

示例13: BxSitesSearchResult


//.........这里部分代码省略.........
         case 'popular':
             $this->aCurrent['sorting'] = 'popular';
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_popular');
             $this->sSitesBrowseUrl = 'browse/popular';
             break;
         case 'search':
             if ($sValue) {
                 $this->aCurrent['restriction']['keyword'] = array('value' => $sValue, 'field' => '', 'operator' => 'against');
             }
             $this->aCurrent['title'] = _t('_bx_sites_caption_search_results') . ' ' . $sValue;
             $this->sSitesBrowseUrl = 'browse/search/' . $sValue;
             unset($this->aCurrent['rss']);
             break;
         case 'admin':
             $this->aCurrent['join'] = array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'ownerid', 'onField' => 'ID', 'joinFields' => array('Role')));
             $this->aCurrent['restriction'] = array('admin' => array('value' => '3', 'field' => 'Role', 'operator' => '=', 'table' => 'Profiles'));
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_admin');
             $this->sSitesBrowseUrl = 'browse/admin';
             break;
         case 'users':
             $this->aCurrent['join'] = array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'ownerid', 'onField' => 'ID', 'joinFields' => array('Role')));
             $this->aCurrent['restriction']['role'] = array('value' => '3', 'field' => 'Role', 'operator' => '<>', 'table' => 'Profiles');
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_profile');
             $this->sSitesBrowseUrl = 'browse/profile';
             break;
         case 'calendar':
             $this->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 00:00:00')", 'field' => 'date', 'operator' => '>=', 'no_quote_value' => true);
             $this->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 23:59:59')", 'field' => 'date', 'operator' => '<=', 'no_quote_value' => true);
             $this->sSitesBrowseUrl = "browse/calendar/{$sValue}/{$sValue2}/{$sValue3}";
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_day') . getLocaleDate(strtotime("{$sValue}-{$sValue2}-{$sValue3}"), BX_DOL_LOCALE_DATE_SHORT);
             $GLOBALS['oTopMenu']->setCustomSubHeader($this->aCurrent['title']);
             break;
         case 'hon_rate':
             $ip = getVisitorIP();
             $aVotedItems = $oVotingView->getVotedItems($ip);
             $aList = array();
             $sPrefix = $oVotingView->_aSystem['row_prefix'] . 'id';
             foreach ($aVotedItems as $iKey => $aVal) {
                 $aList[$iKey] = $aVal[$sPrefix];
             }
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->aCurrent['paginate']['perPage'] = 1;
             $this->aCurrent['sorting'] = 'rand';
             $this->aCurrent['restriction']['id'] = array('value' => $aList, 'field' => 'id', 'operator' => 'not in');
             break;
         case 'hon_prev_rate':
             $this->aCurrent['join']['rateTrack'] = array('type' => 'inner', 'table' => 'bx_sites_rating_track', 'mainField' => 'id', 'onField' => 'sites_id', 'joinFields' => array('sites_ip', 'sites_date'));
             $this->aCurrent['paginate']['perPage'] = 1;
             $this->aCurrent['sorting'] = 'sites_date';
             $sIp = getVisitorIP();
             $this->aCurrent['restriction']['ip'] = array('value' => $sIp, 'field' => 'sites_ip', 'table' => 'bx_sites_rating_track', 'operator' => '=');
             break;
         case 'index':
             $this->sSitesBrowseUrl = 'index';
             $this->sSitesBrowseAll = 'browse/all';
             $this->aCurrent['paginate']['perPage'] = 3;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             break;
         case 'profile':
             if ($sValue) {
                 $iProfileId = $this->_oMain->_oDb->getProfileIdByNickName(process_db_input($sValue));
                 if ($iProfileId) {
                     $this->aCurrent['restriction']['owner'] = array('value' => $iProfileId, 'field' => 'ownerid', 'operator' => '=');
                     $this->sSitesBrowseUrl = 'profile/' . $sValue;
                     $this->sSitesBrowseAll = 'browse/user/' . $sValue;
                     $this->aCurrent['paginate']['perPage'] = 3;
开发者ID:dalinhuang,项目名称:shopexts,代码行数:67,代码来源:BxSitesSearchResult.php

示例14: isDublicateVote

 function isDublicateVote()
 {
     if (!$this->isEnabled()) {
         return false;
     }
     $sVoterIdentification = isLogged() ? getLoggedId() : getVisitorIP();
     return $this->_oQuery->isDublicateVote($this->getId(), $sVoterIdentification);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:8,代码来源:BxDolVoting.php

示例15: onPositiveDetection

 public function onPositiveDetection($sExtraData = '')
 {
     $o = bx_instance('BxDolDNSBlacklists');
     $o->onPositiveDetection(getVisitorIP(false), $sExtraData, 'stopforumspam');
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:5,代码来源:BxAntispamStopForumSpam.php


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