-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
62 lines (46 loc) · 1.31 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
<?php
require_once './vendor/autoload.php';
// Initialize dotenv
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
// Initialize router
$router = new \Bramus\Router\Router();
// Routing
$router->get('/', function() {
$input = new \App\Utilities\Input;
echo $input->render();
// Initialize BuildForm
// $bf = new \App\Utilities\BuildForm;
// echo "<form action=\"/confirm\" method=\"POST\">\n";
// echo $bf->loop_out();
// echo "<button type=\"submit\">確認</button>\n";
// echo '</form>';
});
$router->post('/confirm', function() {
// Initialize confirm screen
$confirm = new \App\Utilities\Confirm;
// $confirm->label_override();
echo $confirm->render();
});
$router->post('/send', function() {
$mail = new \App\Utilities\SendMail;
$mail->sendMail();
});
$router->get('/complete', function() {
$mail = new \App\Utilities\SendMail;
echo $mail->render_complete();
});
$router->post('/api/preview', function() {
$preview = new \App\Utilities\Preview;
echo $preview->render();
});
$router->get('/test/views_path', function() {
$bf = new \App\Utilities\BuildForm;
echo $bf->views_path();
});
$router->get('/test/views_path/{theme_name}', function($theme_name) {
$bf = new \App\Utilities\BuildForm;
echo $bf->views_path($theme_name);
});
// Run Router
$router->run();