Ejemplo n.º 1
0
$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');
buckys_enqueue_javascript('posts.js');
buckys_enqueue_javascript('add_post.js');
buckys_enqueue_javascript('page.js');
$BUCKYS_GLOBALS['content'] = 'followers';
$BUCKYS_GLOBALS['title'] = trim($pageData['title']) . "'s Followers - BuckysRoom";
//if logged user can see all resources of the current user
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
Ejemplo n.º 2
0
<?php

require dirname(dirname(__FILE__)) . '/includes/bootstrap.php';
buckys_enqueue_stylesheet('shop.css');
buckys_enqueue_javascript('shop.js');
$TNB_GLOBALS['content'] = 'shop/index';
$TNB_GLOBALS['headerType'] = 'shop';
//Get Top Users
$shopProductIns = new BuckysShopProduct();
$catIns = new BuckysShopCategory();
$view = [];
$view['recent_products'] = $shopProductIns->getRecentProducts(10);
$view['categories'] = $catIns->getCategoryList(0);
$TNB_GLOBALS['title'] = 'BuckysRoomShop - Buy and Sell Items with Bitcoin';
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 3
0
<?php

require dirname(__FILE__) . '/includes/bootstrap.php';
buckys_enqueue_stylesheet('search.css');
buckys_enqueue_javascript('search.js');
$searchIns = new BuckysSearch();
$TNB_GLOBALS['content'] = 'search';
$TNB_GLOBALS['headerType'] = '';
$paramQueryStr = buckys_escape_query_string($_REQUEST['q']);
$paramType = buckys_escape_query_string($_REQUEST['type']);
$paramSort = buckys_escape_query_string($_REQUEST['sort']);
$view = [];
//Create Base URL for pagination of search page
$view['page_base_url'] = buckys_pp_search_url($paramQueryStr, $paramType, $paramSort, true);
$page = isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 1;
$totalCount = $searchIns->getNumberOfSearchResult($paramQueryStr, $paramType);
$pagination = new Pagination($totalCount, BuckysSearch::SEARCH_RESULT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
//Get Friends
$view['search_result'] = $searchIns->search($paramQueryStr, $paramType, $paramSort, $page);
//Display
$TNB_GLOBALS['searchParamPP']['q'] = $paramQueryStr;
$TNB_GLOBALS['searchParamPP']['type'] = $paramType;
$TNB_GLOBALS['searchParamPP']['sort'] = $paramSort;
if ($paramQueryStr != '') {
    $TNB_GLOBALS['title'] = $paramQueryStr . ' - ' . TNB_SITE_NAME . ' Search';
} else {
    $TNB_GLOBALS['title'] = TNB_SITE_NAME . ' Search';
}
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 4
0
}
require_once DIR_FS_INCLUDES . "messages.php";
require_once DIR_FS_INCLUDES . "tables.php";
$db = new Database_Mysqli(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME);
require_once DIR_FS_FUNCTIONS . "session.php";
require_once DIR_FS_FUNCTIONS . "general.php";
require_once DIR_FS_FUNCTIONS . "view.php";
//Session Start
buckys_session_start();
//Init Global Values
buckys_enqueue_javascript('jquery-1.9.0.js', false, false);
buckys_enqueue_javascript('site.js');
buckys_enqueue_stylesheet('main.css');
$BUCKYS_GLOBALS['template'] = DEFAULT_THEME;
$BUCKYS_GLOBALS['layout'] = 'layout';
$BUCKYS_GLOBALS['headerType'] = 'default';
//Define User Acl Constants
BuckysUserAcl::defineAclConstants();
//Set User Data into Global Variable
if (!($userID = buckys_is_logged_in())) {
    $BUCKYS_GLOBALS['user'] = array('userID' => 0, 'user_type' => 'Public', 'aclLevel' => 0, 'aclName' => 'Public');
} else {
    $BUCKYS_GLOBALS['user'] = BuckysUser::getUserBasicInfo($userID);
}
if (buckys_is_logged_in()) {
    buckys_enqueue_stylesheet('footer.css');
    buckys_enqueue_stylesheet('jquery-ui/jquery-ui.css');
    buckys_enqueue_javascript('jquery-ui.min.js');
    buckys_enqueue_javascript('jquery.contextMenu.js');
    buckys_enqueue_javascript('private_messenger.js');
}
}
if (isset($_GET['reply'])) {
    $replyTo = BuckysMessage::getMessage($_GET['reply']);
}
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'] == 'compose_message') {
        //Show Results
        header('Content-type: application/xml');
        if (!BuckysMessage::composeMessage($_POST)) {
            render_result_xml(['status' => 'error', 'message' => buckys_get_messages()]);
        } else {
            render_result_xml(['status' => 'success', 'message' => buckys_get_messages()]);
        }
        exit;
    }
}
buckys_enqueue_stylesheet('jquery-ui/jquery-ui.css');
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');
$TNB_GLOBALS['content'] = 'messages_compose';
$TNB_GLOBALS['title'] = "Compose Message - " . TNB_SITE_NAME;
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 6
0
}
//Getting Activity Stream
$stream = BuckysPost::getUserPostsStream($userID);
//Get Activities
$activities = BuckysActivity::getActivities($userID);
if (!$activities) {
    $activities = [];
}
//Get Notifications
$notifications = BuckysActivity::getNotifications($userID);
//Mark the notifications to read
BuckysActivity::markReadNotifications($userID);
if (!$notifications) {
    $notifications = [];
}
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_javascript('uploadify/jquery.uploadify.js');
buckys_enqueue_javascript('jquery.Jcrop.js');
buckys_enqueue_javascript('jquery.color.js');
buckys_enqueue_javascript('posts.js');
buckys_enqueue_javascript('add_post.js');
buckys_enqueue_javascript('account.js');
//Set Content
$TNB_GLOBALS['content'] = 'account';
//Page Title
$TNB_GLOBALS['title'] = 'My Account - ' . TNB_SITE_NAME;
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 7
0
<?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";
Ejemplo n.º 8
0
<?php

