-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathtool_settings.inc.php
91 lines (68 loc) · 3.66 KB
/
tool_settings.inc.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
84
85
86
87
88
89
90
91
<legend><strong><?php echo _AT("support_tools"); ?></strong> </legend>
<div id="help" style="width:90%;">
<?php echo _AT('prefs_set_tools'); ?></div>
<div class="row">
<?php
if (isset($_POST["dictionary_val"]))
$dict_val = $_POST["dictionary_val"];
else
$dict_val = $_SESSION['prefs']['PREF_DICTIONARY'];
if ($dict_val == 1) $dict = ' checked="checked" ';
if (isset($_POST["thesaurus_val"]))
$thes_val = $_POST["thesaurus_val"];
else
$thes_val = $_SESSION['prefs']['PREF_THESAURUS'];
if ($thes_val == 1) $thes = ' checked="checked" ';
if (isset($_POST["encyclopedia_val"]))
$enc_val = $_POST["encyclopedia_val"];
else
$enc_val = $_SESSION['prefs']['PREF_ENCYCLOPEDIA'];
if ($enc_val == 1) $enc = ' checked="checked" ';
if (isset($_POST["atlas_val"])){
$atla_val = $_POST["atlas_val"];
}else{
$atla_val = $_SESSION['prefs']['PREF_ATLAS'];
}
if ($atla_val == 1) $atla = ' checked="checked" ';
if (isset($_POST["note_taking_val"]))
$notes_val = $_POST["note_taking_val"];
else
$notes_val = $_SESSION['prefs']['PREF_NOTE_TAKING'];
if ($notes_val == 1) $notes = ' checked="checked" ';
if (isset($_POST["calculator_val"]))
$calc_val = $_POST["calculator_val"];
else
$calc_val = $_SESSION['prefs']['PREF_CALCULATOR'];
if ($calc_val == 1) $calc = ' checked="checked" ';
if (isset($_POST["abacus_val"]))
$abac_val = $_POST["abacus_val"];
else
$abac_val = $_SESSION['prefs']['PREF_ABACUS'];
if ($abac_val == 1) $abac = ' checked="checked" ';
?>
<input id="dict_val" name="dictionary_val" type="hidden" value="<?php echo $dict_val; ?>" />
<input id="dict" name="dictionary" type="checkbox" <?php echo $dict; ?> onchange="changeVal('dict')" /><label for="dict"><?php echo _AT("dictionary"); ?></label><br />
<input id="thes_val" name="thesaurus_val" type="hidden" value="<?php echo $thes_val; ?>" />
<input id="thes" name="thesaurus" type="checkbox" <?php echo $thes; ?> onchange="changeVal('thes')" /><label for="thes"><?php echo _AT("thesaurus"); ?></label><br />
<input id="enc_val" name="encyclopedia_val" type="hidden" value="<?php echo $enc_val; ?>" />
<input id="enc" name="encyclopedia" type="checkbox" <?php echo $enc; ?> onchange="changeVal('enc')" /><label for="enc"><?php echo _AT("encyclopedia"); ?></label><br />
<input id="atla_val" name="atlas_val" type="hidden" value="<?php echo $atla_val; ?>" />
<input id="atla" name="atlas" type="checkbox" <?php echo $atla; ?> onchange="changeVal('atla')" /><label for="atla"><?php echo _AT("atlas"); ?></label><br />
<input id="notes_val" name="note_taking_val" type="hidden" value="<?php echo $notes_val; ?>" />
<input id="notes" name="note_taking" type="checkbox" <?php echo $notes; ?> onchange="changeVal('notes')" /><label for="notes"><?php echo _AT("note_taking"); ?></label><br />
<input id="calc_val" name="calculator_val" type="hidden" value="<?php echo $calc_val; ?>" />
<input id="calc" name="calculator" type="checkbox" <?php echo $calc; ?> onchange="changeVal('calc')" /><label for="calc"><?php echo _AT("calculator"); ?></label><br />
<input id="abac_val" name="abacus_val" type="hidden" value="<?php echo $abac_val; ?>" />
<input id="abac" name="abacus" type="checkbox" <?php echo $abac; ?> onchange="changeVal('abac')" /><label for="abac"><?php echo _AT("abacus"); ?></label><br />
</div>
<script type="text/javascript">
//<!--
function changeVal(val_name)
{
if (eval('document.getElementById("'+ val_name +'").checked'))
eval('document.getElementById("'+ val_name +'_val").value = 1');
else
eval('document.getElementById("'+ val_name +'_val").value = 0');
}
//-->
</script>