-
Notifications
You must be signed in to change notification settings - Fork 87
/
do_test.php
59 lines (47 loc) · 1.8 KB
/
do_test.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
<?php
/**************************************************************
"Learning with Texts" (LWT) is released into the Public Domain.
This applies worldwide.
In case this is not legally possible, any entity is granted the
right to use this work for any purpose, without any conditions,
unless such conditions are required by law.
Developed by J. Pierre in 2011.
***************************************************************/
/**************************************************************
Call: do_test.php?lang=[langid]
Call: do_test.php?text=[textid]
Call: do_test.php?selection=1 (SQL via $_SESSION['testsql'])
Start a test (frameset)
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$p = '';
if (isset($_REQUEST['selection']) && isset($_SESSION['testsql']))
$p = "selection=" . $_REQUEST['selection'];
if (isset($_REQUEST['lang']))
$p = "lang=" . $_REQUEST['lang'];
if (isset($_REQUEST['text']))
$p = "text=" . $_REQUEST['text'];
if ($p != '') {
framesetheader('Test');
?>
<frameset cols="<?php echo tohtml(getSettingWithDefault('set-test-l-framewidth-percent')); ?>%,*">
<frameset rows="<?php echo tohtml(getSettingWithDefault('set-test-h-frameheight')); ?>,*">
<frame src="do_test_header.php?<?php echo $p; ?>" scrolling="no" name="h" />
<frame src="empty.htm" scrolling="auto" name="l" />
</frameset>
<frameset rows="<?php echo tohtml(getSettingWithDefault('set-test-r-frameheight-percent')); ?>%,*">
<frame src="empty.htm" scrolling="auto" name="ro" />
<frame src="empty.htm" scrolling="auto" name="ru" />
</frameset>
<noframes><body><p>Sorry - your browser does not support frames.</p></body></noframes>
</frameset>
</html>
<?php
}
else {
header("Location: edit_texts.php");
exit();
}
?>