require dirname(__FILE__) . '/includes/bootstrap.php';
$userID = buckys_is_logged_in();
buckys_enqueue_stylesheet('index.css');
$BUCKYS_GLOBALS['content'] = "developers";
$BUCKYS_GLOBALS['title'] = "Developers - BuckysRoom";
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
            $userID = buckys_is_logged_in();
            $replyID = isset($_GET['replyID']) ? get_secure_integer($_GET['replyID']) : null;
            $replyData = $forumReplyIns->getReplyByID($replyID);
            if ($replyData && $replyData['creatorID'] == $userID && $replyData['topicID'] == $topicID) {
                //then you can edit this one
                $view['replyData'] = $replyData;
                $view['action_type'] = 'edit';
                $view['replyID'] = $replyID;
            } else {
                //permission error
                buckys_redirect('/forum', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
            }
        }
    }
}
if (!isset($replyData) || !$replyData) {
    buckys_redirect("/forum", MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
$topicData = BuckysForumTopic::getTopic($replyData['replyID']);
$category = BuckysForumCategory::getCategory($topicData['categoryID']);
$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');
$TNB_GLOBALS['headerType'] = 'forum';
$TNB_GLOBALS['content'] = 'forum/post_reply';
$TNB_GLOBALS['title'] = 'Post Reply - thenewboston Forum';
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 10
0
<?php

require dirname(__FILE__) . '/includes/bootstrap.php';
buckys_enqueue_stylesheet('static.css');
$TNB_GLOBALS['content'] = "faq";
$TNB_GLOBALS['title'] = "FAQ - " . TNB_SITE_NAME;
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
<?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);
}
buckys_enqueue_stylesheet('trade.css');
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_javascript('trade.js');
$TNB_GLOBALS['content'] = 'shipping_info';
//$TNB_GLOBALS['headerType'] = 'trade';
$view = [];
$paramFillShippingInfoFromShop = get_secure_integer($_REQUEST['fill']);
if ($paramFillShippingInfoFromShop == 'shop') {
    buckys_add_message('Before buying an item, you must fill out your shipping information in order to determine shipping fees.', MSG_TYPE_ERROR);
}
//Save Shipping info
$tradeUserIns = new BuckysTradeUser();
$countryIns = new BuckysCountry();
if ($_POST['action'] == 'saveShippingInfo') {
    $paramData = ['shippingAddress' => $_POST['shippingAddress'], 'shippingAddress2' => $_POST['shippingAddress2'], 'shippingCity' => $_POST['shippingCity'], 'shippingState' => $_POST['shippingState'], 'shippingZip' => $_POST['shippingZip'], 'shippingCountryID' => $_POST['shippingCountryID']];
    $retVal = $tradeUserIns->updateShippingInfo($userID, $paramData);
    if ($retVal == false) {
        $view['status'] = ['success' => false, 'message' => 'Something goes wrong! Please contact customer support.'];
    } else {
        $view['status'] = ['success' => true, 'message' => 'Your shipping info has been updated successfully.'];
    }
}
//Get offer_received info
$view['trade_user_info'] = $tradeUserIns->getUserByID($userID);
$view['country_list'] = $countryIns->getCountryList();
Ejemplo n.º 12
0
    } else {
        if ($action == 'delete-reply') {
            // Delete Pending Topics
            //Getting Ids
            $replyIds = isset($_POST['rid']) ? $_POST['rid'] : null;
            if (!$replyIds) {
                buckys_redirect('/forum/pending_topcis.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
            }
            $result = BuckysForumReply::deletePendingReplies($replyIds);
            if ($result === true) {
                buckys_redirect('/forum/pending_replies.php', MSG_REPLY_REMOVED_SUCCESSFULLY);
            } else {
                buckys_redirect('/forum/pending_replies.php', $result, MSG_TYPE_ERROR);
            }
        }
    }
}
//Getting Pending Topics
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$total = BuckysForumReply::getTotalNumOfReplies(null, 'pending');
$pagination = new Pagination($total, BuckysForumTopic::$COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
$replies = BuckysForumReply::getReplies(null, 'pending', $page);
buckys_enqueue_javascript('prettyprint/run_prettify.js');
buckys_enqueue_javascript('jquery-migrate-1.2.0.js');
buckys_enqueue_stylesheet('forum.css');
buckys_enqueue_stylesheet('prettify.css');
$BUCKYS_GLOBALS['headerType'] = 'forum';
$BUCKYS_GLOBALS['content'] = 'forum/pending_replies';
$BUCKYS_GLOBALS['title'] = 'Pending Replies - BuckysRoomForum';
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
Ejemplo n.º 13
0
if ($remindTimeString == '') {
    $remindTimeString = ceil($timeOffset / 60);
    if ($remindTimeString > 1) {
        $remindTimeString .= ' minutes';
    } else {
        $remindTimeString .= ' minute';
    }
}
if ($remindTimeString == '') {
    $remindTimeString = $timeOffset;
    if ($remindTimeString > 1) {
        $remindTimeString .= ' seconds';
    } else {
        $remindTimeString .= ' second';
    }
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$totalCount = BuckysModerator::getCandidatesCount($moderatorType);
//Getting Current Moderator
$currentModerator = BuckysModerator::getModerator($moderatorType);
//Init Pagination Class
$pagination = new Pagination($totalCount, BuckysModerator::$CANDIDATES_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
$candidates = BuckysModerator::getCandidates($moderatorType, $page);
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('moderator.css');
buckys_enqueue_javascript('moderator.js');
$BUCKYS_GLOBALS['content'] = 'moderator';
$BUCKYS_GLOBALS['title'] = "Moderator - BuckysRoom";
//if logged user can see all resources of the current user
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
require dirname(__FILE__) . '/includes/bootstrap.php';
//Getting Current User ID
$userID = buckys_is_logged_in();
//If the parameter is null, goto homepage
if ($userID) {
    buckys_redirect('/account.php');
}
$token = isset($_REQUEST['token']) ? $_REQUEST['token'] : '';
if (!$token) {
    buckys_redirect('/index.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
if (!($userID = BuckysUsersToken::checkTokenValidity($token, 'password'))) {
    buckys_redirect('/register.php?forgotpwd=1', MSG_USER_TOKEN_LINK_NOT_CORRECT, MSG_TYPE_ERROR);
}
if (isset($_POST['action']) && $_POST['action'] == 'reset-password') {
    if (!$_POST['password'] || !$_POST['password']) {
        buckys_add_message(MSG_EMPTY_PASSWORD, MSG_TYPE_ERROR);
    } else {
        if ($_POST['password'] != $_POST['password']) {
            buckys_add_message(MSG_NOT_MATCH_PASSWORD, MSG_TYPE_ERROR);
        } else {
            $pwd = buckys_encrypt_password($_POST['password']);
            BuckysUser::updateUserFields($userID, ['password' => $pwd]);
            buckys_redirect('/index.php', MSG_PASSWORD_UPDATED);
        }
    }
}
buckys_enqueue_stylesheet('register.css');
buckys_enqueue_javascript('register.js');
$TNB_GLOBALS['content'] = 'reset_password';
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 15
0
    $totalCount = BuckysFriend::getNumberOfFriends($userID);
} else {
    if ($type == 'pending') {
        $totalCount = BuckysFriend::getNumberOfPendingRequests($userID);
    } else {
        if ($type == 'requested') {
            $totalCount = BuckysFriend::getNumberOfReceivedRequests($userID);
        }
    }
}
//Init Pagination Class
$pagination = new Pagination($totalCount, BuckysFriend::$COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
if ($type == 'all') {
    $friends = BuckysFriend::getAllFriends($userID, $page, BuckysFriend::$COUNT_PER_PAGE);
} else {
    if ($type == 'pending') {
        $friends = BuckysFriend::getPendingRequests($userID, $page, BuckysFriend::$COUNT_PER_PAGE);
    } else {
        if ($type == 'requested') {
            $friends = BuckysFriend::getReceivedRequests($userID, $page, BuckysFriend::$COUNT_PER_PAGE);
        }
    }
}
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('friends.css');
buckys_enqueue_javascript('friends.js');
$TNB_GLOBALS['content'] = 'myfriends';
$TNB_GLOBALS['title'] = "My Friends - " . TNB_SITE_NAME;
//if logged user can see all resources of the current user
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 16
0
        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
            echo 'success';
            exit;
        }
    }
}
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('posting.css');
buckys_enqueue_javascript('album.js');
$BUCKYS_GLOBALS['content'] = 'photo_album_edit';
$BUCKYS_GLOBALS['title'] = "Edit Photo Album - BuckysRoom";
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
Ejemplo n.º 17
0
<?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";
Ejemplo n.º 18
0
    }
    if (!$toAddress) {
        buckys_redirect("/wallet.php", MSG_ENTER_BITCOINS_ADDRESS_OF_RECIPIENT, MSG_TYPE_ERROR);
    }
    if (!$amount || $amount <= 0) {
        buckys_redirect("/wallet.php", MSG_INVALID_BITCOIN_AMOUNT, MSG_TYPE_ERROR);
    }
    if (!$is_error) {
        $bitcoinClass->sendBitcoin($userID, $toAddress, $amount);
    }
    buckys_redirect("/wallet.php");
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
list($totalCount, $bitcoinBalance, $transactions) = $bitcoinClass->getTransactions($userID, $page, $bitcoinClass->COUNT_PER_PAGE);
if (!$bitcoinBalance) {
    $bitcoinBalance = 0;
}
//Init Pagination Class
$pagination = new Pagination($totalCount, $bitcoinClass->COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
//Getting Balance
//$bitcoinBalance = $bitcoinClass->getWalletBalance($bitcoinInfo['bitcoin_guid'], buckys_decrypt($bitcoinInfo['bitcoin_password']));
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('credits.css');
buckys_enqueue_javascript('wallet.js');
$TNB_GLOBALS['content'] = 'wallet';
$TNB_GLOBALS['title'] = "Wallet - " . TNB_SITE_NAME;
$TNB_GLOBALS['payerID'] = $userID;
$TNB_GLOBALS['meta'] = '<meta http-equiv="Pragma" content="no-cache">
                           <meta http-equiv="Cache-Control" content="no-cache">';
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 19
0
<?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);
}
$view = [];
//Save Shipping info
$tradeUserIns = new BuckysTradeUser();
if (isset($_POST['action']) && $_POST['action'] == 'saveNotifyInfo') {
    $result = BuckysUser::saveUserNotificationSettings($userID, $_POST);
    if ($result === true) {
        buckys_redirect('/notify.php', MSG_NOTIFICATION_SETTINGS_SAVED);
    } else {
        buckys_redirect('/notify.php', $result, MSG_TYPE_ERROR);
    }
}
//Get offer_received info
$view['trade_user_info'] = $tradeUserIns->getUserByID($userID);
$userNotifyInfo = BuckysUser::getUserNotificationSettings($userID);
if (empty($view['trade_user_info'])) {
    buckys_redirect('/index.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('info.css');
$TNB_GLOBALS['content'] = 'notify';
$TNB_GLOBALS['title'] = 'Notification Settings - ' . TNB_SITE_NAME;
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 20
0
                $message = "Your account is now active. You may now Log In.";
                break;
            case 1:
                $message = "That e-mail is already in use.";
                break;
            case 2:
                $message = "Thank you for registering! A confirmation has been sent to your email. Please click on the activation link to activate your account.";
                break;
            case 3:
                $message = "Please enter your e-mail.";
                break;
            case 4:
                $message = "That  is not a valid e-mail.";
                break;
            case 5:
                $message = "Password can not be empty.";
                break;
            case 6:
                $message = "E-mail or password was incorrect.";
                break;
            case 7:
                $message = "You must be friends with a user to reply to their post.";
                break;
        }
        //		echo $message;
    }
}
buckys_enqueue_stylesheet('forms.css');
buckys_enqueue_stylesheet('tables.css');
$BUCKYS_GLOBALS['content'] = 'prompt';
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";
if (!buckys_check_user_acl(USER_ACL_MODERATOR)) {
    buckys_redirect('/index.php', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
}
$classAds = new BuckysAds();
if (isset($_REQUEST['action'])) {
    if (!buckys_check_form_token()) {
        buckys_redirect('/index.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
    }
    if ($_REQUEST['action'] == 'reject-ads') {
        $classAds->rejectAds($_REQUEST['adID']);
        buckys_redirect('/manage_ads.php', MSG_AD_ADS_REJECTED);
    } else {
        if ($_REQUEST['action'] == 'approve-ads') {
            $classAds->approveAds($_REQUEST['adID']);
            buckys_redirect('/manage_ads.php', MSG_AD_ADS_APPROVED);
        }
    }
}
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$totalCount = $classAds->getPendingAdsCount();
//Init Pagination Class
$pagination = new Pagination($totalCount, BuckysAds::$COUNT_PER_PAGE, $page);
$page = $pagination->getCurrentPage();
$objects = $classAds->getPendingAds($page, BuckysAds::$COUNT_PER_PAGE);
buckys_enqueue_javascript('manage_ads.js');
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('moderator.css');
buckys_enqueue_stylesheet('publisher.css');
$TNB_GLOBALS['content'] = 'manage_ads';
$TNB_GLOBALS['title'] = "Moderator Panel";
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";
Ejemplo n.º 22
0
    //Get Prev, Next Video
    $prevVideoId = null;
    $nextVideoId = null;
    foreach ($categoryVideos as $idx => $v) {
        if ($v['videoID'] == $video['videoID']) {
            $nextVideoId = isset($categoryVideos[$idx + 1]) ? $categoryVideos[$idx + 1]['videoID'] : null;
            break;
        }
        $prevVideoId = $v['videoID'];
    }
    $subjectID = $category['subjectID'];
}
$videoSubject = $videoClass->getSubject($subjectID);
$videoCategories = $videoClass->getVideoCategories($subjectID);
if (isset($video)) {
    $videoInfo = $videoClass->getVideoInfo($video['code']);
}
buckys_enqueue_stylesheet('index.css');
buckys_enqueue_stylesheet('sceditor/themes/default.css');
buckys_enqueue_stylesheet('postlist.css');
buckys_enqueue_stylesheet('videos.css');
buckys_enqueue_javascript('sceditor/jquery.sceditor.bbcode.js');
buckys_enqueue_javascript('videos.js');
$TNB_GLOBALS['content'] = "videos";
/* Page title
if(isset($videoInfo))
    $TNB_GLOBALS['title'] = $videoInfo['entry']['title']['$t'];
else
*/
$TNB_GLOBALS['title'] = TNB_SITE_NAME . " Videos and Tutorials - Free Educational Video Tutorials on Computer Programming, Adobe Software, Computer Science and More!";
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";