Пример #1
0
<link rel="stylesheet" href="/includes/plugins/flexslider/flexslider.css">
<link rel="stylesheet" href="/includes/css/overHead.css">
<link rel="stylesheet" href="/includes/css/bootstrap-slider.css">
<link rel="stylesheet" href="/includes/css/awesome-bootstrap-checkbox.css">

<link rel="stylesheet" href="/includes/plugins/nstSlider/jquery.nstSlider.min.css" type="text/css" />
<link href="/includes/css/bootstrap-switch.css" rel="stylesheet">
<link href="/includes/css/bootstrap-social.css" rel="stylesheet">
<link rel="stylesheet" href="/includes/plugins/dropzone/dropzone.css" type="text/css" />

<link rel="stylesheet" href="/includes/plugins/bootstrap-wysiwyg/bootstrap-wysihtml5.css" type="text/css" />

<link rel="stylesheet" href="/includes/css/css3-buttons.css" type="text/css" />

<!-- Main Styles and jQuery -->
<link rel="stylesheet" href="/includes/css/PccBay.css" type="text/css" >
<script src="/includes/js/jquery.js"></script>
<?php 
pb_include('/includes/php/ext_forms.php');
$pb_user['theme'] = 'darkblue';
if (isset($_SESSION['user_id'])) {
    $user_data = json_decode(pb_user_data($_SESSION['user_id'], 'user_data'), true);
    if ($user_data) {
        foreach ($user_data as $data) {
            if (!empty($pb_user['theme'])) {
                $pb_user['theme'] = $data['theme'];
            }
        }
    }
}
print '<link id="userThemeCSS" rel="stylesheet" href="/includes/css/themes/?t=' . $pb_user['theme'] . '" type="text/css" >';
Пример #2
0
    }
    $comment = json_decode(get_comments($val['product_id']));
    $imgSize = explode(':', $saveImag_size[0]);
    $entity = array('id' => $val['product_id'], 'type' => $val['type'], 'timestamp' => array('date' => $date, 'laps' => $timeAgo), 'user' => array('id' => $val['user_id'], 'name' => $author, 'username' => $user, 'avatar' => $avatar), 'images' => array('featured' => $saveImag[0], 'featured_width' => $imgSize[0], 'featured_height' => $imgSize[1], 'list' => $saveImag), 'product_info' => array('title' => $title, 'desc' => $desc, 'tags' => $tags, 'price' => $price, 'condition' => $condition), 'trans_info' => json_decode($val['trans_info']), 'comments' => array('count' => count($comment), 'comments' => $comment), 'status' => $val['status']);
    array_push($mainJson, $entity);
}
// end pb_product
//pb_safe_image
if ($slq_table == 'pb_safe_image') {
    $entity = array('id' => $val['id'], 'uid' => $val['uid'], 'size' => $val['size'], 'type' => $val['type'], 'date' => $val['date'], 'author' => $val['author'], 'file' => $val['file'], 'path' => $val['string']);
    array_push($mainJson, $entity);
}
// end pb_safe_image
//pb_comments
if ($slq_table == 'pb_comments') {
    $user_data = json_decode(pb_user_data($val['author'], 'user_data'), true);
    foreach ($user_data as $data) {
        $author = $data['name'];
        $user = $data['username'];
        $avatar = $data['avatar'];
    }
    if (isset($_GET['timeago'])) {
        $val['date'] = time_ago(strtotime($val['date']));
    }
    $entity = array('id' => $val['id'], 'post_id' => $val['post_id'], 'date' => $val['date'], 'author' => $val['author'], 'user' => array('name' => $author, 'username' => $user, 'avatar' => $avatar), 'status' => $val['status'], 'comment' => $val['comment']);
    array_push($mainJson, $entity);
}
// end pb_comments
//pb_users
if ($slq_table == 'pb_users') {
    if (isset($_GET['timeago'])) {
Пример #3
0
function pb_recent_comments($post_id, $count, $order = 'DESC', $emptyMsg = 'Be the first to comment.')
{
    $json = json_decode(file_get_contents('http://' . domain() . '/graph/index.php?page=comments&accessToken=rootbypass_9827354187582375129873&q=' . $post_id . '&timeago=true&l=' . $order . ''));
    $result = '';
    $s = 0;
    foreach ($json as $data) {
        if (!empty($data->id)) {
            $user_data = json_decode(pb_user_data($data->author, 'user_data'), true);
            foreach ($user_data as $udata) {
                $pb_user['name'] = $udata['name'];
                $pb_user['username'] = $udata['username'];
                $pb_user['avatar'] = $udata['avatar'];
            }
            $result .= '
					<div class="col-md-12 pb-post pb-comment-inline">' . '<div class="pb-post-block">' . '<div class="pb-post-head-noB">' . '<img class="pb-post-avatar" src="' . $pb_user['avatar'] . '">' . '<div class="pb-post-author">' . '<strong><a href="/@' . $pb_user['username'] . '">' . $pb_user['name'] . '</a></strong> ' . pb_user_permission($data->author, 'label', true) . '<br>' . '<span class="pb-post-timestamp"><i class="pb-post-timestamp-o">' . $data->date . '</i></span>' . '</div>' . '</div>' . '<div class="pb-post-content">' . '' . $data->comment . '' . '</div>' . '</div>' . ' </div>';
            $s++;
            if ($s == $count) {
                break;
            }
        }
    }
    if ($s == 0) {
        $result = $emptyMsg;
    }
    return $result;
}