made a copy
[atutor.git] / users / tool_settings.inc.php
1  <fieldset> <legend><strong><?php echo _AT("support_tools"); ?></strong>  </legend>  
2         <div class="row">
3                 <?php echo _AT('support_tools'); ?><br />
4 <?php
5                         if (isset($_POST["dictionary_val"]))
6                                 $dict_val = $_POST["dictionary_val"];
7                         else
8                                 $dict_val = $_SESSION['prefs']['PREF_DICTIONARY'];
9                         
10                         if ($dict_val == 1) $dict = ' checked ';
11
12                         if (isset($_POST["thesaurus_val"]))
13                                 $thes_val = $_POST["thesaurus_val"];
14                         else
15                                 $thes_val = $_SESSION['prefs']['PREF_THESAURUS'];
16                                 
17                         if ($thes_val == 1) $thes = ' checked ';
18
19                         if (isset($_POST["encyclopedia_val"]))
20                                 $enc_val = $_POST["encyclopedia_val"];
21                         else
22                                 $enc_val = $_SESSION['prefs']['PREF_ENCYCLOPEDIA'];
23                                 
24                         if ($enc_val == 1) $enc = ' checked ';
25
26                         if (isset($_POST["atlas_val"])){
27
28                                 $atla_val = $_POST["atlas_val"];
29                         }else{
30                                 $atla_val = $_SESSION['prefs']['PREF_ATLAS'];
31                         }       
32                         if ($atla_val == 1) $atla = ' checked ';
33
34
35                         if (isset($_POST["note_taking_val"]))
36                                 $notes_val = $_POST["note_taking_val"];
37                         else
38                                 $notes_val = $_SESSION['prefs']['PREF_NOTE_TAKING'];
39                                 
40                         if ($notes_val == 1) $notes = ' checked ';
41
42                         if (isset($_POST["calculator_val"]))
43                                 $calc_val = $_POST["calculator_val"];
44                         else
45                                 $calc_val = $_SESSION['prefs']['PREF_CALCULATOR'];
46                                 
47                         if ($calc_val == 1) $calc = ' checked ';
48
49                         if ($peer_val == 1) $peer = ' checked ';
50
51                         if (isset($_POST["abacus_val"]))
52                                 $abac_val = $_POST["abacus_val"];
53                         else
54                                 $abac_val = $_SESSION['prefs']['PREF_ABACUS'];
55                                 
56                         if ($abac_val == 1) $abac = ' checked ';
57
58 ?>
59                 <input id="dict_val" name="dictionary_val" type="hidden" value="<?php echo $dict_val; ?>" >
60                 <input id="dict" name="dictionary" type="checkbox" <?php echo $dict; ?> onchange="changeVal('dict')"><label for="dict"><?php echo _AT("dictionary"); ?></label><br />
61                 
62                 <input id="thes_val" name="thesaurus_val" type="hidden" value="<?php echo $thes_val; ?>" >
63                 <input id="thes" name="thesaurus" type="checkbox" <?php echo $thes; ?> onchange="changeVal('thes')"><label for="thes"><?php echo _AT("thesaurus"); ?></label><br />
64
65                 <input id="enc_val" name="encyclopedia_val" type="hidden" value="<?php echo $enc_val; ?>" >
66                 <input id="enc" name="encyclopedia" type="checkbox" <?php echo $enc; ?> onchange="changeVal('enc')"><label for="enc"><?php echo _AT("encyclopedia"); ?></label><br />
67
68                 <input id="atla_val" name="atlas_val" type="hidden" value="<?php echo $atla_val; ?>" >
69                 <input id="atla" name="atlas" type="checkbox" <?php echo $atla; ?> onchange="changeVal('atla')"><label for="atla"><?php echo _AT("atlas"); ?></label><br />
70
71                 <input id="notes_val" name="note_taking_val" type="hidden" value="<?php echo $notes_val; ?>" >
72                 <input id="notes" name="note_taking" type="checkbox" <?php echo $notes; ?> onchange="changeVal('notes')"><label for="notes"><?php echo _AT("note_taking"); ?></label><br />
73
74                 <input id="calc_val" name="calculator_val" type="hidden" value="<?php echo $calc_val; ?>" >
75                 <input id="calc" name="calculator" type="checkbox" <?php echo $calc; ?> onchange="changeVal('calc')"><label for="calc"><?php echo _AT("calculator"); ?></label><br />
76 <!--
77                 <input id="peer_val" name="peer_interaction_val" type="hidden" value="<?php echo $peer_val; ?>" >
78                 <input id="peer" name="peer_interaction" type="checkbox" <?php echo $peer; ?> onchange="changeVal('peer')"><label for="peer"><?php echo _AT("peer_interaction"); ?></label><br />-->
79
80                 <input id="abac_val" name="abacus_val" type="hidden" value="<?php echo $abac_val; ?>" >
81                 <input id="abac" name="abacus" type="checkbox" <?php echo $abac; ?> onchange="changeVal('abac')"><label for="abac"><?php echo _AT("abacus"); ?></label><br />
82         </div>
83
84 <script language="javascript" type="text/javascript">
85 //<!--
86 function changeVal(val_name)
87 {
88         if (eval('document.getElementById("'+ val_name +'").checked'))
89                 eval('document.getElementById("'+ val_name +'_val").value = 1');
90         else
91                 eval('document.getElementById("'+ val_name +'_val").value = 0');
92 }
93 //-->
94 </script>
95
96 </fieldset>