</a> &gt;&gt; <a
                                href="/forum/category.php?id=<?php 
        echo $row['categoryID'];
        ?>
"
                                class="category-name"><?php 
        echo $row['categoryName'];
        ?>
</a> <br/>

                            <a href="/forum/topic.php?id=<?php 
        echo $row['topicID'];
        ?>
"
                                class="postdate"><?php 
        echo buckys_format_date($row['lastReplyDate']);
        ?>
</a>
                            &middot;
                            <a href="/forum/topic.php?id=<?php 
        echo $row['topicID'];
        ?>
"
                                class="post-replies"><?php 
        echo $row['replies'] . ($row['replies'] != 1 ? ' replies' : ' reply');
        ?>
</a>

                        </td>
                        <?php 
    }
Ejemplo n.º 2
0
            } else {
                echo $subCat['lastPostTitle'];
            }
            echo "</a><br />";
            ?>
                                    <a style="font-weight:bold;"
                                        href="/profile.php?user=<?php 
            echo $subCat['lastPosterID'];
            ?>
"><?php 
            echo $subCat['lastPosterName'];
            ?>
</a>
                                    <?php 
            echo '<span style="color: #999999;">';
            echo buckys_format_date($subCat['lastPostDate']);
            echo '</span>';
        } else {
            echo "-";
        }
        ?>
                            </td>
                            <td class="td-counts"><?php 
        echo $subCat['topics'];
        ?>
</td>
                            <td class="td-counts"><?php 
        echo $subCat['replies'];
        ?>
</td>
                        </tr>
Ejemplo n.º 3
0
                            <?php 
            echo '<span style="color:#999999;">';
            echo buckys_format_date($row['lastReplyDate']);
            echo '</span>';
        } else {
            ?>
                                <a style="font-weight:bold;" href="/profile.php?u=<?php 
            echo $row['creatorID'];
            ?>
"><?php 
            echo $row['creatorName'];
            ?>
</a>                            
                            <?php 
            echo '<span style="color:#999999;">';
            echo buckys_format_date($row['createdDate']);
            echo '</span>';
        }
        ?>
                        </td>
                    </tr>
                    <?php 
    }
    ?>
                                      
                </tbody>            
                <?php 
} else {
    ?>
                    
                <tbody>
Ejemplo n.º 4
0
function render_top_posts($posts)
{
    foreach ($posts as $row) {
        ?>
    <div class="index_singleListing">
        <?php 
        render_profile_link($row, 'index_PostIcons');
        ?>
        
        <div class="index_singleListingContent">
            <a href="/posts.php?user=<?php 
        echo $row['userID'];
        ?>
&post=<?php 
        echo $row['postID'];
        ?>
" class="index_singleListingTitles"><?php 
        echo strlen($row['content']) > 600 ? substr($row['content'], 0, 600) . "..." : $row['content'];
        ?>
</a> <br/>
            <span class="index_timeOfPost">posted <?php 
        echo buckys_format_date($row['post_date']);
        ?>
 by</span> <a href="/profile.php?user=<?php 
        echo $row['userID'];
        ?>
"><b><?php 
        echo $row['userName'];
        ?>
</b></a> <br/>
            <a href="/posts.php?user=<?php 
        echo $row['userID'];
        ?>
&post=<?php 
        echo $row['postID'];
        ?>
" class="index_LikesAndComments"><?php 
        echo $row['likes'];
        ?>
 Like<?php 
        echo $row['likes'] > 1 ? "s" : "";
        ?>
</a> &middot; <a href="/posts.php?user=<?php 
        echo $row['userID'];
        ?>
&post=<?php 
        echo $row['postID'];
        ?>
" class="index_LikesAndComments"><?php 
        echo $row['comments'];
        ?>
 Comment<?php 
        echo $row['comments'] > 1 ? 's' : '';
        ?>
</a>
        </div>
    </div>
    <?php 
    }
    ?>
    <?php 
    if (count($posts) < 1) {
        ?>
    <div class="index_singleListing index_singleListingEmpty"><?php 
        echo MSG_NO_DATA_FOUND;
        ?>
</div>            
    <?php 
    }
}
        echo $row['senderName'];
        ?>
</a>
                                </div>
                                <div class="td td-subject">
                                    <a href="/messages_read.php?message=<?php 
        echo $row['messageID'];
        ?>
"><?php 
        echo $row['subject'];
        ?>
</a>
                                </div>
                                <div
                                    class="td td-date"><?php 
        echo buckys_format_date($row['created_date'], "F j, Y h:i A");
        ?>
</div>
                                <div class="clear"></div>
                            </div>
                        <?php 
    }
    if (count($messages) == 0) {
        ?>
                            <div class="tr noborder">
                                Nothing to see here.
                            </div>
                        <?php 
    }
    ?>
                    </div>
     $convList = isset($_SESSION['converation_list']) ? $_SESSION['converation_list'] : [];
     foreach ($messages as $row) {
         if (!isset($result[$row['userID']])) {
             //Init Array
             $result[$row['userID']] = ['html' => '', 'count' => 0, 'name' => ''];
         }
         //If there is a user that has sent new message and is not on the conversation list, add him to the conversation list and get all old messages
         if (!in_array($row['userID'], $convList) && is_array(BuckysPrivateMessenger::openConversationBox($userID, $row['userID']))) {
             //Add to conversation list
             $result[$row['userID']]['html'] = BuckysPrivateMessenger::getMessagesHTML($userID, $row['userID'], 'old');
             //Update ConvList
             $convList = isset($_SESSION['converation_list']) ? $_SESSION['converation_list'] : [];
         } else {
             $result[$row['userID']]['html'] .= '<div class="single_private_message">
                         <img src="' . BuckysUser::getProfileIcon($row) . '" />
                         <div class="private_message_text"><span class="username">' . $row['fullName'] . '</span>' . $row['message'] . ' <span class="date">' . buckys_format_date($row['createdDate'], 'F j, Y h:i A') . '</span></div>
                       </div>';
         }
         $result[$row['userID']]['count']++;
         $result[$row['userID']]['name'] = $row['fullName'];
     }
 }
 echo '<result>';
 echo '<users><![CDATA[' . $newUserHTML . ']]></users>';
 echo '<messages>';
 foreach ($result as $id => $row) {
     echo '<message id="' . $id . '" encrypted="' . buckys_encrypt_id($id) . '" count="' . $row['count'] . '" name="' . $row['name'] . '"><![CDATA[' . $row['html'] . ']]></message>';
 }
 echo '</messages>';
 echo '</result>';
 exit;
        echo $row['id'];
        ?>
