-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
40 lines (39 loc) · 1.19 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
<?php
/** @var $uid string */
/** @var $id string */
/** @var $name string */
/** @var $signedSir bool */
/** @var $error string|null */
$this->layout('base', ['title' => 'Welcome']) ?>
<h1>Crauto</h1>
<small>Creatore e Rimuovitore Autogestito di Utenti che Tutto Offre</small>
<p>Hi <?= $name ?>, your username is <?= $uid ?> and your ID is <?= $id ?></p>
<?php if ($error !== null) : ?>
<div class="alert alert-danger" role="alert">
Error: <?= $this->e($error) ?>
</div>
<?php endif ?>
<?php if (!$signedSir) : ?>
<p class="alert alert-warning">You need to sign your SIR! <a href="/sugo.php?uid=<?= urlencode($uid)?>" class="btn btn-sm btn-warning">Sign the SIR</a></p>
<?php endif ?>
<h2>Enabled services</h2>
<p>What can I access with this account?</p>
<ul>
<li>Crauto - account management system, where you are now</li>
<?php
foreach (CRAUTO_HOME_PAGE_SERVICES as $service) {
switch (count($service)) {
case 1:
default:
echo "<li>$service[0]</li>";
break;
case 2:
echo "<li><a href=\"$service[1]\" target=\"_blank\">$service[0]</a></li>";
break;
case 3:
echo "<li><a href=\"$service[1]\" target=\"_blank\">$service[0]</a> - $service[2]</li>";
break;
}
}
?>
</ul>