-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta-desc.php
executable file
·33 lines (33 loc) · 1.12 KB
/
meta-desc.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
<?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){
echo cuthighlight('post', $currentMetaDesc->content, '200');
}else{
$idmetadesc = ucfirst($mod);
echo $idmetadesc." - ".$meta_description;
}
}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){
echo cuthighlight('post', $currentMetaDesc->content, '200');
}else{
$idmetadesc = ucfirst($mod);
echo $idmetadesc." - ".$meta_description;
}
}else{
$idmetadesc = ucfirst($mod);
echo $idmetadesc." - ".$meta_description;
}
}
?>