-
Notifications
You must be signed in to change notification settings - Fork 3
/
viewitem.php
46 lines (40 loc) · 1.11 KB
/
viewitem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
require_once 'public/parameters.php';
require_once $dir_model.'initialize.php';
//facebook
$fb_title = "";
$fb_type = "";
$fb_image_url = "";
$fb_url = "";
$fb_description = "";
$fb_admin_userid = "";
//twitter
$tw_card = "";
$tw_url = "";
$tw_title = "";
$tw_description = "";
$tw_image = "";
if (!empty($_GET['item_id'])) {
$item = Item::find_by_id('id', $_GET['item_id']);
$photos = Photograph::find_photo($_GET['item_id']);
if (!$item) {
$session->message("The Item has been removed/Sold.");
log_action('error', 'Item', "Check the item = {$_GET['item_id']}");
redirect_to('404.php');
}
$user = User::find_by_id($item->user_id);
$keywords = $item->title;
$title = $item->title;
$meta_description = $item->description;
$meta_keywords = $item->title.$item->description.$item->category;
$meta_author = $user->name;
if($item){$item->view_counter($item->id);} else{ die('Item has been Removed');}
}
if(isMobile()){
include $dir_public_mobile.'viewitem.php';
}elseif(isFacebook()){
include $dir_facebook.'viewitem.php';
}else{
include $dir_public.'viewitem.php';
}
?>