parent
dce4c747b5
commit
2d586ab6c9
@ -1,115 +1,127 @@ |
|||||||
<?php |
<?php |
||||||
/* |
/* |
||||||
============================================================================== |
============================================================================== |
||||||
Dokeos - elearning and course management software |
Dokeos - elearning and course management software |
||||||
|
|
||||||
Copyright (c) 2004-2008 Dokeos SPRL |
Copyright (c) 2004-2008 Dokeos SPRL |
||||||
Copyright (c) 2003-2005 Ghent University (UGent) |
Copyright (c) 2003-2005 Ghent University (UGent) |
||||||
Copyright (c) 2001 Universite catholique de Louvain (UCL) |
Copyright (c) 2001 Universite catholique de Louvain (UCL) |
||||||
|
|
||||||
Copyright (c) Sally "Example" Programmer (sally@somewhere.net) |
Copyright (c) Sally "Example" Programmer (sally@somewhere.net) |
||||||
|
|
||||||
For a full list of contributors, see "credits.txt". |
For a full list of contributors, see "credits.txt". |
||||||
The full license can be read in "license.txt". |
The full license can be read in "license.txt". |
||||||
|
|
||||||
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
||||||
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
||||||
as published by the Free Software Foundation; either version 2 |
as published by the Free Software Foundation; either version 2 |
||||||
of the License, or (at your option) any later version. |
of the License, or (at your option) any later version. |
||||||
|
|
||||||
See the GNU General Public License for more details. |
See the GNU General Public License for more details. |
||||||
|
|
||||||
Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium |
Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium |
||||||
Mail: info@dokeos.com |
Mail: info@dokeos.com |
||||||
============================================================================== |
============================================================================== |
||||||
*/ |
*/ |
||||||
/** |
/** |
||||||
============================================================================== |
============================================================================== |
||||||
* This script displays a help window. |
* This script displays a help window. |
||||||
* |
* |
||||||
* @package dokeos.help |
* @package dokeos.help |
||||||
============================================================================== |
============================================================================== |
||||||
*/ |
*/ |
||||||
// name of the language file that needs to be included |
// name of the language file that needs to be included |
||||||
$language_file='help'; |
$language_file='help'; |
||||||
$helpName=$_GET['open']; |
$helpName=$_GET['open']; |
||||||
include('../inc/global.inc.php'); |
include('../inc/global.inc.php'); |
||||||
include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); |
include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); |
||||||
$language_code = Database::get_language_isocode($language_interface); |
$language_code = Database::get_language_isocode($language_interface); |
||||||
header('Content-Type: text/html; charset='. $charset); |
header('Content-Type: text/html; charset='. $charset); |
||||||
?> |
?> |
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $language_code; ?>" lang="<?php echo $language_code; ?>">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $language_code; ?>" lang="<?php echo $language_code; ?>">
|
||||||
<head> |
<head> |
||||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
|
||||||
<title> |
<title> |
||||||
<?php echo get_lang('H'.$helpName); ?> |
<?php echo get_lang('H'.$helpName); ?> |
||||||
</title> |
</title> |
||||||
<style type="text/css" media="screen, projection"> |
<style type="text/css" media="screen, projection"> |
||||||
/*<![CDATA[*/ |
/*<![CDATA[*/ |
||||||
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/public_admin/default.css";
|
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/public_admin/default.css";
|
||||||
/*]]>*/ |
/*]]>*/ |
||||||
</style> |
</style> |
||||||
<?php |
<?php |
||||||
if(api_get_setting('stylesheets')<>'') |
if(api_get_setting('stylesheets')<>'') |
||||||
{ |
{ |
||||||
?> |
?> |
||||||
<style type="text/css" media="screen, projection"> |
<style type="text/css" media="screen, projection"> |
||||||
/*<![CDATA[*/ |
/*<![CDATA[*/ |
||||||
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets');?>/default.css";
|
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets');?>/default.css";
|
||||||
/*]]>*/ |
/*]]>*/ |
||||||
</style> |
</style> |
||||||
<?php |
<?php |
||||||
} |
} |
||||||
?> |
?> |
||||||
</head> |
</head> |
||||||
<body> |
<body> |
||||||
<div style="margin:10px;"> |
<div style="margin:10px;"> |
||||||
<div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close'); ?></a></div>
|
<div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close'); ?></a></div>
|
||||||
<h4> |
<h4> |
||||||
<?php
|
<?php
|
||||||
echo get_lang('Faq'); |
echo get_lang('Faq'); |
||||||
if(api_is_platform_admin()) |
|
||||||
{ |
/* |
||||||
echo ' <a href="faq.php?edit=true"><img src="'.api_get_path(WEB_IMG_PATH).'edit.gif" /></a>'; |
----------------------------------------------------------- |
||||||
} |
FAQ configuration settings |
||||||
?> |
----------------------------------------------------------- |
||||||
</h4> |
*/ |
||||||
<?php |
|
||||||
$faq_file = 'faq.html'; |
$fck_attribute['Width'] = '100%'; |
||||||
if(!empty($_GET['edit']) && $_GET['edit']=='true' && api_is_platform_admin()) |
$fck_attribute['Height'] = '300'; |
||||||
{ |
$fck_attribute['ToolbarSet'] = 'FAQ'; |
||||||
$form = new FormValidator('set_faq','post','faq.php?edit=true'); |
// |
||||||
$form -> add_html_editor('faq_content',null, false); |
|
||||||
$form -> addElement('submit','faq_submit', get_lang('Ok')); |
if(api_is_platform_admin()) |
||||||
$form -> setDefaults(array('faq_content'=>file_get_contents(api_get_path(SYS_PATH).'home/faq.html'))); |
{ |
||||||
if($form -> validate()) |
echo ' <a href="faq.php?edit=true"><img src="'.api_get_path(WEB_IMG_PATH).'edit.gif" /></a>'; |
||||||
{ |
} |
||||||
$content = $form -> getSubmitValue('faq_content'); |
?> |
||||||
$fpath = api_get_path(SYS_PATH).'home/'.$faq_file; |
</h4> |
||||||
if(is_file($fpath) && is_writeable($fpath)) |
<?php |
||||||
{ |
$faq_file = 'faq.html'; |
||||||
$fp = fopen(api_get_path(SYS_PATH).'home/'.$faq_file,'w'); |
if(!empty($_GET['edit']) && $_GET['edit']=='true' && api_is_platform_admin()) |
||||||
fwrite($fp, $content); |
{ |
||||||
fclose($fp); |
$form = new FormValidator('set_faq','post','faq.php?edit=true'); |
||||||
} |
$form -> add_html_editor('faq_content',null, false); |
||||||
else |
$form -> addElement('submit','faq_submit', get_lang('Ok')); |
||||||
{ |
$form -> setDefaults(array('faq_content'=>file_get_contents(api_get_path(SYS_PATH).'home/faq.html'))); |
||||||
echo get_lang('WarningFaqFileNonWriteable').'<br />'; |
if($form -> validate()) |
||||||
} |
{ |
||||||
echo $content; |
$content = $form -> getSubmitValue('faq_content'); |
||||||
} |
$fpath = api_get_path(SYS_PATH).'home/'.$faq_file; |
||||||
else |
if(is_file($fpath) && is_writeable($fpath)) |
||||||
{ |
{ |
||||||
$form -> display(); |
$fp = fopen(api_get_path(SYS_PATH).'home/'.$faq_file,'w'); |
||||||
} |
fwrite($fp, $content); |
||||||
} |
fclose($fp); |
||||||
else |
} |
||||||
{ |
else |
||||||
echo file_get_contents(api_get_path(SYS_PATH).'home/'.$faq_file); |
{ |
||||||
} |
echo get_lang('WarningFaqFileNonWriteable').'<br />'; |
||||||
?> |
} |
||||||
<div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close'); ?></a></div>
|
echo $content; |
||||||
</div> |
} |
||||||
</body> |
else |
||||||
|
{ |
||||||
|
$form -> display(); |
||||||
|
} |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
echo file_get_contents(api_get_path(SYS_PATH).'home/'.$faq_file); |
||||||
|
} |
||||||
|
?> |
||||||
|
<div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close'); ?></a></div>
|
||||||
|
</div> |
||||||
|
</body> |
||||||
</html> |
</html> |
Loading…
Reference in new issue