-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta-social.php
executable file
·56 lines (56 loc) · 2.25 KB
/
meta-social.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
47
48
49
50
51
52
53
54
55
56
<?php
if ($mod==""){
header('location:404.php');
}else{
error_reporting(0);
if (isset($_GET['id'])){
$idmetadesc = $val->validasi($_GET['id'],'xss');
$metadesc = new PoTable();
$currentMetaDesc = $metadesc->findManualQuery($tabel = "post", $field = "", $condition = "WHERE seotitle='".$idmetadesc."'");
$currentMetaDesc = $currentMetaDesc->current();
if ($currentMetaDesc){
$metasocial_mod = ucfirst($mod);
$metasocial_name = $website_name;
$metasocial_url = $website_url.'/detailpost/'.$currentMetaDesc->seotitle;
$metasocial_title = $currentMetaDesc->title;
$metasocial_desc = cuthighlight('post', $currentMetaDesc->content, '200');
$metasocial_img = $website_url.'/po-content/po-upload/'.$currentMetaDesc->picture;
}else{
$metasocial_mod = ucfirst($mod);
$metasocial_name = $website_name;
$metasocial_url = $website_url;
$metasocial_title = $website_name;
$metasocial_desc = $meta_description;
$metasocial_img = $website_url.'/favicon.png';
}
}elseif (isset($_GET['idp'])){
$idmetadesc = $val->validasi($_GET['idp'],'xss');
$metadesc = new PoTable();
$currentMetaDesc = $metadesc->findManualQuery($tabel = "pages", $field = "", $condition = "WHERE seotitle='".$idmetadesc."'");
$currentMetaDesc = $currentMetaDesc->current();
if ($currentMetaDesc){
$metasocial_mod = ucfirst($mod);
$metasocial_name = $website_name;
$metasocial_url = $website_url.'/pages/'.$currentMetaDesc->seotitle;
$metasocial_title = $currentMetaDesc->title;
$metasocial_desc = cuthighlight('post', $currentMetaDesc->content, '200');
$metasocial_img = $website_url.'/po-content/po-upload/'.$currentMetaDesc->picture;
}else{
$metasocial_mod = ucfirst($mod);
$metasocial_name = $website_name;
$metasocial_url = $website_url;
$metasocial_title = $website_name;
$metasocial_desc = $meta_description;
$metasocial_img = $website_url.'/favicon.png';
}
}else{
$metasocial_mod = ucfirst($mod);
$metasocial_name = $website_name;
$metasocial_url = $website_url;
$metasocial_title = $website_name;
$metasocial_desc = $meta_description;
$metasocial_img = $website_url.'/favicon.png';
}
include "po-admin/po-component/po-setting/meta-social.txt";
}
?>