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


PHP buckys_encrypt_id函数代码示例

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


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

示例1: getUserListHTML

 /**
  * Get Userlist HTML
  * 
  * @param Int $userID
  * @return String
  */
 public function getUserListHTML($userID, &$uIDs = array())
 {
     $users = BuckysPrivateMessenger::getUserList($userID);
     $html = '';
     foreach ($users as $row) {
         $newMsg = BuckysPrivateMessenger::getNewMessageCount($userID, $row['userID']);
         $html .= '<a href="#" class="single_chat_user ' . (!$row['online'] || !$row['buddyStatus'] ? "single_chat_user_offline" : '') . '" data-id="' . $row['userID'] . '" data-hash="' . buckys_encrypt_id($row['userID']) . '"> <img src="' . BuckysUser::getProfileIcon($row) . '" /><span> ' . $row['name'] . '</span></a>';
         $uIDs[] = $row['userID'];
     }
     return $html;
 }
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:17,代码来源:class.BuckysPrivateMessenger.php

示例2: loadMessenger

/**
* Load Private Messenger
* 
*/
function loadMessenger()
{
    global $db, $userID;
    //Getting Friends from the Buddy List
    $messengerSettings = BuckysUser::getUserBasicInfo($userID);
    $uIDs = array();
    //Return HTML
    ob_start();
    ?>
    <div id="private_messenger_main_wrap">
        <div class="box_nav_row">
            <a href="#" class="close_box_link">&nbsp;</a>
<!--            <a href="#" class="minimize_box_link">&nbsp;</a>-->
        </div>
        <h2>Private Messenger</h2>
        <div class="chat_user_list" id="private_messenger_buddies_list">
            <?php 
    echo BuckysPrivateMessenger::getUserListHTML($userID, $uIDs);
    ?>
        </div>
        <div class="below_chat_user_list <?php 
    if ($messengerSettings['messenger_privacy'] == 'all') {
        ?>
add-user-to-buddylist-hidden<?php 
    }
    ?>
" id="add-user-to-buddylist">
            <form name="adduserform" id="adduserform">
                <h2>Add Friends</h2>
                <span id="add-user-to-buddylist-inputholder">
                    <input type="text" class="input below_chat_user_list_input" id="add-user-to-buddylist-input" />                
                    <input type="submit" value="Add" class="redButton" />
                </span>
<!--                <div id="selected-users-list"></div>-->
                <div class="clear"></div>
                <?php 
    echo render_loading_wrapper();
    ?>
            </form>
        </div>
        <div class="below_chat_user_list" id="messenger_btn_box">             
            <span><input type="button" id="settings_messenger_btn" class="redButton" value="Settings"></span>
        </div>
    </div>
    <?php 
    BuckysPrivateMessenger::updateConversationList($userID, $uIDs);
    $convList = isset($_SESSION['converation_list']) ? $_SESSION['converation_list'] : array();
    ?>
    <div id="private_messenger_conversation_wrap" <?php 
    if (!buckys_not_null($convList)) {
        ?>
style="display: none;"<?php 
    }
    ?>
>                            
        <div class="box_nav_row">
            <a href="#" class="close_box_link">&nbsp;</a>
            <a href="#" class="minimize_box_link">&nbsp;</a>            
            <div href="#" class="options_link" id="private-messenger-options-link">
                Options
                <ul>
                    <li><a href="#" id="pm-box-clear-history-link">Clear history</a></li>
                    <li><a href="#" id="pm-box-block-user-link">Block User</a></li>
                </ul>
            </div>            
        </div>
        <div id="private_messenger_conversation_lft">
            <div id="private_messenger_opened_chats"> 
                <?php 
    foreach ($convList as $i => $uID) {
        $tUInfo = BuckysUser::getUserBasicInfo($uID);
        ?>
<a href="#" data-id="<?php 
        echo $uID;
        ?>
" <?php 
        if ($i == 0) {
            ?>
class="actived"<?php 
        }
        ?>
 data-encrypted="<?php 
        echo buckys_encrypt_id($uID);
        ?>
"><?php 
        echo $tUInfo['firstName'] . " " . $tUInfo['lastName'];
        ?>
 <span title="close" class="close-conversation">X</span></a><?php 
    }
    ?>
                         
            </div>                    
        </div>        
        <div id="private_messenger_conversation_rgt">
            <?php 
    foreach ($convList as $i => $uID) {
//.........这里部分代码省略.........
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:101,代码来源:private_messenger.php

示例3: trim

    $password = trim($_POST['password']);
    $info = buckys_get_user_by_email($email);
    if (buckys_not_null($info)) {
        if (!buckys_validate_password($password, $info['password'])) {
            buckys_redirect('/register.php', MSG_INVALID_LOGIN_INFO, MSG_TYPE_ERROR);
        } else {
            if ($info['status'] == 0) {
                //Account Not Verified or Banned
                buckys_redirect('/index.php', !$info['token'] ? MSG_ACCOUNT_BANNED : MSG_ACCOUNT_NOT_VERIFIED, MSG_TYPE_ERROR);
            } else {
                //Login Success
                //Clear Login Attemps
                BuckysTracker::clearLoginAttemps();
                $_SESSION['userID'] = $info['userID'];
                //Init Some Session Values
                $_SESSION['converation_list'] = array();
                //If the keep me signed in is checked, save data to cookie
                if ($_POST['keep_sign_in'] == 1) {
                    setcookie('bkuid0', base64_encode($info['userID']), time() + COOKIE_LIFETIME, "/", "buckysroom.com");
                    $uidEncrypted = buckys_encrypt_id($info['userID']);
                    setcookie('bkuid1', base64_encode($uidEncrypted), time() + COOKIE_LIFETIME, "/", "buckysroom.com");
                    setcookie('bkuid2', base64_encode($_SESSION['user_encrypt_salt']), time() + COOKIE_LIFETIME, "/", "buckysroom.com");
                }
                buckys_redirect('/account.php');
            }
        }
    } else {
        //Email Incorrect
        buckys_redirect('/register.php', MSG_INVALID_LOGIN_INFO, MSG_TYPE_ERROR);
    }
}
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:login.php

示例4: base64_encode

                    ?>
&return=<?php 
                    echo base64_encode("/profile.php?user=" . $row['userID']);
                    ?>
"
                                                data-type="buckys-ajax-link">Decline Friend Request</a>
                                            <br/>
                                        <?php 
                } else {
                    ?>
                                            <a href="/myfriends.php?action=request&friendID=<?php 
                    echo $row['userID'];
                    echo buckys_get_token_param();
                    ?>
&friendIDHash=<?php 
                    echo buckys_encrypt_id($row['userID']);
                    ?>
&return=<?php 
                    echo base64_encode("/profile.php?user=" . $row['userID']);
                    ?>
"
                                                data-type="buckys-ajax-link">Send Friend Request</a>
                                            <br/>
                                        <?php 
                }
            }
        }
    }
    ?>
                            </p>
                            <?php 
