-
Notifications
You must be signed in to change notification settings - Fork 0
/
title.php
executable file
·48 lines (48 loc) · 1.45 KB
/
title.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
<?php
if ($mod==""){
header('location:404.php');
}else{
error_reporting(0);
if (isset($_GET['id'])){
$idtitle = $val->validasi($_GET['id'],'xss');
$title = new PoTable();
$currentTitle = $title->findManualQuery($tabel = "post", $field = "", $condition = "WHERE seotitle='".$idtitle."'");
$currentTitle = $currentTitle->current();
if ($currentTitle){
echo $currentTitle->title;
}else{
$idtitle = ucfirst($mod);
echo $idtitle." - ".$website_name;
}
}elseif (isset($_GET['idp'])){
$idtitle = $val->validasi($_GET['idp'],'xss');
$title = new PoTable();
$currentTitle = $title->findManualQuery($tabel = "pages", $field = "", $condition = "WHERE seotitle='".$idtitle."'");
$currentTitle = $currentTitle->current();
if ($currentTitle){
echo $currentTitle->title;
}else{
$idtitle = ucfirst($mod);
echo $idtitle." - ".$website_name;
}
}elseif (isset($_GET['idc'])){
$idtitle = $val->validasi($_GET['idc'],'xss');
$title = new PoTable();
$currentTitle = $title->findManualQuery($tabel = "category", $field = "", $condition = "WHERE seotitle='".$idtitle."'");
$currentTitle = $currentTitle->current();
if ($currentTitle){
echo $currentTitle->title;
}else{
$idtitle = ucfirst($mod);
echo $idtitle." - ".$website_name;
}
}else{
$idtitle = ucfirst($mod);
if ($mod == "home") {
echo $website_name;
} else {
echo $idtitle." - ".$website_name;
}
}
}
?>