-
Notifications
You must be signed in to change notification settings - Fork 133
Expand file tree
/
Copy pathindex.php
More file actions
75 lines (63 loc) · 3.25 KB
/
index.php
File metadata and controls
75 lines (63 loc) · 3.25 KB
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
<?php
require_once '../lib/boot.php';
use Photobooth\Service\ApplicationService;
use Photobooth\Service\AssetService;
use Photobooth\Service\LanguageService;
use Photobooth\Service\ProcessService;
use Photobooth\Utility\ComponentUtility;
use Photobooth\Utility\PathUtility;
// Login / Authentication check
if (!(
!$config['login']['enabled'] ||
(!$config['protect']['localhost_index'] && isset($_SERVER['SERVER_ADDR']) && $_SERVER['REMOTE_ADDR'] === $_SERVER['SERVER_ADDR']) ||
(isset($_SESSION['auth']) && $_SESSION['auth'] === true) || !$config['protect']['index']
)) {
header('location: ' . PathUtility::getPublicPath('login'));
exit();
}
$languageService = LanguageService::getInstance();
$assetService = AssetService::getInstance();
$pageTitle = 'Chroma capture - ' . ApplicationService::getInstance()->getTitle();
$photoswipe = true;
$randomImage = false;
$remoteBuzzer = true;
include PathUtility::getAbsolutePath('template/components/main.head.php');
?>
<body class="gallery-mode--overlay ">
<?php include PathUtility::getAbsolutePath('template/components/chroma.canvas.php'); ?>
<?php include PathUtility::getAbsolutePath('template/components/preview.php'); ?>
<div class="stage stage--chroma rotarygroup" data-stage="start">
<div class="stage-inner">
<div class="stage-message stage-message--error"><?=$languageService->translate('chromaInfoBefore')?></div>
<?php include PathUtility::getAbsolutePath('template/components/chroma.background.selector.php'); ?>
<div class="buttonbar buttonbar--top">
<?= ($config['gallery']['enabled']) ? ComponentUtility::renderButton('gallery', $config['icons']['gallery'], 'gallery-button') : '' ?>
</div>
<div class="buttonbar buttonbar--bottom">
<?= ComponentUtility::renderButton('takePhoto', $config['icons']['take_picture'], 'take-chroma') ?>
</div>
</div>
</div>
<?php include PathUtility::getAbsolutePath('template/components/stage.loader.php'); ?>
<div class="stage stage--result" data-stage="result">
<div class="stage-inner">
<div class="buttonbar buttonbar--bottom">
<?= ComponentUtility::renderButton('reload', $config['icons']['refresh'], 'reload') ?>
<?= ($config['qr']['enabled']) ? ComponentUtility::renderButton('qr', $config['icons']['qr'], 'qrbtn') : '' ?>
<?= ($config['print']['from_chromakeying']) ? ComponentUtility::renderButton('print', $config['icons']['print'], 'print-btn') : '' ?>
<?= ($config['picture']['allow_delete']) ? ComponentUtility::renderButton('delete', $config['icons']['delete'], 'deletebtn') : '' ?>
</div>
</div>
</div>
<?php include PathUtility::getAbsolutePath('template/components/gallery.php'); ?>
<script type="text/javascript">
onCaptureChromaView = true;
</script>
<?php include PathUtility::getAbsolutePath('template/components/main.footer.php'); ?>
<?php include PathUtility::getAbsolutePath('template/components/chroma.footer.php'); ?>
<script src="<?=$assetService->getUrl('resources/js/preview.js')?>"></script>
<script src="<?=$assetService->getUrl('resources/js/virtualKeyboard.js')?>"></script>
<script src="<?=$assetService->getUrl('resources/js/core.js')?>"></script>
<?php ProcessService::getInstance()->boot(); ?>
</body>
</html>