Beispiel #1
0
<?php

include_once 'includes/php/_db-config.php';
include_once 'includes/php/_pb_db.php';
$path = $_GET['path'];
$id = $_GET['id'];
$src = $_GET['source'];
$market = $_GET['marketplace'];
if ($market !== 'free_user_ads') {
    pb_db("UPDATE pb_doubleclick SET hits = hits + 1 WHERE id='{$id}'");
}
header('Location: ' . $path . '#pb_doubleclick=' . $src);
Beispiel #2
0
            $sql = pb_db("INSERT INTO pb_users (user_id, username, num_of_ratings, total_ratings, permissions, id_card_key, contact_info, user_data, steps)\n\t\t\tVALUES ('{$user_id}', '{$username}', '0', '0', '25', '', '{$contact_info}', '{$user_data}', '')");
            if ($sql) {
                $_SESSION['user_id'] = $user_id;
                header('Location: ' . $_GET['redirect_on_login']);
            } else {
                print 'No sql';
            }
        } else {
            $_SESSION['user_id'] = $user_id->user_id;
            $user_id = $user_id->user_id;
            $contact_info = array();
            array_push($contact_info, array("resident" => pb_user()->resident, "building" => pb_user()->building, "room" => pb_user()->room, "phone" => pb_user()->phone, "email" => $user['email'], "notify_d" => pb_user()->notify_d, "notify_m" => pb_user()->notify_m));
            $contact_info = json_encode($contact_info);
            $user_data = array();
            array_push($user_data, array("ID" => $user_id, "username" => pb_user()->username, "name" => $user['first_name'] . ' ' . $user['last_name'], "avatar" => $user['picture']['url'], "registered" => pb_user()->registered, "permissions" => pb_user()->permissions, "theme" => pb_user()->theme, "interest" => pb_user()->interest));
            $user_data = json_encode($user_data);
            pb_db("UPDATE pb_users SET contact_info='{$contact_info}', user_data='{$user_data}' WHERE user_id='{$user_id}'");
            header('Location: ' . $_GET['redirect_on_login']);
        }
    } else {
        print 'No user';
    }
} catch (Facebook\Exceptions\FacebookResponseException $e) {
    // When Graph returns an error
    echo 'Graph returned an error: ' . $e->getMessage();
    exit;
} catch (Facebook\Exceptions\FacebookSDKException $e) {
    // When validation fails or other local issues
    echo 'Facebook SDK returned an error: ' . $e->getMessage();
    exit;
}
function pb_is_mine($table, $id, $itemType, $user_id)
{
    if (isset($_SESSION['user_id'])) {
        $user_id = $_SESSION['user_id'];
    }
    $result = pb_db("SELECT * FROM {$table} WHERE {$itemType}='{$id}' LIMIT 1");
    if ($result->num_rows > 0) {
        return true;
    }
}
Beispiel #4
0
pb_db("SELECT * FROM pb_services WHERE expires > '{$today}' AND status = 'open' ORDER BY id DESC", function ($row) {
    ?>
					<div class="col-md-5 pb-post grid-item grid-noWall" id="<?php 
    print $row['service_id'];
    ?>
">
						<div class="pb-post-block">
							<?php 
    pb_collage(pb_collage_build($row), 160, 'print', '<div class="pb-post-head">{{collage}}</div>');
    ?>
							<div class="pb-post-content">
								<div style="padding: 10px">
									<div class="pb-post-author" style="font-size: 24px;line-height: 24px">
										<strong><a href="/services/list#<?php 
    print $row['service_id'];
    ?>
"><span class="md-gt-title"><?php 
    print $row['title'];
    ?>
</span></a></strong>
										<small><?php 
    print $row['category'];
    ?>
</small>
										<div class="pb-stars" data-stars="<? print $row['ratings']; ?>" data-post-text="<?php 
    print pb_comment_count($row['service_id']);
    ?>
"></div>
									</div>
									
									<div class="pb-desc-list">
										<ul>
											<li>Cost: <? print pb_price($row['cost']); ?></li>
											<li>Hours: <? print $row['hours']; ?></li>
											<li>Location: <? print $row['location']; ?></li>
										</ul>
									</div>
									
									<div class="pb_Pdesc"><p><?php 
    print $row['bio'];
    ?>
</p></div>
								</div>
								<div style="margin-top: -8px">
									<div class="col-md-2">
										<h4>Reviews</h4>
									</div>
									<div class="col-md-2  col-lg-offset-9" style="float:none;">
										<button class="action" style="float:none;" data-toggle="modal" data-target="#reviewModal" data-service-modal="<?php 
    print $row['service_id'];
    ?>
"><span class="label">Write a review</span></button>
									</div>
									<div style="margin-top: -3px">
										<?php 
    print pb_recent_comments($row['service_id'], 5, 'DESC', '<small style="padding-left:20px">No reviews</small>');
    ?>
									</div>
								</div>
							</div>
						</div>
					</div>
				<?php 
});
Beispiel #5
0
								<li><a href="">Account</a></li>
							<li><div></div></li>
								<li><a href="">Mobile</a></li>
								<li><a href="">Chrome Plugin</a></li>
							</ul>
						</div>
						<a href="#" style="padding: 10px;">Can't find what your looking for?</a>
					</div>
				</div>
				
				<div class="col-md-9 pb-page-block" style="padding: 0px">
					<ul class="ul-faq">
						<?php 
pb_db("SELECT * FROM pb_faq ORDER BY category ASC", function ($row) {
    print '<li data-category="' . $row['category'] . '">';
    print '<h3>' . $row['question'] . '</h3>';
    print '<div class="a"><div class="a-inner">' . $row['answer'] . '</div></div>';
    print '</li>';
});
?>
					</ul>
				</div>
				
				
			</div>
		</div>
	</div>
<?php 
pb_include('/MasterPages/footer.php~col-md-12');
?>
<script>
$(document).ready(function(){
Beispiel #6
0
<?php

include_once 'MasterPages/overhead.php';
pb_members_only('login');
if (isset($_GET['id'])) {
    $product_id = $_GET['id'];
} else {
    $product_id = '';
}
$result = pb_db("SELECT * FROM pb_post Where product_id='{$product_id}'");
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $product['user_id'] = $row['user_id'];
        $product['type'] = $row['type'];
        $product['product_info'] = json_decode($row['product_info']);
        $product['trans_info'] = json_decode($row['trans_info']);
    }
    $allowed = true;
} else {
    $allowed = false;
}
if ($allowed) {
    $pi = $product['product_info'][0];
} else {
    header('HTTP/1.0 404 Not Found');
    include '404.php';
    exit;
}
?>
<!DOCTYPE html>
<html lang="en">