-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmaquina.php
57 lines (50 loc) · 1.63 KB
/
maquina.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
<?php
ob_start();
session_start();
include 'classes/Enigma.php';
$rotors = $_SESSION['rotoresArray'];
?>
<!DOCTYPE HTML>
<html lang="pt-BR">
<head>
<meta charset=UTF-8>
<title>Maquina Enigma</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
</head>
<body>
<div id="enigma_box">
<div class="line">
<div class="rotores">
<?php foreach (array_reverse($rotors, true) as $key => $value): ?>
<label><span>Rotor <?php echo $key+1 ?></span> <input type="text" name="rotor<?php echo $key+1 ?>" id="r<?php echo $key+1 ?>" value="<?php echo $value ?>" class="inputRotor"/></label>
<?php endforeach ?>
</div>
</div>
<div class="line">
<textarea id="text" placeholder="Texto" rows="7"></textarea>
</div>
<div class="line controles">
<p>Adicionar plugs <input type="checkbox" id="addplug" /></p>
<p>Descriptografar <input type="checkbox" id="decript" /></p>
<input type="button" value="Remover Plugs" id="removePlugs" />
</div>
<div class="line last">
<?php
$abc = Enigma::$alphabet;
for($i = 0; $i<=count($abc)-1; $i++){
echo '<a href="#" class="letra" id="'.$abc[$i].'">'.strtoupper($abc[$i]).'</a>';
}
?>
</div>
<form action="" method="post" style="display:none;" id="meusPlugs">
<select name="plugsCriados">
</select>
</form>
<button id="iniciar">Iniciar</button>
<p id="rotors" data-rotors='<?php echo json_encode($rotors) ?>'></p>
<div style="clear:both;"></div>
</div>
</body>
</html>