</td>
                        <td><a href="/ads/view.php?id=<?php 
        echo $row['id'];
        ?>
"><?php 
        echo $row['name'];
        ?>
</a></td>
                        <td><a href="/ads/view.php?id=<?php 
        echo $row['id'];
        ?>
">View</a></td>
                        <td><?php 
        echo $row['startedDate'] == '0000-00-00 00:00:00' ? '-' : buckys_format_date($row['startedDate']);
        ?>
</td>
                        <td style="text-align:right;"><?php 
        echo doubleval($row['budget']);
        ?>
 BTC</td>
                        <td style="text-align:right;"><?php 
        echo number_format($row['impressions']);
        ?>
</td>
                        <td style="text-align:right;"><?php 
        echo number_format($row['receivedImpressions']);
        ?>
</td>
                        <td style="text-align:right;"><?php 
Ejemplo n.º 8
0
                                        <?php 
        }
        ?>
                                    </a> <a href="/profile.php?user=<?php 
        echo $row['reporterID'];
        ?>
" class="user-name">
                                        <b><?php 
        echo $row['reporterName'];
        ?>
</b> </a>
                                </td>
                                <td>
                                    <span
                                        class="post-date"><?php 
        echo buckys_format_date($row['reportedDate']);
        ?>
</span>
                                </td>
                            </tr>
                        <?php 
    }
    ?>

                        </tbody>
                    <?php 
}
?>
                </table>
                <?php 
render_form_token();
        echo $row['bannedUserID'];
        ?>
"> <img
                                            src="<?php 
        echo BuckysUser::getProfileIcon(['thumbnail' => $row['ownerThumb'], 'userID' => $row['ownerID']]);
        ?>
"/>

                                        <?php 
        echo $row['bannedUserName'];
        ?>
                                    </a>
                                </div>
                                <div class="td td-content">
                                    <?php 
        echo buckys_format_date($row['bannedDate']);
        ?>
                                    &nbsp;
                                </div>
                                <div class="td td-action">
                                    <a href="/banned_users.php?action=unban&bannedID=<?php 
        echo $row['bannedID'];
        ?>
