forked from drbob/rs-w2c
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinput.php
83 lines (69 loc) · 3.18 KB
/
input.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" >
<head>
<meta charset="utf-8">
<title>RetroShare Chat Server - Key Exchange</title>
</head>
<body>
<?php
//debugging
//echo 'lang= '.$_REQUEST['lang'] . "<BR>"; // $_REQUEST catches $_GET and $_POST
$available_lang = array("de", "en", "es", "fr", "hu", "it", "pt", "ro", "ru", "se", "by");
if (in_array($_REQUEST['lang'], $available_lang)) {
$lang_file = "i18n/".$_REQUEST['lang']."_lang.txt" ;
}
else {
$lang_file = "i18n/"."en"."_lang.txt" ;
}
//debugging
//echo "<BR>" . "$lang_file" . "<BR>" ;
$translation = file($lang_file, FILE_IGNORE_NEW_LINES);
$transcount = count($translation);
for ($i = 0; $i < $transcount; $i++) {
$translation[$i] = substr($translation[$i], 3);
}
?>
<h1 style="text-align: center;"><?php echo $translation[0] ; ?> </h1>
<p><?php echo $translation[1] ?></p>
<h2><?php echo $translation[2] ?></h2>
<ol>
<?php
if(!($translation[3] == NULL)) {
echo "<li>" . $translation[3] . "</li>" ;
}
if(!($translation[4] == NULL)) {
echo "<li>" . $translation[4] . "</li>" ;
}
if(!($translation[5] == NULL)) {
echo "<li>" . $translation[5] . "</li>" ;
}
if(!($translation[6] == NULL)) {
echo "<li>" . $translation[6] . "</li>" ;
}
if(!($translation[7] == NULL)) {
echo "<li>" . $translation[7] . "</li>" ;
}
if(!($translation[8] == NULL)) {
echo "<li>" . $translation[8] . "</li>" ;
}
if(!($translation[9] == NULL)) {
echo "<li>" . $translation[9] . "</li>" ;
}
if(!($translation[10] == NULL)) {
echo "<li>" . $translation[10] . "</li>" ;
}
?>
</ol>
<hr style="width: 60%; height: 2px;"></hr>
<h2><?php echo $translation[11] ?></h2>
<form method="post" action=<?php echo "process.php" . "?lang=" . $_REQUEST['lang'] ?> name="process">
<fieldset>
<table border='0'>
<tr><td valign="top"><?php echo $translation[12] ?></td><td><textarea name="key" rows="10" cols="85"></textarea></td></tr>
<tr><td><?php echo $translation[13] ?><br/><img id="captcha" src="securimage/securimage_show.php" alt="CAPTCHA Image"></img></td><td><input name="captcha_code" size="10" maxlength="6" type="text"></input><a href="#" onclick="document.getElementById('captcha').src = 'securimage/securimage_show.php?' + Math.random(); return false"><?php echo $translation[14] ?></a></td></tr>
</table>
<input value="<?php echo $translation[15] ?>" type="submit"></input>
</fieldset>
</form>
</body>
</html>