开发者ID:ravi50041,项目名称:Social-Network-Website,代码行数:31,代码来源:friends.php

示例5: buckys_encrypt_id

"/></span>
                    <div class="clear"></div>
                </div>
                
                <!-- Submit Button -->
                <div class="btn-row">                        
                    <span class="inputholder"><input type="submit" class="redButton" value="Submit"/></span>
                    <div class="clear"></div>
                </div>                      
                <input type="hidden" name="action" value="delete_account" />
                <input type="hidden" name="userID" value="<?php 
echo $BUCKYS_GLOBALS['user']['userID'];
?>
" />
                <input type="hidden" name="userIDHash" value="<?php 
echo buckys_encrypt_id($BUCKYS_GLOBALS['user']['userID']);
?>
" />
            </form>
            
        </section>
    </section>
</section>
<script type="text/javascript">
    jQuery('#deleteaccountform').submit(function(){
        var form = $(this);
        var isValid = true;
                
        if(form.find('#password').val() == '')
        {
            form.find('#password').addClass('input-error');
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:delete_account.php

示例6: buckys_encrypt_id

                </div>

                <!-- Submit Button -->
                <div class="btn-row">
                    <span class="inputholder"><input type="submit" id="submit" name="submit" class="redButton"
                            value="Submit"/></span>

                    <div class="clear"></div>
                </div>
                <input type="hidden" name="action" value="change_password"/> <input type="hidden" name="userID"
                    value="<?php 
echo $TNB_GLOBALS['user']['userID'];
?>
"/> <input type="hidden" name="userIDHash"
                    value="<?php 
echo buckys_encrypt_id($TNB_GLOBALS['user']['userID']);
?>
"/>
            </form>

        </section>
    </section>
</section>
<script type="text/javascript">
    jQuery('#changepwdform').submit(function (){
        var form = $(this);
        var isValid = true;

        if(form.find('#currentPassword').val() == ''){
            form.find('#currentPassword').addClass('input-error');
            isValid = false;
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:31,代码来源:change_password.php

示例7: render_single_comment

function render_single_comment($comment, $userID = null, $isReturn = false)
{
    global $BUCKYS_GLOBALS;
    $timeOffset = 0;
    if (buckys_not_null($userID)) {
        $userInfo = BuckysUser::getUserBasicInfo($userID);
        $timeOffset = $BUCKYS_GLOBALS['timezone'][$userInfo['timezone']];
    }
    ob_start();
    ?>
    <div class="comment-item">                 
        <a href="/profile.php?user=<?php 
    echo $comment['commenter'];
    ?>
" class="thumb"><img src="<?php 
    echo BuckysUser::getProfileIcon($comment['commenter']);
    ?>
" class="replyToPostIcons" /></a>
        <div class="comment-content">
            <a href="/profile.php?user=<?php 
    echo $comment['commenter'];
    ?>
" style="font-weight:bold"><?php 
    echo $comment['fullName'];
    ?>
</a>
            <br/>
            <?php 
    echo $comment['content'];
    ?>
            <br/>
            <span style=" color:#999999; "><?php 
    echo buckys_format_date($comment['posted_date']);
    ?>
</span> 
            
            <?php 
    if ($comment['commenter'] == $userID || $comment['poster'] == $userID) {
        ?>
            &middot;
            <a href="/comments.php?action=delete-comment&userID=<?php 
        echo $userID;
        ?>
&commentID=<?php 
        echo $comment['commentID'];
        ?>
&postID=<?php 
        echo $comment['postID'];
        ?>
" class="remove-comment-link">Delete</a>
            <?php 
    }
    if (buckys_not_null($userID) && !$comment['reportID'] && ($comment['commenter'] != $userID && $comment['poster'] != $userID)) {
        ?>
            &middot; <a href="/report_object.php" data-type="comment" data-id="<?php 
        echo $comment['commentID'];
        ?>
" data-idHash="<?php 
        echo buckys_encrypt_id($comment['commentID']);
        ?>
" class="report-link" style="color:#999999;">Report</a>
            <?php 
    }
    ?>
        </div>        
    </div>
    <?php 
    $html = ob_get_contents();
    ob_end_clean();
    if (!$isReturn) {
        echo $html;
    } else {
        return $html;
    }
}
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:75,代码来源:view.php

示例8: dirname

<?php

require dirname(__FILE__) . '/includes/bootstrap.php';
//Getting Current User ID
if (!buckys_check_user_acl(USER_ACL_REGISTERED)) {
    buckys_redirect('/index.php', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
}
if (isset($_POST['action']) && $_POST['action'] == 'get-users') {
    $users = BuckysUser::searchUsers($_REQUEST['term'], $userID);
    $result = [];
    foreach ($users as $row) {
        $result[] = ["id" => $row['userID'], 'label' => $row['fullName'], 'value' => $row['fullName'], 'hash' => buckys_encrypt_id($row['userID'])];
    }
    echo json_encode($result);
    buckys_exit();
}
if (isset($_POST['action']) && $_POST['action'] == 'send-money') {
    if (!isset($_POST['receiverID']) || !isset($_POST['receiverIDHash']) || !isset($_POST['amount']) || !buckys_check_id_encrypted($_POST['receiverID'], $_POST['receiverIDHash'])) {
        buckys_redirect('/credits.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
    }
    $result = BuckysTransaction::sendCredits($_POST['receiverID'], $_POST['amount']);
    if ($result === true) {
        buckys_redirect('/credits.php', MSG_SENT_CREDITS_SUCCESSFULLY);
    } else {
        buckys_redirect('/credits.php', $result, MSG_TYPE_ERROR);
    }
    exit;
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$totalCount = BuckysTransaction::getNumOfCreditActivities($userID);
//Init Pagination Class
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:31,代码来源:credits.php

示例9: buckys_encrypt_id

                                        class="block-link">Delete</a>
                                <?php 
        }
        ?>


                                <?php 
        if (buckys_is_logged_in() && $userID != $row['creatorID']) {
            ?>
                                    <a href="/report_object.php" data-type="reply"
                                        data-id="<?php 
            echo $row['replyID'];
            ?>
"
                                        data-idHash="<?php 
            echo buckys_encrypt_id($row['replyID']);
            ?>
"
                                        class="report-link">
                                        <?php 
            echo !$row['reportID'] ? 'Report' : 'You reported this.';
            ?>
                                    </a>
                                <?php 
        }
        ?>
								
                            </span>
                            </td>
                        </tr>
                    <?php 
开发者ID:ravi50041,项目名称:Social-Network-Website,代码行数:31,代码来源:topic.php

示例10: buckys_encrypt_id

                                    <input type="submit" id="save-btn" class="redButton" value="Post"
                                        style="display:block;"/>

                                    <div class="file-row">
                                        <input type="button" id="file_upload" name="file_upload" type="file"/>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <div id="jcrop-row"></div>
                                <input type="hidden" name="action" value="submit-post"/> <input type="hidden"
                                    name="pageID" value="<?php 
        echo $pageData['pageID'];
        ?>
"> <input type="hidden"
                                    name="pageIDHash" value="<?php 
        echo buckys_encrypt_id($pageData['pageID']);
        ?>
">
                                <input type="hidden" name="x1" id="x1" value="0"/> <input type="hidden" name="x2"
                                    id="x2" value="0"/> <input type="hidden" name="y1" id="y1" value="0"/> <input
                                    type="hidden" name="y2" id="y2" value="0"/> <input type="hidden" name="width"
                                    id="width" value="0"/> <input type="hidden" name="type" id="type" value="text"/>
                                <?php 
        render_form_token();
        ?>
                                <?php 
        render_loading_wrapper();
        ?>
                            </form>
                        </div>
                        <div class="clear"></div>
开发者ID:ravi50041,项目名称:Social-Network-Website,代码行数:31,代码来源:page.php

示例11: base64_encode

">Approve Friend Request</a> <br/>
                <a href="/myfriends.php?action=decline&friendID=<?php 
                echo $profileID;
                ?>
&return=<?php 
                echo base64_encode("/profile.php?user=" . $profileID);
                ?>
">Decline Friend Request</a> <br/>
                <?php 
            } else {
                ?>
                <a href="/myfriends.php?action=request&friendID=<?php 
                echo $profileID;
                ?>
&friendIDHash=<?php 
                echo buckys_encrypt_id($profileID);
                ?>
&return=<?php 
                echo base64_encode("/profile.php?user=" . $profileID);
                ?>
">Send Friend Request</a> <br/>
                <?php 
            }
        }
    }
    //Show Message
    ?>
        <a href="/messages_compose.php?to=<?php 
    echo $profileID;
    ?>
">Send Message</a> <br/>
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:profile_left_sidebar.php

示例12: render_report_link

/**
 * Render report object link
 *
 * @param mixed  $objectID
 * @param string $reportType
 * @param mixed  $ownerID
 * @param mixed  $userID
 * @param bool   $reportID
 * @param string $prefix
 */
function render_report_link($objectID, $reportType = 'post', $ownerID = null, $userID = null, $reportID = false, $prefix = '')
{
    if ($userID) {
        if ($ownerID != $userID && !$reportID) {
            //Show Report Link
            echo $prefix;
            ?>
            <a href="/report_object.php" data-type="<?php 
            echo $reportType;
            ?>
" data-id="<?php 
            echo $objectID;
            ?>
"
                data-idHash="<?php 
            echo buckys_encrypt_id($objectID);
            ?>
" class="report-link">Report</a>
        <?php 
        }
        //Show Moderator Link
        if (buckys_check_user_acl(USER_ACL_MODERATOR) && $reportID) {
            $item_title = '';
            switch ($reportType) {
                case 'post':
                case 'topic':
                case 'reply':
                    $item_title = 'Post';
                    break;
                case 'comment':
                case 'video_comment':
                    $item_title = 'Comment';
                    break;
                case 'message':
                    $item_title = 'Message';
                    break;
                case 'trade_item':
                case 'shop_item':
                    $item_title = 'Item';
                    break;
            }
            ?>
            <?php 
            echo $prefix;
            ?>
            <span class="moderator-action-links">
                <a href="/reported.php?action=delete-objects&reportID=<?php 
            echo $reportID;
            ?>
">Delete <?php 
            echo $item_title;
            ?>
</a>
                &middot;
                <a href="/reported.php?action=approve-objects&reportID=<?php 
            echo $reportID;
            ?>
">Approve <?php 
            echo $item_title;
            ?>
</a>
                &middot;
                <a href="/reported.php?action=ban-users&reportID=<?php 
            echo $reportID;
            ?>
">Ban User</a>                                
            </span>
        <?php 
        }
    }
}
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:81,代码来源:view.php

示例13: buckys_check_id_encrypted

/**
* Check ID Encrypted Value 
*/
function buckys_check_id_encrypted($gID, $encrypted)
{
    if (!isset($_SESSION['user_encrypt_salt'])) {
        return false;
        /*if( $userID != $encrypted )
              return false;
          else
              return true;*/
    } else {
        if (buckys_encrypt_id($gID) == $encrypted) {
            return true;
        } else {
            return false;
        }
    }
}
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:19,代码来源:general.php

示例14: buckys_encrypt_id

                    </div>
                    <div class="row">
                        <label>Subject: </label> <span><b><?php 
echo $message['subject'];
?>
</b></span>
                        <?php 
if ($userID != $message['sender'] && !$message['reportID']) {
    ?>
                            <a href="/report_object.php" data-type="message"
                                data-id="<?php 
    echo $message['messageID'];
    ?>
"
                                data-idHash="<?php 
    echo buckys_encrypt_id($message['messageID']);
    ?>
"
                                class="report-link">Report</a>
                        <?php 
}
?>
                        <?php 
if (buckys_check_user_acl(USER_ACL_MODERATOR) && $message['reportID']) {
    ?>
                            <span class="moderator-action-links">
                                <a href="/reported.php?action=approve-objects&reportID=<?php 
    echo $message['reportID'];
    ?>
">Approve Message</a>
                                &middot;
开发者ID:ravi50041,项目名称:Social-Network-Website,代码行数:31,代码来源:messages_read.php

示例15: buckys_encrypt_id

</a>
                        <p><?php 
    echo $row['candidateText'];
    ?>
</p>
                        <?php 
    if (buckys_check_user_acl(USER_ACL_ADMINISTRATOR)) {
        ?>
                        <a href="/moderator.php?type=<?php 
        echo $moderatorType;
        ?>
&action=choose-moderator&id=<?php 
        echo $row['candidateID'];
        ?>
&idHash=<?php 
        echo buckys_encrypt_id($row['candidateID']);
        ?>
" class="redButton">Choose Moderator</a>
                        <?php 
    }
    ?>
                    </div>                    
                    <div class="clear"></div>
                </div>
                <?php 
}
?>
            </div>
            <br />
            <br />
            <?php 
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:moderator.php


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