">Unban User</a><br/>
                                    <a href="/banned_users.php?action=delete&bannedID=<?php 
        echo $row['bannedID'];
        ?>
">Delete User</a><br/>
                                </div>
                                <div class="td td-reporter">
                                    <a href="/profile.php?user=<?php 
Ejemplo n.º 10
0
     echo number_format($row['amount'], 2);
     echo '</span>';
     ?>
                                 </div>
                                 <div class="td td-balance">
                                     <?php 
     if ($row['payerID'] == 0 || $row['receiverID'] == $TNB_GLOBALS['user']['userID']) {
         echo number_format($row['receiverBalance'], 2);
     } else {
         echo number_format($row['payerBalance'], 2);
     }
     ?>
                                 </div>
                                 <div class="td td-date">
                                     <?php 
     echo buckys_format_date($row['createdDate'], "F j, Y");
     ?>
                                     <?php 
     /* echo buckys_format_date($row['createdDate'], "F j, Y h:i A"); */
     ?>
                                 </div>
                                 <div class="clear"></div>
                             </div>
                         <?php 
 }
 ?>
                         <br/>
                         <?php 
 $pagination->renderPaginate('/credits.php?', count($activities));
 ?>
                     <?php 
Ejemplo n.º 11
0
function render_footer_link_content($type, $data, $outFlag = true)
{
    $userID = buckys_is_logged_in();
    ob_start();
    switch ($type) {
        case 'my':
            foreach ($data as $row) {
                echo BuckysActivity::getActivityHTML($row, $userID);
            }
            echo '<a class="view-detail-links" href="/account.php">View All Notifications</a>';
            break;
        case 'friend':
            $count = 0;
            foreach ($data as $row) {
                $count++;
                if ($count > 5) {
                    break;
                }
                ?>
                <div class="activityComment">
                    <a href="/profile.php?user=<?php 
                echo $row['userID'];
                ?>
"><img
                            src="<?php 
                echo BuckysUser::getProfileIcon($row);
                ?>
"
                            class="dropDownNotificationImages"/></a> <a
                        href="/profile.php?user=<?php 
                echo $row['userID'];
                ?>
"><?php 
                echo $row['fullName'];
                ?>
</a> sent you new friend request
                    <a href="/myfriends.php?action=decline&friendID=<?php 
                echo $row['userID'];
                echo buckys_get_token_param();
                ?>
&return=<?php 
                echo base64_encode("/profile.php?user="******"
                        class="redButton">Decline</a> <a
                        href="/myfriends.php?action=accept&friendID=<?php 
                echo $row['userID'];
                echo buckys_get_token_param();
                ?>
&return=<?php 
                echo base64_encode("/profile.php?user="******"
                        class="redButton">Approve</a> <br clear="all"/>
                </div>
            <?php 
            }
            ?>
            <a class="view-detail-links" href="/myfriends.php?type=requested"> View All Requests </a>
            <?php 
            break;
        case 'forum':
            foreach ($data as $idx => $row) {
                ?>
                <?php 
                if ($row['activityType'] == 'topic_approved' || $row['activityType'] == 'reply_approved') {
                    ?>
                    <div class="activityComment">
                            <span>                 
                                <a href="/profile.php?user=<?php 
                    echo $row['userID'];
                    ?>
"><img
                                        src="<?php 
                    echo BuckysUser::getProfileIcon($TNB_GLOBALS['user']['userID']);
                    ?>
"
                                        class="dropDownNotificationImages"/></a>
                                <!-- <span class="redBold"><?php 
                    echo $TNB_GLOBALS['user']['firstName'] . " " . $TNB_GLOBALS['user']['lastName'];
                    ?>
</span> <br />-->
                                <?php 
                    if ($row['activityType'] == 'topic_approved') {
                        ?>
                                    Your topic
                                    <a href="/forum/topic.php?id=<?php 
                        echo $row['activityType'] == 'topic_approved' ? $row['objectID'] : $row['actionID'];
                        ?>
"><?php 
                        echo buckys_truncate_string($row['topicTitle'], 30);
                        ?>
</a> has been approved
                                <?php 
                    } else {
                        ?>
                                    Your reply to
                                    <a href="/forum/topic.php?id=<?php 
                        echo $row['activityType'] == 'reply_approved' ? $row['objectID'] : $row['actionID'];
                        ?>
"><?php 
                        echo buckys_truncate_string($row['topicTitle'], 30);
                        ?>
</a> has been approved
                                <?php 
                    }
                    ?>
                                <span class="createdDate"><?php 
                    echo buckys_format_date($row['createdDate']);
                    ?>
</span>                                                        
                                <br clear="all"/>
                            </span>
                    </div>
                <?php 
                } else {
                    ?>
                    <div class="activityComment">
                            <span>                 
                                <a href="/profile.php?user=<?php 
                    echo $row['replierID'];
                    ?>
"><img
                                        src="<?php 
                    echo BuckysUser::getProfileIcon(['userID' => $row['replierID'], 'thumbnail' => $row['rThumbnail']]);
                    ?>
"
                                        class="dropDownNotificationImages"/></a>
                                <a href="/profile.php?user=<?php 
                    echo $row['replierID'];
                    ?>
"><?php 
                    echo $row['rName'];
                    ?>
</a>
                                replied to <?php 
                    echo $row['activityType'] == "replied_to_topic" ? "your" : "the";
                    ?>
 topic 
								<a href="/forum/topic.php?id=<?php 
                    echo $row['objectID'];
                    ?>
&page=9999"><?php 
                    echo buckys_truncate_string($row['topicTitle'], 30);
                    ?>
</a>
                                <span class="createdDate"><?php 
                    echo buckys_format_date($row['createdDate']);
                    ?>
</span>                                                        
                                <br clear="all"/>
                            </span>
                    </div>
                <?php 
                }
                ?>


            <?php 
            }
            ?>
            <a class="view-detail-links" href="/forum"> Go to Forum </a>

            <?php 
            break;
        case 'mail':
            foreach ($data as $idx => $row) {
                ?>
                <a class="singleNotificationListItem" href="/messages_read.php?message=<?php 
                echo $row['messageID'];
                ?>
">
                    <span>
                        <img src="<?php 
                echo BuckysUser::getProfileIcon($row['sender']);
                ?>
"
                            class="dropDownNotificationImages"/>
                        <span class="redBold" style="font-weight:normal;"><?php 
                echo $row['senderName'];
                ?>
</span>
                        <span
                            style="font-size:11px; color:#888; float:right;"><?php 
                echo buckys_format_date($row['created_date']);
                ?>
</span>
                        <br/>
                        <?php 
                echo substr($row['body'], 0, 120);
                if (strlen($row['body']) > 120) {
                    echo "...";
                }
                ?>
                    </span> </a>
                <?php 
                if ($idx > 4) {
                    break;
                }
            }
            ?>
            <a class="view-detail-links" href="/messages_inbox.php">Go to Inbox</a>
            <?php 
            break;
        case 'trade':
            foreach ($data as $idx => $row) {
                $htmlBodyContent = '';
                if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_OFFER_ACCEPTED) {
                    $actionUrl = '/trade/traded.php';
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                    $htmlBodyContent .= sprintf('<span> accepted your </span>');
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">offer</span>');
                } else {
                    if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_OFFER_DECLINED) {
                        $actionUrl = '/trade/offer_declined.php';
                        $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                        $htmlBodyContent .= sprintf('<span> declined your </span>');
                        $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">offer</span>');
                    } else {
                        if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_OFFER_RECEIVED) {
                            $actionUrl = '/trade/offer_received.php';
                            $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                            $htmlBodyContent .= sprintf('<span> made you an </span>');
                            $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">offer</span>');
                        } else {
                            if ($row['activityType'] == BuckysTradeNotification::ACTION_TYPE_FEEDBACK) {
                                $actionUrl = '/feedback.php?user='******'<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                                $htmlBodyContent .= sprintf('<span> left you </span>');
                                $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">feedback</span>');
                                $row['feedback'] = strip_tags($row['feedback']);
                                if (strlen($row['feedback']) > 120) {
                                    $row['feedback'] = substr($row['feedback'], 0, 120) . '...';
                                }
                                $htmlBodyContent .= sprintf('<span> "%s"</span>', $row['feedback']);
                            } else {
                                $actionUrl = '#';
                                //not sure if we can be here.
                            }
                        }
                    }
                }
                ?>
                <a class="singleNotificationListItem" href="<?php 
                echo $actionUrl;
                ?>
"> <img
                        src="<?php 
                echo BuckysUser::getProfileIcon($row['senderID']);
                ?>
"
                        class="dropDownNotificationImages"/>
                    <?php 
                echo $htmlBodyContent;
                ?>
                </a>
            <?php 
            }
            ?>
            <a class="view-detail-links" href="/trade/available.php">My Trading Account</a>
            <?php 
            break;
        case 'shop':
            foreach ($data as $idx => $row) {
                $htmlBodyContent = '';
                if ($row['activityType'] == BuckysShopNotification::ACTION_TYPE_PRODUCT_SOLD) {
                    $actionUrl = '/shop/sold.php';
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">%s</span>', $row['senderName']);
                    $htmlBodyContent .= sprintf('<span> purchased your </span>');
                    $htmlBodyContent .= sprintf('<span class="redBold" style="font-weight:normal;">product</span>');
                } else {
                    $actionUrl = '#';
                    //not sure if we can be here.
                }
                ?>
                <a class="singleNotificationListItem" href="<?php 
                echo $actionUrl;
                ?>
"> <img
                        src="<?php 
                echo BuckysUser::getProfileIcon($row['senderID']);
                ?>
"
                        class="dropDownNotificationImages"/>
                    <?php 
                echo $htmlBodyContent;
                ?>
                </a>
            <?php 
            }
            ?>
            <a class="view-detail-links" href="/shop/available.php">My Shop Account</a>
            <?php 
            break;
    }
    $output = ob_get_contents();
    ob_end_clean();
    if ($outFlag == true) {
        echo $output;
        return true;
    } else {
        return $output;
    }
}
Ejemplo n.º 12
0
    case TNB_AD_STATUS_EXPIRED:
        echo 'Completed';
        break;
}
?>
            </div>
            <div class="row">
                <label>ID:</label>
                <?php 
