This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frames.php
64 lines (59 loc) · 1.81 KB
/
frames.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
<?php include("translate.php"); ?>
<html>
<head>
<title>CNXML Side-by-Side Editor</title>
<?php
$module = $_GET["getModule"];
if($module) {
$sourceLanguage = $_GET["sourceLanguage"];
$targetLanguage = $_GET["targetLanguage"];
?>
</head>
<frameset cols="*,*" frameborder=1 framespacing=0 rows="*">
<frame src="index.php?getModule=<?php echo $module; ?>&getLanguage=<?php echo $sourceLanguage; ?>" noresize
scrolling=no marginwidth=0 marginheight=0>
<frame src="index.php?getModule=<?php echo $module; ?>&getLanguage=<?php echo $targetLanguage; ?>" noresize
scrolling=no marginwidth=0 marginheight=0>
</frameset>
<?php
} else {
?>
<link rel="stylesheet" href="lib/codemirror.css">
<link rel="stylesheet" href="xml.css">
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<h2>CNXML Side-by-Side Editor</h2>
<form method="get" action="frames.php">
<p>Module number: <input type="text" name="getModule" value="<?php echo $module; ?>" size="10"/>
<?php
for($i = 0; $i < 2; $i++) {
if($i == 0) {
$prompt = "Source language";
$selectName = "sourceLanguage";
$default = "en";
} else {
$prompt = "Target language";
$selectName = "targetLanguage";
$default = "en";
}
echo ' ' . $prompt . ': <select name="' . $selectName . '">' . "\n";
foreach($transLanguageList as $key=>$entry) {
$entry = explode(":", $entry);
echo ' <option value="' . $entry[0] . '"';
if($entry[0] == $default)
echo ' selected';
echo '>' . $entry[1] . '</option>' . "\n";
}
echo " </select>\n";
}
?>
<input type="submit" value="Translate"/>
</p>
</form>
</body>
<?php
}
?>
</html>