Ejemplo n.º 1
0
    $text = strfix($text);
    //Hier werden vorhandene Umlaute in Bigramme konvertiert
    $text = leerraus($text);
    //Entfernen der vorhandenen Leerzeichen
    $code = enigma($wp1, $wp2, $wp3, $stator, $text, $_POST['sprp1'], $_POST['sprp2'], $_POST['wst1'], $_POST['wst2'], $_POST['wst3'], $_POST['steckbr'], $_POST['ukw']);
    $code2 = spacing($code, 5);
    $text = spacing($text, 5);
    $code1 = $text;
}
if ($_POST['ueb'] == "vuna") {
    $text = $_POST['unten'];
    $text = strtoupper($text);
    //Hier werden alle Zeichen groß gemacht
    $text = strfix($text);
    //Hier werden vorhandene Umlaute in Bigramme konvertiert
    $text = leerraus($text);
    //Entfernen der vorhandenen Leerzeichen
    echo $_POST['steckbr'];
    $code = enigma($wp1, $wp2, $wp3, $stator, $text, $_POST['sprp1'], $_POST['sprp2'], $_POST['wst1'], $_POST['wst2'], $_POST['wst3'], $_POST['steckbr'], $_POST['ukw']);
    $code1 = spacing($code, 5);
    $text = spacing($text, 5);
    $code2 = $text;
}
$lang_POST = JTEXT::_('POST');
$lang_UPDOWN = JTEXT::_('UPDOWN');
$lang_DOWNUP = JTEXT::_('DOWNUP');
$lang_ROTORPOSITION = JTEXT::_('ROTORPOSITION');
$lang_INITALROTORPOSITION = JTEXT::_('INITALROTORPOSITION');
$lang_REFLECTOR = JTEXT::_('REFLECTOR');
$lang_USEDROTORS = JTEXT::_('USEDROTORS');
$lang_STEPPINGPOSITION = JTEXT::_('STEPPINGPOSITION');
Ejemplo n.º 2
0
function steckbrett($string)
{
    $temp = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
    $string_neu = leerraus($string);
    $laenge = strlen($string_neu);
    $_array = str_split($string_neu);
    for ($i = 0; $i < $laenge; $i++) {
        $zeichen1 = $_array[$i];
        $zeichen2 = $_array[$i + 1];
        for ($k = 0; $k <= 25; $k++) {
            if ($zeichen1 == $temp[$k]) {
                $temp[$k] = $zeichen2;
                $pos = $k;
            }
        }
        for ($k = 0; $k <= 25; $k++) {
            if ($pos == $k) {
            } else {
                if ($zeichen2 == $temp[$k]) {
                    $temp[$k] = $zeichen1;
                }
            }
        }
        $i++;
    }
    return $temp;
}