forked from francoisjacquet/rosariosis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBottom.php
115 lines (89 loc) · 4.45 KB
/
Bottom.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
error_reporting(1);
include('Warehouse.php');
if($_REQUEST['modfunc']=='print')
{
//FJ call PDFStart to generate Print PDF
if($_REQUEST['expanded_view'])
$_SESSION['orientation'] = 'landscape';
$print_data = PDFStart();
$_REQUEST = $_SESSION['_REQUEST_vars'];
$_REQUEST['_ROSARIO_PDF'] = true;
$modname = $_REQUEST['modname'];
if(!$wkhtmltopdfPath)
$_ROSARIO['allow_edit'] = false;
//FJ security fix, cf http://www.securiteam.com/securitynews/6S02U1P6BI.html
if (mb_substr($modname, -4, 4)!='.php' || mb_strpos($modname, '..')!==false || !is_file('modules/'.$modname))
{
include('ProgramFunctions/HackingLog.fnc.php');
HackingLog();
}
else
include('modules/'.$modname);
//FJ call PDFStop to generate Print PDF
PDFStop($print_data);
}
elseif($_REQUEST['modfunc']=='help')
{
$help_translated = 'Help_'.mb_substr($locale, 0, 2).'.php';
$help_english = 'Help_en.php';
if (file_exists($help_translated)) //FJ translated help
include($help_translated);
else
include($help_english);
//FJ add help for non-core modules
$not_core_modules = array_diff(array_keys($RosarioModules),$RosarioCoreModules);
foreach($not_core_modules as $not_core_module)
{
$not_core_dir = 'modules/'.$not_core_module.'/';
if (file_exists($not_core_dir.$help_translated)) //FJ translated help
include($not_core_dir.$help_translated);
elseif (file_exists($not_core_dir.$help_english))
include($not_core_dir.$help_english);
}
$help_text = '';
foreach($help as $program=>$help_txt)
{
//FJ fix bug URL Modules.php?modfunc=help&modname=Student_Billing/Statements.php&_ROSARIO_PDF
if($_REQUEST['modname']==$program || (mb_strpos($program, $_REQUEST['modname'])=== 0 && mb_strpos($_SERVER['QUERY_STRING'], $program)=== 21))
$help_text = $help_txt;
}
if(empty($help_text))
$help_text = $help['default'];
if(User('PROFILE') == 'student')
$help_text = str_replace('your child','yourself',str_replace('your child\'s','your',$help_text));
$help_text = str_replace('RosarioSIS', Config('NAME'),$help_text);
echo $help_text;
}
else
{ ?>
<div id="footerwrap">
<a id="BottomButtonMenu" href="#" onclick="expandMenu(); return false;" title="<?php echo _('Menu'); ?>" class="BottomButton"> <span><?php echo _('Menu'); ?></span></a>
<?php //FJ icons
if($_SESSION['List_PHP_SELF'] && (User('PROFILE')=='admin' || User('PROFILE')=='teacher')) :
switch ($_SESSION['Back_PHP_SELF']) {
case 'student': $back_text = _('Student List'); break;
case 'staff': $back_text = _('User List'); break;
case 'course': $back_text = _('Course List'); break;
default: $back_text = sprintf(_('%s List'),$_SESSION['Back_PHP_SELF']);
} ?>
<a href="<?php echo $_SESSION['List_PHP_SELF']; ?>&bottom_back=true" title="<?php echo $back_text; ?>" class="BottomButton"><img src="assets/themes/<?php echo Preferences('THEME'); ?>/btn/back.png" /> <span><?php echo $back_text; ?></span></a>
<?php endif;
if($_SESSION['Search_PHP_SELF'] && (User('PROFILE')=='admin' || User('PROFILE')=='teacher')) :
switch ($_SESSION['Back_PHP_SELF']) {
case 'student': $back_text = _('Student Search'); break;
case 'staff': $back_text = _('User Search'); break;
case 'course': $back_text = _('Course Search'); break;
default: $back_text = sprintf(_('%s Search'),$_SESSION['Back_PHP_SELF']);
} ?>
<a href="<?php echo $_SESSION['Search_PHP_SELF']; ?>&bottom_back=true" title="<?php echo $back_text; ?>" class="BottomButton"><img src="assets/themes/<?php echo Preferences('THEME'); ?>/btn/back.png" /> <span><?php echo $back_text; ?></span></a>
<?php endif; ?>
<a href="Bottom.php?modfunc=print" target="_blank" title="<?php echo _('Print'); ?>" class="BottomButton"><img src="assets/themes/<?php echo Preferences('THEME'); ?>/btn/print.png" /> <span><?php echo _('Print'); ?></span></a>
<a href="#" onclick="toggleHelp();return false;" title="<?php echo _('Help'); ?>" class="BottomButton"><img src="assets/themes/<?php echo Preferences('THEME'); ?>/btn/help.png" /> <span><?php echo _('Help'); ?></span></a>
<a href="index.php?modfunc=logout" target="_top" title="<?php echo _('Logout'); ?>" class="BottomButton"><img src="assets/themes/<?php echo Preferences('THEME'); ?>/btn/logout.png" /> <span><?php echo _('Logout'); ?></span></a>
<img id="BottomSpinner" class="BottomButton" src="assets/themes/<?php echo Preferences('THEME'); ?>/spinning.gif" alt="Loading" />
</div>
<div id="footerhelp"></div>
<?php
}
?>