echo $adDetail['id'];
?>
            </div>
            <div class="row">
                <label>Started:</label>
                <?php 
echo $adDetail['startedDate'] != '0000-00-00 00:00:00' ? buckys_format_date($adDetail['startedDate']) : '-';
?>
            </div>
            <div class="row">
                <label>Name of Ad:</label>
                <?php 
echo $adDetail['name'];
?>
            </div>
            <?php 
if ($adDetail['type'] == 'Text') {
    ?>
                <div class="row">
                    <label>Title:</label>
                    <?php 
    echo $adDetail['title'];
Ejemplo n.º 13
0
        foreach ($tAmounts as $amount) {
            echo $amount / 100000000 . ' BTC <br />';
        }
        ?>
                                
                                </span>
                                    </div>
                                    <div class="td td-balance">
                                        <?php 
        echo $row['balance'] / 100000000;
        ?>
                                        BTC
                                    </div>
                                    <div class="td td-date">
                                        <?php 
        echo buckys_format_date(date("Y-m-d H:i:s", $row['date']));
        ?>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                            <?php 
    }
    ?>
                            <br/>
                            <?php 
    $pagination->renderPaginate('/wallet.php?', count($transactions));
    ?>
                        <?php 
} else {
    ?>
                            <div class="tr noborder">
 /**
  * Get Messenger Messages HTMl
  *
  * @param Int    $userID
  * @param Int    $buddyID
  * @param String $type : 'new', 'old', 'all'
  * @return string
  */
 public static function getMessagesHTML($userID, $buddyID, $type = 'new')
 {
     global $db;
     $rows = BuckysPrivateMessenger::getMessages($userID, $buddyID, $type);
     $html = '';
     $userData = BuckysUser::getUserBasicInfo($userID);
     foreach ($rows as $row) {
         $html .= '<div class="single_private_message">
                     <img src="' . BuckysUser::getProfileIcon($row['messageType'] == 1 ? $row : $userData) . '" />
                     <div class="private_message_text"><span class="username">' . ($row['messageType'] == 1 ? $row['fullName'] : $userData['firstName'] . ' ' . $userData['lastName']) . '</span>' . $row['message'] . ' <span class="date">' . buckys_format_date($row['createdDate'], 'F j, Y h:i A') . '</span></div>
                   </div>';
     }
     return $html;
 }