-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
164 lines (146 loc) · 7.23 KB
/
index.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?php
$baslik = "TiyatroBot";
$slogan = "Doğaçlama Önerileri";
$logo = "";
$copyright = "TiyatroBot";
$link = "http://".$_SERVER['HTTP_HOST'];
if ($logo == "") {
$logox = '<h1><a href="'.$link.'/tiyatrobot/" title="'.$baslik.' '.$slogan.'">'.$baslik.'</a></h1>';
} else {
$logox = '<a href="'.$link.'/tiyatrobot/" title="'.$baslik.' '.$slogan.'"><img src="'.$logo.'" alt="'.$baslik.'"></a>';
}
include 'ayar.php';
include 'kissql.php';
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<base href="https://kilci.xyz/tiyatrobot">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title><?php echo $baslik; ?> - KILCI.XYZ</title>
<link rel="stylesheet" type="text/css" href="../css/normalize.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-grid.min.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-reboot.min.css">
<meta name="MobileOptimized" content="450">
<style>
body{
background:#efefef;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1 a, h1 a:hover, h1 a:focus{
color:#000;
}
</style>
</head>
<body>
<header class="container">
<div class="row">
<div class="col-sm-12"><br />
<?php echo $logox; ?>
<h1 style="font-size:0px;display:none;"><?php echo $baslik; ?></h1>
<p><?php echo $slogan; ?></p>
<a href="/" class="btn btn-dark">KILCI.XYZ</a>
<br /><br />
</div>
</div>
</header>
<div class="container">
<div class="row">
<?php
switch ($_GET["p"]) {
case 'karakterekle':
if ($_POST) {
$k = $_POST["karakter"];
if (empty($k)) {
echo 'Hacı boş geçme!';
} else {
$ekle = $db->prepare("INSERT INTO tiyatrobot SET t_tip=?, t_yazi=?");
$ekle->execute(["karakter", $k]);
if ($ekle) {
header("REFRESH:1;URL=?p=karakterekle");
echo ':)';
} else {
header("REFRESH:1;URL=?p=karakterekle");
echo ':(';
}
}
}
echo '
<div class="col-sm-12"><h1>KARAKTER</h1><a href="tiyatrobot" class="btn btn-success btn-block">Geri Dön</a><br /></div>
<div class="col-sm-12">
<div class="alert alert-dark">
<strong>Karakter:</strong>
<form action="" method="post"><input type="text" name="karakter" class="form-control" placeholder="çizmeli kedi, travesti, palyaço">
</div>
</div>
<div class="col-sm-12"><button type="submit" class="btn btn-danger btn-block">Şimdi Ekle!</button></form><br /></div>
';
break;
case 'olayekle':
if ($_POST) {
$o = $_POST["olay"];
if (empty($o)) {
echo 'Hacı boş geçme!';
} else {
$ekle = $db->prepare("INSERT INTO tiyatrobot SET t_tip=?, t_yazi=?");
$ekle->execute(["olay", $o]);
if ($ekle) {
header("REFRESH:1;URL=?p=olayekle");
echo ':)';
} else {
header("REFRESH:1;URL=?p=olayekle");
echo ':(';
}
}
}
echo '
<div class="col-sm-12"><h1>OLAY</h1><a href="tiyatrobot" class="btn btn-success btn-block">Geri Dön</a><br /></div>
<div class="col-sm-12">
<div class="alert alert-dark">
<strong>Olay:</strong>
<form action="" method="post"><input type="text" name="olay" class="form-control" placeholder="evin içine dalar, bekarlığa veda partisinde..">
</div>
</div>
<div class="col-sm-12"><button type="submit" class="btn btn-danger btn-block">Şimdi Ekle!</button></form><br /></div>
';
break;
default:
$veri = $db->prepare("SELECT * FROM tiyatrobot WHERE t_tip=? ORDER BY RAND()");
$veri ->execute(array("karakter"));
$vericek = $veri ->fetch(PDO::FETCH_ASSOC);
$veri2 = $db->prepare("SELECT * FROM tiyatrobot WHERE t_tip=? ORDER BY RAND()");
$veri2 ->execute(array("olay"));
$vericek2 = $veri2 ->fetch(PDO::FETCH_ASSOC);
echo '<div class="col-sm-12"><a href="/tiyatrobot/" class="btn btn-success btn-block">Yenile</a><br /></div>
<div class="col-sm-6">
<div class="alert alert-dark">
<strong>Karakter ('; k("karakter"); echo'):</strong>
<p>'.$vericek["t_yazi"].'</p>
</div>
<a href="tiyatrobot/?p=karakterekle" class="btn btn-danger btn-block">+ Karakter Ekle</a><br />
</div>
<div class="col-sm-6">
<div class="alert alert-dark">
<strong>Olay ('; o("karakter"); echo'):</strong>
<p>'.$vericek2["t_yazi"].'</p>
</div>
<a href="tiyatrobot/?p=olayekle" class="btn btn-danger btn-block">+ Olay Ekle</a><br />
</div>';
break;
}
?>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-12">
<hr><small>
<?php echo $copyright . ' © ' . date("Y"); ?><br />
</small>
<br /><br />
</div>
</div>
</div>
</body>
</html>