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


PHP buckys_redirect函数代码示例

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


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

示例1: applyCandidate

 /**
  * Apply For Moderator
  * 
  * @param Int $userID
  * @param String $type
  * @param String $text
  */
 public function applyCandidate($userID, $type, $text)
 {
     global $db, $BUCKYS_GLOBALS;
     if (!in_array($type, $BUCKYS_GLOBALS['moderatorTypes'])) {
         buckys_redirect('/account.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
         return;
     }
     $typeID = array_search($type, $BUCKYS_GLOBALS['moderatorTypes']);
     //Check whether the user has already applied or not
     $query = $db->prepare("SELECT candidateID FROM " . TABLE_MODERATOR_CANDIDATES . " WHERE userID=%d AND candidateType=%d", $userID, $typeID);
     $candidateID = $db->getVar($query);
     if ($candidateID) {
         buckys_redirect('/moderator.php?type=' . $type, MSG_ALREADY_APPLIED_THE_MODERATOR, MSG_TYPE_ERROR);
         return;
     }
     $text = trim($text);
     if (!$text) {
         buckys_redirect('/moderator.php?type=' . $type, MSG_TELL_US_WHY_YOU_WOULD_MAKE_MODERATOR, MSG_TYPE_ERROR);
         return;
     }
     //Save Candidate
     $newID = $db->insertFromArray(TABLE_MODERATOR_CANDIDATES, array('candidateType' => $typeID, 'userID' => $userID, 'candidateText' => $text, 'votes' => 0, 'appliedDate' => date('Y-m-d H:i:s')));
     if (!$newID) {
         buckys_redirect('/moderator.php?type=' . $type, $db->getLastError(), MSG_TYPE_ERROR);
         return;
     }
     return true;
 }
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:35,代码来源:class.BuckysModerator.php

示例2: buckys_redirect

}
if ($moderatorType == MODERATOR_FOR_TRADE && !BuckysModerator::isModerator($BUCKYS_GLOBALS['user']['userID'], MODERATOR_FOR_TRADE)) {
    buckys_redirect('/index.php', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
}
if (isset($_REQUEST['action'])) {
    if ($_REQUEST['action'] == 'delete-objects') {
        BuckysReport::deleteObjects($_REQUEST['reportID'], $reportType, $moderatorType);
        buckys_redirect('/reported.php?type=' . $reportType, MSG_REPORTED_OBJECT_REMOVED);
    } else {
        if ($_REQUEST['action'] == 'approve-objects') {
            BuckysReport::approveObjects($_REQUEST['reportID'], $reportType, $moderatorType);
            buckys_redirect('/reported.php?type=' . $reportType, MSG_REPORTED_OBJECT_APPROVED);
        } else {
            if ($_REQUEST['action'] == 'ban-users') {
                BuckysReport::banUsers($_REQUEST['reportID'], $reportType, $moderatorType);
                buckys_redirect('/reported.php?type=' . $reportType, MSG_BAN_USERS);
            }
        }
    }
    exit;
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$totalCount = BuckysReport::getReportedObjectCount($reportType);
//Init Pagination Class
$pagination = new Pagination($totalCount, BuckysReport::$COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
$objects = BuckysReport::getReportedObject($reportType, $page, BuckysReport::$COUNT_PER_PAGE);
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('moderator.css');
buckys_enqueue_stylesheet('moderator.css');
buckys_enqueue_stylesheet('prettify.css');
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:reported.php

示例3: dirname

<?php

require dirname(dirname(__FILE__)) . '/includes/bootstrap.php';
if (!($userID = buckys_is_logged_in())) {
    buckys_redirect('/index.php', MSG_NOT_LOGGED_IN_USER, MSG_TYPE_ERROR);
}
buckys_enqueue_stylesheet('trade.css');
buckys_enqueue_javascript('trade.js');
$BUCKYS_GLOBALS['content'] = 'trade/offer_received';
$BUCKYS_GLOBALS['headerType'] = 'trade';
$paramCurrentPage = get_secure_integer($_REQUEST['page']);
$paramTargetID = get_secure_integer($_REQUEST['targetID']);
$view = array();
//Get offer_received info
$tradeOfferIns = new BuckysTradeOffer();
$view['offers'] = $tradeOfferIns->getOfferReceived($userID, $paramTargetID);
$view['offers'] = buckys_trade_pagination($view['offers'], '/trade/offer_received.php', $paramCurrentPage, TRADE_ROWS_PER_PAGE);
$BUCKYS_GLOBALS['title'] = 'Offer Received - BuckysRoomTrade';
//Mark the activity (offer received) as read
$tradeNotificationIns = new BuckysTradeNotification();
$tradeNotificationIns->markAsRead($userID, BuckysTradeNotification::ACTION_TYPE_OFFER_RECEIVED);
$tradeOfferIns->markAsRead($userID, BuckysTradeOffer::STATUS_OFFER_ACTIVE);
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:23,代码来源:offer_received.php

示例4: dirname

<?php

require dirname(dirname(__FILE__)) . '/includes/bootstrap.php';
if (!buckys_check_user_acl(USER_ACL_REGISTERED)) {
    buckys_redirect('/forum', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
}
if (isset($_POST['action'])) {
    if ($_POST['action'] == 'create-topic') {
        $result = BuckysForumTopic::createTopic($_POST);
        if ($result == 'publish' || $result == 'pending') {
            buckys_redirect("/forum", MSG_TOPIC_POSTED_SUCCESSFULLY . ($result == 'pending' ? ' ' . MSG_POST_IS_UNDER_PREVIEW : ''), MSG_TYPE_SUCCESS);
        } else {
            buckys_redirect("/forum/create_topic.php", $result, MSG_TYPE_ERROR);
        }
    }
}
$curCatID = isset($_GET['category']) ? $_GET['category'] : 0;
$categories = BuckysForumCategory::getAllCategories();
buckys_enqueue_stylesheet('editor/jquery.cleditor.css');
buckys_enqueue_stylesheet('uploadify.css');
buckys_enqueue_stylesheet('forum.css');
buckys_enqueue_javascript('jquery-migrate-1.2.0.js');
buckys_enqueue_javascript('uploadify/jquery.uploadify.js');
buckys_enqueue_javascript('editor/jquery.cleditor.js');
//buckys_enqueue_javascript('editor/jquery.cleditor.bbcode.js');
$view['action_type'] = 'create';
$BUCKYS_GLOBALS['headerType'] = 'forum';
$BUCKYS_GLOBALS['content'] = 'forum/create_topic';
$BUCKYS_GLOBALS['title'] = 'Create a New Topic - BuckysRoomForum';
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:30,代码来源:create_topic.php

示例5: dirname

<?php

require dirname(__FILE__) . '/includes/bootstrap.php';
//Getting Current User ID
$userID = buckys_is_logged_in();
$pageIns = new BuckysPage();
$pageFollowerIns = new BuckysPageFollower();
$paramPageID = isset($_GET['pid']) ? intval($_GET['pid']) : null;
$pageData = $pageIns->getPageByID($paramPageID);
//If the parameter is null, goto homepage
if (!buckys_not_null($pageData)) {
    buckys_redirect('/index.php');
}
$page = isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 1;
$totalCount = $pageFollowerIns->getNumberOfFollowers($pageData['pageID']);
$pagination = new Pagination($totalCount, BuckysPageFollower::COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
//Get Friends
$view['followers'] = $pageFollowerIns->getFollowers($pageData['pageID'], $page, BuckysPageFollower::COUNT_PER_PAGE);
$view['pageData'] = $pageData;
buckys_enqueue_stylesheet('profile.css');
buckys_enqueue_stylesheet('friends.css');
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('stream.css');
buckys_enqueue_stylesheet('posting.css');
buckys_enqueue_stylesheet('uploadify.css');
buckys_enqueue_stylesheet('jquery.Jcrop.css');
buckys_enqueue_stylesheet('page.css');
buckys_enqueue_javascript('uploadify/jquery.uploadify.js');
buckys_enqueue_javascript('jquery.Jcrop.js');
buckys_enqueue_javascript('jquery.color.js');
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:followers.php

示例6: buckys_redirect

        } else {
            buckys_redirect('/forum/pending_topics.php', $result, MSG_TYPE_ERROR);
        }
    } else {
        if ($action == 'delete-topic') {
            // Delete Pending Topics
            //Getting Ids
            $topicIds = isset($_POST['tid']) ? $_POST['tid'] : null;
            if (!$topicIds) {
                buckys_redirect('/forum/pending_topcis.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
            }
            $result = BuckysForumTopic::deletePendingTopics($topicIds);
            if ($result === true) {
                buckys_redirect('/forum/pending_topics.php', MSG_TOPIC_REMOVED_SUCCESSFULLY);
            } else {
                buckys_redirect('/forum/pending_topics.php', $result, MSG_TYPE_ERROR);
            }
        }
    }
}
//Getting Pending Topics
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$total = BuckysForumTopic::getTotalNumOfTopics('pending');
$pagination = new Pagination($total, BuckysForumTopic::$COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
$topics = BuckysForumTopic::getTopics($page, 'pending', null, null, BuckysForumTopic::$COUNT_PER_PAGE);
buckys_enqueue_javascript('jquery-migrate-1.2.0.js');
buckys_enqueue_stylesheet('forum.css');
buckys_enqueue_stylesheet('publisher.css');
$TNB_GLOBALS['headerType'] = 'forum';
$TNB_GLOBALS['content'] = 'forum/pending_topics';
开发者ID:ravi50041,项目名称:Social-Network-Website,代码行数:31,代码来源:pending_topics.php

示例7: buckys_redirect

//Getting Album
$album = BuckysAlbum::getAlbum($albumID);
//Getting Photos
$myphotos = BuckysPost::getPhotosByUserID($userID, $userID, BuckysPost::INDEPENDENT_POST_PAGE_ID, true);
$albumPhotos = BuckysAlbum::getPhotos($albumID);
//Getting Album Photos
if (isset($_POST['action'])) {
    //Create New Album
    if ($_POST['action'] == 'save-album') {
        //If the album title is empty, throw error
        //If the album title is empty, throw error
        if (trim($_POST['album_name']) == '') {
            buckys_redirect('/photo_album_edit.php?albumID=' . $_POST['albumID'], MSG_ALBUM_TITLE_EMPTY, MSG_TYPE_ERROR);
        }
        BuckysAlbum::updateAlbum($_POST['albumID'], trim($_POST['album_name']), $_POST['visibility'], $_POST['photos']);
        buckys_redirect("/photo_album_edit.php?albumID=" . $_POST['albumID'], MSG_ALBUM_UPDATED);
    } else {
        if ($_POST['action'] == 'remove-from-album' || $_POST['action'] == 'add-to-album') {
            $photoID = $_POST['photoID'];
            $photo = BuckysPost::getPostById($photoID);
            //Check Photo Owner
            if ($photo['poster'] != $userID) {
                echo MSG_INVALID_REQUEST;
                exit;
            }
            if ($_POST['action'] == 'remove-from-album') {
                BuckysAlbum::removePhotoFromAlbum($albumID, $photoID);
            } else {
                BuckysAlbum::addPhotoToAlbum($albumID, $photoID);
            }
            //Add
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:photo_album_edit.php

示例8: dirname

<?php

require dirname(__FILE__) . '/includes/bootstrap.php';
if (!($userID = buckys_is_logged_in())) {
    buckys_redirect('/index.php', MSG_NOT_LOGGED_IN_USER, MSG_TYPE_ERROR);
}
//Action Process
if (isset($_POST['action']) && $_POST['action'] == 'submit-post') {
    //Save Post
    BuckysPost::savePost($userID, $_POST);
    if (isset($_POST['pageID']) && is_numeric($_POST['pageID'])) {
        buckys_redirect('/page.php?pid=' . $_POST['pageID']);
    } else {
        buckys_redirect('/account.php');
    }
} else {
    if (isset($_GET['action']) && $_GET['action'] == 'delete-post') {
        //Delete Post
        if ($userID != $_GET['userID'] || !BuckysPost::deletePost($userID, $_GET['postID'])) {
            echo 'Invalid Request';
        } else {
            echo 'success';
        }
        exit;
    } else {
        if (isset($_GET['action']) && ($_GET['action'] == 'unlikePost' || $_GET['action'] == 'likePost')) {
            $post = BuckysPost::getPostById($_GET['postID']);
            if ($post['post_status'] != 1) {
                render_result_xml(array('status' => 'error', 'message' => MSG_INVALID_REQUEST));
                exit;
            }
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:manage_post.php

示例9: buckys_redirect

}
if (isset($_POST['action'])) {
    if ($_POST['action'] == 'create-topic') {
        $result = BuckysForumTopic::createTopic($_POST);
        if (!$result) {
            buckys_redirect("/forum/create_topic.php", $result, MSG_TYPE_ERROR);
        } else {
            $return = isset($_POST['return']) ? base64_decode($_POST['return']) : "/forum/topic.php?id=" . $result;
            buckys_redirect($return);
        }
    }
}
$curCatID = isset($_GET['category']) ? $_GET['category'] : 0;
if (!$curCatID || !($category = BuckysForumCategory::getCategory($curCatID))) {
    buckys_redirect("/forum", MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
if (BuckysForumModerator::isBlocked($userID, $category['categoryID'])) {
    buckys_redirect("/forum/category.php?id=" . $category['categoryID'], MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
}
$categories = BuckysForumCategory::getAllCategories();
buckys_enqueue_stylesheet('sceditor/themes/default.css');
buckys_enqueue_stylesheet('forum.css');
buckys_enqueue_stylesheet('publisher.css');
buckys_enqueue_stylesheet('uploadify.css');
buckys_enqueue_javascript('sceditor/jquery.sceditor.bbcode.js');
buckys_enqueue_javascript('uploadify/jquery.uploadify.js');
$view['action_type'] = 'create';
$TNB_GLOBALS['headerType'] = 'forum';
$TNB_GLOBALS['content'] = 'forum/create_topic';
$TNB_GLOBALS['title'] = 'Start a New Topic - thenewboston Forum';
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:31,代码来源:create_topic.php

示例10: buckys_redirect

$userData = BuckysUser::getUserBasicInfo($userID);
if (isset($_GET['to'])) {
    $receiver = BuckysUser::getUserData($_GET['to']);
}
if (isset($_POST['action'])) {
    //Check the user id is same with the current logged user id
    if ($_POST['userID'] != $userID) {
        echo 'Invalid Request!';
        exit;
    }
    //Save Address
    if ($_POST['action'] == 'delete_messages') {
        if (!BuckysMessage::deleteMessages($_POST['messageID'])) {
            buckys_redirect('/messages_sent.php', "Error: " . $db->getLastError(), MSG_TYPE_ERROR);
        } else {
            buckys_redirect('/messages_sent.php', MSG_MESSAGE_REMOVED, MSG_TYPE_SUCCESS);
        }
        exit;
    }
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$totalCount = BuckysMessage::getTotalNumOfMessages($userID, 'sent');
//Init Pagination Class
$pagination = new Pagination($totalCount, BuckysMessage::$COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
$messages = BuckysMessage::getSentMessages($userID, $page);
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('info.css');
buckys_enqueue_stylesheet('messages.css');
buckys_enqueue_javascript('jquery-ui.min.js');
buckys_enqueue_javascript('messages.js');
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:31,代码来源:messages_sent.php

示例11: dirname

require dirname(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);
}
$userID = buckys_is_logged_in();
$classAds = new BuckysAds();
//Add Funds
if (isset($_POST['action']) && $_POST['action'] == 'add-funds') {
    if (!buckys_check_form_token()) {
        buckys_redirect('/ads/advertiser.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
    }
    $adID = buckys_escape_query_integer($_POST['id']);
    $adDetail = $classAds->getAdById($adID);
    if (!$adDetail || $adDetail['ownerID'] != $userID && buckys_check_user_acl(USER_ACL_MODERATOR)) {
        buckys_redirect('/ads/advertiser.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
    }
    $result = $classAds->addFunds($userID, $adID, $_POST['amount']);
    buckys_add_message($classAds->last_message, $result ? MSG_TYPE_SUCCESS : MSG_TYPE_ERROR);
}
buckys_enqueue_stylesheet('publisher.css');
$adID = buckys_escape_query_integer($_GET['id']);
$adDetail = $classAds->getAdById($adID);
if (!$adDetail || $adDetail['ownerID'] != $userID && buckys_check_user_acl(USER_ACL_MODERATOR)) {
    buckys_redirect('/ads/advertiser.php');
}
$TNB_GLOBALS['headerType'] = "ads";
$TNB_GLOBALS['content'] = "ads/view";
buckys_enqueue_javascript('jquery.number.js');
$TNB_GLOBALS['title'] = "View Ad - thenewboston Ads";
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:31,代码来源:view.php

示例12: buckys_redirect

    //Confirm that the user is administrator
    if (!buckys_check_user_acl(USER_ACL_ADMINISTRATOR)) {
        buckys_redirect('/moderator.php?type=' . $moderatorType, MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
    }
    //Check the url parameters is correct
    if (!isset($_GET['id']) || !isset($_GET['idHash']) || !buckys_check_id_encrypted($_GET['id'], $_GET['idHash'])) {
        buckys_redirect('/moderator.php?type=' . $moderatorType, MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
    }
    BuckysModerator::chooseModerator($_GET['id']);
    buckys_redirect('/moderator.php?type=' . $moderatorType);
}
//Process Actions
if (isset($_POST['action'])) {
    if ($_POST['action'] == 'apply_candidate') {
        $newID = BuckysModerator::applyCandidate($userID, $moderatorType, $_POST['moderator_text']);
        buckys_redirect('/moderator.php?type=' . $moderatorType, MSG_APPLY_JOB_SUCCESSFULLY);
    }
    if ($_POST['action'] == 'thumb-up' || $_POST['action'] == 'thumb-down') {
        if (!$_POST['candidateID'] || !$_POST['candidateIDHash'] || !buckys_check_id_encrypted($_POST['candidateID'], $_POST['candidateIDHash'])) {
            $data = array('status' => 'error', 'message' => MSG_INVALID_REQUEST);
        } else {
            $result = BuckysModerator::voteCandidate($userID, $_POST['candidateID'], $_POST['action'] == 'thumb-up' ? true : false);
            if (is_int($result)) {
                $data = array('status' => 'success', 'message' => MSG_THANKS_YOUR_VOTE, 'votes' => ($result > 0 ? "+" : "") . $result);
            } else {
                $data = array('status' => 'error', 'message' => $result);
            }
        }
        render_result_xml($data);
        exit;
    }
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:moderator.php

示例13: resetPassword

 /**
  * Create new password and send it to user
  * 
  * @param String $email
  */
 public function resetPassword($email)
 {
     global $db;
     $email = trim($email);
     if (!$email) {
         buckys_redirect('/register.php?forgotpwd=1', MSG_EMPTY_EMAIL, MSG_TYPE_ERROR);
         return;
     }
     //Check Email Address
     if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+\$/", $email)) {
         buckys_redirect('/register.php?forgotpwd=1', MSG_INVALID_EMAIL, MSG_TYPE_ERROR);
         return false;
     }
     $query = $db->prepare("SELECT userID FROM " . TABLE_USERS . " WHERE email=%s", $email);
     $userID = $db->getVar($query);
     if (!$userID) {
         buckys_redirect('/register.php?forgotpwd=1', MSG_EMAIL_NOT_FOUND, MSG_TYPE_ERROR);
         return false;
     }
     $data = BuckysUser::getUserData($userID);
     //Remove Old Token
     BuckysUsersToken::removeUserToken($userID, 'password');
     //Create New Token
     $token = BuckysUsersToken::createNewToken($userID, 'password');
     $link = "http://" . $_SERVER['HTTP_HOST'] . "/reset_password.php?token=" . $token;
     //Send an email to user with the link
     $title = "Reset your password.";
     $body = "Dear " . $data['firstName'] . " " . $data['lastName'] . "\n\n" . "Please reset your password by using the below link:\n" . $link . "\n\nBuckysroom.com";
     require_once DIR_FS_INCLUDES . "phpMailer/class.phpmailer.php";
     buckys_sendmail($data['email'], $data['firstName'] . " " . $data['lastName'], $title, $body);
     buckys_redirect('/register.php', MSG_RESET_PASSWORD_EMAIL_SENT, MSG_TYPE_SUCCESS);
     return;
 }
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:38,代码来源:class.BuckysUser.php

示例14: get_secure_integer

$view['action_name'] = 'editTradeItem';
$paramItemID = get_secure_integer($_REQUEST['id']);
$paramType = get_secure_string($_REQUEST['type']);
$view['item'] = null;
switch ($paramType) {
    case 'relist':
        /*
        $view['no_credits'] = false;
        if (!$tradeUserIns->hasCredits($userID)) {
            $view['no_credits'] = true;
        }
        */
        // Relist trade items with bitcoin or credits - now matches Shop code
        $userInfo = BuckysUser::getUserBasicInfo($userID);
        $view['my_bitcoin_balance'] = BuckysBitcoin::getUserWalletBalance($userID);
        $view['my_credit_balance'] = $userInfo['credits'];
        $view['item'] = $tradeItemIns->getItemById($paramItemID, true);
        $view['type'] = 'relist';
        $view['page_title'] = 'Relist an Item';
        break;
    default:
        $view['item'] = $tradeItemIns->getItemById($paramItemID, false);
        $view['type'] = 'edit';
        $view['page_title'] = 'Edit an Item';
        break;
}
if ($view['item'] == null || $view['item']['userID'] != $userID || $view['item']['status'] != BuckysTradeItem::STATUS_ITEM_ACTIVE) {
    buckys_redirect('/trade/available.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
$TNB_GLOBALS['title'] = 'Edit an Item - BuckysRoomTrade';
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
开发者ID:HAPwebsite,项目名称:Social-Network-Website,代码行数:31,代码来源:edititem.php

示例15: buckys_redirect

if (!($userID = buckys_is_logged_in())) {
    buckys_redirect('/index.php', MSG_NOT_LOGGED_IN_USER, MSG_TYPE_ERROR);
}
//Getting UserData from Id
$userData = BuckysUser::getUserData($profileID);
//Getting Albums
$albums = BuckysAlbum::getAlbumsByUserId($userID);
if (isset($_POST['action'])) {
    //Create New Album
    if ($_POST['action'] == 'create-album') {
        //If the album title is empty, throw error
        if (trim($_POST['new_album_name']) == '') {
            buckys_redirect('/photo_albums.php', MSG_ALBUM_TITLE_EMPTY, MSG_TYPE_ERROR);
        }
        $newId = BuckysAlbum::createAlbum($userID, trim($_POST['new_album_name']), $_POST['visibility']);
        buckys_redirect('/photo_albums.php');
    } else {
        if ($_POST['action'] == 'delete-album') {
            if (BuckysAlbum::deleteAlbum($_POST['albumID'], $userID)) {
                echo 'success';
            } else {
                echo 'error';
            }
            exit;
        }
    }
}
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('posting.css');
buckys_enqueue_javascript('album.js');
$BUCKYS_GLOBALS['content'] = 'photo_albums';
开发者ID:kishoreks,项目名称:BuckysRoom,代码行数:31,代码来源:photo_albums.php


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