-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
44 lines (40 loc) · 1.09 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
<?php
if ($_SERVER["SERVER_NAME"] == "seimei-asia.herokuapp.com" || $_SERVER["SERVER_NAME"] == "seimei.kurashi.asia") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.seimei.asia" . $_SERVER[REQUEST_URI]);
} else {
header('Content-type: text/html; charset=utf-8;');
}
date_default_timezone_set('Asia/Tokyo');
require 'vendor/autoload.php';
require 'php/seimei.php';
require 'php/reii.php';
require 'php/kenkou.php';
require 'php/seikaku.php';
require 'php/meimei.php';
require 'php/kanji.php';
require 'php/snipets.php';
?>
<html>
<?php seimeiWebHeader(); ?>
<body>
<?php
fbRoot();
if (array_key_exists('sei', $_POST) && array_key_exists('mei', $_POST) && array_key_exists('sex', $_POST)) {
$seimei = New Seimei();
$seimei->sei = $_POST['sei'];
$seimei->mei = $_POST['mei'];
$seimei->sex = ($_POST['sex'] == 'F' ? 'F' : 'M');
if (mb_strlen($seimei->sei) > 0 || mb_strlen($seimei->mei) > 0) {
$seimei->shindan();
if (count($seimei->error) == 0) {
seimeiBody($seimei);
} else {
errorKanji($seimei->error);
}
}
}
seimeiWebForm();
?>
</body>
</html>