0d384b1c7855e52659b1b0aab9910f7c72f25a4d
[atutor.git] / docs / themes / simplified-desktop / users / pref_wizard / index.tmpl.php
1 <?php 
2 global $savant;
3 global $_base_path;
4 global $msg;
5 ?>
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="<?php echo $this->lang_code; ?>">
8     <head>
9         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->lang_charset; ?>" />
10         <title><?php echo SITE_NAME; ?> : <?php echo _AT('preferences'); ?></title>
11         <script src="<?php echo $_base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
12                 <script src="<?php echo $_base_path; ?>jscripts/lib/TILE.js" type="text/javascript"></script>
13         <link rel="shortcut icon" href="<?php echo $_base_path; ?>favicon.ico" type="image/x-icon" />
14         <link rel="stylesheet" href="<?php echo $_base_path ?>jscripts/infusion/framework/fss/css/fss-layout.css" type="text/css" />       
15         <link rel="stylesheet" href="<?php echo $_base_path; ?>themes/default/styles.css" type="text/css" />
16         <script src="<?php echo $_base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>   
17         <style id="pref_style" type="text/css"></style>    
18     </head>
19     <body onload="<?php echo $this->onload; ?>">
20         <div class="fl-force-right"><br /><a href="javascript:window.close()"><?php echo _AT('close'); ?></a></div>
21         <a name="content"></a>
22
23         <h1><?php echo _AT('preferences') ?></h1>
24         <?php $msg->printAll(); ?>
25
26 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form" enctype="multipart/form-data">
27 <?php
28     if ($this->start_template != null) {
29         $savant->display($this->start_template);
30     }
31     else if ($this->pref_template != null) {
32         echo '<fieldset class="wizscreen">';
33         include_once($this->pref_template);
34
35         
36         foreach ($this->pref_wiz as $pref => $template) { 
37             echo '<input type="hidden" name="pref_wiz[]" value="'.$template.'" />';
38         }
39         echo '<input type="hidden" value="'.$this->pref_index.'" name="pref_index" id="pref_index" />';    
40         echo '<input type="hidden" value="'.$_SESSION['course_id'].'" name="course_id" id="course_id" />';
41         
42         echo '<div class="row buttons"><input class="button" type="submit" name="set_default" value="'._AT("reapply_default").'" accesskey="d" />';
43         echo '<span class="fl-force-right"><input type="submit" value="'._AT('previous').'" name="previous" id="previous" class="button"/>';
44         if ($this->pref_index < count($this->pref_wiz) - 1) echo '<input type="submit" value="'._AT('next').'" name="next" id="next" class="button"/>';
45         else echo '<input type="submit" value="'._AT('done').'" name="done" id="done" class="button"/>';
46         echo '</span></div>';
47         echo '</fieldset>';
48     }
49 ?>
50 </form>
51 <script type="text/javascript">
52 //<!--
53     <?php 
54     if (isset($_POST['done']) || isset($_POST['set_default'])) {
55         echo 'ATutor.users.preferences.setStyles("'.$_SESSION["prefs"]["PREF_BG_COLOUR"].
56             '","'.$_SESSION["prefs"]["PREF_FG_COLOUR"].
57             '","'.$_SESSION["prefs"]["PREF_HL_COLOUR"].
58             '","'.$_SESSION["prefs"]["PREF_FONT_FACE"].
59             '","'.$_SESSION["prefs"]["PREF_FONT_TIMES"].'");';
60         
61     } 
62     if (isset($_POST['done'])) {
63         echo "window.close();";
64     }
65     require_once(AT_INCLUDE_PATH.'../jscripts/ATutor_js.php'); 
66     ?>
67 //-->
68
69
70 </script>
71
72 </body>
73 </html>